How to move enemy randomly and random size
Jaxter
Member, PRO Posts: 398
1. MY enemy's are coming from right to left.. but i want to add function of them to move little bit about 20 pix to up and down at the same time to make game harder..
2. How to make random size of enemy's ?
2. How to make random size of enemy's ?
Comments
2. use the random function in the expression editor and then do a Change Attribute on the width and height of the actor.
Change Attribute: self.randomSizeFactor = random(5,10)
Change Attribute: self.Size.Width = self.Size.Width*self.randomSizeFactor/10
Change Attribute: self.Size.Height = self.Size.Height*self.randomSizeFactor/10
Once you've created an attribute to hold your random size factor, then you can create the rules that Codemonkey suggested.
"Boolean" is used like a switch: it is either true (1) or false (0).
Is that what you needed to know?