1). How do you script the player sprite to fire its gun?
I also need help with just some of the script in general. For instance, how would you make the player lose health if they're touching an enemy? I'm new, so please don't hate over me.
Offline
This community is really supportive. Nobody should hate on you
You'll probably need to make a "bullet" sprite, with a script like this:
When I Receive [shoot v] go to [player] point towards [mouse-pointer v] repeat until <<touching [edge v]?> or <touching[enemy v]?>> move (5) steps end if <touching [enemy v]?> broadcast [kill enemy v] endTo shoot, just do something like this
when gf clicked forever if <mouse down?> broadcast [shoot v] and wait endTo lose health, put this in the enemy:
when gf clicked forever if <touching [player v]?> change [player's health v] by (-.25) end
Last edited by MoreGamesNow (2012-04-08 12:23:13)
Offline
And then for the enemy once it has been shot:
(Put this script on the enemy sprite)
when I receive [kill enemy v] hideAnd do not worry.
Offline