Scripts / script for moving with lift

Author
Message
Scanman
2
Years of Service
User Offline
Joined: 8th Dec 2019
Playing: Total War Saga: Troy, Amytric Pulse
Posted: 28th Nov 2020 16:53 Edited at: 28th Nov 2020 17:08
Hi there,

Need some advice about attaching player( or any other objects) to another moving object.
First of all some story what i want.

My first level take place in mountaineous area. I do not know what place on planet it will be exactly, but i would like two versions: Belukha Mountain in Altay Mountains or Khan Tengri Mountain in Tian Shan mountains. Nevertheless, while searching internet I've found magnificent floating mountains in China and this style is my new level's background for the first level. Then, I've met the following video and got an idea to repeat such cool lift.



And finally I've done it. It looks very funny.



And now I want to repeat a lift(something like lift), which can move along X axis, but not only Y axis. But script of respected Dagored, which i bought with lift on the store uses MoveUp function. Logically for something like trains in the very beginning of Half Life 1 or 2, when player can move inside moving object, we need function like MoveForward for lift. But I guess it will not help, because object inside moving object is not attached to it and not move together.

What i want exactly is to create something like cable road in the following video.


I've found some useful boat script in AmenMoses's script list, but it is not like in HalfLife. Is it possible to attach object to "object movement" without freezing at one point relatively to moving object? Or may be some ideas what to do in this situation?
PM
smallg
Community Leader
16
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 28th Nov 2020 17:48 Edited at: 28th Nov 2020 18:13
basic idea is however much you move the lift by you also move the objects on it by the same.
i.e.

note that it is also important to keep the player from leaving the lift early or have a way to check so you can stop moving the player etc
but this requires you to know the exact path movement or is only useful for linear movement.. if you want to add rotation and such it gets much more complicated and you will need to use amen's utillib.lua functions to keep the objects in the correct place
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11

Login to post a reply

Server time is: 2022-01-28 05:34:09
Your offset time is: 2022-01-28 05:34:09