• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

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..
 
Level 4
Joined
Aug 7, 2007
Messages
75
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!
 
Level 6
Joined
Dec 5, 2007
Messages
184
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
 
Level 2
Joined
Feb 10, 2008
Messages
11
I tried the map castle fight and it is exactly how i wanted it.

How to get rid of these "smart actions" with triggers??
 
Level 11
Joined
Aug 25, 2006
Messages
971
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.
 
Level 2
Joined
Feb 10, 2008
Messages
11
The trigger doesn't work.. i copied totaly the same trigger!

Has sombody else tried??
 
Level 4
Joined
Aug 7, 2007
Messages
75
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'.
 
Level 11
Joined
Aug 25, 2006
Messages
971
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)
 
Level 20
Joined
Oct 21, 2006
Messages
3,230
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.
 
Level 2
Joined
Feb 10, 2008
Messages
11
Yes, but if i do that. The player can't see the stats of the spawned units..
 
Level 2
Joined
Feb 10, 2008
Messages
11
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!
 
Level 4
Joined
Feb 19, 2008
Messages
61
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.
Top