• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

need help on a trigger that makes units unselectable

Status
Not open for further replies.
Level 5
Joined
Jun 13, 2012
Messages
113
So here is what i have

  • Selection
    • Events
      • Unit - A unit Is issued an order targeting a point
      • Unit - A unit Is issued an order targeting an object
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Issued order) Equal to (Order(smart))
    • Actions
      • Unit - Pause (Ordered unit)
      • Unit - Unpause (Ordered unit)
      • Unit - Order (Ordered unit) to Attack-Move To (Center of Spawn Left Alliance <gen>)
The problem that i have is that, i have multiple regions that my units are suppose to move in. So what i want is a trigger similar to this, but not have a region restriction so that i cant select the unit while they go on with there issued order.
 
Level 37
Joined
Jul 22, 2015
Messages
3,485
yes im aware of the locust ability, but i want my units hp to remain visible that's what im looking for. So in other words i want an unslectable unit that still has its hp visable.

Well if you want the unselectable because you don't want the player to be able to order the units to do something else, you can just classify the unit as a ward and order them to move via triggers.

Other than that, I don't think thats possible. I'm sorry :( I will stay subscribed to the thread with hopes that someone knows a way.
 
Level 5
Joined
Jun 13, 2012
Messages
113
Im a little confused on how youre restricted to 1 region. Do you mind showing an illustration of whats happening vs what you want to happen?
So heres my trigger again
  • Selection
    • Events
      • Unit - A unit Is issued an order targeting a point
      • Unit - A unit Is issued an order targeting an object
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Issued order) Equal to (Order(smart))
    • Actions
      • Unit - Pause (Ordered unit)
      • Unit - Unpause (Ordered unit)
      • Unit - Order (Ordered unit) to Attack-Move To (Center of Spawn Left Alliance <gen>)
So bascly when i select my unit it will pause, then unpause aand then resume its order to attack move a region. The problem that im trying to put out is that I can Only order my unit to resume attacking at a certain point of the map or a region, but i have multiple reigons and i want my unit to resume its issue order with out a region to target in to. btw my issue order for move is "Entering Region"
 
Level 5
Joined
Jun 13, 2012
Messages
113
So create multiple triggers with Unit Enters Region events. Then use whatever conditions you need and where you want the heroes to go next. Unless I'm not understanding your question

Ok, so let me try to explain this. What i want is to make units unselectable, BUT with the triggers im currently using it will make my units unselectable but issue it to order attack a region. Now the way my triggers work is when a unit steps on region X it will move to Region Y then Z. So say my units goes over X and then lets say i select that unit, the trigger will occur, which then removes my selection from the unit and issue attack Region Y which is fine. But Since they walked over Y they will be issue to move attk Z, and when i select them they will deselect and move back to X instead of resuming the issue order to Z.
 
Level 11
Joined
Jun 2, 2013
Messages
613
Two ideas off the top of my head

1) What about using a point or rect variables (probably arrays for multiple players) to set the regions of the given order. Then, he goes the stored location in the variable instead.

2) Trigger add and remove unit classifications to and then use if then else cback a to determine where you want them to go.
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
You want minions who will walk a certain route over the map right?

You should store the current target location for each unit individually.
(Unit Indexer and a location array variable.)
Everytime when any of those units is ordered to "stop", then they will be re-ordered to walk to that location.
When your units reach that location (unit enters region), then you set the variable to the new location they have to go to and order them to walk there.
(Move order is attack move or "attack" using a location as target.)

This is the ONLY way to make it work 100%.
There are too many other things that might interfere with the walking order so you will have to have such a thing.
(You can also store the X and Y instead of the location but location is recommended for GUI users and X and Y for JASS users.)

I might have rushed into this too early so I apologize.
De-locusting units does not show the health bar, however it does make them have collision.
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
Download a unit indexer.
It automatically creates an integer for each unit between 1 and 8190.
This is stored on the custom value of the unit (this is simply a trigger function).
With this number you can store a value in a variable array for each individual unit.
 
Status
Not open for further replies.
Top