UGX-Mods

Call of Duty 5: World at War => Help Desk => Scripting => Topic started by: buttkicker845 on June 22, 2015, 04:46:29 am

Title: how to disable mission fail on player death
Post by: buttkicker845 on June 22, 2015, 04:46:29 am
im trying to make a SP mod part of which includes the player having a certain amount of lives before failing the mission, the only problem is the level automatically restarts when the player dies. does anyone know how to keep the game from restarting immediately after death?
so far ive tried editing the Callback_playerKilled in globalCallbacks but even if i remove all the missionFailed() lines it stills ends the mission after death
Title: Re: how to disable mission fail on player death
Post by: BluntStuffy on June 22, 2015, 06:06:39 am
in _zombiemode, in the player_damage_override() function it send out the "end_game" notify when all players are down.
Title: Re: how to disable mission fail on player death
Post by: buttkicker845 on June 22, 2015, 04:26:48 pm
in _zombiemode, in the player_damage_override() function it send out the "end_game" notify when all players are down.

the problem is im not using the zombiemode scripts since im not making a zombie map, im making a campaign style map and when i fallow the format of player_damage_override and the player_killed_override functions in zombiemode the game still ends just like normal
Title: Re: how to disable mission fail on player death
Post by: DidUknowiPwn on June 22, 2015, 05:08:10 pm
the problem is im not using the zombiemode scripts since im not making a zombie map, im making a campaign style map and when i fallow the format of player_damage_override and the player_killed_override functions in zombiemode the game still ends just like normal

Define this in your script:
Code Snippet
Plaintext
level.no_laststandmissionfail = true;

It will stop this from running:
Code Snippet
Plaintext
mission_failed_during_laststand( dead_player )
in _laststand.gsc

Edit: Woops read that wrong, you want to disable on death.

Edit2:
Callback_PlayerKilled in _callbackglobal the code with
    if( get_players().size > 1 )

remove the missionfailed(); if you want to disable it.
Title: Re: how to disable mission fail on player death
Post by: buttkicker845 on June 23, 2015, 03:29:20 am
remove the missionfailed(); if you want to disable it.

that didnt stop the mission from failing when i die. i tried reviving the player and removing the
self notfity("player_killed"); but the game still restarts
Title: Re: how to disable mission fail on player death
Post by: DidUknowiPwn on June 23, 2015, 03:47:15 am
That was for Co-Op by the way, not solo.
Title: Re: how to disable mission fail on player death
Post by: HitmanVere on June 23, 2015, 10:48:36 am
im trying to make a SP mod

That was for Co-Op by the way, not solo.

 ::)
Title: Re: how to disable mission fail on player death
Post by: buttkicker845 on June 23, 2015, 07:03:45 pm
That was for Co-Op by the way, not solo.
well then....  ???

is there anyway to keep the game from calling missionFailed() as soon as the player dies in single player?