http://www.youtube.com/watch?v=chARlTWvigA I'm using the same actor as in this video, but in the video the gun sticks to the back o the pawn, the pawn can take it and hold it in it's hands, than put it back on it's back... How is this done? It's really cool! This pawn that I'm using has a High Level script with only one low level order, which checks if a trigger has been triggered, I'm sure that this will have to be done in Low Level, but I hope I can keep the structure of the rest of the script:
Code: Select all
{
TRIGGER [edoortrig]
TRIGGER2 [eldetect]
TRIGGER3 [egrunttalk2]
Spawn[ ()
{
Console(true);
SetWeapon("test_rifle");
NewOrder("Start");
} ]
Start[ ()
{
PlayerDistOrder(120, "StartTalking");
} ]
StartTalking[ ()
{
FacePlayer(true, true);
Delay("SG_Draw", 1.01, "");
SetEventState("egrunttalk", true);
Delay("SG_Idle", 1, "");
Delay("SG_Holster", 1.65, "");
Delay("Humming", 2, "");
Delay("SG_Draw", 1.01, "");
NewOrder("StartWalking");
} ]
StartWalking[ ()
{
FacePlayer(false, false);
NextPoint();
RotateToPoint("SG_TurnLeft", 130, false, "" );
MoveToPoint("SG_Walk_N_Run", 150, "");
NewOrder("TalkAgain");
} ]
TalkAgain[ ()
{
Delay("SG_Walk_N_Stop", 0.85, "");
Delay("SG_Holster", 1.65, "");
Delay("Push_Button_low", 0.8, "");
Delay("Idle", 0.5, "");
SetEventState(TRIGGER, true);
LowLevel("Detect");
} ]
Detect[ ()
{
if(GetEventState(TRIGGER2))
{
HighLevel("Finnish");
}
} ]
Finnish[ ()
{
NextPoint();
RotateToPoint("Idle", 130, false, "" );
MoveToPoint("Walk_N", 30, "");
RotateToPlayer("Walk_N", 100, false, "");
FacePlayer(true, true);
SetEventState(TRIGGER3, true);
Delay("Yawing", 5, "");
Delay("idle", 2, "");
SetEventState("nextlevel", true);
} ]
}