here's what i have atm
- Code: Select all • Expand view
script 15 death //when player dies in mini game
{
If(CheckInventory("playerisgaming") <= 1)
{
TakeInventory("playerisgaming",1);
Teleport_NoFog(0,0,6);
UnMorphActor(0);
}
}
Moderator: GZDoom Developers
script 15 death //when player dies in mini game
{
If(CheckInventory("playerisgaming") <= 1)
{
TakeInventory("playerisgaming",1);
Teleport_NoFog(0,0,6);
UnMorphActor(0);
}
}
script 15 ENTER //when player dies in mini game
{
If(CheckInventory("playerisgaming") == 1)
{
SetPlayerProperty (0, 1, PROP_BUDDHA); //never allow the player to die, but allow it's health to decay
If(GetActorProperty(0, APROP_HEALTH) == 1) //Check if the player is "dead"
{
SetActorProperty(0, APROP_HEALTH, 100); //reset health back to 100
SetPlayerProperty (0, 0, PROP_BUDDHA);
TakeInventory("playerisgaming",1);
Teleport_NoFog(0,0,6);
UnMorphActor(0);
}
}
delay(5); //check every 5 tics
restart;
}
TDRR wrote:This should work, do note that this has the side effect of always teleporting the player if it dies, so you may want to be careful with it.
- Code: Select all • Expand view
script 15 ENTER //when player dies in mini game
{
If(CheckInventory("playerisgaming") == 1)
{
SetPlayerProperty (0, 1, PROP_BUDDHA); //never allow the player to die, but allow it's health to decay
If(GetActorProperty(0, APROP_HEALTH) == 1) //Check if the player is "dead"
{
SetActorProperty(0, APROP_HEALTH, 100); //reset health back to 100
SetPlayerProperty (0, 0, PROP_BUDDHA);
TakeInventory("playerisgaming",1);
Teleport_NoFog(0,0,6);
UnMorphActor(0);
}
}
delay(5); //check every 5 tics
restart;
}
EDIT: Fixed code, now it will only resurrect the player if it has died while playing a minigame.
Also, if you don't mind telling, what is this about? Sounds pretty cool.
Users browsing this forum: No registered users and 3 guests