classes ir something like that

Topics regarding Scripting with Reality Factory
Post Reply
Joko
Posts: 11
Joined: Thu Aug 18, 2005 10:24 am

classes ir something like that

Post by Joko » Thu Aug 18, 2005 10:37 am

hi all , i have download RF and wonder is there a way to define classes coz i need to attach one or more parts to another in my game and wneh the parts are attachet they shoud move together.is there a way to do that in RF i have expiriece with programing

User avatar
AndyCR
Posts: 1449
Joined: Wed Jul 06, 2005 5:08 pm
Location: Colorado, USA
Contact:

Post by AndyCR » Thu Aug 18, 2005 4:19 pm

could you tell us what two entities you want to attach? normally you can attach them in-editor.

Joko
Posts: 11
Joined: Thu Aug 18, 2005 10:24 am

Post by Joko » Thu Aug 18, 2005 7:38 pm

i wont to have something as base and ingame to attach parts to it

User avatar
QuestOfDreams
Site Admin
Posts: 1520
Joined: Sun Jul 03, 2005 11:12 pm
Location: Austria
Contact:

Post by QuestOfDreams » Fri Aug 19, 2005 10:11 am

http://dhost.info/realityfactory/onlinehelp/index.htm

Attaching entities to actors or models:
http://dhost.info/realityfactory/online ... aching.htm

Pawn Scripting:
AttachToActor(char *PawnName, char *SlaveBone, char *MasterBone, float OffsetX, float OffsetY, float OffsetZ, float RotationX, float RotationY, float RotationZ );

Attach the Pawn actor whose szEntityName is PawnName to this Pawn’s actor. The actors are attached from the bone named SlaveBone on the attaching actor to the bone named MasterBone on this actor. The offsets are applied to the attachment point and are calculated in the direction the master actor is facing. The rotations are applied to the base rotation of the slave actor. The slave actor is initially aligned to face the same direction as the master actor, before the rotations are applied. If no rotations are applied to the slave actor via its script then it will rotate to follow the master actor’s rotation. The slave actor will move with the master actor to maintain its attachment.

DetachFromActor(char *PawnName );

If the Pawn actor whose szEntityName is PawnName is attached to this Pawn’s actor then it will be detached from the master actor.

Post Reply