bvrettski
Member-
Content Count
186 -
Joined
-
Last visited
-
Medals
Community Reputation
10 GoodAbout bvrettski
-
Rank
Sergeant
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
-
Count players as trigger condition?
bvrettski replied to bvrettski's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Thank you I will try this. -
Count players as trigger condition?
bvrettski posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
I'm trying to create a trigger action that watches for opfor players to enter the trigger area. My issue is there will already be two opfor AI in the area. How can I make a condition that counts the number of opfor players in the trigger are and doesn't trigger until it reaches a certain number? In generic terms terms something like: count opfor in trigger area, if opfor count >=5 then ________. -
The following script is part of the Namalsk Crisis missions for Amra 2. I would like to adopt it for use on Namalsk in Wasteland for Arma 3. Credit to Sumrak for the super simple script. I added it to my wasteland mission and made the appropriate call in the init.sqf file. When my character spawns I see snow for a second or two then it stops. Can someone please help me understand what is triggering the snow. I believe it is looking for these two parameters: _this select 0: Double - time (default 3.0) _this select 1: Double - density (can be 0 - 1, default 0.5) I'm not sure what they represent in the overall mission but I have been unable to determine where those values would come from. Is it possible for me to change or rewrite these inside the script so the snow remains a constant percentage and isn't changing with time per say. I have a server up and running with much of the A3 Wasteland mission adopted for the Namalsk map. Any help is much appreciated. scriptName "fn_dzn_snowfall.sqf"; /* File: fn_dzn_snowfall.sqf Author: Sumrak Description: Simple snowfall script for Namalsk OR DayZ: Namalsk Parameter(s): _this select 0: Double - time (default 3.0) _this select 1: Double - density (can be 0 - 1, default 0.5) Returns: Nice snow particle effect with a proper density and for the defined time. */ private["_dzn_snow_density", "_dzn_snow_pc", "_dzn_snow_timer", "_isinbuilding", "_isInsideBuilding"]; if (isNil "_this") then { _this = []; }; if (count _this > 0) then { _dzn_snow_timer = abs (_this select 0); } else { _dzn_snow_timer = 3; }; if (count _this > 1) then { if ((_this select 1) != -1) then { _dzn_snow_density = abs ( 100 * (_this select 1)); } else { _dzn_snow_density = 10; }; } else { _dzn_snow_density = 50; }; _d = 35; _h = 18; _dzn_snow_pc = 0; snow = _dzn_snow_density / 100; _isInsideBuilding = compile preprocessFileLineNumbers "\nst\ns_modules\functions\external\fn_isInsideBuilding.sqf"; while {_dzn_snow_timer >= 0} do { _position = getPos player; if ([player] call _isInsideBuilding) then { _isinbuilding = true; } else { _isinbuilding = false; }; while {(_dzn_snow_pc < _dzn_snow_density) && !_isinbuilding} do { _dpos = [((_position select 0) + (_d - (random (2 * _d))) + ((velocity vehicle player select 0) * 6)), ((_position select 1) + (_d - (random (2 * _d))) + ((velocity vehicle player select 1) * 6)), ((_position select 2) + _h)]; drop ["\ca\data\cl_water", "", "Billboard", 1, 8, _dpos, wind, 1, 0.0001, 0.0, 0.5, [0.05, 0.05, 0.05], [[1, 1, 1, 0], [1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1]], [0, 0], 0.2, 1.2, "", "", ""]; _dzn_snow_pc = _dzn_snow_pc + 1; }; sleep 0.1; _dzn_snow_timer = _dzn_snow_timer - 0.1; _dzn_snow_pc = 0; }; snow = 0;
-
Random heli crashes for A3Wasteland missions- scripting help needed.
bvrettski posted a topic in ARMA 3 - ADDONS - CONFIGS & SCRIPTING
This section of code is from a Wasteland mission that flies a group of three choppers around the map using a town list as the waypoints. // behaviour on waypoints { _waypoint = _aiGroup addWaypoint [markerPos (_x select 0), 0]; _waypoint setWaypointType "MOVE"; _waypoint setWaypointCompletionRadius 50; _waypoint setWaypointCombatMode "RED"; _waypoint setWaypointBehaviour "COMBAT"; _waypoint setWaypointFormation "VEE"; _waypoint setWaypointSpeed _speedMode; } forEach ((call cityList) call BIS_fnc_arrayShuffle); I'm trying to create a mission that will fly to a random number of waypoints then crash the chopper. I'm struggling with how to write the script to repeat the above X number of times (random between say 10-15 points and then crash the chopper. Any help would be much appreciated and the full / original script can be seen here: if (!isServer) exitwith {}; #include "mainMissionDefines.sqf" private ["_heliChoices", "_convoyVeh", "_veh1", "_veh2", "_veh3", "_createVehicle", "_vehicles", "_leader", "_speedMode", "_waypoint", "_vehicleName", "_vehicleName2", "_numWaypoints", "_box1", "_box2", "_box3"]; _setupVars = { _missionType = "Hostile Helicopters"; _locationsArray = nil; // locations are generated on the fly from towns }; _setupObjects = { _missionPos = markerPos (((call cityList) call BIS_fnc_selectRandom) select 0); _heliChoices = [ ["B_Heli_Transport_01_F", "B_Heli_Light_01_armed_F"], ["B_Heli_Transport_01_camo_F", "O_Heli_Light_02_F"], ["B_Heli_Transport_01_F", "I_Heli_light_03_F"] ]; if (missionDifficultyHard) then { (_heliChoices select 0) set [0, "B_Heli_Attack_01_F"]; (_heliChoices select 1) set [0, "O_Heli_Attack_02_F"]; (_heliChoices select 2) set [0, "O_Heli_Attack_02_black_F"]; }; _convoyVeh = _heliChoices call BIS_fnc_selectRandom; _veh1 = _convoyVeh select 0; _veh2 = _convoyVeh select 1; _veh3 = _convoyVeh select 1; _createVehicle = { private ["_type", "_position", "_direction", "_vehicle", "_soldier"]; _type = _this select 0; _position = _this select 1; _direction = _this select 2; _vehicle = createVehicle [_type, _position, [], 0, "FLY"]; _vehicle setVariable ["R3F_LOG_disabled", true, true]; [_vehicle] call vehicleSetup; _vehicle setDir _direction; _aiGroup addVehicle _vehicle; // add a driver/pilot/captain to the vehicle // the little bird, orca, and hellcat do not require gunners and should not have any passengers _soldier = [_aiGroup, _position] call createRandomSoldierC; _soldier moveInDriver _vehicle; switch (true) do { case (_type isKindOf "Heli_Transport_01_base_F"): { // these choppers have 2 turrets so we need 2 gunners _soldier = [_aiGroup, _position] call createRandomSoldierC; _soldier moveInTurret [_vehicle, [1]]; _soldier = [_aiGroup, _position] call createRandomSoldierC; _soldier moveInTurret [_vehicle, [2]]; }; case (_type isKindOf "Heli_Attack_01_base_F" || _type isKindOf "Heli_Attack_02_base_F"): { // these choppers need 1 gunner _soldier = [_aiGroup, _position] call createRandomSoldierC; _soldier moveInGunner _vehicle; }; }; // remove flares because it overpowers AI choppers if (_type isKindOf "Air") then { { if (["CMFlare", _x] call fn_findString != -1) then { _vehicle removeMagazinesTurret [_x, [-1]]; }; } forEach getArray (configFile >> "CfgVehicles" >> _type >> "magazines"); }; [_vehicle, _aiGroup] spawn checkMissionVehicleLock; _vehicle }; _aiGroup = createGroup CIVILIAN; _vehicles = [ [_veh1, _missionPos vectorAdd ([[random 50, 0, 0], random 360] call BIS_fnc_rotateVector2D), 0] call _createVehicle, [_veh2, _missionPos vectorAdd ([[random 50, 0, 0], random 360] call BIS_fnc_rotateVector2D), 0] call _createVehicle, [_veh3, _missionPos vectorAdd ([[random 50, 0, 0], random 360] call BIS_fnc_rotateVector2D), 0] call _createVehicle ]; _leader = effectiveCommander (_vehicles select 0); _aiGroup selectLeader _leader; _aiGroup setCombatMode "RED"; // units will defend themselves _aiGroup setBehaviour "COMBAT"; // units feel safe until they spot an enemy or get into contact _aiGroup setFormation "VEE"; _speedMode = if (missionDifficultyHard) then { "FULL" } else { "NORMAL" }; _aiGroup setSpeedMode _speedMode; // behaviour on waypoints { _waypoint = _aiGroup addWaypoint [markerPos (_x select 0), 0]; _waypoint setWaypointType "MOVE"; _waypoint setWaypointCompletionRadius 50; _waypoint setWaypointCombatMode "RED"; _waypoint setWaypointBehaviour "COMBAT"; _waypoint setWaypointFormation "VEE"; _waypoint setWaypointSpeed _speedMode; } forEach ((call cityList) call BIS_fnc_arrayShuffle); _missionPos = getPosATL leader _aiGroup; _missionPicture = getText (configFile >> "CfgVehicles" >> _veh1 >> "picture"); _vehicleName = getText (configFile >> "CfgVehicles" >> _veh1 >> "displayName"); _vehicleName2 = getText (configFile >> "CfgVehicles" >> _veh2 >> "displayName"); _missionHintText = format ["A formation of armed helicopters containing a <t color='%3'>%1</t> and two <t color='%3'>%2</t> are patrolling the island. Destroy them and recover their cargo!", _vehicleName, _vehicleName2, mainMissionColor]; _numWaypoints = count waypoints _aiGroup; }; _waitUntilMarkerPos = {getPosATL _leader}; _waitUntilExec = nil; _waitUntilCondition = {currentWaypoint _aiGroup >= _numWaypoints}; _failedExec = nil; // _vehicles are automatically deleted or unlocked in missionProcessor depending on the outcome _successExec = { // Mission completed _box1 = createVehicle ["Box_NATO_Wps_F", _lastPos, [], 5, "None"]; _box1 setDir random 360; [_box1, "mission_DLC_Rifles"] call fn_refillbox; _box2 = createVehicle ["Box_East_Wps_F", _lastPos, [], 5, "None"]; _box2 setDir random 360; [_box2, "mission_USLaunchers"] call fn_refillbox; _box3 = createVehicle ["Box_IND_WpsSpecial_F", _lastPos, [], 5, "None"]; _box3 setDir random 360; [_box3, "mission_Main_A3snipers"] call fn_refillbox; { _x setVariable ["R3F_LOG_disabled", false, true] } forEach [_box1, _box2, _box3]; _successHintMessage = "The sky is clear again, the enemy patrol was taken out! Ammo crates have fallen near the wreck."; }; _this call mainMissionProcessor; -
Can you do scripting for Wasteland main and side missions?
-
Customizing Epoch StatusBar code with Restart Warning
bvrettski posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
The Epoch custom hud (code below) displays a number of useful items but I would like to use its restart timer to display a built in restart warning. I could use a wee bit of coding help and all due credit will be added to the script. What I think we need is a simple if / then statement. if _time = 5 minutes then cutText ["Server restart in 5 minutes", "BLACK", 0.01]; As I am no coder I would really appreciate some help properly formatting and adding the needed line to this script: cutText appears to be the simplest solution for placing this warning center screen (where I want it) /* @file Version: 0.1 @file Name: statusBar.sqf @file EpochMod StatusBar Port for Wasteland by CRE4MPIE @file Created: 21/4/2015 @notes: Added custom Icons and ported Wasteland info. Still needs to be cleaned up a bit. */ waitUntil {!(isNull (findDisplay 46))}; disableSerialization; _rscLayer = "osefStatusBarAdmin" call BIS_fnc_rscLayer; _rscLayer cutRsc["osefStatusBarAdmin","PLAIN"]; systemChat format["Initialized StatusBar...", _rscLayer]; [] spawn { uiSleep 5; //set the color values. //Additional color codes can be found here: http://html-color-codes.com/ _colourDefault = parseText "#adadad"; //set your default colour here _colour108 = parseText "#FF7000"; _colour107 = parseText "#FF9000"; _colour106 = parseText "#FFBB00"; _colour105 = parseText "#FFCC00"; _colour104 = parseText "#81CCDD"; _colour103 = parseText "#33AACC"; _colour102 = parseText "#3388CC"; _colour101 = parseText "#3366CC"; _colour100 = parseText "#336600"; _colour90 = parseText "#339900"; _colour80 = parseText "#33CC00"; _colour70 = parseText "#33FF00"; _colour60 = parseText "#66FF00"; _colour50 = parseText "#CCFF00"; _colour40 = parseText "#CCCC00"; _colour30 = parseText "#CC9900"; _colour20 = parseText "#CC6600"; _colour10 = parseText "#CC3300"; _colour0 = parseText "#CC0000"; _colourDead = parseText "#000000"; _uid = getPlayerUID player; while {true} do { uiSleep 1; //moved the creation of the status bar inside the loop and create it if it is null, //this is to handle instance where the status bar is disappearing if(isNull ((uiNamespace getVariable "osefStatusBarAdmin")displayCtrl 55554)) then { diag_log "statusbar is null create"; disableSerialization; _rscLayer = "osefStatusBarAdmin" call BIS_fnc_rscLayer; _rscLayer cutRsc["osefStatusBarAdmin","PLAIN"]; }; //initialize variables and set values _unit = _this select 0; _damage = round ((1 - (damage player)) * 100); //_damage = (round(_damage * 100)); _hunger = ceil (hungerLevel max 0); _thirst = ceil (thirstLevel max 0); _wallet = player getVariable ["cmoney",0] call fn_numbersText; _stamina = player getVariable ["bmoney",0] call fn_numbersText; _energy = 100; _energyPercent = 100; _serverFPS = round diag_fps; _pos = getPosATL player; _dir = round (getDir (vehicle player)); _grid = mapGridPosition player; _xx = (format[_grid]) select [0,3]; _yy = (format[_grid]) select [3,3]; _time = (round(360-(serverTime)/60)); //edit the '240' value (60*4=240) to change the countdown timer if your server restarts are shorter or longer than 4 hour intervals _hours = (floor(_time/60)); _minutes = (_time - (_hours * 60)); switch(_minutes) do { case 9: {_minutes = "09"}; case 8: {_minutes = "08"}; case 7: {_minutes = "07"}; case 6: {_minutes = "06"}; case 5: {_minutes = "05"}; case 4: {_minutes = "04"}; case 3: {_minutes = "03"}; case 2: {_minutes = "02"}; case 1: {_minutes = "01"}; case 0: {_minutes = "00"}; }; //Colour coding //Damage _colourDamage = _colourDefault; if(_damage >= 100) then{_colourDamage = _colour100;}; if((_damage >= 90) && (_damage < 100)) then {_colourDamage = _colour100;}; if((_damage >= 80) && (_damage < 90)) then {_colourDamage = _colour80;}; if((_damage >= 70) && (_damage < 80)) then {_colourDamage = _colour70;}; if((_damage >= 60) && (_damage < 70)) then {_colourDamage = _colour60;}; if((_damage >= 50) && (_damage < 60)) then {_colourDamage = _colour50;}; if((_damage >= 40) && (_damage < 50)) then {_colourDamage = _colour40;}; if((_damage >= 30) && (_damage < 40)) then {_colourDamage = _colour30;}; if((_damage >= 20) && (_damage < 30)) then {_colourDamage = _colour20;}; if((_damage >= 10) && (_damage < 20)) then {_colourDamage = _colour10;}; if((_damage >= 1) && (_damage < 10)) then {_colourDamage = _colour0;}; if(_damage < 1) then{_colourDamage = _colourDead;}; //Hunger _colourHunger = _colourDefault; if(_hunger >= 100) then{_colourHunger = _colour100;}; if((_hunger >= 90) && (_hunger < 100)) then {_colourHunger = _colour90;}; if((_hunger >= 80) && (_hunger < 90)) then {_colourHunger = _colour80;}; if((_hunger >= 70) && (_hunger < 80)) then {_colourHunger = _colour70;}; if((_hunger >= 60) && (_hunger < 70)) then {_colourHunger = _colour60;}; if((_hunger >= 50) && (_hunger < 60)) then {_colourHunger = _colour50;}; if((_hunger >= 40) && (_hunger < 50)) then {_colourHunger = _colour40;}; if((_hunger >= 30) && (_hunger < 40)) then {_colourHunger = _colour30;}; if((_hunger >= 20) && (_hunger < 30)) then {_colourHunger = _colour20;}; if((_hunger >= 10) && (_hunger < 20)) then {_colourHunger = _colour10;}; if((_hunger >= 1) && (_hunger < 10)) then {_colourHunger = _colour0;}; if(_hunger < 1) then{_colourHunger = _colourDead;}; //Thirst _colourThirst = _colourDefault; switch true do{ case(_thirst >= 100) : {_colourThirst = _colour101;}; case((_thirst >= 90) && (_thirst < 100)) : {_colourThirst = _colour102;}; case((_thirst >= 80) && (_thirst < 90)) : {_colourThirst = _colour103;}; case((_thirst >= 70) && (_thirst < 80)) : {_colourThirst = _colour104;}; case((_thirst >= 60) && (_thirst < 70)) : {_colourThirst = _colour105;}; case((_thirst >= 50) && (_thirst < 60)) : {_colourThirst = _colour106;}; case((_thirst >= 40) && (_thirst < 50)) : {_colourThirst = _colour107;}; case((_thirst >= 30) && (_thirst < 40)) : {_colourThirst = _colour108;}; case((_thirst >= 20) && (_thirst < 30)) : {_colourThirst = _colour20;}; case((_thirst >= 10) && (_thirst < 20)) : {_colourThirst = _colour10;}; case((_thirst >= 1) && (_thirst < 10)) : {_colourThirst = _colour0;}; case(_thirst < 1) : {_colourThirst = _colourDead;}; }; //Energy _colourEnergy = _colourDefault; if(_energyPercent >= 100) then{_colourEnergy = _colour100;}; if((_energyPercent >= 90) && (_energyPercent < 100)) then {_colourEnergy = _colour90;}; if((_energyPercent >= 80) && (_energyPercent < 90)) then {_colourEnergy = _colour80;}; if((_energyPercent >= 70) && (_energyPercent < 80)) then {_colourEnergy = _colour70;}; if((_energyPercent >= 60) && (_energyPercent < 70)) then {_colourEnergy = _colour60;}; if((_energyPercent >= 50) && (_energyPercent < 60)) then {_colourEnergy = _colour50;}; if((_energyPercent >= 40) && (_energyPercent < 50)) then {_colourEnergy = _colour40;}; if((_energyPercent >= 30) && (_energyPercent < 40)) then {_colourEnergy = _colour30;}; if((_energyPercent >= 20) && (_energyPercent < 30)) then {_colourEnergy = _colour20;}; if((_energyPercent >= 10) && (_energyPercent < 20)) then {_colourEnergy = _colour10;}; if((_energyPercent >= 1) && (_energyPercent < 10)) then {_colourEnergy = _colour0;}; if(_energyPercent < 1) then{_colourEnergy = _colour0;}; //Stamina _colourStamina = _colourDefault; //display the information ((uiNamespace getVariable "osefStatusBarAdmin")displayCtrl 55554)ctrlSetStructuredText parseText format[" <t shadow='1' shadowColor='#000000' color='%10'><img size='1.6' shadowColor='#000000' image='client\icons\players.paa' color='%10'/> %2</t> <t shadow='1' shadowColor='#000000' color='%11'><img size='1.0' shadowColor='#000000' image='client\icons\health.paa' color='%11'/> %3%1</t> <t shadow='1' shadowColor='#000000' color='%10'><img size='1.0' shadowColor='#000000' image='client\icons\money.paa' color='%10'/> $%4</t> <t shadow='1' shadowColor='#000000' color='%12'><img size='1.6' shadowColor='#000000' image='client\icons\hunger.paa' color='%12'/> %5%1</t> <t shadow='1' shadowColor='#000000' color='%13'><img size='1.6' shadowColor='#000000' image='client\icons\thirst.paa' color='%13'/> %6%1</t> <t shadow='1' shadowColor='#000000' color='%15'><img size='1.0' shadowColor='#000000' image='client\icons\atm.paa' color='%10'/> $%9</t> <t shadow='1' shadowColor='#000000' color='%10'>FPS: %7</t> <t shadow='1' shadowColor='#000000' color='%15'><img size='1.0' shadowColor='#000000' image='client\icons\compass.paa' color='%10'/> %17</t> <t shadow='1' shadowColor='#000000' color='%10'><img size='1.6' shadowColor='#000000' image='client\icons\stopwatch.paa' color='%10'/>%18:%19</t>", "%", count playableUnits, _damage, _wallet, _hunger, _thirst, _serverFPS, _energyPercent, _stamina, _colourDefault, _colourDamage, _colourHunger, _colourThirst, _colourEnergy, _colourStamina, format["%1/%2",_xx,_yy], _dir, _hours, _minutes ]; }; }; -
Can anyone point me to the variable or mission setting that would allow me to update markers on a set time rather than immediate updates. For example update a map marker every 30 seconds. What kind of cose should be added to delay the update action?
-
Minimum player count check for bounty mission
bvrettski posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
I'm now messing with a bounty system that is part of A3Wasteland. I want to make the mission check for a minimum number of available players. Here is the code section that searches for a player: //select a random player _players = playableUnits; _count = count _players; // Find out how many players are currently alive _alivePlayerCount = 0; for "_x" from 0 to (_count - 1) do { _p = _players select _x; if (alive _p) then { _alivePlayerCount = _alivePlayerCount + 1; }; }; if (_alivePlayerCount == 0) exitWith {}; // Keep looping over players until we find an alive one _finished = 0; scopeName "main"; while {true} do { _random = floor(random _count); _potentialPlayer = _players select _random; if (alive _potentialPlayer) then { _foundPlayer = _potentialPlayer; _finished = 1; }; if (_finished == 1) then {breakTo "main"}; // Breaks all scopes and return to "main" sleep 0.1; }; How difficult would it be to build in a check so the minimum number of players must be 3 or more? There really is no point in running this type of mission when there are less players than that. Can this line be edited something like this: if (_alivePlayerCount < 3) exitWith {}; -
Random Mission Timers
bvrettski replied to bvrettski's topic in ARMA 3 - MISSION EDITING & SCRIPTING
It works but the only downside is the missions are announced with fractions of a second now..so instead of 10 minutes it will say 10.3659 seconds. lol -
Random Mission Timers
bvrettski replied to bvrettski's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Thanks. Testing now -
I'm building a custom version of Wasteland and trying to create a much more random experience. To that end I'd like to build in random timers for the missions so they arey arent like clockwork. For example: From the default_config.sqf file for the A3Wasteland mission there is the following setting: Line 135: A3W_mainMissionDelay = 10*60; // Time in seconds between Main Missions The other reference to this setting is in the mainMissionController.sqf : Line 10: #define MISSION_CTRL_DELAY (["A3W_mainMissionDelay", 15*60] call getPublicVar) I have been trying to write code that would randomize the mission delay between 10*60 (10 minutes) and 20*60 (20 minutes) with no success. With bypassing the variable and adding it to the MissionController or as a variable within the config file. I think it would be best if were coded into the config file but either way is acceptable. Can someone give me a little coding assistance because as coding noob I'm fumbling around trying to make this work without a proper understanding of the format needed to make it work.
-
Side mission scripting help needed for noob
bvrettski replied to bvrettski's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Thanks for everyone's help. After a little additional experimentation, I was able to get this to work perfectly. :) _successExec = { // Mission completed sleep 3; _explosivePos = getPosATL (_vehicles select 0); _explosive = createMine ["SLAMDirectionalMine_Wire_Mag", _explosivePos, [], 0]; _explosive setDamage 1; _box1 = createVehicle ["Box_East_WpsSpecial_F", _lastPos, [], 2, "None"]; _box1 setDir random 360; [_box1, "mission_Explosives"] call fn_refillbox; { _x setVariable ["R3F_LOG_disabled", false, true] } forEach [_box1]; sleep 3; _soundPath = [(str missionConfigFile), 0, -15] call BIS_fnc_trimString; _soundToPlay = _soundPath + "addons\breakLock\sounds\carhorn.ogg"; playSound3D [_soundToPlay, _box1]; sleep 2; _explosivePos = getPosATL (_vehicles select 0); _explosive = createMine ["IEDUrbanBig_F", _explosivePos, [], 0]; _explosive setDamage 1; sleep 5; _successHintMessage = "Area clear!! The suicide bombers are dead and the explosives are yours...if you survived."; }; On a followup question isn't there a library of built in sounds in the game? I can't find a listing of them online. -
Side mission scripting help needed for noob
bvrettski replied to bvrettski's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Tried it multiple times to make sure I was covering my bases but could not get it to work. Here is the entire segment of the code: _successExec = { // Mission completed sleep 3; _explosivePos = getPosATL (_vehicles select 0); _explosive = createMine ["SatchelCharge_F", _explosivePos, [], 0]; _explosive setDamage 1; sleep 1; _box1 = createVehicle ["Box_East_WpsSpecial_F", _lastPos, [], 2, "None"]; _box1 setDir random 360; [_box1, "mission_Explosives"] call fn_refillbox; { _x setVariable ["R3F_LOG_disabled", false, true] } forEach [_box1]; _missionRoot = [(str missionConfigFile), 0, -15] call BIS_fnc_trimString; _sound = _missionRoot + "sounds\testsound.ogg"; playSound3d [_sound, player]; sleep 5; _explosivePos = getPosATL (_vehicles select 0); _explosive = createMine ["IEDUrbanBig_F", _explosivePos, [], 0]; _explosive setDamage 1; _successHintMessage = "Congrats! The suicide bombers are dead and the explosives are yours...if you survived."; }; I also found similar code to yours in another Wasteland addon and tried it with no success (Although it does work properly in the addon): _soundPath = [(str missionConfigFile), 0, -15] call BIS_fnc_trimString; _soundToPlay = _soundPath + "addons\breakLock\sounds\carhorn.ogg"; playSound3D [_soundToPlay, _vehicle, false, getPosASL _vehicle, 1, 1, 0]; -
Side mission scripting help needed for noob
bvrettski replied to bvrettski's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I see what ya did there. :) I'll give it a go. Thanks -
Side mission scripting help needed for noob
bvrettski replied to bvrettski's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I think you're correct. playSound3D does not seem to work or I'm not scripting it properly. Will try say3D