Behaviors vs scripts in TGB
by Josias Gibbs · in Torque Game Engine · 09/05/2008 (6:46 am) · 3 replies
Up until now, I've been doing all of my scripting using behaviors. I was wondering what the difference between behaviors and scripts is in TGB.
When should I use one over the other in general? What's the benefit of using a script instead of a behavior? A behavior instead of a script?
I'm getting ready to do some real AI for npc's, so I figured it was about time for me to learn the difference between the two in TGB.
When should I use one over the other in general? What's the benefit of using a script instead of a behavior? A behavior instead of a script?
I'm getting ready to do some real AI for npc's, so I figured it was about time for me to learn the difference between the two in TGB.
About the author
#2
09/05/2008 (12:32 pm)
There is actually a ton of TorqueScript outside of behaviors making things work in your project. Just look around your project folders, main.cs, game.cs, all of the common folder. Some of the older tutorials on the TDN do not use behaviors if you are interested in seeing an example, like the RTS or Tetris tutorials.
#3
James - I'll check out those tutorials, thanks.
09/06/2008 (1:59 pm)
Michael - I do kinda prefer behaviors - they seem much more accessible, and easier to modify.James - I'll check out those tutorials, thanks.
Employee Michael Perry
ZombieShortbus
You can write your AI in code, then you can integrate it via datablocks or behaviors. The growing trend is that most code is moving toward behaviors, but not everything.