#Is it possible to switch to new map using trigger_changelevel entity?
1 messages · Page 1 of 1 (latest)
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).
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...
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.
Isn't there a UnloadSpawnGroupByHandle function you can use for that?
I think what the OP was asking is if it's possible to load an entirely new map, which is not possible (anymore)
also spawnmap functions only work on places that have plain gridnav data (ie. no hieght differences, etc.)
If DOTA_SpawnMapAtPosition and UnloadSpawnGroupByHandle works, you can use an empty map as a base.
and the load/unload functions are very finnicky
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?
The aghanim's labyrinth did it in some way...
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 😦
What do you mean future maps not having gridnav?
Ive done dynamic map spawns and it worked fine.
Unloading maps is not feasible unless the map youre replacing it with has the same gridnav layout, but spawning new maps should be fine.
Maybe it is not gridnav, but there is defenitely something missing. I do movement differently in my game (WASD), and collisions are handled correctly on the first map I spawn, but not on the consecutive ones
Yeah, GetGroundPosition doesn't work on new maps
I know that feel, I've tried all the tricks for making a dungeon crawler feasible
unfortunately not
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 😆 .
good luck with that