#Is it possible to switch to new map using trigger_changelevel entity?

1 messages · Page 1 of 1 (latest)

river jetty
#

Hi, currently I am having 2 maps: first_map and second_map. I want to load second_map when the player controlled hero enter a trigger block. However it does not seems to work. I have already added a landmark and refer it to the trigger_changelevel entity.

Is there a proper way to achieve this. Thanks!!!

hard gale
#

no, dota doesn't really support map changing, especially with trigger_changelevel (this is a legacy triger entity from source 1 which doesn't work in Dota 2).

vocal iris
#

It's also possible to load a map with DOTA_SpawnMapAtPosition, but I think it's not possible to unload maps.
It was probably used in aghanim's labyrinth...

river jetty
#

Hmm.. Its quite sad as I am planning to achieve kind of player go into a house or something. But thanks for confirmning it is not working, I will try with SpawnMapAtPosition.

outer osprey
hard gale
#

also spawnmap functions only work on places that have plain gridnav data (ie. no hieght differences, etc.)

vocal iris
#

If DOTA_SpawnMapAtPosition and UnloadSpawnGroupByHandle works, you can use an empty map as a base.

hard gale
#

and the load/unload functions are very finnicky

outer osprey
#

Dude im literally creating a dungeon crawler, and yeah, those functions are shiet, Im unloading/loading maps but the first time I load a map, it's gridnav is baked in permanently. Following loaded maps uses the first gridnav ever invoked

#

is it possible to overcome this? or am I just doomed?

vocal iris
outer osprey
#

Well, one thing they do differently is they spawn every new map at different locations. That solves the issue of the first gridnav being present on every map, but it doesn't solve the problem of future maps not having gridnav 😦

karmic solstice
outer osprey
outer osprey
#

Yeah, GetGroundPosition doesn't work on new maps

hard gale
hard gale
river jetty
#

Well, seems like we will have to wait for Valve to update the engine and the documentation in the future for this feature to work seamlessly 😆 .

hard gale
#

good luck with thatdfjoy