here's what i have atm
Code: Select all
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
Code: Select all
script 15 death //when player dies in mini game
{
If(CheckInventory("playerisgaming") <= 1)
{
TakeInventory("playerisgaming",1);
Teleport_NoFog(0,0,6);
UnMorphActor(0);
}
}
Code: Select all
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;
}
thank you very much for fixing it, and if you wanna know this script is for i'll dm you the details as this is for a personal mod i'm working on for a few discord friends of mine i will more then likely not upload it due to some "sensitive" stuff and if i do decided to upload it i will have to modify certain assetsTDRR 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.
EDIT: Fixed code, now it will only resurrect the player if it has died while playing a minigame.Code: Select all
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; }
Also, if you don't mind telling, what is this about? Sounds pretty cool.