child entity not getting found??
Blitz3D Forums/Blitz3D Programming/child entity not getting found??
| ||
hey, i was wondering if you guys could take a look over my code and if you saw anything i didnt. I've been looking at it but i just cant see what's wrong with it. thanks alot. the code is code for making an object and then spinning round a child object but it keeps returing 0 for the child object. please give me any insight you might have. thanks this is the code for the object definition ;our money definitions ;copy the floor tile to create the money tile MoneyTile = CopyEntity(FloorTile) ;create the money MoneyMesh = LoadMesh("Media\money.3ds") ;raise the mesh to that it hovers slighly above the tile PositionEntity MoneyMesh,0.0,0.7,0.0 ;parent the mesh to the tile EntityParent MoneyMesh,MoneyTile ;hide the entity HideEntity MoneyTile this is my code for creating the object ;free the current mesh FreeEntity CurrentEntity\hMesh ;Copy the ground tile mesh CurrentEntity\hMesh = CopyEntity(MoneyTile) ;set the type to be a moneytile CurrentEntity\ID = BS_MONEY ;Set the y Offset CurrentEntity\OffsetNeeded = 0.1 and here is where we rotate the mesh Function UpdateMoney() For e.Entity = Each Entity If e\ID = BS_MONEY TempMoneyMesh = FindChild(e\hMesh,1) EntityRotation = EntityYaw(TempMoneyMesh) RotateEntity TempMoneyMesh,0,EntityRotation+3,0 Next EndIf Next End Function i would really appreciate any help anyone can give me with this [edit] oops... that wasnt meant to come out like that :S.. sorry about that... i hope its fixed now. [/edit] |
| ||
Congratulations on an incredibly wide thread... its about 5 screens wide here... |
| ||
nm figured it out myself |