Game Development Community

Suicide Attack

by Limdorn · in Game Mechanics Kit · 10/11/2011 (1:45 am) · 2 replies

Hi.
I use the GMK and all is working but ..
Is it possible to configurate a suicide attack?
I want to create a character that explode when arrive near player.

#1
12/19/2011 (8:02 pm)
You would have to edit the datablock so that when the bad guy collides with the player it triggers an explosion animation for the bad guy and due to the collision, just like a bullet, it takes life points from player.

Don't ask me how to program it cause I'm not up to writing script yet.

Sorry....

#2
12/20/2011 (12:30 am)
@Limdorn,

there are many ways to do this,

1; you could mount a trigger to the bad guy that triggers an explosion when the player enters it.

2; you could have the bad guy do a short raycast that detects only the player, and sets an explosion when returning true.

3; you could set the bad guys "onCollision" to apply a huge directDamage when colliding with the player, and set up an explosion event in the bad guys "onDestroy" function.

really a lot of ways...