Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- destroy_radius = 100;
- {
- _x setDamage 1;
- } forEach ((getPos this) nearObjects ["static", destroy_radius]);
- #adminLogged
- unpacked missions saved thru editor are in %appdata%\..\..\Documents\Arma 3 - Other Profiles\aeroson%20[AM%202ST]\mpmissions
- all mission you play are downloaded in pbo in %appdata%\..\Local\Arma 3\MPMissionsCache
- pbo missions are loaded from your steam/Arma 3/mpmissions
- radios,
- smokes, grenades,
- end game conditions,
- max time, what happens to end it faster
- check list,
- coms, whisper normal yell,
- map, gps, toolkit, defusal
- friendlies on map,
- death messages,
- teleport,
- deploy squad
- vote to disable 1s person
- "join group in specified side"; _grp = createGroup east; [player] joinSilent _grp;
- _SideHQ = createCenter east;
- "player set ACE3 medic"; player setVariable ["ace_medical_medicClass", 100]; ["clearConditionCaches", []] call ace_common_fnc_localEvent;
- "put this at the bottom of init.sqf to remove player's silencers on primary weapon and handgun";
- [] spawn {
- while{hasInterface} do {
- _silencer = (primaryWeaponItems player) select 0;
- if(_silencer != "") then { player removePrimaryWeaponItem _silencer; };
- _silencer = (handgunItems player) select 0;
- if(_silencer != "") then { player removeHandgunItem _silencer; };
- sleep 1;
- };
- };
- "init line of logic to destroy every static building in radius";
- if(isServer) then {
- destroy_radius = 100;
- {
- _x setDamage 1;
- } forEach ((getPos this) nearObjects ["static", destroy_radius]);
- };
- "set side relationships";
- [{
- west setFriend [east, 0];
- east setFriend [west, 0];
- west setFriend [independent, 0];
- independent setFriend [west, 0];
- east setFriend [independent, 1];
- independent setFriend [east, 1];
- },"BIS_fnc_spawn",true] call BIS_fnc_MP;
- "set different elevation on respawn, so players can actually respawn on ships";
- "put this at the bottom of init.sqf";
- if(hasInterface) then {
- player addEventHandler ["Respawn", {
- private ["_pos"];
- _pos = getPosASL player;
- _pos set[2, 9.2]; // here the second number means how much m above sea level, use console to watch "getPosASL player" and copy paste the last number if you want to be accurate
- player setPosASL _pos;
- }];
- };
- "set ace settings to essentials TAW uses";
- [{
- _data = [
- "ace_respawn_SavePreDeathGear", true,
- "ace_respawn_RemoveDeadBodiesDisconnected", true,
- "ace_medical_medicSetting", 1,
- "ace_medical_playerDamageThreshold ", 4,
- "ace_medical_AIDamageThreshold", 1,
- "ace_medical_enableUnconsciousnessAI", 0,
- "ace_medical_preventInstaDeath", true,
- "ace_medical_bleedingCoefficient", 1,
- "ace_medical_painCoefficient", 1,
- "ace_medical_keepLocalSettingsSynced", true
- ];
- _i = 0;
- while{_i < count(_data)} do {
- _name = _data select _i;
- _val = _data select (_i + 1);
- systemChat format["%1 = %2;", _name, _val];
- parsingNamespace setVariable [_name, _val];
- missionNamespace setVariable [_name, _val];
- uiNamespace setVariable [_name, _val];
- _i = _i + 2;
- };
- },"BIS_fnc_spawn",true] call BIS_fnc_MP;
- "set ace settings to essentials TAW uses";
- [{
- },"BIS_fnc_spawn",true] call BIS_fnc_MP;
- "test server profileNamespace";
- [{
- profileNamespace setVariable ["TEST","yes it works"];
- saveProfileNamespace;
- },"BIS_fnc_spawn",false] call BIS_fnc_MP;
- [
- [
- [player],
- {
- _test = profileNamespace getVariable ["TEST","it does not work"];
- [
- [
- [_test],
- {
- hint format["%1", (_this select 0)];
- }
- ]
- ,"BIS_fnc_spawn", (_this select 0)] call BIS_fnc_MP;
- }
- ]
- ,"BIS_fnc_spawn",false] call BIS_fnc_MP;
- [
- [
- {
- ace_medical_preventInstaDeath = true;
- }
- ]
- ,"BIS_fnc_spawn", true] call BIS_fnc_MP;
- "get all cfg first child names"; _c = (configFile >> "CfgWorlds" >> worldName); _res=[]; _count = count _c; while{_count>=0} do { _res pushBack (configName(_c select _count)); _count=_count-1; }; _res
- "allow AGM medic"; player setVariable ["AGM_Medical_AllowNonMedics", true, true];
- "add all stuff to zeus"; { _x addCuratorEditableObjects [allMissionObjects "all", true]; } count allCurators;
- "get classnames of litter for garbage collect"; A=[]; { if(!isPlayer _x && !((typeof _x) in A)) then { A pushBack (typeof _x); }; } forEach (allMissionObjects "all" - allMissionObjects "building" ); A;
- "get classnames of everything in mission"; A=[]; { if(!isPlayer _x && !((typeof _x) in A)) then { A pushBack (typeof _x); }; } forEach (allMissionObjects ""); A;
- "classname of"; _t="man"; _a=[]; _r=100; { if(!((typeof _x) in _a)) then { _a pushBack (typeof _x); }; } forEach ((getpos player) nearObjects [_t, _r]); _a;
- "kill all men in 1000m"; { if(!(isPlayer _x)) then { _x setDamage 1; }; } forEach nearestObjects [player, ["vehicle","man"], 1000];
- "constant rearm and health"; [] spawn { while{true} do { vehicle player setVehicleAmmo 1; vehicle player setDamage 0; }; };
- "get mission objects with classname"; C="AGM_FastRoping_Helper"; A=[]; { if(_x isKindOf C) then { A pushBack _x; }; } forEach (allMissionObjects ""); A;
- [{
- [] spawn { while{true} do { aero_player_markers_run = false; sleep 10; }; };
- },"BIS_fnc_spawn", true, true] call BIS_fnc_MP;
- [{
- allowHaloJump_players = 60;
- },"BIS_fnc_spawn",cursorTarget] call BIS_fnc_MP;
- "mark stuff index"; _m="aa%1"; { _pos = getpos _x; _text = format["%1", _forEachIndex]; _id = format[_m, _forEachIndex]; createMarkerLocal [_id, _pos]; _id setMarkerColorLocal "Default"; _id setMarkerTypeLocal "mil_triangle"; _id setMarkerTextLocal _text; _id setMarkerSizeLocal [1,1]; } forEach
- "mark stuff name_type_index"; _m="aa%1"; { _pos = getpos _x; _text = format["%1 %2 %2", _x, typeof _x, _forEachIndex]; _id = format[_m, _forEachIndex]; createMarkerLocal [_id, _pos]; _id setMarkerColorLocal "Default"; _id setMarkerTypeLocal "mil_triangle"; _id setMarkerTextLocal _text; _id setMarkerSizeLocal [1,1]; } forEach
- "mark allMissionObjects'all'"; _m="aa%1"; { _pos = getpos _x; _text = format["%1", typeof _x]; _id = format[_m, _forEachIndex]; createMarkerLocal [_id, _pos]; _id setMarkerColorLocal "Default"; _id setMarkerTypeLocal "mil_triangle"; _id setMarkerTextLocal _text; _id setMarkerSizeLocal [1,1]; } forEach allMissionObjects "all"
- "mark all caches"; _m="aa%1"; { _pos = getpos _x; _text = format["%1 %2", _forEachIndex, _pos]; _id = format[_m, _forEachIndex]; createMarkerLocal [_id, _pos]; _id setMarkerColorLocal "ColorRed"; _id setMarkerColorLocal "colorRed"; _id setMarkerTypeLocal "mil_triangle"; _id setMarkerTextLocal _text; _id setMarkerSizeLocal [1,1]; } forEach (nearestObjects [getpos player, ["B_supplyCrate_F"], 20000]);
- "clean up mark stuff"; _m="aa%1"; _num = 0; _marker = format[_m, _num]; while {(getMarkerType _marker) != ""} do { deleteMarkerLocal _marker; _num = _num + 1; _marker = format[_m, _num]; };
- _num = 0;
- _marker = format[_m, _num];
- while {(getMarkerType _marker) != ""} do {
- deleteMarkerLocal _marker;
- _num = _num + 1;
- _marker = format[_m, _num];
- };
- // if doesnt have interface exit, if has interface wait until its ready
- if(!hasInterface) exitWith {};
- waitUntil{!isNull findDisplay 46};
- // if has interface wait unitl interface is ready
- if(hasInterface) then {
- waitUntil{!isNull findDisplay 46};
- };
- // put this at the bottom of init.sqf to disable the ability to turn on night vision
- if(hasInterface) then {
- waitUntil{!isNull findDisplay 46};
- (findDisplay 46) displayAddEventHandler ["keyDown", "_this call nightVisionDisable_keyDown"];
- nightVisionDisable_keyDown = {
- if((_this select 1) in actionKeys "NightVision") exitWith {
- true;
- };
- false;
- };
- };
- // tfar mute
- _unit setVariable ["tf_globalVolume", 0.4];
- _unit setVariable ["tf_voiceVolume", 0, True];
- _unit setVariable ["tf_unable_to_use_radio", True, True];
- // tfar unmute
- _unit setVariable ["tf_globalVolume", 1];
- _unit setVariable ["tf_voiceVolume", 1, True];
- _unit setVariable ["tf_unable_to_use_radio", False, True];
- {
- _pos = getpos _x;
- _text = format["%1", _x];
- _id = format["%1_%2", _text, time];
- createMarkerLocal [_id, _pos];
- _id setMarkerColorLocal "Default";
- _id setMarkerTypeLocal "mil_triangle";
- _id setMarkerTextLocal _text;
- _id setMarkerSizeLocal [1,1];
- } forEach
- nearestObjects [getpos player, ["RHS_UH60M"], 2000]
- {
- _pos = getpos _x;
- _text = format["%1", _forEachIndex];
- _id = format["%1_%2", _text, time];
- createMarkerLocal [_id, _pos];
- _id setMarkerColorLocal "Default";
- _id setMarkerTypeLocal "mil_triangle";
- _id setMarkerTextLocal _text;
- _id setMarkerSizeLocal [1,1];
- } forEach (getpos player nearObjects ["B_supplyCrate_F", 10000])
- [{
- west setFriend [resistance, 0];
- },"BIS_fnc_spawn",true,true] call BIS_fnc_MP;
- [{
- player addRating 10000;
- },"BIS_fnc_spawn",true] call BIS_fnc_MP;
- [{
- ["Blue team wins", 0, -0.3, 5] spawn BIS_fnc_dynamicText
- },"BIS_fnc_spawn",true] call BIS_fnc_MP;
- "skip time"; [{ _howManyHours = 5; skipTime _howManyHours; },"BIS_fnc_spawn",true] call BIS_fnc_MP;
- // spectate
- // https://community.bistudio.com/wiki/Spectator_Mode
- waitUntil {!(isNull (findDisplay 46))};
- RscSpectator_allowFreeCam = true;
- spectator_layer = "BIS_fnc_respawnSpectator" call bis_fnc_rscLayer;
- spectator_layer cutrsc ["RscSpectator","plain"];
- spectator_layer cuttext ["","plain"];
- "tp all group units to me"; { _x setpos getpos player; } forEach units group player;
- [{hint "Everyone";},"BIS_fnc_spawn",true] call BIS_fnc_MP;
- netID cursorTarget
- [{
- (objectFromNetId "0") addAction["<t color='#ffff77'>Virtual Arsenal</t>", { ["Open",true] call BIS_fnc_arsenal; }, [], 1000];
- },"BIS_fnc_spawn",true,true] call BIS_fnc_MP;
- // zeus on the fly
- // http://forums.bistudio.com/showthread.php?186003-Zeus-only-for-admins-need-help&p=2826872&viewfull=1#post2826872
- _cur = "curator" createVehicle [0,0,0];
- _cur addCuratorAddons activatedAddons;
- player assignCurator _cur;
- this addaction ["<t color='#ffff00'>Open Virtual Arsenal</t>",{["Open",true] call BIS_fnc_arsenal}];
- this addaction ["Arsenal",{["Open",true] call BIS_fnc_arsenal}];
- player addaction ["<t color='#ffff77'>Add Arsenal to cursor target</t>",{
- [
- [
- [netID cursorTarget],
- {
- _netId = _this select 0;
- (objectFromNetId _netId) addAction["<t color='#ffff77'>Virtual Arsenal</t>", { ["Open",true] call BIS_fnc_arsenal; }, [], 1000];
- }
- ],
- "BIS_fnc_spawn",true,true] call BIS_fnc_MP;
- }];
- player addaction ["Deploy your group to map click location",{
- }];
- player addaction ["Teleport to map click location",{
- }];
- player addaction ["Turn on splendid cam",{
- }];
- ["someId", "onEachFrame", {
- player switchCamera "Internal";
- }] call BIS_fnc_addStackedEventHandler;
- ["someId", "onEachFrame"] call BIS_fnc_removeStackedEventHandler;
- profileNamespace setVariable ["aero_console_allow", true];
- 22:29 - aeroson: profileNamespace setVariable ["aero_console_allow", true];
- 22:29 - aeroson: to allow it to run anywhere
- 22:29 - aeroson: once you figure it out tell me please \o
- 22:29 - aeroson: might be worth unpacking arma content
- 22:29 - Shishketti: im not having any luck, where do i type that thing in
- 22:29 - aeroson: and looking into the zeus modules
- 22:30 - aeroson: open first in editor,
- 22:30 - aeroson: and execute it
- 22:30 - aeroson: then you can use it anywhere
- deleteVehicle cursorTarget
- call compile format[" [{ _target = objectFromNetId '%1'; _target hideObject true; _target allowDamage false; },'BIS_fnc_spawn',true] call BIS_fnc_MP; ", netID player ];
- [{
- (objectFromNetId "0") addAction["<t color='#00ff00'>Repair Vehicle</t>", { (_this select 0) setDamage 0 }, [], 1000];
- },"BIS_fnc_spawn",true,true] call BIS_fnc_MP;
- [{
- ["Open",true] call BIS_fnc_arsenal;
- },"BIS_fnc_spawn",true] call BIS_fnc_MP;
- [{
- player addAction["Add Titan AA Misille", { player addItem "Titan_AA" }, [], 1000];
- },"BIS_fnc_spawn",true,true] call BIS_fnc_MP;
- [{
- player addAction["Add Titan AT Misille", { player addItem "Titan_AA" }, [], 1000];
- },"BIS_fnc_spawn",true,true] call BIS_fnc_MP;
- [{
- enableCamShake false;
- },"BIS_fnc_spawn",true,true] call BIS_fnc_MP;
- Tasks to learn Arma scripting:
- blow up a vehicle
- teleport vehicle 10m into air
- set vehicle flying up the air
- give your self a sniper rifle
- PVPscene_POV = {
- // Limit 3rd person view to vehicles only
- [(_this select 0)] spawn {
- while {alive (_this select 0)} do {
- if (cameraView == "External") then
- {
- if (player isEqualTo vehicle player) then {player switchCamera "Internal";};
- };
- sleep 0.1;
- };
- };
- };
- found out setVariable does not work on these clases (might be more)
- _class = ["IEDUrbanBig_Remote_Ammo","IEDLandBig_Remote_Ammo","IEDUrbanSmall_Remote_Ammo","IEDLandSmall_Remote_Ammo"] call BIS_fnc_selectRandom;
- _vehicle = _class createVehicle (getpos player);
- _vehicle setVariable ["test", "works"];
- systemChat (_vehicle getVariable ["test","does not work"]);
- but it for sure works on players, units, triggers, vehicles
- ACE3 ideas
- ace_weather fast time multiplier, day length, night length
- ace_IED sync module with trigger or marker to place random ieds in it
- ace_civs / ace_enemies = enemy/civil ocupation system
- keys that switch weapons do switch positions in vehicles as well
- static lmg reload
- empty mags appear on ground as litter
- 16:59 - aeroson: you can use this code to create vehice
- 16:59 - aeroson: "2S6M_Tunguska" createVehicle position player;
- 16:59 - aeroson: 2S6M_Tunguska is class name of the vehicle
- 16:59 - aeroson: you need to know the class name first
- 17:00 - aeroson: you can get classname of the thing you are looking at by watching this?
- 17:00 - aeroson: typeOf cursorTarget
- 17:08 - aeroson: run this
- 17:08 - aeroson: to select target vehicle
- 17:08 - aeroson: battleBusTargetVehicle = cursorTarget;
- 17:09 - aeroson: then this to save all objects around it within 100m and save them into code, which will spawn them and attach them to the target vehicle
- 17:09 - aeroson: _radius = 100;
- _mainVehicle = battleBusTargetVehicle;
- _mainVehiclePos = getPosATL _mainVehicle;
- battleBusCreateCode = "";
- addLine = {
- battleBusCreateCode = format["%1
- %2", battleBusCreateCode, _this];
- };
- format['_mainVehicle = createVehicle ["%1", getPosATL player, [], 0, "CAN_COLIDE"];', typeof _mainVehicle] call addLine;
- format['_mainVehicle setVectorDirAndUp [%1, %2];', vectorDir _mainVehicle, vectorUp _mainVehicle] call addLine;
- format['_mainVehiclePos = getPosATL _mainVehicle;'] call addLine;
- '' call addLine;
- {
- _vehicle = _x;
- if(!(isPlayer _vehicle) && _vehicle!=_mainVehicle) then {
- format['_vehicle = createVehicle ["%1", [-100-random 100, -100-random 100, 0], [], 0, "CAN_COLIDE"];', typeof _vehicle] call addLine;
- format['_vehicle setPosATL (%1 vectorAdd _mainVehiclePos);', (getPosATL _vehicle) vectorDiff _mainVehiclePos] call addLine;
- format['_vehicle attachTo [_mainVehicle];'] call addLine;
- format['_vehicle setVectorDirAndUp [%1, %2];', vectorDir _vehicle, vectorUp _vehicle] call addLine;
- '' call addLine;
- };
- } forEach (nearestObjects [getPosATL _mainVehicle, ["all"], _radius]);
- 17:12 - aeroson: 17:09 - aeroson: resulting battle bus creation code should be in variable battleBusCreateCode
- 17:09 - aeroson: so watch that variable and copy paste it to save you battle bus, or execute it to create you battle bus
- 17:21 - aeroson: exec line executes code once you click exec
- 17:22 - aeroson: watch line executes code every second and shows you the result
- 17:23 - aeroson: it has simulation enabled
- 17:23 - aeroson: look at it and execute
- 17:24 - aeroson: cursorTarget enableSimulation false
- 17:24 - aeroson: so it's physics will not be simulated and you can stack vehicles inside each other then
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement