Why the robot do not dead
Posted: Mon Jan 25, 2010 1:45 pm
Below is my code, when I attack the robot, it just stop walking and nothing hapend, can someone help me
Thanks
EDITED by Jay: I put your Code into a code box, makes it better to read.
Thanks
Code: Select all
{
start[ ()
{
Console(true);
AttributeOrder("enemy_health",10,"Death");
PlayAnimation("Idle", true, "");
Delay("Idle",3,"");
RotateMoveToPoint("walk",100,20,true,"footsteps\\m1.wav");
MoveToPoint("walk",50,"footsteps\\m1.wav");
NewOrder("Patrol");
} ]
Death[ ()
{
AnimateStop("die_1",0.5,"");
SetEventState("Enemy1Dead",true);
}
]
Patrol [()
{
NextPoint();
RotateMoveToPoint("walk",100,20,true,"footsteps\\m1.wav");
MoveToPoint("walk",50,"footsteps\\m1.wav");
RestartOrder();
}
]
}