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
totally clueless
Soverain Offline
Junior Member

Posts: 18
Threads: 5
Joined: Jul 2012
Reputation: 1
#1
Question  totally clueless

alright so I have one map now, how can i create another and then have that player transition to the other when the player unlocks the door?

sorry, very new to this :x
(This post was last modified: 07-29-2012, 01:17 AM by Soverain.)
07-28-2012, 11:55 PM
Find
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#2
RE: totally clueless

void ChangeMap(string& asMapName, string& asStartPos, string& asStartSound, string& asEndSound);
Immediatly loads another map.
asMapName - the file to load
asStartPos - the name of the StartPos on the next map
asStartSound - the sound that is played when the change starts
asEndSound - the sound that is played when the new map is loaded


Use this: http://wiki.frictionalgames.com/hpl2/amn..._functions and Ctrl+F

Trying is the first step to success.
07-29-2012, 12:00 AM
Find
Soverain Offline
Junior Member

Posts: 18
Threads: 5
Joined: Jul 2012
Reputation: 1
#3
RE: totally clueless

(07-29-2012, 12:00 AM)beecake Wrote: void ChangeMap(string& asMapName, string& asStartPos, string& asStartSound, string& asEndSound);
Immediatly loads another map.
asMapName - the file to load
asStartPos - the name of the StartPos on the next map
asStartSound - the sound that is played when the change starts
asEndSound - the sound that is played when the new map is loaded


Use this: http://wiki.frictionalgames.com/hpl2/amn..._functions and Ctrl+F
still don't quite understand how to use this. I only started about a day or so ago. Would this command go into the second .hps file for the second map?
(This post was last modified: 07-29-2012, 12:13 AM by Soverain.)
07-29-2012, 12:12 AM
Find
SilentStriker Offline
Posting Freak

Posts: 950
Threads: 26
Joined: Jul 2011
Reputation: 43
#4
RE: totally clueless

Nope it's supposed to be inside the map you want to change from.

Btw why don't you just use a level door?

(This post was last modified: 07-29-2012, 12:16 AM by SilentStriker.)
07-29-2012, 12:16 AM
Find
Soverain Offline
Junior Member

Posts: 18
Threads: 5
Joined: Jul 2012
Reputation: 1
#5
RE: totally clueless

(07-29-2012, 12:16 AM)SilentStriker Wrote: Nope it's supposed to be inside the map you want to change from.
So it would be like this? void ChangeMap("02.map", "newarea", "", "");

how can i script the door to activate the transition? I have the level transition door but nothing happens when click it
(This post was last modified: 07-29-2012, 12:32 AM by Soverain.)
07-29-2012, 12:24 AM
Find
Mackiiboy Offline
Member

Posts: 101
Threads: 7
Joined: Jan 2012
Reputation: 11
#6
RE: totally clueless

Basically, you do not have to script it at all. Everything can be done with the Level Editor.
Press the entitytab on your leveldoor and scroll down till' StartPos and MapFile. Write newarea in StartPos and 02.map in in the MapFilebox, and it will work.

[Image: piQTf.png]

If you want to script it, put a SetEntityPlayerInteractCallback("NameOfYourLevelDoor", "MapChangeFunc", false); inside the start function, and use this as the callback function:
void MapChangeFunc(string &in entity)
{
ChangeMap("02.map", "newarea", "", "");
}
(07-29-2012, 12:24 AM)Soverain Wrote: So it would be like this? void ChangeMap("02.map", "newarea", "", "");

how can i script the door to activate the transition? I have the level transition door but nothing happens when click it
(This post was last modified: 07-29-2012, 12:47 AM by Mackiiboy.)
07-29-2012, 12:43 AM
Website Find
Soverain Offline
Junior Member

Posts: 18
Threads: 5
Joined: Jul 2012
Reputation: 1
#7
RE: totally clueless

haha I feel a bit silly now thank you for making that clear but now when i add the script i get an error expected "," or ";"

nevermind figured it out thank you all
(This post was last modified: 07-29-2012, 01:16 AM by Soverain.)
07-29-2012, 12:58 AM
Find




Users browsing this thread: 1 Guest(s)