Making units uncontolable

Status
Not open for further replies.
Level 2
Joined
Feb 10, 2008
Messages
11
Hi ppl,

to make a spawned unit uncontrolable i change his ownership with another allied player and keeping the color. But it's messing up my other triggers units get spawned but dont move anymore..

Is there anyway to make my units uncontrolable by NOT changing ownersip??

Thanks..
 
There are a couple of options, depending on what you need. You can add the 'Locust' ability to the unit, making it unselectable, untargetable, and have no collision. With this, units also will not be detected in unit group search triggers.

You can also add the 'Ward' classification to the unit, removing the user interface when the player selects the unit. However with the Ward class, you can still do 'smart' actions that involve right clicking (i.e., move here, attack this unit, etc.). There is a way to remove the 'smart' ability, but I don't know how. I've been trying to figure that one out myself! You can see this type of trick used in maps such as Castle Fight.

Hope this helps!
 
You can also add the 'Ward' classification to the unit, removing the user interface when the player selects the unit. However with the Ward class, you can still do 'smart' actions that involve right clicking (i.e., move here, attack this unit, etc.). There is a way to remove the 'smart' ability, but I don't know how. I've been trying to figure that one out myself!!
These Orders are canceled with triggers
 
I tried the map castle fight and it is exactly how i wanted it.

How to get rid of these "smart actions" with triggers??
 
You people are so unimaginative. Its actually quite simple.
  • NoSmart
    • Events
      • Unit - A unit Is issued an order targeting a point
      • Unit - A unit Is issued an order targeting an object
    • Conditions
      • (Unit-type of (Ordered unit)) Equal to Footman
      • (String((Issued order))) Equal to smart
    • Actions
      • Unit - Order (Ordered unit) to Stop
This will stop right click orders for footman.
 
The trigger doesn't work.. i copied totaly the same trigger!

Has sombody else tried??
 
It's the action of that trigger that is flawed. The condition works, if you use a test trigger that displays "True" when it fires, you'll notice the event and conditions do work properly. If you add in a 0.00 wait action before the order, it will work... I'm not exactly sure why, but for maps such as castle fight, that should work.

My question is, is there a way to remove the ability altogether, using the jass script for removing abilities (don't remember the function at the moment)... It would require knowing the code for 'smart'.
 
The code for "smart" changes depending on what it does. For example, if you target an empty space it'll run the move ability. If you target an enemy it'll run the attack ability.

Also the minimum time that a wait can wait is around .29. So telling it to wait 0.00 is like telling it to wait 0.29 seconds. The above would work if you used a timer (with a minimum wait time of .001)

However to stop a units ability to move, simply:
  • Unit - Remove Move from (Triggering unit)
 
There are a couple of options, depending on what you need. You can add the 'Locust' ability to the unit, making it unselectable, untargetable, and have no collision. With this, units also will not be detected in unit group search triggers.

You can also add the 'Ward' classification to the unit, removing the user interface when the player selects the unit. However with the Ward class, you can still do 'smart' actions that involve right clicking (i.e., move here, attack this unit, etc.). There is a way to remove the 'smart' ability, but I don't know how. I've been trying to figure that one out myself! You can see this type of trick used in maps such as Castle Fight.

Hope this helps!

3rd post @ 1st page.
 
I found a way myself!!

here it is..

-EVENTS-
Unit - A unit Is issued an order targeting a point
Unit - A unit Is issued an order targeting an object
-CONDITIONS-
(Unit-type of (Ordered unit)) Equal to Footman
(String((Issued order))) Equal to smart
-ACTIONS-
Unit - Order (Ordered unit) to Attack-Move To (REGION)

Ofcourse I would never be able to do this whitout all of you.

Thanks for your help!
 
I am making a map and i need to make a Granade for some Cops.
I also need to figure out how to make a new starting unit or building.

any help would be gratly appreciated
 
  • Angry
Reactions: Rui
Status
Not open for further replies.
Back
Top