Page 1 of 1

[Feature Request] CSC - add a when "value changed" option to Event Triggers

Posted: Mon Oct 10, 2022 8:47 pm
by DeanWinchester
I think it could make certain things easier if there was an option for an event to be triggered when a defined value changes.

For example, a spin the bottle game.

Player interaction
"spin bottle" -> sends game event "random int value (0,7)" - set to "player_landed_on_int" value

Play event trigger

"handle spin bottle" ->
when "player_landed_on" int Equal 1 -> send game event modify value "landed_on_patrick" equals 1

"handle land on patrick"
when "landed_on_patrick" Equal 1 ... do stuff


fwiw I think I can accomplish the same outcome using player interactions, but still working on testing it. But I think it could still be a nice feature for the CSC

Re: [Feature Request] CSC - add a when "value changed" option to Event Triggers

Posted: Fri Oct 14, 2022 8:46 pm
by DeanWinchester
Anyone looking for something similar, you can accomplish this by using the "Periodically" option and set it to like 0.3 seconds and have it check whatever value you want. Just be sure to have values set up to short-circuit these loops otherwise you'll get yourself into an infinite loop!

Re: [Feature Request] CSC - add a when "value changed" option to Event Triggers

Posted: Sat Oct 15, 2022 3:10 am
by peter980
Correct, it can be worked around.

Me personally, I do not like creating very quick periodics, since having too many will affect game's performance.

Re: [Feature Request] CSC - add a when "value changed" option to Event Triggers

Posted: Tue Oct 18, 2022 10:21 am
by eekdon
Saving for a rainy day...