DatKofGuy
Active member
Hey, so I'm still getting a hang of using and writing scripts. I am bit stuck now making use of scripts written by others.
I want to implement the respawn in place script written by DC.
I followed the steps properly (I think), however when the player dies, they either play the default spawn, or the respawn animation if they have it, at the position set out by the level, instead of where the player died as I see the script is supposed to do.
So I downloaded the script, placed it in the scripts folder.
Added the death settings:
falldie 1
nodieblink 3
Then I made a new script spawn.c, and copied the example code in it.
I then added the following to my player:
Did do something wrong? Or did I miss something?
I want to implement the respawn in place script written by DC.
Respawn (i.e. recover) in location of previous defeat instead of falling from the sky.
I followed the steps properly (I think), however when the player dies, they either play the default spawn, or the respawn animation if they have it, at the position set out by the level, instead of where the player died as I see the script is supposed to do.
So I downloaded the script, placed it in the scripts folder.
Added the death settings:
falldie 1
nodieblink 3
Then I made a new script spawn.c, and copied the example code in it.
Code:
#import "data/scripts/dc_respawn_body.c"
void main()
{
void acting_entity = getlocalvar("self");
int animation_id = openborconstant("ANI_RISE");
/*
* Find our body, remove it and play the
* rise animation. "That's all you got?!"
*/
dc_respawn_body(acting_entity, animation_id);
}
I then added the following to my player:
Code:
onspawnscript data/scripts/spawn.c
Did do something wrong? Or did I miss something?