Author Topic: [SCRIPT REQUEST] Recover/Respawn Buried Vehicles  (Read 927 times)

Summary: A script that runs every (interval) minutes that respawns or recovers vehicles that are stuck inside of bricks.
Purpose: To not have to deal with vehicles being off-limits because some fool drove a vehicle under the map (Thanks, physics engine) and make vehicles more available to people.

Script should detect all vehicles every (pref) minutes, and if not within (pref) distance from a player (if vehicle in a minigame, a player in that minigame), it checks to see if any bricks with raycasting OR colliding on are within it's collision zone and if so, (pref:respawns or recovers) the vehicle.

Thanks.

Another possibility you could try is using zones events, and if a vehicle leaves the zone have it recover. Plus, it wont be calling a constant loop on the server

Another possibility you could try is using zones events, and if a vehicle leaves the zone have it recover. Plus, it wont be calling a constant loop on the server
I'd have to respectfully decline that idea. Zone event searches refresh automatically and much more rapidly (iirc the default zone search interval is 200ms), for multiple types of objects (player vehicles, players, physics vehicles, and bricks as opposed to just bricks), and in duplicity it slows things down a lot more than searching once every minute, few or several minutes.

This idea would be a lot less resource-intensive and require less overhead.
« Last Edit: March 11, 2020, 01:27:46 AM by SWAT One »