EndGame() problem. Pls help
by Billy Am · in Torque Game Engine · 07/11/2005 (5:37 am) · 3 replies
Hi folks
I have set 2 triggers at my track trigger.cp=0 and trigger.cp=1. and in the triggers.cs's function onEnterTrigger , I did if(%trigger.cp == 1) EndGame();. But the game keeps crashing when my car reaches the trigger area ... can anyone help ? thanks
billy
I have set 2 triggers at my track trigger.cp=0 and trigger.cp=1. and in the triggers.cs's function onEnterTrigger , I did if(%trigger.cp == 1) EndGame();. But the game keeps crashing when my car reaches the trigger area ... can anyone help ? thanks
billy
About the author
#2
billy
07/11/2005 (7:04 am)
Without endgame , the game won't crash ... and what is remode? remove?billy
#3
I managed to go down to irc channel and was helped by atincjon :P his solution is pasted below
$GameIsEnding = 0;
function MyEndGame() {
if( $GameIsEnding == 0 )
$GameIsEnding = schedule( 100, 0, "EndGame");
}
This is my onEnterTrigger method
$GameIsEnding=0;
if(%trigger.cp == 1){
MyEndGame();
}
then add the function below ... :P thanks everyone!!!
billy
07/11/2005 (8:08 am)
Hi guysI managed to go down to irc channel and was helped by atincjon :P his solution is pasted below
$GameIsEnding = 0;
function MyEndGame() {
if( $GameIsEnding == 0 )
$GameIsEnding = schedule( 100, 0, "EndGame");
}
This is my onEnterTrigger method
$GameIsEnding=0;
if(%trigger.cp == 1){
MyEndGame();
}
then add the function below ... :P thanks everyone!!!
billy
Associate Anthony Rosenbaum