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
  • 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 Virolahti
  • TKO's Livonia
  • TKO's Rules
  • TKO's Changelog
  • TKO's Help
  • TKO's What we Need
  • 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

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 346 results

  1. Hey, all. Just wrote this event handler script the other day, and I hope to eventually implement it into a multiplayer mission. Now, I want the event handler to assign to all players on the server, so I thought I'd just create a forEach loop with the allPlayers array. The problem is, when I make reference to the _z variable within the loop it seems to mess with the commands and produce all kinds of compiling errors. As a bit of a run down, the event handler activates when the player fires their weapon. If there is a civilian in a vehicle, within 20 meters, who possesses a detonator, as well as an explosive device attached to his car, there will be a 75% chance they will detonate it. In addition, if there is a civilian driver within 50 meters, who merely carries a gun, he will be assigned to an enemy side and made enemy to the player. Now, the obvious issue is, throughout the code, the variable "player" is used, and from what I understand, it is no recommended to use it in multiplayer, hence the "forEach allPlayers" loop. Now, I thought it was merely a matter of substituting the player variable with _z, which represents a player from the allPlayers array. However, like mentioned above, it seems to cause quite a long list of errors. To be clear, the code as depicted below works flawlessly in the editor environment. Here is the code: { // All Players _z = _x; _z addEventHandler["Fired",{ _obTemp = nearestObjects [player, ["Car"], 50]; _manTemp = nearestObjects [player, ["Man"], 50]; { // All vehicles in a 50 meter radius of the player _y = _x; _hasWeap = false; if (! isnull (driver _y)) then { if ("ACE_M26_Clacker" in items driver _y && count (attachedObjects _y) > 0) then { if ((random 100) > 25 && (player distance _y < 20)) then { [(attachedObjects _y select 0), 1] call ace_explosives_fnc_scriptedExplosive; }; }; }; { // The occupants of the aforementioned vehicles _w = _x; { // The weapons of the aforementioned occupants if (_x != "" && side (driver _y) == civilian) then {_hasWeap = true}; [east, "HQ"] sideChat format ["%1", _x != ""]; } forEach weapons _w; } forEach crew _y; if (_hasWeap) then { _agGroup = createGroup (selectRandom [WEST, INDEPENDENT]); crew _y joinSilent _agGroup; { // Members of the new hostile group _x enableAI "ALL"; } forEach units _agGroup; _agGroup leaveVehicle _y; }; } forEach _ObTemp; { // All AI units in a 50 meter radius of the player _y = _x; _hasWeap = false; _unitAr = []; { // The weapons of the aforementioned AI if (side _y == civilian && _x != "") then {_hasWeap = true}; } forEach weapons _y; if (_hasWeap) then { _x enableAI "ALL"; _unitAr = _unitAr + [_y] }; } forEach _manTemp; _agGroup = createGroup (selectRandom [WEST, INDEPENDENT]); _unitAr joinSilent _agGroup; }]; } forEach allPlayers; Fair warning: I know nearly nothing about all of the multiplayer scripting quirks (and am only a beginner at programming in general), and have very little knowledge on what should be executed on solely the server, or what should be executed globally, or what should be executed by the clients, etc.. So, and pointers are more than welcome. at this point, I just need to know if I am barking up the right or wrong tree with how I am doing things.
  2. Hello, To start off I'm new to scripting and just starting dabbling in it. I'm currently making a basic script as I'm learning and it's going around finding boxes and every time you find one it adds it to the total of found boxes. I've got my box script which is this: I've got it repeating for all the boxes that I've got and I'm just not sure how to include a count when you interact with the box and I've had a google and just can't find anything. I'll also got the start to the counting script but it's not really much at this stage: I hope that someone knows how to solve this and I'm currently going through Fockers Arma Scripting PDF and KK's arma scripting blog.
  3. I get this error everytime the game starts up & when a mission is being startup. But only if i own the apex dlc! https://steamuserimages-a.akamaihd.net/ugc/964224088525703614/C8AB26D25C26A6AE7CF500F5286D1056D72CDCD7/ I have put disableSerialization in every of the 3 script files but it doesnt work either. Then i just moved every control over to uinamespace but it still is the same. What did i overlook? The script works anyway but the warning message is annoying for every subscriber ofcourse. Heres the workshop btw. The first script/function is loaded from the config: class initCompass {postInit = 1;}; here is initCompass sqf disableSerialization; waitUntil {!isNull player}; UGTX_needCompass = true; UGTX_toggle = true; UGTX_posTop = true; UGTX_imgCompImg = "\MyProject\compass\imgs\default-sfp.paa"; UGTX_imgScrollLock = "\MyProject\compass\imgs\key-scrolllock.paa"; UGTX_imgEnd = "\MyProject\compass\imgs\key-end.paa"; UGTX_imgPgUp = "\MyProject\compass\imgs\key-pageup.paa"; [] spawn { disableSerialization; while {true} do { waitUntil { UGTX_toggle && (!UGTX_needCompass OR (UGTX_needCompass && ("ItemCompass" in (assignedItems Player)))) }; _compassInit = [] spawn UGTX_fnc_showCompass; waitUntil { !UGTX_toggle OR (UGTX_needCompass && !("ItemCompass" in (assignedItems Player))) }; ["864", "onEachFrame"] call BIS_fnc_removeStackedEventHandler; GTX_ctrlGrp = uiNamespace getVariable "GTX_ctrlGrp"; GTX_compNeed = uiNamespace getVariable "GTX_compNeed"; GTX_grpBg = uiNamespace getVariable "GTX_grpBg"; ctrlDelete GTX_ctrlGrp; ctrlDelete GTX_compNeed; ctrlDelete GTX_grpBg; };}; GTX_ctrlGrp = uiNamespace getVariable "GTX_ctrlGrp"; GTX_compNeed = uiNamespace getVariable "GTX_compNeed"; GTX_grpBg = uiNamespace getVariable "GTX_grpBg"; UGTX_fnc_keyDown = { switch (_this select 1) do { case 70: { UGTX_shift = true; _title = "<t color='#fbfbfb' size='1.3' shadow='1' font='PuristaSemiBold' shadowColor='#000000' align='center'>VoyagerCompass Lite</t><br/><br/><br/>"; _text = "<img image='"+ UGTX_imgScrollLock +"' size='2' /> + <img image='"+ UGTX_imgEnd +"' size='2'/> Toggle Compass<br/><br/>"; _text2 = "<img image='"+ UGTX_imgScrollLock +"' size='2'/> + <img image='"+ UGTX_imgPgUp +"' size='2'/> Toggle Position<br/><br/>"; _needcomp = ""; if (UGTX_needCompass) then { _needcomp = "Compass in inventory required!"; }; hint parseText ( _title + _text + _text2 + _needcomp); }; case 207: { if (UGTX_shift) then { if (UGTX_toggle) then { UGTX_toggle = false; }else{ UGTX_toggle = true; };};}; case 201: { if (UGTX_shift) then { if (UGTX_posTop) then { { _x ctrlSetPosition [(ctrlPosition _x) select 0, 0.93 * safezoneH + safezoneY, (ctrlPosition _x) select 2, (ctrlPosition _x) select 3]; _x ctrlCommit 0.1; } forEach [uiNamespace getVariable "GTX_ctrlGrp", uiNamespace getVariable "GTX_compNeed", uiNamespace getVariable "GTX_grpBg"]; UGTX_posTop = false; }else{ { _x ctrlSetPosition [(ctrlPosition _x) select 0, 0.01111 * safezoneH + safezoneY, (ctrlPosition _x) select 2, (ctrlPosition _x) select 3]; _x ctrlCommit 0.1; } forEach [uiNamespace getVariable "GTX_ctrlGrp", uiNamespace getVariable "GTX_compNeed", uiNamespace getVariable "GTX_grpBg"]; UGTX_posTop = true; };};};};}; UGTX_fnc_keyUp = { switch (_this select 1) do { case 70: { UGTX_shift = false; };};}; waituntil {!isnull (finddisplay 46)}; disableSerialization; (findDisplay 46) displayAddEventHandler ["KeyDown", "_this call UGTX_fnc_keyDown;false;"];//["KeyDown", "hint str _this"]; (findDisplay 46) displayAddEventHandler ["KeyUp","_this call UGTX_fnc_keyUp;false;"]; systemChat "@VoyagerCompass-Lite 2.2 Addon:: Press [SCROLL LOCK] Key."; here is showCompass sqf disableSerialization; _comp = [] call UGTX_fnc_compileCompass; GTX_compImg = uiNamespace getVariable "GTX_compImg"; ["864", "onEachFrame",{ _sPos = screenToWorld [0.5,0.5]; _pPos = getPos player; _dir = (((((_sPos select 0) - (_pPos select 0)) atan2 ((_sPos select 1) - (_pPos select 1))) + 360) % 360)/100; _stripe = 0.96 * safezoneW; _calc = ((_stripe/570) * _dir)* 100 + (_stripe/570) * 45; GTX_compImg ctrlSetPosition [_calc - _calc*2,-0.01,_stripe,1.8 * safezoneH]; GTX_compImg ctrlSetText UGTX_imgCompImg; GTX_compImg ctrlCommit 0; }] call BIS_fnc_addStackedEventHandler; and the last one is compileCompass sqf disableSerialization; ("compassTitle" call BIS_fnc_rscLayer) cutRsc ["RscTitleDisplayEmpty", "PLAIN", -1, false]; with uiNamespace do { disableSerialization; _display = uiNamespace getVariable "RscTitleDisplayEmpty"; GTX_ctrlGrp = _display ctrlCreate ["RscControlsGroup", 7634]; GTX_ctrlGrp ctrlSetPosition [0.4 * safezoneW + safezoneX,0.01111 * safezoneH + safezoneY,0.2 * safezoneW,10 * safezoneH]; uiNamespace setVariable ["GTX_ctrlGrp", GTX_ctrlGrp]; GTX_ctrlGrp ctrlCommit 0; GTX_grpBg = _display ctrlCreate ["RscStructuredText", 7635]; GTX_grpBg ctrlSetBackgroundColor [0, 0, 0, 0.1]; GTX_grpBg ctrlSetPosition [0.4 * safezoneW + safezoneX,0.01111 * safezoneH + safezoneY,0.2 * safezoneW,0.038 * safezoneH]; uiNamespace setVariable ["GTX_grpBg", GTX_grpBg]; GTX_grpBg ctrlCommit 0; GTX_compImg = _display ctrlCreate ["RscPicture", 7636, GTX_ctrlGrp]; GTX_compImg ctrlSetText "\MyProject\compass\imgs\default-puristax2.paa"; uiNamespace setVariable ["GTX_compImg", GTX_compImg]; GTX_compImg ctrlCommit 0; GTX_compNeed = _display ctrlCreate ["RscStructuredText", 7637]; GTX_compNeed ctrlSetPosition [(0.5 * safezoneW + safezoneX)- 0.05,0.01111 * safezoneH + safezoneY,0.1,0.09 * safezoneH]; GTX_compNeed ctrlSetStructuredText parseText ("<t shadow=1><t align='center' size='0.4' font='PuristaLight'>I"); uiNamespace setVariable ["GTX_compNeed", GTX_compNeed]; GTX_compNeed ctrlCommit 0; };
  4. Hey, all. I've been attempting to create a mission for some time now, and every problem I've encountered so far, I have been able to solve... until today. Context: Simply put, the mission uses ACE, which has its own explosive framework, and to that end the ACE site does provide some useful information. Specifically, I've been using 'ace_explosives_fnc_scriptedExplosive'. The good news is, it works like a charm. The catch is that it only seems to work for explosives which are spawned in through the editor, and not those created by scripts. In my scenario, there is a trigger (code below). The idea is to have an area where all cars driven by blufor units have a demolition charge spawned and attached to said vehicle, then have it explode. The problem is the line '[_newEp, -3] call ace_explosives_fnc_scriptedExplosive;'. For whatever reason, it works wonders with explosives placed within the editor (and subsequently attached to vehicles), but doesn't do a thing for any explosive spawned in via script. I was hoping any of you, who are more versed in scripting, could shed some light on the subject. I am by no means an experienced script writer/programmer, and most of what I know is from hours of messing around, so any advice would be much appreciated. Condition Code executed by the trigger: count (nearestObjects [trig2, ["Car"], 50]) > 0; On Activation code executed by the trigger (via script): _carlist = _this select 0; { if (side (driver _x) == west) then { hint "true"; _newEp = "DemoCharge_F" createVehicle [0, 0, 0]; _newEp attachTo [_x, [0, 0, 0], "driverview"]; [_newEp, -3] call ace_explosives_fnc_scriptedExplosive; } else { hint "false" }; } forEach _carList; Where _carList is: nearestObjects [trig2, ["Car"], 50] If I had to chance a guess at what was happening, I'd wager that ACE is only applying its explosive framework to the explosives placed in the editor, while those spawned via script maintain their vanilla class attributes.
  5. 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.
  6. 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??? ;)
  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. 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.
  11. 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!
  12. 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.
  13. 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
  14. hello my Name is Ehab and I am looking for someone how can make or already have a good mission for arma 3 altis life that i can buy it i dont want any realssed old mission or somthing like that Its doesnot need to be the best mission but I want it to be good if you have what i want i can pay for the file I need the life server the sql datebase the mpmission file thank you please replay me soon
  15. 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!
  16. 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"; };
  17. 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
  18. 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.
  19. 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
  20. 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"];
  21. 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.
  22. 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!
  23. 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?
  24. Hellow everybody. Can somebody advise how to make certain script: After killing 10 east faction units - spawn marker ONE, after killing 20 units - spawn marker TWO. Thanks. Ive tried this code, but it doesnt work properly (its repeating itself)
  25. _casSpawn = "B_RangeMaster_F" createUnit [_casPos, _casGroup]; So i have got the range master to spawn to the group civilian, I need to be able to use setDamage but i have nothing to assign the spawned range master to, there is no variable for the spawned ai, so I need your help to set damage and get a variable so I can also use other scripts on the spawned range master. felipe.
×