UGX-Mods Login

or login with an authentication provider below
Sign In with Google
Sign In with Twitter
Sign In with Discord
Sign In with Steam
Sign In with Facebook
Sign In with Twitch

respawning instead of dying when falling off the map

broken avatar :(
Created 7 years ago
by AdvancedDecay
0 Members and 1 Guest are viewing this topic.
2,643 views
broken avatar :(
×
broken avatar :(
Location: gb
Date Registered: 13 March 2016
Last active: 4 years ago
Posts
76
Respect
Forum Rank
Rotting Walker
Primary Group
Member
×
AdvancedDecay's Groups
AdvancedDecay's Contact & Social Links
i want to know how I can respawn the players instead of dying when falling off the map but so that they still die if killed buy zombies?? when they respawn from falling off the map they still have all their perks guns an everything
broken avatar :(
×
broken avatar :(
Location: deDortmund
Date Registered: 20 December 2015
Last active: 5 months ago
Posts
307
Respect
Forum Rank
Perk Hacker
Primary Group
Community Scripter
My Groups
More
Personal Quote
Payback
Signature
Tears Of The Fallen | Join the project https://discord.gg/8gDNQRj
×
fanmagic's Groups
Community Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
fanmagic's Contact & Social LinksTears Of The Fallen
i want to know how I can respawn the players instead of dying when falling off the map but so that they still die if killed buy zombies?? when they respawn from falling off the map they still have all their perks guns an everything

So you only want to put the player back into the map after he fell down?
If so you could use this code.

Code Snippet
Plaintext
back_to_map()
{
fall_down_trig = getEnt ("fall_down_trig","targetname");
fall_down_spawn = getStruct ("fall_down_spawn","targetname");
while(1)
{
fall_down_trig waittill("trigger", who);
if(IsPlayer( who ))
{
who DontInterpolate();
who SetOrigin( fall_down_spawn.origin );
}
}
}
Just call this somewhere:
Code Snippet
Plaintext
thread back_to_map();

In radiant you have to create a trigger multiple with the targetname "fall_down_trig" and a scriptstruct with the targetname "fall_down_spawn" where you would like to "respawn" the player.
broken avatar :(
×
broken avatar :(
Location: gb
Date Registered: 13 March 2016
Last active: 4 years ago
Posts
76
Respect
Forum Rank
Rotting Walker
Primary Group
Member
×
AdvancedDecay's Groups
AdvancedDecay's Contact & Social Links
So you only want to put the player back into the map after he fell down?
If so you could use this code.

Code Snippet
Plaintext
back_to_map()
{
fall_down_trig = getEnt ("fall_down_trig","targetname");
fall_down_spawn = getStruct ("fall_down_spawn","targetname");
while(1)
{
fall_down_trig waittill("trigger", who);
if(IsPlayer( who ))
{
who DontInterpolate();
who SetOrigin( fall_down_spawn.origin );
}
}
}
Just call this somewhere:
Code Snippet
Plaintext
thread back_to_map();

In radiant you have to create a trigger multiple with the targetname "fall_down_trig" and a scriptstruct with the targetname "fall_down_spawn" where you would like to "respawn" the player.

thanks man il try this can u hmu in pm as I need some help
broken avatar :(
×
broken avatar :(
Location: gb
Date Registered: 13 March 2016
Last active: 4 years ago
Posts
76
Respect
Forum Rank
Rotting Walker
Primary Group
Member
×
AdvancedDecay's Groups
AdvancedDecay's Contact & Social Links
So you only want to put the player back into the map after he fell down?
If so you could use this code.

Code Snippet
Plaintext
back_to_map()
{
fall_down_trig = getEnt ("fall_down_trig","targetname");
fall_down_spawn = getStruct ("fall_down_spawn","targetname");
while(1)
{
fall_down_trig waittill("trigger", who);
if(IsPlayer( who ))
{
who DontInterpolate();
who SetOrigin( fall_down_spawn.origin );
}
}
}
Just call this somewhere:
Code Snippet
Plaintext
thread back_to_map();

In radiant you have to create a trigger multiple with the targetname "fall_down_trig" and a scriptstruct with the targetname "fall_down_spawn" where you would like to "respawn" the player.

hi for some reason this doesn't work in game... I called the thread back to map under post_load in Mapname gsc and the function at bottom of map name gsc but to no avail?? anything wrong with it
broken avatar :(
×
broken avatar :(
Location: deDortmund
Date Registered: 20 December 2015
Last active: 5 months ago
Posts
307
Respect
Forum Rank
Perk Hacker
Primary Group
Community Scripter
My Groups
More
Personal Quote
Payback
×
fanmagic's Groups
Community Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
fanmagic's Contact & Social LinksTears Of The Fallen
Do you added it under maps\_zombiemode::main(); ?

 
Loading ...