Dynamic Warp - Pawkkie/Team-Aquas-Asset-Repo GitHub Wiki
BendIt, written for pokeemerald-expansion 1.7.4
Dynamic Warp Editing
In Vanilla, Dynamic Warps are not used often. They are used to choose where the truck will drop you at the start of the game based on your gender for example.
Creating a Dynamic Warp
If you use Porymap, you need to create a regular Warp, then to set its Destination map to Dynamic, and the Destination Warp to WARP_ID_DYNAMIC.
If you want to write it in code, you need to set up a regular Warp, with its dest_map set as "MAP_DYNAMIC" and its dest_map_id as "WARP_ID_DYNAMIC".
Note : DynamicWarp is a hidden info that affects the player, not the warp. It essentially tells the game what place to warp the player to every time they walks on a warp with MAP_DYNAMIC. This means that setdynamicwarp must be placed in places where the players cannot miss them, else they might not be warped where you want them to (i.e to the place that was set the last time they encountered setdynamicwarp).
Note2 : there seems to be cases where if a player arrives to a dynamic warp through a regular warp, then uses said dynamic warp without setting a dynamic warp destination first, the previous regular warp becomes the new MAP_DYNAMIC destination? Not sure about it though, so further testing would be required. So moral of the story : place your setdynamicwarps smartly to avoid headaches!
Editing the destination
To edit the destination of a dynamic warp, you need to use setdynamicwarp, followed by the destination map, and then the coordinates of the tile you want to be warped to.
Note : there should be a way to use another warp as a destination for setdynamicwarp instead of coordinates, but I haven't found how, so if anobody knows, feel free to add to this.