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
How do I use void ChangeMap? [SOLVED]
Melvin Offline
Member

Posts: 245
Threads: 38
Joined: Jun 2012
Reputation: 5
#3
RE: How do I use void ChangeMap?

(08-07-2012, 03:05 AM)andyrockin123 Wrote: That is very possible! Use an entity collide callback with the name of the area, then inside the function, use the change map command. If done properly, it should look something like this:

void OnStart()
{
AddEntityCollideCallback("Player", "NAME_OF_AREA", "FUNC", 1, true);
}

void FUNC(string &in asParent, string &in asChild, int alState)
{
ChangeMap("NAME_OF_MAP.map", "NAME_OF_PLAYER_START_AREA", "", "");
}

Hope that helped.
So now I've got this

void OnStart()
{
AddEntityCollideCallback("Player", "PlayerSleep", "OnStart", 1, true);
}

void OnStart(string &in asParent, string &in asChild, int alState)
{
ChangeMap("Floor_2_Night.map", "SpawnAfterTeleport", "", "");
}


I've started understanding this scripting bussiness today so I'm still a little noobie, sorry for that.

But I'm not sure what function I should use? I know the OnStart or OnEnter are functions, but I don't know which one I'm supposed to pick!

This is the scenario

Two maps, Floor_2_Day (starts here) and Floor_2_Night. The player walks to his room and goes to his bed, the next map loads, and its night.

[Image: 25F7U37.png]
(This post was last modified: 08-07-2012, 03:18 AM by Melvin.)
08-07-2012, 03:17 AM
Website Find


Messages In This Thread
How do I use void ChangeMap? [SOLVED] - by Melvin - 08-07-2012, 02:59 AM
RE: How do I use void ChangeMap? - by Adny - 08-07-2012, 03:05 AM
RE: How do I use void ChangeMap? - by Melvin - 08-07-2012, 03:17 AM
RE: How do I use void ChangeMap? - by Melvin - 08-07-2012, 03:38 AM
RE: How do I use void ChangeMap? - by Adny - 08-07-2012, 03:41 AM
RE: How do I use void ChangeMap? - by Melvin - 08-07-2012, 03:49 AM



Users browsing this thread: 1 Guest(s)