When I run the map in editor ....I get a message that the named animation doesnt exist: Walking ....
I did the animation in animator....The name Walking is correct....
The name in script is right....
obj.model.animation.start('Walking');
What am i missing here???
Just to let you know,
For an scenery object to play an animation in the engine. You have to select the model and the scenery object in the editor. Double click on the scenery object and then set everything up.
Are the caps correct? Can we see the script?
Caps and spell is correct in both (script) and (Animator)
function GuardStartNodeWalk(obj)
{
var nodeId,nodeName;
//find node nearest to Guard
nodeId=map.node.nearest(obj.position.x,obj.position.z,obj.position.y,null,null,null,0,3000);
if (nodeId==-1) return;
nodeName=map.node.getName(nodeId);
obj.forwardSpeed.walk=35;
obj.model.animation.start('Walking');
obj.motionVector.walkToNode(nodeName,'D1',GD_WALK_TO_DEST01);
}
It works as a scenery...however I want to use it as a bot....so i can set up nodes
I meant the WHOLE script. Maybe there's another animation being called somewhere else. Even if not, post it anyway

.
ccccc Wrote:I meant the WHOLE script. Maybe there's another animation being called somewhere else. Even if not, post it anyway
.
Please do, especially the setup. You might not be loading the right model. Somewhere in the construct you should have something like:
Code:
obj.model.name='xxxxx';
(Where xxxxx is something useful.) You are probably loading the wrong model or no model at all.
[>] Brian