Jump to content

kahna

Member
  • Content Count

    104
  • Joined

  • Last visited

  • Medals

Everything posted by kahna

  1. Remotely Open and Close Ghosthawk Doors By: kylania and Kahna NOTE: If you use vehicle respawns, this has only been tested with Tophe's Simple Vehicle Respawn Script with KRONZKY and BearBison's edits. When referencing vehicle.sqf - it's the vehicle respawn script. Ghosthawk INIT (Without Respawn): nul = [this] execVM "ghostDoorsReset.sqf"; Ghosthawk INIT (With SIMPLE VEHICLE RESPAWN SCRIPT): nul = [this] execVM "ghostDoorsReset.sqf"; veh = [this, 60, 300, 0, FALSE, FALSE, "nul = [this] execVM ""ghostDoorsReset.sqf"";"] execVM "vehicle.sqf"; * Loads the addActions to the Ghosthawk initially and reapplies them upon execution of the vehicle respawn script. ghostDoorsReset.sqf _heli = _this select 0; _heli addAction ["<t color='#FE2E2E'>REMOTE: Open Doors</t>", "ghostDoors.sqf",1,1,false,true,"","(_target animationPhase 'Door_R' == 0) && (_target animationPhase 'Door_L' == 0)"]; _heli addAction ["<t color='#40FF00'>REMOTE: Close Doors</t>", "ghostDoors.sqf",0,1,false,true,"","(_target animationPhase 'Door_R' == 1) && (_target animationPhase 'Door_L' == 1)"]; sleep 1; * Adds the addActions to the Ghosthawk and calls upon ghostDoors.sqf to open/close the doors. ghostDoors.sqf hintSilent "Doors Cycling"; _ghost = _this select 0; _state = _this select 3; _ghost animateDoor ['door_R', _state]; _ghost animateDoor ['door_L', _state]; sleep 1.75; hintSilent "Cycle Complete"; sleep 3; hintSilent ""; Edit and clean up the code to your liking, but this should get amateur scripters and mission makers like myself off on the right foot. KNOWN BUG: If someone uses the Arma 3 Open (door) action on your Ghosthawk, you will not be able to remotely close your doors until the Arma 3 Close (door) action is activated at which time it will reset your remote commands back to REMOTE: Open. Hopefully someone knows a good fix, but until then just remotely open your doors when landing to pickup/drop off troops.
  2. I don't know much about modules, call me old school, but I prefer scripts to get things done. _this is simply referring to the object when placed in the init. If you want to spawn a supply drop in during the mission, the best way to do it would be to script it in along the lines of: _pos = getMarkerPos "DropPoint"; _supplyDrop = "B_supplyCrate_F" createVehicle (position _pos); _supplyDrop addAction["<t color='#ff1111'>Virtual Ammobox</t>", "VAS\open.sqf"]; _supplyDrop allowdamage false; clearItemCargoGlobal _supplyDrop; clearMagazineCargoGlobal _supplyDrop; clearWeaponCargoGlobal _supplyDrop; clearBackpackCargo _supplyDrop; You can get creative and add elevation to _pos and attach a parachute to _supplyDrop as well. You can even get a Heli to do a fly by to coincide with it.
  3. kahna

    =BTC= Quick revive

    Is this purely a revive script? I like BTC Revive, but it messes up my missions that require me to move the respawn markers around (always uses the original positions). I just want a script that lets me revive people and if Quick Revive fits that bill, I don't mind testing it.
  4. Something's going on with the code, I have the same issue. If you don't mind not being able to use the filters, a quick and dirty work around is to just place all of the vehicles under the same array. I have all of my Cars, Air, etc under VVS_Air personally. Works just fine.
  5. You could always use: _veh enableSimulation false/true to freeze and unfreeze the vehicle, but you wouldn't be able to exit the vehicle, access the inventory or use any of its functions. But if that's what you intend, it could work. I also have a script that I call Vehicle Swatter that, when using a set of linear triggers to define a boundary, removes the fuel from a vehicle, sets velocity to 0,0,0, turns off the engine and then de-spawns the vehicle 5 seconds later once it has come to a complete stop to keep trolls from running over everyone in spawn/protected areas. I'm gonna add some code eventually that would instead get its current direction and make the vehicle do an about face, thereby bouncing it back the way it came, once I figure out how to get it to work properly.
  6. Until we get a system in place where Helicopter pilots can actually land a severely damaged bird (they just drop like rocks atm) I've made a bail out script for them and for the crew which also throws in some Search And Rescue features and doesn't require them to have a parachute equipped (pretend they're emergency chutes). Everything works fine for the pilot, co-pilot and gunners/door gunners. The problem occurs when any passengers bail out, their parachute gets created, but they don't get moved into it. I'm still learning scripting, so if you have pointers for cleaning this up or making it more efficient, would love to learn how! _heli = vehicle player; /// Prevents accidents /// _heli allowdamage false; player allowdamage false; /// Pilot deploys warning flares to troops on the ground /// if (player in [driver _heli]) then { hint "Emergency Flares Deployed!"; _rflare = "F_40mm_Red" createVehicle (position _heli); _rflare setVelocity [35,0,-0.1]; _rflare = "F_40mm_Red" createVehicle (position _heli); _rflare setVelocity [-35,0,-0.1]; _rflare = "F_40mm_Red" createVehicle (position _heli); _rflare setVelocity [0,35,-0.1]; _rflare = "F_40mm_Red" createVehicle (position _heli); _rflare setVelocity [0,-35,-0.1]; /// Puts a temporary marker on the map for SAR, downed pilot's last known location /// _mkr = createMarker["Transponder", position player]; _mkr setMarkerShape "ICON"; _mkr setMarkerType "mil_pickup"; _mkr setMarkerColor "ColorBlue"; _mkr setMarkerText "Emergency Transponder"; hint "Emergency Transponder Activated"; _heli setVelocity [0,0,50]; /// Chopper tends to swing around and hit everyone at low speeds, so I gave it a small kick in the pants /// } else {Sleep 0.01}; player action ["eject",vehicle player]; _para = "Steerable_Parachute_F" createVehicle (position player); _para setPos (getPos player); sleep 1; /// Gives you time to fall away from the Heli /// player moveindriver _para; sleep 3; _heli allowdamage true; player allowdamage true; /// SAR Feature, would rather this was for the driver _heli only, but still trying to figure that one out /// if (typeOf Player == "B_Helipilot_F") then { sleep 7; _smoke = "SmokeshellOrange" createVehicle (position player); _chem = "Chemlight_yellow" createVehicle (position player); sleep 7; _smoke = "SmokeshellOrange" createVehicle (position player); _chem = "Chemlight_yellow" createVehicle (position player); sleep 7; _smoke = "SmokeshellOrange" createVehicle (position player); _chem = "Chemlight_yellow" createVehicle (position player); sleep 7; _smoke = "SmokeshellOrange" createVehicle (position player); _chem = "Chemlight_yellow" createVehicle (position player); } else {Sleep 0.01}; /// Forced to do this thanks to Arma 3's out of control "splat" parachutes and the lovely spontaneous combustion bug /// waitUntil {((getPosATL player select 2) < 3)}; player allowdamage false; sleep 5; player allowdamage true; sleep 2; player setdamage 0; sleep 120; deleteMarker _mkr;
  7. I'm sure someone else has a better idea, but as a short and dirty method you could always have the group allowdamage false to begin with and use a trigger to cover the entire route that the convoy is taking with BLUFOR detected by OPFOR as the Conditions and the On Act would group allowdamage true.
  8. That, or if you're using AI this setFuel 0; or Just box it in with Hesko barriers.
  9. kahna

    Whitelisting Slots

    Here you go! This is what I use for my missions. RESERVED SLOT /* ReservedSlot.sqf by Kahna Initially call this script in the Init.sqf and then include it in whatever script you use to respawn players, otherwise the respawned player will not have the Reserved Slot script applied to it. */ while {true} do { private ["_reserved_units", "_reserved_uids", "_uid"]; waitUntil {!isNull player}; waitUntil {(vehicle player) == player}; waitUntil {(getPlayerUID player) != ""}; // Variable Name of the Player Character to be restricted. // _reserved_units = [Reserved01]; // The player UID is a 17 digit number found in the profile tab. // _reserved_uids = [ "UIDXXXXXXXXXXXXXX"/* Add Player Name Here */, "UIDXXXXXXXXXXXXXX"/* Add Player Name Here */, "UIDXXXXXXXXXXXXXX"/* Add Player Name Here */ ]; // Stores the connecting player's UID // _uid = getPlayerUID player; if ((player in _reserved_units)&& !(_uid in _reserved_uids)) then { titleText ["", "BLACK OUT"]; disableUserInput true; hint "You are in a reserved slot! You will be kicked to the lobby in 15 seconds!"; sleep 5; hint "You are in a reserved slot! You will be kicked to the lobby in 10 seconds!"; sleep 5; hint "You are in a reserved slot! You will be kicked to the lobby in 5 seconds!"; sleep 5; titleText ["", "BLACK IN"]; disableUserInput false; failMission "end1"; }; };
  10. kahna

    [Request] Whitelist

    Here are two examples for you that I use in my missions. VEHICLE WHITELIST /* VehicleWhitelist.sqf by Kahna The player UID is a 17 digit number found in the profile tab. Initially call this script in the Init.sqf and then include it in whatever script you use to respawn vehicles, otherwise the respawned vehicle will not have the Whitelist script applied to it. You can adapt this for vehicles and ships as well as using vehicle variable names in the restricted array if you desire to allow public players to operate the same type of aircraft that are reserved for players in the UID List (i.e. Wipeout 1 for Public, Wipeout 2 for Members, etc) */ _UIDList = [ "UIDXXXXXXXXXXXXXX"/* Add Player Name Here */, "UIDXXXXXXXXXXXXXX"/* Add Player Name Here */, "UIDXXXXXXXXXXXXXX"/* Add Player Name Here */, "UIDXXXXXXXXXXXXXX"/* Add Player Name Here*/ ]; // Types of Players allowed to operate aircraft (i.e. PilotCheck). Omit this if you want anyone in the UID List to be able to fly. // _AirRoles = ["B_Helipilot_F"]; // Types of Aircraft to be restricted. // _RestrictAir = ["B_Heli_Attack_01_F"]; while {true} do { waitUntil {sleep 0.5; alive player}; if (!((getPlayerUID player) in _UIDList) && ((typeof player) in _AirRoles)) then { private "_v"; while {alive player} do { waitUntil {sleep 0.5; vehicle player != player}; _v = vehicle player; _t = typeof _v; if (_t in _RestrictAir) then { if (driver _v == player) then { player action ["eject", _v]; waitUntil {sleep 0.5; vehicle player == player}; player action ["engineOff", _v]; hint "You are not authorized to operate this aircraft!"; }; }; }; } else { waitUntil {sleep 0.5; !alive player}; }; }; RESERVED SLOT /* ReservedSlot.sqf by Kahna Initially call this script in the Init.sqf and then include it in whatever script you use to respawn players, otherwise the respawned player will not have the Reserved Slot script applied to it. */ while {true} do { private ["_reserved_units", "_reserved_uids", "_uid"]; waitUntil {!isNull player}; waitUntil {(vehicle player) == player}; waitUntil {(getPlayerUID player) != ""}; // Variable Name of the Player Character to be restricted. // _reserved_units = [Reserved01]; // The player UID is a 17 digit number found in the profile tab. // _reserved_uids = [ "UIDXXXXXXXXXXXXXX"/* Add Player Name Here */, "UIDXXXXXXXXXXXXXX"/* Add Player Name Here */, "UIDXXXXXXXXXXXXXX"/* Add Player Name Here */ ]; // Stores the connecting player's UID // _uid = getPlayerUID player; if ((player in _reserved_units)&& !(_uid in _reserved_uids)) then { titleText ["", "BLACK OUT"]; disableUserInput true; hint "You are in a reserved slot! You will be kicked to the lobby in 15 seconds!"; sleep 5; hint "You are in a reserved slot! You will be kicked to the lobby in 10 seconds!"; sleep 5; hint "You are in a reserved slot! You will be kicked to the lobby in 5 seconds!"; sleep 5; titleText ["", "BLACK IN"]; disableUserInput false; failMission "end1"; }; };
  11. Here you go! It's a bit crude, I'm sure someone could script it better, but this demo will get you started on the right track. https://www.dropbox.com/sh/t4rrsju5yv70iq8/AAAc9RzaibtnbI44IdtCzIDJa
  12. By default, you've got nothing for respawns (when not using modules). Also, by default, the standard Arma 3 respawn is to have a marker somewhere that is named "respawn_west", "respawn_east", etc for BLUFOR, OPFOR, etc which is automatically recognized by the game that you want players to respawn there at ground level. If you want to get trickier than that, that's when you start using other markers, setPos, getPos/getMarkerPos and use if-thens for different classes in whatever script you're using the handle respawns. Another fun thing to do is the good old checkpoint system where you use triggers to move the respawn point around the map with you Halo style (ie setMarkerPos of your respawn marker to the location of another marker via trigger ON ACT). Good times.
  13. Stop using the in-game module. Never liked that thing anyway... I'm assuming that you want players to spawn/respawn in a specific spot on the deck of the Nimitz correct? If so, just add (modify) this to your respawn script. I plug it into BTC Revive, replacing the default marker that it uses. You can also expand upon this with some if then commands and alternate spawn markers to spawn different classes in different places (I do this to separate the ground pounders from the pilots on respawn). _pos = getMarkerPos "markername"; // The name of your invisible respawn marker player setpos [(_pos select 0) + ((random 5) - (random 5)), (_pos select 1) + ((random 5) - (random 5)), 0]; Where select 0 and 1 are the X and Y coordinates of the marker and the final 0 is the Z coordinate or altitude. Sometimes with markers the 0 value will put you exactly on top of the object, sometimes it wont as is my experience with the Nimitz. The random's are just there so you don't have people respawning on top of one another, change the values as you see fit.
  14. Hi folks. This may or may not be a simple request. A long time ago I worked on a script to animate the Ghost Hawk doors so that the pilot could cycle them open/closed with an addaction that simply animated them ( ex. _ghost animateDoor ['door_L', _state]; ). I'm wondering if anyone can help point me in the right direction when it comes to the camera pod on the Hellcat. I've been looking at its config file, but I'm at a loss. Basically I want to create a simple script that will allow the pilot of the Hellcat to use an addAction to return their camera pod to its default position. After that I'll add in simple additions such as automating it if the copilot is unoccupied, triggered by specific ATL altitude, etc. I'm simply tired of random players leaving the pod pointed backwards during night operations and having to land, swap seats, correct it and swap back to pilot. Any ideas?
  15. kahna

    btc revive disable

    Just look in BTC Revive's INIT where it has all of the settings... Change (line 14 in my version) BTC_disable_respawn = 0; from 0 (false) to 1 (true).
  16. kahna

    Addaction

    That's not how you use addactions though. First you have to tell the action, in this case 'Eject' what to do with itself (what script or action to run) this addAction["<t color='#ff1111'>Eject</t>", "Eject.sqf"]; Second, your script just runs through a sequence of commands to do a parachute eject from an aircraft, but where is the script actually being called from initially? Ideally you would have the addaction and the accompanying script called from the vehicle's INIT line in which case you wouldn't need the addaction in the script itself, especially at the end after everything is complete (parachuting through the air) and there is nothing to eject from.
  17. kahna

    Random Spawn

    Could always borrow the ideas behind BTC's Mobile HQ script and modify it a bit. A marker in the center point of your area, X and Y values of your marker plus randomly calculated numbers and a Z value for elevation at the end. Just increase the numbers (25) for longer distances. Just an idea, hope it gets the brain juices flowing. _pos = getMarkerPos "mkr1"; player setPos [(_pos select 0) + ((random 25) - (random 25)), (_pos select 1) + ((random 25) - (random 25)), 0];
  18. Alright, I spent about three hours today beating up the search function and trying out scripts that simply don't work or don't do what I want them to do. Although I did find out how to move the respawn_west marker around to accommodate a 'new respawn point unlocked' type of gameplay which is nice to know... Anyway, basically I have respawn_west at Stratis Air Base and I want the Infantry to spawn/respawn in one location and the Pilots to spawn/respawn in a separate location (partly for realism and partly to stop "the swarm" to people rushing to meet my rotors/skids/wheels/tail /sigh). I'm still learning scripting (I'd say a 3 out of 10 atm), so if someone can point me in the right direction or offer a snippet of example code I'd be very grateful. My most recent attempt was to add a MPrespawn event handler on the pilots that called a script to make the unit (this) setpos getpos markername and that didn't work out. I also tried a variation that had fields for x and y axis positions & elevation, no joy... Thanks in advance!
  19. I'm looking for something that can either restrict vehicle usage to unit members by Player ID or prevents access to a certain area if you're not on the white-list (vehicle bays for example). We have a public server that runs Insurgency and we like to invite the public in to play with us quasi-realism style with emphasis on teamwork (running Hunter convoys, air assaulting, marking targets for CAS, etc). The biggest problems we have are unauthorized pilots hopping into helicopters and either killing their passengers (inexperienced flyers crashing and/or AA fire because they don't know the safe routes to fly) or abandoning Heli's in the field (not a problem with low abandonment timers, but sometimes the pilot does over-watch in small operations and I don't want them to have to run back to their chopper every 2 minutes to reset the timer). I've already got a PilotCheck script ready, but I'd like unit members to have the option to fly the aircraft (if the pilot dies) which is why I'm looking for a Player ID based script. Another thing is Hunters griefing in the spawn (or people driving them off into the great blue yonder never to be seen again). I can easily stop it with barriers and such, but it gets unrealistic looking and GrenadeStop.sqf won't stop their turrets from functioning so I'd rather just have authorized drivers being able to drive them and gain access to them. If there isn't a working whitelist script out there, anything that you guys could suggest would be helpful! The goal is cut down on the need for an admin being on all of the time. Right now I'm using a combination of GrenadeStop, PilotCheck and the Insurgency TK punishment (5 min jail time, since only vehicles can deliberately kill at spawn in this manner - no more Arma 2 Grenade/Gear button accidents!). Thanks much!
  20. Well now I feel stupid. Thanks Bob, it's working. Gonna get some EOS 1.8 play time in, I'll let you know if anything goes awry.
  21. Minor Bug Tonic, nothing serious: v1.6 - You cannot use the Remove/Remove All buttons in VAS to unequip Binoculars, Rangefinders or Laser Designators.
  22. For both eos_GearBox and eos_JIP when local hosting (haven't tested dedicated server): Error Undefined Variable In Expression: server _eosMarkers=server getvariable "EOSmarkers";
  23. I don't know, I guess you're just trying to do it differently. I've blasted my MHQ apart over and over again and it never fails to work. I just use a Hunter called mobileHQ with Tophe's Simple Vehicle Respawn Script in the INIT field and an object at the main respawn point with an addAction that calls up mobileHQ.sqf. To me it just looks like you're trying to do something a lot more complicated with your MHQ and I'm not sure what it is you're trying to accomplish.
  24. The only issue you're running into is that triggers don't distinguish between the 'player' who activated it and all of the other 'player' characters which is why it teleports everyone. A simple way to fix this is to just have an object at base with an addAction that executes the teleport to MHQ script. This is my MHQ script, and yeah it could check for empty cargo positions (if I used that option, I don't) and it could check for the speed of the vehicle, but I use it for private games only so it's a non issue. Feel free to use and modify to your liking. mobileHQ.sqf /* Dead Simple MHQ Script by Kahna Add the following code to the INIT of the Object you want to use to teleport you to the MHQ. ** Note: this enablesimulation false removes all interaction and physics from from the object, delete that line if it causes problems. Otherwise it keeps your MHQ teleport object from getting knocked down. this allowdamage false; this enablesimulation false; this addAction["<t color='#ff1111'>Mobile HQ</t>", "mobileHQ.sqf"]; ** Note: Where mobileHQ below is the variable name of your MHQ vehicle ** Note: The GetDamage section is intended to prevent players from spawning into or around a critically damaged MHQ that is likely under fire and about to explode. Set your damage values to your liking. If you don't care what damage the MHQ has sustained, set (_dmg < 0.99) or remove the code block entirely. */ private "_veh","_dmg","_pos"; _veh = mobileHQ; if (alive _veh) then { _dmg = getDammage _veh; _pos = getPos _veh; if (_dmg < 0.90) then { titleText ["Spawning at MHQ. Standby...", "BLACK OUT"]; sleep 2; //** Note: Use this if you want players to spawn inside the MHQ and comment out the player setPos line. //player moveInCargo _veh; //** Note: This places the player at a random point within 10 meters of the MHQ at 0 elevation. player setPos [(_pos select 0) + ((random 10) - (random 10)), (_pos select 1) + ((random 10) - (random 10)), 0]; sleep 2; titleText ["", "BLACK IN"]; } else {hint "Mobile HQ is disabled!"}; } else {hint "Mobile HQ is not available"};
  25. Alright Bob, spent the night testing it. Looking very nice! Came up with some issues. First Any time a marker went into Bastion mode the following error would show up: Error Undefined variable in expression: _air eos\eos_init Line 96 Second After clearing a marker from red to green (non Bastion), a random number would get spit out in the hint box (3.06819 and 7.96873 were ones that I grabbed with screen caps). Third I don't have it set to spawn aircraft for the occupied zone and it doesn't, however during a Bastion mode we're always getting an Mi-48 (is there a way to turn that on/off) and also the Mi-48 never seems to react to ground forces, however it is a long range crackshot at taking out our Blackfoot. Fourth OPFOR vehicles are still not locating safe spawn points and occasionally explode when they intersect other objects. Rare, but it did happen 3 times that I saw during three hours of testing. One intersected the Hesko barriers at Camp Tempest, another spawned inside the wall of a building at Jay Cove and the third I didn't see what happened, but it detonated next to the Lighthouse at the Spartan. ---------- I use 25-100m Ellipse Markers (denotes strength of the forces in the area) Example of my OpenMe code, just in case I set a variable wrong: //Medium Base [["Maxwell","Rogain","Kamino"],[2,4,3,3,4,0],[0,250,0],true] execVM "eos\eos_GearBox.sqf";
×