Jump to content

Search the Community

Showing results for tags 'Scripting'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • BOHEMIA INTERACTIVE
    • BOHEMIA INTERACTIVE - NEWS
    • BOHEMIA INTERACTIVE - JOBS
    • BOHEMIA INTERACTIVE - GENERAL
  • FEATURED GAMES
    • Arma Reforger
    • Vigor
    • DAYZ
    • ARMA 3
    • ARMA 2
    • YLANDS
  • MOBILE GAMES
    • ARMA MOBILE OPS
    • MINIDAYZ
    • ARMA TACTICS
    • ARMA 2 FIRING RANGE
  • BI MILITARY GAMES FORUMS
  • BOHEMIA INCUBATOR
    • PROJECT LUCIE
  • OTHER BOHEMIA GAMES
    • ARGO
    • TAKE ON MARS
    • TAKE ON HELICOPTERS
    • CARRIER COMMAND: GAEA MISSION
    • ARMA: ARMED ASSAULT / COMBAT OPERATIONS
    • ARMA: COLD WAR ASSAULT / OPERATION FLASHPOINT
    • IRON FRONT: LIBERATION 1944
    • BACK CATALOGUE
  • OFFTOPIC
    • OFFTOPIC
  • Die Hard OFP Lovers' Club's Topics
  • ArmA Toolmakers's Releases
  • ArmA Toolmakers's General
  • Japan in Arma's Topics
  • Arma 3 Photography Club's Discussions
  • The Order Of the Wolfs- Unit's Topics
  • 4th Infantry Brigade's Recruitment
  • 11th Marine Expeditionary Unit OFFICIAL | 11th MEU(SOC)'s 11th MEU(SOC) Recruitment Status - OPEN
  • Legion latina semper fi's New Server Legion latina next wick
  • Legion latina semper fi's https://www.facebook.com/groups/legionlatinasemperfidelis/
  • Legion latina semper fi's Server VPN LEGION LATINA SEMPER FI
  • Team Nederland's Welkom bij ons club
  • Team Nederland's Facebook
  • [H.S.O.] Hellenic Special Operations's Infos
  • BI Forum Ravage Club's Forum Topics
  • Exilemod (Unofficial)'s General Discussion
  • Exilemod (Unofficial)'s Scripts
  • Exilemod (Unofficial)'s Addons
  • Exilemod (Unofficial)'s Problems & Bugs
  • Exilemod (Unofficial)'s Exilemod Tweaks
  • Exilemod (Unofficial)'s Promotion
  • Exilemod (Unofficial)'s Maps - Mission Files
  • TKO's Weferlingen
  • TKO's Green Sea
  • TKO's Rules
  • TKO's Changelog
  • TKO's Help
  • TKO's What we Need
  • TKO's Cam Lao Nam
  • MSOF A3 Wasteland's Server Game Play Features
  • MSOF A3 Wasteland's Problems & Bugs
  • MSOF A3 Wasteland's Maps in Rotation
  • SOS GAMING's Server
  • SOS GAMING's News on Server
  • SOS GAMING's Regeln / Rules
  • SOS GAMING's Ghost-Town-Team
  • SOS GAMING's Steuerung / Keys
  • SOS GAMING's Div. Infos
  • SOS GAMING's Small Talk
  • NAMC's Topics
  • NTC's New Members
  • NTC's Enlisted Members
  • The STATE's Topics
  • CREATEANDGENERATION's Intoduction
  • CREATEANDGENERATION's HAVEN EMPIRE (NEW CREATORS COMMUNITY)
  • HavenEmpire Gaming community's HavenEmpire Gaming community
  • Polska_Rodzina's Polska_Rodzina-ARGO
  • Carrier command tips and tricks's Tips and tricks
  • Carrier command tips and tricks's Talk about carrier command
  • ItzChaos's Community's Socials
  • Photography club of Arma 3's Epic photos
  • Photography club of Arma 3's Team pics
  • Photography club of Arma 3's Vehicle pics
  • Photography club of Arma 3's Other
  • Spartan Gamers DayZ's Baneados del Servidor
  • Warriors Waging War's Vigor
  • Tales of the Republic's Republic News
  • Operazioni Arma Italia's CHI SIAMO
  • [GER] HUSKY-GAMING.CC / Roleplay at its best!'s Starte deine Reise noch heute!
  • empire brotherhood occult +2349082603448's empire money +2349082603448
  • NET88's Twitter
  • DayZ Italia's Lista Server
  • DayZ Italia's Forum Generale

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Yahoo


