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
Level Editor Help Adding a second level
NaxEla Offline
Senior Member

Posts: 415
Threads: 5
Joined: Dec 2012
Reputation: 28
#9
RE: Adding a second level

(04-12-2013, 04:12 AM)salsbury Wrote: Ok. Now, I do have an existing file for the first level, without any script yet. It only has


////////////////////////////
// Run when entering map
void OnEnter()
{

}

////////////////////////////
// Run when leaving map
void OnLeave()
{

}

So can I just copy this file, and then change the name of "levelname.hps" to "secondlevelname.hps"?

Yup! I suggest you also add
////////////////////////////
// Run when starting map
void OnStart()
{

}
to your script. So it looks like this:
PHP Code: (Select All)
////////////////////////////
// Run when starting map
void OnStart()
{
 
}

////////////////////////////
// Run when entering map
void OnEnter()
{
 
}
 
////////////////////////////
// Run when leaving map
void OnLeave()
{
 


Just in case you're wondering, the OnStart function will get called when the player enters the map for the first time only. OnEnter will get called every time the player enters the map, and OnLeave will get called every time the player leaves the map.

In Ruins [WIP]
04-12-2013, 04:19 AM
Find


Messages In This Thread
Adding a second level - by salsbury - 04-12-2013, 03:17 AM
RE: Adding a second level - by NaxEla - 04-12-2013, 03:52 AM
RE: Adding a second level - by Romulator - 04-12-2013, 03:58 AM
RE: Adding a second level - by salsbury - 04-12-2013, 04:04 AM
RE: Adding a second level - by Romulator - 04-12-2013, 04:09 AM
RE: Adding a second level - by salsbury - 04-12-2013, 04:12 AM
RE: Adding a second level - by NaxEla - 04-12-2013, 04:19 AM
RE: Adding a second level - by Romulator - 04-12-2013, 04:17 AM
RE: Adding a second level - by salsbury - 04-12-2013, 04:18 AM
RE: Adding a second level - by Romulator - 04-12-2013, 04:24 AM
RE: Adding a second level - by salsbury - 04-12-2013, 04:33 AM
RE: Adding a second level - by salsbury - 04-12-2013, 02:18 PM
RE: Adding a second level - by PutraenusAlivius - 04-12-2013, 02:34 PM
RE: Adding a second level - by salsbury - 04-12-2013, 02:53 PM
RE: Adding a second level - by PutraenusAlivius - 04-12-2013, 03:04 PM
RE: Adding a second level - by Romulator - 04-12-2013, 03:25 PM
RE: Adding a second level - by salsbury - 04-12-2013, 03:34 PM
RE: Adding a second level - by Romulator - 04-12-2013, 03:48 PM



Users browsing this thread: 3 Guest(s)