ScriptingTutorials/VehicleDisappear

Revision as of 19:49, 21 May 2023 by Mex (talk | contribs) (Created page with "This article covers different techniques to making a vehicle disappear.<br><br> '''Option 1'''<br> The <code><streamoutdistance></code> in server config applies to all elements unless changed for a specific element with element.streamOutDistance.<br> The stream out distance must be higher than the stream in distance.<br> See ServerConfiguration and element.streamOutDistance<br><br> '''O...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This article covers different techniques to making a vehicle disappear.

Option 1
The <streamoutdistance> in server config applies to all elements unless changed for a specific element with element.streamOutDistance.
The stream out distance must be higher than the stream in distance.
See ServerConfiguration and element.streamOutDistance

Option 2
The netFlags.distanceStreaming property sets whether to use distance to stream the element.
If this is false, it will always stream in for all clients regardless of how far away it is.
See netFlags.distanceStreaming

Option 3
The element.netFlags.alwaysExistForSyncer property sets whether the element will always be streamed in for whoever is syncing the element (syncer sends updates to the server about the element's position, rotation, other data etc).
See netFlags.alwaysExistForSyncer

Option 4
The element.netFlags.transient sets whether to delete the vehicle completely when it's not streamed in for anybody.
Useful for temporary cars like traffic. This is set to false by default for vehicles you spawned via scripts.
See netFlags.transient