Jump to content

nomadd

Member
  • Content Count

    371
  • Joined

  • Last visited

  • Medals

Everything posted by nomadd

  1. These are a couple of scripts I made for some of my missions. Going to post them here is case anyone finds them useful. They have been tested on MP hosted and dedicated. Everything seems to work. Any scripting gurus want to improve them please feel free. Put a unit(s) down in the editor and name them whatever you want ex: obj_HVT , Obj_hostage , Boo_Boo , whatever In init.sqf //prepare HVT and hostage obj_hostage execvm "Hostage_setup.sqf"; obj_HVT execvm "Hvt_setup.sqf"; The HVT script will make the unit do a "surrender" animation when a player gets close, from there you will get the option to escort the HVT. HVT will attach to that player in front off to the left with hands on head. HVT is attached to player so it will not collide with anything and feet do not move but better than having a hostile HVT join your group and run around free (imo). Player will get the option to "stop" escort , meaning HVT will be left on the spot. Another player can then pick up the HVT and escort. When escorting the HVT, players near vehicles get the option to "load in vehicle". The HVT will then get in what ever vehicle is close to the player under player's cursor. Once the HVT is loaded in a vehicle any player can "unload HVT". Once the HVT is captured , it can be killed at any time. Until HVT is captured they are invulnerable, plus dumb as a rock. I had to disable just about everything on the AI to make them play nice. The Hostage script works much the same way. Except hostage is on the ground tied up.. Player has to free the hostage using a holdaction. (Once freed hostage can be killed) Hostage will go into a wounded on the ground animation. Player has to pickup and carry hostage. When carrying the hostage player is forced to walk, you can set the hostage down at any time and another player can then pick up the hostage. You also will get the option to "load in Vehicle" when carrying the hostage. Same as HVT script, you have to be close to a vehicle and vehicle under player's cursor. Once hostage is loaded anyone can unload the hostage. The test mission linked does require CUP, was testing different vehicles, not just BIS vehicles. You can still extract the .sqfs and put them in a mission that does not require CUP to test it. I know i need to do some more polishing but it works. I would like to add "grabcarried" and "grabcarry" to the hostage, just to make it look a bit nicer when player is picking the hostage up but working with animations just sucks. Right now there can only be one HVT and one Hostage in any given mission. Will try and maybe change things so there can be multiple hostages that need to be rescued or HVTs to be captured HVT capture script Hostage rescue script update: v1.3 02-25-19 https://www.dropbox.com/s/fb52hxbrhvwbvp7/HVT%26Hostage test1.3.Stratis.7z?dl=0 any problems just post them up, i will try and get to it as soon as I can edit: 02-08-19 fixed some bugs changed some animations cleaned up some code edit: 02-16-19 v1.2 removed CUP dependency edit 02-16-19 v1.2 uploaded wrong version edit 02-25-19 v1.3 fixed potential problem(s) on dedicated
  2. updated: 03-11-2018 This is a set of scripts I made for ARMA2. Well I finally got around to updating this after a long break from Arma 3. I have tried to optimize it and clean it up as best as I am able. As I learn more about scripting I change and implement what I learn, but it is a slow process. SLP_spawn will spawn units, vehicles, armor , air,boats in just about any configuration you want. It will also tell spawned units what to do using either CBA or BIS functions, taskpatrol/taskdefend/attack ,and functions I have created hunt\attack ,and scripts community authors have made like Zen_occupyhouse and SHK_buildingpos. SLP is very robust in what it can do. It can have opfor units spawn in bluefor vehicles(if that is what you want) and patrol an area or defend an area. You can decide how many groups you want with how many units per group. You can completely randomize the number and locations of units\vehicles in a mission. SLP will work with any mod. Just have to set the units/vehicles in the SLP_unit_config.sqf. examples: CUP, Unsung etc SLP runs completely server side. I have tested it on hosted and dedicated (dedicated testing has been awhile so not sure if any errors will show up, I am too lazy to put a server back up for testing). I have included a readme with all credits and more instructions, but probably easiest to look at the demo to see how you can implement it. I included a number of examples in the demo of how to spawn units/vehicles I recommend using CBA with this but it will work with out CBA. BIS_fnc_taskpatrol is a little strange on some things. Boats will not patrol with BIS_fnc_taskpatrol. They head straight for land. No idea why this happens. -this newest version has the option of using "initsting" you can run custom scripts on newly spawned units ( see demo for examples). -I have made to many changes since the last version to list everything I know their are better ways of doing some of the scripting, so if anyone wants to make changes feel free. I just ask my name stay attached somewhere and you share it with the community. newest version 3.49 https://www.dropbox.com/s/4ecaq9maikj4q3x/SLP_spawn_v3%2e49.Stratis.7z?dl=0
  3. I am stuck on this. I am making a stealth coop mission. (Making the AI play nice for a stealth mission has been a real challenge). At the moment, using EventHandlers I have the area of operations pretty well covered. If a player throws a grenade, or smoke or fires an un-suppressed weapon(yes, this is "Hollywood" style silenced weapons) it will alert the enemy kick the AI out of safe mode spawn reinforcements and everything goes sideways. When testing I found I could detonate any type of explosive and the AI goes about their day like nothing happened. I have looked at the explosion EH but it needs to be attached to an object to detect damage. I need to be able to detect any explosion with in the AO then execute code that will sound the alarm. this is the code I use to detect silencers and thrown weapons ie. grenades, smoke etc. the inarea is a trigger covering the the AO Fnc_Nearbase = { private ["_eh_1"]; _eh_1 = player addEventHandler ["firedman",{ params ["_unit","_weapon","_muzzle","_mode","_ammo","_magazine","_projectile","_vehicle","_hassilencer"]; if (_unit inArea trg_NB) then { _hassilencer = (_this select 0) call Hassilencer; if !(_hassilencer) then { [format ["%1 did not equip a silencer and just alerted the enemy",name _unit]] remoteExec ["hint",[0,-2] select isDedicated]; if (isnil {obj_alarm getvariable "alarm"}) then { if (isnil {obj_alarm getvariable "alarm"}) then { obj_alarm setvariable ["alarm",true,true]; }; }; }; if (configname (inheritsFrom (configFile >> "cfgWeapons" >> "throw" >>(_this select 2) )) isEqualTo "ThrowMuzzle") then { [_unit,_ammo] spawn { params ["_unit","_ammo"]; sleep 6; [format ["%1 just threw a %2 and has alerted the enemy", name _unit, _ammo]] remoteExec ["hint",[0,-2] select isDedicated]; if (isnil {obj_alarm getvariable "alarm"}) then { if (isnil {obj_alarm getvariable "alarm"}) then { obj_alarm setvariable ["alarm",true,true]; }; }; }; }; }; }]; }; I know this is probably simple but for some reason I just cannot find a solution that works
  4. Hey Jonnyboy, very nice scripts you put out for mission immersion. I made a similar gun light script just didn't think anyone would be interested in it. I added a couple of checks, not just time of day but also if unit has NVGs. To me, it looked a little strange for a unit to be walking around with NVGs on and flash light on. You are more than welcome to use it in your script if you want. The nvg_array contains BIS and CUP nvgs. AI_gunlights = { private ["_grp","_this","_items","_nvg_array"]; _nvg_array = [ "CUP_NVG_PVS14","CUP_NVG_PVS14","CUP_NVG_PVS15_black","CUP_NVG_PVS15_green","CUP_NVG_PVS15_tan","CUP_NVG_PVS15_winter","CUP_NVG_PVS7","O_NVGoggles_ghex_F", "O_NVGoggles_hex_F","O_NVGoggles_urb_F","NVGogglesB_blk_F","NVGogglesB_grn_F","NVGogglesB_gry_F","CUP_NVG_GPNVG_black","CUP_NVG_GPNVG_green","CUP_NVG_GPNVG_tan", "CUP_NVG_GPNVG_winter","CUP_NVG_HMNVS","NVGoggles_OPFOR","NVGoggles","NVGoggles_INDEP","NVGoggles_tna_F","H_HelmetO_ViperSP_ghex_F","H_HelmetO_ViperSP_hex_F" ]; _this= _this select 0; _items = primaryWeaponItems _this; //time > 5; if ( !(isplayer _this) && {(side _this isequalto independent) || (side _this isequalto east)}) then { switch ("PARAM_GUNLIGHT_TOGGLE" call BIS_fnc_getParamValue ) do { case 0: //off { _this enableGunLights "forceoff"; }; case 1: //on { if ((date select 3) < 6 or (date select 3) > 19 ) then { if ({_x in (items _this + assignedItems _this)}count _nvg_array > 0) exitwith {}; _this removePrimaryWeaponItem (_items select 1); sleep .1; _this addPrimaryWeaponItem "acc_flashlight"; sleep .1; _this enableGunLights "forceon"; while {!(_this isFlashlightOn (currentWeapon _this))} do //if (!(_this isFlashlightOn (currentWeapon _this))) then { _this enableGunLights "forceon"; sleep 5; }; }; }; case 2: //random { if ((date select 3) < 6 or (date select 3) > 19 ) then { if ({_x in (items _this + assignedItems _this)}count _nvg_array > 0) exitwith {}; _this addPrimaryWeaponItem "acc_flashlight"; sleep .5; while {alive _this} do { _this enableGunLights "forceon"; sleep 30 + random 30; _this enableGunLights "forceoff"; sleep 20 + random 20; }; }; }; }; }; };
  5. I came across this mod the other day and it sounds great. I wanted to be able to run this on just the server. After reading the website I was under the impression it could be server only and not require players/client to have the mod loaded, but when I tested this I kept getting an error saying I needed cf_bai_main on connected client. The mission ran fine other than the error message. I have no idea if the mod was actually working or not
  6. Thanks for this 7erra, I use notepad++ and found this very helpful
  7. Been testing 1.6wip4 , so far everything is working great. I am not getting any errors and whatever you did seems to have fixed the respawn problem. I am going to update one of my missions with this new version and test it out on my server with other players. Will let you know if I find any problems. Thanks Rydygier for the work you have put into this.
  8. Did some digging , I never knew in the editor /preview if you alt+LMB it will teleport you. So this has nothing to do with HAS. I have no idea how to disable alt+LMB teleport, seems like it is built into the editor. As for respawn, it is strange, I can respawn as much as I want until i get in a helo and get the actions to transport. Once i get the actions to transport , if I respawn HAS stops working, meaning I can get in a helo and I will not get any actions. The support menu is still there and I can call for transport with the support menu but helo does not respond. Also, If i use helo and transport to a location. if I respawn before the helo has RTB. HAS will not longer work, I will get no actions inside a helo. If I wait until helo has RTB and then respawn. HAS works fine, I get actions when I get in a helo. I hope this makes sense. If you want I can make a video and post it showing what I am trying to describe.
  9. @Rydygier I just downloaded and have been testing 1.6 wip3. Addactions after respawn are still buggy If you get in a helo at start, then get out and make yourself respawn, HAS stops working for the player If you get in a helo and transport to destination, once your get to the destination and are out of the helo. The helo will start its RTB. If you make yourself respawn before the helo has RTB, HAS will stop working for the player The nav waypoints are a great addition for planning a route I found one thing When the map opens , alt+LMB actually teleports you to that location. A systemchat hint pops up also, makes me think it was some type of debug for testing purposes
  10. I have been playing around with making a faux satellite/surveillance feed in a briefing room for players to watch. Everything works, but the picture is just terrible. I have tried adjusting my video settings(set everything to max) and adjusting settings in the script but I just cant seem to make the displayed video look any sharper. I also tried setting it to thermal. First few seconds it looks great but then it grays out and becomes a big gray mess. here is the code I am using I am calling this script from initplayerlocal.sqf. [camlock_1,feed_1] execVM "scripts_client\sat_feed_1.sqf"; camlock_1 is invisble helo pad feed_1 is name of rugged large screen "Land_TripodScreen_01_large_F" params ["_pos","_target"]; private _campos =[(getpos _pos select 0),(getpos _pos select 1), +175]; //_pos2 = getpos camlock_1; _cam = "camera" camcreate _campos; _cam cameraEffect ["Internal", "Back", "satrtt"]; _cam camSetTarget obj_HVT;//camlock_1; //_cam camSetDir [0,0,-60]; _cam camSetFov .4; _cam camCommit 1; _target setObjectTexture [0, "#(argb,512,512,1)r2t(satrtt,1.77)"]; if ((dayTime > 19 || dayTime < 4)) then { "satrtt" setPiPEffect [1]; } else { "satrtt" setPiPEffect [0]; }; waituntil {obj_hvt getVariable "captured"}; _cam cameraEffect ["terminate", "back", "satrtt"]; camDestroy _cam; I have this in a mission that has been played on dedicated all the connecting players see the display but it just looks like crap. Are there any changes I can make to make the display look better? Also, why do players lose the video feed to the monitor when they use arsenal and is there anyway to prevent it?
  11. @beno_83au I was afraid that would be the answer. @GrumpyOldMan Your info on video settings made a big difference. i didn't realize what ambient occlusion was doing. The video feed looks much better. I wish the video feed looked as good as actually using a UAV but like beno_83au said I dont think it is possible. I will have to put something in the briefing telling connecting players how to set their video settings. If i get a chance I will post a video showing the difference in the video settings with AO, on or disabled, maybe it will help others with who encounter this problem
  12. Thanks for the info, I will try it out and see how it looks
  13. Did some really quick tests on the hotfix. I have to go into work so will test more when I get a chance. Tests were done with your demo mission and respawn enabled. Results: I am not getting this error anymore if ((_firstWP select 1) < _currIx) then { _gp setCurre> 8:37:49 Error position: <select 1) < _currIx) then { _gp setCurre> 8:37:49 Error Zero divisor However, respawn problem is still present. Everything seems to work fine until you respawn, then you loose addactions in helo. Also, after respawn, if you run far enough out to call helo using support menu. Helo will never respond to call. The support menu comes up but nothing happens with helo. Again before respawn it works fine.
  14. Thanks for the quick update. I was able to do some quick testing, found a couple of things. I first tried the new version in one of my missions, then tested with your demo mission. Getting the same errors. I tested on hosted MP , so I did not test the path planning as you said it is SP only. If you respawn you will not get actions when you get in a helo, before respawn everything works fine. I added respawn to your demo mission to test this. Also getting this error if ((_firstWP select 1) < _currIx) then { _gp setCurre> 8:37:49 Error position: <select 1) < _currIx) then { _gp setCurre> 8:37:49 Error Zero divisor this error happens when I give the helo a destination (no path planning, just a destination) and also when I respawn. It maybe you meant for this new version to be tested in SP only and in MP it is going to throw errors
  15. Thanks for the info EO, very helpful
  16. I know this topic has come up before, but I am trying to find a way to remove just snakes and rabbits when playing on dedicated. I checked some of the mods on steam but they do not seem to work or do not work on dedicated. I also found enableEnvironment [false, true]; but this removes everything, ARMA maps are already so deserted I hate to remove any more ambient life than necessary. I guess I am also confused, are the snakes and rabbits just server side or do they spawn local for each player, so each player will see different snakes and rabbits. The above command says it is local so makes me think I need to run it for each player. I did find some code for running a while loop to remove snakes but was looking for a cleaner way. The reason I am asking is I have a convoy mission, I know convoys and ARMA and the pain it will induce. Everything works great with the convoy and the mission, mainly because I control where things spawn so nothing can get in the way of the convoy. Except freaking snakes, I have watched a 30 ton APC swerve to miss a snake crossing the road and can then cause a chain reaction in the convoy. Every vehicle after ,which ever vehicle swerves will then swerve even though nothing is in the road. Sometimes vehicles further down the line in the convoy will just stop and refuse to move, so half the convoy will continue on and half just stop in place. It is a random problem and the only thing I have found that causes it is when an animal gets in the road.
  17. Thanks HazJ that answered one of my main questions. One last question , I can probably figure it out with some tests , but you might know off hand. When I run enableEnvironment command will it continue to work throughout the whole map, meaning animals(snakes,rabbits) are generated around the player out to whatever distance. If the player moves to a new location will animals then be generated at the new location. Does enableEnvironment need to be run in a loop?
  18. Pierremgi Guess I dont really care about the bees/flies/cicadas but they do add a tiny bit of ambiance. It also removes all the fish which is not a big deal for this particular mission, as there is no water activity. I know this has been reported, animals causing vehicles to swerve or even stop. I guess I shouldn't be surprised but seems like BIS could have fixed this along time ago. The maps are pretty sterile as they are just hate making it even more so.
  19. Thanks George I will try it out.
  20. Did a couple of quick tests. With the pilot spam. It does happen on hosted and dedicated I fixed it by putting this for the pilot {(driver this) disableAI _x} foreach ["TARGET","AUTOTARGET"]; I figure the pilot does not need to target anything, he is just flying a taxi service. I did find another problem, if you have multiple helos set up for airlift. Get in one and fly to a destination. Go to another helo that you have not flown in. Get in, you will get the addactions to transport but they will only effect the first helo you flew in originally. Also I am getting the same error reported previously by Play3r
  21. Rydygier Had this popup last night on dedicated server. It is not mission breaking. Pilot is just spamming the sidechat. Only seems to happen after you use the helo then try and use the helo again. Not sure if it happens on hosted havent tested it yet.
  22. -fixed potential problem(s) on dedicated
  23. I use the script version of VCOM in my missions. I use " (group this) setVariable ["Vcm_Disable", true];" on mission specific units or units I spawn/place in certain locations. I have not encountered any problems with those units being taken over by VCOM.
  24. @Djavu Not sure if this is actually what you are using [(group this) setVariable ["Vcm_Disable", true]; but it will not work and should throw an error it should be this (group this) setVariable ["Vcm_Disable", true];
  25. I havent looked to much at enablesimulation or enabledynamicsimulation. I think you may want some way to filter things. Maybe filter it by side. If you are playing bluefor and finish a task(s). Then call for an evac helo and it is over 2000 meters away. Will the helo be able to "wake up" or will it stay dormant and hidden. Same with any type of support on the map. If the support is greater than the distance. Maybe a variable to exclude certain units. I maybe wrong in my assumption , I am just not that familiar with those BIS commands Edit: Thought of one other thing. If a unit is mission specific and has commands in its init or is used in a .sqf. Will enabling or disabling it mess up the scripting for said unit.
×