Jump to content


Photo

How to make explosions?


  • Please log in to reply
2 replies to this topic

#1 xcalibur0645

xcalibur0645

    GMC Member

  • GMC Member
  • 99 posts
  • Version:GM8

Posted 23 September 2012 - 09:56 AM

So I'm making a top-down shooter.

I made enemies in which when they run out of HP, they will explode.
How do make an explosion which hurts my character when I touch it?

Thanks! :thumbsup:
  • 0

#2 AlexTM

AlexTM

    GMC Member?

  • GMC:Member
  • 1437 posts
  • Version:Unknown

Posted 23 September 2012 - 10:25 AM

Create a object that has a filled in circular sprite (128x128). Name it obj_radius. Make sure it's not visible.

Obj_radius create event:
alarm[0]=2

obj_radius alarm[0] event:
instance_destroy()

In explosion create event:
instance_create(x,y,obj_radius)

Obj enemie destroy event:
instance_create(x,y,obj_explosion)

So when the obj_radius object touches the character, make the characters health decrease by whatever number.

Edited by A!ex, 23 September 2012 - 10:26 AM.


#3 xcalibur0645

xcalibur0645

    GMC Member

  • GMC Member
  • 99 posts
  • Version:GM8

Posted 23 September 2012 - 10:30 AM

Create a object that has a filled in circular sprite (128x128). Name it obj_radius. Make sure it's not visible.

Obj_radius create event:

alarm[0]=2

obj_radius alarm[0] event:
instance_destroy()

In explosion create event:
instance_create(x,y,obj_radius)

Obj enemie destroy event:
instance_create(x,y,obj_explosion)

So when the obj_radius object touches the character, make the characters health decrease by whatever number.


Thanks a lot! Now to try this.
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users