Venom Fox
Junior Member
Posts: 32
Threads: 9
Joined: Mar 2016
Reputation:
0
|
Map change problems
Soo, I basically have two maps. 01_home99.hpm and 02_hospital.hpm
In the first map, there's a level door (exit_apartment) that leads to the second map.
And I have a PlayerStartArea in the second map. But when I use the door in the first map, I manage to get into the second map BUT everything is black. I can run around, though.
If I then press F5 (I'm in the dev mode) I spawn in the correct place. Anyone else having this problem? How do I fix this? :O I'm desperate!!!
(This post was last modified: 03-10-2016, 07:21 PM by Venom Fox.)
|
|
03-10-2016, 07:19 PM |
|
Abion47
Senior Member
Posts: 369
Threads: 22
Joined: Oct 2015
Reputation:
46
|
RE: Map change problems
Do you have any light sources in the second map?
|
|
03-10-2016, 11:05 PM |
|
Guest
Unregistered
|
RE: Map change problems
(03-10-2016, 11:05 PM)Abion47 Wrote: Do you have any light sources in the second map?
I do, lot of light sources actually
|
|
03-11-2016, 06:48 AM |
|
Romulator
Not Tech Support ;-)
Posts: 3,628
Threads: 63
Joined: Jan 2013
Reputation:
195
|
RE: Map change problems
Check your second map for a map.cache file and delete that, then go to that level through normal play.
Discord: Romulator#0001
(This post was last modified: 03-11-2016, 08:53 AM by Romulator.)
|
|
03-11-2016, 08:52 AM |
|
Venom Fox
Junior Member
Posts: 32
Threads: 9
Joined: Mar 2016
Reputation:
0
|
RE: Map change problems
(03-11-2016, 08:52 AM)Romulator Wrote: Check your second map for a map.cache file and delete that, then go to that level through normal play.
Did that, still doesn't work :C
Have you had this problem?
Also, could this have anything to do with the fact that I've put my maps like this : maps/mapname/mapname.hpm instead of just smashing all the files in the maps folder?
(yeah I've put it like this in the level editor under the mapfile box, 02_hospital/02_hospital.hpm)
Edit : Also, if I add a leveldoor to the second map and make it lead to the first map, the same problem occurs.
(This post was last modified: 03-11-2016, 03:19 PM by Venom Fox.)
|
|
03-11-2016, 03:03 PM |
|
Romulator
Not Tech Support ;-)
Posts: 3,628
Threads: 63
Joined: Jan 2013
Reputation:
195
|
RE: Map change problems
In terms of the Level Editor, what happens when you do remove the folder prefix? Try that, then after, try what I mentioned below :3
------
Well, in SOMA personally, I haven't done a map change before. SOMA tries to ease the load of coming maps by preloading them. Have you specified an area say, approximately a minute before the map change where you call the Map_Preload() code block? If not, try creating a trigger area around that position, and when the player collides with it, call the Map_Preload() code.
void Map_Preload(const tString &in asMapName, eWorldStreamPriority aPrio=eWorldStreamPriority_Normal);
Contextually, you would use this:
void Map_Preload("02_hospital.hpm");
And there's no problems with your folder structure. SOMA is pretty clever with locating maps, and in general, is a lot more organised than having one folder with every map. Frictional Games followed the same approach with their maps in the base game.
Discord: Romulator#0001
(This post was last modified: 03-12-2016, 02:47 AM by Romulator.)
|
|
03-12-2016, 02:12 AM |
|
Venom Fox
Junior Member
Posts: 32
Threads: 9
Joined: Mar 2016
Reputation:
0
|
RE: Map change problems
(03-12-2016, 02:12 AM)Romulator Wrote: In terms of the Level Editor, what happens when you do remove the folder prefix? Try that, then after, try what I mentioned below :3
------
Well, in SOMA personally, I haven't done a map change before. SOMA tries to ease the load of coming maps by preloading them. Have you specified an area say, approximately a minute before the map change where you call the Map_Preload() code block? If not, try creating a trigger area around that position, and when the player collides with it, call the Map_Preload() code.
void Map_Preload(const tString &in asMapName, eWorldStreamPriority aPrio=eWorldStreamPriority_Normal);
Contextually, you would use this:
void Map_Preload("02_hospital.hpm");
And there's no problems with your folder structure. SOMA is pretty clever with locating maps, and in general, is a lot more organised than having one folder with every map. Frictional Games followed the same approach with their maps in the base game.
Those were some really cool tips, thanks! .. But I'm afraid they didn't work :S
HOWEVER, I put a triggerarea in front of the leveldoor and used PlayerInteractCallBack to change the level, which suprisingly worked! (Still looks a bit clumsy, though, but better than nothing!) But thanks anyways, now I can continue working on my mod until a next major problem shows up!
|
|
03-12-2016, 12:41 PM |
|
|