My event is set to fire the trigger on a periodic event, every 5 game seconds, but the trigger does not fire. I have tested the trigger itself with a different event, so i know the rest of the trigger is working properly. Why does a periodic event not fire?
Events
Timer - Every 5.0 seconds of Game Time
Local Variables
Untitled Variable 001 = (10 * (Number of Living units in (House units in (Entire map) owned by player (Triggering player) matching Excluded: Missile, Dead, Hidden, with at most Any Amount))) <Integer>
Conditions
(Triggering player) == 1
Actions
Player - Modify player (Triggering player) Custom Resource: Add Untitled Variable 001
Player - Modify player (Triggering player) Minerals: Add Untitled Variable 001
Events Timer - Every 5.0 seconds of Game Time Local Variables Untitled Variable 001 = (10 * (Number of Living units in (House units in (Entire map) owned by player (Triggering player) matching Excluded: Missile, Dead, Hidden, with at most Any Amount))) <Integer> Conditions (Triggering player) == 1 Actions Player - Modify player (Triggering player) Custom Resource: Add Untitled Variable 001 Player - Modify player (Triggering player) Minerals: Add Untitled Variable 001
In your trigger, Triggering player would refer to no player because you are using a periodic event, hence the actions dont run because Triggering player returns no player. lol.
Either use a certain player, like player 1 or 2; or, since it seems like an income thing, use a loop to address all players.
so your actions would be like this:
Yep, what Zolstice said. Make sure you look at the information for the event when you're building your trigger. Most events list the functions that can be used for referencing and how they will work.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
My event is set to fire the trigger on a periodic event, every 5 game seconds, but the trigger does not fire. I have tested the trigger itself with a different event, so i know the rest of the trigger is working properly. Why does a periodic event not fire?
Copy and paste your trigger here so I can take a gander upon it. Copy as text, then paste as code.
Events Timer - Every 5.0 seconds of Game Time Local Variables Untitled Variable 001 = (10 * (Number of Living units in (House units in (Entire map) owned by player (Triggering player) matching Excluded: Missile, Dead, Hidden, with at most Any Amount))) <Integer> Conditions (Triggering player) == 1 Actions Player - Modify player (Triggering player) Custom Resource: Add Untitled Variable 001 Player - Modify player (Triggering player) Minerals: Add Untitled Variable 001
Is the trigger initially "on"? It should be by default.
Select trigger in left panel, right click context menu, verify that "Initially on" is checked.
In your trigger, Triggering player would refer to no player because you are using a periodic event, hence the actions dont run because Triggering player returns no player. lol.
Either use a certain player, like player 1 or 2; or, since it seems like an income thing, use a loop to address all players. so your actions would be like this:
Yep, what Zolstice said. Make sure you look at the information for the event when you're building your trigger. Most events list the functions that can be used for referencing and how they will work.