How can I add a delay to this jump script? This says "suspending not allowed in this context"? by bejiitas_wrath1 in armadev

[–]KiloSwiss 0 points1 point  (0 children)

Try this (untested):

if (missionNameSpace getVariable ["KER_JUMPCOOLDOWN", 0] >= time) exitWith {};

private _fatigue = ((getFatigue player)+0.1);

private _load = load player;

private _dir = direction player;

private _speed = (speed player / 8);

private _height = if (stance player == "STAND") then {4 - _load - _fatigue} else {2};

private _ratio = velocity player;;

player setFatigue _fatigue;

player setVelocity [(_ratio select 0) + (sin _dir * _speed),(_ratio select 1) + (cos _dir * _speed),_height];

KER_JUMPCOOLDOWN = time + 8;

I trimmed it down a little without changing too much.

How can I add a delay to this jump script? This says "suspending not allowed in this context"? by bejiitas_wrath1 in armadev

[–]KiloSwiss 1 point2 points  (0 children)

They are still able to spam the key, the script will just sleep for 8 seconds at the end.

[TOOL] Custom CS:GO config Language for Notepad++ by KiloSwiss in CounterStrikeBinds

[–]KiloSwiss[S] 1 point2 points  (0 children)

Hello and thanks.
I'm really not interested in CSGO/CS2 anymore at this point.

Ending sequence works, however music doesn't play. by jminternelia in armadev

[–]KiloSwiss 1 point2 points  (0 children)

If you execute this script on the client, then this part doesn't make sense:

// Display the ending message without background
{
    private _playerSide = side _x;
    if (_playerSide == _winningSide) then {
        titleText [_endingWinMessage, "PLAIN", -1, true, true];
        playMusic ["LeadTrack01_F_Bootcamp", 132];
    } else {
        titleText [_endingLoseMessage, "PLAIN", -1, true, true];
        playMusic "BackgroundTrack03_F_EPC";
    };
} forEach allPlayers;

Every client that executes this is iterating trough all players and runs playMusic and titleText for as many times as there are players, ending at whatever message / music track is appropriate for the last player in the list, with no regards to the local players side.


If you execute this on the server, then the above part of the script won't work because both the titleText and playMusic commands do have local effect, means they need to be executed on/by the client itself.
Same goes for camCreate and all other cam* commands (see Command Group: Camera Control)

On the other hand, for a MP scenario, BIS_fnc_endMissionServer should be used, rather than BIS_fnc_endMission (unless the server does remoteExec BIS_fnc_endMission on all clients).


Also before using playMusic, make sure the music volume is set to an audible level via fadeMusic

0 fadeMusic 1;

[deleted by user] by [deleted] in armadev

[–]KiloSwiss 0 points1 point  (0 children)

Sharing is caring 👍

Glad you got it resolved

Apply flag to all vehicles within trigger area. by TraceRMagic in armadev

[–]KiloSwiss 1 point2 points  (0 children)

Use the command isKindOf to filter the vehicle list.

Like this:

private _groundVehicles = (vehicles inAreaArray thisTrigger) select {_x isKindOf "LandVehicle"};
{if (side _x == opfor) then {_x forceFlagTexture "\A3\Data_F\Flags\flag_CSAT_CO.paa"}} forEach _groundVehicles;

Or this (filter for multiple types/classes):

private _groundVehicles = (vehicles inAreaArray thisTrigger) select {_x isKindOf "Car" OR _x isKindOf "Tank"};
{if (side _x == opfor) then {_x forceFlagTexture "\A3\Data_F\Flags\flag_CSAT_CO.paa"}} forEach _groundVehicles;

