User Tools

Site Tools


arma2:editor_modules:silvie

ArmA 2 Ambient Civilian Vehicles

ArmA 2 Forum, ArmA 2 Home, ArmA 2 Config, ArmA 2 File Formats, ArmA 2 Missions, ArmA 2 3D Modeling, ArmA 2 Scripting, ArmA 2 Terrain, ArmA 2 Texturing, ArmA 2 Tools

System for Including Land Vehicles Into Environment (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 = <array>; - 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 = <array>; - 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 = <array>; - 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 = <string>; - 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 = <code>; - 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 = <number>; - 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>; - 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 = <number> - identification number of latest car.
  • currentTown = <number> - town where last vehicle was created (or where is planned to, if player is nearby).
  • carlist = <array> - list of all created cars (destroyed ones are remove).

Cars

  • ALICE_id = <number> - identification number of vehicle.
  • ALICE_obj = <object> - object on which vehicle was created (can be object or road).
  • ALICE_twn = <location> - town where vehicle was created.
arma2/editor_modules/silvie.txt · Last modified: 2024/08/01 21:01 by snakeman

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki

All PMC web site download services are temporarily suspended until web site yearly fees have been recovered, want to download addons/mods? Then Support PMC.

If you are grateful for all the work PMC has done in the past 25 years, use Support PMC page.