Frictional Games Forum (read-only)

Full Version: Basic Elevator
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4
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.
}
TeleportPlayer(string& asStartPosName);
void TeleportPlayer(string& asStartPosName);
Instantly teleports the player to the target StartPos.
(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.
No problem Smile
Will this work?


void TeleportPlayer(string& asStartPosName);
{
TeleportPlayer(StartPos2)
FadeOut(0);
}
I just copied that from the script function page on the wiki. Of course you don#t need the void.
void ButtonUpFunction(string &in entity)
{
TeleportPlayer("StartPos2")
FadeOut(0);
}


Now it will work Smile
(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
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.
Pages: 1 2 3 4