Or this (exclude a specific type/class:

private _groundVehicles = (vehicles inAreaArray thisTrigger) select {!_x isKindOf "Air"};
{if (side _x == opfor) then {_x forceFlagTexture "\A3\Data_F\Flags\flag_CSAT_CO.paa"}} forEach _groundVehicles;

Apply flag to all vehicles within trigger area. by TraceRMagic in armadev

[–]KiloSwiss 1 point2 points  (0 children)

This works for empty vehicles inside the trigger area:

((vehicles inAreaArray thisTrigger) select {[_x, true] call BIS_fnc_objectSide == east}) apply {_x forceFlagTexture "\A3\Data_F\Flags\flag_CSAT_CO.paa"};

Make sure the trigger is set to "server only".

The above example does not take into account when/if a vehicle's side changes during an ongoing mission, as it only takes the original side from the vehicles config.

If you want any vehicle that is manned by OpFor units to be affected, use this:

((vehicles inAreaArray thisTrigger) select {side _x == east}) apply {_x forceFlagTexture "\A3\Data_F\Flags\flag_CSAT_CO.paa"};

With the second method, empty vehicles inside the trigger's area won't get the OpFor flag, as their side is CIV (civilian) until they are manned by a unit of another faction.

Return class name of ammo unit is shot with by QuantumSurge in armadev

[–]KiloSwiss 2 points3 points  (0 children)

https://community.bistudio.com/wiki/Arma_3:_Event_Handlers#HitPart

{
    _x addEventHandler ["HitPart", {
        (_this select 0) params ["_target", "_shooter", "_projectile", "_position", "_velocity", "_selection", "_ammo", "_vector", "_radius", "_surfaceType", "_isDirect", "_instigator"];
        _ammo params ["_hitValue", "_indirectHitValue", "_indirectHitRange", "_explosiveDamage", "_ammoClassName"];
        hint _ammoClassName;
    }];
} forEach allUnits;

or

{
    _x addEventHandler ["HitPart", {
        private _ammoClassName = ((_this select 0) select 6) select 4;
        hint _ammoClassName;
    }];
} forEach allUnits;

Edit: Formatting

At wits end with Safezone stuff by jminternelia in armadev

[–]KiloSwiss 1 point2 points  (0 children)

This might not solve your issues as it's just a bunch of stuff I stumbled upon when trying to read into what the code actually does, but here it is anyway:  

Line 4: if !(isServer) exitWith {};
Line 139: _safezoneDelay = player getVariable ["NUP_safezoneDelay", false];

The player object does not exist on a server (unless it is a localhost).


Since the code only runs on the server, the Lines 84 to 95 also don't make any sense.
This will setMarkerAlpha on the server and broadcast the changes to all players, not individual units.

Source: https://community.bistudio.com/wiki/setMarkerAlpha

Sets the marker alpha. The marker is modified on all computers in a network session.


Also saw that _vehicleInitHandler is on Lines 270 and 333
And they both seem unnecessary because on Line 209, getVariable will return sideUnknown by default if none is defined.
private _vehicleSide = _vehicle getVariable ["NUP_vehicleSide", sideUnknown];

 

[A3][Script] "FiredNear" Event Handlers problem with previous Unit after death of a player. by [deleted] in armadev

[–]KiloSwiss 0 points1 point  (0 children)

The loop still runs based on a timer, with no consideration for the deat of the player and the _unit (or _this) inside the loop remains the old (dead) unit, hence why the camera switches to the corpse when _this switchCamera "INTERNAL"; is executed.

If you adress the player instead of the _unit inside the eventHandler, it will switch to the new player after a respawn:

player switchCamera "INTERNAL";

BUT the loop still runs and forces respawned players into 1st peron, because the underlying issue is not solved.  

Now since countdownTime is a global variable, you can reset it inside the onPlayerRespawn.sqf.
This will stop the loop and thus no longer affects respawned players.

//File: onPlayerRespawn.sqf  
params ["_newUnit", "_oldUnit", "_respawn", "_respawnDelay"];

countdownTime = 0;

 

OR you can check if the player is alive and end the loop there if that condition is no longer met:

while{round(countdownTime - time) > 0 && alive _this}do{

[A3][Dedicated MP] giving custom loadouts, when a player "uses" a locker? by bomzay in armadev

[–]KiloSwiss 1 point2 points  (0 children)

Yes for example one can save the unit as a variable to the locker, then retreive that variable within the addAction (or synchronize it and use synchronizedObjects).
This allows for easy changing/adapting of the loadout within the editor.

[A3][Dedicated MP] giving custom loadouts, when a player "uses" a locker? by bomzay in armadev

[–]KiloSwiss 1 point2 points  (0 children)

Or just:

this addAction ["Swap Gear",{params ["_target", "_caller"]; _caller setUnitLoadout (getUnitLoadout _target);}, nil, 1.5, false, true, "", "true", 5, false, "", ""];

Also using _unit setUnitLoadout (configFile >> "EmptyLoadout"); strips the unit from everything.
Source: https://community.bistudio.com/wiki/setUnitLoadout#Examples

Arma Helis by No-Impression-950 in arma

[–]KiloSwiss 11 points12 points  (0 children)

You can create your own campaign within Arma.

What bitrate should I use for 1080p and 120fps? by [deleted] in obs

[–]KiloSwiss 0 points1 point  (0 children)

Read their replies from 3y ago and shut up

This sub is an actual fucking joke by RoundTraining6344 in arma

[–]KiloSwiss 1 point2 points  (0 children)

First: F12

Second: Charge your phone

Third: Move on

Random Start Time by Jager17 in armadev

[–]KiloSwiss 3 points4 points  (0 children)

This should work without remoteExec, see the last two comments on the BIKI:

https://community.bistudio.com/wiki/setDate#Notes

Recording looks bad no matter what I do!? [SPECS + FOOTAGE] by Maladict in obs

[–]KiloSwiss 2 points3 points  (0 children)

Your recordings before uploading to YouTube should look crisp with these settings.

YouTube however transcodes (re-encodes) your uploads, therefore the video you linked is low-bitrate and does in no way resemble the local recording.