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:
To shoot, just do something like thisWhen I Receiveshoot ▼go toplayerpoint towardsmouse-pointer ▼repeat untiltouchingoredge ▼?touchingenemy ▼?move5stepsiftouchingenemy ▼?broadcastkill enemy ▼
To lose health, put this in the enemy:whenclicked
foreverifmouse down?broadcastshoot ▼and wait
whenclicked
forever iftouchingplayer ▼?changeplayer's health ▼by-.25
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)
And do not worry.when I receivekill enemy ▼hide
Offline