-
Content Count
827 -
Joined
-
Last visited
-
Medals
Everything posted by wogz187
-
Deleting all objects within a certain radius.
wogz187 replied to Richard987's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Check out this topic, The provided function can hide/show/remove EDEN layers. Have fun! -
one condition "if" for fews objects
wogz187 replied to Palmi69's topic in ARMA 3 - MISSION EDITING & SCRIPTING
@sil.lau@free.fr, Loop the condition and identify the nearest activator. //method 1 [obj_0, obj_1] spawn { waitUntil { sleep 1; _near= _this select {_x distance player < 20}; if !(_near isEqualTo []) then {systemChat str (_near #0); true} else {false} } }; //method 2 (probably faster) [obj_0, obj_1] spawn { waitUntil { sleep 1; _near= _this findIf {_x distance player < 20}; if (_near> -1) then {systemChat str (_this select _near); true} else {false} } }; Have fun! -
Get an array of positions from objects in editor
wogz187 replied to Tory Xiao's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Convert just about anything into a position array, you_convertToPos={ private _pos= objNull; if (typeName _this== "ARRAY") exitWith {_this}; if (typeName _this== "LOCATION") exitWith {_pos = locationPosition _this; _pos}; if !(typeName _this== "STRING") then {_pos = (_this ModelToWorld [0,0,0])} else {_pos = (getMarkerPos [_this, true])} _pos }; Example: _arr =[(nearestLocation [getPos player, "nameCity"]), (player modelToWorld [0,3,0]), trigger_0, "marker_0"] apply {systemChat str (_x call you_convertToPos)}; Have fun! -
@Coladebote, Check out this topic, The provided function can hide/show/remove EDEN layers. Have fun!
-
Adding init to spawned group
wogz187 replied to xXPinkFloyd92Xx's topic in ARMA 3 - MISSION EDITING & SCRIPTING
@xXPinkFloyd92Xx, I don't have ACE installed so I tested with, (units ((player modelToWorld [0,5,0]) call fnc_createGrouplost)) apply {systemChat str _x}; I can't account for what happens inside the apply scope. -
Adding init to spawned group
wogz187 replied to xXPinkFloyd92Xx's topic in ARMA 3 - MISSION EDITING & SCRIPTING
@xXPinkFloyd92Xx, Have fun! -
Make IED explode when player(s) get near
wogz187 replied to sizraide's topic in ARMA 3 - MISSION EDITING & SCRIPTING
@sizraide, _markerArray = ["l_1", "l_2", "l_3", "l_4", "l_5", "l_6", "l_7", "l_8", "l_9", "l_10"]; _IEDarray = ["IEDUrbanSmall_Remote_Ammo","IEDLandSmall_Remote_Ammo","IEDUrbanBig_Remote_Ammo","IEDLandBig_Remote_Ammo"]; _markerArray apply { private _veh= (selectRandom _iedArray) createVehicle (getMarkerPos _x); _veh spawn { waitUntil { sleep 1; if !((_this nearEntities ["Man", 20]) select {_x in allPlayers} isEqualTo []) then {_this setDamage 1}; !alive _this } }; _veh }; Create an IED at each marker position. Detonation radius is set to 20 which you may change as you please. Have fun! -
It's a relatively simple function, MMF_fnc_conversation={ { _this addAction [(_x #0), { params ["_target", "_caller", "_actionId", "_arguments"]; [(getDir _caller)-180] apply {_target setFormDir _x; _target setDir _x}; private _prompt= _target getVariable ["you_prompt", [""]]; [ [name _caller, (_prompt select _actionID select 1)], [name _target, (_arguments select 0), (_arguments #1)] ] spawn BIS_fnc_EXP_camp_playSubtitles; [_target, _caller] spawn (_arguments #2) },(_this getVariable ["you_dialog", []] select _forEachIndex),9,false, true,"", "alive _target", 3] }forEach (_this getVariable ["you_prompt", []]) }; with a lot of instructions, Have fun!
-
this spawn { waitUntil {sleep 1; if alive _this then {systemChat str _this}; !alive _this } } [this, name this, group this] call { params ["_unit", "_name", "_grp"]; _this spawn { waitUntil {sleep 1; if alive (_this #0) then {systemChat str _this}; !alive (_this #0) } } } _this is the argument(s) passed to a script. A magic variable from which other variables may be derived. THIS is just another way to refer to the unit, object, vehicle into which you paste script. If you name a unit "bob" then THIS is bob in bob's init field. Have fun!
-
solved Script to make helmet/hat fly off when shot in head?
wogz187 replied to johnnyboy's topic in ARMA 3 - MISSION EDITING & SCRIPTING
@Play3r, Here's a more recent version that handles weapon dropping, It will work in a loop, { _x addEventHandler... }foreach allUnits select {side _x == EAST}; Change "this" to "_x" inside forEach. Have fun! -
Remove all this classname from the calling unit, [this, "ACE_plasmaIV_250"] call {{(_this #0) removeItem _x} forEach (((uniformItems (_this #0) + vestItems (_this #0) + backpackItems (_this #0))) select {_x== (_this #1)})} If you'll be calling this often, you_remove_strings= { {(_this #0) removeItem _x} forEach (((uniformItems (_this #0) + vestItems (_this #0) + backpackItems (_this #0))) select {_x== (_this #1)}) }; //call [this, "ACE_plasmaIV_250"] call you_remove_strings Have fun!
- 10 replies
-
- 1
-
- eden editor
- ace
-
(and 2 more)
Tagged with:
-
Associate smoke to object
wogz187 replied to Coladebote's topic in ARMA 3 - MISSION EDITING & SCRIPTING
@Coladebote, Try the alt-syntax of createVehicle, private _fire = createVehicle ["test_EmptyObjectForSmoke", getMarkerPos "SMOKE_1", [], 0, "CAN_COLLIDE"]; Have fun! smoke_effect={ if !isServer exitWith {}; params [["_pos", [0,0,0]], ["_time", 900], ["_mark", ""], ["_effect", ["Land_d_House_Small_02_V1_F", "test_EmptyObjectForSmoke"]], ["_code", {{deleteVehicle _x} forEach _this}], ["_arr", []]]; if !(_mark isEqualTo "") then {(createMarker [_mark, _pos]) setMarkerShape "ICON"}; {private _veh= createVehicle [_x, _pos, [], 0, "CAN_COLLIDE"]; _arr pushBack _veh}forEach _effect; [_arr, _time, _code] spawn { params ["_arr", "_time", "_code"]; sleep _time; _arr spawn _code }; _arr }; EXAMPLES: Your coordinates, default params [[13413.9,6621.1]] call smoke_effect 10 second test, [(player modelToWorld [0, 20, 0]), 10, "FIRE"] call smoke_effect Hunter wreck (smoke and fire) [ (player modelToWorld [(random 100), (random 100), 0]), 600, "Hunter Wreck", ["Land_wreck_hunter_f", "test_EmptyObjectForFireBig", "test_EmptyObjectForSmoke"] ] call smoke_effect -
SOLVED: Picking up Radio activates Chat Channel
wogz187 replied to Rosso777's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Add a semicolon before starting a new line within the same scope, this spawn { waitUntil { sleep 1; if alive _this then {systemChat str alive _this}; !alive _this } } this spawn { waitUntil { sleep 1; if alive _this then {systemChat str alive _this}; !alive _this }; systemChat "exited loop" } Have fun! -
AI not moving to waypoint after animation
wogz187 replied to Nicole_UK's topic in ARMA 3 - MISSION EDITING & SCRIPTING
@Nicole_UK, Paste the script into the init field of one of the units. The first NPC is the "trigger area" (10 m). No waypoints or triggers required. It will only affect the units listed in the array. I edited the script so the NPCs listed in the array will move to, then board the vehicle listed last in the array, [NPC_0, NPC_1, NPC_2, truck_1] spawn { private _veh= _this select (count _this) -1; waitUntil { sleep 1; if (player distance (_this select 0) < 10) then { { [_x, _veh] spawn { params ["_unit", "_veh"]; sleep 10; _unit switchMove ""; _unit enableAI "ALL"; _unit doMove (getPos _veh); waitUntil {sleep 1; _unit distance _veh < 5}; _unit moveInAny _veh } }forEach _this }; (player distance (_this select 0)<10) }; waitUntil {sleep 1; {_x in _veh} count _this == count _this -1}; driver _veh spawn {_this doMove (_this getVariable ["move_pos", (_this modelToWorld [0,0])])}; }; Have fun! -
AI not moving to waypoint after animation
wogz187 replied to Nicole_UK's topic in ARMA 3 - MISSION EDITING & SCRIPTING
@Nicole_UK, I'm not sure why your NPC isn't moving but I am sure that triggers and waypoints are holding you back! [NPC_0, NPC_1, NPC_2] spawn { waitUntil { sleep 1; if (player distance (_this select 0) < 10) then { { _x spawn { sleep 10; _this switchMove ""; _this enableAI "ALL"; _this doMove (_this getVariable ["move_pos", (_this modelToWorld [100, 100, 0])]) } }forEach _this }; (player distance (_this select 0)<10) } }; Uses the first NPC in the array as an area center, 10 m. When player enters the area wait 10 seconds and release the NPCs listed in the array from their animation. Send them to the variable "move_pos" default: 100 meters that way. Exit loop. Have fun! -
easy [updated] Mission Maker Framework
wogz187 posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
MISSION MAKER FRAMEWORK for ARMA III, ver. 0008 (2021) This MODULE is compatible with BASE GAME (current version) MMF is an easy-to-use function library for mission designers. Live readMe Discord Channel (new) Change Log (new) FAQ (new) MMF Version 8 (install to mission root) (dev) MMF_vX (drive) (new) Demos (new) Images Features Have fun! Credits: Soolie Build Menu GUI SmartGames Function Configs Custom Notification Benchmark, Mr Pants Playtesting Arma Public License No Derivatives (APL-ND) Use:- 46 replies
-
- 19
-
- framework
- function library
- (and 13 more)
-
easy [updated] Mission Maker Framework
wogz187 replied to wogz187's topic in ARMA 3 - MISSION EDITING & SCRIPTING
@Rosso777, It's best to install MMF to a freshly created scenario with the intention of using if from the start. That way you can embrace the design philosophy and accomplish with 1 line what used to take a jumble of triggers and webs of waypoints— those are the complicated things— MMF is easy-to-use (it says so right on the tin!). Some recent additions, like MMF_fnc_unit_maker, make designing missions even easier. some_object spawn MMF_fnc_unit_maker; I cannot simplify it any further. Have fun!- 46 replies
-
- framework
- function library
- (and 13 more)
-
easy [updated] Mission Maker Framework
wogz187 replied to wogz187's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Check out the new demo, MMF_games_demo 9+1 missions in a single scenario! Missions All MMF demos- 46 replies
-
- 1
-
- framework
- function library
- (and 13 more)
-
Delete everything in trigger area - NEED HELP
wogz187 replied to Nicole_UK's topic in ARMA 3 - MISSION EDITING & SCRIPTING
@Nicole_UK, To do what you originally asked, { deleteVehicle _x } forEach (nearestObjects [thisTrigger, ["all"], (triggerArea thisTrigger) select 0]); in a trigger which includes all the base objects within its area. Have fun! -
Delete everything in trigger area - NEED HELP
wogz187 replied to Nicole_UK's topic in ARMA 3 - MISSION EDITING & SCRIPTING
@Nicole_UK, 1) Create a new layer (folder) in the editor and title it something like "base_objects" 2) Place your base objects into this new folder 3) Create a trigger on your base, player activated (not present) 4) Paste, (to delete) [["base_objects"], false, true] call you_hide_layers in the trigger ON ACTIVATION field or 3) Create a trigger on your base, player activated (present), repeatable 4) Paste, (to toggle show/hide) ON ACTIVATION: [["base_objects"]] call you_hide_layers ON DEACTIVATION: [["base_objects"] true] call you_hide_layers 5) Paste the function somewhere, it only has to be loaded once. It can go basically anywhere. Paste it in your player's init field if you like. you_hide_layers={ params [["_layers", []], ["_show", false], ["_remove", false], ["_exec", {}]]; if _remove then {_exec ={deleteVehicle _x}} else {_exec= {_x hideObjectGlobal _show}}; for "_i" from 0 to count _layers -1 do { {call _exec} forEach ((getMissionLayerEntities (_layers select _i)) select 0) } }; Have fun! -
Delete everything in trigger area - NEED HELP
wogz187 replied to Nicole_UK's topic in ARMA 3 - MISSION EDITING & SCRIPTING
@Nicole_UK, Remove or hide/show all objects in a layer, Have fun! -
How to make a command fire over and over again
wogz187 replied to Joe98's topic in ARMA 3 - MISSION EDITING & SCRIPTING
@Joe98, Generally speaking this is my favorite type of loop, Have fun! -
Ai dropping a bomb on each waypoint while on patrol
wogz187 replied to GamersFortitude's topic in ARMA 3 - MISSION EDITING & SCRIPTING
@GamersFortitude, This does what the script above is supposed to do, However I'm not sure that's exactly what you want it to do. As a function it can work repeatedly but mostly for visual effect (there's no aim), Have fun! -
Popup targets requiring Multiple hits and Target Moving
wogz187 replied to militarypolice's topic in ARMA 3 - MISSION EDITING & SCRIPTING
@sarogahtyp My favorite line from the script above, _down_start > 0 and (diag_tickTime - _down_start) > _down_time now that's how you return bool like a pro! Thanks, man! -
@BluBoi, This topic reminds me of myself. Here is your script running without errors, However there are still a number of problems (I don't think it does what you want it to do). Like was said before, 1) system chat stuff to debug your script 2) read the wiki 10x for each command you use 3) make little experiments instead of full blown scripts (then compile successes together) Have fun!