Override ItemData dynamic variables?
by Mike Stoddart · in Torque Game Engine · 06/05/2002 (10:34 am) · 1 replies
I have a new object in my world that will serve as a mission objective, of which there will be up to 5. I have defined the ItemData in objective.cs as:
I've added two such objectives into my mission file. I want to override the dynamic variables in the mission file to give something like the following:
But this doesn't work; the defaults of "Flag" and "0" are used instead.
Is what I'm trying to do possible? This gives me the greatest flexibility and involves no code changes, which makes it even more attractive.
Thanks
datablock ItemData(Objective)
{
category = "Objective";
shapeFile = "~/data/shapes/objectives/flag2.dts";
mass = 1;
friction = 1;
elasticity = 0.3;
// Dynamic properties defined by the scripts
objectiveName = "Flag";
objectiveNumber = 0;
ownedBy = 0;
};I've added two such objectives into my mission file. I want to override the dynamic variables in the mission file to give something like the following:
objectiveName = "the Red Teams flag"; objectiveNumber = "2";
But this doesn't work; the defaults of "Flag" and "0" are used instead.
Is what I'm trying to do possible? This gives me the greatest flexibility and involves no code changes, which makes it even more attractive.
Thanks
About the author
Torque Owner Mike Stoddart