Ok so here is the deal I want to make a script similar to how breaking point has vehicles spawning gear in towns. I could sit in the editor and do this but I thought it would be neat to build something together.
This should be server side if possible and will spawn and despawn loot depending on players proximity.
Here is the start.
//Find center of towns to spawn wreck if (isServer) then { _townCenter = CENTER; _towns = nearestLocations [getPosATL _townCenter, ["NameVillage","NameCity","NameCityCapital"], 25000]; _RandomTownPosition = position (_towns select (floor (random (count _towns)))); { _wreck = createVehicle ["Land_Wreck_Hunter_F",_pos,[], 4, "NONE"]; } forEach _towns; } //tigger, smoke, and boxes. waituntil{player == player}; _condition = "(vehicle player) in thislist"; _activation = " _smoke = createvehicle ["test_EmptyObjectForSmoke",(getpos _wreck),[],0,"NONE"]; _smoke attachTo[_wreck,[0,-2,0]]; _box = createVehicle ["Land_PaperBox_open_full_F", (getpos _wreck), [], 0, "CANCOLLIDE"]; _box = createVehicle ["Land_PaperBox_open_full_F", (getpos _wreck), [], 0, "CANCOLLIDE"]; _box = createVehicle ["Land_PaperBox_open_full_F", (getpos _wreck), [], 0, "CANCOLLIDE"]; _box = createVehicle ["Land_PaperBox_open_full_F", (getpos _wreck), [], 0, "CANCOLLIDE"]; "; _deactivation = " "delete vehicle _box"; "delete vehicle _smoke"; "; _trigger = createTrigger ["EmptyDetector",(getpos _wreck)]; _trigger setTriggerActivation ["ANY", "PRESENT", true]; _trigger setTriggerArea [100, 100, 0, false]; _trigger setTriggerType "SWITCH"; _trigger setTriggerText "Trigger"; _trigger setTriggerStatements [_condition, _activation, _deactivation]; trigger = _trigger;
First its finding the center of all towns and spawning the wreck.
from there we want to create the trigger and start spawning loot and smoke when a player enters within the area. This is not at all close to done and is all wrote while sitting at my desk at work....
The idea here is this will be for PVP servers it will alert anyone approaching that the area is occupied. If anyone has more ideas lets add them... if this collaboration works out I have a few more that should be fun... once we have a working script we can add it to the scripts for all to use.
If this is not something people want to do I will finish this in time and release it also.