This is how to spawn a nuke explosion with a script in Arma 3. This only does damage in a small radius, but it still is a lot of fun.
[getMarkerPos "respawn_west", 500] call rhs_fnc_ss21_nuke; |
This section of code will spawn a HE SCUD missile on a certain location defined by the _Location variable. This is the position of an offroad vehicle that I want to be destroyed by a missile.
_Location = [6161.73,7046.66,0.00946617]; Nuke = createVehicle ["RHS_9N123F", [(Location select 0),( Location select 1)], [], 0, "FLY"]; |
This version of the nuke script will set a 900m radius and a very powerful yield.
[getMarkerPos "respawn_west", 2900, 900] call rhs_fnc_ss21_nuke; |
This works very well and does have a nice mushroom cloud to boot.
This is how to spawn an attack helicopter in the air that will then fly off to patrol a location.
_locationHeli = [2026.04,9947.63,4.29153e-006]; _CounterHeloType = selectRandom ["RHS_Mi24P_vdv","RHS_Mi24V_vdv","RHS_Mi8MTV3_vdv","RHS_Mi8MTV3_heavy_vdv","rhs_mi28n_vvsc","RHS_Ka52_vvsc"]; _heli = [_locationHeli, 112.516, _CounterHeloType, east] call bis_fnc_spawnvehicle; [_heli select 2, Loc] call BIS_fnc_taskAttack; _heliVeh = _heli select 0; _heliVeh addEventHandler ["Fired",{ (_this select 0) setVehicleAmmo 1 }]; |
Where does this code go? what files init, initserver.sqf
Put it in a trigger and set it off at a certain time.