Closed CrosRoad95 closed 4 years ago
This is the logic you should use for dynamic objects:
DynamicObject
class should inherit MapObject
. When it gets in range of player (OnShow()
is called), you spawn new game object with rigid body and all other components. Attach OutOfRangeDestroyer
to these spawned game objects, so that they are destroyed when too far away.
Adds some models on grove street and near by los santos can be destroyed by walking, shooting or running over them, they respawns after 30 second. I didn't add all objects which originaly are dynamic.
I don't created synchronization between all players, i don't want synchronize rubbish right now. Even desync exists right now, boxes doesn't affect gameplay, they only decoration.
Sometimes object at spawn disappearing, i don't know how to fix it.