Game Development Community

Having trouble with behaviors

by Nathan Meier · in Torque Game Builder · 06/16/2008 (12:00 am) · 3 replies

Okay, I'm just learning on how to make scripts and use them in Torque game builder. I made my first script for the fish game tutorial to use as an behavior. I saved the .cs file and put it under the "Behaviors" folder in my game's directory. but I still can't use the behavior. there's still nothing in the Behaviors box. what am I doing wrong? why Can't I use it?

#1
06/16/2008 (3:11 am)
I don't recall that the Fish Tutorial actually uses behaviors. Are you sure that you are following the tutorial? If not, are you sure that you are creating a behavior?
#2
06/16/2008 (3:18 am)
Check it for errors. It sounds like it didn't finish compiling. You can look through the console log and see if it is listed as being compiled or not.
#3
07/01/2008 (4:28 pm)
He is refering to the fish game tutorial that uses behaviors to remake the old fish game. Its in the documentation tutorials that come inside TGB.
Its a decent behavior tutorial, but I find the fish game is easier to do in scripts. :D

As Greg stated, its probably a borked piece of code in the script. Once you have started the game hit the ' (tiddle, to left of 1 key). This will open your console log, scroll up and look for an red entries. These will point you to script problems (usually a let off } or mispelling).

Also, I think you have to use the Project-Reload Project option in TGB if you add new behaviors and don't restart.