Executes a script, make sure to define the correct location of the sqf file.
Local execution:
nul=execVM "scripts\test.sqf";
Global execution:
[] remoteExec ["scripts\bluh.sqf", 0, false];
Can be used to delete objects place, variable name defines the name of the object.
One Object
deleteVehicle obj1;
Multiple Objects
{deleteVehicle _x} ForEach [obj1,obj2,obj3];
Hides and unhides a already placed object. (true = hides it, false = unhides it)
objectname hideObject false;
Gives a scrollable action on a object/Ai, text color is done via HTML colors & "this" can be set to be a object's variable name instead.
this addAction ["<t color='#FFFFFF'>Example Text</t>", "scripts\wall.sqf"];
Better add action: (Courtesy of a friend)
this addAction ["Call Artillery","scripts\arty.sqf",nil,1.5,false,true,"","",3,false,"",""];
If placed directly on ai then use "this" otherwise use the variable name, prevents a Ai from doing the defined action. this disableAI "PutActionHere";
This will give a hint in the top right of the screen but only to the person who triggers the script.
Hint "Write here";
Will trigger for everyone, should be executed in a script/sqf file.
_textOne = "<t color='#E22020'>I am a script, everyone can see me.</t>"; hint parseText (_textOne);
Can be done in the following ways: “BLACK OUT”, “BLACK IN”, “BLACK FADED”, “BLACK”, “WHITE OUT”, “WHITE IN”.
titleCut ["I like text","BLACK IN",2.5];
Adds text on your screen.
Bottom middle (Small):
["I like text.","plain down"];
Middle (Big):
["I like text",-1,-1,4,1,0,789] spawn BIS_fnc_dynamicText;
This shows a image in a hint, I would advise a paa image.
hint parseText "<img image='images\image.paa' <img size='20' /> ";
This is set as a trigger condition, and the trigger will only fire once x object(s) are not longer existing/dead.
One Object:
!alive "object name"
Multiple Objects:
!(alive obj1) && !(alive obj2)
Otherwise known as "thisList", can be done with one and multiple.
One player
PlayerVariableName in thislist;
Multiple objects
unit1 in thisList AND unit2 in thisList
Put a trigger over the bar gate, pref 3x7 square, set the the trigger to activate repeatedly and who you want to trigger it.
On Activation:
GateName animate ["Door_1_rot", 1]
On Deactivation:
GateName animate ["Door_1_rot", 0]
This spawns said explosive and detonates it on the marker. Should technically work with anything from HERE[community.bistudio.com].
scriptedCharge = "Bo_Mk82_MI08" createVehicle (getMarkerPos "bombmrk");
Creates a marker on the map, ensure you have a AI the variable name set, in my case it's "bob".
Icon Marker:
bob = createMarker ["nameofmarker", [5150,5031]]; bob setMarkerShape "ICON"; "nameofmarker" setMarkerType "mil_objective"; "nameofmarker" setMarkerColor "ColorRed"; "nameofmarker" setMarkerDir 90; "nameofmarker" setMarkerText "ThisIsTheMarkersName";
Area Marker:
bob = createMarker ["nameofmarker", [5098,5071]]; bob setMarkerShape "ELLIPSE"; "nameofmarker" setMarkerColor "ColorBlack"; "nameofmarker" setMarkerSize [100, 100]; "nameofmarker" setMarkerBrush "SOLID";
This deleted a map marker via it's variable name.
deleteMarker "NameOfMarker";
Plays 3D audio on the given object, this one can be tricky sometimes when it comes to volume. (smallRadio = the object)
soundPath = [(str missionConfigFile), 0, -15] call BIS_fnc_trimString; soundToPlay = soundPath + "sounds\radio_1.ogg"; playSound3D [soundToPlay, smallRadio, false, getPosASL smallRadio, 8, 1, 60];
Can be created on a object and will move the respawn there. (one = marker where the respawn gets moved)
this addAction["Take Respawn", {deleteMarker "respawn_west"; _respawn = createMarker ["respawn_west",(getMarkerPos "one")]; this removeAction 0;}, nil, 10, true, true, "", ""];
Gives a vehicle or player unlimted ammo.
this addEventHandler ["Fired",{(_this select 0) setVehicleAmmo 1}];
40 in this case is how often it triggers the rearm. (Seconds)
nul = this spawn { while {alive _this} do { _this setVehicleAmmo 1; sleep 40 } };
This can be done in both jpg or paa. (1024x512 generally works)
this SetFlagTexture "images\imagename.jpg";
1 = destroyed/dead
this setdammage 0.5;
Forces a AI to fight, aka doesnt allow it to flee.
this allowFleeing 0;
Can be done easily in Eden, but you never know when you need this.
this allowdammage True/False;
Turns on and off the lights of a vehicle.
this Switchlight true/false;
Triggers a Earthquake:
[1] call BIS_fnc_earthquake;
Skips x hours.
skipTime 4;
Turn on or off a engine.
vehicleName engineOn false/true;