Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Basic Elevator
MaZiCUT Offline
Senior Member

Posts: 536
Threads: 31
Joined: Jun 2012
Reputation: 17
#1
Basic Elevator

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

Hi.
(This post was last modified: 06-23-2012, 09:16 PM by MaZiCUT.)
06-23-2012, 07:40 PM
Website Find
Unearthlybrutal Offline
Posting Freak

Posts: 775
Threads: 12
Joined: May 2011
Reputation: 26
#2
RE: Basic Elevator

TeleportPlayer(string& asStartPosName);

When Life No Longer Exists
Full-conversion mod
06-23-2012, 07:51 PM
Website Find
Cruzore Offline
Senior Member

Posts: 301
Threads: 2
Joined: Jun 2012
Reputation: 37
#3
RE: Basic Elevator

void TeleportPlayer(string& asStartPosName);
Instantly teleports the player to the target StartPos.
06-23-2012, 07:51 PM
Find
MaZiCUT Offline
Senior Member

Posts: 536
Threads: 31
Joined: Jun 2012
Reputation: 17
#4
RE: Basic Elevator

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

Hi.
(This post was last modified: 06-23-2012, 07:54 PM by MaZiCUT.)
06-23-2012, 07:53 PM
Website Find
Unearthlybrutal Offline
Posting Freak

Posts: 775
Threads: 12
Joined: May 2011
Reputation: 26
#5
RE: Basic Elevator

No problem Smile

When Life No Longer Exists
Full-conversion mod
06-23-2012, 07:56 PM
Website Find
MaZiCUT Offline
Senior Member

Posts: 536
Threads: 31
Joined: Jun 2012
Reputation: 17
#6
RE: Basic Elevator

Will this work?


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

Hi.
06-23-2012, 07:56 PM
Website Find
Cruzore Offline
Senior Member

Posts: 301
Threads: 2
Joined: Jun 2012
Reputation: 37
#7
RE: Basic Elevator

I just copied that from the script function page on the wiki. Of course you don#t need the void.
06-23-2012, 07:56 PM
Find
Unearthlybrutal Offline
Posting Freak

Posts: 775
Threads: 12
Joined: May 2011
Reputation: 26
#8
RE: Basic Elevator

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


Now it will work Smile

When Life No Longer Exists
Full-conversion mod
(This post was last modified: 06-23-2012, 07:57 PM by Unearthlybrutal.)
06-23-2012, 07:57 PM
Website Find
MaZiCUT Offline
Senior Member

Posts: 536
Threads: 31
Joined: Jun 2012
Reputation: 17
#9
RE: Basic Elevator

(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

Hi.
06-23-2012, 07:57 PM
Website Find
Cruzore Offline
Senior Member

Posts: 301
Threads: 2
Joined: Jun 2012
Reputation: 37
#10
RE: Basic Elevator

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.
(This post was last modified: 06-23-2012, 08:00 PM by Cruzore.)
06-23-2012, 07:59 PM
Find




Users browsing this thread: 1 Guest(s)