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

[Trigger] I Need help for an easy one.. ;(

Status
Not open for further replies.
Level 2
Joined
Oct 9, 2007
Messages
15
how can i do this

when
  • Spawn Units
[EVENT]
Time - Every 30.00 seconds of game time

Actions
-------- SPAWN Creeps --------
Set Point = (Center of Red Team Spawn A Footy <gen>)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
( ) Equal to True
Then - Actions
Unit - Create 3 Footman for Player 1 (Red) at Point facing 90.00 degrees
Else - Actions
Unit - Create 3 Elite Footman for Player 1 (Red) at Point facing 90.00 degrees

Example now see the --if - Conditions-- is empty because i cant find on conditions that on certain time example 30 mins then the trigger do else action so after 30min this trigger should do better footmans than before 30min got it?:razz:
 
Level 6
Joined
Feb 12, 2008
Messages
207
well... at first you dont need to set the point, as you can directly use "Center of Region" i have a nice and clean idea to make that in GUI:

  • Spawn
    • Events
      • Time - Every 30.00 seconds of game time
    • Conditions
    • Actions
      • Unit - Create 3 UNIT_TYPE for Player 1 (Red) at (Center of Red Spawn A Footy <gen>) facing Default building facing degrees
  • Spawn Upgrade
    • Events
      • Time - Every 1800.00 seconds of game time
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • UNIT_TYPE Equal to Footman
        • Then - Actions
          • Set UNIT_TYPE = Better Footman
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • UNIT_TYPE Equal to Better Footman
            • Then - Actions
              • Set UNIT_TYPE = Elite Footman
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • UNIT_TYPE Equal to Elite Footman
                • Then - Actions
                  • Set UNIT_TYPE = Uber Footman
                • Else - Actions
                  • Do nothing

ok as you can see, 1800 seconds of game time is equal to 30 mins gametime. Also, you can add as much upgraades for the spawns as you want, just keep stacking the if/then/else sentences. You can also see that the UNIT_TYPE is a unit type variable that you can change into any, and you will have UNIT_TYPE units spawned.
 
Level 5
Joined
Jul 11, 2007
Messages
152
You won't want to forget this however, I used a similar spawning system in my map too and with a periodic trigger like that over time the leaks will build up. Here's how to fix it:

  • Spawn
    • Events
      • Time - Every 30.00 seconds of game time
    • Conditions
    • Actions
      • Set SpawnPoint1 = Center of Red Spawn
      • Unit - Create 3 UNIT_TYPE for Player 1 (Red) at (SpawnPoint1) facing Default building facing degrees
      • Custom script: call DestroyPoing(udg_SpawnPoint1)
 
Status
Not open for further replies.
Top