Blockland Forums > Suggestions & Requests
[SCRIPT REQUEST] Recover/Respawn Buried Vehicles
(1/1)
SWAT One:
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.
Goth77:
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
SWAT One:
--- Quote from: Goth77 on March 11, 2020, 12:37:47 AM ---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
--- End quote ---
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.
Navigation
[0] Message Index
Go to full version