Jump to content

Cockheaven

Member
  • Content Count

    62
  • Joined

  • Last visited

  • Medals

Everything posted by Cockheaven

  1. Hi guys, I have created a script to spawn enemies until a player in an area has been outnumbered, then wait until the player isn't outnumbers and resume spawning. I'm using a while for this with some If and uisleep. While this script is running I'm seeing a severe impact on performance, FPS is fine but server command processing is slowed, Zeus spawning or module placing lags. Is this an efficient way of performing this task? Is there a better way to do this? Also how do I stop the script from running?
  2. Cockheaven

    Looping Spawn

    Thanks, repetitive remedial math is bad. so redefine CK_Enemies = alive CK_Enemies then do the count?
  3. Cockheaven

    CTP Revisited....

    @phronk Genius, I was unaware of the lag time involved with say3d thanks!
  4. Let me firstly say this work has been heavily inspired and predicated on the post "Simple Call to Prayer" and "Takistan Insurgency""". So, I have a mission (rather a few mission templates) set in the "middle eastern" region maps from CUP etc... My objective is to have non mod dependent CTP experience that is also simple and lightweight. I have been mildly successful in following the Simple Call to Prayer post mentioned above. In my mission I have a trigger that runs at certain times similar to the afore mentioned post. Trigger Onact description.ext CTP.sqf Only two minor problems I'm having. Firstly only the sound defined as CK_Call2 will play for its entire duration, I have tried playing CK_Call1 and CK_Call3 but they each stop playing after about 3 seconds. Secondly on the server the civs rotate 90 degrees but then rotate freely, the rugs create and orient perfectly but the civies do not do up-downs and the rugs all delete after the loop finishes.... So basically I'm stuck with 1 sound file that plays and civies that just stand there on top of their carpets facing random directions, I guess its a locality thing but I don't really understand that stuff yet......
  5. Cockheaven

    CTP Revisited....

    @phronk Thanks for the input. As it stands all of the Say3d is played from minarets placed via editor. Also I have _x disableAI "PATH" and _x disableAI "MOVE" in my foreach refrencing CK_Civs which is the array of my civies….. so it should already be disableAI to each AI...
  6. 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?
  7. @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.
  8. 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!
  9. 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!
  10. 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?
  11. 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!
  12. Cockheaven

    ACE Default Loadout

    Thank you @Mr H. I will give this a try!
  13. 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!
  14. 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?
  15. but @pierremgi It is working for the Truck that is connected to the respawn module..... I will try your suggestion, thanks!
  16. Update: The current configuration is working for land based vehicles, however it is not working for helicopters.
  17. 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/
  18. 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)
  19. 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.
  20. 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.
  21. 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.
  22. 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!
  23. 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; }; };
  24. 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.
×