• 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.

[General] Non-combat region through triggers. (Not working, help!)

Status
Not open for further replies.
Level 7
Joined
Mar 9, 2016
Messages
226
  • Untitled Trigger 001
    • Events
      • Time - Elapsed game time is 0.00 seconds
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units in CityLight <gen>) and do (Unit - Make (Triggering unit) Invulnerable)
      • Trigger - Turn off (This trigger)
  • Events
    • Unit - A unit enters CityLight <gen>
  • Safe zone Copy
    • Events
      • Unit - A unit leaves CityLight <gen>
    • Conditions
    • Actions
      • Unit - Remove Invulnerable (Neutral) from (Triggering unit)
I have no clue why this isn't working, it doesn't make sense.
This is the link to a map thread with this issue, the map download can be found there if it means anything;
Hyperraria v1.9
 
Level 7
Joined
Mar 10, 2013
Messages
366
First you're missing a piece of code on the second trigger.

Also, what isn't working? The triggers the set/unset invulnerabilitie from the units?

Or the Elapsed time trigger?

Two things: the first one is not going to work because in loops you need to use 'Picked unit' instead.

And it also leaks (only one group thought).
 
Level 7
Joined
Mar 9, 2016
Messages
226
Ahhh, the universe is so cruel. Now all imported icons and imported models are broken, why? I haven't changed anything within the area so far.. Darn it.
 
Level 7
Joined
Mar 9, 2016
Messages
226
First you're missing a piece of code on the second trigger.

Also, what isn't working? The triggers the set/unset invulnerabilitie from the units?

Or the Elapsed time trigger?

Two things: the first one is not going to work because in loops you need to use 'Picked unit' instead.

And it also leaks (only one group thought).
I'm not exactly sure what you mean, though the trigger is meant to make all units within the region invulnerable as the game begins. When they leave the region they are vulnerable again. After they decide to come back into the region they become invulnerable.
 
Level 23
Joined
Dec 4, 2007
Messages
1,556
  • InvulTestINIT
    • Events
      • Time - Elapsed game time is 0.00 seconds
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units in InvulTest <gen>) and do (Actions)
        • Loop - Actions
          • Unit - Add Invulnerable (Neutral) to (Picked unit)
  • InvulTestEnter
    • Events
      • Unit - A unit enters InvulTest <gen>
    • Conditions
    • Actions
      • Unit - Add Invulnerable (Neutral) to (Triggering unit)
  • InvulTestLeave
    • Events
      • Unit - A unit leaves InvulTest <gen>
    • Conditions
    • Actions
      • Unit - Remove Invulnerable (Neutral) from (Triggering unit)

Btw, temporary Unit Groups like here create leaks. Check tutorials to deal with this on the hive.
 
Last edited:
Level 7
Joined
Mar 10, 2013
Messages
366
This:
  • Unit Group - Pick every unit in (Units in CityLight <gen>) and do (Unit - Make (Triggering unit) Invulnerable)
Should be this:
  • Unit Group - Pick every unit in (Units in CityLight <gen>) and do (Unit - Make (Picked unit) Invulnerable)
And you didn't copied all your second trigger, there's only the event there.

The third trigger is fine.
 
Level 7
Joined
Mar 9, 2016
Messages
226
  • InvulTestINIT
    • Events
      • Time - Elapsed game time is 0.00 seconds
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units in InvulTest <gen>) and do (Actions)
        • Loop - Actions
          • Unit - Add Invulnerable (Neutral) to (Picked unit)
  • InvulTestEnter
    • Events
      • Unit - A unit enters InvulTest <gen>
    • Conditions
    • Actions
      • Unit - Add Invulnerable (Neutral) to (Triggering unit)
  • InvulTestLeave
    • Events
      • Unit - A unit leaves InvulTest <gen>
    • Conditions
    • Actions
      • Unit - Remove Invulnerable (Neutral) from (Triggering unit)

Btw, temporary Unit Groups like here create leaks. Check tutorials to deal with this on the hive.

This:
  • Unit Group - Pick every unit in (Units in CityLight <gen>) and do (Unit - Make (Triggering unit) Invulnerable)
Should be this:
  • Unit Group - Pick every unit in (Units in CityLight <gen>) and do (Unit - Make (Picked unit) Invulnerable)
And you didn't copied all your second trigger, there's only the event there.

The third trigger is fine.

Thank you guys, it works now!
Though, the 2nd trigger doesn't really matter. Didn't know I haven't copied it completely.
 
Status
Not open for further replies.
Top