HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Uncontrollable Units

05-20-2008, 06:31 AM#1
Zync
Ever since I made Card Shuffle, I have wondered if there was a way to make units owned by a player 100% uncontrollable (since Card Shuffle failed in this attempt). For a long time, I thought it was impossible, however, there is a map I have been playing recently called Castle Fight. Any order you attempt to give the units produced from buildings is 100% ignored, and abilities/controls of those unit's are not visible as well. (So if the unit's are not 100% uncontrollable, they might as well be.)

Does anyone know how to do this?! I have looked through many forums, and while some methods are close, they just don't accomplish the cleanness and seeming purity of Castle Fight. I'd love any help I can get to learn this secret.

(And I don't think the "Independent Summons" post accomplishes this task at all, so please don't bother linking it. The units still wabble when you "smart" them.)
05-20-2008, 06:46 AM#2
Pyrogasm
Try giving the units the "ward" classification? The only other thing I can think of is that the units really aren't owned by the player at all and it just looks like they are through some UI manipulation.

Who is the maker of Castle Fight? Maybe you can contact him and find out what he did.
05-20-2008, 06:50 AM#3
Fulla
I also think he has some form of order block.
I.e. if a unit is issued an order, instead order it to attack move to destination.

But yea as Pyro said, ward classification should remove all the buttons.
05-20-2008, 06:55 AM#4
Shade987
Ward removes everything but the 'smart' command. So what it likely is, is a combination of 'ward' and some sort of command blocker.
05-20-2008, 07:08 AM#5
Zync
Well ok then, do you guys know what kind of unit control he could be using?

Is it simply a re-order, or a pause manipulation? or better/different?
05-20-2008, 07:49 AM#6
Pyrogasm
He probably uses the Ward Classification and then does something like this:
Trigger:
Collapse Events
Unit - A unit is issued an order with no target
Unit - A unit is issued an order targeting an object
Unit - A unit is issued an order targeting a point
Collapse Conditions
Ignore equal to false
Collapse Actions
------- Do stuff here to store the ordered order and the target (if any), however he does it -----
Set Ignore = true
Unit - Issue (Triggering Unit) to Stop
Set Ignore = false
Trigger:
Collapse Events
Time - Every 0.05 seconds of Game-Time
------ That is really probably much too fast, but it probably keeps it from looking like the units pause a bit ------
Conditions
Collapse Actions
Collapse Unit - Pick every unit in (Units_That_Arent_Controllable) and do (Actions)
Collapse Loop - Actions
Collapse If (All conditions are true) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Picked Unit) current order equal to Stop
Collapse Then - Actions
Set Ignore = true
------ Do stuff to restore the target and order the unit to resume its last issued order ------
Set Ignore = false
Else - Actions
Of course, "Ignore" being a global boolean value initially false.
05-20-2008, 10:02 AM#7
DioD
ward removes icons, not orders itself

you need to block smart order only, other orders cannot be given by players.
05-20-2008, 10:08 AM#8
Fulla
Quote:
Originally Posted by Pyrogasm
He probably uses the Ward Classification and then does something like this:
Trigger:
Collapse Events
Unit - A unit is issued an order with no target
Unit - A unit is issued an order targeting an object
Unit - A unit is issued an order targeting a point
Collapse Conditions
Ignore equal to false
Collapse Actions
------- Do stuff here to store the ordered order and the target (if any), however he does it -----
Set Ignore = true
Unit - Issue (Triggering Unit) to Stop
Set Ignore = false
Trigger:
Collapse Events
Time - Every 0.05 seconds of Game-Time
------ That is really probably much too fast, but it probably keeps it from looking like the units pause a bit ------
Conditions
Collapse Actions
Collapse Unit - Pick every unit in (Units_That_Arent_Controllable) and do (Actions)
Collapse Loop - Actions
Collapse If (All conditions are true) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Picked Unit) current order equal to Stop
Collapse Then - Actions
Set Ignore = true
------ Do stuff to restore the target and order the unit to resume its last issued order ------
Set Ignore = false
Else - Actions
Of course, "Ignore" being a global boolean value initially false.

Instead of having 2 triggers, just have the issue attack ground order in first one?
(Don't order unit to stop, order him to resume)
05-20-2008, 12:47 PM#9
Here-b-Trollz
The way the map works is that it changes control of your unit over to a neutral computer, which then orders the unit to attack-move to the enemy base - essentially what you do in an AoS with the spawns. However, the creeps retain their color just because 'switch color' is set to false.
05-20-2008, 02:34 PM#10
Fulla
In Castle Fights he doesn't change ownership thou, I can guarantee that.
05-20-2008, 06:30 PM#11
Here-b-Trollz
Quote:
Originally Posted by Fulla
In Castle Fights he doesn't change ownership thou, I can guarantee that.

How?
05-20-2008, 07:45 PM#12
Fulla
- You can order your units around, nobody else on your team can. (The order gets blocked thou).
- You get bounty when you're units kill stuff, others don't.
- You get your base is under attack msges, nobody else does.

He's simply gave ward classification & whenever you order a smart move, overrides the order with an attack move to destination.
05-20-2008, 11:19 PM#13
Vexorian
Quote:
(And I don't think the "Independent Summons" post accomplishes this task at all, so please don't bother linking it. The units still wabble when you "smart" them.)

Please detail this cause that's exactly the thing independent summons is supposed to fix.

Aloc + Chaos used to work, not anymore, blizzard "fixed" it for some reason.
05-21-2008, 01:06 AM#14
Zync
I just meant that the "Independent Summons" post 'technically' works. However, I can still select a units and right-click a location really fast, keeping the unit there. However, in Castle Fight, I have to right-click as fast as I possibly can, and even in a publicly hosted game, I barely even notice the units moving due to my influences (while it does stop the unit from attacking when I go so fast my finger instantly hurts).


I once read a post (the source now evades my memory) that said pausing the unit, then giving the 'correcting' command, and then un-pausing them works the best. This also allows the event to trigger the action when the unit receiving the command is not currently pause, evading a global var and possible race conditions. Is this plausible? Because the re-ordering as shown above is basically what I did in Card Shuffle way-back-when, and it's just not clean enough for my taste.
05-21-2008, 01:50 AM#15
Vexorian
pausing units to stop orders blows.

if you take independent summons and insist ordering them to a point, the summon might eventually get there, but that's just a coincidence, the ai probably ordered it to go there eventually. You just need to take the method in independent summons and make it be used for attack move rather than for the summon AI, and it will work, if you want I can make the code at this second.

I'll also change the way the summon AI works so they remind their last AI order instead of getting a new one everytime smart is issued. I was going to update it anyways, I guess I got a new project...