At 11/16/10 08:15 PM, CAN-OF-SPAM wrote:
At 11/16/10 08:05 PM, Clickteam wrote:
Use a condition like Press "X" key or something, make sure you have object to be a bullet, then from your ship's actions select Launch a object!Thanks, i got it so when i press the spacebar it will shoot a bullet then i made it so that when the bullet collides with an asteroid it will generate an explosion then destroy.
i have the movement patterns for the asteroids but how do i make them generate an infinite amount at random?
Add a counter object to the frame, and in the conditions select "Always". On that condition, add a new action, "Set counter". Type in "Random(40)" without the quotes. You can change the 40 to anything else if you want, I just used that as an example. Therefore...
-Set counter to Random(40)
Next, create this condition: "Compare the counter to a value". Compare to see if the counter is "Lower or equal" to 5. Once again, you can change the 5 to anything else if you want. Add the action "Create object" and create your asteroid wherever you want. Therefore...
-Create asteroid at X,Y
Hope this helps. :)