Problem 8… AGAIN!

March 1, 2006 at 11:45 pm (Game Maker, Uncategorized)

Arghhhh!

Something went wrong with my post, and I don’t know what it was, so I’ll write this post again.

Make the bullet before you make your shooter. My shooter is some kind of snake, my bullet a rupee, my enemy a cute bunny, and there is also an explosion.

Sprite: sprBullet
Solid: false
Visible: true
Depth: 0
Persistent: false
Parent:
Mask:

(this is to set the speed of the bullet, so it moves when it is created)

Create Event:

set the vertical speed to -4

Sprite: sprMonster
Solid: false
Visible: true
Depth: 0
Persistent: false
Parent:
Mask:

(This is to create a bullet when you press a key, wherever the shooter goes) 

Key Press Event for Key Space:

create instance of object objbullet at relative position (0,0)

(These are for moving the shooter when you press a key)

Key Press Event for Key Left:

set the horizontal speed to -2

Key Press Event for Key Right:

set the horizontal speed to 2

(These are for stopping the shooter when you release a key)

Key Release Event for Key Left:

start moving in directions 000010000 with speed set to 0

Key Release Event for Key Right:

start moving in directions 000010000 with speed set to 0

Sprite: sprBunnyRabbit
Solid: false
Visible: true
Depth: 0
Persistent: false
Parent:
Mask:

(This event is to give it lives, so it doesn’t die if I hit it once with the bullet) 

Create Event:

set the number of lives to 3

(This event is for many things. This prevents the bullet from killing sprBunnyRabbit with one hit because it doesn’t disappear, and it also changes the sprBunnyRabbit into an explosion if it has no lives) 

Collision Event with object objbullet:

for other object: destroy the instance
set the number of lives relative to -1

If lives are equal to 0

change the instance into object objexplosion, yes performing events

Sprite: sprexplosion
Solid: false
Visible: true
Depth: 0
Persistent: false
Parent:
Mask:

(This is to destroy the object when the animation ends, so it doesn’t loop forever) 

Other Event: Animation End:

destroy the instance
end the game.

As I said before, I needed no help for this one, and the pictures is below.

Advertisements

1 Comment

  1. Bill Kerr said,

    would like to talk to you about this one –
    1) better if code and comments look different (and less work for you)
    2) less writing and more efficient to focus on the main part of the problem rather than trying to cover *everything*

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: