Weapon Questions
Posted: Tue Apr 14, 2009 5:09 pm
OK, so I attatched a gun to a pawn, but I gotta question:
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:
I have no Idea how this is done, the weapon is attatched to the bone "Hand" (again, I'm using the same actor), there's another bone on the back of the skeleton, I'm sure that the weapon uses it to attatch itself to the back of the pawn, but I have no Idea how can I make the weapon model change it's attatchment bone.
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);
} ]
}