Resolved - Need help with nested variable please
by Flybynight Studios · in Torque Game Engine · 07/19/2007 (12:17 am) · 4 replies
%npc[%counter] = new AIPlayer()
{
dataBlock = %rr.npcobject;
}
MissionCleanup.add(%npc[%counter]);
%npc[%counter].setTransform(%rr.npcloc);
%npc[%counter].setShapeName(%rr.npcname);That code should work. it compiles the first line but crashes on the last 3...
I've used nested variables like this many times in teh past. I cant for the life of me figure out whats screwed..
Is it to do with passing the nested var into c++ via the .settransform? or.add?
Pulling my hair out.
Thanks
#2
07/19/2007 (8:12 am)
I swear if thats the problem I'm going to get my son to kick me in the shins.... Checking now. Thanks Andy
#3
Thank you Andy. Someday I'll actually stop coding when I startfalling asleep at the keyboard :)
07/19/2007 (8:42 am)
Yes I do indeed have sore shins now..Thank you Andy. Someday I'll actually stop coding when I startfalling asleep at the keyboard :)
#4
07/19/2007 (8:42 am)
Oh I've had more than one problem like that. Sometimes you almost wish it was a complicated solution.
Torque Owner Andy Rollins
ZDay Game
%npc[%counter] = new AIPlayer() { dataBlock = %rr.npcobject; }; MissionCleanup.add(%npc[%counter]); %npc[%counter].setTransform(%rr.npcloc); %npc[%counter].setShapeName(%rr.npcname);