• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Trigger] Would running this be dangerous?

Status
Not open for further replies.
Level 17
Joined
Jun 12, 2007
Messages
1,261
I'm talking about a trigger with the event: every 2.00 seconds.
I'm bound to need about 50 of those, assuming the trigger has nearly no leaks.
Would it be a big stress on the performance, loading time or closing time?

I would like to know. :p

And no, I can't combine them because if I do the trigger would be to big.
 
Level 11
Joined
Feb 14, 2009
Messages
884
Since, as you say, it has nearly no leaks, I think it would be a problem. Because ~50 leaks every 2 seconds equals to ~100+ leaks every 2 seconds. If you do remove the leaks, however, I don't think there will be any problem, as long as your triggers don't make heavy use of special effects etc. I believe that combining them would be the best though, even if that makes it harder to read. An alternative is to have only one periodic event and call other triggers through it.
 
Level 17
Joined
Jun 12, 2007
Messages
1,261
It's basically a trigger to check if a certain unit is in a certain region at that time, to then take a random value and if it matches port the unit to a special zone where a group of random monsters will spawn. :p
W8, I'll post.

  • Eastern Benij Forest
    • Events
      • Time - Every 2.00 seconds of game time
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (D Eastern Benji Forest <gen> contains Unit_PlayerHero[1]) Equal to True
          • BattleReady[1] Equal to True
          • BattleReady_Cooldown[1] Equal to True
          • (Random integer number between 1 and 3) Less than or equal to 2
        • Then - Actions
          • Trigger - Turn on BattleFinished Red <gen>
          • Set Point_Hero[1] = (Position of Unit_PlayerHero[1])
          • Game - Display to Player Group - Player 1 (Red) for 4.00 seconds the text: (PlayerColor[1] + A group of monsters appeared!)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Random integer number between 1 and 2) Equal to 1
            • Then - Actions
              • Set Point_HeroSpawnBattle[1] = (Center of B Benji P1A Hero <gen>)
              • Unit - Move Unit_PlayerHero[1] instantly to Point_HeroSpawnBattle[1]
              • Custom script: call RemoveLocation(udg_Point_HeroSpawnBattle[1])
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Random integer number between 1 and 2) Equal to 1
                • Then - Actions
                  • Set MonstersLeftRed = 2.00
                  • Set Point_MonsterSpawn[1] = (Random point in B Benji P1A Monster <gen>)
                  • Unit - Create 1 Monster_Benji[(Random integer number between 1 and 7)] for Neutral Hostile at Point_MonsterSpawn[1] facing 235.00 degrees
                  • Custom script: call RemoveLocation(udg_Point_MonsterSpawn[1])
                  • Set Point_MonsterSpawn[1] = (Random point in B Benji P1A Monster <gen>)
                  • Unit - Create 1 Monster_Benji[(Random integer number between 1 and 7)] for Neutral Hostile at Point_MonsterSpawn[1] facing 235.00 degrees
                  • Custom script: call RemoveLocation(udg_Point_MonsterSpawn[1])
                • Else - Actions
                  • Set MonstersLeftRed = 3.00
                  • Set Point_MonsterSpawn[1] = (Random point in B Benji P1A Monster <gen>)
                  • Unit - Create 1 Monster_Benji[(Random integer number between 1 and 7)] for Neutral Hostile at Point_MonsterSpawn[1] facing 235.00 degrees
                  • Custom script: call RemoveLocation(udg_Point_MonsterSpawn[1])
                  • Set Point_MonsterSpawn[1] = (Random point in B Benji P1A Monster <gen>)
                  • Unit - Create 1 Monster_Benji[(Random integer number between 1 and 7)] for Neutral Hostile at Point_MonsterSpawn[1] facing 235.00 degrees
                  • Custom script: call RemoveLocation(udg_Point_MonsterSpawn[1])
                  • Set Point_MonsterSpawn[1] = (Random point in B Benji P1A Monster <gen>)
                  • Unit - Create 1 Monster_Benji[(Random integer number between 1 and 7)] for Neutral Hostile at Point_MonsterSpawn[1] facing 235.00 degrees
                  • Custom script: call RemoveLocation(udg_Point_MonsterSpawn[1])
            • Else - Actions
              • Set Point_HeroSpawnBattle[1] = (Center of B Benji P1B Hero <gen>)
              • Unit - Move Unit_PlayerHero[1] instantly to Point_HeroSpawnBattle[1]
              • Custom script: call RemoveLocation(udg_Point_HeroSpawnBattle[1])
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Random integer number between 1 and 2) Equal to 1
                • Then - Actions
                  • Set MonstersLeftRed = 2.00
                  • Set Point_MonsterSpawn[1] = (Random point in B Benji P1B Monster <gen>)
                  • Unit - Create 1 Monster_Benji[(Random integer number between 1 and 7)] for Neutral Hostile at Point_MonsterSpawn[1] facing 235.00 degrees
                  • Custom script: call RemoveLocation(udg_Point_MonsterSpawn[1])
                  • Set Point_MonsterSpawn[1] = (Random point in B Benji P1B Monster <gen>)
                  • Unit - Create 1 Monster_Benji[(Random integer number between 1 and 7)] for Neutral Hostile at Point_MonsterSpawn[1] facing 235.00 degrees
                  • Custom script: call RemoveLocation(udg_Point_MonsterSpawn[1])
                • Else - Actions
                  • Set MonstersLeftRed = 3.00
                  • Set Point_MonsterSpawn[1] = (Random point in B Benji P1B Monster <gen>)
                  • Unit - Create 1 Monster_Benji[(Random integer number between 1 and 7)] for Neutral Hostile at Point_MonsterSpawn[1] facing 235.00 degrees
                  • Custom script: call RemoveLocation(udg_Point_MonsterSpawn[1])
                  • Set Point_MonsterSpawn[1] = (Random point in B Benji P1B Monster <gen>)
                  • Unit - Create 1 Monster_Benji[(Random integer number between 1 and 7)] for Neutral Hostile at Point_MonsterSpawn[1] facing 235.00 degrees
                  • Custom script: call RemoveLocation(udg_Point_MonsterSpawn[1])
                  • Set Point_MonsterSpawn[1] = (Random point in B Benji P1B Monster <gen>)
                  • Unit - Create 1 Monster_Benji[(Random integer number between 1 and 7)] for Neutral Hostile at Point_MonsterSpawn[1] facing 235.00 degrees
                  • Custom script: call RemoveLocation(udg_Point_MonsterSpawn[1])
        • Else - Actions
That would then for 3 players (all in this trigger but I'm yet to do Blue and Teal.), I was thinking about using a loop from 1 to 3, but I'd have no idea how to fix the issue with regions, as every player has a different region to be ported to.

I fixed point leaks, and that's only to leak in this trigger as far as I know, no groups no sounds no special effects w/e.
 
Level 15
Joined
Dec 18, 2007
Messages
1,098
Its alright. Since it is impossible for all 50 triggers to fire to the end at once, the chances of lag is nearly 0% due to all the if/then/else and the fact that all 50 triggers cannot fire together due to the possibly great distance between each region (your map's an RPG right?)
Also, since there are no leaks, there should be no lag. I'll look through the trigger and help to find a more efficient way for you to do this system so it would minimize all the spamming XD
 
Status
Not open for further replies.
Top