Frictional Games Forum (read-only)
Elevator - 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: Elevator (/thread-16921.html)



Elevator - ApeCake - 07-12-2012

I can't seem to get my elevator to work. I looked at the elevator.hps from The Dark Descent but the only "worthwhile" thing I could find was SetMoveObjectStateExt("elevator_1", 1, 2, 1.0f, 0.2f, true);. So, this is my script.


void OnStart()
{
SetMoveObjectStateExt("elevator_1", 1, 2, 1.0f, 0.2f, true);
SetMoveObjectStateExt("elevator_lever_1", 1, 2, 1.0f, 0.2f, true);
SetMoveObjectStateExt("elevator_lamp_1", 1, 2, 1.0f, 0.2f, true);
}

It doesn't seem to work; I do not get any errors or anything, just when I am in the game the elevator does not move at all. What did I do wrong and how can I fix this? Please note, I only want the elevator moving. I am currently not interested in particle effects, sounds and all that stuff.

Also note, the "how-to-create-an-elevator" page on the wiki isn't really that useful. For me atleast.


RE: Elevator - SilentStriker - 07-12-2012

If you have added the elevator box in static objects it wont work since it's static. You need to make it an entity to be able to move it


RE: Elevator - ApeCake - 07-12-2012

Seems logical enough; too bad that I absolutely suck at anything outside the level editor and basic scripting. That's gonna be a fade-out fade-in elevator for my map. Unless somebody already created a elevator entity? I can use the elevator wall used in the main game, but I do not really like that one.


RE: Elevator - SilentStriker - 07-12-2012

Well just open the model editor and file::Import Mesh and find the elevator then settings::User Defined Variables and change to static::Object then save it as a new entity just don't name it same as the original elevator


RE: Elevator - Steve - 07-13-2012

I dont know if this is any help but there is an tutorial for elevators on the wiki
http://wiki.frictionalgames.com/hpl2/tutorials/scripting/elevator_tutorial
Sadly I don't know anything for the texture thingy


RE: Elevator - Adny - 07-13-2012

The elevator is a lie! The actual elevator doesn't move doesn't move, but the wall next to it does. Only static entities can be affected by the function you named. You can place the entity elevator wall next to the static elevator, and use the move function on the wall.'

Look at the script for the elevator one more time and it should make more sense.