patpowercat
Member-
Content Count
71 -
Joined
-
Last visited
-
Medals
Everything posted by patpowercat
-
So I have been trying to figure this out for quite some time, and I need some help. The idea is: there is a hostage, you rescue them and then need to extract. I have the hostage set up, it will join group on trigger, be saved, etc. However, I am having trouble with the extract. I can get the hostage unit to join a different group, and am trying to have a helicopter come in and pick them up. I have the hostage group with the pilot, and have a load waypoint set. However, the helicopter doesn't land, and the unit just runs around aimlessly trying to board the chopper. If I set a LAND waypoint, the helicopter doesn't wait for the trigger on the hold waypoint, AND the unit still doesn't load into the helicopter. I feel like this is something ridiculously simple that I should be able to figure out.
-
I'm a novice at scripting, but I have been working on modifying a script I found. Instead of spawning a single group in a helicopter, I want to spawn 2 in the helicopter. It works great with a single group, but when I try and add in the second group, I get an error that I am missing a "{". Any ideas? Script with two groups: _crew1 = []; _airframe1 = []; _mygroup = []; _mygroup2 =[]; if (isServer) then { _crew1 = creategroup WEST; _airframe1 = [getMarkerPos "Mk1", 140, "B_Heli_Transport_03_F", _crew1] call BIS_fnc_spawnVehicle; _wp1 = _crew1 addWaypoint [(getmarkerpos "Max"), 0]; _wp1 setWaypointType "TR UNLOAD"; _wp1 setWaypointSpeed "FAST"; _wp1 setwaypointstatements ["this land 'land'"]; _wp2 = _crew1 addWaypoint [(getmarkerpos "Mk1"), 0]; _wp2 setWaypointType "MOVE"; _wp2 setWaypointSpeed "FAST"; _wp2 setWaypointStatements ["true", "{deleteVehicle _x;} forEach crew (vehicle this) + [vehicle this];"]; _mygroup = [getMarkerPos "Mk1", WEST, (configfile >> "CfgGroups" >> "West" >> "BLU_F" >> "Infantry" >> "BUS_InfAssault")] call BIS_fnc_spawnGroup; _wp1a = _mygroup addWaypoint [getmarkerpos "Max1", 0]; _wp1a setWaypointType "LOITER"; _mygroup2 = [getMarkerPos "Mk1", WEST, (configfile >> "CfgGroups" >> "West" >> "BLU_F" >> "Infantry" >> "BUS_ReconTeam")] call BIS_fnc_spawnGroup; _wp1b = _mygroup2 addWaypoint [getmarkerpos "Max2", 0]; _wp1b setWaypointType "LOITER"; sleep .5; _mygroup = _mygroup; { _x assignAsCargo (_airframe1 select 0); _x moveIncargo (_airframe1 select 0);} foreach units _mygroup; }; _mygroup2 = _mygroup2; { _x assignAsCargo (_airframe1 select 0); _x moveIncargo (_airframe1 select 0);} foreach units _mygroup2; }; Spawn with one group: (working) _crew1 = []; _airframe1 = []; _mygroup = []; if (isServer) then { _crew1 = creategroup WEST; _airframe1 = [getMarkerPos "Mk1", 140, "B_Heli_Transport_03_F", _crew1] call BIS_fnc_spawnVehicle; _wp1 = _crew1 addWaypoint [(getmarkerpos "Max"), 0]; _wp1 setWaypointType "TR UNLOAD"; _wp1 setWaypointSpeed "FAST"; _wp1 setwaypointstatements ["this land 'land'"]; _wp2 = _crew1 addWaypoint [(getmarkerpos "Mk1"), 0]; _wp2 setWaypointType "MOVE"; _wp2 setWaypointSpeed "FAST"; _wp2 setWaypointStatements ["true", "{deleteVehicle _x;} forEach crew (vehicle this) + [vehicle this];"]; _mygroup = [getMarkerPos "Mk1", WEST, (configfile >> "CfgGroups" >> "West" >> "BLU_F" >> "Infantry" >> "BUS_InfAssault")] call BIS_fnc_spawnGroup; _wp1a = _mygroup addWaypoint [getmarkerpos "Max1", 0]; _wp1a setWaypointType "LOITER"; sleep .5; _mygroup = _mygroup; { _x assignAsCargo (_airframe1 select 0); _x moveIncargo (_airframe1 select 0);} foreach units _mygroup; }; _mygroup2 = _mygroup2; { _x assignAsCargo (_airframe1 select 0); _x moveIncargo (_airframe1 select 0);} foreach units _mygroup2; }; I don't understand why I am getting this error.
-
What's wrong with my script?
patpowercat replied to patpowercat's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Perfect thanks on both accounts! -
Event Handler Persist after respawn
patpowercat replied to patpowercat's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Sweet thanks a ton for explaining that! I'll try it when I get home Wednesday. -
Event Handler Persist after respawn
patpowercat replied to patpowercat's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Ok thanks. I've been reading up on it but still a bit confused. Honestly the locality host/server thing just confuses me in general. if all I wanted was to move the respawn event handler into onplayerrespawn, would the code just be: this addeventhandler ["handle damage", etc etc] Or would I need to change "this" to player? I'm away from my computer so I can't actually test any of the script. -
Event Handler Persist after respawn
patpowercat replied to patpowercat's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I have an event handler for hit damage that reduces damage to the player. For the onplayerrespawn.sqf, would I just add in the event handler to the script? Does a onplayerrespawn override a respawn in the description.ext? -
Group respawn with specific loadout
patpowercat posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
I've been working on adapting a script I found to respawn your AI squadmembers and then insert them with a helicopter to your position. I set them up with specific gear in the arsenal editor, but no matter what I seem to do I can't get them to respawn with that equipment. I tried setting a loadout in the unit's init field, which won't work (I think) because the script doesn't actually respawn that specific unit, it creates new ones of the same class. So I've been trying to edit the script, but can't get it. This is what I have so far: If (not isServer) exitWith {}; private ["_helo","_unit","_hPad","_heloWp"]; // CREATE THE HELO AND HPAD. SET THE HELO'S DIRECTION _helo = [getMarkerPos "Mk1", markerDir "Mk1", "B_Heli_Transport_01_F", WEST] call bis_fnc_spawnVehicle; _hPad = "Land_HelipadEmpty_F" createVehicle ( position player1 ); // CHECK THE GROUP AND REPLACE DEAD UNITS. MOVE THEM INTO THE HELO'S CARGO { if ( ! ( alive ( _x select 0 ) ) ) then { _unit = (ALPHA) createUnit [ ( _x select 1 ), getMarkerPos "Mk1", [], 0, "NONE" ]; _unit moveInCargo ( _helo select 0 ) }; } {if (typeof _unit == "B_Recon_Sharpshooter_F") then {removeheadgear _unit};} forEach grpArray; // RESET THE ARRAY grpArray = []; { grpArray pushBack [ _x, ( typeOf _x ) ]; } forEach units ALPHA; // GIVE THE HELO A WAYPOINT AT THE HPAD'S POSITION (PLAYER POS) _heloWp = ( _helo select 2 ) addWaypoint [_hPad, 0]; _heloWp setWaypointType "MOVE"; _heloWp setWaypointBehaviour "CARELESS"; _heloWp setWaypointCombatMode "BLUE"; _heloWp setWaypointSpeed "FULL"; _heloWp setWaypointStatements ["true", "(vehicle this) LAND 'LAND';"]; // WAIT UNTIL THE HELO IS TOUCHING THE GROUND OR CAN'T MOVE (SHOT DOWN / WRECK) ANDD EJECT THE UNITS waitUntil {isTouchingGround (_helo select 0) || { ! ( canMove ( _helo select 0 ) ) } }; { unAssignVehicle _x; _x action ["eject", ( vehicle _x )]; sleep 1; } forEach units ALPHA; //WAITUNTIL THERE'S NO ALIVE GROUP MEMBERS IN THE HELO AND GIVE THE HELO A NEW WAYPOINT WHERE IT WILL BE DESTROYED waitUntil { { !( alive _x ) || { !( _x in ( _helo select 0 ) ) } } count (units ALPHA) == count (units ALPHA)}; _heloWp = ( _helo select 2 ) addWaypoint [[0,0,0], 0]; _heloWp setWaypointType "MOVE"; _heloWp setWaypointBehaviour "AWARE"; _heloWp setWaypointCombatMode "RED"; _heloWp setWaypointSpeed "FULL"; _heloWp setWaypointStatements ["true", "{deleteVehicle _x;} forEach crew (vehicle this) + [vehicle this];"]; // DELETE THE EMPTY H-PAD deleteVehicle _hPad; {if (typeof _unit == "B_Recon_Sharpshooter_F") then {removeheadgear _unit};} This is where I am trying to set the specific inventory for the unit, but having lots of trouble. Any help would be appreciated! -
Group respawn with specific loadout
patpowercat replied to patpowercat's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I have tried a respawn event handler and such. The problem is the script doesn't actually "respawn" the specific unit, it takes a TYPE of that unit. So I either need to figure out how to change a unit load out via the script AFTER spawning, or figure out how to change the script so the unit respawns. -
AI respawn with custom loadout
patpowercat replied to svarun's topic in ARMA 3 - MISSION EDITING & SCRIPTING
How would the syntax for this be? [this, ["loadout.sqf"]] call Bis_fnc_saveinventory; this addeventhandler ["respawn", {this ["loadout.sqf"]} call bis_fnc_loadinventory]; -
Script stops working during multiplayer
patpowercat posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
I am having some trouble with getting a script to work. It creates a group array which respawns your dead AI squad members in a helicopter which flies to your position to insert them. It's based of a radio trigger. I have input it in a mission which works great with single player, as well as testing multiplayer from the Eden editor. However, once uploaded to my local TADST dedicated server, the script spawns two helicopters on top of each other, which of course crash and fall to the ground. Here is the script: The group array is established in init.sqf with this (Alpha being the group). Note: The credit for this script goes to Iceman77 Any ideas as to why this is occurring? Does the script need to modified to use if isServer perhaps? PS: There is an example mission here, again credit to Iceman77 -
Script stops working during multiplayer
patpowercat replied to patpowercat's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Un-including the player from the array was successful, but I can't get the gear respawn to work. I have tried both this addEventHandler ["respawn", "_this execVM 'loadout.sqf'"]; and this addEventHandler ["respawn",{if (local (_this select 0)) then {_this call "loadout.sqf"}}]; Is it perhaps because in the original grpArray PushBack calls of a typeOf _x rather than specifying the specific unit/variable? I have named the units individually as well, but still no success. -
AI respawn with custom loadout
patpowercat replied to svarun's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I'd like to know this too! -
Script stops working during multiplayer
patpowercat replied to patpowercat's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Ok thanks I'll check it out. One last thing, how could I not include myself in the grpArray? If I die, I respawn already, but then when I run the script, there is another of me that spawns as well because I'm in the group. -
Script stops working during multiplayer
patpowercat replied to patpowercat's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Worked perfectly! Thank you so much, been trying to figure that out for a week. 2 quick other questions: 1) What would the syntax be to make the _hPad just a bit away from me (any direction) so the helicopter doesn't come down RIGHT on top of me? I tried (position player1), [0,10,0], but that didn't work. (position player1), 10, makes it come down, stop 10meters up, and fly away. 2) Any idea how to set the group's inventory so when they respawn they come back with weapons they had at start? I change the arsenal in the editor, but on spawn they have default class gear. Thanks again! -
Script stops working during multiplayer
patpowercat replied to patpowercat's topic in ARMA 3 - MISSION EDITING & SCRIPTING
What would the syntax for this be? I tried replacing the execVM on the trigger with what I thought would be syntax from here, but nothing happened. Sorry still pretty new to the whole editing and scripting thing. -
Arkensor, I understand completely what you are saying, however I don't have HC setup or Battleye enabled, so using your logic shouldn't there be only a single server?
-
Additionally, when I connect to one of the servers and try to begin the mission I get told "wait for host", the other server launches alright.
-
So I have done this with Battleye both on and off, doesn't seem to change how many servers appear. Only thing I can think of is because the server runs from Arma Launcher and Arma runs from it as well so for some reason it thinks there are two instances, if that makes sense?
-
Anyone ever get this figured out?
-
Tophe's Arma Dedicated Server Tool (TADST)
patpowercat replied to tophe's topic in ARMA 3 - SERVERS & ADMINISTRATION
Did you ever figure out the two instances that are showing up? I'm having the same problem and can't figure it out.