Modme Forums

Tigger to revive players in last stand

Game Modding | Call of Duty: Black Ops 3 | Scripting


ModmeBot:

Thread By: Symbo
If you want a trigger that revive all the player but taking all your points:

Add to your mapname.gsc:
#using scripts\zm\_zm_score;
and
#using scripts\zm\_zm_laststand;
to your usings.

then add at the and of main:

thread revive_all_player();

At the bottom of your gsc:

function revive_all_player()
{
trigger = GetEnt("trigger_revive1", "targetname");

trigger SetHintString( "Hold ^3&&1^7 to revive all players (clear points)" );
trigger SetCursorHint( "HINT_NOICON" );

while(1)
{
trigger waittill("trigger", player);
players = GetPlayers();
foreach( player in players )
{
if( IsDefined(player laststand::player_is_in_laststand() == true ))
if( player laststand::player_is_in_laststand() == true )
{
player playsound("flash");
player RevivePlayer();
player.score = 0;
player zm_laststand::auto_revive(player, 0);
wait 0.5;
break;
}
if( IsDefined(player laststand::player_is_in_laststand() == false ))
if( player laststand::player_is_in_laststand() == false )
{
trigger SetHintString( "All players alive" );
wait 1;
trigger SetHintString( "Hold ^3&&1^7 to revive all players (clear points)" );
}
}
}
}



Place a trigger in radiant where you want and give it the targetname of "trigger_revive"


ModmeBot:

Reply By: josh1600

Symbo
If you want a trigger that revive all the player but taking all your points: Add to your mapname.gsc: #using scripts\zm\_zm_score; and #using scripts\zm\_zm_laststand; to your usings. then add at the and of main: thread revive_all_player(); At the bottom of your gsc: function revive_all_player(){ trigger = getent("trigger_revive", "targetname"); trigger SetCursorHint( "HINT_NOICON" ); trigger SetHintString( "Hold ^3&&1^7 to revive all players (everybody lose their points)" ); while(1) { trigger waittill("trigger", player); players = GetPlayers(); foreach(player in players) { player playsound("flash"); player RevivePlayer(); player.score = 0; player zm_laststand::auto_revive(player, 0); } } } Place a trigger in radiant where you want and give it the targetname of "trigger_revive"

aha epic work man will be using a bit of this code to make my own thing for sure.