TGB - is there a built in way to make one behavior run before the others?
by Josias Gibbs · in Torque Game Builder · 02/11/2009 (6:17 pm) · 1 replies
I'm trying to create a behavior to initialize the variables of an object (ie: %this.speed, %this.acceleration, %this.health, etc). I'd like this behavior to execute once (and only once) before any other behaviors. Is there a built in way to do this using TGB?
I could manually set this up using a "boolean" variable at the end of my "constructor" behavior, and a conditional statement at the beginning of every other behavior, but I'm thinking that there might be a less clunky way... is there?
I could manually set this up using a "boolean" variable at the end of my "constructor" behavior, and a conditional statement at the beginning of every other behavior, but I'm thinking that there might be a less clunky way... is there?
Torque Owner Josias Gibbs