changing a actor to a random number
digitalzero
Member, BASIC Posts: 639
so im trying to change the attribute between a couple of different numbers... i know the expression min and max option but its not exactly what im looking for
if attribute attack =3 change attribute self.attack to random 1, 2, 4,
hope that makes sense! and thanks so much for the replies in advance cause you guys are AWESOME at replying!
Comments
You're question isn't very clear, do you simply want to randomly pick either 1, 2 or 4 ?
@Socks has an expression for this. See this for an example: https://forums.gamesalad.com/discussion/comment/491235/#Comment_491235.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
Forgot about that ! Quite useful ! : )
You could also randomly generate 1, 2 or 4 with:
floor(random(1,3)*1.4)