Wrong scripting type for stateEmitterNode
by Gary Haussmann · in Torque Game Engine · 12/15/2004 (5:38 pm) · 4 replies
I'm using the TGE1.3 codebase and I think I have found a one-liner typo of sorts.
I would like to specify the emitter node for my sword instead of using the default muzzlepoint node. To do this, I figured I could use something like
or whatever in my weapon image datablock. However, in void ShapeBaseImageData::initPersistFields (in shapeimage.cc) I see this:
Which suggests I need to specify the node by number. I've tried to specify a node number but the engine crashes when I do so. I also noticed that the stateEmitterNode array is defined as a "const char *" in ShapeBaseImageData, so it seems like a simple change of the above line to
is appropriate. I've tried it and it works. I can provide script files and such to demo the error, if that is really needed.
Thanks,
Gary
I would like to specify the emitter node for my sword instead of using the default muzzlepoint node. To do this, I figured I could use something like
stateEmitterNode[3] = "damageStart";
or whatever in my weapon image datablock. However, in void ShapeBaseImageData::initPersistFields (in shapeimage.cc) I see this:
addField("stateEmitterNode", TypeS32, Offset(stateEmitterNode, ShapeBaseImageData), MaxStates);Which suggests I need to specify the node by number. I've tried to specify a node number but the engine crashes when I do so. I also noticed that the stateEmitterNode array is defined as a "const char *" in ShapeBaseImageData, so it seems like a simple change of the above line to
addField("stateEmitterNode", TypeString, Offset(stateEmitterNode, ShapeBaseImageData), MaxStates);is appropriate. I've tried it and it works. I can provide script files and such to demo the error, if that is really needed.
Thanks,
Gary
Associate Kyle Carter