Limit index value
hiddevandijk
Member Posts: 17
Hi there,
Is there any way I can limit an game attributes index value between min 0 and max 3. As this is an index, the 0 van never become a -1, so this is easy.
This is how I want it to work:
Swipe right, change game.SwipeIndex to game.SwipeIndex+1 (with a maximum capped value of 3)
Swipe left, change game.SwipeIndex to game.SwipeIndex-1 (with a minimum capped value of 0)
Thanks for any help.
Hidde.
Is there any way I can limit an game attributes index value between min 0 and max 3. As this is an index, the 0 van never become a -1, so this is easy.
This is how I want it to work:
Swipe right, change game.SwipeIndex to game.SwipeIndex+1 (with a maximum capped value of 3)
Swipe left, change game.SwipeIndex to game.SwipeIndex-1 (with a minimum capped value of 0)
Thanks for any help.
Hidde.
Comments
for max, set the formula like this:
min(3,( game.SwipeIndex +1))
Hope this helps anyone else.