Difference between revisions of "03B6"
(Created page with "<div class="thumb tright"><div class="thumbinner" style="width:304px;"> {| cellspacing="0" |- | class="thumbimage" | 300px |- | class="thumbimage" | [...") |
m |
||
Line 21: | Line 21: | ||
:: Y-coordinate | :: Y-coordinate | ||
: [''flt3''] | : [''flt3''] | ||
− | :: Z-coordinate | + | :: Z-coordinate (or ''-100.0'' for [[02CE|ground z]]) |
: [''flt4''] | : [''flt4''] | ||
:: Radius | :: Radius | ||
Line 29: | Line 29: | ||
:: Model ID number to swap to as defined in the IDE file; also acceptable is model's DFF name with a hash character | :: Model ID 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. Data of the swapped model is saved in [[Saves (GTA 3)#Block 0: Simple Vars|block 0 of the save file]] in GTA III, [[Saves (GTA VC)#Block 0: Simple Vars|block 0]] in Vice City, and [[Saves (GTA SA)#Block 1: Script|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. | + | 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 [[Saves (GTA 3)#Block 0: Simple Vars|block 0 of the save file]] in GTA III, [[Saves (GTA VC)#Block 0: Simple Vars|block 0]] in Vice City, and [[Saves (GTA SA)#Block 1: Script|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. | ||
== Keywords == | == Keywords == |
Revision as of 23:45, 25 July 2015
Description
- Swaps a map model with another map model
Syntax
- 03B6: replace_model_at [flt1] [flt2] [flt3] radius [flt4] from [int1] to [int2]
Parameter
- [flt1]
- X-coordinate
- [flt2]
- Y-coordinate
- [flt3]
- Z-coordinate (or -100.0 for ground z)
- [flt4]
- Radius
- [int1]
- [int2]
- Model ID 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.
Keywords
replace, model, swap, building, map, nearest, closest