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
    • 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
  • ArmA Toolmakers's Releases
  • ArmA Toolmakers's General
  • Die Hard OFP Lovers' Club's Topics
  • 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

XBOX Live


PlayStation PSN


Origin


PlayFire


SoundCloud


Pinterest


Reddit


Twitch.Tv


Ustream.Tv


Duxter


Instagram


Location


Interests


Interests


Occupation

Found 230 results

  1. Hello everyone! I've recently started my first very own A2:OA Dayz Epoch server. It's all going well and I'm loving it, so I was trying to make some improvements and learn SQF scripting. I've found this mod on this forum some time ago: https://github.com/FullyGored/Cherno-Train-Service and I decided to implement it on my server. It really worked well. The only thing I didnt like about it, is the fact that the wagon is actually the Ikarius bus, so that the players can actuall get in (because normal wagons are not "proper" vehicles - you can get inside of it by climbing the ladder but you can't sit inside of it like you do in a car). It just looked silly to me and wasn't really immersive, so I decided to do something about it. So if you look at the Train_Start.sqf file, in line 32 it's actually spawning the Ikarius Bus. I replaced it with the wagon and added my custom init script to it. _wf = "Land_wagon_box" createVehicle _pos; _wf setVehicleInit "nul = this execVM ""scripts\Train\InitWagon.sqf"";"; processInitCommands; which contains the following: _this addAction ["<t color='#FF0000'>Get on the train</t>", "scripts\Train\GetOn.sqf", [], 6, true, true, "","alive _target"]; the GetOn.sqf just attaches the player to the wagon: _wagon = _this select 0; _action = _this select 2; player removeAction _action; player attachTo [_wagon, [1, -2, -0.85]]; player setDir 270; player setVariable ["isOnTrain", true, true]; So, here comes my first problem: why does the action menu disappear once the user is attached to an object? That would make the whole thing 10x easier, because I would just add an action to get off the train and the problem would be fixed. I tried many approaches, trying to detect key presses, etc. Basically I've been fighting with this script for 2 weeks time and gotten almost there. User can get on the train but can't get off. I tried doing this: I introduce a public variable on the top of the script after line 4: trainCurrentStation = "Berezino Start"; publicVariable "trainCurrentStation"; Then, on top, under line 19 I added all station names where the train stops (check _stops variable - it holds all rail names which should ) _stopNames = ["Berezino Station", "Berezino", "Nizhnoye", "Solnichiy", "Solnichiy Factory", "Solnichiy Factory 2", "Kamyshovo", "Skalisty", "Elektrozavodsk", "Prigorodki", "Chernogorsk", "Balota", "Komarovo", "Kamenka"]; So then, since the variables are not too descriptive, I figured I can add this piece of code to line 142 - to execute that code every train stop if (_i in _stops) then { [_train] spawn _horn; _currentStop = _stopNames select _b; trainCurrentStation = _currentStop; publicVariable "trainCurrentStation"; }; And then, I added a script for the clients to init.sqf which, I assumed, would listen to the changes in the trainCurrentStation variable and then react to it waitUntil { !(isNil "trainCurrentStation") }; "trainCurrentStation" addPublicVariableEventHandler { _station = _this select 1; _isOnTrain = player getVariable "isOnTrain"; if (!isNil "_isOnTrain") then { _hintText = format ["Thank you for choosing Cherno train services.\n Current station: %1 \n If you'd like to continue your journey, get back on the train.", _station]; titleText [_hintText, "PLAIN DOWN"]; detach player; sleep .3; player setVariable ["isOnTrain", nil, true]; player setVariable ["st_mh6_enhance_ffv_active",false]; }; }; I put into the init.sqf this way: if (!isDedicated) then { // other DayZ init scripts // init train scripts execVM "scripts\Train\clientInit.sqf"; // other DayZ init scripts } But this script does basically nothing. No script errors in the console (I'm connecting with the -showScriptErrors parameter), players are still stuck on the train forever (or unless you abort and re-join the game). The script is getting executed though! I tested that and it runs, but just does nothing for some reason. Any clue what I'm doing wrong? Is there a better way of doing all this stuff? Any clue if I can find another workaround (or just enable the action menu when the player is attached to an object?). I was thinking on attaching the player and then forcing the player to sit down in the train and then wait for the change in his stance (if he gets up, then detach from the train) but I'm not quite sure how to do that. Sorry for the long post, hoping someone can help with it.
  2. Hello everyone, My problem that I want to unlock a gate door only if player has specific item. I use a Trigger for that: Activation for AllPlayer, present. In the condition line I put this: (Player need to have the Ace Cellphone to open gates). "ACE_Cellphone" in items player; In the On Activation line : house1_1 setVariable ['bis_disabled_Door_1',0,true]; house1 setVariable ['bis_disabled_Door_1',0,true]; house1 and house1_1 are 2 concrete wall gates. In my init.sqf file, I put this: house1 setVariable ['bis_disabled_Door_1',1,true]; house1_1 setVariable ['bis_disabled_Door_1',1,true]; There a no problem, It's works fine! My problem is how can the doors stay locked if the player loses or puts down the phone? I try this In a new trigger, but it don't work, !("ACE_Cellphone" in items player;); Somebody can help me??? ;)
  3. Original post: "Is there any way to make backpacks accessable only when they are on ground or by other players using 'Open Backpack' action? The goal is to make player drop the backpack to get access in its inventory and so make them more realistic." UPDATE 15th Sept. -18: An addon version made! Script provided by @pierremgi PBO provided by @HazJ Download: https://hazjohnson.com/ArmA/@realisticBackpacks.zip Addon is now signed with key and bikey.
  4. G'day guys, There has been a lot of new threads by newcomers that ask the same/similar questions, found in many other threads. If you are new to ArmA or want to get into scripting, welcome to the forums! :) As you know, there is a search box at the top of the page, it can be used to search throughout every thread what you are after. Bear in mind that it may sometimes not provide you with the proper answer. This, however, doesn't mean that another thread should be opened. In fact, there is a huge library of scripts you probably never heard of. Check it out, there is an abundant of examples provided in each script command: https://community.bistudio.com/wiki/Category:Scripting_Commands_Arma_3 It is constantly being updated with new facts, info and scripts by many of our users such as KK. (Killzone Kid) Lastly, here are some basic info and tips on scripting. To create your own scripts, navigate to "My Documents\Arma 3\missions\your_saved_mission". Then, create a text document and rename the extension ".txt" to ".sqf". Once done, open it with Notepad or Notepad++. To run your script in the game, navigate to your mission folder and create a "init.sqf". Open it and put this in: [] execVM "myscript.sqf"; If you want to get a specific unit to do some action (e.g. setDamage or setFuel), give your unit a name but without spaces. Then in a trigger, put this in: myguy setDamage 1; The symbol ";" used after each command, is to separate the command from another. (Think of it as a period symbol)Also, if you are thinking that Steam Workshop is the only place for mods, addons, scripts, etc. Armaholic is the official site for releasing such. You can find it here, they also have a FAQ as well: http://www.armaholic.com If you want to convert a string to code, you can use call compile STRING. This is very handy (and sometimes a smart trick) when passing code around such as lbData. ;) This wraps up the introduction for those new to scripting. If you have any questions, concerns or ideas that may improve this thread, feel free to post here. ^_^ Happy Scripting, ;) Rawner135 ArmA 3 Tutorial Links: Arma 3 Scripting Tutorial For Noobs - forums.bistudio.com [Tutorial] Server Side Scripting - forums.bistudio.com Camera Scripting - www.armaholic.com KK's blog - ArmA Scripting Videos: Modding Tutorials by GameDev Byrne: https://www.youtube.com/playlist?list=PLqRU_EL4pwOHOJ6L2P5XlpfmNoWqulZqf Other Tutorial Links: http://www.kylania.com/ex/ Conversation System Mission Editor ArmA 2 Mission Editor Triggers OFPEC ArmA 2 Scripting Commands ArmA2 COMREF Forums Post - Classnames ArmA2 Library ArmAholic ArmA2 Moves ArmA2 Modules Description.ext Scripting Topics (Check All Links) Startup Parameters Crash Files Tasks ARMA 2 Functions PostProcess Effects
  5. Last content update: 6/13/2018 showing how to use the radius for addAction, using params instead of select, adding to arrays with various commands, altering arrays with various commands, get/setUnitLoadout Last content update: 6/10/2018 going through config files and getting details to sort what you want, using radius with addAction, params, and altering arrays with resize, pushBack, pushBackUnique, set, and append and going over to assist with resize count. Last content update: 5/27/2018 added GUI tutorial for how to make a weapon selector using cfgWeapon Last content update: 5/24/2018 added sector control tutorial Last content update: 5/21/2018 This is my arma 3 scripting tutorial series which is aimed to help both people getting into making their own scripts with fairly detailed simple tutorials as well as for the intermediate person looking to create their own features for their missions. The plans for this series is to almost fully cover everything behind the arma 3 missions that people play on a daily basis and have enough content provided in the videos where people can go off and make their own vision for their mission with the knowledge gained. Most of these videos are made on the fly at 1AM-4AM without any pretesting which should give someone the idea of what goes into finding syntax errors and narrowing down a bug that's causing your feature to not function properly. It is also an excuse for you to cut me some slack if you see mistakes :) . A lot of these tutorials are made with multiplayer in mind since I think most people want to play their missions online with their friends(which is why publicVariable has been utilized so much so new people can get a good grasp on the power those commands have). New videos are added to the playlist almost every day so if your stuck with something, maybe it has been covered in a video. If you have any requests on what you would like to see made then please suggest it here. topics covered so far Scripting tutorial playlist Database tutorials with INIDBI2 playlist GUI/Dialog tutorials playlist
  6. Gentlemen, I am looking for a way to pull one array each for Uniforms, vests, backpacks, headgear and so on from configfile, similar to below example for weapons. I would like to pull all equipment items, and then pick out all uniforms or vests or.... (whatever group of items that I want to make an array for) by filtering it by the "parent" name. (eg, below example "if "rifle" in _parents) Now I tried to find the correct parents in config viewer by placing an uniform in eden editor and then rightclick + show in config viewer, but i think i get the wrong parents there (maybe just the vehicle for the placed uniform / "groundweaponholder"?) Anyway none of the parents work and i wonder where i am going the wrong way. For backpacks for example, I selected a backpack from the cfg vehicle list in the config viewer and found the parent "Bag_Base" (or something like that) and it would return an array of backpacks, however, many of the backpacks would contain items. Is there a way to avoid this? In the end I only want each array to contain empty vests/uniforms/backpacks. I think my problem is that I use the wrong method to search for an example classname in config viewer and therefore it provides me with wrong parents. I would appreciate any help or guidance in that respect;) Thanks VD
  7. I'm looking for a way to stop a specific vehicle from being able to be blown up. I want the hull and engine to be invincible, so that the vehicle won't explode when hit, but the wheels should still be vulnerable so that it can still be disabled, just not destroyed/blown up. I'm looking for this to be achieved within the vehicles init field, or via an external script. The reason I want this to be possible is because I don't want a simple vehicle respawn in my mission like I have now. I want to punish players for getting a vehicle blown up, making them have to airlift the damaged vehicle back to base where it can be repaired (I don't need help with the airlift or repairs I've got that covered, just need help on making the vehicles hull and engine invulnerable.) Are there any scripts out there which can help me a achieve this? I was looking into the "SetHit" functionality etc but I am a total noob when it comes to scripting. To be completely honest with you I'd love for someone to figure this out for me as I really don't have a lot of time to dedicate to testing and playing about with things myself
  8. I'm looking for a way to stop a specific vehicle from being able to be blown up. I want the hull and engine to be invincible, so that the vehicle won't explode when hit, but the wheels should still be vulnerable so that it can still be disabled, just not destroyed/blown up. I'm looking for this to be achieved within the vehicles init field, or via an external script. The reason I want this to be possible is because I don't want a simple vehicle respawn in my mission like I have now. I want to punish players for getting a vehicle blown up, making them have to airlift the damaged vehicle back to base where it can be repaired (I don't need help with the airlift or repairs I've got that covered, just need help on making the vehicles hull and engine invulnerable.) Are there any scripts out there which can help me a achieve this? I was looking into the "SetHit" functionality etc but I am a total noob when it comes to scripting. To be completely honest with you I'd love for someone to figure this out for me as I really don't have a lot of time to dedicate to testing and playing about with things myself
  9. I am working on a mission that uses the Aliascartoon's rather awesome JDAM script. However the script requires an object as the target. An invisible helipad will do. However I would like to have the invisible marker move to the position that a player is lasing using the laser designator whenever a script is activated. I tried to search the forums but couldn't find anything that I would get to work. I have tried playing around with the getmarkerpos and getpos laserTarget player commands but without success. Any tips?
  10. VBS3 Scripting editor help needed

    Hello everybody! I am a research student working on his final thesis on a Helicopter Simulator implemented in VBS3. I would need to do some script in order to create a training field in VBS3, something like targets appearing that responde when you pass throught. I was used working with unity and there it´s easy to access the editor and code there. Here in VBS3 I think it´s different, I have seen that there is the possibility of writing and external function and name it with .sqf extension and then call it, but where do I call it in VBS3? Isn´t is possible to write some code directly inside VBS3? Are there any other ways of creating interaction between things without scripting? I wish a good day to all of you, Marco Gotelli
  11. I'm trying to use this script to make my units charge without shooting back at the enemies _x setskill ["courage",1]; _x setCombatMode "RED"; _x ForceSpeed 10; _x allowFleeing 0; _x disableAI "Target"; _x disableAI "Autotarget"; _x SetUnitPos "UP"; _x disableAI "AUTOCOMBAT"; _x disableAI "COVER"; _x disableAI "SUPPRESSION"; _x disableAI "AUTOCOMBAT"; } forEach [v1_1,v2_1,v3_1,v4_1,v5_1,v6_1]; but i get an error that says "Init: Local variable in global space" Help would be appreciated. Thank you.
  12. I have got the "Heroes Survive" scripts to semi work on my template scenario, but when you start "freezing" no damage is shown, and you basically drop dead when your body temperature hits 89F. No warning, just dropping dead. I am no coder, so someone may find the issue right away lol. Thanks for the help!
  13. Hi. Anyone know how to make these animated/clickable markers on the map..? Like in arma 2 warfare for example where you select respawn location. I don't know where to start with it Never dealt with it before
  14. Next to already revealed an known https://community.bistudio.com/wiki/Category:Arma_3:_New_Scripting_Commands_List There are more script commands now :) + fixed http://feedback.arma3.com/view.php?id=12324 + only discussion related to new or changed Arma 3 Beta/Dev Scripting allowed
  15. I was wondering if anyone knows how to create a script for crafting guns and vehicles? Like a player would need to gather materials to create steel from Iron and Coal. 15 steel to create a MXM and other materials to create attachments. Vehicles the same way. If you know how to and could help me i would appreciate it. If need payment we can talk about it.
  16. Hey, I'm making a scenario where if a member of a group's health drops below 50 the unit will unassign itself from the group and independently retreat. How would I script this sort of a .sqf? - Fisunaama
  17. Hello! I have been working on a mission for a while now, where the players have to take a big town. To do so there are multiple goals and my plan was to provide the players with little rewards for completing certain tasks. One of the rewards was supposed to be a new artillery provider (helicopter or artillery) but i cannot make it work. The mission always starts out with the player group already having access to all the support. Is there any way of setting up a trigger or something that will cause new support units to become available? Thanks in advance!
  18. Hey, I've been trying to configure how to open the antenna of the Insurgent version of the BMP 2 (HQ) vehicle model. So far I've managed to get all the Skeletonbones working except antenna_wire. I've been trying to look from .cfg files if the answer would be available but, unfortunately, I haven't been able to utilize the information by applying my current skills. The interesting detail is that the Warfare object called HQ (insurgent) has a functional animation for the antenna. Picture 1 Picture 2 Thank in Advance for the help. - Fisunaama Code1: Init line of the BMP2_HQ vehicle this animate ["Antena1", 1]; this animate ["Antena2", 1]; this animate ["Antena3", 1]; this animate ["Antena4", 1]; this animate ["Antena5", 1]; this animate ["antena6", 1]; this animate ["antena_wire", 1]; In the following code, I have copied the cfgModel details of the both BMP2_HQ as well as the HQ_WF_INS // Here is BMP2_HQ Warfare building's cfgmodels class CfgModels { class Default { sections[] = {}; sectionsInherit=""; skeletonName = ""; }; class Name_Of_Your_Model : Default { skeletonName="WF_BMPHQSkeleton"; sections[]= { "camo1", "camo2", "camo_powergenerator", }; class Animations { class Antena1 { type="rotation"; angle0=-1.570796; angle1=0; axis="antena_axis"; memory=1; minValue=0; maxValue=1.02; minPhase=0; maxPhase=1.02; source="time"; sourceAddress=0; selection="antena_1"; }; class Antena2 { type="translation"; offset0=-0.99; offset1=-0.5; axis="antena_1"; memory=1; minValue=0.19; maxValue=2.04; minPhase=0.19; maxPhase=2.04; source="time"; sourceAddress=0; selection="antena_2"; }; class Antena3 { type="translation"; offset0=-0.99; offset1=-0.5; axis="antena_1"; memory=1; minValue=0.36; maxValue=3.06; minPhase=0.36; maxPhase=3.06; source="time"; sourceAddress=0; selection="antena_3"; }; class Antena4 { type="translation"; offset0=-0.99; offset1=-0.5; axis="antena_1"; memory=1; minValue=0.53; maxValue=4.08; minPhase=0.53; maxPhase=4.08; source="time"; sourceAddress=0; selection="antena_4"; }; class Antena5 { type="translation"; offset0=-0.99; offset1=-0.5; axis="antena_1"; memory=1; minValue=0.7; maxValue=5.1; minPhase=0.7; maxPhase=5.1; source="time"; sourceAddress=0; selection="antena_5"; }; class Antena6 { type="translation"; offset0=-0.99; offset1=-0.5; axis="antena_1"; memory=1; minValue=0.87; maxValue=6; minPhase=0.87; maxPhase=6; source="time"; sourceAddress=0; selection="antena_6"; }; class Antena_wire { type="translation"; offset0=-8; offset1=-2.47; axis="antena_1"; memory=1; minValue=5.994; maxValue=6; minPhase=5.994; maxPhase=6; source="time"; sourceAddress=0; selection="antena_wire"; }; }; }; }; // And here in turn the BMP2_HQ vehicle's cfgmodels antena-part class Antena1 { type="rotation"; angle0=-1.570796; angle1=0; axis="antena_axis"; memory=1; minValue=0; maxValue=0.17; minPhase=0; maxPhase=0.17; source="Antena1"; sourceAddress=0; selection="antena_1"; }; class Antena2 { type="translation"; offset0=-0.99; offset1=-0.5; axis="osavelitele"; memory=1; minValue=0.19; maxValue=0.34; minPhase=0.19; maxPhase=0.34; source="Antena2"; sourceAddress=0; selection="antena_2"; }; class Antena3 { type="translation"; offset0=-0.99; offset1=-0.5; axis="osavelitele"; memory=1; minValue=0.36; maxValue=0.51; minPhase=0.36; maxPhase=0.51; source="Antena3"; sourceAddress=0; selection="antena_3"; }; class Antena4 { type="translation"; offset0=-0.99; offset1=-0.5; axis="osavelitele"; memory=1; minValue=0.53; maxValue=0.68; minPhase=0.53; maxPhase=0.68; source="Antena4"; sourceAddress=0; selection="antena_4"; }; class Antena5 { type="translation"; offset0=-0.99; offset1=-0.5; axis="osavelitele"; memory=1; minValue=0.7; maxValue=0.85; minPhase=0.7; maxPhase=0.85; source="Antena5"; sourceAddress=0; selection="antena_5"; }; class Antena6 { type="translation"; offset0=-0.99; offset1=-0.5; axis="osavelitele"; memory=1; minValue=0.87; maxValue=1; minPhase=0.87; maxPhase=1; source="Antena6"; sourceAddress=0; selection="antena_6"; }; class Antena_wire { type="translation"; offset0=-8; offset1=-2.47; axis="osavelitele"; memory=1; minValue=0.999; maxValue=1; minPhase=0.999; maxPhase=1; source="Antena_wire"; sourceAddress=0; selection="antena_wire"; };
  19. OFPS is looking to integrate ARSENAL into BECTI. We have had great success using custom mods like CUP. However, the amount of GEAR we have now is INSANE. Our 3.5 year old gear menu that was developed by BENNY just isn't up to the task. We would like to use arsenal as a replacement. Here's what I'd like to know from you experienced scripters: 1. Is it possible to load arsenal and not go into the virtual arena? I'd like to load the menu but keep the player in the battle space he's in. 2. Is it possible to allow a player to access gear based on a team's upgrade level, assign a cost to every piece of equipment, and check that a player has that cash before granting him access to the gear? 3. Anyone here have talent with sqf scripting and would like to help us (OFPS/BECTI) implement this? :) Thanks! -SS
  20. So as the title states I'm curious what you all think about efficiency/optimizations when it comes to writing a lengthy script/mod for a mission. My current scripted mod is AC-C4I (Air Craft Command, Contol, Computers, Communications, & Intelligence). It has to do with sensors and targeting. The scripts have a lot of "waitUntil" commands for locking the targeting camera to screenToWorld amongst other functions. What would be the most efficient way to write this/integrate it into a mission. I can write the whole thing in one file and "call compile preprocessFileLineNumbers" on init. I can create a CfgFunctions.hpp and add it to the description.ext, or I could make it an FSM. I'd love to hear from you guys. Thanks.
  21. I am trying to set the players group to a separate group on side civilian when they are "dead" (alive on island) and then if revived have them rejoin their initial group on side east or west, but the initial group always returns grpNull deleteGroupWhenEmpty - Arguments and effects are global (wiki) ("initPlayerLocal" state) - - "initGroup" properly returns group at this point player setVariable ["initGroup", group player]; // Set the player group even when dead // Make sure group is not deleted when empty if (isGroupDeletedWhenEmpty (group player)) then { (group player) deleteGroupWhenEmpty false; }; (respawn event handler) - - "initGroup" returns grpNull (same result when 'player' is replaced with _unit or _corpse), as if it did not exist anymore params[["_unit", objNull], ["_corpse", objNull]]; if ((isNull _unit) || (isNull _corpse)) exitWith {}; // Set unit to civilian side _deadGroup = createGroup [civilian, false]; [_unit] joinSilent _deadGroup; // ... // Find inital group _initGroup = player getVariable["initGroup", grpNull]; // Set unit to initial group [_unit] joinSilent _initGroup; I simply want to be able to freely return the unit to and from his initial group
  22. Can someone please help me on the below: The script is working correctly bar one thing. When the marker is added to the map I want it to have in brackets (Marked by <playerName>) however currently it just adds "CAS Target (Marked by any)" Can someone explain why the name command is not returning the name of the player? I have in the Init box of the unit in the editor: nul = [this] execVM "scripts\add_markcastarget_action.sqf"; This is add_markcastarget_action.sqf _currentPlayer = _this select 0; _playerName = name _currentPlayer; sleep 10; fnc_addActionMP = { private["_object", "_screenMsg", "_scriptToCall"]; _object = _this select 0; _screenMsg = _this select 1; _scriptToCall = _this select 2; if(isNull _object) exitWith {}; _object addaction [_screenMsg,_scriptToCall]; }; [_currentPlayer, "<t color='#f20000'>" + "Mark CAS Target" + "</t>", { titleText ["Click to mark CAS Target location.", "PLAIN"]; openMap [true, false]; _attachedTo = (_this select 0); ["mk_cas", "onMapSingleClick", { titleText ["", "PLAIN"]; _markerName = "CASMARKER_" + (str _pos); _marker = createMarker [_markerName, _pos]; _marker setMarkerType "hd_destroy"; _marker setMarkerColor "ColorRed"; _marker setMarkerText format["CAS Target (Marked by %1)", _playerName]; ["mk_cas", "onMapSingleClick"] call BIS_fnc_removeStackedEventHandler; true; }, [_attachedTo]] call BIS_fnc_addStackedEventHandler } ] remoteExec ["fnc_addActionMP"];
  23. Interesting problem I know. It probably is something quite simple but I can't figure it out. Now, I'm fairly new to scripting (about six months) so I'm not 100% sure what I should do. The basic premise is that the player has a UAV with an M136 launcher on it. The drone then fires that launcher. Got that part down. I've even got it so that the drone rearms when it goes back to "Home". Now, what I'd like to do is to have the players rearm it in the field. They can have a launcher on their back, bring the drone to them and then attach the launcher onto the drone. The drone has a new launcher and the player looses theirs. Here is the code that I have so far. I know that it must be very simple but any help is very much welcome in advance. For you're consideration, I'm using ACE, CBA, RHS (All four modules) and more quality of life mods. Nothing that would effect scripting in any way.
  24. Hello guys, I'm working on my own mission for multiplayer, actually on hostage rescue task. I've done triggers to make task accomplish when two insurgents are dead or failed if civs ( hostages ) are dead. Now I need your help. I need to solve out how to make hostages join group of player who saved them, maybe better by addAction in civs init and then leave player's group when hostages (civ1 and civ2) are present in trigger (base) I'm not much experienced with scripting, so I'm trying to make as much things as possible in editor by triggers. Still don't understand how to use scripts in sqf and sqs files. For example I did one action on laptop that spawn mk82 on given object ( this addaction "Blow off castle", "CastleBomb.sqf"; ) ( CastleBomb.sqf > CastleBomb01="Bo_Mk82" createVehicle (getPos CastleBomb01); ), that's only thing I understand in scripting, using these simple scripts. I can't use "if", "else", "then" and these things. Also if you could explain me how to make trigger if I want to make trigger triggered when three insurgents are dead. ( Actually I have done it by " !alive opf1 and !alive opf2 ", and I don't know how to make list of objects with combination of !alive ) So if anyone can help me: Civ1, Civ2 = Hostages Opf1, Opf2 = Insurgents Base = trigger ( triggered when hostages are present ) If you could explain me: Using multiple given objects with combination of !alive (I'd like to make for example "!alive civ1, civ2, civ3...." but not possible) How to make teleport action (on flag pole of OPFOR) hidden if BLUFOR is present in trigger around enemy weapon cache and then reveal if there's no BLUFOR anymore in trigger. ( Tried it by repeating trigger: Activation: "OPFORFlag removeAction 0;" Deactivation: "OPFORFlag addAction "Teleport to Weapon Cache 1", Teleport.sqf" but it worked one time and then it won't remove action but only adds action Using sqf or sqs and "if", "else", "then"... I think I could get it if you explain me some practical usage of these things. Thank you a lot!
  25. Hello, so i am trying to figure out the code behind checking whether or not an entire unit is dead Here is the code i tried but didn't have no success players = allPlayers; { if(side _x == west) then { //Exectute code for all dead. } } foreach _players allDead; can anyone help me?
×