Project Perfect Mod Forums
:: Home :: Get Hosted :: PPM FAQ :: Forum FAQ :: Privacy Policy :: Search :: Memberlist :: Usergroups :: Register :: Profile :: Log in to check your private messages :: Log in ::


The time now is Thu Apr 18, 2024 9:26 am
All times are UTC + 0
Power related trigger/event/action - if/then/else logic?
Moderators: Global Moderators, Tiberian Sun Moderators
Post new topic   Reply to topic Page 1 of 1 [3 Posts] Mark the topic unread ::  View previous topic :: View next topic
Author Message
Gabryel
Medic


Joined: 02 May 2020

PostPosted: 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
Reply with quote  Mark this post and the followings unread

Alright, another newbie question. Wink

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......

Back to top
View user's profile Send private message
E1 Elite
General


Joined: 28 May 2013

PostPosted: Tue May 05, 2020 12:41 am    Post subject: Reply with quote  Mark this post and the followings unread

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.

Back to top
View user's profile Send private message
Gabryel
Medic


Joined: 02 May 2020

PostPosted: Tue May 05, 2020 5:16 am    Post subject: Reply with quote  Mark this post and the followings unread

E1 Elite wrote:
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 Smile

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [3 Posts] Mark the topic unread ::  View previous topic :: View next topic
 
Share on TwitterShare on FacebookShare on Google+Share on DiggShare on RedditShare on PInterestShare on Del.icio.usShare on Stumble Upon
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


Powered by phpBB © phpBB Group

[ Time: 0.1487s ][ Queries: 11 (0.0077s) ][ Debug on ]