03B6

From GTAMods Wiki
Revision as of 02:25, 16 July 2015 by Spaceeinstein (talk | contribs) (Created page with "<div class="thumb tright"><div class="thumbinner" style="width:304px;"> {| cellspacing="0" |- | class="thumbimage" | 300px |- | class="thumbimage" | [...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
03B6 before.jpg
03B6 after.jpg
A notable example of the usage of this opcode in the original script of Vice City.

GTA III Vice City San Andreas SWAP_NEAREST_BUILDING_MODEL


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
[flt4]
Radius
[int1]
Model ID number to swap from as defined in the IDE file; also acceptable is model's DFF name with a hash character
[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. 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