Game Development Community

Getting datablock variables

by Dave D · in Torque Game Engine · 06/24/2007 (8:05 pm) · 2 replies

I am trying to get the value of a variable from a datablock. I am creating about 30 different AI "tribes" or factions. I added a variable, tribe, in each of the tribes datablock. But I am having an issue at spawn time trying to read that variable. I am sure it's just the syntax that I am getting wrong. Someone help a brother out and kick me in the right direction.

#1
06/24/2007 (8:10 pm)
%obj.getDataBlock().tribes;
#2
06/24/2007 (8:37 pm)
Thanks, that did the trick.