Jump to content
  • 0

Pls How to make a script that automatically reset certain value every 2 sec


aamir12

Question

In a game i have a variable and in order to get diamonds i gotta keep assign 1 to the variable.

Also after changing to 1 i press  "continue " on my game and i get diamonds , then the value changes,

I want  a script that keep changing that value to 1 every 2 sec ,  so that it just doesn't spam changing the value.

I don't know how to make scripts etc.. How to 

thank you  

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

13 hours ago, aamir12 said:

I want  a script that keep changing that value to 1 every 2 sec ,  so that it just doesn't spam changing the value.

You don't necessarily need a script to achieve this. Freezing a value should work just fine, just need to change "Freeze interval" setting to desired value. Default value there is 33000 microseconds, so to make it 2 seconds use the value 2000000 (2 millions).

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.