Jabber (xmpp)


Skype


Biography


Twitter


Google+


Youtube


Vimeo


Xfire


Steam url id


Raptr


MySpace


Linkedin


Tumblr


Flickr


XBOX Live


PlayStation PSN


Origin


PlayFire


SoundCloud


Pinterest


Reddit


Twitch.Tv


Ustream.Tv


Duxter


Instagram


Location


Interests


Interests


Occupation

Found 513 results

  1. Hello. I am working on a little mission that uses a varible that i have called _time to randomly select a number from the array for a timer with the sleep command in a script. but right before the sleep i have a hint format command to tell the player. Code: _time = [45, 60, 120] call BIS_fnc_selectRandom; hint format ["All freandly units are KIA. Next avalible unit in: %1 seconds!", _time]; This is going to be a mission for more then 1 person and i haven't found out how to use this on a global stage and i can't seem to get it working with the call BIS_fnc_MP command. Any ideas?
  2. Hello, I've been thinking about a possible MOD for Arma 3 that could really produce some butt-clenching, heart pounding, gameplay moments. It's heavily inspired on the Battle Royale mod which is dying out sadly, and there's some MMO elements in them too. Anyways, I've made a small presentation that explains the idea better: https://docs.google.com/presentation/d/1LYfntb3MyRWQUp3Eyju9cyEopTPzSF_dRzpS99TxcvE/edit?usp=sharing I'm no developer, my goal with this post is to just 'test the water' and see if there is some interest in a game mod like this. Secondly if someone can enlighten me on how much work creating a minimal viable prototype of this MOD would take, or point me in the general direction of someone that can help me get this going, that would also be greatly appreciated. Thank you! best regards
  3. Hi, I just want to open this post for people who want to test with the New Rewrite of ACE Medical. It is a very simple script that can help you understand the states in which the new medical system alternates. I hope you find it useful. init.sqf addMissionEventHandler ["Draw3D", { { _unit = _x; if (!(isNil "_unit") AND ((side _unit) == west OR (side _unit) == civilian))then{ _pos = ASLToAGL getPosASL _unit; _headPos = [_pos select 0, _pos select 1, (_pos select 2) + 1.2]; _heartRate = _unit getVariable ["ace_medical_heartrate", 00]; _bloodPressure = _unit getVariable ["ace_medical_bloodpressure", [00,00]]; _bloodVolume = _unit getVariable ["ace_medical_bloodvolume", 00]; _Text = format ["HR: %1 | BP: %2 | BV: %3",_heartRate toFixed 1,_bloodPressure,_bloodVolume toFixed 1]; drawIcon3D ["", [1, 1, 1,1], _headPos, 0, 0, 0, _Text, 2, 0.03, "PuristaBold"]; _headPos = [_pos select 0, _pos select 1, (_pos select 2) + 0.5]; _state = _unit getVariable ["cba_statemachine_state0",""]; _text = ""; if(_state == "cardiacarrest")then{ _text = format["cardiacarrest (%1 s)", (_unit getVariable ["ace_medical_statemachine_cardiacarresttimeleft",0]) toFixed 1]; }else{ _text = _state; }; drawIcon3D ["", [0.1, 0.45, 1,1], _headPos, 0, 0, 0, _text , 2, 0.03, "PuristaBold"]; }; } forEach allUnits; }]; Spyke
  4. Hello, My goal is to spawn a suicide truck ( _shilux ) by script, and have it explode when it reaches the location ( rock1 ). wave4_p1.sqf _shilux = createvehicle ["B_mas_cars_Hilux_Unarmed", getMarkerPos "espawn", [], 30]; sleep 4; _grp1 = createGroup east; "CUP_I_TK_GUE_Soldier" createUnit [getMarkerPos "espawn", _grp1, "this moveindriver _shilux", 0.5]; sleep 3; _wp1 = _grp1 addWaypoint [getPos rock1, 0]; _wp1 setWaypointType "MOVE"; _wp1 setWaypointSpeed "FULL"; _wp1 setWaypointCombatMode "BLUE"; _wp1 setWaypointBehaviour "CARELESS"; sleep 4; _strigger = createTrigger ["EmptyDetector", getPos rock1, true]; _strigger setTriggerArea [0,0,0, false]; _strigger setTriggerActivation ["EAST", "PRESENT", false]; _strigger setTriggerStatements ["_shilux distance rock1 <30", "_bomb = 'M_Mo_82mm_AT_LG' createvehicle (getpos _shilux)", "hint 'Trigger off'"]; My success with this is limited; The truck follows the waypoint to rock, but does not explode. The truck just sits there waiting What am I missing here? Any help would be greatly appreciated, thanks
  5. Hi fellas, I've been scratching my head over these for a while now and not getting any closer to figuring out what's going on. I've tried the Discord a few times, but I think these questions may be a bit lengthy for that and haven't gotten any responses! Situation: finalising adding pylons and associated scripting for our modpack's helicopters, and these differ from vanilla helos in that: a) they may have both a pilot and gunner controlling pylon weapons simultaneously (rather than all pylons controlled by one or other), and b) who controls each particular pylon varies between different presets of the same vehicle. First issue: a "SAFE" weapon that we include as the first weapon for all vehicles vanishes ONLY IF the pylon loadout is altered in the mission editor. So, we have fairly standard SAFE weapon added as the initial weapon for both pilot and gunner. The weapon is defined with a magazine name that doesn't exist, and when we specify the magazines[] for the vehicle we just include nothing - so the players see a read "SAFE" weapon with no rounds that they have to swap off to actually fire anything. Having added pylons to the helicopters, these still work just fine upon loading into a mission. HOWEVER, if I alter the pylon loadout in the editor at all (via the vehicle's attributes pane, and simply swapping one ammo-type for another ammo-type for the same weapon for the pilot, for instance), then both the pilot and the gunner don't have the SAFE weapon show up any more - their initial weapon is the next in the list/first pylon, and cycling through all weapons reveal it's missing. Has anyone else experienced this, or have an idea what might be causing it? I've checked other mods out and they don't seem to encounter the issue, but I can't spot anything in their configs that reveals an obvious difference. The only workaround I can think of is to rip all weapons off on spawn and then re-add them as well as the static weapons/magazines as part of the init... but this is obviously not a great solution and also runs into the second issue. Second issue: I cannot find a reliable method via scripting to determine which seat controls which pylon station. As an example, if the vehicle's default loadout has the pilot controlling two wingtip stations and the gunner controlling two inboard stations, then if this is changed in the editor so that actually they've swapped so the pilot controls the inboard stations and the gunner the wingtip stations then I can't see any way to find this information out. As I'm trying to finalise the in-mission rearming GUI for pylons, this means that currently I have to try and guess who controls which pylon initially (to pre-set the ownership options on loading the GUI) and then store that in a custom variable after this to facilitate behaviour for the rest of the mission. It also means that I can't accurately workaround the first issue by removing and re-adding weapons/magazines due to not know the actual order to reattach them in to retain all the same animation/behaviour. It also means that the guessing function is a bloody awful nest of loops and array comparisons, with lots of checks to ensure the totals match after each step etc. Is anyone able to offer insight into either of these points? If more convenient, I'm available to chat via Discord or TS - just let me know ☺️
  6. Hi Guys, I'm having trouble with the second part of my script , I'm hoping someone with more scripting knowledge could give me a hand with this. My overall goal is to place random markers on the map which will spawn in the objects that I defined in my script. So my problem comes when a crate is spawned, no loot is being added to it. I believe its from the addweaponCargo and addItemCargo.... Here is my script : _RdmMapPos = [] call BIS_fnc_randomPos; for "_i" from 1 to selectRandom [8, 13, 15, 18, 20] do { _RdmMapPos = [] call BIS_fnc_randomPos; _mkrstr = createMarker [str _RdmMapPos, _RdmMapPos]; _mkrstr setmarkerShape "ICON"; _mkrstr setmarkerType "mil_marker"; _mkrstr setMarkerSize [1, 1]; }; { _mkrType = getMarkerType _x; switch (_mkrType) do { case "mil_marker" : { _object = selectRandom ["B_Quadbike_01_F", "Land_WoodenCrate_01_F"]; createVehicle [_object, getMarkerPos _x, [], 0, "CAN_COLLIDE"]; }; }; } forEach allMapMarkers; { _crateArray = ["Land_WoodenCrate_01_F"]; _gunsArray = ["hgun_P07_F","hgun_ACPC2_snds_F","hgun_P07_F"]; _ItemsArray = ["rvg_plasticBottle", "rvg_plasticBottlePurified", "rvg_canOpener", "rvg_spirit", "rvg_franta", "rvg_beans", "rvg_bacon", "rvg_milk", "rvg_rice", "rvg_plasticBottleEmpty", "rvg_canteenEmpty", "rvg_plasticBottle", "rvg_plasticBottlePurified", "rvg_spirit", "rvg_franta", "rvg_beans", "rvg_bacon", "rvg_milk", "rvg_rice", "rvg_money", "rvg_money", "rvg_money", "rvg_money" ]; _crateArray addWeaponCargo [selectRandom _gunsArray, round(random 2)]; _crateArray addItemCargo [selectrandom _ItemsArray, round(random 2)]; }; Cheers in advance.
  7. I am currently setting up a campaign in the Eden editor where the intro has you in a slave state area. There are some "decorations" that are basically armed units patting down civs, aiming guns at them, ect. The point of these is to show you are in a slave state, but I wanted you to get shot for interfering if you got too close. I thought the simplest way would be to set the player to OPFOR so they get shot if they try walking near the area, but now I can't figure out how to script a way to change their side, can someone help me?
  8. So I have a little problem here. I want that a zombie from the ravage adddon doesnt move. However I cant do it I tried: zombie disableAI "MOVE"; zombie enableSimulation false; doStop zombie; zombie disableAI "MOVE"; in combination with zombie disableAI "TARGET" and zombie disableAI "AUTOTARGET"; zombie disableAI "FSM"; zombie disableAI "AUTOCOMBAT"; zomibe disableAI "PATH"; and a combination of this all together but nothing worked. Anyone got a idea how I can make him stop moving?
  9. Hi! I want to make 2 west respawn modules with one infantry group to respawn at each location. How do I tie 1 group to 1 respawn marker so that group will always respawn at that marker? Like module/marker: "respawn_west", "respawn_west_1" and group: "aiGroup", "aiGroup_1" Thanks!
  10. Description: This is a GUI that allows the person who executed the script to add/assign or remove/unassign Zeus to any specified player(s). Downloads & More Information: GitHub: Pastebin: Video: Steam Guide: Curator Creator Version 1.0: * New version is coming out soon. The script was broken so I am going to re-make it myself. *
  11. I need a easier way to spawn random units instead of individually pulling all classes from the in game editor and pasting it while adding quotations and commas like this: ["B_mas_med_Army_ENG_F", "B_mas_med_Army_EXP_F", "B_mas_med_Army_GL_F",]. I want to use a script that when called it will pull a random unit from a given side of a given type (infantry, land, air) and spawn them in a group. The group will be filled with random units. I also want it to pull units from mods that I download. I dont want to have to keep updating the script every time I download another unit mod. The mod MMC sandbox has no problem in doing this but I dont know how they did it.
  12. Greetings! Long time lurker, first time poster. I've tried my best to research and resolve this myself, but I'm completely at a loss right now. What am I trying to do? I'm making a sector control mission with AI support. The idea is that the AI will check an array of enemy-held sectors, then assign a waypoint to attack accordingly. For example: No enemy sectors? Defend the nearest friendly sector. (BIS_fnc_taskDefend) One enemy sector? Assign a waypoint to attack it. Two or more enemy sectors? Pick one from the closest two and assign a waypoint to attack. AI units invoke the script using a normal execVM command when they spawn: [this] execVM "scripts\ai\sectorTacticInfantry.sqf"; What's the issue? The script throws up multiple "undefined variable" errors, but I can't understand why as they've already been defined. For whatever reason, it's like the private variables are not being passed on to the code blocks below. Here's the script so you can take a look yourselves. I should point out that the "all_sectors" global variable is an array containing the sector module names (S1, S2, S3 etc.) defined in initServer.sqf. systemChat "DEBUG: Starting sector tactic."; [] spawn {while {true} do { _unit = (_this select 0); _grp = group (_this select 0); _grp_side = side (_this select 0); _enemy_sectors = []; _friendly_sectors = []; scopeName "start"; // Update arrays of sector ownership. { if !((_x getVariable "owner") == _grp_side) then { [_enemy_sectors, _x] call BIS_fnc_arrayPush; }; } forEach all_sectors; { if ((_x getVariable "owner") == _grp_side) then { [_friendly_sectors, _x] call BIS_fnc_arrayPush; }; } forEach all_sectors; if (count _enemy_sectors == 0) then {breakTo "noEnemySectors"}; if (count _enemy_sectors == 1) then {breakTo "oneEnemySector"}; if (count _enemy_sectors > 1) then {breakTo "multipleEnemySectors"}; while {true} do { scopeName "noEnemySectors"; // There's no enemy sectors. _grp = group (_this select 0); _grp call CBA_fnc_clearWaypoints; _nearest_friendly_sector = [_friendly_sectors, _grp] call BIS_fnc_nearestPosition; [_grp, _nearest_friendly_sector] call CBA_fnc_taskDefend; breakTo "defendLoop"; }; while {true} do { scopeName "oneEnemySectors"; // There's one enemy sector. grp call CBA_fnc_clearWaypoints; _target_sector = (enemy_sectors select 0); [_grp, _target_sector] call CBA_fnc_addWaypoint; breakTo "attackLoop"; }; while {true} do { scopeName "multipleEnemySectors"; // There's more than one enemy sector. _grp call CBA_fnc_clearWaypoints; _sortedenemy_sectors = [_enemy_sectors, [], { _unit distance _x }, "ASCEND"] call BIS_fnc_sortBy; _closestenemy_sectors = []; [_closestenemy_sectors, (_sortedenemy_sectors select 0)] call BIS_fnc_arrayPush; [_closestenemy_sectors, (_sortedenemy_sectors select 1)] call BIS_fnc_arrayPush; _target_sector = (selectRandom _closestenemy_sectors); [_grp, _target_sector] call CBA_fnc_addWaypoint; breakTo "attackLoop"; }; while {true} do { scopeName "defendLoop"; // Keep defending the point until an enemy takes a sector. _enemy_sectors = []; { if !((_x getVariable "owner") == _grp_side) then { [_enemy_sectors, _x] call BIS_fnc_arrayPush; }; } forEach all_sectors; if (count _enemy_sectors > 1) then {breakTo "start"}; sleep 1; }; while {true} do { scopeName "attackLoop"; // Keep attacking the point until it's ours. if ((_target_sector getVariable "owner") == _grp_side) then {breakTo "start"}; sleep 1; }; }; }; This is my most desperate hour. Help me, Obi-Wan Kenobi BIS Forums. You're my only hope. Thanks in advance, Mr Elusive
  13. Hey folks, I am currently developing a Coast Guard Addon for Arma 3. I already modded a Coast Guard Faction and Uniforms as well as Boats and a Helicopter, and now I want to add some special Objects. A rescue basket and a life raft. I am pretty good at making 3d Models of technical objects so that was no challenge. However I am not really good at scripting configs for Arma 3 and working with the Object Builder. So I could use your help. Here is a model of the rescue basket I made https://steamcommunity.com/sharedfiles/filedetails/?id=1862964052 I was able to implement it into Arma but I need to add some features and solve some problems with your help. Features I have to add: -basket floats on water (implemented) -basket can be slingloaded to a helicopter (implemented) -basket has 2 passenger "seats" one for the survivor sitting in the basket and one for the rescue swimmer hanging on the side of the basket (implemented) -basket has strobelights for night operation (not really implemented) -lights can be toggled Problems: -basket is static, it won't fall down if placed in the air (fixed) -i dont know how to get textures on the basket (worked around) -basket doesnt move if a vehicle crashed into it (fixed) -crew view position is not where its supposed to be -sling loading behaves odd -light sources don't relly emit light to the environment Basically I want the basket to be a Boat which can't be driven because it has no motor. This is the current config of the basket class cfgPatches { class Rescue_Basket { units[] = {"Rescue_Basket"}; weapons[] = {}; requiredVersion = 0.1 requiredAddons[] = {}; }; class Life_Raft_8 { units[] = {"Life_Raft_8"}; weapons[] = {}; requiredVersion = 0.1 requiredAddons[] = {}; }; }; class CfgVehicles { class Boat_F; class Rescue_Basket : Boat_F { side = 1; scope = 2; faction = "Coast Guard"; model = "\Coast-Guard-Objects\Basket.p3d"; slingLoadCargoMemoryPoints[] = {"SlingLoadCargo1","SlingLoadCargo2","SlingLoadCargo3","SlingLoadCargo4"}; displayName = "Rettungskorb"; }; class Life_Raft_8 : Boat_F { side = 1; scope = 2; faction = "Coast Guard"; model = "\Coast-Guard-Objects\LifeRaft8.p3d"; slingLoadCargoMemoryPoints[] = {"SlingLoadCargo1","SlingLoadCargo2","SlingLoadCargo3","SlingLoadCargo4"}; displayName = "Rettungsinsel (8 Personen)"; }; };
  14. Hello, I have been trying to mod a drone from the contact campaign to have a extra weapon added to it. This was easy enough and is working well. I have got it to the point where the PKP will also dissapear when the drone is put into transport mode and reappear when placed down. The problem i am facing is that i cannot get the cosmetic PKP ontop to follow the gun barrel of the Contact drone correctly. Please see the vid below for the issue. Basically it does not seem to be referencing correctly to the barrel of the gun. I am not entirely sure where to go from this point to fix the issue. The main code for the weapon attachment is being executed as a sqf: Wep1 setDamage 1; Wep1 attachTo [Drone1,[0,0.05,0.05],"arm3"]; while {true} do { _dir = (drone1 weaponDirection currentWeapon drone1); Wep1 setVectorDirAndUp [[(_dir select 0)+0.7,(_dir select 1) +0.7,(_dir select 2) + 1],[1,-0.002,0]]; sleep 0.01; _countAlive = {alive _x} count (crew drone1); if (_countAlive==0) then { Wep1 hideObject true; } else { Wep1 hideObject false; } }; The drone is executing this code to change the weapon it is using (Variable name = Drone1): this removeWeapon "DeminingDisruptor_01_F"; this removeWeapon "Laserdesignator_mounted"; this addWeapon "CUP_Vhmg_PKT_veh"; this addMagazine "cup_100Rnd_TE1_Green_Tracer_762x54_PKT_M"; this addMagazine "cup_100Rnd_TE1_Green_Tracer_762x54_PKT_M"; this addMagazine "cup_100Rnd_TE1_Green_Tracer_762x54_PKT_M"; this addMagazine "cup_100Rnd_TE1_Green_Tracer_762x54_PKT_M"; this addMagazine "cup_100Rnd_TE1_Green_Tracer_762x54_PKT_M"; this addWeapon "Laserdesignator_mounted"; this addMagazine "Laserbatteries"; The weapon (PKM) is executing (Variable Name = Wep1): execVM "Weapon1.sqf"; Part of the issue is that the weapon its self spawns sideways so it requires corrections to be added to the weapon to keep it facing the correct direction. For setVector direct and up these were [[-0,0.002,1],[1,-0.002,0]] originally before the values that you saw in the code above were found through trial and error. It is also attached to the arm 3 of the drone as i cannot find the refrence for the gun its self. Top red triangle. The weapon its self is just executing the .SQF and the drone only has the scripting for changing the weapons and ammo in it. PKP is from CUP along with scripted weapon being used for the drone. Will have same issues with vanallia assets though. However it will work with any weapon prop as they all spawn in sideways. If anyone has any ideas on how to correct this it would be appreciated. I can also send over the mission file is needed. Thanks in advance.
  15. While I am no beginner at programming in general, I am relatively new to SQF scripting for Arma 3. After 1000 hours I decided to finally toy around with the scripting side of things and I've already completely broken my first script. I apologize for any mistakes I may have made in advance, I am really new to this and I need some help solving this problem. At the moment the script is executing, however, it is not displaying the kills in the chat as it should be. I am realizing more and more that the YouTube video I learned this from is very inaccurate and riddled with errors. ----------initClient.sqf---------- // Executes all client scripts remotely and globally (with restrictions to client only if set in the script itself). [] remoteExec ["killFeedClient", 0]; ----------initServer.sqf---------- // Executes all client scripts remotely and server-sided. [] remoteExec ["killFeedServer", 2]; ----------killFeedClient.sqf---------- // Creates "killFeedClient" function to be executed in "initClient.sqf." killFeedClient = { { // Adding an event handler for the "Killed" action to every unit. _x addEventHandler ["Killed", { // Initializes all of the variables used in the formatting of the kill-feed statement. _unit = (_this select 0); _killedBy = (_this select 1); // Organizing and grouping all of the variables into a single array. deathInfo = [_unitName, _killedBy]; // Creating the "killFeedUpdate" public variable event handler. publicVariableServer "killFeedUpdate"; }]; } forEach allUnits; }; ----------killFeedServer.sqf---------- // Creates "killFeedServer" function to be executed in "initServer.sqf." killFeedServer = { // Only runs this script if the machine executing it is the server. if (isServer) then { // Listens for updates from the "killFeedUpdate" public variable event handler. "killFeedUpdate" addPublicVariableEventHandler { // Initalizes "_deathInfo" private array and sets it's value from the previously mentioned event handler. private "_deathInfo"; _deathInfo = (_this select 1); // If you are confused by why we used 1 and not 0 refer to "addPublicVariableEventHandler" documentation on the wiki. // Extracts each variable from the "_deathInfo" private array. _unit = (_deathInfo select 0); _killedBy = (_deathInfo select 1); // Grabs some more data by passing the previously mentioned variables through a variety of functions. _unitName = name _unit; _killedByName = name _killedBy; _distance = _unit distance _killedBy; // Formats the kill-feed statement to be displayed in the game chat. _killFeedStatement = format ["%1 was killed by %2. (%3m)", _unitName, _killedByName, _distance]; // Displays the kill-feed statement in the game chat as if it were being called in by the killer. _killedBy globalChat _killFeedStatement; }; }; };
  16. Now before anyone says it, I realize that this forum is dedicated to Arma 3 and usually does not support any 3rd party addons, mods, plugins, etc., however, I believe that as CBA is such a big part of SQF scripting that I feel as if I need to learn to use it. I have tried to use the official CBA documentation on their GitHub, but if I am being completely honest, it is genuinely quite confusing and difficult for me to wrap my head around. I have some prior programming and scripting experience in languages such as C++, Javascript, Python, and a few others, yet this seems more complicated than anything I'm used to. I guess I should get to the point and ask my question. Is there any YouTube videos or written guides that can explain these CBA features to a beginner in both SQF and CBA? Any and all responses are greatly appreciated, as always! 😊
  17. Why does this spawn under water? (map: malden 2035) veh = "FIR_F16D" createVehicle ([8800,10200,300]); grp = createVehicleCrew veh; unit = grp createUnit [typeOf driver veh, grp, [], 0, "CARGO"]; bomber = grp addWaypoint [getPos spawny2, 0,0,"Bomb"]; veh setVelocity [(sin 270 * 200), (cos 270 * 200), 0];
  18. Alright, I'm going to preface this with I have barely any idea of what I'm doing. My coding experience is that I know enough to stumble around and copy and paste things to make them work, but not enough to write anything from scratch. My current project is telling an AI grenadier, to fire a smoke shell from his underbarrel grenade launcher, at the target he has been assigned by the group leader. Ideally I'd like this to be modular, so I can just shove it into the init of any grenadier I want to do that with. Bonus points if it's possible to have the AI only fire the smoke shells within a certain range. I've done digging for the past two days and came up with this. At first I had it in it's own .sqf file, but the game kept throwing errors so I did away with that and went straight for the Grenadier's Init. This code doesn't work at all. Currently it spams the console with "Suspending not allowed in this context". Which would be related to the sleep command. When I had it in it's own SQF it threw errors like "Error assignedtarget: Type Array, expected Object" or "Error Undefined variable in expression: this". I'm completely lost so any help would be appreciated.
  19. Does anyone have any idea how to use the function "BIS_fnc_isCuratorEditable" to kill curator editable units when they enter a trigger. I am trying to create a restriction zone around my map which kills the player and curator units when they enter the zone but will allow none curator units to pass through (so I can simulate reinforcements entering the region after a certain amount of time). I have been running some tests to get an idea on how the "BIS_fnc_isCuratorEditable" function works. I currently have four triggers around the map which tell me through a hint whether a unit is curator editable or not. I am now trying to work out how to change it from giving me a hint which is either true or false, to killing the unit if true or allow the unit through if false. Something along the lines of... Just can not seem to work it out. Also tried this to no avail...
  20. Hello so im creating a mission with a song that triggers when I start the mission. So in my description.ext file i've got this class CfgMusic { tracks[] = {}; class MyIntro { // display name name = "intro"; // filename, volume, pitch sound[] = { "\music\sound1.ogg", db + 0, 1.0 }; }; class MyOutro { name = "outro"; sound[] = { "\music\sound2.ogg", db + 10, 1.0 }; }; }; Copy and pasted from Bohemia's website on how to import the music/make it play and in my init.sqf file i've got the following execVM "description.ext"; playMusic "MyIntro"; vehicle player switchCamera "EXTERNAL"; Now everything works, the mission loads up, it forces you to 3rd person and even starts playing the music however no matter who's code I use I always am getting presented with this error '...s\Sniper.Stratis\description.ext" class |#|CfgMusic {tracks[] = {}; class MyIntro ...' File C:\Users\Brandon\Documents\Arma 3\mpmissions\Sniper.Stratis\desc..., line 1 Error Missing ; This above error pops up in black box on the screen the moment the mission loads. It's missing a semi colon but I have no idea where and i keep adding one and nothing, works. Any Ideas?
  21. Hey! How's it going. I wanted to see if anyone also is having troubles or have resolved a form to get backpacks rotated in Eden editor to stay as they are when the game launches? For example, I wanted to hang a backpack off a railing, the backpack once the game launches, drops to the floor as if it were dropped by a player. I've attempted to remove it's simulation, dynamic simulation, damage, showing it's model, and different combinations of each in an attempt to solve this. By any chance does someone have a fix to this or a script that can be used to paste into the init for the bag to keep it where it's at? Example photos at the Imgur link below. https://imgur.com/a/DJbB2r8 Thank you for your time! 😁
  22. Hi all, I am currently making a map which requires a Curator Editing Area to follow the player around the map. I would like it so that if an enemy of the player enters the Curator Editing Area, the Curator Editing Area is disabled (to stop him spawning stuff on top of the enemy). I have managed to write a script which has the Curator Editing Area follow the player... //init.sqf [] spawn { while { alive t1 } do { myCurator addCuratorEditingArea [ 0, position t1, 50 ]; sleep 0.05; }; }; How this works is by creating a Curator Editing Area at the position of the player every 0.05 seconds. The interesting part is that you keep the ID of the Curator Editing Area, this means that it deletes the old Curator Editing Area when the new one is created. (Curator Editing Area ID being 0 in this case). The problem I have is temporarily disabling the creation of "new" Curator Editing Area 's while an enemy is within range. So I need to be able to temporarily disable the script (which I do not know how to do).
  23. FuRixX Lamborghini

    Code question

    Any one can help my with this code that is a name filtering. script example: _letrasFuRixX = ["a","b","c","d","e","f","g","h","i","j","k","l","m","n","ñ","o","p","q","r","s","t","u","v","w","x","y","z","A","B","C","D","E","F","G","H","I","J","K","L","M","N","Ñ","O","P","Q","R","S","T","U","V","W","X","Y","Z"]; jugadorFu = name player; { checkeoFuRixX = [_x, jugadorFu, false] call BIS_fnc_inString; if (!checkeoFuRixX) exitWith { sleep 2; hint "You name is not valid in this server"; endMission "END1"; }; } count _letrasFuRixX; The problem is that I need to sparete the name player letter to letter like a string or anything: ["P","e","t","e","r"];
  24. Hello, I am trying to use the "Key Frame Animation" to make a little cinematic but I have a doubt that I have not found anywhere. Context: I already have all the modules of the "Key Frame Animation" ready and the camera moves well with the modes: Animation, Move, Nothing. Question: How should the objective to look at be introduced? I understand that it goes in the Rich Curve module, Look input. But I just didn't understand its syntax. The description says: <EdenId, TargetObject> As default: [-1, <NULL-object>] If I have an object called Target_0 which is what I want to look with the camera, what should I do? Thanks in advance. Spyke
  25. Hi everyone, I'm trying to make a script that allows you to cancel a mission by clicking on a text that says CANCEL in the description of the task. Script: _descript1 = "<execute expression=' [1] call compilefinal preprocessFileLineNumbers'DMG\functions\fn_CancelM.sqf' '>CANCEL</execute>"; And then in the task: [blufor, ["Tarea_"+_IDTarea], [_descript1,_titulo,_marker], _posicion, true, 1, true] call BIS_fnc_taskCreate; If I put it in this way the result is that nothing comes out. Thanks for your help Spyke is my first post in this forum, if I do not have to say it here please tell me. I found it here:
×