0363

From GTAMods Wiki
Jump to navigation Jump to search

GTA III Vice City San Andreas SET_VISIBILITY_OF_CLOSEST_OBJECT_OF_TYPE


Description
Sets the visibility of the object model
Syntax
0363: toggle_model_render_at [flt1] [flt2] [flt3] radius [flt4] object [int1] [int2]
Parameter
[flt1]
X-coordinate
[flt2]
Y-coordinate
[flt3]
Z-coordinate (or ≤-100.0 for ground z)
[flt4]
Radius
[int1]
Valid model index as defined in the IDE file; also acceptable is model's DFF name with a hash character
[int2]
0 = invisible, 1 = visible (default)

This opcode allows the object model closest to the center of the search area to become invisible. It affects objects placed through the IPL, placed through the script using 0107 and others, and even swapped through the script using 03B6. Don't forget its LOD model if it has one. The collision model of the object is not affected by this and will remain solid if the object is invisible. If you are unable to make an invisible object visible again, make that object invisible then back to visible. It is not recommended to use this on dynamic objects that can respawn like streetlights.

The object's invisibility setting 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 object model is set to invisible; if the object model is visible, the game no longer save that information. The game can save a maximum of 20 object models.

Note: It is important that the object to hide is defined in a normal IPL and not in a binary IPL, otherwise, when moving away from the object's position and returning, the object will become visible again (at least in SA).


Keywords

set, toggle, visibility, render, closest, object, model, type