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
Script Help Changing the direction of crushing walls?
Slanderous Offline
Posting Freak

Posts: 1,606
Threads: 78
Joined: Dec 2012
Reputation: 63
#1
Changing the direction of crushing walls?

I'm in the process of creating an event where player is trapped within walls, which move. If he stays in the room for too long, and doesn't figure out how to escape, the walls eventually crush him, insta-killing him. I haven't however been able to think on how to actually move the walls towards the player. In Justine, a
PHP Code: (Select All)
void SetMoveObjectStateExt(stringasNamefloat afStatefloat afAccfloat afMaxSpeedfloat afSlowdownDistbool abResetSpeed); 
function is used, though there's no such thing as X, Y or Z axis in this func as far as I see, unlike in the function used to rotate assets.

So my question is how do I force the walls to move towards the player?

To illustrate my problem I'm leaving a screenshot below.

Spoiler below!
[Image: 1e1b2e0a2be343e1ab93666a09b1ef75.png]
(This post was last modified: 05-25-2016, 10:55 PM by Slanderous.)
05-25-2016, 10:49 PM
Find
Daemian Offline
Posting Freak

Posts: 1,129
Threads: 42
Joined: Dec 2012
Reputation: 49
#2
RE: Changing the direction of crushing walls?

Model editor, there you can choose how the entity will move. Direction, speed, acceleration.
Then you move it using SetMoveObjectStateExt, SetMoveObjectState.
And if I remember correctly, the entity starts in state 0 and you can order it to switch to 1, -1 or anything between.

05-26-2016, 03:34 AM
Find
Slanderous Offline
Posting Freak

Posts: 1,606
Threads: 78
Joined: Dec 2012
Reputation: 63
#3
RE: Changing the direction of crushing walls?

(05-26-2016, 03:34 AM)Daemian Wrote: Model editor, there you can choose how the entity will move. Direction, speed, acceleration.
Then you move it using SetMoveObjectStateExt, SetMoveObjectState.
And if I remember correctly, the entity starts in state 0 and you can order it to switch to 1, -1 or anything between.

Thank you, sir. I'm gonna take a look at it when I can.
05-26-2016, 11:41 AM
Find




Users browsing this thread: 1 Guest(s)