Game Development Community

Unable to Load Behaviors in TGB

by Destin Bales · in General Discussion · 08/02/2010 (3:58 pm) · 3 replies

Hello,

It looks like I posted this in the wrong place (TDN). :/ Reposting here in General Discussion.

I'm new to Torquescript and am following along with the "Hands On Coding Guide" from makingindiegames.com. The example for learning behaviors has you write a script, PulsingGlow.cs, to illustrate the creation of a behavior. The lesson concludes with:


Quote:Save the file in the behaviors folder of your project. Open TGB and reload the project so the engine can recognize the new behavior file. Select your image that we created in a previous lesson and under the behaviors tab, click the green button to add the behavior to the object.

I'm currently using the free trial of TGB 2D version 1.7.5, and the behaviors folder is located in the game directory by default. \game\behaviors When I place PulsingGlow.cs in that folder and reload the editor, the behavior is not showing in the dropdown box.

Searching through the forums I found some posts where people were instructed to move the behaviors to \game\scripts\behaviors, and I tried that with no luck either. I even tried \game\gamescripts\behaviors.

What am I doing wrong? Is it possible that some typo in PulsingGlow.cs could cause me to not see the behavior in the editor? How can I test to load a behavior file?

Thanks in advance.

#1
08/03/2010 (3:18 am)
After continued troubleshooting I've learned that there is something wrong within the script causing it not to show up in TGB. When downloading other behavior files I can load them just fine.

#2
08/04/2010 (3:03 am)
Thanks you for the post.
Hi guys, Im a newbie. Nice to join this forum.


__________________
Watch The Other Guys Online Free
#3
08/06/2010 (5:54 pm)
When you run your game press the tilde "~" key to bring up the console, you can look for any error text (will be in red) which should identify any script errors. In your game project location after closing TGB a console.log text file is dumped as well and you can search that for script errors that should help you identify the problem.

If you aren't sure on how to fix the error feel free to post it and can help resolve whatever the script error is.