Search the Community
Showing results for tags 'loop'.
Found 22 results
-
Update Variables | Player Name | Show on Billboard
SirBassi posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hello everyone, as a non-trained programmer but a motivated mission builder, I am contacting you again today with a small problem in which I am sure I am just missing a small thing. Background: I have a trait switcher in the mission where players can select a role as Medic, Engineer or Explosive Specialist. These roles are limited. I would like to set up a billboard next to the role switcher that shows which player currently has which role or which roles are actual unused. My problem: When I test in Selfhost MP, after a selected role, it gives me the role description that is stored on the slot instead of my player / profile name. In another Testplayer sot, it brings me the correct player / profile name of me but still with the current group, which is not needed and does not look good in terms of space / layout. Since my native language is German, a short explanation: String "unbesetzt" means "actually unused". Any dedicated requirements have not yet been checked, first of all everything should work. I hope that I haven't made any major mistakes from the performance side, even if there is certainly a more elegant way, but I'm glad to have created a working basis for now. Following script is actually called in init.sqf by execVm: Thanks a lot for Feedback and ideas how I could handle the "nameproblem" best. -
hello, Im new at Arma and i want to create a new server with some mods that is see on other server. but i get a warning an the server restarts. i need help 😄 22:45:08 [CBA] (xeh) INFO: [18356,89.798,0] PreInit started. v3.15.6.211004 22:45:09 [CBA] (xeh) WARNING: One or more children of class CAManBase do not support Extended Event Handlers. Fall back to loop. what do i have to send you for help. thanks a lot
-
animationloop how can ı loop animation with eden editor
Phantommm posted a topic in ARMA 3 - EDEN EDITOR
arkadaşlar, edenle öğretimle bir animasyonu nasıl modele sokabilirim pls da bir şey sadece eden merhaba ya da kapsamlı var. Hi guys how can ı loop an animation with eden editor ı cant using sqf.Thanks for your help -
Start looping object Animation when placing it in EDEN
Prodeath21 posted a topic in ARMA 3 - ADDONS - CONFIGS & SCRIPTING
Hey, currently I am working on a small "just for fun" addon to get better knowledge about Arma´s static objects and how to create them. At the moment I am creating a mini golf course with a windmill and i want to animate (spinn) the rotor of it. My Problem is, that i want to constantly rotate the windmill like the default windturbines in Arma 3, but slower. I was looking into the default turbines configs but had problems to understand how the animations work and start at the spawn. I also tryed to trigger my animation via a UserActions in the config.cpp, wich worked but it still was/is not the final solution for me. I also found out about the "sourceAddress="loop";" option after researching but it´s still not working 😞 I hope that explained my problem pretty well. Has anyone a solution, on how to fix that? My objects Class (inherited into CfgVehicles (config.cpp)) class Pro21_Bahn_5 : Static { author = "Prodeath21"; displayName = "$STR_Pro21_Bahn_5"; scope=2; model = "\Pro21_Minigolf\Bahn_5\Bahn_5.p3d"; icon = "\Pro21_Minigolf\default\icons\minigolf.paa"; editorCategory="Pro21_Addon"; editorSubcategory="Pro21_Objects"; //picture = "\Pro21_Minigolf\default\icons\default.paa"; //vehicleClass = ""; class AnimationSources { class windrad { source = "user"; //default "user" animPeriod = 12; //Dauer einer periode (Sekunden) }; }; }; My model.cfg class CfgSkeletons { class Default { isDiscrete = 1; skeletonInherit = ""; skeletonBones[] = {}; }; class Pro21_Bahn_5_sceleton: Default { skeletonInherit = "Default"; skeletonBones[]= { "wind","" }; }; }; class Rotation; class CfgModels { class Default { skeletonName=""; sections[]={}; sectionsInherit=""; }; class Bahn_5: Default { skeletonName="Pro21_Bahn_5_sceleton"; sections[]={""}; sectionsInherit=""; class Animations { class windrad { type = "rotation"; source = "user"; selection = "wind"; axis = "wind_axis"; sourceAddress="loop"; memory = 1; minValue = 0; maxValue = 1; animPeriod = 0; angle0 = "0"; angle1 = "rad -360"; }; }; }; }; Thank you for your help! 🙂- 3 replies
-
- arma 3
- config.cpp
-
(and 3 more)
Tagged with:
-
Race Circuit Script (aka learning to count)
wogz187 posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
This topic is solved. Clear courses by reaching the next marker. If you're looking for the module it's available here: Drive Link This is the test rig in the demo. Adding new marks and whole new courses is easy. From here on is the original topic, I need to learn how to count. I posted this the other day, with a plea to understand why it works when, in my estimation, it shouldn't really. Regardless. I set about to simplify ring counting. I don't like having one .sqf file for each ring course. I feel like 1 or 2 scripts should be able to do this. One file if somebody helps me to learn how to count. Two if this works: Determine which course and define ring marks with generic titles, ringCOURSE.sqf-- this example shows 2 courses with 3 rings each if (ringCHALL==1) then { ring1=ringMARK1_1; ring2=ringMARK1_2; //first course second mark ring3=ringMARK1_3; rings= []execVM "ringCLEAR.sqf"; }; if (ringCHALL==2) then { ring1=ringMARK2_1; ring2=ringMARK2_2; //second course second mark ring3=ringMARK2_3; rings= []execVM "ringCLEAR.sqf"; }; and then build a switchdo case for each ring, or a waitUntil loop, or... I don't know and that's the question. Keep in mind there is only one ring with one trigger attached to drive the ring clearing script(s). This is what it needs to do, ["task1",[currentRING,true]] call BIS_fnc_taskSetDestination; ringGOAL_1 setpos (getpos currentRING); The real trick in this is how to go from: ring1, ring2, ring3, to set the variable "currentRING" in sequence. Oh, boy! I hope that makes sense! -
while loop not restarting on save load
lordfrith posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
hi folks i've written a while loop to scan for nearby buildings as player moves around. on mission load everything is working beautifully but on loading a save game the loop doesn't continue. the structure of the loop being spawned is as follows, in the mission init there is: which has a bunch of variable/function defines and then at the bottom: which contains the while loop: is there anythings obviously wrong with the scheduled/unscheduled environment thing here? I'm a bit hazy on it still... i thought when the save is loaded the while loop state would be loaded and continue -
Trouble looping through allPlayers array
Vostok7798 posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
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 replies
-
- loop
- allplayers
-
(and 2 more)
Tagged with:
-
Dynamic Shipwreck Spawner by Vandeanson
Vandeanson posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Dynamic Shipwreck Spawner by Vandeanson After a few weeks people realized that all was lost in Chernarus. With the inland being too dangerous for traveling, many gathered as much supplies as they could, loaded it into their boats and took off into the open sea. Many did not make it through the harsh weather conditions and currents... Nowadays, lucky survivors might still stumble across the rusty remains of such endeavors, washed up along the shores, when wandering along Chernarus coastlines... Showcase Videos: Functions of the script - random selection of wreck placement at any shore (with v. 2.0, it is no longer needed to place markers) - random selection of lootable props to be placed around that markere wreck - the wreck will be deleted after 3600 seconds and the script will loop, starting from scratch How to create, use and Install the script: Step 1 - init.sqf 1. Open notepad. 2. Copy this code -------> [] execVM "shipwreck.sqf"; 3. Paste the code into your notepad doc. 4. Save the notepad document with this name -----> init.sqf 5. Move the init.sqf to your mission folder. =================================== Note - if you already have an init.sqf then just add the code from 2 to it. Step 2 - shipwreck.sqf 1. Open notepad. 2. Copy this code ------> from the spoiler below 3. Paste the code into your notepad doc. 4. Save the notepad document with this name ------> shipwreck.sqf 5. Move the shipwreck.sqf to your mission folder. ========================================= NO MARKERS NEED TO BE PLACED! shipwreck.sqf Dependencies: None except Ravage and CBA (if you want to use the ravage looting system) The script works without mods too. Changelog: v.2: - need for marker placement removed - complete randomization of object placement arround wreck - some clean up -
EDIT: Solved. Add waitUntil {triggerActivated StartSpawn}; for "_i" from 1 To 4 do { to the start of the .sqf to limit the number of loops and add sleep 600; to the end, like so: Trying to make an AI group spawn at 1 of 4 locations every 10 minutes when Opfor is present. Currently, Opfor enters condition area, a group spawns correctly, but it seems Opfor has to leave and re-enter the area to trigger another spawn. I want the trigger to loop continuously every 10 minutes so long as Opfor remains present. //Trigger //EnemyWest01.sqf
-
I'm trying to make a map mission and need a helicopter loop to make it seem that the base is very active. My goal is for it to 1. take off 2 Fly away 3 Fly back 4 Land. Then for it all to repeat repeat What ever help I get I am very thankful
- 18 replies
-
- air traffic
- script
-
(and 1 more)
Tagged with:
-
Obviously based on my question my Arma scripting experience is limited. I have other coding experience but the Arma nuances make it difficult for me to find out where I am going wrong. I have done a bunch of research and I have found examples of what I want but none are working. If anyone has suggestions it would be very helpful. What I would like to do is step through the players cfgpatches and check to see if each element of that array is in another array or not. If not display text and endmission. I know this question has been asked but in each thread the examples do not work as expected. Below are the three methods I have tried to get what I want done to work. First attempt mods = ["Element1","Element2","Element3"]; _classes = []; _cfg = (ConfigFile >> "CfgPatches"); _itemCount = (count _cfg) - 1; for "_i" from 0 to _itemCount do { if (isClass (_cfg select _i)) then { _classes = _classes + [configName (_cfg select _i)]; }; }; if (!( str _classes in mods)) then { player groupChat "You are using a mod that is not allowed, please check list of approved mods. you are being returned to the lobby in 15 seconds"; sleep 15; "end1" call BIS_fnc_endMission; }; Second Attempt _mods = ["Element1","Element2","Element3"]; _patches = (ConfigFile >> "CfgPatches"); _c = count _patches; _loop = true; _n = 0; _arr []; while{_loop}do{ _cur = _patches select _n; if not(_cur in _mods) { player groupChat "You are using a mod that is not allowed, please check list of approved mods. you are being returned to the lobby in 15 seconds"; sleep 15; "end1" call BIS_fnc_endMission; }; _n = _n + 1; if(_n > _c)then{_loop = false;}; }; _arr; Third Attempt _mods = ["Element1","Element2","Element3"]; _canPass = true; { if (!(["a3_", _x] call BIS_fnc_inString)) then { if (isClass _x) then { if ((!configName _x) in _mods) exitWith {_canPass = false;}; }; }; } forEach activatedAddons; if (!_canPass) exitWith { player groupChat "You are using a mod that is not allowed, please check list of approved mods. you are being returned to the lobby in 15 seconds"; sleep 15; "end1" call BIS_fnc_endMission; }; Any suggestions on how I might get one of these are similar code to work would be a big help, Thanks in advanced.
- 8 replies
-
- array
- cfgpatches
-
(and 2 more)
Tagged with:
-
loop break when countside is used.
silentsands posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hi there, I have a problem with my loop of a trigger. as shown in this image. I use a game logic as a loop restarter for this trigger named "widerstand_counter_area_re_altivierer" which is set to "true". When I run now into that area or already respawned in it. it fires just one time and is than only again triggered when i leave and reenter the area of this trigger. Well if I delite the "AND (resistance countSide thislist) > (west countSide thislist) or (resistance countSide thislist) > (east countSide thislist)" my trigger is looped every second while I am in it also re entering activates the loop well. But now it does not controll anymore which side have now the controll of that area of the trigger. What I would like to have is 1. only living player in the area can hold/activate area/trigger. 2. let the trigger area only be controlled by the restistance when there are more (for example) restinance in it than from any other side (west; east). 3. let the counter and hint loop as long as the trigger is activated. ( widerstand_counter = widerstand_counter + 1 ; hint format ["Widerstand Punkte %1 von 100", widerstand_counter]; ) 4. When there are form the given side enough players in the area the area_marker should change its own color to for example green/guer and change to the other color of the other side when there are more of em or change to gray if there are non in the area. I hope you have all necessary informations to maybe help me out, and sorry for my probbaly bad english. Greetings Silentsands. -
Hello. I have a piece of code here that needs some polishing. some help to understand: _guard is in the middle of a city, _taskitems is not important right now. The for loop should go through all the houses in the area. This piece of code works 80% of the time without any problems. 20% of the time it gives me an error: "Undefined variable in the expression: _pos".Why does it work more often than not? I don't see my own mistake here. _houses = nearestObjects [_guard, ["house"], 400]; _crateSpawned = 0; _crateHouse = 0; _taskItems = []; _pos = 0; _defendergroup = createGroup civilian; for "_i" from 0 to count _houses -1 do { _item = _houses select _i; _chance = floor (random 5); if( (_chance == 1 && _crateSpawned == 0) || _houses select (count _houses -1) == _item) then { _positions = [_item] call BIS_fnc_buildingPositions; if(count _positions >3 || _houses select (count _houses -1) == _item) then { _pos = selectrandom _positions; _crate = createVehicle ["B_CargoNet_01_ammo_F",_pos, [], 0, "NONE"]; _crateSpawned = 1; _taskItems pushBack _crate; _crateHouse = _item; sleep 0.5; }; }; };
-
I have a music loop eventhandler set up in a trigger. It works fine the code is: 1 fademusic 1; ehID = addMusicEventHandler ["MusicStop", {playMusic ["Track2", 2];}];playMusic ["Track2", 2]; And upon Deactivation it fades the music to 0. Works good. However. I have various other triggers on objective zones which fade back in the music using different tracks. Those work fine too but after they finish playing the music is still at fade 1 and it resumes the eventhandler for the loop. So basically I want this loop to only function inside of this trigger. How do I terminate this loop upon deactivation and will it reactivate on a repeatable trigger as it should after deactivation? Any help is greatly appreciated. For anyone wondering its for a type of safe house like Resident Evil style where you enter it and your cozy warm piano loop plays and reassures you that everything is going to be alright. ;) So it needs to be repeatable in and out type of deal. Thanks.
-
This is going to be one odd request... Here's the situation - I want a line of units to form a queue. The idea is that every 10 seconds the unit at the front of the line moves to the back, and the unit behind him moves forward to take his place. The units are forming the line, and the player is supposed to wait in the line for the scenario. Here's the script I have so far: queue.sqf private ["_front","_back"]; _front = _this select 0; _back = _this select 1; while {true} do{ sleep 10; _back doMove (_front modelToWorld [0,-0.3,0]); }; _front refers to the unit in front of the _back unit in the line. Each unit in the queue executes this script with nul = [civ_1, civ_2] execVM "scripts\queue.sqf"; depending on who is in front of them. The problem with this script is that the units can only form a straight line (not such an issue), but when the unit at the front of the line moves to the back, the unit behind them doesn't move to the front of the line. In essence, the 2nd in line doesn't move and the queue slowly shifts backwards. Any pointers or obvious mistakes I've made? Thanks everyone!
-
Restricting a while loop count, but not exiting complete.
GuyJ posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hi all. I have been playing since flashy and did very basic editing over the years (triggers and a lot of borrowing from others), but at 36 now I seemingly have the urge to slowly learn how to do more complex stuff, but that also means I have limited time between watch repair and normal life! Anyway, the issue I'd appreciate some help with is something I'm sure is very simple, or whatever it is could someone be kind enough to explain their process a little or what I'm doing wrong. I don't want to just copy and paste if you know what I mean, but this is something I have tried to understand from Fockers Arma Scripting tutorial. I have a civilian playable with allowDamage false; I am watching a while loop spawn individual soldiers for both sides and then just kill each other. The while loop does this while my variable of _total <20 is being assessed. I have countAllUnits as the defined variable for _total, but it doesn't count the actual amount of units being created. Why is that, please? My issue I'd like to sort is that once I trigger the while loop from my civi player addAction and I see the units spawn, I don't want to have to repeat the addAction to 'top-up' the _total. I'd like it somewhat dynamic, so some kind of sleep before repeating the process is all my unaware script mind can think of! Hope someone can guide me. Cheers. _total = count allUnits; hint format ["Total units in game:%1",_total]; sleep 4; _grp = createGroup West; _grp2 = createGroup East; _blds = nearestBuilding AmmoSups; while {_total <20} do { sleep 1; _newsoldier = "B_Soldier_GL_F" createUnit [getPos _blds,_grp]; hint format ["Units in game:%1", _total]; _newsoldier2 = "O_support_MG_F" createUnit [getPos AmmoSups,_grp2]; hint format ["Units in game:%1", _total]; sleep 1; _grp setFormation "STAG COLUMN"; _grp setBehaviour "AWARE"; _wp = _grp addWaypoint [position AmmoSups,0]; _total = _total +1; sleep 0.5; }; hint "while loop complete."; if I local exec the hint for the total I get the actual amount which I don't want it to be so high (above 20), but I also don't want it to drop below 20 alive players at any point. A perpetual war if you will... :) -
Command in nested loops - wrong result
pierremgi posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hi, I'm in trouble with what I guessed a simple code but my double loop doesn't work. Aim: make all foot units and land vehicles without collision. Don't crush any body. To start, i did it simple: SP context. Repeatable simple scenario: On map: a Hunter player, 1 or 2 empty Hunter. (or any vehicle you want). 3 civilians. I run this simple code: 0 = [] spawn { result = []; { _veh = _x; { _unit = _x; _veh disableCollisionWith _unit; result pushBack [_veh,_unit]; } forEach (allUnits select {isNull objectParent _x}); } forEach (vehicles select {_x isKindOf "landVehicle" && !(_x isKindOf "WeaponHolderSimulated")}); hint str result; }; I obtain the hint for every couple (vehicle,civilian) but the weird thing is: - only one vehicle is fully collision disabled with the whole civilians; (last loop checked I guess) - the other vehicles are collision disabled with the last civilian (last checked probably), but not with the other ones. I did a full day of tests, coming from MP environment, as it was supposed to loop for spawned units. then simplify everything up to this basic test. Testing further, for variables: 0 = [] spawn { result1 = []; result2 = []; private ["_veh","_unit"]; // doesn't make any difference { _veh = _x; { _unit = _x; [_veh,_unit] spawn { params ["_car","_man"]; _car disableCollisionWith _man; result1 pushBack [_car,_man]; }; result2 pushback [_veh,_unit]; } forEach (allUnits select {isNull objectParent _x}); } forEach (vehicles select {_x isKindOf "landVehicle" && !(_x isKindOf "WeaponHolderSimulated")}); hint (str result1 + str result2); }; Now, my results are: - result1 = []; - result2 is a consistent array of couple (vehicle,unit)!!! Any idea? Thanks -
As someone who has learned all he knows about scripting by fannying about in SQF for the past couple of months, I've got a question for the more advanced scripters out there. I was intrigued by this statement in the ACE3 Medical AI notes: I've searched around and found a few nibbles of information here and there (and there's no documentation as yet that I've found on CBA about state machines) but nothing that really provides a decent comparison between an SQF script with a series of looped functions based on lazy evaluation of conditions, and an FSM that does the same. Is there a noticeable difference in performance or are FSMs just a different way of achieving a similar goal? And if there isn't much performance difference between the two, then what is the most efficient way of squeezing performance out of a complex script? Assuming your functions are as clean and fast as they can be, what are your best practices for making them run with minimal impact? I'm referring here to scripts with complex conditions which will run on a number of units or objects repeatedly (for reference, I'm trying to turn this into a full-blown undercover simulation and more efficiency means more responsiveness for more units).
- 27 replies
-
Vehicle respawn loop - multiple vehicles instead of one
WPK-ArmedVeteran posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hi all. I'm a total noob to Arma scripting (or scripting at all). I've read some tutorials, but still, nothing better than expirience. But, back to the point. I've been creating a MULTIPLAYER mission with Mobile HQ. I've done some testing with my friends, and generally most of things work, but there's this one issue I can't solve. Here's the code of the script I'm going to reference (the file name is mhq1.sqf and it is executed by execVM in init.sqf): MHQ1 is obviously a name of a marker I have set. mhq1 is the variable, name of object - SUV I have spawned in the editor. mhq1SpawnMarker is another marker I've put down in the base. The marker moving works fine. Now, when I am alone on the server and destroy the MHQ only one MHQ respawns. But then, when a friend of mine joins and we do the same, 2 of them spawn. If another friend join there are 3 vehicles spawning and so on. I've tried multiple variations of this code, including using remoteExec function, but no luck. I can't understand what's the issue, why this isn't working. I am aware that I could use a ready script from the net, but I'd like to learn scripting the way I'm doing it now instead of using other's work. Anyway, thans in advance for helping me out. -
Hi folks I've got an issue with trying to write a script that lets me keep doing an action until the point where I don't want to do the action any longer. A player has a camera in their gear. When they want to take a photo, the script fires up. The script makes them put away their current weapon, and an image of the back of a camera pops up on their screen. picture sharing Now the bit that has me stumped. I want to be able to have the player take as many photos as they want before putting the camera away. The script snippet I have for 'clicking' the camera is this: (The inputAction "Fire" is done by the player holding Left-Ctrl + Left mouse click). This works a treat in my script, but sadly can only be done once at the moment due to my lack of scripting know-how. I then have another script snippet which lets the rest of the script continue, thus closing the camera and letting the player get his weapon out again: (The inputAction "toggleRaiseWeapon" by default is a double tap of the Left-Ctrl key). The other problem here is that the player has to take a photo before the script continues on to the part where the player can put the camera away. What if the player opens the camera, but then decides to put it away without taking any shots. He/she can't in the script's current state. Here's the whole script currently: So in summery, I want the player to be able to point and 'click' the camera as many times and at as many objects as they want, then when they're ready, put the camera away. I hope that all makes sense. Any help with this is appreciated. Thanks heaps. Vapour
-
New Scripter, Trivial Question!
Rhys Priestland posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
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