Why the robot do not dead

Topics regarding Scripting with Reality Factory
Post Reply
planebus
Posts: 29
Joined: Thu Jan 14, 2010 7:23 am

Why the robot do not dead

Post 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.
Jay
RF Dev Team
Posts: 1232
Joined: Fri Jul 08, 2005 1:56 pm
Location: Germany

Re: Why the robot do not dead

Post 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.
Everyone can see the difficult, but only the wise can see the simple.
-----
planebus
Posts: 29
Joined: Thu Jan 14, 2010 7:23 am

Re: Why the robot do not dead

Post 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
Jay
RF Dev Team
Posts: 1232
Joined: Fri Jul 08, 2005 1:56 pm
Location: Germany

Re: Why the robot do not dead

Post 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.
Everyone can see the difficult, but only the wise can see the simple.
-----
Post Reply