setEnterCallback(%status)
by rennie moffat · in Torque Game Builder · 12/03/2009 (4:33 pm) · 0 replies
I would think that this method for the trigger would be reqiuired in order to "allow the trigger to be on".
I am studying the Rainy Day Tut and it's trigger has no reference to this in it's code.
I am studying the Rainy Day Tut and it's trigger has no reference to this in it's code.
///trigger method setEnterCallback(%status)
///a working trigger
if (!isObject(WateringBehavior))
{
%template = new BehaviorTemplate(WateringBehavior);
%template.friendlyName = "Watering Behavior";
%template.behaviorType = "Trigger";
%template.description = "Defines when to begin watering";
}
function WateringBehavior::onEnter(%this, %object)
{
%object.startWatering();
}
function WateringBehavior::onLeave(%this, %object)
{
%object.endWatering();
}About the author
My thanks to Garage Games and the Garage Games Community combined with owned determination I got one game up, Temple Racer and I am looking to build more interesting, fun games for the mass market of the iOS app store.