I need to know how to create a spawnpoint and add an effect to that same position when button (crouch) is held, allowing me to respawn at that position when i die, and WHEN i die the effect and position is removed. for example: The Tactical Insertion from Call of Duty.
If that makes sense… Any Help?
I’ve seen it done in the old CoD Infected gamemode with reapers, but I haven’t been able to replicate it.
rule("Rule 1")
{
event
{
Ongoing - Each Player;
All;
All;
}
conditions
{
Is Alive(Event Player) == True;
Event Player.R != True;
Is Button Held(Event Player, Button(Crouch)) == True;
}
actions
{
Event Player.R = Position Of(Event Player);
Create Effect(Event Player, Sphere, Color(White), Event Player.R + Up, 0.400, None);
Event Player.S = Last Created Entity;
}
}
rule("Rule 2")
{
event
{
Player Died;
All;
All;
}
conditions
{
Event Player.R == True;
}
actions
{
Wait Until(Is Alive(Event Player), 99999);
Teleport(Event Player, Event Player.R);
Destroy Effect(Event Player.S);
Event Player.R = False;
}
}
1 Like
Thanks, very much appreciated.
1 Like