Problem 10 Handy Hint

In my screenshot, you can see i have added enemies. This is how i created it:

Information about object: bear (enemy)

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

Create Event:
start moving in directions left and right, with speed set to 5
move in direction 270 at most 12 till a contact with solid objects

//Makes the enemy move left and right, and sit on the block, not above it.

Step Event:
if relative position (1,1) gives not a collision with Only solid objects
reverse horizontal direction
if relative position (-1,0) gives a collision with Only solid objects
reverse horizontal direction
if relative position (1,0) gives a collision with Only solid objects
reverse horizontal direction
if relative position (-1,-1) gives a collision with Only solid objects
reverse horizontal direction

//Makes the enemy bounce off the side walls, and change direction if there is not a platform under it.

Collision Event with object jumper:
for all jumper: jump to the start position
set the number of lives relative to -1.

// Makes the jumper lose lives when it hits the enemy and return to the start.

Information about object: jumper
 

Create Event:
set the number of lives to 3
//Makes the jumper have 3 lives

Step Event:
If lives are smaller than 0
      end the game
//Makes the game end if the jumper has no lives left.

Published in: on March 21, 2006 at 8:35 am  Comments (3)  

The URI to TrackBack this entry is: http://pikmik.wordpress.com/2006/03/21/problem-10-handy-hint/trackback/

RSS feed for comments on this post.

3 CommentsLeave a comment

  1. Wow! Game Progging ! Reading… thnx a ton

  2. can you show me your enemy features – another way is to set small invisible markers, that might give you more control

    interesting, you have a good comment from outside

  3. hi pikmik,
    thiz is gr8 man!!!! thankz alot. mr kerr said that u were a gr8 game maker and u r!!!! thankz 4 helpin me with those problemz that i asked

  4. Hellooo

    BOMBAY, India – Eight bombs hit Bombay’s commuter rail network during rush hour Tuesday evening, killing at least 147 people and wounding more than 400 in what authorities called a well-coordinated terrorist attack.


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 )

Connecting to %s

Follow

Get every new post delivered to your Inbox.