• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

This can't be right...

Status
Not open for further replies.
Level 6
Joined
May 27, 2007
Messages
162
The event:

Unit - comes within 512 of Unit

Can the Unit, be a variable?

When I click it, it gives me the option of
1) Preset: No Unit / empty drop down menu
or
2) Variable / select unit / edit variables

I do have a variable which stores a unit. But that is not available for me to use!

Any help is greatly appreciated.
 
Use this action in a trigger:
  • Trigger
  • Events
    • Map Initialization
  • Conditions
  • Actions
    • Custom script: set bj_wantDestroyGroup = true
    • Unit Group - Pick every unit in (Units of type Asteroid) and do (Actions)
      • Loop - Actions
        • Trigger - Add to Trigger2 <gen> the event (Unit - A unit comes within 512.00 of (Picked unit))
  • Trigger2
  • Events
  • Conditions
    • //Conditions here (if any)
  • Actions
    • //Actions here
You can replace the picked unit with the variable you want, but, if you are going to use a variable, don't use the Unit Group action of course.
 
Level 6
Joined
May 27, 2007
Messages
162
Thanks again to both of you guys, I can see a little spot in the credits section when this gets finished :)...

I did as Pharaoh_ suggested, in adding a new event to an already built trigger. But now the problem that I have is, the built trigger, as the game goes on, gets more and more events added to it, and therefore triggers multiple times...

I'll try DarkAngelAzazels way next, seems simple enough but - knowing me - i'll probably trip up on something simple. Also, i'm looking into hashtables, they're pretty nifty, going to add a knockback script so that when an asteroid is hit it travels away from the miner... :)
 
Status
Not open for further replies.
Top