Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- Script that spawns vehicles random over the map.
- Made by Darihon.
- How to add a new vehicle:
- 1. Copy one of the lines (_vehicle# = ...)
- 2. Change the _vehicle# to a number u like.
- 3. Do the same with _spot#
- 4. Same with _veh# but edit the "_vehicle#" & _spot# into the new number defined above (i.e _vehicle5 & _spot5)
- 5. Add _veh# into the arrays of setVariable.
- */
- // Locations
- locations = [
- []
- ];
- // Array of Vehicles
- rvehicles = [
- "HMMWV_Ambulance",
- "HMMWV_Ambulance_CZ_DES_EP1",
- "HMMWV_DES_EP1",
- "HMMWV_DZ",
- "HMMWV_M1035_DES_EP1",
- "LandRover_CZ_EP1",
- "LandRover_TK_CIV_EP1",
- "UAZ_CDF",
- "UAZ_INS",
- "UAZ_RU",
- "UAZ_Unarmed_TK_CIV_EP1",
- "UAZ_Unarmed_TK_EP1",
- "UAZ_Unarmed_UN_EP1"
- ];
- // Choses a random vehicle in the 'rvehicles' array.
- _vehicle1 = rvehicles call BIS_fnc_SelectRandom;
- _vehicle2 = rvehicles call BIS_fnc_SelectRandom;
- _vehicle3 = rvehicles call BIS_fnc_SelectRandom;
- // Choses a random location from 'locations' array.
- _spot1 = locations call BIS_fnc_SelectRandom;
- _spot2 = rvehicles call BIS_fnc_SelectRandom;
- _spot3 = rvehicles call BIS_fnc_SelectRandom;
- // Creates a vehicle at the spot
- _veh = createVehicle [_vehicle1, _spot1, [], 0, "CAN_COLLIDE"];
- _veh2 = createVehicle [_vehicle2, _spot2, [], 0, "CAN_COLLIDE"];
- _veh3 = createVehicle [_vehicle3, _spot3, [], 0, "CAN_COLLIDE"];
- // Makes sure they dissapear after restart.
- [_veh,_veh2,_veh3] setVariable ["ObjectID", "1", true];
- [_veh,_veh2,_veh3] setVariable ["ObjectUID", "1", true];
Advertisement
Add Comment
Please, Sign In to add comment