TGB 1.7.3 Beta1 Bug - Behavior crashes TGB
by Mike Lilligreen · in Torque Game Builder · 05/01/2008 (7:48 am) · 0 replies
Issue: Using the word "template" for the fieldName of a BehaviorField crashes TGB.
Repo steps: Save the following as a behavior script to your project's behavior folder. Restart TGB and add this behavior to an object. TGB will crash.
Obviously the easiest way to prevent this crash right now is not to use the word "template". :) "templat" or "templateObj" work fine, or any other description for the fieldName.
Repo steps: Save the following as a behavior script to your project's behavior folder. Restart TGB and add this behavior to an object. TGB will crash.
if (!isObject(PathLayerBehavior))
{
%temp = new BehaviorTemplate(PathLayerBehavior);
%temp.friendlyName = "Path Layer";
%temp.behaviorType = "A-Star";
%temp.description = "Customizes a tile layer for A-Star pathing";
%temp.addBehaviorField(template, "The object to clone and place within each tile grid", object, "", t2dSceneObject);
}Obviously the easiest way to prevent this crash right now is not to use the word "template". :) "templat" or "templateObj" work fine, or any other description for the fieldName.
About the author