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

Do you want to advertise at Project Perfect Mod. Find out how to do it HERE.

The time now is Tue May 26, 2020 8:24 am
All times are UTC + 0
 Forum index » Modding Central » Tiberian Sun Editing Forum » Mapping Discussion
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] View previous topic :: View next topic
Author Message
Gabryel
Vehicle Driver


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

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
Commander


Joined: 28 May 2013

PostPosted: Tue May 05, 2020 12:41 am    Post subject: Reply with quote

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
Vehicle Driver


Joined: 02 May 2020

PostPosted: Tue May 05, 2020 5:16 am    Post subject: Reply with quote

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] View previous topic :: View next topic
 Forum index » Modding Central » Tiberian Sun Editing Forum » Mapping Discussion
Jump to:  
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.1239s ][ Queries: 10 (0.0048s) ][ Debug on ]