how do you make objects move and a sprite shot it but i know how to make the sprite move but how about the object its really confusing me cause in the thing for it that i saw it had a vaiable that i dident know how to make to make the object move and lso i need help on making the sprite shot
Offline
This seems a bit garbled, and so I want to make sure that I'm not misinterpreting you. So you want to know how to make an object move and how to make a sprite shoot at it? Is there anything else?
With regards,
ErnieParke
Offline
OOhh I understand:
You want to know
(1) how to make your player shoot
(2) how to make the targets move
And you know:
(1) how to make the sprite move
Well, there are quite a few ways to do this.
This is the way that I think is most simplest.
(1) create a sprite called "bullet" that looks like a bullet (obviously)
(2) create as many "target" sprites as you want. These are the sprites that your player will control.
(3) We need to make a script to control how the target will move.
Here is a script for a target that I quickly whipped up that will randomly move the target along the line x=100:
when gf clicked show forever glide (1) secs to x: (100) y: (pick random (-150) to (150)) if <touching [bullet v]?> hide end endIf you want to keep track of score:
when gf clicked show set [score v] to (0) forever glide (1) secs to x: (100) y: (pick random (-150) to (150)) if <touching [bullet v]?> hide change [score v] by (1) end endAnd in case you don't know, how to create a variable:
Last edited by bob6 (2013-03-06 21:35:44)
Offline