object.set_hidden
This function was added to the Halo: The Master Chief Collection build of Halo: Reach in mid-July 2023, being backported from Halo 4's Megalo engine. Gametypes that use this function will likely fail to load on Xbox 360 builds of Halo: Reach (even when played via Xbox One backward compatibility).
This function makes objects invisible.
As of this writing (July 16, 2023), this function only works on host, and has the following side effects:
- Hiding an object will also hide any other objects attached to it. This extends to weapon pickup and vehicle occupancy (i.e. players are hidden while riding in a hidden vehicle).
- Attaching a hidden object to a non-hidden object may, in some cases, cease hiding the object even after the former is detached. For example, if a player's biped is hidden and they hop onto a turret, the player will cease to be hidden even after they hop off the turret.
- Player bipeds can be hidden, but their first-person geometry is not affected; players can always see themselves in first-person.
- Hidden weapons, including weapons carried by hidden bipeds, don't make any sound when firing.
- Certain visual effects attached to a hidden object remain visible; this includes a Warthog's headlights and rear antenna.
- Grenades, bullets, and melee attacks may stop colliding with hidden objects. Hidden objects — and the players riding in them — may also cease to be affected by environmental hazards like explosive splash damage and Kill Balls. Kill boundaries can still destroy these objects.
This function returns number. Calling this function without storing its return value in a variable is an error.
Arguments
- should_hide
-
Indicates whether the object should be hidden (true) or visible (false).
Example
for each object with label "hide" do current_object.set_hidden(true) end
Notes
-
Hiding an object will also hide all of the other objects attached to them. Calling
set_hidden(false)
on the attached objects will not override this and make them visible again, at least while they're still attached.The reverse is not true: attaching a hidden object to a non-hidden object will not un-hide the former.
Objects' "hidden" states are tracked independently. If you attach a hidden object to another, non-hidden object, and then hide and unhide the parent object, the child object remains hidden.
If an object is hidden because it is attached to an invisible object, such as a Hill Marker, then calling
set_hidden(false)
on the attached object will not override this and reveal the object.