Pawns with add-ons

Post topics regarding Level Building/Design and Entity Usage with Reality Factory
Post Reply
User avatar
blutwurstchen
Posts: 57
Joined: Wed Mar 19, 2008 8:51 pm

Pawns with add-ons

Post by blutwurstchen »

Hello,

I'm workin on a game in which PCs can be changed by adding disguise elements such as hats, glasses etc. If I export these as .bdys from milkshape attached to similar skeletons. What is the best way to attach these in the game.

I suppose it would be a similiar process to adding a weapon, only if I add something like 'hat' to the attribute file, where do I need to type hat.act.

Also, is it necessary to include the full skeleton to something like this (for instance, the skeleton's arms and legs if the mesh is just a hat?)

I know I have seen this covered before in this forum, but I searched and couldn't find it here and in the manuals.

Thanks in advance for any help

Oops, I found the answer in the manual 'Attaching entities to an actor or model'. I'm still curious about the skeleton question though.
User avatar
blutwurstchen
Posts: 57
Joined: Wed Mar 19, 2008 8:51 pm

Re: Pawns with add-ons

Post by blutwurstchen »

I got the hat to show up in the game by following the directions in the manual. It is in the right place, but when the character moves or rotates, the hat doesn't follow it properly.

I've tried rectifying this by attaching the hat attribute to the head bone and it ends up about 10 feet above the characters head. I've added the walk and idle animations to the hat.act and this still doesn't work.

Any ideas?
User avatar
metal_head
Posts: 1244
Joined: Sat Jan 05, 2008 8:31 pm
Location: Bulgaria,Sofia
Contact:

Re: Pawns with add-ons

Post by metal_head »

Well, how have you aded the hat to the player, the hat has to have exactly the same skeleton as the pawn if you've aded it like and accessory.
User avatar
blutwurstchen
Posts: 57
Joined: Wed Mar 19, 2008 8:51 pm

Re: Pawns with add-ons

Post by blutwurstchen »

I added it as an attribute, and put a section in the player.ini file so that the player started with it. The first time I tried this I used the same skeleton as the character, assigning all of the vertices to the head bone. The result is that the hat appears when the game is started, but doesn't follow the idle or walk animations of the character. It sometimes gets left behind and doesn't rotate when the character rotates.

I tried this again, this time deleting the skeleton and centering the hat before exporting as a .bdy and creating the act file. In the BoneName field of the attribute entity I assigned the my skeleton's head bone. The result is pretty much the same thing - a hat which doesn't follow the animations of the character.
User avatar
QuestOfDreams
Site Admin
Posts: 1520
Joined: Sun Jul 03, 2005 11:12 pm
Location: Austria
Contact:

Re: Pawns with add-ons

Post by QuestOfDreams »

Use a scripted Pawn and use the script method AttachAccessory. You can find an example script in the script folder.
User avatar
blutwurstchen
Posts: 57
Joined: Wed Mar 19, 2008 8:51 pm

Re: Pawns with add-ons

Post by blutwurstchen »

Thanks for the help.
I do not have the AttachAccessory.s. Is this in a previous version of RF, or can somebody post this?
rgdyman
Posts: 84
Joined: Tue Jul 05, 2005 7:05 am

Re: Pawns with add-ons

Post by rgdyman »

No.. AttachAccessory is a LowLevel script command. ( Im 99% sure that is )

Look in the docs under LowLevel commands.
BigJohn
Posts: 2
Joined: Wed May 13, 2009 2:58 am

Re: Pawns with add-ons

Post by BigJohn »

You're close rgdyman, AttachAccessory is a High Level command found under the MISC category. Unfortunately I don't think I understand how to use it effectively, sorry.
User avatar
blutwurstchen
Posts: 57
Joined: Wed Mar 19, 2008 8:51 pm

Re: Pawns with add-ons

Post by blutwurstchen »

Has anyone successfully used AttachAccessory in a script? I've noticed that there is a jacket or helmet or something in one of the demos, when viewing it in RFEdit, but I can never find it in the demo. Maybe Rob Ot is wearing it.

If you have go this to work, I would really appreciate it if you could post an excerpt of your script.
Post Reply