Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 1 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script Help Rotating Bookshelf, Goblets move with it, but not books?
Ermu Offline
Member

Posts: 86
Threads: 13
Joined: Jan 2012
Reputation: 2
#2
RE: Rotating Bookshelf, Goblets move with it, but not books?

Are the books entities or static_objects?

If they're static_objects, i don't think there's anything to do, except to remove them.

If they're entities, try this:
AddAttachedPropToProp(string& asPropName, string& asAttachName, string& asAttachFile, float afPosX, float afPosY, float afPosZ, float afRotX, float afRotY, float afRotZ);


Attaches a prop to another prop.
asPropName - the prop to attach another prop at
asAttachName - internal name of the prop that gets attached
asAttachFile - the prop that gets attached extension .ent
afPosX - X position of the attach from the prop
afPosY - Y position of the attach from the prop
afPosZ - Z position of the attach from the prop
afRotX - rotation around X axis of the attach
afRotY - rotation around Y axis of the attach
afRotZ - rotation around ZX axis of the attach
Note: for the purposes of “AddEntityCollideCallback”, attached props will not call the callback function if they collide with a “static_object” or a “StaticProp” entity type!
Bug: afRotZ is used for both the ZX rotation and the Z position of the attached prop. Unwanted rotation can be avoided by using:
AddAttachedPropToProp(asPropName,asAttachName,asAttachFile,afPosX,afPosY,0,afPosZ,90.0f,afPosZ)
Bug: Attaching a breakable prop to a physically active prop, and then breaking the attached prop, will cause the game to crash should the parent object be moved or reset.






I personally don't have really much experience on this, so i have no idea if that will work. Hope someone else has.
06-11-2012, 04:46 PM
Find


Messages In This Thread
RE: Rotating Bookshelf, Goblets move with it, but not books? - by Ermu - 06-11-2012, 04:46 PM



Users browsing this thread: 1 Guest(s)