• 🏆 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!

help with my triggers can they be smaller??

Status
Not open for further replies.
Level 3
Joined
Mar 25, 2006
Messages
43
this is what my code looks like at the moment
Events
Unit - A unit enters back spawn bar <gen>
Conditions
((Triggering unit) is A Hero) Equal to True
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
GAME_MODE Equal to 1
Then - Actions
Unit - Create 3 Small Zombie for Player 5 (Yellow) at (Center of bar spawn mario and luigi <gen>) facing Default building facing degrees
Unit Group - Order (Units in bar spawn mario and luigi <gen>) to Attack-Move To (Center of west spawn mario and luigi <gen>)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
GAME_MODE Equal to 2
Then - Actions
Unit - Create 6 Small Zombie for Player 5 (Yellow) at (Center of bar spawn mario and luigi <gen>) facing Default building facing degrees
Unit Group - Order (Units in bar spawn mario and luigi <gen>) to Attack-Move To (Center of west spawn mario and luigi <gen>)
Else - Actions
Unit - Create 12 Small Zombie for Player 5 (Yellow) at (Center of bar spawn mario and luigi <gen>) facing Default building facing degrees
Unit Group - Order (Units in bar spawn mario and luigi <gen>) to Attack-Move To (Center of west spawn mario and luigi <gen>)
Unit Group - Order (Units in bar spawn mario and luigi <gen>) to Attack-Move To (Center of west spawn mario and luigi <gen>)
Trigger - Turn off (This trigger)


yes that is a big code for just 1 spawn but....
i wanted to use levels (easy medium hard) for my game
and well i set GAME_MODE(variable)1 for easy 2 for medium 3 for hard
i used a dialog box to vote for it in game it all works fine. but like you can see
the way i did it my code is massive and im scared its gonna start to take up lag.

and 2nd question is only about 15 units can be told to move at a time like on hard i set it to 20 spawn on one of them. and only about 15 move other than that i have to wait about 5 seconds and then tell the game to send again. so should i split it up into spawn 10 wait spawn 10??? or just add a wait and attack. but if i do that u can double activate the trigger???

plz help me thx
 
Level 21
Joined
Aug 21, 2005
Messages
3,699
I would make the trigger the following:

Events
Unit - A unit enters back spawn bar <gen>
Conditions
((Triggering unit) is A Hero) Equal to True
Actions
Unit - Create <3 * GAME_MODE> Small Zombie for Player 5 (Yellow) at (Center of bar spawn mario and luigi <gen>) facing Default building facing degrees
Unit Group - Order (Units in bar spawn mario and luigi <gen>) to Attack-Move To (Center of west spawn mario and luigi <gen>)
Trigger - Turn off (This trigger)

Notice that at 'easy' you'll get 3 zombies, at moderate 6, and at hard 9. If you want 12 to be created at hard, you could
- Create an if/then/else action creating 3 zombies if GAME_MODE = 3,
- or you could simply set game mode to 4 if you want to play hard.

I think maximum 12 units can be commanded to move-attack to a region per time.
You could make a second trigger like this one
Events: every 5 seconds of game time
Conditions: None
Actions: Order units in Bar Spawn Mario and Luigi to attack-move to Center of West Spawn Mario and Luigi matching condition: Triggering unit is a hero not equal to true (Otherwise your heroes will move to that region too as they enter Bar spawn M&L

Or you could set the attack - acquisition range and view distance of the "Zombie" unit to 99999, making them automatically attack every enemy on the map. But only use this if you have only 1 or 2 heroes on the map. e.g. if you have a base, they will attack that base too.
Also: if there are already zombies on the map, they will attack you too (at the beginning of the game), so make sure you use another unit type with the same stats.
And at the moment I can't remember how to set the view distance and acquisitionrange past 1800 and 20000, but I know it's possible
 
Level 4
Joined
Aug 6, 2005
Messages
64
I think maximum 12 units can be commanded to move-attack to a region per time.

Yup, if you want to command more than 12 you would have to split up your spawn then order actions.

(aka: create 12 zombies then order last created units, then create another 12 zombies then order last created again)

After awhile though it may start to lag if there are too many units moving around at once.
 
Level 3
Joined
Mar 25, 2006
Messages
43
thank you

thanks that should help my to make my triggers alot smaller. only reason i didnt do a every 5 seconds to ______ is becuase i want more spawns when people go places and that if i have a trigger with 5seconds to ____ and ____ and ___....... so on u might make some lag when the game starts to trigger. but i like your full vis and attack i may use that thanks. :D
 
Status
Not open for further replies.
Top