- Swaps a map model with another map model
- 03B6: replace_model_at [flt1] [flt2] [flt3] radius [flt4] from [int1] to [int2]
- Z-coordinate (or ≤-100.0 for ground z)
- Model index number to swap from as defined in the IDE file; also acceptable is model's DFF name with a hash character
- Model index number to swap to as defined in the IDE file; also acceptable is model's DFF name with a hash character
This opcode swaps a map model with another map model nearest to the center of the search area. The collision model and time property (TOBJ) of the model to swap to are also swapped with the model to swap from. The position and rotation of the model to swap from are preserved. Take note on not forgetting about its LOD model. Attempting to swap from a breakable object yields no effect and swapping to a breaking object does not preserve its ability to break. Objects placed onto the world through the script, like through opcode 0107, cannot be swapped.
Data of the swapped model is saved in block 0 of the save file in GTA III, block 0 in Vice City, and block 1 in San Andreas, as long as the model is swapped; if the model is swapped back to the original model, the game no longer save that information. The game can swap and save a maximum of 25 map models.
replace, model, swap, building, map, nearest, closest