I have a leaderboard with two variables, how many units there is alive. So can you make an event start when one of them = #, and can you make an event start when value1 + value2 = # ?
Sorry for alot of questions, but theres some things I dont understand :)
Don't you mean when an Integer (is equal or greater than) 4, then start a trigger? It's kinda hard to understand what u want because an Event makes a Trigger start.
If you want to start an Trigger when an Integer has a specific number by using the General - Repeat action, or make an Periodic Event that checks every 1 sec if a Integer = a specific number. If you want to check:"Integer + Integer =Specific Number" you have to use Math - Arithmetics.
The thing is, they dont really die. If they die they are moved to a different area til the next round.
patrick: yes, thats what I mean I have a trigger, event to search every 0.5 sec and condition: " Team2 points[0] == 0" and then actions, but the actions start even if the value aint true.
I strongly discourage you from using the Periodic event. It will create massive lag in your map if used extensively. It's far more efficient to use a loop because of how much memory events use when running. Here's a basic loop setup for what I think you're trying to do:
I strongly discourage you from using the Periodic event. It will create massive lag in your map if used extensively. It's far more efficient to use a loop because of how much memory events use when running.
While it should be true in general, that a loop is more efficient that a periodic effect, I don't believe for a second, that events use a huge amount of memory while running.
Create a new actiondefinition and give it one parameter.
Give the action a variable.
The action sets the variable and if it has a certain value it calls a different action ;)
Try having 50 or so periodic events set to, say, 0.1 seconds all running at once and compare the performance drop with the same actions running off of 50 threaded loops. The difference should be obvious.
Thnx guys. Will give all of you a try now when Im back from work :)
Btw how can this trigger not be working?
Recreate unit
Events
Unit - Any Unit dies
Local Variables
Conditions
((Triggering unit) is Required: Heroic for player 1) == true
(Owner of (Triggering unit)) == 1
Actions
UI - Display "Respawning next round" for (Player group((Owner of (Triggering unit)))) to Subtitle area
Variable - Modify Player death[(Triggering player)]: + 1
Leaderboard - Set Leaderboard item text at column 3 and row 1 to (Text(Player death[(Triggering player)]))
Trigger - Wait for Preround to execute, and Don't Wait until it completes
Unit - Create 1 (Unit type of (Unit 1 from p1)) for player 1 at Defense spawn facing 270.0 degrees (No Options)
Where "preround" is a trigger. How can this not be working? Shouldnt the trigger wait for "preround" to start and then do the last action, creating the unit I tell it too!?
If I remove the wait action the trigger works fine, but the unit is created right away. I dont want that :D
To be more specific, if a player choose to play as a marine, if that marine die anytime in the match I want it to create a new marine when some picked triggers start.
Try having 50 or so periodic events set to, say, 0.1 seconds all running at once and compare the performance drop with the same actions running off of 50 threaded loops. The difference should be obvious.
If you use test mode and the debug window, yes. It processes tons of information for each event and displays every event triggered. Try it on Bnet, I am pretty sure you wont notice a difference.
Of course, a loop should still have a better performance, but I doubt, it is that significant (also in this case, a single threaded loop executing the 50 actions would probably be better :D)
Thnx guys. Will give all of you a try now when Im back from work :)
Btw how can this trigger not be working?
Recreate unit
Events
Unit - Any Unit dies
Local Variables
Conditions
((Triggering unit) is Required: Heroic for player 1) == true
(Owner of (Triggering unit)) == 1
Actions
UI - Display "Respawning next round" for (Player group((Owner of (Triggering unit)))) to Subtitle area
Variable - Modify Player death[(Triggering player)]: + 1
Leaderboard - Set Leaderboard item text at column 3 and row 1 to (Text(Player death[(Triggering player)]))
Trigger - Wait for Preround to execute, and Don't Wait until it completes
Unit - Create 1 (Unit type of (Unit 1 from p1)) for player 1 at Defense spawn facing 270.0 degrees (No Options)
Where "preround" is a trigger. How can this not be working? Shouldnt the trigger wait for "preround" to start and then do the last action, creating the unit I tell it too!?
If I remove the wait action the trigger works fine, but the unit is created right away. I dont want that :D
To be more specific, if a player choose to play as a marine, if that marine die anytime in the match I want it to create a new marine when some picked triggers start.
My guess is that the wait action clears the unit group p1 (assuming that's the unit that dies.) I recommend you save the unit type of unit 1 from p1 at the beginning of each round and use that.
If you use test mode and the debug window, yes. It processes tons of information for each event and displays every event triggered. Try it on Bnet, I am pretty sure you wont notice a difference.
Of course, a loop should still have a better performance, but I doubt, it is that significant (also in this case, a single threaded loop executing the 50 actions would probably be better :D)
I'm not sure. I know I ran into a problem with periodic events in one of my maps which caused it to lag really bad over bnet. Once I converted all of the periodic events to loops the problem was solved. Maybe Blizzard has resolved this issue since then.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
I have a leaderboard with two variables, how many units there is alive. So can you make an event start when one of them = #, and can you make an event start when value1 + value2 = # ? Sorry for alot of questions, but theres some things I dont understand :)
Don't you mean when an Integer (is equal or greater than) 4, then start a trigger? It's kinda hard to understand what u want because an Event makes a Trigger start.
If you want to start an Trigger when an Integer has a specific number by using the General - Repeat action, or make an Periodic Event that checks every 1 sec if a Integer = a specific number. If you want to check:"Integer + Integer =Specific Number" you have to use Math - Arithmetics.
If I missunderstood u plz reply =3
I recommend structuring your trigger in this way (this is pseudo-code btw):
@BasharTeg: Go
The thing is, they dont really die. If they die they are moved to a different area til the next round.
patrick: yes, thats what I mean I have a trigger, event to search every 0.5 sec and condition: " Team2 points[0] == 0" and then actions, but the actions start even if the value aint true.
@Lucyher: Go
I strongly discourage you from using the Periodic event. It will create massive lag in your map if used extensively. It's far more efficient to use a loop because of how much memory events use when running. Here's a basic loop setup for what I think you're trying to do:
While it should be true in general, that a loop is more efficient that a periodic effect, I don't believe for a second, that events use a huge amount of memory while running.
You can also do it that Way:
Create a new actiondefinition and give it one parameter. Give the action a variable. The action sets the variable and if it has a certain value it calls a different action ;)
gl
@Kueken531: Go
Try having 50 or so periodic events set to, say, 0.1 seconds all running at once and compare the performance drop with the same actions running off of 50 threaded loops. The difference should be obvious.
Thnx guys. Will give all of you a try now when Im back from work :)
Btw how can this trigger not be working?
Recreate unit
Events
Unit - Any Unit dies
Local Variables
Conditions
((Triggering unit) is Required: Heroic for player 1) == true
(Owner of (Triggering unit)) == 1
Actions
UI - Display "Respawning next round" for (Player group((Owner of (Triggering unit)))) to Subtitle area
Variable - Modify Player death[(Triggering player)]: + 1
Leaderboard - Set Leaderboard item text at column 3 and row 1 to (Text(Player death[(Triggering player)]))
Trigger - Wait for Preround to execute, and Don't Wait until it completes
Unit - Create 1 (Unit type of (Unit 1 from p1)) for player 1 at Defense spawn facing 270.0 degrees (No Options)
Where "preround" is a trigger. How can this not be working? Shouldnt the trigger wait for "preround" to start and then do the last action, creating the unit I tell it too!?
If I remove the wait action the trigger works fine, but the unit is created right away. I dont want that :D
To be more specific, if a player choose to play as a marine, if that marine die anytime in the match I want it to create a new marine when some picked triggers start.
If you use test mode and the debug window, yes. It processes tons of information for each event and displays every event triggered. Try it on Bnet, I am pretty sure you wont notice a difference.
Of course, a loop should still have a better performance, but I doubt, it is that significant (also in this case, a single threaded loop executing the 50 actions would probably be better :D)
My guess is that the wait action clears the unit group p1 (assuming that's the unit that dies.) I recommend you save the unit type of unit 1 from p1 at the beginning of each round and use that.
I'm not sure. I know I ran into a problem with periodic events in one of my maps which caused it to lag really bad over bnet. Once I converted all of the periodic events to loops the problem was solved. Maybe Blizzard has resolved this issue since then.