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


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Rotate Prop?
Twitchez Offline
Member

Posts: 67
Threads: 17
Joined: Mar 2012
Reputation: 1
#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
SilentStriker Offline
Posting Freak

Posts: 950
Threads: 26
Joined: Jul 2011
Reputation: 43
#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
Mine Turtle Offline
Senior Member

Posts: 647
Threads: 32
Joined: Mar 2011
Reputation: 29
#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
Cranky Old Man Offline
Posting Freak

Posts: 986
Threads: 20
Joined: Apr 2012
Reputation: 38
#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
Twitchez Offline
Member

Posts: 67
Threads: 17
Joined: Mar 2012
Reputation: 1
#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
Cranky Old Man Offline
Posting Freak

Posts: 986
Threads: 20
Joined: Apr 2012
Reputation: 38
#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




Users browsing this thread: 1 Guest(s)