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

Pages: 1 2 3 4


Basic Elevator - MaZiCUT - 06-23-2012

So basicly i'm trying to create an elevator, the elevator has two buttons: The button below says a message when you click it, I've taken care of that. The Second button above it is the button that will take you to an above level, on the same map. I don't need the elevator to move or something, i just want the player to fade out: load another position on the map wich would be in a second elevator as if it just had went up, and when he fades out i want to make a sort of elevator sound but i guess i can fix that easly too, I just don't know how to achieve the player swapping position.

Could you possibly use the ChangeMap function and just write the same map you're on, but a different position? Or would that cause a loading screen?

I click on the button: PlayerInteractCallBack: ButtonUpFunction


void ButtonUpFunction(string &in entity)
{
FadeOut(0);
now i need him to change position, please read the whole post.
}


RE: Basic Elevator - Unearthlybrutal - 06-23-2012

TeleportPlayer(string& asStartPosName);


RE: Basic Elevator - Cruzore - 06-23-2012

void TeleportPlayer(string& asStartPosName);
Instantly teleports the player to the target StartPos.


RE: Basic Elevator - MaZiCUT - 06-23-2012

(06-23-2012, 07:51 PM)Unearthlybrutal Wrote: TeleportPlayer(string& asStartPosName);
Thanks

(06-23-2012, 07:51 PM)FastHunteR Wrote: void TeleportPlayer(string& asStartPosName);
Instantly teleports the player to the target StartPos.
No i don't need a void.. i need the script inside a function, anyways the guy above you helped me out with this.


RE: Basic Elevator - Unearthlybrutal - 06-23-2012

No problem Smile


RE: Basic Elevator - MaZiCUT - 06-23-2012

Will this work?


void TeleportPlayer(string& asStartPosName);
{
TeleportPlayer(StartPos2)
FadeOut(0);
}


RE: Basic Elevator - Cruzore - 06-23-2012

I just copied that from the script function page on the wiki. Of course you don#t need the void.


RE: Basic Elevator - Unearthlybrutal - 06-23-2012

void ButtonUpFunction(string &in entity)
{
TeleportPlayer("StartPos2")
FadeOut(0);
}


Now it will work Smile


RE: Basic Elevator - MaZiCUT - 06-23-2012

(06-23-2012, 07:57 PM)Unearthlybrutal Wrote: void TeleportPlayer(string& asStartPosName);
{
TeleportPlayer("StartPos2")
FadeOut(0);
}


Now it will work Smile
Thanks, and the player fades out instantly right? if you set it to 0


RE: Basic Elevator - Cruzore - 06-23-2012

Don't think so. Using the example from above:
void ButtonUpFunction(string &in entity)
{
FadeOut(0);
TeleportPlayer("StartPos2")
}

Damn, you're too fast for me. And yes, he instantly fades out.