Content: Slate Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate Marble
Background: Slate Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate Marble
Pattern: Blank Waves Notes Sharp Wood Rockface Leather Honey Vertical Triangles
Welcome to Xbox Chaos: Modding Evolved

Register now to gain access to all of our features. Once registered and logged in, you will be able to contribute to this site by submitting your own content or replying to existing content. You'll be able to customize your profile, receive reputation points as a reward for submitting content, while also communicating with other members via your own private inbox, plus much more! This message will be removed once you have signed in.

Sign in to follow this  
Followers 0
AbandonedCashew

Support
What is a good way to run something for 1 tick?

7 posts in this topic

Title may be slightly mal-informational, but what I need is to activate an incident when a timer hits 5, but only for one tick when it is at 5, not for all the ticks during the entirety of time it's equal to 5.

How could I do this using scratches or another simply method?

Edited by AbandonedCashew

Share this post


Link to post
Share on other sites

When Timer is 5

And numericscratch0 is 0

*Do whatever you want*

Set numericscratch0 to 1

Since the first two conditions using "and", the trigger won't work if the second condition is false (if numericscratch0 isn't 0), and the end of the trigger sets numericscratch0 to 1, which allows the trigger to activate once for a tick when the timer hits 5.

Edited by shanez1215

Share this post


Link to post
Share on other sites

When Timer is 5

And numericscratch0 is 0

*Do whatever you want*

Set numericscratch0 to 1

Since the first two conditions using "and", the trigger won't work if the second condition is false (if numericscratch0 isn't 0), and the end of the trigger sets numericscratch0 to 1, which allows the trigger to activate once for a tick when the timer hits 5.

 

You'd need to use a global variable instead of a scratch one. The value won't persist between ticks otherwise.

Pfeuff and AbandonedCashew like this

Share this post


Link to post
Share on other sites

I don't eactly get what youre saying, but the timers length is a user option, and if you mean setting it to 5 when it = 6, too ghetto for me. Team numerics are doing the trick but id like to find a way to do it using scratches.

Share this post


Link to post
Share on other sites
Sign in to follow this  
Followers 0