Random function without some numbers
Hi,
I have a random function that spawn a ball to random(0,360) degrees but i don't want that this ball is spawned to 0, 90, 180 and 360. How must i modify the function to exclude this numbers?
Thanks (if possible without table and other attributes)
I have a random function that spawn a ball to random(0,360) degrees but i don't want that this ball is spawned to 0, 90, 180 and 360. How must i modify the function to exclude this numbers?
Thanks (if possible without table and other attributes)
Comments
If self.rotation is 0, 90, 180, 360 - Change rotation to whatever?
My GameSalad Academy Courses! ◦ Check out my quality templates! ◦ Add me on Skype: braydon_sfx
Change Attribute RandMain to random(1,4)
When RandMain =1
Change Attribute RandMain to random(1,89)
Change Attribute self.Rotation to RandMain
When RandMain =2
Change Attribute RandMain to random(91,179)
Change Attribute self.Rotation to RandMain
When RandMain =3
Change Attribute RandMain to random(181,269)
Change Attribute self.Rotation to RandMain
When RandMain =4
Change Attribute RandMain to random(271,359)
Change Attribute self.Rotation to RandMain
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps