Jump to content

Kempco

Member
  • Content Count

    147
  • Joined

  • Last visited

  • Medals

Posts posted by Kempco


  1. Slowly getting this brill script to work !! Using this and Norrins airborne taxi script so I can HALO in and then call for extraction using The other awesome MH-47 addon!!.

    Been trying to get the bailout masks to show and have gone back to older version of desert Mercs but no joy yet! Another great feature for me in this script is my squad go in clean faces and exit cammo just like the real thing, as in on board mission prep. I'd also like to re texture the square canopy to grey as I was jumping for real with some UK pathfinder last year in Elsinore a couple are mates of mine through mutual friends and all the operational canopies are grey.

    And I'm still trying to figure out why rest of squad use round canopies but the player uses the square?

    The reason the AI are using round chutes is because you are using ACE. There is no way,that I am aware of, to get the AI to fly straight in the square chutes. As for the bailout masks, you have to use the A2 (not OA version) of the addon. Hope that helps.


  2. Kempco would you be able and willing to add the the NEW L119A1 Pack weapons (updated and with the new classnames I'm guessing is the reason it will not work) as well as Sabres Australian SOTG weapons (that come with the units mod) please? Those would be a great addition to the script and I have tried adding them myself but for some reason I can never get them to work properly. I'm not sure what I'm doing wrong but I have put in many hours trying to figure it out. I'm sure it's something small that I'm not getting, but I'm drawing a blank and figured you'd be the best person to ask about adding them. I would be extremely grateful. Thank you for your time.

    The class names of the weapons MUST be all lower case to work.


  3. I have a question.

    I play use this great Halo script with ACE MOD in multiplayer.

    after Halo jump, all players were changed into default Face.

    I want to keep to play use Custom Face after Halo jump.

    How to do that? Please Help.

    In short, you can't.

    If you are using ACE, then your Identity will be the one you have selected in your player profile, this is your "ACE_Original_Identity". If you want to mess your ID when using ACE, do so using the edit option located under player profile (Main Menu). Any ID you select in mission will be overridden by this ID if you use any of the mask/goggle options.


  4. For helicopters, as of alpha 0.54, The effects of limitSpeed are no longer temporary, i.e. no longer need to be run in a loop. This means that you need to clear it when you are done. YOUR_HELO limitspeed 5000; (The 5000 sets the limit to a speed exceeding the aircraft's max thus removing the effects limit issues via the limitspeed command).


  5. The "built-in" H pads do not have a config definition, hence the return of the p3d.

    See here for further reading:

    Bug #18579

    Objects vs Map Objects

    Nearobjects and trees + bushes

    What are you trying to do with this?

    I want to use the H-pads build into the map as cross-reference with the following function to get the nearest "safe" landing zone for an AI pilot to Land.

    //by Kempco
    
    _pos 	= _this select 0;
    _limit = _this select 1;
    _helo  = _this select 2;
    
    _LZ = false;
    _bb_max = boundingBox _helo select 1; 
    _size = [[_bb_max select 0,_bb_max select 1],1] call bis_fnc_findExtreme;
    _diameter = 1.25*_size;
    _maxgradient = 0.125;
    _isFlat = [_pos select 0,_pos select 1,0] isflatempty [_diameter,0,_maxgradient,_diameter,0,false,objNull];
    
    scopeName "main";
    if (count _isFlat != 3) then {
    _center = _pos;
    _pos = false;
    
    for "_i" from 1 to 1000 do {
    	_d = _diameter + (0.5*_diameter*_i);
    	if (_d > _limit) exitWith {};
    
    	_steps = floor (_d*pi*0.1);
    	_inc = 360/_steps;
    	for "_j" from 1 to _steps do {
    		_dir = _inc * _j;
    		_x = (_center select 0)+(sin(_dir)*_d);
    		_y = (_center select 1)+(cos(_dir)*_d);
    		_isFlat = [_x,_y,0] isflatempty [_diameter,0,_maxgradient,_diameter,0,false,objNull];
    		_LZ = if (count _isFlat == 3) then {_isFlat}else{false};
    		if (typeName _LZ == "ARRAY") exitWith {};
    	};
    	if (typeName _LZ == "ARRAY") exitWith {};
    };
    }else{
    _LZ = _isFlat;
    };
    _LZ


  6. the following code was used to get the type of Object of a Known helipad at the Zargabad Airport:

    copyToClipboard (format ["%1", TypeOf ((position player) nearestObject 3999)]);

    The Above code works with buildings but in the case of the Helipad it returned an empty string.

    I then tried:

    copyToClipboard (format ["%1", (position player) nearestObject 3999]);

    Which returned ==> 3999: heli_h_army.p3d

    is there a way to convert the p3d model returned by the above code to its associated object class other then "typeOf"?

    PS: the object classes of the 3 visible helipads ["HeliH","HeliHRescue","HeliHCivil"] also did not register.


  7. Trying to get a helicopter to fly to position and not land, problem is the helicopter stops short by about 50m. I used both attachTo and setvelocity to move the helicopter into position but neither seem to have an effect. The following code is from an arma 2 script used to drop units off on land and over water. AttachTo was used instead of setvelocity because attachTo does not change the VectorDir/VectorUp of the vehicle. Are the new helicopters simulated differently? If so how do you get them to fly to a specific position without landing?

    //by Kempco
    _helo = _this select 0;
    _endpos = _this select 1; 
    _pilot = driver _helo;
    
    if (surfaceIsWater _endpos) then {
    _hlpr = JTK_Transport_Hlpr createVehicle [0,0,0];
    WaitUntil {!isNil "_hlpr"};
    _hlpr hideObject true;
    JTK_Call_PVEH = [_hlpr,compile "_this hideObject true"];
    publicVariable "JTK_Call_PVEH";
    
    While {(getpos _helo select 2 > (JTK_Transport_FlyInHeight*0.5)+1) AND (canmove _helo) AND (alive _pilot)} do {sleep 0.5};
    
    _pos = _helo worldToModel _endpos;
    _dir2 = (_pos select 0) atan2 (_pos select 1); 
    _dist2 = sqrt((_pos select 0)^2+(_pos select 1)^2);
    
    for [{_i = 0},{_i < abs(_dir2)},{_i = _i + 1}] do {
    	_helo setdir ((getDir _helo)+abs(_dir2)/_dir2);	
    	 _helo setVelocity [0,0,0];
    	sleep 0.05;
    };
    _alt = getpos _helo select 2;
    _attachPos = [0,0,_alt];
    _hlpr setDir (direction _helo);
    _hlpr setPos (_helo modelToWorld [0,0,-_alt]);
    _hlpr setVectorUp [0,0,1];
    _helo attachTo [_hlpr,_attachPos];
    
    _dir = direction _hlpr;
    _dist = [_helo,_endpos] call BIS_fnc_distance2D;
    _approachDist = (_dist*0.15);
    _speed = 0;
    _speed_max = 45;
    _speed_min = 1;
    _n = 200;
    _t = 0;
    while {(alive _pilot) AND (canmove _helo)} do {
    	_dist_old = _dist;
    	_dist = [_helo,_endpos] call BIS_fnc_distance2D;
    	_speed = if (_dist > _approachDist) then {
    		if (_speed < _speed_max) then {_speed + 0.25}else{_speed_max};
    	}else{
    		if (_speed > _speed_min) then {_speed - 0.25}else{_speed_min};
    	};
    	if (_speed == _speed_min) then {_t = _t + (1/_n)};
    	_inc = (_speed/_n);
    	if ((_dist > _dist_old) OR (_dist <= 1) OR (_t > 3)) exitWith {
    		deleteVehicle _hlpr;
    		_helo setVelocity [0,0,0];
    	};
    	_attachPos = [_attachPos select 0,((_attachPos select 1) + _inc),_attachPos select 2]; 
    	_helo attachTo [_hlpr,_attachPos];
    	sleep (1/_n);
    };
    _helo flyInHeight 5;
    While {(getpos _helo select 2 > 5.5) AND (canmove _helo) AND (alive _pilot)} do {sleep 0.5};
    }else{
    _helo land "GET OUT";
    While {(getpos _helo select 2 > 1.5) AND (canmove _helo) AND (alive _pilot)} do {sleep 0.5};
    };
    
    _unitsToEject = [];	
    {if(count(assignedVehicleRole _x) != 2 AND _x != _pilot) then {_unitsToEject = _unitsToEject + [_x]}}forEach (crew _helo);
    for "_i" from 0 to (count _unitsToEject - 1) do {
    [(_unitsToEject select _i),_helo] spawn {//<======================Give units clearence so they do not "stick" to heli
    	WaitUntil {!((_this select 0) in (_this select 1))};
    	(_this select 0) setPos ((_this select 0) modelToWorld [0,1.0,-0.5]);
    };
    unassignVehicle (_unitsToEject select _i);
    (_unitsToEject select _i) action ["Eject",_helo];
    sleep 0.25;
    if !(surfaceiswater _endpos) then {_helo setVelocity [0,0,-1]};
    };
    sleep 1;
    _helo flyinheight JTK_Transport_FlyInHeight;
    _helo land "NONE";


  8. Hello,

    I tried the script, everything working fine so far, except that the AI deploys round parachute instead of the square one. I disabled all mods except CBA and ACE (also playing with "Require ACE function"), no change. Any help with this?

    EDIT: I disabled ACE, now the AI is using square canopies. So how is it possible to play with ACE or what needs to be edited so the AI uses the proper parachute?

    Thanks in advance

    This has to do with changes ACE made to the bis parachute class. I could get the AI into the square chutes but getting them to do anything after that was a nut I couldn't crack. Anything above 25m looked terrible. I initially had it where the AI would pull their chutes at 100m them teleport to 25m, (see the armaholic video, not the water one.)

    ---------- Post added at 03:26 PM ---------- Previous post was at 03:02 PM ----------

    Kempco

    I know it is still to early, but I hope this script finds it way into ARMA3. In my opinion, it is hands down the best halo out there.

    Thank you . Once they add the fixed wing aircraft and parachutes ill get started.


  9. I have been told that if I create the markers via createMarker, it shows up on everyone's maps. But if I add below that, setMarkerTransparencyLocal to 0 for someone who is not the player who started the script, would that work to erase the visibility of the marker on everyone else's maps?

    Since your script is activated via an addaction, it will always be local to the player who executed it. Since addactions are always local, you should be able to use the createmarkerlocal command via the local addaction to create a marker that is only viable to you. (This is not the case for editor placed triggers/init lines). Creating the marker globally, which is what Createmarker does, then hiding it locally for everyone else but you is doable using PVEHs, but very inefficient in this case.


  10. I will start off by apologizing if the answer to this is somewhere in this thread but the time I get to spend playing with ARMA 2 is limited and I will never get a chance to get through 230+ pages looking for the solution. That being said:

    I am having some problems creating a mission that has a HALO insertion at the beginning. I am trying to use the ACE HALO script and started out with the following in the init line of each of the player units:

    this addweapon "ACE_ParachutePack"; this setpos [getpos this select 0, getpos this select 1,(getpos this select 2) +1500]; _nil = this spawn {[_this] execvm "\x\ace\addons\sys_eject\jumpout_cord.sqf"; };

    The effect was that all of us were in the HALO positions but only the group leader had the capability of pulling the rip cord on a chute. None of the other players had the action available to them and became large lawn darts.

    Then I tried the following, just changing the "this" before the calling of the ACE HALO script:

    this addweapon "ACE_ParachutePack"; this setpos [getpos this select 0, getpos this select 1,(getpos this select 2) +1500]; _nil = this spawn { sleep 1; this execvm "\x\ace\addons\sys_eject\jumpout_cord.sqf"; };

    This had the effect of all of us falling feet first in combat ready position and none of the players having the ability to deploy their chute. I don't pretend to understand the syntax of all of this yet but I am working on it and would appreciate if anyone could first tell me what I need to do or point me in the right direction of how to set up MP HALO jumps with ACE and/or tell me where I went/am going wrong?

    try the following:

    this addweapon "ACE_ParachutePack"; this setpos [getpos this select 0, getpos this select 1,(getpos this select 2) +1500]; _nil = this spawn {sleep 1; _this execVM "x\ace\addons\sys_eject\jumpout_cord.sqf"};


  11. Depends on the altitude. If your in a C130 above 2000m, you have to set the brightness extremely high, (I forget what I did but I think its something like +25.0 for each 2000-3000m). Make Sure you execute this local to each player and terminate the second the player exits the aircraft. At brightness levels that high the entire map changes color at ground level.


  12. The public variable event handler (PVEH) allows you execute code remotely (i.e. on all machines except the one it is initialized on). To illustrate how this is done, lets create 2 variables: “JTK_Call_PVEH†and JTK_Spawn_PVEH†and assign each a PVEH.

    "JTK_Call_PVEH" addPublicVariableEventHandler {((_this select 1) select 0) call ((_this select 1) select 1)};
    "JTK_Spawn_PVEH" addPublicVariableEventHandler {((_this select 1) select 0) spawn ((_this select 1) select 1)};

    The first part in quotes is the name of variable the PVEH is assigned followed by the addpublicvariableEventHandler followed by the code that will be executed when said variable is "PV'd".

    WTF does {((_this select 1) select 0) call ((_this select 1) select 1)} mean??

    The PVEH, like any event handler passes its own array. If you think of it in terms of a "killed" event handler, the array passed when a "killed" EH fires is [unit,killer].

    The PVEH passes the following array: [Old value of the variable, New value of the variable], the variable being the variable the PVEH is added to. The first part of the array, the old value, for the sake of executing code remotely, is not needed since the handler needs to know what code to execute. So we will only be concerned with the second part of the passed array: the new value of the variable i.e. (_this select 1) .

    code = {((_this select 1) select 0) call ((_this select 1) select 1)}

    To keep from having to create a different PVEH for each script you want to pass remotely, I create 2 PVEHs one for code I call, the other for code I spawn.

    Example: Play Sound For All Units via an addaction.

    //example of sqf passed via the addaction
    
    _unit  = _this select 0;
    
    _unit say3d "MY SOUND";//<==================================================================Executes Code for local unit
    JTK_Call_PVEH = [[color="#0000FF"][_unit,"MY SOUND"][/color],[color="#008000"]compile "(_this select 0) say3D (_this select 1)"[/color]]; 		
    publicVariable "JTK_Call_PVEH";//<==========================================================Executes Code for remote units 
    

    In the above example, the variable JTK_Call_PVEH is being defined as [[_unit,"MY SOUND"],compile "(_this select 0) say3D (_this select 1)"] before being PV'd.( IMPORTANT: When the variable is first defined, there are no quotes. When you PV the variable, you must add quotes.) When you PV the variable the PVEH executes the code according to NEW value of variable it is added to.

    The new value of JTK_Call_PVEH = [[_unit,"MY SOUND"],compile "(_this select 0) say3D (_this select 1)"]

    code executed: {((_this select 1) select 0) call ((_this select 1) select 1)} OR [_unit,"MY SOUND"] call compile "(_this select 0) say3D (_this select 1)";

    Using JTK_Spawn_PVEH;

    The above example executes a small segment of code that be created dynamically and compiled on the fly. If you want to run an entire script and that script contains any sleep or waituntil commands, then that script will have to be spawned in.

    First, precompile your script:

    JTK_HALO_PlayerExec = Compile PreprocessFile (JTK_HALO_Path+"scripts\PlayerExec.sqf");

    /*
    Example using PVEH:
    The following is a small segment from an FSM run server side.
    */
    
    
    if (isMultiplayer) then {	
    for "_i" from 0 to (count _players - 1) do {
    	_unit = _players select _i; 
    	_attachPos = _UnitPosArray select _i;
    	_unit setVariable ["JTK_HALO_Player_Ready",false,true];
    	_array = [_unit,_aircraft,_static,_attachpos];
    	if (local _unit) then {
    		_array spawn [color="#FF0000"]JTK_HALO_PlayerExec[/color];
    	}else{[b]JTK_Spawn_PVEH[/b] = [_array,[color="#FF0000"]JTK_HALO_PlayerExec[/color]]; publicVariable "[b]JTK_Spawn_PVEH[/b]"};
    
    };
    };

    What about CBA?

    If you are using CBA things are much easier.

    If you wanted to execute the above script globally using CBA you could use CBA_fnc_globalExecute function.

    https://dev-heaven.net/docs/cba/files/network/fnc_globalExecute-sqf.html#CBA_fnc_globalExecute

    /*
    Example using CBA:
    The following is a small segment from an FSM run server side.
    */
    if (isMultiplayer) then {	
    for "_i" from 0 to (count _players - 1) do {
    	_unit = _players select _i; 
    	_attachPos = _UnitPosArray select _i;
    	_unit setVariable ["JTK_HALO_Player_Ready",false,true];
    	_array = [_unit,_aircraft,_static,_attachpos];
    	[-1, {(_this select 0) spawn (_this select 1)},[_array,JTK_HALO_PlayerExec]] call CBA_fnc_globalExecute;
    };
    };
    

    The CBA_fnc_globalSay3d vs PVEH:

    _unit  = _this select 0;
    
    _unit say3d "MY SOUND"
    JTK_Call_PVEH = [[_unit,"MY SOUND"],compile "(_this select 0) say3D (_this select 1)"]; 		
    publicVariable "JTK_Call_PVEH";
    

    becomes..

    _unit  = _this select 0;
    [_unit, "MY SOUND"] call CBA_fnc_globalSay3d;
    

    Applying Restrictions To Globally Executed Scripts:

    When executing scripts globally make sure those scripts start with code that restricts their execution accordingly. To highlight potential pitfalls lets take the CBA_fnc_globalSay3d example but this time we will define the source as "player" not "_unit".

    _unit  = _this select 0;
    [_unit, "MY SOUND"] call CBA_fnc_globalSay3d;
    

    becomes...

    [player, "MY SOUND"] call CBA_fnc_globalSay3d;
    

    The source of sound to be played being propagated over the network is player. However, the definition of the "player" is not the same from client to client. On my computer my avatar is defined as "player" however on your computer, your avatar is the "player"; Therefore instead of playing the sound in 3d relative to the unit who executed the script, it will play the sound in 3d relative to each players position which defeats the purpose say3d in the first place.

    The above example JTK_HALO_PlayerExec was used to execute a script for all players that were within a specific vehicle. When executed, each player inside that vehicle would watch a cut scene while they were teleported to a new position. Keep in mind that the code is being executed for everyone, not just certain If you do not include restrictions within the script being propagated this will cause issues..............LIGHT BULB

    Writing this made me realize a potential problem with my script. Will finish later.


  13. I recommend FSM as apposed to sqf for something that will be running the entirety of the mission. I would execute the FSM for clients only i.e. if (!isDedicated) then {[] execFSM "".fsm} since time sync is not important and you probably want every player to get the message upon joining. If You don't know/are not familiar with FSM then just copy and past the below code and be done with it.

    if (isDedicated) exitWith {};
    WaitUntil{!isNull player};
    sleep 10;
    
    While {true} do {
    player sidechat "MY MESSAGE";
    sleep (60*60);
    };
    


  14. @RunForrest

    Thanks for the heads up. What is happening is one version (the unsuppressed ak) is from bis and the SD is from ace. I intentionally avoided dependencies like this when I created the script to avoid such issues but that was back when ACE was a requirement. The reason you are getting the error is because you do not have the weapon the script is trying to give to you. I will add this bis weapon under the ACEX required weapons.


  15. Love your script- great cut-scenes!

    On a dedicated server with v1.6- NO ACE, NO OPTIONAL ADD-ONS:

    1. When a player has ai units in thier group that were spawned in and joined to the player's group after mission start- they are NOT automatically boarded onto the C130 when the player gets in.

    2. The "reset" still does not function for me (v1.6). After clicking trough the dialog, the C130J engines continue to run, the pilot remains in the a/c moving the rudder back and forth. The arrows disappear and the ramp closes however. After a "reset" the "Configure" addaction never re-appears., even after leaving the trigger area and coming back.

    There was this error in the server's rpt log:

    2013/02/24, 13:49:57 Error in expression <;

    sleep 0.5;

    };

    };

    [_aircraft,_static,JTK_HALO_Helper_Arrows] spawn {

    _aircraf>

    Error position: <JTK_HALO_Helper_Arrows] spawn {

    _aircraf>

    Error Undefined variable in expression: jtk_halo_helper_arrows

    There was no relevant error in the client's .rpt file

    Thank you for your hard work and help with these issues!

    TAW_louderthanu

    AI units can only jump with you in SP. Since your playing on dedicated server, you are not playing a single player mission. The AI require a lot of resources, the limit for jumpers in the C130 in single player is 9 and 15 for multiplayer.The AI "should" be kicked out of the aircraft if they board in MP and you should get a Hint message if they try to board.


  16. UPDATE: v1.6

    I now have access to a dedicated server for testing, so that was the focus of this update. Let me know if you have any issues.

    Changelog:

    Version 1.6

    FIXED: Aircraft would not reset on dedicated servers.

    FIXED: Dialog control errors that referenced named IDCs that were undefined.

    FIXED: Osprey props would appear upside down to remote players.

    FIXED: Closing the GPS, then reopening broke the GPS.

    FIXED: C130 engine sound issues.

    Changed: Dummy/Decoy aircraft are created as side civilian to prevent markers from being visible.

    Changed: LZ marker now disappears once all players have landed.

    Changed: Bypass can be setup through vars defined in the editor. (See included readme for details).

    Changed: Reformatted init. (Cfgs in new locations so do not use an the old description.ext).

    Optimized server fsm by removing unneeded PVEHs.


  17. John Doe. lol

    ace_clientside_config.hpp

    place your player profile in it.

    Default = "ACE_Original_Identity"

    Gas mask US = "ACE_GlassesGasMask_US"

    Gas mask RU = "ACE_GlassesGasMask_RU"

    Balaklava = "ACE_GlassesBalaklava"

    Goggles = ???

    Something tells me that unlike the gas mask and baklava, the goggles still leave the face visible (i.e. independent of default identity) and referencing it will be different.


  18. You didn't get the point I was asking seba, I think.

    My question is not if it's conflicting (it's not, I know), the question is if the AI (scripted by ASR_AI i.e.) is reacting differently when firing a suppressed weapon after using the suppression script. Or does the AI "hear" the weapons still like it is unsuppressed?

    Another issue is the damage values. I played the attached test misson and found out that the damage values with suppressed and unsuppressed weapons are the same. :( (the mission on Utes has a scipt which is showing the damage values)

    So all in all it's a nice script Kempco, but it's only for eye and ear candy, but not actually changing the weapon itself and the related behavior of the AI.

    If you are using the vanilla version, the damage of the weapon will change because the projectile being fired has changed because the script does swap your magazines. Otherwise you would be correct. What probably happened is you fired a regular m4 with subsonic ammo, (some weapons w/o suppressors can fire both SD and non-SD magazines however their suppressed counterpart can only use SD),in which case the damage would remain the same. The script includes a demo mission with a range that has been calibrated to display the weapons damage on a person (i.e. damage dealt on the popup is converted using a multiplier I derived).

    As for the ACE version, im not exactly sure how handle weapon damage exactly. I believe its determined by the weapon and not mag type but I could be wrong. What I do know is that the mags do not have to be swapped when using ACE.

    If the AI respond differently to SD and non-SD weapons normally then they will also do so using this script since all conditions for its detection are met.

×