Page 1 of 1

Why the robot do not dead

Posted: Mon Jan 25, 2010 1:45 pm
by planebus
Below is my code, when I attack the robot, it just stop walking and nothing hapend, can someone help me
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();
}
]
}
EDITED by Jay: I put your Code into a code box, makes it better to read.

Re: Why the robot do not dead

Posted: Mon Jan 25, 2010 1:55 pm
by Jay
To fade out the pawn, use the FadeOut command.
To remove the pawn from the level, use the Remove command afterwards.

You could add those two lines to your Death order:

Code: Select all

FadeOut(0,10);
Remove(true);
For more information, look at the HighLevel script commands documentation.

EDIT: If the problem persists, try using Console(true); in your start order and use the hints you get through the console.

Re: Why the robot do not dead

Posted: Mon Jan 25, 2010 2:55 pm
by planebus
Thanks,
but the robot just disappeared, and whant I want to do is let them fall down.
BTW, where I could get the HighLevel script commands documentation, I am just a beginner here
Thanks

Re: Why the robot do not dead

Posted: Mon Jan 25, 2010 3:30 pm
by Jay
In the docs subdirectory in the RealityFactory directory, there is a file. This file is 'the docs', as we call it, also known as 'The RF manual', and it is the reference for RF. If you look around in it, then you will also find the pawn scripting command documentation.