Frictional Games Forum (read-only)
[SCRIPT] Changing the direction of crushing walls? - 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: [SCRIPT] Changing the direction of crushing walls? (/thread-48134.html)



Changing the direction of crushing walls? - Slanderous - 05-25-2016

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:
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]



RE: Changing the direction of crushing walls? - Daemian - 05-26-2016

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.


RE: Changing the direction of crushing walls? - Slanderous - 05-26-2016

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