Help with Behavior
by Harrison Brock · in Torque Game Builder · 08/11/2008 (11:22 am) · 4 replies
Here is my code
The thing is when I call %this.owner.delete(); VS 2005 Pro starts trying to debug the .exe for the game. But I don't see any errors at all.
if (!isObject(HiddenObjectBehavior))
{
%template = new BehaviorTemplate(HiddenObjectBehavior);
%template.friendlyName = "HiddenObjectBehavior";
%template.behaviorType = "HiddenObject";
%template.description = "Behavior desciption";
// Object will be one of two types 0 being good and 1 being bad
%template.addBehaviorField(ObjType, "The Object Type", float, 0);
}
function HiddenObjectBehavior::onMouseDown(%this, %modifier, %worldPosition, %clicks)
{
if(%this.ObjType == 1)
{
echo("bad object");
//To Do
}
if(%this.ObjType == 0)
{
%this.owner.delete(); // Problem here
}
}The thing is when I call %this.owner.delete(); VS 2005 Pro starts trying to debug the .exe for the game. But I don't see any errors at all.
Associate James Ford
Sickhead Games
%this.owner.schedule( 1, delete );