Random Rotating an object by list of degrees

hello lovely guys
so i have an object and i rotate it with tween and ease out quad

1

i have a list of degrees for example 320,270,310,215,etc… , how can i make this object randomly select one of this number to set for tween angel?

Also user can only do rotating 5 time by touching (click) object (mouse or touch should be disable until rotating finish) (and this counter (5 time) saved in firebase for each user) , and for each time user should watch an ad and after 24 hour this number should be reset to 5 again

  1. so how to make it rotate based on my list of degrees randomly?
  2. how can i make it to user rotate it only once per watching ad?
  3. how to disable touch or clicks while rotating finish?
  4. how to reset (5 time counter) per day in firebase? should i use a rule?

sorry its long , thanks for you guy to paying attention to my questions

Hi,

  1. You need to store your values in a structure variable and do a random pick. Variables [GDevelop wiki]
  2. Use a variable to check if the user has already done it, and reset after ad watch.
  3. Use a variable to disable whatever actions while something occurs, and re-enable when that something is finished.
  4. Use the time expressions to store each action as a timestamp and delete old timestamps. Expressions reference [GDevelop wiki]
1 Like