Page 1 of 1

Eos question

Posted: Wed Jun 17, 2020 2:35 pm
by vichobucho
Hello everyone,
I will try to expalain myself as best i can.
Can I limit the number adding , i mean i have pages that after you complete you receive a reward (points) and i want to stop adding points when it reaches lets say 100/100 , without changing pages or adding others.I mean by coding. (I don't have any experience coding stuff !! )
Thanks for reading my mess.

Re: Eos question

Posted: Wed Jun 17, 2020 9:44 pm
by undeniable_denial
If you want to skip pages when the limit is reached you can use a goto-action inside an if-action with the condition

Code: Select all

points>=100

If you want to prevent the variable points from getting bigger than 100, you can use the function Math.min, which returns the smallest of its arguments:

Code: Select all

points = Math.min( 100 , points +5 );
(instead of points = points + 5; )