Hey so what i'm trying to do is have the level restart at a checkpoint. I have this which starts the whole level over again.
local levelreloading = 0
function level_reload_init(e)
end
function level_reload_main(e)
if g_PlayerHealth <= 0 and levelreloading == 0 then
levelreloading = 1
Prompt(" ")
TriggerFadeIn()
--LevelFilenameToLoad(Test)
JumpToLevelIfUsed(e)
Prompt(" ")
end
end
But im wondering if there is a way to use that with a checkpoint. Basically, I just want the level to restart fresh at a certain checkpoint.
tried this and it doesnt work
local levelreloading = 0
function checkpoint_init(e)
end
function checkpoint_main(e)
if g_Entity[e]['plrinzone']==1 then
PlaySound(e,0)
Checkpoint(e)
Destroy(e)
ActivateIfUsed(e)
end
end
function level_reload_init(e)
end
function level_reload_main(e)
if g_PlayerHealth <= 0 and levelreloading == 0 then
levelreloading = 1
Prompt(" ")
TriggerFadeIn()
--LevelFilenameToLoad(Test)
JumpToLevelIfUsed(e)
Prompt(" ")
end
end