====== ArmA 2 Ambient Civilian Vehicles ====== [[https://www.pmctactical.org/forum/viewforum.php?f=50|ArmA 2 Forum]], [[:arma2|ArmA 2 Home]], [[arma2:config|ArmA 2 Config]], [[arma2:file_formats|ArmA 2 File Formats]], [[arma2:missions|ArmA 2 Missions]], [[arma2:modeling|ArmA 2 3D Modeling]], [[arma2:scripting|ArmA 2 Scripting]], [[arma2:terrain|ArmA 2 Terrain]], [[arma2:texturing|ArmA 2 Texturing]], [[arma2:tools|ArmA 2 Tools]] **S**ystem for **I**ncluding **L**and **V**ehicles **I**nto **E**nvironment (**SILVIE**) is, as said in title, system for spawning empty cars in villages and towns. All vehicles are created on mission start and are constantly replaced when some of the is destroyed. Initialization Paths Editor: Units (F1) > Game Logic > Modules > Ambient Civilian Vehicles Data: ca\modules\silvie Startup Place SILVIE manager on map. No additional synchronizing needed. Optional parameters Set variables to BIS_silvie_mainscope with desired values: * townlist = ; - list of places where vehicles will be spawned. Can be location logic (created by BIS_fnc_locations), array in format [center,distance] or trigger. Example: this setvariable ["townlist",[bis_loc_acityc_mogilevka,[position this,3000],trigger1]];\\ Default value: Whole island. * blackList = ; - object classes which will be excluded from list of building around which cars are generated. Example: BIS_silvie_mainscope setvariable ["blackList",["house1","house2"]];\\ Default value: not yet defined * vehicleRarity = ; - Changing vehicle rarity numbers (e.g. to have village cars spawned in cities, or to disable spawning of given class completely with unusual number like 10). Default rarity numbers are set in config under rarityUrban value (in range from 0/village to 1/city) Example: BIS_silvie_mainscope setvariable ["vehicleRarity",["skodaRed",10,"skodaBlue",0.8]];\\ Default value: empty array * vehicleCount = ; - formula on which basis system calculates number of vehicles for location. %1 is number of buildings (blacklisted objects are excluded) in 500 metres from location. Example: BIS_silvie_mainscope setvariable ["vehicleCount","round (%1 / 10)"];\\ Default value (and recommended): "round ((sqrt %1) * 1.5)" * vehicleInit = ; - custom init which is executed on every car. Vehicle can be accessed using _this variable. Init is executed as separate script, so sleep or waituntil commands can be used without limitations. Example: BIS_silvie_mainscope setvariable ["vehicleInit",{_this lock true}];\\ Default value: {} * roadDistance = ; - when creating car around building, if there is some road closer than this value, vehicle will be attached to this road instead of to building. Example: BIS_silvie_mainscope setvariable ["roadDistance",30];\\ Default value: 25 * attempts = ; - number of attempts to create vehicle (failed attempt is for instance when some road is detected near building, but it's crossroad). Example: BIS_silvie_mainscope setvariable ["attempts",20];\\ Default value: 10 Stored variables These variables are only for checking values. Do not edit them! BIS_SILVIE_Mainscope * id = - identification number of latest car. * currentTown = - town where last vehicle was created (or where is planned to, if player is nearby). * carlist = - list of all created cars (destroyed ones are remove). Cars * ALICE_id = - identification number of vehicle. * ALICE_obj = - object on which vehicle was created (can be object or road). * ALICE_twn = - town where vehicle was created.