Page 1 of 1

Players die and explosive

Posted: Wed May 24, 2017 10:43 am
by Chees
I wonder if the player die and explosive.How can i do that
pls help me.Thx :D

Re: Players die and explosive

Posted: Wed May 24, 2017 8:22 pm
by UnluckyNinja
You need an OnPlayerDeathTrigger, then in the script:
If you just want visual effects: player.Gib();
If you want damage to other players: Game.CreateExplosive(var).
(Didn't check the spell, better look them up in the doc.)

Re: Players die and explosive

Posted: Wed Mar 06, 2019 2:28 pm
by Hamurlik
UnluckyNinja wrote:
Wed May 24, 2017 8:22 pm
You need an OnPlayerDeathTrigger, then in the script:
If you just want visual effects: player.Gib();
If you want damage to other players: Game.CreateExplosive(var).
(Didn't check the spell, better look them up in the doc.)
Where exactly to enter the script for OnPlayerDeathTrigger?

Re: Players die and explosive

Posted: Wed Mar 06, 2019 7:46 pm
by JakSparro98
Chees wrote:
Wed May 24, 2017 10:43 am
I wonder if the player die and explosive.How can i do that
pls help me.Thx :D
Do you need that the player explodes in giblets or a normal explosion like the one we see from a red barrel?

Hamurlik wrote:
Wed Mar 06, 2019 2:28 pm
UnluckyNinja wrote:
Wed May 24, 2017 8:22 pm
You need an OnPlayerDeathTrigger, then in the script:
If you just want visual effects: player.Gib();
If you want damage to other players: Game.CreateExplosive(var).
(Didn't check the spell, better look them up in the doc.)
Where exactly to enter the script for OnPlayerDeathTrigger?
You need to specify a method name inside the Script Method field of the OnPlayerDeathTrigger.
Image
the method name refers to a public method inside the map script.

Code: Select all

public void MyMethod(TriggerArgs arg)
{

//code

}