Jump to content

Search the Community

Showing results for tags 'addAction'.



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

  1. With @Larrow's assistance, I was able to hash out the program I wanted to manage my soldiers with addAction menus. I will create a mod thread when I have the vehicle assignment actions added. Full script: myGrps = []; myGrps resize 10; myGrps = myGrps apply { [ grpNull ] }; TAG_fnc_hasBlankHC = { _bool = false; { _x params[ "_HCGrp", "_HCActionID" ]; if ( isNull _HCGrp ) exitWith {_bool = true;}; }forEach myGrps; _bool; }; TAG_fnc_isLastHCMan = { _bool = false; { _x params[ "_HCGrp", "_HCActionID" ]; if (( Group cursorTarget isEqualTo _HCGrp ) && {{ alive _x }count units _HCGrp isEqualTo 1}) exitWith {_bool = true;}; }forEach myGrps; _bool; }; TAG_fnc_JoinFunction = { _unit = _this select 0; _grp = _this select 1; _str = _this select 2; //accepting variable "unit or from Group" and "target group" if (_str == "unit") then { [_unit] joinSilent _grp; }else { { [ _x ] joinSilent _grp; }forEach units _unit; }; _leader = Leader _grp; { if(!(_leader isEqualTo _x) && {(rankId _x) > (rankId _leader)}) then { _leader = _x; }; }forEach units _grp; _grp selectLeader _leader; }; TAG_fnc_createNewHCGroup = { params[ "_unit", [ "_create", true ], [ "_wholeGroup", false ] ]; _CompanyNames = ["CompanyXray","CompanyNovember","CompanyNovember","CompanyNovember","CompanyNovember","CompanyWhiskey","CompanyWhiskey","CompanyWhiskey","CompanyWhiskey","CompanyXray"]; _PlatoonNames = ["Platoon1","Platoon1","Platoon1","Platoon2","Platoon2","Platoon1","Platoon1","Platoon2","Platoon2","Platoon1"]; _SquadNames = ["Squad1","Squad1","Squad2","Squad1","Squad2","Squad1","Squad2","Squad1","Squad2","Squad2"]; { _x params[ "_HCGrp", "_HCActionID" ]; if ( !isNull _HCGrp && { { alive _x }count units _HCGrp isEqualTo 0 } ) then { deleteGroup _HCGrp; player hcRemoveGroup _HCGrp; if ( _HCActionID isEqualType 0 ) then { player removeAction _HCActionID; }; myGrps set [ _forEachIndex, [ grpNull ] ]; _HCGrp = grpNull; }; if ( _create && { isNull _HCGrp } ) then { private [ "_group" ]; if !( isPlayer _unit ) then { _group = createGroup side player; }else{ _group = group player; }; _group setGroupIdGlobal [ "%GroupNames %GroupCompany %GroupPlatoon-%GroupSquad", "Yankee", _CompanyNames select _forEachIndex, _PlatoonNames select _forEachIndex, _SquadNames select _forEachIndex ]; if !( _unit in units _group ) then { _oldGroup = group _unit; if ( _wholeGroup ) then { units _oldGroup joinSilent _group; }else{ [ _unit ] joinSilent _group; }; if ( count units _oldGroup isEqualTo 0 ) then { deleteGroup _oldGroup; }; }; _actionID = if !( isPlayer _unit ) then { player hcSetGroup [ _group ]; [ _group ] call TAG_fnc_joinHCGroup; [ _group ] call TAG_fnc_groupJoinHCGroup; }else{ objNull; }; myGrps set [ _forEachIndex, [ _group, _actionID ] ]; _create = false; }; }forEach myGrps; }; TAG_fnc_grpJoinMe = { player addAction [ "Group Join Me", { cursorTarget setCaptive false; {[ _x ] joinSilent group player;}forEach units group cursorTarget; [ objNull, false ] call TAG_fnc_createNewHCGroup; }, [], 1, false, true, "", " !(isnull cursortarget) && (_this isEqualTo _target) && { (cursorTarget isKindof 'Man') && { (alive cursortarget) && { ( side cursortarget isEqualTo side player || captive cursorTarget ) && { (leader group cursorTarget isEqualTo cursorTarget) && { ({alive _x} count units group cursorTarget > 1) && (({ alive _x } count units group cursorTarget) + ({ alive _x } count units group player) < 12) } } } } }" ]; }; TAG_fnc_joinMe = { player addAction [ "Join Me", { cursorTarget setCaptive false; [ cursorTarget ] joinSilent group player; [ objNull, false ] call TAG_fnc_createNewHCGroup; }, [], 1, false, true, "", " !(isnull cursortarget) && _this isEqualTo _target && { cursorTarget isKindof 'Man' && { alive cursortarget && { ( side cursortarget isEqualTo side player || captive cursorTarget ) && { !(group cursortarget isEqualTo group player) && { ({ alive _x } count units group player < 12) } } } } }" ]; }; TAG_fnc_groupJoinHCGroup = { params[ "_HCGrp" ]; _actionID = player addAction [ format [ "Group Join %1", groupID _HCGrp ], { params[ "_target", "_caller", "_ID", "_args" ]; [ Group cursorTarget, _args, "" ] call TAG_fnc_JoinFunction; if (Group cursorTarget in myGrps) then { [ objNull, false ] call TAG_fnc_createNewHCGroup; }; }, _HCGrp, 1, false, true, "", format [" _group = %1 call BIS_fnc_groupFromNetId; !(isnull cursortarget) && (_this isEqualTo _target) && { (cursorTarget isKindof 'Man') && { (alive cursortarget) && { ( side cursortarget isEqualTo side player || captive cursorTarget ) && { (call TAG_fnc_hasBlankHC) && { !(Group cursorTarget isEqualTo _group) && { !(Group player isEqualTo _group) && { (leader group cursorTarget isEqualTo cursorTarget) && { ({ alive _x } count units (group cursorTarget) > 1) && { ({ alive _x } count units (_group) > 0) && (({ alive _x } count units (_group)) + ({ alive _x } count units cursorTarget) < 12) } } } } } } } } }", str ( _HCGrp call BIS_fnc_netId ) ] ]; _actionID; }; TAG_fnc_joinHCGroup = { params[ "_HCGrp" ]; _actionID = player addAction [ format [ "Join %1", groupID _HCGrp ], { params[ "_target", "_caller", "_ID", "_args" ]; [ cursorTarget, _args, "unit" ] call TAG_fnc_JoinFunction; [ objNull, false ] call TAG_fnc_createNewHCGroup; }, _HCGrp, 1, false, true, "", format [ " _group = %1 call BIS_fnc_groupFromNetId; !(isnull cursortarget) && _this isEqualTo _target && { cursorTarget isKindof 'Man' && { alive cursortarget && { ( side cursortarget isEqualTo side player || captive cursorTarget ) && { !(group cursortarget isEqualTo _group) && { ({ alive _x } count units (_group) > 0) && ({ alive _x } count units (_group) < 12) } } } } }", str ( _HCGrp call BIS_fnc_netId ) ] ]; _actionID }; TAG_fnc_HCActions = { player addAction [ "Unit to HC Group", { [ cursorTarget, true ] call TAG_fnc_createNewHCGroup; }, [], 1, false, true, "", " !(isnull cursortarget) && _this isEqualTo _target && { cursorTarget isKindof 'Man' && { alive cursortarget && { ( side cursortarget isEqualTo side player || captive cursorTarget ) && { (call TAG_fnc_hasBlankHC) } } } }" ]; player addAction [ "Group to HC Group", { [ cursorTarget, true, true ] call TAG_fnc_createNewHCGroup; }, [], 1, false, true, "", " !(isnull cursortarget) && _this isEqualTo _target && { cursorTarget isKindof 'Man' && { alive cursortarget && { ( side cursortarget isEqualTo side player || captive cursorTarget ) && { !(hcLeader Group cursorTarget isEqualTo player) && { (call TAG_fnc_hasBlankHC) && { leader group cursorTarget isEqualTo cursorTarget && count units group cursorTarget > 1 } } } } } }" ]; player addAction [ "Dismiss HC Group", { player hcRemoveGroup group cursorTarget; { _x params[ "_group", "_action" ]; if ( _group isEqualTo group cursorTarget ) exitWith { player removeAction _action; player hcRemoveGroup _group; myGrps set [ _forEachIndex, [ grpNull ] ]; }; }forEach myGrps; }, [], 1, false, true, "", " !(isnull cursortarget) && _this isEqualTo _target && { cursorTarget isKindof 'Man' && { alive cursortarget && { ( side cursortarget isEqualTo side player || captive cursorTarget ) && { leader group cursorTarget isEqualTo cursorTarget && { group cursorTarget isEqualTo ( _x select 0 ) }count myGrps > 0 } } } }" ]; }; _null = [ player, true ] call TAG_fnc_createNewHCGroup; _null = [] call TAG_fnc_joinMe; _null = [] call TAG_fnc_grpJoinMe; _null = [] call TAG_fnc_HCActions;
  2. Hello, I am having trouble wrapping my mind around this today. Help would be awesome. I would like to disable and option use for 300 seconds. I want a condition for active, but not quite sure what to use or if I have been looking at it the whole time. My idea was on use set 0 sleep for 300 sec then set it back to 1 (Example: Heli Insertion). Is this even possible if not I can disable the entire addaction did not want to? dub aka Travis //support menu _onUseCondition = ""; MENU_support = [ ["610 Options",true], ["Infantry Supplies", [2], "", -5, [["expression", "_thread = 1 spawn dub_fnc_Support610; "]], "1", "1"], ["Vehicle Ammo", [3], "", -5, [["expression", "_thread = 1 spawn dub_fnc_VDropVehAmmo;"]], "1", "1"], ["Vehicle Drop", [4], "", -5, [["expression", "_thread = 1 spawn dub_fnc_VDrop; "]], "1", "1"], ["Heli Insertion", [5], "", -5, [["expression", "_thread = 1 spawn dub_fnc_heliinsertion; "]], "1", _onUseCondition] ]; //Open menu action player addAction [("<t color=""#00ff1d"">" + ("610 Support") + "</t>"), {showCommandingMenu "#USER:MENU_support";}, [], 0, false, true, "", ""]; player addEventHandler [ "Respawn", { player addAction [("<t color=""#00ff1d"">" + ("610 Support")+ "</t>"), {showCommandingMenu "#USER:MENU_support";}, [], 0, false, true, "", ""]; }];
  3. Hi all, I experienced recently, playing on an Exile server, and choosing an action (added by a mod), the result was something totally different. Say, as example, trying to "open" a door, and obtaining a "GPS on" (toggling action in addon). It seems to me all addAction can be melt in many loaded mods, with a weird result. And i guess some reason is to be found in the way actions are handled. Let me try to explain. Please, consider this as a "feeling" more than a demonstration. Some mods like Exile, or other ones, are deeply managing the scrolling menus. Arma allows a lot of loaded mods at a time, some of them obviously using the same commands like addAction... The problem seems to me that, if each addon is consistent for its own purpose, the mix of them can be weird due to the ordinal handle (number, global variable) easy to override with another ordinal handle coming from another called addon. So, you could have the action menu "open door" ending by an "ejection" or any available action in the "alternate" context. Once again, it's just an example. (The winner is the last loaded?). One sure thing, BI improved recently the rsc Displays for their "layer". I guess these layers, as they were also ordinal handled, were too often overridden by the last similar ordinal one. Now, the layers can return strings, far more easy two differentiate when multiplying them. Perhaps, a same improvement could be done for other ordinal handles (addAction, addEvenHandler..) Not too critical for EHs as they are "stackable",... but actions aren't.
  4. Hey guys! So I have a really annoying problem that I've tried for hours to solve to no avail. Anyway, I'm trying to create an addaction with dynamic variable names on all players in multiplayer and then have it remove itself either when activated or later on in the script. The action will be to call an extraction heli, which is why I needed to add it to the players rather than the heli itself, because of the radius limitations. It seems to work perfectly on the host and on all clients as long as they join at the same time, but as soon as the first JIP player joins, the action can't be removed anymore. It's probably a simple fix but I just can't get my head around it. Here's just a simple example of how i'd like it to work. I was originally using the JIP remoteExec options rather than recreating the action on a loop but I thought it best to try and solve this problem first before getting into that. Any ideas? if (!isServer) exitWith {}; _var = "1"; call compile format [" while {true} do { [[], { testAction_%1 = player addaction [""<t color='#ff9900'>Test Action</t>"", { {player removeAction testAction_%1} remoteExec [""call"", 0]; hint ""this is a test action""; } , _this, 99, false, false, """", """"]; player setVariable [""action_Id_%1"", testAction_%1, true]; publicVariable ""testAction_%1""; }] remoteExec [""call"", 0]; sleep 10; {player removeAction testAction_%1} remoteExec [""call"", 0]; }; ", _var];
  5. SiC_fnc_placeSandBag = { _sandBag = createVehicle ["Land_BagFence_Long_F",(_this select 1) modelToWorld [0,2,0], [], 0, "CAN_COLLIDE"]; _sandBag setDir getDir (_this select 1) - 180; _id = _sandBag addAction ["Remove Sandbag", {call SiC_fnc_removeSandBag}]; }; SiC_fnc_removeSandBag = { deleteVehicle (_this select 0); }; _id = player addAction ["Place Sandbag", {call SiC_fnc_placeSandBag}]; SiC_fnc_placeFlag = { _sandBag = createVehicle ["FLAG_US_F",(_this select 1) modelToWorld [0,2,0], [], 0, "CAN_COLLIDE"]; _sandBag setDir getDir (_this select 1) - 180; _id = _sandBag addAction ["Remove Flag", {call SiC_fnc_removeFlag}]; }; SiC_fnc_removeFlag = { deleteVehicle (_this select 0); }; _id = player addAction ["Place Flag", {call SiC_fnc_placeFlag}]; SiC_fnc_placeSupplies = { _sandBag = createVehicle ["CUP_USBasicAmmunitionBox",(_this select 1) modelToWorld [0,2,0], [], 0, "CAN_COLLIDE"]; _sandBag setDir getDir (_this select 1) - 180; _id = _sandBag addAction ["Remove Supplies", {call SiC_fnc_removeSupplies}]; }; SiC_fnc_removeSupplies = { deleteVehicle (_this select 0); }; _id = player addAction ["Place Supplies", {call SiC_fnc_placeSupplies}]; SiC_fnc_placeConcertinaWire = { _sandBag = createVehicle ["ACE_ConcertinaWireCoil",(_this select 1) modelToWorld [0,2,0], [], 0, "CAN_COLLIDE"]; _sandBag setDir getDir (_this select 1) - 180; _id = _sandBag addAction ["Remove Concertina Wire", {call SiC_fnc_removeConcertinaWire}]; }; SiC_fnc_removeConcertinaWire = { deleteVehicle (_this select 0); }; _id = player addAction ["Place Concertina Wire", {call SiC_fnc_placeConcertinaWire}]; So I put this into a radio trigger and it works fine. The problem is when I use this: removeallactions player It also removes the advanced towing, sling loading, rappelling, and urban rappelling from the action menu. I need either a way to exempt these from the removeallactions. (No Progress) or I need the action ids or what to put in the second trigger. (Some progress I've gotten close) i changed all the "_id" to "id" and it got as close as removing the "Place Concertina Wire" option but that is all using player removeaction id I sincerely feel this myaction = player addAction ["Hello", "hello.sqs"]; and player removeAction myaction; holds the answer to my problem. I tested it without my content and it did what I want.
  6. Hello there, I'm making a control tower that can control multiple border gates for an upcoming server. Relatively new to scripting, and only know the abseoulte basics. All have to start somewhere. So the set up is, I have an addiction to open the script file on the Init of a object. Firstly how would I remove that add action after it has executed the script file Next part, the script so far (pls dont comment on my newbness :) _target = _this select 0; _caller = _this select 1; _actionId = _this select 2; //North Gate 1 _caller addAction ["Open North Gate 1", {NG_1 animate ["Door_1_rot", 1]}]; _caller removeAction _actionId; _caller addAction ["Close North Gate 1", {NG_1 animate ["Door_1_rot", 0]}]; _caller removeAction _actionId; So what this displays is only the second addaction, Close northgate 1, which is not what I would want to do. Ideally I would like to the person to only see the Close North Gate Addaction after executing the open northgate Addaction and for the Open Northgate addaction to be removed?. Im unsure how to write this using the SQF syntax, and have been scratching my head for the last 2 hours. Also after executing Close Northgate I would like them to see the Open northgate again. How would I go about doing this? Thanks for any help you give me! Regardless of the type of help, all help will be greatly appreciated Best Regards Rhys Priestland
  7. I was fiddling with automated script generation of ACD and was trying to improvise the method to addAction to the objects as it created them but despite no error logged the objects have no action added to them. Is this to be expected from a SimpleObject? It's also worth mentioning that I've put the code in init.sqf which could not produce the best results perhaps. private ["_objects","_object","_data"]; _data = [ ["a3\supplies_f_heli\cargonets\cargonet_01_ammo_f.p3d", [7897.9,17631.1,167.943], [[-0.927911,-0.3698,0.0472062],[0.0173306,0.0837,0.99634]],0], ["a3\supplies_f_heli\cargonets\cargonet_01_ammo_f.p3d", [7894.37,17623.2,168.52], [[0.567657,-0.823121,-0.0154131],[0.0213262,-0.00401339,0.999765]],1] ]; _objects = []; { _object = createSimpleObject [(_x select 0), (ASLToAGL(_x select 1))]; _object setVectorDirAndUp (_x select 2); _object setPosASL (_x select 1); _object addAction ["Virtual Arsenal", {["Open",true] spawn BIS_fnc_arsenal}]; _objects pushBack _object; } forEach _data; _objects;
  8. I'm trying to make an arma 3 Life admin scroll menu and i'm stuck at trying to spawn in the virtual items. Instead of having 128 block of code to spawn in 64 items I would rather cut that down if there is a way to edit variables with addActions. This is the layout of the admin menu: AdminMenu_19 = player addAction["<t size=""1.1"" font=""TahomaB"" color=""#FFFFFF"">500k Cash</t>", AdminMenu_LifeCash500k, nil,1.5, true, false]; ^ that will call the function AdminMenu_LifeCash500k AdminMenu_LifeCash500k = { _code = { if (!isNil "life_no_injection") then { life_no_injection = true; }; life_cash = life_cash + 542940; if (!isNil "life_no_injection") then { life_no_injection = false; }; }; call _code; hint "$500,000 given"; }; command to add virtual items: [true,"ITEM",AMOUNT OF ITEM] call life_fnc_handleInv; If this could also be done with the amount of item as well that will really help, I have that done now with: AdminMenu_23 = player addAction["<t size=""1.1"" font=""TahomaB"" color=""#FFFFFF"">1</t>",AdminMenu_amount1,nil,1.5, true, false]; AdminMenu_amount1 = { _code = { amount = 1; }; call _code; hint format["%1 has been selected",amount]; }; I need 2 variables called in the addAction, amount and Item.
  9. Hello lads! I'm currently making / modifying a coop mission in ArmA 3, most stuff works so far, managed to find most stuff i needed in the Forums already. Now i have a little problem, it has been explained a few times already, but i just can't seem to understand it somehow :P How can i manage to make stuff sync between all connected users ? e.g. i have some "addaction" stuff used in my mission, but some of these actions are only executed on the local client side, and not globally for all of the players. As far as i know, i will have to somehow send information (for ex. briefcase collected, which would be a addaction) to the server in which i set a server variable (for ex. briefcase_collected) to a specific value, in this case 1 / true. Then the server would share this information with all collected clients, and by changing the value of the variable, the clients would know that this task has been completed, and it would show the next. I just have no idea how i do this in arma, i am trying for quite some hours now but just can seem to get it right. I thank all of those that give me some hints in advance! B) - PsychOrange
  10. Hey boys, i've got a real big problem (the perfect start for a scripting noob ;) ). I started creating a multiplayermission in the eden editor, and i got an AI with an addaction on it. So when all mods are synced, all the player will go to the AI and all can choose the addaction. But if one of them was clicking on it, the script should run for all players at the same time. But in my case, it is not just a script like healing or teleporting. This will be a camerascript. I tried a lot of things, and they worked for me, while testing in the editor, but they are not working in multiplayer on the server. They were running just for each player, and the helis are not flying, just standing there in spawnposition. And one more importend thing, before i post my scripts: When i add a .sqf file, i will get this error: "Preprocess failed with error - Invalid file name(empty filename)" Just when i change to .sqs the script will run in editor. Init's of my AI called Opa_1: (all examples worked in Editor, but not in MP) example 1: if (isServer) then { intro = this addAction ["Legen wir los.", {Opa_1 exec "script\opaintro.sqf";}, nil, 6, True, True, "", "(_target distance _this) < 6"];} example 2: if (isserver) then {[[Opa_1, ["Legen wir los ...","script\opaintro.sqs"]],"addAction",true,true] call BIS_fnc_MP;} example 3: {Opa_1 addAction ["Legen wir los ...","script\opaintro.sqs"];} remoteExec ["bis_fnc_call", 0]; opaintro.sqs/.sqf (i just changed the filename for example 1): ? ((paramsArray select 0) == 0) : goto "del" _camera = "camera" camcreate [0,0,0] _camera cameraeffect ["internal", "back"] showcinemaborder true; opa_1 switchmove "Acts_B_out2_briefing"; opa_1 removeaction intro; ;comment "20:01:58"; _camera camPrepareTarget [-75303.13,29256.81,5625.25]; _camera camPreparePos [23691.55,16276.09,2.44]; _camera camPrepareFOV 0.324; _camera camCommitPrepared 0 ;comment "20:02:27"; _camera camPrepareTarget [84408.05,-62884.46,-6862.32]; _camera camPreparePos [23692.37,16276.17,2.65]; _camera camPrepareFOV 0.195; _camera camCommitPrepared 10 ~10 aheli1 hideobjectglobal false; aheli1 enablesimulationglobal true; aheli2 hideobjectglobal false; aheli2 enablesimulationglobal true; aheli3 hideobjectglobal false; aheli3 enablesimulationglobal true; playmusic "introbg_1"; ;comment "20:19:05"; _camera camPrepareTarget [122550.25,31165.10,2120.64]; _camera camPreparePos [23688.01,16272.10,3.95]; _camera camPrepareFOV 0.696; _camera camCommitPrepared 0 ;comment "20:19:56"; _camera camPrepareTarget aheli2; _camera camPreparePos [23686.90,16279.11,5.23]; _camera camPrepareFOV 0.033; _camera camCommitPrepared 10 ~10 titleCut ["", "BLACK OUT", 1] ~ 4 player cameraEffect ["terminate","back"] camDestroy _camera ? ((paramsArray select 0) == 0) : goto "end" titleCut ["", "BLACK IN", 5] #end exit So the srcipt will execute for the player who hits the addaction, but not for all at the other players (but thats what i want). And the helicopters just will show up for the player which hits addaction. This opaintro-script is the short one for testing. I've got a bigger one, just with more camera positions an more switchmoves an playmusic. If needed, i am able to create a link for the missionto download, but i am using mods on this. I hope they are not important for the solution. So please tell me, it's just a simple thing. And please explain your solution. This trial an error took about 8 hour's right now, and i am going crazy on that, because it is not working on the server.
  11. I have the following code in init.sqf : _won = nearestObjects [player, ["C_Offroad_01_F"], 50]; _won = str _won select [1,5]; _won = call compile _won; // script for trigger _trg = createTrigger ["EmptyDetector", getPos _won, false]; _trg setTriggerArea [3, 3, 0, false]; _trg setTriggerActivation ["WEST","PRESENT",true]; _trg setVariable ["won", _won]; _trg setTriggerStatements [ "this && !(player in (thisTrigger getVariable 'won'))", "(thisTrigger getVariable 'won') addaction [ '<t>Title</t>', 'jack\jack.sqf',"",11]", "removeallactions (thisTrigger getVariable 'won') && hint ''" ]; This will look for the nearest vehicle (id : C_Offroad_01_F) name and store it in _won. The result is that only one trigger has been created for only one vehicle (the nearest). What I would like is to have a "constant" search for the nearest vehicle for each player and then create a for this vehicle trigger. If you didn't understand the text above, then read this : Final objective would be to have an addaction on any vehicle that's in a 3 meters range of a player.
  12. Hi, This stores the motor's health of the vehicle in the local variable _motorhealth _motorhealth = vehiclename getHit "motor"; then i want the result (_motorhealth) to show as the title of a addAction. The following code snippet is taken from the internet (raw) : _myname = name player; _addaction = amo addAction [_myname,"scripts\rearm.sqf"]; And the following is my non-working code _motorhealth = vehiclename getHit "motor"; vehiclename addAction [_motorhealth,"niania.sqf"]; Any ideas how it might work ? C.Coco
  13. So.. I'm trying to add an action to an ai character however, it doesn't seem to be working. This is my script: _buyHatchBack = carseller addAction ["Buy Hatchback",{call fn_carBuySystem}, [carID = C_Hatchback_01_F, carPrice = 200]6,false,false]]; My function call "fn_carBuysystem" is: fn_carBuySystem { carSpawn = carspawn; if (Money >= carPrice) then { Money = Money - carPrice; carID createVehicle setPos (getPos carSpawn); hint ["You have bought a %1 and you have %2 dollars left.", carName, Money]; } else { hint "You do not have enough money for this car"; }; What am i doing wrong? :)
  14. Hello, I must not be see something. I have a script that creates a drone that crashes. I scripted a addaction on the drone which works fine to for MP. My question is the I cannot seem to select the drone object. From the Wiki, "target (_this select 0): Object - the object which the action is assigned to". I have in the top of the script that is called in the action _CrashedDrone = (_this select 0); I do some things which work and at the bottom of the script I set the damage to 1 but it doesn't blow up. Example: _CrashedDrone setdammage 1; I can tell you that I know for a fact that _CrashedDrone is null in collect.sqf. This is not anything crazy or complicated, so I am not sure why it being difficult. Any ideas? AddAction: [[_veh,[("<t color=""#FF0000"">" + ("Collect SSD") + "</t>"),{null=[] execVM "scripts\Collect.sqf"},[],0,false,true, "",'alive _target']],"addAction",true,true,false] call BIS_fnc_MP; collect.sqf dubl
×