Trigger Adventure Kit
by Sventhors · in Torque Game Builder · 05/23/2007 (12:00 pm) · 1 replies
I am having trouble getting this trigger to work AND showing up in
Edit mode/Config Datablock. It is not listening as a config datablock (in Scripting)
I did write exec( "./triggerNight.cs" ); in Game.cs under function execGameScripts()
and have cleaned out all the .dso. Is there something else I am suppose to write or did I exec it in the wrong place. I am using the Adventure Kit (TGB).
Also,
I dont know if this trigger is right. I want the player to run throught the trigger and
activiate night or day.
Sorry new to scripting.
Edit mode/Config Datablock. It is not listening as a config datablock (in Scripting)
I did write exec( "./triggerNight.cs" ); in Game.cs under function execGameScripts()
and have cleaned out all the .dso. Is there something else I am suppose to write or did I exec it in the wrong place. I am using the Adventure Kit (TGB).
Also,
I dont know if this trigger is right. I want the player to run throught the trigger and
activiate night or day.
function nightTrigger::onEnter( %this, %object )
{
if ( !isObject( $player ) )
letThereBeNight();
return;
}
function nightTrigger::onLeave(%this, %object)
{
if ( !isObject( $player ) )
letThereBeLight();
return;
}Sorry new to scripting.
About the author
Torque Owner Andre Lind
I don't se why you use return in the end of your functions...
You could just as well skip it :)
Other than that:
When you step on the trigger you will set it to night but as soon as your character leaves the trigger again it will be day...
Either your trigger have to be quite big or else it will go from day to night to day in seconds ;)