Map loading problem - Not spawning where I expect Created 2 weeks ago2021-04-04 07:43:11 UTC by koshie koshie

Created 2 weeks ago2021-04-04 07:43:11 UTC by koshie koshie

Posted 2 weeks ago2021-04-04 07:43:11 UTC Post #345501
Hello everyone.

First things first: English isn't my mother tongue so I'm sorry if it's not very good.

Using J.A.C.K Hammer Editor, Steam edition, for GoldSRC.
I have two maps, let's say Map 1 and Map 2. In both maps I have a trigger_changelevel (Map 1: test_changelevel1; Map 2: test_changelevel2) which are a simple AAATrigger block enabled when I walk on it, which are working (going in load the other expected map). Both map have an info_landmark (same name, landmark).

So in both map, the trigger_changelevel are working, but my problem is where I do spawn:

Map 1 => Map 2: It works very well, I load the map and I can move.

Map 2 => Map 1: Sadly, it doesn't works as expected. If I go this way I'm stuck in Map 1 into the floor or a wall or the ceilling. No matter how I move the info_landmark.

I tried to tweak this problem by making the landmark coordinate on both map @0,0,0 but it doesn't seems to work very well, still stuck.

I started to think the coordinate of the info_landmark wasn't important and I did a simple test: on Map 1 I move a bit the info_landmark just to see where I would be teleported from Map 2 to Map 1, but it creates another problem: now from Map 1 to Map 2 I'm stuck in a wall, even if I didn't moved the info_landmark on Map 2, only on Map 1.

I tried to understand by reading these: But sadly I'm still stuck at some point, literally.

Any ideas regarding this problem ?

Regards,
Me
Posted 2 weeks ago2021-04-04 15:45:05 UTC Post #345504
It's about relative positioning, not absolute coordinates. Info_landmarks act as anchor points. When a level transition occurs, entities are repositioned in such a way that their relative position towards the info_landmark in the new map is the same as their relative position towards the info_landmark in the old map.

Imagine a level transition that takes place in a corner with a vending machine in the middle. To a player, it looks like there's just one corner and one vending machine, but in reality, both maps contain their own corner and their own vending machine. Of course, the illusion only works if both corners look the same and if both vending machines are in the same relative spot in each map. Now when a level-designer sees both maps, they can easily tell how the maps are connected, because those vending machines are so recognizable (they're 'landmarks'). That's pretty much how the game looks at info_landmarks.

If you still can't get it to work, then maybe you can upload both maps to the vault here so I or someone else can have a look.
Posted 2 weeks ago2021-04-05 05:21:06 UTC Post #345508
Hello and thanks for your time.

Your answer plus someone else on the TWHL Discord help me to understand what was wrong, indeed it was this relative position problem. I get all that wrong from the beginning.

I have now something that allow me to go from one map to another with almost no problem. I'll work on that on my side.

TWHL saved my ass again !

This topic can be closed.
You must be logged in to post a response.