Frictional Games Forum (read-only)

Full Version: How di i load a new level?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi!

I have a question that i guess most of you are able to answer.

When i enter a door, how do i make it load the next map?

Thanks in advance.
Is it a level door? If so click on the door in editor and click to the next tab (entity) and set next map and player start area from there.
ok thanks Big Grin

I guessed it was something simple, just couldn't find it myself, thanks!
Alright, now i have a new problem. When i have put the level in the right column and the start position, when i enter the door in game, it crashes and say "Unable to load script file" and "A funstion with the same name and parameters already exist". Any clues?
Either your hps file for your next map does not exist or you have structured it wrong.
(10-09-2011, 05:21 AM)Tanshaydar Wrote: [ -> ]Either your hps file for your next map does not exist or you have structured it wrong.
Yes what he said. It may be most likely because you dont have a .hps file for your next map. Every map needs to have a .hps file

Here's what a basic/new .hps should have:


////////////////////////////
// Run first time starting map
void OnStart()
{

}

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

}

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

}
(10-09-2011, 05:19 AM)lolopon Wrote: [ -> ]Alright, now i have a new problem. When i have put the level in the right column and the start position, when i enter the door in game, it crashes and say "Unable to load script file" and "A funstion with the same name and parameters already exist". Any clues?

You have at least two functions that start the same. For example:

Code:
void Function1()
{}

void Function1()
{}

There can only be one.

(10-09-2011, 05:53 AM)Xvideogamer720X Wrote: [ -> ]Every map needs to have a .hps file

Actually, you only need one if you want scripting.
I have the .hps file for the next map, i'll take a look and se if i messed it up some where.

How stupid of me, i had copied a function to have a similar one, but forgot to re-write it, so i had 2 "collidescript_1". Anyways, thanks for the help! And im hoping i will start to understand this scripting better soon.
(10-09-2011, 07:42 AM)Your Computer Wrote: [ -> ]
(10-09-2011, 05:53 AM)Xvideogamer720X Wrote: [ -> ]Every map needs to have a .hps file

Actually, you only need one if you want scripting.
Really? Huh, when I try to load a map without .hps file, it doesnt work....eh oh well :p i ALWAYS need .hps