Jump to content
🛡️FORUMS ARE IN READ-ONLY MODE Read more... ×

unknownx9

Member
  • Content Count

    52
  • Joined

  • Last visited

  • Medals

Everything posted by unknownx9

  1. Hello, Lets assume I have this public variable in a script called script1.sqf: publicVariable "changeThis"; changeThis = 0; while {changeThis == 0} do{statements}; Then I have another script called script2.sqf. In this script I want to add a code that will change the value of script1.sqf publicVariable "changeThis"; to a value of '1'. How would I go about doing that? Thanks.
  2. Guess you have to un-stash from your brian. ;)
  3. hideOnUse: Boolean - (optional) If set to true, it will hide the action menu after selecting that action. If set to false, it will leave the action menu open and visible after selecting that action, leaving the same action highlighted, for the purpose of allowing you to reselect that same action quickly, or to select another action. Might be right, not sure. Kind of useless in a way in my opinion if thats the case.
  4. one way you can prevent people from using the action again is to delete the object. Name it in the editor, then at the end of the search and the task completed: deleteVehicle _intel; Another way you can prevent them from using your action is to hide the action on use: Number = unitName addAction [title, filename, (arguments, priority, showWindow, hideOnUse, shortcut, condition, positionInModel, radius, radiusView, showIn3D, available, textDefault, textToolTip)] ; This is your complete addaction call source: http://community.bistudio.com/wiki/addAction Notice one of the arguments is hideOnUse. Refer to below post hideOnUse is for just hiding the action when you use it. For transmitting the tasks there is a couple of ways you can approach this: - One way is to use a trigger. From experience and what I read you can use the trigger to transmit the task globally and I believe is JIP compatible. The easiest way to accomplish this is to destroy the intel object, by deleting it. When the trigger detects its not alive anymore, with the condition !alive objectNameHere, the condition will fire and in the condition you have your new task assignment. You can also hint from the same trigger that the task has been updated. Second way is continue what you were doing but use this for your tasks: newTask = player createSimpleTask ["tankDestroycache"]; newTask setSimpleTaskDescription ["The Enemy Stached some weapons in Tsoukalie. According to the documents found it supports Camp Maxwell and Air Station Mike-26. If we can Destroy the Cache the enemy will be weakend giving us a strategic advantage.", "tankDestroycache", "Destroy Weapons Cache"]; player setCurrentTask newTask; Then to send a hint out try this at the end of your script: [["Task Updated"],"BIS_fnc_guiMessage",nil,true] spawn BIS_fnc_MP; There is also the briefing modules in game, which allow you to set a condition of when they become active. I have not used them for a while, but I will look at them again and respond.
  5. unknownx9

    [ALPHA] ARMA 3 Crate Filler

    Here is the full code I am using: _box = _this select 0; _resupplyTime = 800; _amount = 30; while{true}do { clearWeaponCargoGlobal _box; clearMagazineCargoGlobal _box; clearItemCargoGlobal _box; clearBackpackCargoGlobal _box; _CfgPacks = configFile >> "cfgVehicles"; for "_i" from 0 to (count _CfgPacks)-1 do { _pack = _CfgPacks select _i; if(isClass _pack) then { _packName = configName _pack; _veh_class = getText(_pack >> "vehicleClass"); if(_veh_class == "Backpacks")then { _box addBackpackCargoGlobal[_packName,_amount]; }; }; }; sleep _resupplyTime; }; In the initialization: theBackPackBox = [this] execVM "Scripts\backpacks.sqf"; The box that I am using is, not sure if it matters: [blue] Supply Box
  6. unknownx9

    [ALPHA] ARMA 3 Crate Filler

    clearWeaponCargoGlobal _box; clearMagazineCargoGlobal _box; clearItemCargoGlobal _box; clearBackpackCargoGlobal _box; //Backpacks are located in cfgvehicles _CfgPacks = configFile >> "cfgVehicles"; for "_i" from 0 to (count _CfgPacks)-1 do { _pack = _CfgPacks select _i; if(isClass _pack) then { _packName = configName _pack; _veh_class = getText(_pack >> "vehicleClass");//Rather than using the type which is shared by other vehicles, I used the class type which was unique. if(_veh_class == "Backpacks")then { _box addBackpackCargoGlobal[_packName,_amount];//It will only add 1 pack for some reason. }; }; }; This script is based of your script/logic. This will pull all the backpacks from the cfgvehicles. The packs with no pictures, do not work.
  7. Hello, I am trying to do the following : Create an Array Assign the individual elements of the Array values After I am done using the array elements set them back to empty private["_location1","_location2","_location3","_location4","_groups","_route","_selectedLocation","_groupVariable"]; _route = _this select 0; //Route 1 _location1 = [[513.62207,2746.9282,310.05081],[330.89847,2698.4902,291.2688],[261.56473,2774.7625,285.56805],[151.06387,2687.646,304.80322]]; //Route 2 _location2 = [[322.29877,3026.4014,285.99854],[259.63757,3213.3926,275.20633],[379.46701,3360.7385,275.84738],[194.46994,3453.6235,244.57669]]; //Route 3 _location3 = _location2 + [383.2887,3590.7268,246.25278]; //Route 3 _location4 = _location3 + [[642.60834,3516.9346,283.97449],[779.95288,3585.0515,278.79163],[1022.7352,3554.5818,298.41965],[1332.6926,3689.5344,251.16754],[1604.546,3643.4819,238.99081]]; //Add groups to groups array _groups = ["_group1","_group2","_group3","_group4"]; //Create an HQ for east _eastHQ = createCenter east; switch(_route) do { case 1: { for [{_i=0},{_i<=2},{_i=_i+1}] do { _selectedLocation = _location1 call BIS_fnc_selectRandom; (_groups select _i) = createGroup east; (_groups select _i) = [_selectedLocation, EAST, 5] call BIS_fnc_spawnGroup; [(_groups select _i), _selectedLocation, 10] call bis_fnc_taskPatrol; hint format ["Location: %1 Selected Group: %2",_selectedLocation,(_groups select _i)]; sleep 5; }; }; etc... Problems arise in the for loop which is where I am trying to assign values to the array elements. Basically I am trying to make that array a variable holder, which contains groups. Would really appreciate the help, Thanks.
  8. unknownx9

    Problem with arrays

    Hello BlackMamb, First thank you for your reply, it helped me in what I was trying to accomplish. I have a question about that _tempGroup variable, if I wanted to rename it with each increment of _i and add the _i value to the end of it, how would I do that? (_tempGroup + _i + "") would work? Thanks again for your help.
  9. This is a script I found on Bi forums for pop up targets. I am trying to modify with my limited knowledge in scripting but it is not going well. First off to tell you what I am trying to make this script do other than what it is does well in it's current state. I am looking to make the popup targets popup in groups of 4 next to each other, rather than have 4 popups popup in 4 different location within the shooting range. I have already created the editor part of this, but was unsuccessful in modify this script. I have tried this: Hoping the above code could make any difference but to no avail. This is not what I tried alone, I have tried a lot of things but I lost track and I do not want to flood the whole page with what I have tried to do. If anyone can assist me in accomplishing my task, that would be greatly appreciated. unknownx9
  10. Hello PELHAM, If you are looking for an online video tutorials you can refer to this link(http://thenewboston.org/tutorials.php) where you can learn more than just Java, and they are all free. Anyways, if you navigate to the tutorials section and search for the java beginner and start your way from there. You will start learning from the very basic, including how to install the JDK, and eclipse. And as you get comfortable, you move to higher level tutorials. Another very important link you should always refer to is : http://docs.oracle.com/javase/7/docs/api/ . Good luck, if you have any questions you can send me a PM.
  11. unknownx9

    F/A-18 Super Hornet

    When you reach a speed before taking off runway you get the option to pull gear up, even though you are still on the ground(It does pull up gear if you click it). When I pressed "CAPS LOCK" to activate afterburner, the afterburner was coming out from the center, unlike the blue after burner colors you have. When I say center I mean between the two turbofans.
  12. Hello, If only I could use "else if" that would have made it easier for me. Anyways, I am making a multiplayer mission in which I need an AI to make a decision. I am trying to figure out how to make the AI decide where to go based on : 1. The vehicle is alive. 2. The distance from the vehicle. I currently have 2 vehicles which I placed for the AI to plan and escape with, if they are alive. First condition has to be that if both vehicles are alive or not destroyed the AI will then determine which one is the closest and move to that, and then get into it and drive it to an escape object which is place in the body of water. By the way the two vehicles are a chopper, and a boat. Also this AI is randomly spawned using a grouped marker at 3 locations, also he is moved with the setPos inside the buildings. The second option is if 1 vehicle is destroyed and another is active, the AI would be able to determine which one it is and move to it to try and escape, to the escape object placed in the body of water. If both vehicles are destroyed the AI stays in his position and disableAI"Move" is applied to him. I would like to keep this in a trigger in game, but if an outside script is the only solution, that is okay. I have tried this in my triggers but did not work: Trigger 1: Blufor, Once, Detected by OPFOR Cond: this && (alive GomezHeli || alive GomezBoat) Activation: if(alive GomezHeli) then{Gomez doMove position GomezHeli; waitUntil{Gomez distance GomezHeli<5}; Gomez moveInDriver GomezHeli; Gomez doMove position escape} else{boatTrigger setTriggerActivation ["WEST", "EAST D", false]}; Trigger 2 (Trigger Name: boatTrigger): None(Changed by the previous trigger to Blufor), Once, Detected by Opfor Cond: this && (alive GomezHeli || alive GomezBoat) Activation: if(alive GomezBoat) then{Gomez doMove position GomezBoat; waitUntil{Gomez distance GomezBoat<5}; Gomez moveInDriver GomezBoat; Gomez doMove position escape} else{Gomez disableAI "Move"}; Any help would be greatly appreciated. unknownx9
  13. unknownx9

    AI Logic

    Here is what I have added and going to try it now, please let me know if I have anything wrong, thanks. switch (true) do { case (!alive boat && alive heli): { Gomez doMove position GomezHeli; waitUntil{Gomez distance GomezHeli<5}; Gomez moveInDriver GomezHeli; Gomez doMove position escape; }; case (!alive heli && alive boat): { Gomez doMove position GomezBoat; waitUntil{Gomez distance GomezBoat<5}; Gomez moveInDriver GomezBoat; Gomez doMove position escape; }; case (alive heli && alive boat) : { if(Gomez distance GomezBoat < Gomez distance GomezHeli)then { Gomez doMove position GomezBoat; waitUntil{Gomez distance GomezBoat<5}; Gomez moveInDriver GomezBoat; Gomez doMove position escape; } else { Gomez doMove position GomezHeli; waitUntil{Gomez distance GomezHeli<5}; Gomez moveInDriver GomezHeli; Gomez doMove position escape; }; }; default { Gomez disableAI "Move"; }; };
  14. unknownx9

    AI Logic

    I was thinking of using a "switch" but did not know what to put in the condition field. Will give it a try, thank you for your reply. unknownx9
  15. Weapons: -They do not have a reload sound. -C6 GPMG iron sight has some major zoom capability. Chopper CH-146 Griffen: When sitting in the pilot seat of the chopper and engine started while still on ground level, the outside armor becomes transparent and you could see inside. Also, are you guys planning on adding custom sounds for your weapons? Or just going with default Arma 2 weapon sounds?
  16. unknownx9

    F/A-18 Super Hornet

    Thank you for taking the time to create such a great addon. I was looking at the menu system you have setup and specifically the Avionics/Nav System. When I select it, the panel appears on the bottom right of my screen with only the top right view of the panel visible, not sure if that is they way it was designed or something else. Another thing I accidentally noticed is landing without any gear works great as you can do a belly landing, but I was hovering of the ground, and can still maneuver the aircraft on a sharp turn. Also when I selected the gears they dropped and they were damaged and could not taxi anymore, but they still pushed the jet up and deployed. Would really appreciate it if you could make a Canadian version/texture of the F18. Thanks again.
  17. unknownx9

    Simple image question

    I think they meant you need to change the name of the other "class XDomAward" to some other class(i.e "class XMyAward"). So then you would have "class XDomAward" as well as the other class called "class XMyAward"
  18. unknownx9

    Fixing a Popup Script

    Anyone have any ideas?
  19. Not sure if this is possible, but have seen a couple of addons that incorporate aspects of this. What I am talking about is a program that mimics the already present 3D editor in Arma 2 with the added capability of placing objects and units. This would really be helpful for map makers, it will cut down on their time to develop quality and detailed maps. I have came across RTE and it is a great addon, but it only allows for the placement of units. Unlike the 3D editor which only allows for the placement of objects. I have sometimes used the combination of these two programs to make maps but sometimes there are complications with that. For instance while placing objects in 3D editor is possible, converting it to 2D using community made addons offset the position of the objects placed and removes elevation on which the object is placed. I do apologize for this long post, but I only wanted to show why an addon that incorporates the placement of both units and object is crucial to map makers, well at least to me. I do hope one day we see something like that, and if so thank you in advance to whoever decides to make such an addon, if not, well thank you anyways for taking the time to read this post. Thanks, unknownx9
  20. unknownx9

    Fixing a Popup Script

    Really hope that a method is made to help simplify this process for us in Arma 3. Tried that again today works when I start an MP on my PC. So I uploaded to dedicated to test and it returned 0 for the "cnt" variable. I also noticed that when added the publicVariable to the script the PC went wild a bit in processing, not sure if that because of updating the variable on all clients or something else. Anyways, if anyone has any ideas on how to fix the passing of "cnt" variable from script to script on a dedicated please let me know. Thanks.
  21. unknownx9

    Fixing a Popup Script

    I posted this at OFPEC forums but no reply yet. The passing of the variable "endNumber" from one script to another is working, but unfortunately the "cnt" variable is not when I am testing it out in MP. When I preview it in the editor I get the correct count number of how many targets I have hit, but when I tried the mission in MP it always returns a count of 0 :confused:, any ideas? I have tried placing the count in the same script, but now it is not showing up the count at all. I have tried like this after switching the variable to local so it does not have to be passed from one script to another, but that did not work either: And like this: I have also tried adding MPEventhandler rather than the EventHandler alone, same thing nothing. I was thinking it might be because of the two private variables "_instructor" in both scripts overwriting each other, but then how come it passes the variable from one script to another in the editor, so I do not think that is the case. So I am stuck now and do not know what to do, any help would be appreciated. Thanks.
  22. unknownx9

    Fixing a Popup Script

    Thanks again for your help.
  23. unknownx9

    Fixing a Popup Script

    Not sure I am following you there. Do you mean like put a "sleep" timer ? If so, wouldn't that affect the counting of the number of bullets as well?
  24. unknownx9

    Fixing a Popup Script

    Since we are on the topic of pop up scripts, there is this small script I put together but it is not working the way I want it to. It works at keeping the pop up target from going down, which is what I want it to do. But the counting system is really messed up. I hit a couple of times using the Machine gun but my "cnt" will equal 11579 :( . This is the other Script that ends the previous one: Any input is appreciated. unknownx9
×