I'm looking to get some perspective on this trigger. When it runs it creates a timer, waits for it to run out and turns on and off several other triggers. Essentially units are directed to go around in a giant loop and once this timer is up they all converge upon an area in the middle of the loop. After 30 seconds they are once again directed to begin making the loop.
The problem is that the FPS goes from 40 down to 20 and stays there, even after the trigger has stopped and there is no action on the screen.
Any idea why this might be? See trigger below.
-
Main Trigger
Events
Local Variables
Conditions
Actions
Timer - Start (New timer) as a One Shot timer that will expire in 210.0 Real Time seconds
Timer - Create a timer window for (Last started timer), with the title "Swarm Approaching:", using Remaining time (initially Visible)
General - Wait for (Last started timer) to have 1.0 seconds Remaining
Timer - Destroy (Last created timer window)
Text Tag - Create a text tag with the text "WARNING - INCOMING ENEMY SURGE!" for (Players on team 1), using a font size of 64, at (Center of Warning) and height offset 1.0, initially Visible, and fog of war enforcement set to False
Trigger - Turn Round about - Player 7 - Point 1 to Point 2 Off
Trigger - Turn Round about - Player 7 - Point 2 to Point 3 Off
Trigger - Turn Round about - Player 7 - Point 3 to Point 4 Off
Trigger - Turn Round about - Player 7 - Point 4 to Point 1 Off
Trigger - Turn Kamakazi Point 1 to Center- Player 7 On
Trigger - Turn Kamakazi Point 2 to Center - Player 7 On
Trigger - Turn Kamakazi Point 3 to Center - Player 7 On
Trigger - Turn Kamakazi Point 4 to Center - Player 7 On
General - Wait 30.0 Game Time seconds
Trigger - Turn Kamakazi Point 1 to Center- Player 7 Off
Trigger - Turn Kamakazi Point 2 to Center - Player 7 Off
Trigger - Turn Kamakazi Point 3 to Center - Player 7 Off
Trigger - Turn Kamakazi Point 4 to Center - Player 7 Off
Trigger - Turn Round about - Player 7 - Point 1 to Point 2 On
Trigger - Turn Round about - Player 7 - Point 2 to Point 3 On
Trigger - Turn Round about - Player 7 - Point 3 to Point 4 On
Trigger - Turn Round about - Player 7 - Point 4 to Point 1 On
Text Tag - Destroy (Last created text tag)
-
Round About Trigger:
Round about - Player 7 - Point 1 to Point 2
Events
Unit - Any Unit Enters within 2.0 of Gather Point 1
Local Variables
Conditions
((Unit type of (Triggering unit)) is Hero) != True
(Owner of (Triggering unit)) == 7
Actions
Unit - Order (Triggering unit) to ( Attack targeting Gather Point 2) (Replace Existing Orders)
-
Rush Middle Trigger:
Events
Unit - Any Unit Enters within 2.0 of Gather Point 1
Local Variables
Conditions
((Unit type of (Triggering unit)) is Hero) != True
(Owner of (Triggering unit)) == 7
Actions
Unit - Order (Triggering unit) to ( Attack targeting AI Attack Point) (Replace Existing Orders)
Unit - Any Unit Enters within 2.0 of Gather Point 1 Local Variables
to a "enters region" trigger action instead? I haven't used 'range of point' very much, but that may be just too many calculations, especially if there are a lot of units, it may be checking distance every game loop, say Unit X is 1.9 range from point, now 1.85, now 1.80, etc instead of only checking when the unit enters a particular region.
I don't really see anything wrong with the trigger. Your options are:
Upload the map for a more in-depth look.
Using triggers, open the debug window at map initialization.
Using triggers, create debug messages all over the place displaying where it's at in the code (see code below). If you can add some information to it. Use combine strings and use a conversion triggers to get whatever values. Like the amount of time left in the timer and seeing if the value matches what should of happened.
Unit - Any Unit Enters within 2.0 of Gather Point 1 Local Variables
to a "enters region" trigger action instead? I haven't used 'range of point' very much, but that may be just too many calculations, especially if there are a lot of units, it may be checking distance every game loop, say Unit X is 1.9 range from point, now 1.85, now 1.80, etc instead of only checking when the unit enters a particular region.
I agree. You'd need to see what kind of trigger the editor uses for the event unit in range. I assume the game creates a square region and each time a unit hits the region a distance check is done.
Changing the Event trigger to Enter Region had only a marginal impact of 1 to 3 FPS. Still nice, but not fixed. Going to upload the map for you all to look at. Thanks
Oh dude... The're so many triggers... You could have used Any player, instead of 1, 2, 3, 4, 5.... and then, put Triggering player everywhere...
Also, some of your conditions are strange, for example:
Not(Unit Type of (Triggering Unit) is Worker == True) is the same as Unit Type of (Triggering Unit) is Worker == False
you need a lot of cleaning. I've run it with debugger, it had a trigger (Anti-Idle) which had a lot of executions. Try disabling it, may help (can't say for sure, because my max fps on empty map is 200, here it was 100).
Advise - combine your triggers, start using loops (such as, pick every player, for each, etc.). That way you can cut down the number of triggers, and it'll be easier to find the source of the problem. Also, if you have one event for 100 triggers, make it 1 trigger, separate everything with comments.
This issue was actually an actor issue. Being the noob I am I was following a behavior tutorial to create abilities and it had me attach an actor 'Zerg Small Unit Death' to the effect start. So whenever this effect would be called this actor (hardly noticeable) was created and seemed to stay there perminately. So many of these partially transparent actors accumulated in the center of the map creates a permanent massive drop in FPS. Thanks for the help! I'll clean these triggers up but go online and check out Test of Survival: Under Siege! I'd love some feedback!
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Hello,
I'm looking to get some perspective on this trigger. When it runs it creates a timer, waits for it to run out and turns on and off several other triggers. Essentially units are directed to go around in a giant loop and once this timer is up they all converge upon an area in the middle of the loop. After 30 seconds they are once again directed to begin making the loop.
The problem is that the FPS goes from 40 down to 20 and stays there, even after the trigger has stopped and there is no action on the screen. Any idea why this might be? See trigger below.
-Main Trigger
Events
Local Variables
Conditions
Actions
Timer - Start (New timer) as a One Shot timer that will expire in 210.0 Real Time seconds
Timer - Create a timer window for (Last started timer), with the title "Swarm Approaching:", using Remaining time (initially Visible)
General - Wait for (Last started timer) to have 1.0 seconds Remaining
Timer - Destroy (Last created timer window)
Text Tag - Create a text tag with the text "WARNING - INCOMING ENEMY SURGE!" for (Players on team 1), using a font size of 64, at (Center of Warning) and height offset 1.0, initially Visible, and fog of war enforcement set to False
Trigger - Turn Round about - Player 7 - Point 1 to Point 2 Off
Trigger - Turn Round about - Player 7 - Point 2 to Point 3 Off
Trigger - Turn Round about - Player 7 - Point 3 to Point 4 Off
Trigger - Turn Round about - Player 7 - Point 4 to Point 1 Off
Trigger - Turn Kamakazi Point 1 to Center- Player 7 On
Trigger - Turn Kamakazi Point 2 to Center - Player 7 On
Trigger - Turn Kamakazi Point 3 to Center - Player 7 On
Trigger - Turn Kamakazi Point 4 to Center - Player 7 On
General - Wait 30.0 Game Time seconds
Trigger - Turn Kamakazi Point 1 to Center- Player 7 Off
Trigger - Turn Kamakazi Point 2 to Center - Player 7 Off
Trigger - Turn Kamakazi Point 3 to Center - Player 7 Off
Trigger - Turn Kamakazi Point 4 to Center - Player 7 Off
Trigger - Turn Round about - Player 7 - Point 1 to Point 2 On
Trigger - Turn Round about - Player 7 - Point 2 to Point 3 On
Trigger - Turn Round about - Player 7 - Point 3 to Point 4 On
Trigger - Turn Round about - Player 7 - Point 4 to Point 1 On
Text Tag - Destroy (Last created text tag)
-Round About Trigger:
Round about - Player 7 - Point 1 to Point 2
Events Unit - Any Unit Enters within 2.0 of Gather Point 1
Local Variables
Conditions
((Unit type of (Triggering unit)) is Hero) != True (Owner of (Triggering unit)) == 7
Actions
Unit - Order (Triggering unit) to ( Attack targeting Gather Point 2) (Replace Existing Orders)
-Rush Middle Trigger:
Events
Unit - Any Unit Enters within 2.0 of Gather Point 1 Local Variables
Conditions
((Unit type of (Triggering unit)) is Hero) != True (Owner of (Triggering unit)) == 7
Actions
Unit - Order (Triggering unit) to ( Attack targeting AI Attack Point) (Replace Existing Orders)
Have you tried changing the
Unit - Any Unit Enters within 2.0 of Gather Point 1 Local Variables
to a "enters region" trigger action instead? I haven't used 'range of point' very much, but that may be just too many calculations, especially if there are a lot of units, it may be checking distance every game loop, say Unit X is 1.9 range from point, now 1.85, now 1.80, etc instead of only checking when the unit enters a particular region.
Errr. Editing on this forum is annoying
I don't really see anything wrong with the trigger. Your options are:
Upload the map for a more in-depth look.
Using triggers, open the debug window at map initialization.
Using triggers, create debug messages all over the place displaying where it's at in the code (see code below). If you can add some information to it. Use combine strings and use a conversion triggers to get whatever values. Like the amount of time left in the timer and seeing if the value matches what should of happened.
I agree. You'd need to see what kind of trigger the editor uses for the event unit in range. I assume the game creates a square region and each time a unit hits the region a distance check is done.
Changing the Event trigger to Enter Region had only a marginal impact of 1 to 3 FPS. Still nice, but not fixed. Going to upload the map for you all to look at. Thanks
What's the event for main trigger?
@o3210: Go
A Trigger having to do with player unit selection completes and runs this trigger.
Map is available to open and view Here.
Oh dude... The're so many triggers... You could have used Any player, instead of 1, 2, 3, 4, 5.... and then, put Triggering player everywhere...
Also, some of your conditions are strange, for example:
Not(Unit Type of (Triggering Unit) is Worker == True) is the same as Unit Type of (Triggering Unit) is Worker == False
you need a lot of cleaning. I've run it with debugger, it had a trigger (Anti-Idle) which had a lot of executions. Try disabling it, may help (can't say for sure, because my max fps on empty map is 200, here it was 100).
Advise - combine your triggers, start using loops (such as, pick every player, for each, etc.). That way you can cut down the number of triggers, and it'll be easier to find the source of the problem. Also, if you have one event for 100 triggers, make it 1 trigger, separate everything with comments.
Yeah I knew it was noob, it's my second map so i'm really learning triggers on the fly. I'll take a look at the anti-idle- Thanks
This issue was actually an actor issue. Being the noob I am I was following a behavior tutorial to create abilities and it had me attach an actor 'Zerg Small Unit Death' to the effect start. So whenever this effect would be called this actor (hardly noticeable) was created and seemed to stay there perminately. So many of these partially transparent actors accumulated in the center of the map creates a permanent massive drop in FPS. Thanks for the help! I'll clean these triggers up but go online and check out Test of Survival: Under Siege! I'd love some feedback!