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

Does this work ok?

Status
Not open for further replies.
Level 2
Joined
Jun 2, 2013
Messages
15
Can someone take a look at this trigger if it leaks or not or cause some massive lag later in game.

  • Events
    • Time - Every 125.00 seconds of game time
  • Conditions
  • Actions
    • Set BossType[1] = |c007d7d7dGrim Reaper|r
    • Set BossType[2] = |c00FF7F00Sand Wyrm|r
    • Set BossType[3] = |cff32cd32Mother Gaia|r
    • Set BossType[4] = |c007d7d7dVictoria|r
    • -------- ----- --------
    • Set BossPoint[1] = (Center of Area 3 boss <gen>)
    • Set BossPoint[2] = (Center of sand worm <gen>)
    • Set BossPoint[3] = (Center of Gaia <gen>)
    • Set BossPoint[4] = (Center of point zero <gen>)
    • Set BossInt = (Random integer number between 1 and 100)
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • BossInt Less than or equal to 90
      • Then - Actions
        • Unit - Create 1 BossType[2] for Neutral Hostile at BossPoint[2] facing Default building facing degrees
        • Unit - Add a 120.00 second Generic expiration timer to (Last created unit)
        • Game - Display to (All players) the text: (A Guardian has emerged + |c00FF7F00Sand Wyrm|r)
      • Else - Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • BossInt Less than or equal to 80
          • Then - Actions
            • Unit - Create 1 BossType[3] for Neutral Hostile at BossPoint[3] facing Default building facing degrees
            • Unit - Add a 120.00 second Generic expiration timer to (Last created unit)
            • Game - Display to (All players) the text: (A Guardian has emerged: + |c0096FF96Mother Gaia|r)
          • Else - Actions
            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • BossInt Less than or equal to 70
              • Then - Actions
                • Unit - Create 1 BossType[1] for Neutral Hostile at BossPoint[1] facing Default building facing degrees
                • Unit - Add a 120.00 second Generic expiration timer to (Last created unit)
                • Game - Display to (All players) the text: (A Guardian has emerged: + |c007d7d7dGrim Reaper|r)
              • Else - Actions
                • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  • If - Conditions
                    • BossInt Less than or equal to 60
                  • Then - Actions
                    • Unit - Create 1 BossType[4] for Neutral Hostile at BossPoint[4] facing Default building facing degrees
                    • Unit - Add a 120.00 second Generic expiration timer to (Last created unit)
                    • Game - Display to (All players) the text: (Creator of Battleworld has emerged + |c007d7d7dVictoria|r)
                  • Else - Actions
                • Custom script: call RemoveLocation ( udg_BossPoint[4] )
            • Custom script: call RemoveLocation ( udg_BossPoint[1] )
        • Custom script: call RemoveLocation ( udg_BossPoint[3] )
    • Custom script: call RemoveLocation ( udg_BossPoint[2] )
    • Trigger - Turn off (This trigger)
    • Trigger - Turn on (This trigger)
I wanted a boss unit that will spawn in 2mins(5sec) and disappears in 2mins
 
Only create locations (assign the point variables) if you really need them.
Because actually you will need only one temp point variable to set and remove in runtime.

The structure seems logically wrong, because if BossInt is higher than 90,
it will go to the 'Else - Actions' part, and so it will do in all other 'If' statements.
It's maybe meant to be "Equal of Higher", not "Equal or Less".
 
Level 2
Joined
Jun 2, 2013
Messages
15
Only create locations (assign the point variables) if you really need them.
Because actually you will need only one temp point variable to set and remove in runtime.

The structure seems logically wrong, because if BossInt is higher than 90,
it will go to the 'Else - Actions' part, and so it will do in all other 'If' statements.
It's maybe meant to be "Equal of Higher", not "Equal or Less".

ya are right it only creates the same unit every 2mins. i'll change it tnx
 
Status
Not open for further replies.
Top