Frictional Games Forum (read-only)

Full Version: Rotate Prop?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hey Forum People!

Today, when I was trying to program a bookshelf moving I encountered some weird problems:

1. The bookshelf was moving instantly using this script: SetMoveObjectState("shelf_ftw",1.0f); and moving it around a joint.

But since I want it to open the other way, I set 1.0f to -1.0f and it doesn't move at all. What could be the problem?

2. How do I make the books in my bookshelf join the bookshelf when it's turning, since I can't seem to move a compound?

3. I'm trying to rotate an entity 360 degrees in the Y-axis at the same time, but I think I'm using the wrong function:
RotatePropToSpeed("My_Entity", 0.5, 0.75, 0.0, 360.0, 0.0, true, "");

How could I spin entities an other way?


All the best,
//Twitchez
1. I found out that if you look at the secret bookshelf (that is used to cover the secret stone wall) in the original amnesia map 01_old_archives they use a very simple way to move the bookshelf. So I would suggest you look there.

2. The book rows are static so they can't be moved. So you need to fill the bookshelf with the dynamic books if you want to have it filled.

3. RotatePropToSpeed maybe only works with static entities but I'm not sure since I haven't used it yet.
i suppose youd have to modify the ent file of that bookshelf, to make the joints move 180 degrees instead of 90.
Move it -90 degrees in the editor, and then spawn it in an open state. When you close the door in-game, it will look like it opens.

BUMP* Sorry for being such a novice, but how do I set it as an open state in the beginning Cranky Old Man (or anyone else?), since I'm using "SetMoveObjectState("shelf_ftw",1.0f);"
(04-29-2012, 12:33 AM)Twitchez Wrote: [ -> ]BUMP* Sorry for being such a novice, but how do I set it as an open state in the beginning Cranky Old Man (or anyone else?), since I'm using "SetMoveObjectState("shelf_ftw",1.0f);"
I imagine something like this:
Code:
OnEnter()
{
SetMoveObjectState("shelf_ftw", 1.0f); // Opening shelf on map start.
}

void LoveThyNeighbour()
{
SetMoveObjectState("shelf_ftw", 0.0f); // Closing shelf, while looking like it's opening.

}