scripted player + scripted ragdoll Demo!!!

Topics regarding Scripting with Reality Factory
User avatar
federico
RF Dev Team
Posts: 443
Joined: Tue Jul 05, 2005 3:14 pm
Contact:

Post by federico »

Yes you can assign a weight to every physics object and, I know, that boxes are too light. :wink:

@wackedoutbiker
To import directly all the animation I suggest again the method I wrote before:
When you have a rigged character in milkshape with the ValveBiped skeleton compile it as an actor without animations. Next launch RFvfs.exe, "*.* select all files" in the file selector and then open your actor. Export the Body file at the root. Now, open the ct3.act file in the demo, delete the Body fie and "Add" the Body you have previously extracted. "Save as" with another name (choosing again "*.* select all files" in the file selector) using the .act extension. Now the new actor has the animations (naturally it works only if the skeletons match).
:wink:
User avatar
wackedoutbiker
Posts: 189
Joined: Tue Jul 19, 2005 9:11 pm

Post by wackedoutbiker »

Are you sure that's gonna work? I know there's a certain combination of keys to press when importing all the animations from an act file, I know because I have done it before a year ago...but I'll try your method if no one knows how to do it the other way...
More atrocities are committed in the name of that which is holy and righteous than that which is wicked and evil
User avatar
steven8
Posts: 1487
Joined: Wed Aug 24, 2005 9:08 am
Location: Barberton, OH

Post by steven8 »

I'd trust frederico. He's had a fairly high success rate with this stuff. :D
Steve Dilworth - Resisting change since 1965!
User avatar
wackedoutbiker
Posts: 189
Joined: Tue Jul 19, 2005 9:11 pm

Post by wackedoutbiker »

I tried it and was unable to get it to work...I KNOW there's a key combination that you press in order to import animations in Actor Studio. It's just...that I have forgotten it...
More atrocities are committed in the name of that which is holy and righteous than that which is wicked and evil
User avatar
federico
RF Dev Team
Posts: 443
Joined: Tue Jul 05, 2005 3:14 pm
Contact:

Post by federico »

Sorry, I can't help you rememberin te key combination but I can use my method on your actor. Can you post it here or send it to me using PM? I only need a compiled act file without animations (naturally it works only if your actor is linked to a ValveBiped skeleton).
User avatar
wackedoutbiker
Posts: 189
Joined: Tue Jul 19, 2005 9:11 pm

Post by wackedoutbiker »

Well, I think it's Shift plus something...I do not know. I will try to contact Gekido about it. He knows, and I think this info would help the rest of us...I don't wanna enter in all that info if I don't have to...

EDIT: if I attach items as Pawns to the player (clothes, for instance) do they bend along with the character? I'm thinking of creating a kind of inventory that attaches equipped items to the character.
More atrocities are committed in the name of that which is holy and righteous than that which is wicked and evil
User avatar
federico
RF Dev Team
Posts: 443
Joined: Tue Jul 05, 2005 3:14 pm
Contact:

Post by federico »

Attaching an entity to another is a trouble if you want to have a bone attachment matching the bone rotation. For the first time I reached a good result in this demo, attaching the pistol to the player's hand. I had to use the new bone commands by Nout.
in gamelogic.s I put the commands:

Code: Select all

SetEntityRotation("SMG", -(GetBonePitch("CAMERA", "ValveBiped.Anim_Attachment_RH")/0.017), (GetBoneYaw("CAMERA", "ValveBiped.Anim_Attachment_RH")/0.017),0);
    SetEntityPosition("SMG", GetBoneX("CAMERA", "ValveBiped.Anim_Attachment_RH"), GetBoneY("CAMERA", "ValveBiped.Anim_Attachment_RH"), GetBoneZ("CAMERA", "ValveBiped.Anim_Attachment_RH") );
SMG is the szEntityName of the StaticEnttyproxy pistol. CAMERA is the name of the player. In the player_down.s script I turn on/off the SMG entity Alpha when pistol isactivated. I didn't look too much at thi part of the code. There isn't the weapon inventory I planned. ValveBiped.Anim_Attachment_RH is the name of the pistol attachment on the player right hand.
User avatar
wackedoutbiker
Posts: 189
Joined: Tue Jul 19, 2005 9:11 pm

Post by wackedoutbiker »

Can you put that just anywhere in the code, or should it be in a certain place?
More atrocities are committed in the name of that which is holy and righteous than that which is wicked and evil
User avatar
federico
RF Dev Team
Posts: 443
Joined: Tue Jul 05, 2005 3:14 pm
Contact:

Post by federico »

Everywhere, but remember that if the order where the commands are placed isn't running, the pistol loses his attachment. That's why I put it in game_logic.s, because it runs every frame of the game.
User avatar
wackedoutbiker
Posts: 189
Joined: Tue Jul 19, 2005 9:11 pm

Post by wackedoutbiker »

All right, thanks. Did you get my PM?
More atrocities are committed in the name of that which is holy and righteous than that which is wicked and evil
Post Reply