Posted: Mon May 04, 2020 4:10 pm Post subject:
Power related trigger/event/action - if/then/else logic?
Subject description: how to stop "Low Power" related action at restored power
Alright, another newbie question.
At the start of the mission an action(A) is being triggered right away that is ongoing throughout the mission(time value 999), until it is stopped by specific actions(B) by the player. Trigger goes 'disabled'.
This part works.
If the player goes into Low power, the same type of action(C) is performed as initially, but as a new ongoing action (it is not the initial trigger "re-enabled", it's a direct action) within the "Low power" event.
This part works.
You know what's coming.
How do I stop action(C) if the power comes back on?
In addition, how do I make this a perpetual condition?
Low power - action starts
Power restored - action stopped
One idea that came to mind is the player action could be building a specific structure(up to this it works), that would stop the initial event, disable the structure trigger and "enable" the low power trigger as well. Low power mode would re-engage the initial event, blow-up this specific structure,"disable" the low-power trigger and "enable" the structure building trigger again so re-building the structure restarts the cycle.
And when I tried to do it I had to realize that I cannot tag/identify the specific building to be destroyed as at the beginning of the mission it hasn't been built yet...... QUICK_EDIT
Only available events could be used. There is no power recovery event. Can't think of a straight forward solution. Could try polling at regular intervals with tag repeat and then use disable/enable trigger with/without local variables set/unset. QUICK_EDIT
Only available events could be used. There is no power recovery event. Can't think of a straight forward solution. Could try polling at regular intervals with tag repeat and then use disable/enable trigger with/without local variables set/unset.
Yeah, I had to face the fact the engine only has IF/THEN logic, the ELSE part is missing so I am limited to the Event options without having their negatives. I will have to adjust the story line, so, if the initial event is re-triggered, well....that's too bad, better luck next time QUICK_EDIT
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum