Behaviors not workin in TGB 1.7.2?
by Ehrlich · in Torque Game Builder · 04/15/2008 (10:22 am) · 4 replies
'lo there folks.
this is the problem:
i had a Geometry Wars clone project made with TGB 1.5.1 which i stopped workin on about 4-5 months ago, it happens that since im now workin with TGB 1.7.2 i wanted to load it up with it, and then TGB asked me to update the project, so i could use it in the level editor.
i did update the project when requested, and hoped everythin worked fine, but whenever i hit the F5 key, the starts workin and stuff, but the behaviors just dont run...
this is the code i use to assign and get behaviours runnin:
in the past (TGB ver 1.5.1) it worked like a charm... now its givin me the followin error:
whats goin on?... hast the behaviour management and stuff changed in TGB 1.7.2?
help anyone?
Thx in advance.
this is the problem:
i had a Geometry Wars clone project made with TGB 1.5.1 which i stopped workin on about 4-5 months ago, it happens that since im now workin with TGB 1.7.2 i wanted to load it up with it, and then TGB asked me to update the project, so i could use it in the level editor.
i did update the project when requested, and hoped everythin worked fine, but whenever i hit the F5 key, the starts workin and stuff, but the behaviors just dont run...
this is the code i use to assign and get behaviours runnin:
%shipControls=ShooterControlsBehavior.createInstance();
%shipControls.upKey="keyboard w";
%shipControls.downKey="keyboard s";
%shipControls.leftKey="keyboard a";
%shipControls.rightKey="keyboard d";
%this.addBehavior(%shipControls);
%shipControls=%this.getBehavior("ShooterControlsBehavior");
%shipControls.onBehaviorAdd();
%this.shipControls=%shipControls;
%faceMouse=FaceMouseBehavior.createInstance();
%faceMouse.rotationOffset=-90.0;
%faceMouse.turnSpeed=0.0;
%this.addBehavior(%faceMouse);
%faceMouse=%this.getBehavior("FaceMouseBehavior");
%faceMouse.onAddToScene();
%this.faceMouse=%faceMouse;in the past (TGB ver 1.5.1) it worked like a charm... now its givin me the followin error:
game/gameScripts/player.cs (48): Unable to find object: 'ShooterControlsBehavior' attempting to call function 'createInstance' game/gameScripts/player.cs (60): Unable to find object: '0' attempting to call function 'onBehaviorAdd' game/gameScripts/player.cs (69): Unable to find object: 'FaceMouseBehavior' attempting to call function 'createInstance' game/gameScripts/player.cs (75): Unable to find object: '0' attempting to call function 'onAddToScene'
whats goin on?... hast the behaviour management and stuff changed in TGB 1.7.2?
help anyone?
Thx in advance.
About the author
Computer Science Engineer, with interest in Graphicl Computing, unconventional I/O devices and Artificial Intelligence (for games)
#2
you've got mail.
now, i'd like to say that i've found a workaround for this problem:
all i did was building a new project with TGB 1.7.2, then copy that new project's EXE into the old projects, and rename it accordingly, then it magically started workin again (now behaviors do work in those old projects), so i think its some kinda compatibility issue, since i just let TGB upgrade the projects, thinkin it might take care of everything... but it doesnt look like it.
04/15/2008 (6:28 pm)
@Matt:you've got mail.
now, i'd like to say that i've found a workaround for this problem:
all i did was building a new project with TGB 1.7.2, then copy that new project's EXE into the old projects, and rename it accordingly, then it magically started workin again (now behaviors do work in those old projects), so i think its some kinda compatibility issue, since i just let TGB upgrade the projects, thinkin it might take care of everything... but it doesnt look like it.
#3
After "updating" the project (opening the old project with the 1.8 version) it opens but the main menu buttons of the editor are missing and when i try to run the project it crashes.
Any ideas what to do in that case - shall i first update to 1.76? thanks in advance!!!
(im working on mac osx 10.7)
04/04/2013 (5:10 am)
hi, have a similar problem - i have an older TBG 1.75 Project and i want to update it to 1.8. After "updating" the project (opening the old project with the 1.8 version) it opens but the main menu buttons of the editor are missing and when i try to run the project it crashes.
Any ideas what to do in that case - shall i first update to 1.76? thanks in advance!!!
(im working on mac osx 10.7)
#4
I would double check your usage of %this, I'm assuming it's referred back to your ship onlevelloaded, but double check to make sure.
04/04/2013 (6:16 am)
I'd make sure your behavior is in the behaviors folder. I've upgraded several projects, and some go easier than others. Depending on the complexity, it's sometimes easier to re-do some of the work. But I've had big projects that I've updated, and it's not always an option.I would double check your usage of %this, I'm assuming it's referred back to your ship onlevelloaded, but double check to make sure.
Torque 3D Owner Matthew Langley
Torque