Jump to content

Cockheaven

Member
  • Content Count

    57
  • Joined

  • Last visited

  • Medals

Everything posted by Cockheaven

  1. Am I doing it wrong if I use disableCollisionWith?
  2. Hi guys, I had been putting together a kit for my community to standardize missions and part of that kit incorporated standard unit loadouts in the ace arsenal. To achieve this @Mr H. helped me with creating and extracting loadouts and inputting them in objects that are enabled as ace arsenals. Object init Init.sqf and or initserver.sqf 56RDLoadOuts.sqf This is no longer working, we had a few weeks of success and it was great, nothing was changed on our end however the script for the loadouts is not being called. I can run null = execvm "56RDLoudouts.sqf" in game and it puts the loadouts in the "default loadouts" in the ace arsenal, what gives?
  3. @Mr H. any updates sir? I would like to spend some time investigating this myself but school is kicking my ass right now, any help is much appreciated.
  4. Hi all, I had made a mission a while ago and it has been stable from that time up until this point. The premise is to have a few objects placed that have addactions in them allowing players to start various training scenarios. I will attach one of these objects with the addaction it contains in it's init below as well as the script that addaction executes. Obj init AssaultAISpawn.sqf And so, as the post title says, these scripts seem to be repeating depending on the number of players on the server when someone executes the addaction. i'm stumped because this did not use to happen and I cannot figure out what may have changed to cause this. If someone can see a problem in my code (I'm sure they are there) or can suggest a more secure/better way of allowing players to spawn preconfigured enemies please help me out! Thanks! P.S. There are a lot of people that have helped me this far and I am blatantly using their code, if you are one of them and you recognize your code, thank you!
  5. Cockheaven

    3den Enhanced

    Hi @Max255I just discovered a solution. 0) Firstly make a backup of your scenario. then follow these steps 1) Exit ArmA 3 2) Disable 3Den Enhanced in your modlist 3) Launch ArmA 3 and load the editor on the same map as the mission in question 4) Click "Scenario" -> "Merge" select the scenario in question and click "Merge" 5) Once merged save the scenario under a NEW name 6) Navigate to the new scenario's folder via windows explorer 7) copy the mission.SQF file from the new folder to the old folder 8) ???? 9) ArmA!
  6. Cockheaven

    3den Enhanced

    Firstly, what an amazing tool, the additional features and ease of use have enabled much more fluid and simple scenario design on my part. Thank you! I have a scenario, which I have been updating regularly. This scenario should run about < 3KB for the mission.SQF file. while exploring the features of a recen 3DEN enhanced update the mission file size has jumped from < 3KB to > 17KB, no actual alterations were made except for exploring what additional options there were added to the object attributes. Upon exploring the new 17KB mission.SQF I'm seeing the above code appear for EVERY object in the scenario (or at least that's how I'm reading it) it seems as though the additional options in the object attributes have been scripted in although they have no assigned values and/or have not been enabled in the editor. My goal through scripting has been to reduce this mission's file size and this new jump in file size has undone much of that, what is my best course of action here to eliminate this unnecessary code?
  7. Been a while since I've posted here, largely due to the help rendered enabling me to troubleshoot my own scripting needs, thank you to those who have and continue to help those like me. I am currently involved in running a unit. One of my priorities is to maintain a standardized player experience. That said we want to also afford our community members the ability to make their own custom content. Part of our standardizations are a standard lobby, and standardized kits that reflect the roles in the lobby. We use ACE so that means using the Default Loadout feature in the ACE arsenal. The only way that I am aware of to embed Default Loadouts into the ACE arsenal is through EDEN and this can be quite tedious and/or time consuming, not to mention it requires the mission maker to have the kits premade. My objective is to create a (perhaps thru GitHub) sample mission that contains all the scripts (init, onplayerkilled, onplayerrespawn etc...) so that a mission maker only has to copy these files into a new mission and it meets the unit standard. TLDR Is there a way to load "Default Loadout" into the ACE arsenal through scripting? I have located the area in the mission.sqm that contains the information I will post it here, Thanks a lot!
  8. Cockheaven

    ACE Default Loadout

    Thank you @Mr H. I will give this a try!
  9. Cockheaven

    ACE Default Loadout

    WOW! I'm so blind I had run over that section so many times. Thanks @Mr H. for hitting me in the face with it, if only it were a snake... So how do I structure this? Should I have in init.sqf ["Squad Leader", getUnitLoadout sql1.sqf] call ace_arsenal_fnc_addDefaultLoadout and in sql1.sqf An example would be handy, Thanks!
  10. Hi guys, I have a mission that contains a vehicle respawn module. This respawn module is connected to a helicopter with [missionNamespace, this] call BIS_fnc_addRespawnPosition; in its init field. in the module's expression line I have execvm "MobileRespawn.sqf" . in mobilerespawn.sqf vehInit = { clearWeaponCargoGlobal _this select 0; clearMagazineCargoGlobal _this select 0; [missionNamespace, _this select 0] call BIS_fnc_addRespawnPosition; }; This all works dandy when I host locally, however when I run it on a dedicated server it does not appear to run the script, or at least does not apply the script to the respawned vehicle. What am I not getting here?
  11. but @pierremgi It is working for the Truck that is connected to the respawn module..... I will try your suggestion, thanks!
  12. Update: The current configuration is working for land based vehicles, however it is not working for helicopters.
  13. Group: 56th Recon Division Branch: Semi-Milsim/Casual Main Language: English Time zone: PST/GMT-7 Operation times: Saturdays 5:30 Rally 6:00 Stop-off Operation Type: Assault/Stealth/QRF Other essential info: We specialize in dynamic missions aswell as intricate custom content ranging from one offs to entire campaigns Website: https://56rd.enjin.com/
  14. Hi guys, here's the skinny. I've got an aircraft with 3 AI crew and one player crew in an MP environment on a dedicated server. That said the player is NOT grouped with the 3 AI crew for REASONS... What I'm trying to do is add an addiction to the aircraft to allow the player to select a position on the map and order the aircraft to Loiter with given radius and altitude. Here's the code I have at the moment Mother addaction ["Set Orbit", { _this select 1; Orbit_set = true; hintsilent "Open your Map. Leftclick to set orbit center"; onMapSingleClick " _wp1 = group MotheD addwaypoint [_pos, 0]; [group MotherD, 1] setWaypointType ""LOITER""; _mk1 = createMarkerLocal [""OrbitCenter"", _pos]; ""OrbitCenter"" setMarkerType ""waypoint""; [group MotherD, 1] setWaypointPosition [_pos, 1]; [group MotherD, 1] setWaypointLoiterRadius 2000; Mother flyInHeight 1500; Orbit_set = false; "; waitUntil{!Orbit_set}; onMapSingleClick ""; ;} ]; So whats happening is, I select the action (as the player) and I receive the hint, however when I click on a position after opening the map nothing happens. I can go into Zeus and verify no waypoint has been created. However; when I alt click on the map the whole aircraft gets teleported to that position... what gives I don't have a getpos setpos anywhere in there I'm totally lost, I was reading something about an EH for this kind of thing but I'm not understanding that, It seems way more complicated than it needs to be. Thanks! Mother = the aircraft variable name MotherD = the driver of Mother (Pilot)
  15. Hi guys, I have sort of a mishmash of code here I'm trying to work my way through. I'm sure there are some better ways to do the things I'm trying to do like using foreach as well as passing parameters to other scripts but unfortunately, I'm not quite grasping both of those concepts. What I need to do is either by addiction or at the start of the game choose a random player create a task for all players that show approximately that chosen player's position to kill said player uppon killing said player choose a new player, actually, choose the player that killed the target player and continue looping until everyone is fed up with the game mode I've had a few iterations of my code and here's where I am at right now if (isNil "_killer") then // Nobody got got? { if (isServer) then { _units = []; { if (isPlayer _x) then { _units pushBack _x; } } foreach playableUnits; _Rabbit = _units call BIS_fnc_selectRandom; // initial target choice }; } else { _Rabbit = _killer // since killer exists make killer the target }; _Rabbit addMPEventHandler ["MPkilled", { params ["_unit", "_killer", "_instigator", "_useEffects"]; }]; // record who does what to Rabbit while {alive _Rabbit} do { sleep 15; // loop interval hint format ["Kill %1",_Rabbit]; if ( "t1" call BIS_fnc_taskExists ) then { "t1" call BIS_fnc_deleteTask }; // delete any existing t1 if ( "t2" call BIS_fnc_taskExists ) then { "t2" call BIS_fnc_deleteTask }; // delete any existing t2 if ( "t3" call BIS_fnc_taskExists ) then { "t3" call BIS_fnc_deleteTask }; // delete any existing t3 if ( "t4" call BIS_fnc_taskExists ) then { "t4" call BIS_fnc_deleteTask }; // delete any existing t4 _Rabbitmarker = createmarker ["Rabbitloc", position _Rabbit]; [west,["t1"],["Kill the Rabbit","Kill the Rabbit","Rabbitloc"],getmarkerpos "Rabbitloc",1,3,true] call BIS_fnc_taskCreate; // create task for blue [east,["t2"],["Kill the Rabbit","Kill the Rabbit","Rabbitloc"],getmarkerpos "Rabbitloc",1,3,true] call BIS_fnc_taskCreate; // create task for red [independent,["t3"],["Kill the Rabbit","Kill the Rabbit","Rabbitloc"],getmarkerpos "Rabbitloc",1,3,true] call BIS_fnc_taskCreate; // create task for green [civilian,["t4"],["Kill the Rabbit","Kill the Rabbit","Rabbitloc"],getmarkerpos "Rabbitloc",1,3,true] call BIS_fnc_taskCreate; // create task for purple }; // while rabbit is alive tell people to kill them and mark their position if !(alive _Rabbit) then { _Rabbit = _killer; execVM "Rabbit.sqf"; } else { }; // If rabbit is killed make their killer the new rabbit and rerun the script Thanks for all the help, I'm slowly becoming more capable of making my own crappy scripts.
  16. Cockheaven

    Random Player Hunt

    I forgot about Thanks I plan on implementing them once the base code is working. @ZaellixAis 100% correct on what I am looking for.
  17. Cockheaven

    Random Player Hunt

    Hi guys I'm going to post for you what I have thus far and the results of the playtest last night. I have a mission that contains empty markers (marker_#) on the map aswell as respawn_side markers for all 4 sides, 4 players per side total of 16 players. That is the extent of the Eden assets below in spoilers is the code being executed. init.sqf onPlayerkilled.sqf onPlayerRespawn.sqf Rabbit.sqf Although it was kind of broken, players had fun. Problems with the code include 1. Multiple "rabbits" being chosen continuously (without killing a rabbit two or more players could be the rabbit). 2. Task marker jumping between players, marking players whether or not they are the "rabbit". Again Thanks a lot for your guy's help, stupid projects like this are really helping me understand more complex aspects of mission making.
  18. Cockheaven

    Random Player Hunt

    Okay @GEORGE FLOROS GR , it wasn't working when I hosted locally in MP. If it works on the dedicated great, if not I'm pretty darn happy with the state of the mission. Thank you and @ZaellixA for your help!
  19. Cockheaven

    Random Player Hunt

    Using that works, but there isn't a delay, I would like a small delay in between tracking updates. Current code GF_player = _Player; [] spawn { GF_marker = format["GF_marker_%1",GF_player]; createMarker [GF_marker, getPos vehicle GF_player]; GF_marker setMarkerShape "ICON"; _side = side group GF_player; _sideColor = [_side, true] call BIS_fnc_sideColor; while {alive GF_player}do{ sleep 20; GF_marker setMarkerColor _sideColor; GF_marker setMarkerType "loc_ViewTower"; GF_marker setMarkerSize [2,2]; GF_marker setMarkerPos getpos GF_player; GF_marker setMarkerDir getDir GF_player; ["t1", [GF_Player, true]] call BIS_fnc_taskSetDestination; }; };
  20. Cockheaven

    Random Player Hunt

    @GEORGE FLOROS GR here's what I changed regarding task tracking. while {alive GF_player} do { sleep 20; [] spawn { GF_marker = format["GF_marker_%1",GF_player]; createMarker [GF_marker, getPos vehicle GF_player]; GF_marker setMarkerShape "ICON"; _side = side group GF_player; _sideColor = [_side, true] call BIS_fnc_sideColor; ["t1", getMarkerPos "GF_marker"] call BIS_fnc_taskSetDestination; }; }; not kicking any errors uploading into dedicated now for testing. thinking I've got some unnecessary stuff in there can deal with later.
  21. Cockheaven

    Random Player Hunt

    What George gave me works and is plug and play, however, the task needs to update the target players position continuously, I'd like it to have a delay around 20 seconds. the task doesn't seem to update the player's position continuously although I'm assuming the following code is supposed to perform that function while {alive GF_Player}do{ GF_marker setMarkerColor _sideColor; GF_marker setMarkerType "loc_ViewTower"; GF_marker setMarkerSize [2,2]; GF_marker setMarkerPos getpos GF_Player; GF_marker setMarkerDir getDir GF_Player; uisleep 0.1; }; @ZaellixA Yes I want the killer of the target player to become the next target
  22. Hi guys, ive been considering a way to implement a series of small objectives that players can activate attempt to complete and then weather succeeded or failed run the scenario again. What I have to far is an addiction that runs a few scripts. first it runs this SFHVTSpawn.sqf [ "t1" ] call BIS_fnc_deleteTask; _SFHVTMarker = Selectrandom ["HVT1_1"]; _HVT = [getmarkerpos _SFHVTMarker, East, ["CUP_C_R_Functionary_01"],[],[],[],[],[],116] call BIS_Fnc_spawnGroup;//spawn my HVT { removeAllWeapons _x; //remove HVT gear removeAllWeapons _x; removeUniform _x; removeHeadgear _x; removeBackpack _x; _x addUniform "U_O_T_Officer_F"; //add specific gear _x addHeadgear "CUP_H_TK_Beret"; _x addbackpack "CUP_B_SLA_Medicbag"; _x addItemToBackpack "ACE_Flashlight_XL50"; _x addItemToBackpack "MCC_butanetorch"; _x addItemToBackpack "ACE_IR_Strobe_Item"; _x addItemToBackpack "ACE_Cellphone"; _x addaction ["CAPTURE","capture.sqf"]; //addaction (potential condition check) } forEach (units _HVT); { ["ACE_captives_setSurrendered", [_x, true], _x] call CBA_fnc_targetEvent; //hands up } forEach (units _HVT); [west,["t1"],["A group of operatives have captured a CSAT Officer inside enemy territory code name Judas. Safely extract Judas and bring them back to base for interrogation.","Vengeful God","HVT1_1"],getmarkerpos "HVT1_1",1,3,true] call BIS_fnc_taskCreate; //create the task "t1" call BIS_fnc_taskSetCurrent; //set the task as current And for Capture.sqf _HVT = _this select 0; removeallactions _HVT; ["t1", getMarkerPos "marker_63"] call BIS_fnc_taskSetDestination; marker_63 is the position I want them to bring the HVT to. what is the best way to implement the checks I need? I need to check if HVT is brought to marker_63 (maybe within 10m). I need to check if the HVT has been killed. I tried using triggers in the eden editor but I'm not sure I'm using the right variable reference? Should I add an evenhandler to the Capture.sqf script. Just getting back into arma coding so any help is greatly appreciated!
  23. Cockheaven

    Repeatable Objectives

    Awesome, I've gotten this bit working reliably thanks @Larrow for your help! I've gone ahead and implemented a lot of this functionality that you provided into some more addaction events that spawn enemies. My goal for these next few events being simple seek and destroy objectives and I'm trying to get a task marker that follows each leader of the group the addaction spawns. _myunitarray = ["O_PLANE_FIGHTER_02_F","CUP_O_SU25_DYN_CSAT_T","CUP_O_SU34_CSAT","cfp_o_syarmy_L39_AA"]; _myunit = selectRandom _myunitarray; _FIGT = _myunit createvehicle getMarkerPos "FighterSpawn1_1"; _FIGT setDir 90; createVEHicleCrew _FIGT; _FIGT2 = _myunit createvehicle getMarkerPos "FighterSpawn1_2"; createvehicleCrew _FIGT2; _FIGT2 setDir 90; _FIGT2crew = crew _FIGT2; //this will give you an array which has the crew members. _FIGTgrp = group driver _FIGT; //you get the convoy leader's group with this little command _FIGT2crew join _FIGTgrp; //Array is needed for join command. [_FIGTgrp, getMarkerPos "HOSTILEAIRSPACE", 1200] call bis_fnc_taskPatrol; [_FIGTgrp, 1] setWaypointSpeed "NORMAL"; [_FIGTgrp, 1] setWaypointCombatMode "WHITE"; [_FIGTgrp, 1] setWaypointBehaviour "SAFE"; [_FIGTgrp, 1] setWaypointFormation "WEDGE"; if ( "t2" call BIS_fnc_taskExists ) then { "t2" call BIS_fnc_deleteTask }; //delete any existing t2 [west,["t2"],["Two CSAT Fighters have been detected in close proximity of our airspace. Intercept and destroy the CSAT squadron.","The Rapture","FighterSpawn1_1"],getmarkerpos "FighterSpawn1_1",1,3,true] call BIS_fnc_taskCreate; //create the task _Alpha = leader _FIGTgrp; "t2" call BIS_fnc_taskSetCurrent; //set the task as current while { "t1" call BIS_fnc_taskExists } do { "FIGTmkr" setmarkerpos getpos leader _FIGTgrp; ["t2", getmarkerpos "FIGTmkr"] call BIS_fnc_taskSetDestination; if !(alive leader _FIGTgrp) then { [ "t1", "SUCCEEDED" ] call BIS_fnc_taskSetState; };//YOU WIN! };//update Bogey leader to HUD in 3D So I have task propagation and the marker placement, should i use an EH to "track" the enemy squadron leader, this while seems to not update and neither is the task succeeded argument
  24. Cockheaven

    Repeatable Objectives

    @Larrow Thank you for the clarification I wasn't making the distinction between and area marker and an empty. Using an Area marker now and everything is working. However it doesn't seem to be repeatable. When I run SFHVTSpawn.sqf a second time it does not create a new task and assign the new task. Is this because I have assigned a variable "t1" to the task and since it already had existed it cannot be created again? Do I need to use something that increments and assign that as the task I.D. Thanks again!
  25. Cockheaven

    Repeatable Objectives

    @Larrow Your code is incredibly plug and play, thanks for that. I added both of those check to the Capture.SQF and changed the line _HVT inArea "marker_63" to _HVT inArea ["marker_63", 8, 8, 0, false, 8] When I use the code as is (as you prescribed it) it works but it wont detect weather or not _HVT has been brought to the marker, so I considered it needed a search distance (didn't seem to be baked into inArea) so I changed it to the array posted. however when I use this new line I get the error '...] spawn { params[ "_hvt" ]; waitUntil{ |#|_HVT inArea ["marker_63", 8, 8, 0, fals...' Error undefined variable in expression: _hvt I don't get it, do I have to redefine _HVT , if so how do I do that? I don't really know how to reference objects spawned preciously are they stored in the script they are spawned from? do I need to pass them as a variable to other scripts that utilize them? how do I do this? What I don't get is the EH to check if _hvt is alive works, when I shoot _hvt the task fails.... Thanks!
×