Facebook Twitter YouTube Frictional Games | Forum | Newsletter | Dev Blog | Dev Wiki | Support


Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Rotate Prop?
Author Message
Twitchez Offline
Member

Posts: 67
Joined: Mar 2012
Reputation: 1
Post: #1
Rotate Prop?

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
(This post was last modified: 04-21-2012 12:37 PM by Twitchez.)
04-21-2012 12:36 PM
Find all posts by this user Quote this message in a reply
SilentStriker Offline
Posting Freak

Posts: 950
Joined: Jul 2011
Reputation: 42
Post: #2
RE: Rotate Prop?

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.

04-21-2012 12:45 PM
Find all posts by this user Quote this message in a reply
Mine Turtle Offline
Senior Member

Posts: 656
Joined: Mar 2011
Reputation: 29
Post: #3
RE: Rotate Prop?

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

[Image: 201107142327000.gif]
04-21-2012 02:49 PM
Find all posts by this user Quote this message in a reply
Cranky Old Man Offline
Posting Freak

Posts: 922
Joined: Apr 2012
Reputation: 37
Post: #4
RE: Rotate Prop?

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.

Noob scripting tutorial: From Noob to Pro

04-21-2012 03:45 PM
Find all posts by this user Quote this message in a reply
Twitchez Offline
Member

Posts: 67
Joined: Mar 2012
Reputation: 1
Post: #5
RE: Rotate Prop?

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
Find all posts by this user Quote this message in a reply
Cranky Old Man Offline
Posting Freak

Posts: 922
Joined: Apr 2012
Reputation: 37
Post: #6
RE: Rotate Prop?

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

}

Noob scripting tutorial: From Noob to Pro

04-29-2012 12:59 AM
Find all posts by this user Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)