Frictional Games Forum (read-only)
Rotate Prop? - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: Rotate Prop? (/thread-14970.html)



Rotate Prop? - Twitchez - 04-21-2012

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


RE: Rotate Prop? - SilentStriker - 04-21-2012

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.



RE: Rotate Prop? - Mine Turtle - 04-21-2012

i suppose youd have to modify the ent file of that bookshelf, to make the joints move 180 degrees instead of 90.


RE: Rotate Prop? - Cranky Old Man - 04-21-2012

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.




RE: Rotate Prop? - Twitchez - 04-29-2012

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);"


RE: Rotate Prop? - Cranky Old Man - 04-29-2012

(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.

}