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
When player enters script area then load next level?
Cetex1337 Offline
Junior Member

Posts: 21
Threads: 7
Joined: Jun 2012
Reputation: 0
#1
When player enters script area then load next level?

Does anyone know what the script is so that if the player enters a specific area then it loads next level / room? And that it should work just as a door (that loads the other level / room)

Please reply ASAP.
06-20-2012, 07:16 PM
Find
Adny Offline
Posting Freak

Posts: 1,766
Threads: 6
Joined: Mar 2012
Reputation: 173
#2
RE: When player enters script area then load next level?

TeleportPlayer(string& asStartPosName);


can be used to teleport the player to another area of the same level they're in.

ChangeMap(string& asMapName, string& asStartPos, string& asStartSound, string& asEndSound);


can be used to start a new level.

I rate it 3 memes.
06-20-2012, 07:18 PM
Find
Traggey Offline
is mildly amused

Posts: 3,257
Threads: 74
Joined: Feb 2012
Reputation: 185
#3
RE: When player enters script area then load next level?

You can't honestly go telling people to reply ASAP to your questions when you're not even posting them in the right section of the forum.

Moved.
06-20-2012, 07:21 PM
Find
JMFStorm Offline
Member

Posts: 205
Threads: 8
Joined: Aug 2011
Reputation: 28
#4
RE: When player enters script area then load next level?

(06-20-2012, 07:21 PM)Traggey Wrote: You can't honestly go telling people to reply ASAP to your questions when you're not even posting them in the right section of the forum.

Moved.

You can't blame a newbie ^^

06-20-2012, 07:26 PM
Find
Cetex1337 Offline
Junior Member

Posts: 21
Threads: 7
Joined: Jun 2012
Reputation: 0
#5
RE: When player enters script area then load next level?

What should i do after with:


-void ChangeMap(string& asMapName, string& asStartPos, string& asStartSound, string& asEndSound);
-{
-
-}

??

Any help?
(This post was last modified: 06-20-2012, 07:43 PM by Cetex1337.)
06-20-2012, 07:27 PM
Find
Cruzore Offline
Senior Member

Posts: 301
Threads: 2
Joined: Jun 2012
Reputation: 37
#6
RE: When player enters script area then load next level?

no, just fill the spaces.
Changemap("yourmapname.map", "Yourstartpos", "", "");
use a collide callback for the area and yourself, and add a custom function, where the changemap function is inside.
06-20-2012, 07:45 PM
Find
Chronogyros Offline
Junior Member

Posts: 43
Threads: 9
Joined: Oct 2011
Reputation: 2
#7
RE: When player enters script area then load next level?

(06-20-2012, 07:16 PM)Cetex1337 Wrote: Does anyone know what the script is so that if the player enters a specific area then it loads next level / room? And that it should work just as a door (that loads the other level / room)

Please reply ASAP.
AddEntityCollideCallback("Player", "SCRIPTAREA", "FUNCTION", true, 1);





void FUNCTION(string &in asParent, string &in asChild, int alState)
{
ChangeMap("YOURMAP.map", "PlayerStartArea_1", "", "");
}

Emma's Story Part II 100% Complete
06-20-2012, 07:55 PM
Find
Cetex1337 Offline
Junior Member

Posts: 21
Threads: 7
Joined: Jun 2012
Reputation: 0
#8
RE: When player enters script area then load next level?

(06-20-2012, 07:55 PM)Chronogyros Wrote:
(06-20-2012, 07:16 PM)Cetex1337 Wrote: Does anyone know what the script is so that if the player enters a specific area then it loads next level / room? And that it should work just as a door (that loads the other level / room)

Please reply ASAP.
AddEntityCollideCallback("Player", "SCRIPTAREA", "FUNCTION", true, 1);





void FUNCTION(string &in asParent, string &in asChild, int alState)
{
ChangeMap("YOURMAP.map", "PlayerStartArea_1", "", "");
}
Thank you so much, now i understand Smile
06-21-2012, 12:15 PM
Find




Users browsing this thread: 1 Guest(s)