Trigger Questin: Unit comes within Range

Gurkengelee

New Member
Reaction score
0
Hello everyone! This is my first question so please be patient with me.

I just wrote a trigger, that when a unit uses the Storm-Earth-Fire skill, the three new units are stored in three variables.
Now I wanted to make a trigger that kills those units when another unit comes near to them. But when i open the category for
"A Unit comes within range of unit" there are no variables there. I can just choose Units that are already on the map.
Can somebody help me to code this trigger?
 

ManyTimes

I'm so lonesome I could cry...
Reaction score
293
Show us your trigger so far...
Open up trigger editor >Select the trigger you want to show us on TH.net > go to the top menu "Edit" > Copy as Text > Paste it in a reply here... Remember to write [Co de] Paste Trigger here [/C ode] for readability.
 

n[u]ll

You can change this now in User CP.
Reaction score
93
Use the action "Trigger - Add Action" and add that action from a different trigger. There you can use the variables.
 

Xapphire

Liberty, Simply said; a lie.
Reaction score
45
Thats because your variable types dont fit the event, try Boolean Comparison
 

Exide

I am amazingly focused right now!
Reaction score
448
I guess you'll have to use a periodic event for this.

Code:
Time - Every 1.00 seconds of game time

Unit Group - Pick every unit in (Units within 500.00 of (Position of *Your_Unit*)) and do *Actions*

Or something similar.
 

Ghan

Administrator - Servers are fun
Staff member
Reaction score
889
> Use the action "Trigger - Add Action" and add that action from a different trigger. There you can use the variables.

Correct. Variables are allowed when you do that. That would probably be the best way.
 

n[u]ll

You can change this now in User CP.
Reaction score
93
Thats because your variable types dont fit the event, try Boolean Comparison
? He's doing it in an event not a condition. Event's don't handle variables unless you add the event in an action.


I guess you'll have to use a periodic event for this.

No you don't, what I posted works fine.


> Use the action "Trigger - Add Action" and add that action from a different trigger. There you can use the variables.

Correct. Variables are allowed when you do that. That would probably be the best way.

I beat ghan... Wow! This is amazing. I will treasure this moment for about .5 minutes and then forget about it and go eat breakfast :p lol
 

Exide

I am amazingly focused right now!
Reaction score
448
I had no idea. :p
 

Gurkengelee

New Member
Reaction score
0
Thank you very much for!
What you had suggested nll is working perfectly.

Thanks again for the very fast solution :)
 
General chit-chat
Help Users

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top