#arma3_scripting

1 messages ยท Page 209 of 1

thin fox
#

so it's just a storage problem

#

not a performance

oak loom
#

Storage for the mods yes not the server

#

Want them on the server desktop

#

Thx

errant iron
#

if the windows shortcut is getting too long, you might want to write it inside a .bat file instead, though this is a question better suited for #server_windows

(FYI putting mod folders on your desktop means you have to write the absolute path to each mod, which will make your command even longer than if they were inside your server install)

oak loom
#

Ok ill go that section and see how to make a bat file for them

tulip ridge
#

Hm, parseSimpleArray removes all the parts that can't be parsed if at least one element can, so it doesn't show like ['string1', 'str as an error in my gui

blissful current
#

What is the difference between game master and game moderator when choosing virtual entity at the lobby screen?

still forum
#

You can also use script error eventhandler to detect the error itself. But for that you probably need to wrap t he parsing in a isNil

hallow mortar
# blissful current What is the difference between game master and game moderator when choosing virt...

Depends entirely on how the mission has those entities set up.
The Game Master usually means Zeus, but there are a lot of different ways you can configure a Zeus entity, so there's not really any guarantee of it behaving in any specific way, beyond "has access to the Zeus interface in some way".
Game Moderator is not an engine concept so it could mean literally anything. It is completely at the discretion of the missionmaker as to what that slot does. It might mean a player who gets certain administrative powers to deal with players behaving badly, but that's just a guess.

blissful current
hallow mortar
#

The Zeus entity is just a fake body for the player to inhabit. What actually gives them powers is the Game Master module, with the Zeus entity set as its owner.

#

(You can actually also do this with script commands, the module just runs those commands on the owner object, but unless you want to create a Zeus on-the-fly, the module is easier)

blissful current
#

Ah okay so I should place a Game Master module and the Zeus entity. I think I tried this already by right clicking and syncing them. But I havent tried giving the entity a variable name and writing that in Gamer Master owner field.

hallow mortar
stable dune
blissful current
#

If players elect to not use a zeus, it apparently will be an AI. Will this cause issues?

#

Will isPlayer return true for Zeus virtual entity?

hallow mortar
hallow mortar
hallow mortar
blissful current
#

Oh boy, then I need to redo a lot of conditions...

thin fox
blissful current
#

I want so hoping that virtual would return false, even if a player was in that slot.

thin fox
#

only a player is going to use zeus, so why need to check that?

blissful current
#

Like I have a condition that returns true if all players are in a boat. If someone chooses the Zeus slot with a forced interface then they can never enter the boat.

#

So then I need to exclude Zeus in the condition for that somehow right?

thin fox
#

as I understand, it's forced for a reason

granite sky
#

Most use cases are pretty short arrays. It's just slow even on those. I think my conclusion was that the problem is with the comparison. 95% of the time you're just sorting number + stuff, but it goes back to some crazy gamedata decision tree every time it compares two values.

blissful current
#

If a virtual entity with forced interface is occupied by a player, then isPlayer will return true for them, correct?

granite sky
#

sorting array that's already in order is the same speed as one that's unsorted.

thin fox
#

to see what happens

blissful current
blissful current
willow hound
thin fox
blissful current
#

Virtual entity are players and the side returns logic, so I will do as Nikko suggested and make that check.

blissful current
thin fox
blissful current
thin fox
blissful current
#

I'm not sure how to explain this any other way, and sorry for the confusion. Basically I have some conditions in some triggers. Those conditions will no longer activate if a player chooses the Zeus slot. I want them to have the option, unless I have to rewrite 100 triggers. So now I must go see how much effort this will take and make a decision if I really want to add this Zeus slot.

thin fox
hallow mortar
#

They have a boat. They have a trigger that checks if all players are in this boat. Currently, that "all players" check would count virtual players who cannot get into the boat, so the trigger would never complete.

#

The solution is simply to exclude players on sideLogic from any checks of that sort.

blissful current
#

Correct.

thin fox
#

ah okay makes sense

eternal spruce
#

Thank you everything is working now, I have a question, how would I implement in your script to make Blufor units invulnerable to damage in the safe zone from enemy fire?

thin fox
eternal spruce
#

gonna give it a try

blissful current
hallow mortar
#

That's one way to approach it. There are others but that probably works.

blissful current
#

I'm open to cleaner/easier options.

#

Got some errors and refined it to:

isNil "skipToInfil" && 
(((allPlayers select { !(side _x isEqualTo sideLogic) }) - (crew ptboat)) isEqualTo [])
eternal spruce
#

Whats wrong with this:


private _handleDamageEH = _player addEventHandler ["HandleDamage", {
    params ["_unit","_selection","_damage","_source","_projectile","_index"];

    _damage = 0;
    false

}];

localNamespace setVariable ["PIG_safeZoneHandleDamage", _handleDamageEH];```
thin fox
#

or just do _player addEventHandler ["HandleDamage", {0}];

hallow mortar
#

Note that returning 0 will not only nullify incoming damage, but also heal any existing damage. The last value you return in a handleDamage EH should be the desired final total damage, not the damage to add.
That might be fine for your usecase, but just so you're aware.

thin fox
#

For that case I would just prefer to use allowDamage instead

eternal spruce
# thin fox For that case I would just prefer to use `allowDamage` instead

this is your original script along with the EH I'm trying to add but I still took damage,


private _action = _player addAction ["Zona Segura", 
    { 
        params["_player"]; 
        if ((!weaponLowered _player) || {((currentMuzzle _player) isNotEqualTo '')}) then { 
            cutText ["Zona Segura",'PLAIN',0.2]; 
        }; 
    }, 
    nil, 
    -99, 
    false, 
    true, 
    'defaultAction', 
    toString {focusOn isEqualTo _originalTarget}
]; 
 
localNamespace setVariable ["PIG_safeZoneWeaponAction", _action];

private _firedEH = _player addEventHandler ["Fired", {
    params ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile", "_gunner"];

    if (isClass(configFile >> "cfgMagazines" >> _magazine)) then {
        cutText ["Zona Segura",'PLAIN',0.2];
        deleteVehicle _projectile;
        [_unit, _magazine, 1] call CBA_fnc_addMagazine;
    }
}];

localNamespace setVariable ["PIG_firedSafeZoneHandle", _firedEH];

localNamespace setVariable ["PIG_firedSafeZoneHandle", _firedEH];

private _handleDamageEH = _player addEventHandler ["HandleDamage", {
    params ["_unit","_selection","_damage","_source","_projectile","_index"];

    _damage = 0;
    _damage

}];

localNamespace setVariable ["PIG_safeZoneHandleDamage", _handleDamageEH];```
quasi zenith
#

Anyone know if there is a way to either have a script or mod that will alter the color of the base game fog? I'd like to have it be a brown haze instead of blue. Sa'Hatra does it, as does WS with their fog module, but that's all I have been able to find.

thin fox
eternal spruce
#

so just replace the entire EH with _player allowDamage false;

blissful current
#

It's great news for me but just curious.

hallow mortar
#

๐Ÿคท

#

Keep in mind that the Zeus entity is not attached to the Zeus camera and will usually stay where it was originally placed

blissful current
eternal spruce
# thin fox yup

So I noticed that I take damage while in a vehicle but i dont while on foot, would _vehicle player allowDamage false; do the trick

thin fox
eternal spruce
thin fox
grim yoke
#

I know that I can use the eventHandler โ€œTaskSetAsCurrentโ€ to intercept when a task is set to ASSIGNED for the player, but is there also a way to intercept when a new task is generated or when a task is marked as completed?

bleak violet
#

Having a hard time with my helicopter scripts and maybe someone can help me out. For Dynamic Horror Ops, the helicopter in base has a system to get an INFIL location and then is activated to go to that location via an addAction. Everything works properly for those functions. The issue is that after heading back and landing at base (_wp2), the helicopter refuses to spool back up for any more waypoints unless they are manually created in zeus as LAND waypoints. This really ruins the scenario flow, as most players INFIL via this helicopter and then use that same helicopter to EXFIL via the transport support module.

I've tried applying various doStop's and resetting the helicopter's land command with another waypoint (_wp3), but literally nothing seems to work. This is extra frustrating because when I released this scenario a few years ago, everything functioned correctly. I'm not sure if an update has changed something (perhaps this is a multi-threading issue?), but I cannot get it to work correctly again. Please help lol

For context, you can check the GitHub repository for this scenario: github. com/UselessFodder/FS-DynamicHorrorOp/tree/v0.3

fn_selectHeliLZ.sqf:

//Credit goes to Erwin23p on BIS forums for the source of this code: https://forums.bohemia.net/forums/topic/237559-open-map-and-set-waypoint/?do=findComment&comment=3454296

//must be run only on MissionCommander client
openMap true; 
 
hint "Select helicopter landing zone on map."; 
 
onMapSingleClick 
{  //Inside here code to execute when clicked on the map 
    _heloWaypoint = createMarker ["LandingPosition", _pos]; 
    _heloWaypoint setMarkerText "Heli LZ";
    _heloWaypoint setMarkerShape "ICON"; 
    _heloWaypoint setMarkerType "hd_pickup"; 
    "LandingPosition" setMarkerPos _pos; 
    onMapSingleClick ""; 
    hint "New LZ selected!";
};

//FOR SAVE *** 
/*
this addAction ["Select LZ", "functions\Base\selectHeliLZ.sqf", nil, 1.5, true, true, "", "_this == MissionCommander", 10, false];
this addAction ["** Begin Insertion", "functions\Base\heliInsert.sqf", nil, 1.5, true, true, "", "_this == MissionCommander", 10, false];

*/```

fn_heliInsert.sqf:
```//send helicopter to insertion location defined by param marker name, then wait until players unload to take off and RTB
//***TODO un-hard define this marker
//params["_marker"];

private _marker = "LandingPosition";

//check to ensure marker is already set
if(getMarkerPos "LandingPosition" isEqualTo [0,0,0]) then {
    "You must select an LZ first!" remoteExec["hint",MissionCommander];

} else {
    //send to lz
    _wp1 = heliGroup addWaypoint [getMarkerPos _marker, -1];
    //set to transport unload and safe
    _wp1 setWaypointType "TR UNLOAD";
    _wp1 setWaypointBehaviour "CARELESS";
    //ensure heli waits until its unloaded with DEBUG***
    _wp1 setWaypointStatements ["count (crew transportHeli) < 3", "diag_log 'Players dropped off by heli'; MissionCommander synchronizeObjectsAdd [supportRequester];"];


    //create move waypoint back to base
    _wp2 = heliGroup addWaypoint [getMarkerPos "mainBase", -1];
    _wp2 setWaypointStatements ["true", "doStop transportHeli; transportHeli land 'LAND';"];

    
    //clear previous land command
    _wp3 = heliGroup addWaypoint [getMarkerPos "mainBase", -1];
    _wp3 setWaypointStatements ["true", "doStop transportHeli; transportHeli land 'NONE';"];
    _wp3 setWaypointTimeout [60, 60, 60];
};```
bleak violet
bleak violet
#

I don't know what's going wrong because there are no errors or anything. The pilot simply refuses to do anything other than another manually placed LAND waypoint in Zeus. Even more land or landAt commands are ignored

thin fox
#

it's little tricky to get it right

bleak violet
# thin fox Test the command isolated, then apply it later to your code

So, it's worth mentioning that I have no issue getting the helicopter to land where I want it. The issue is that after landing and cutting the engines, the helicopter crew refuses to take any other action. Even when running these commands in the console on a fresh scenario, this issue persists

#

However, If I take the crew out and put a new crew in, then I am able to force them to move successfully until another land or landAt is given, then they will also be stuck in the same way

#

Now that I've done some more testing in a fresh scenario, however, I think I'm seeing why the unit will not do any other action: after giving any sort of land or landAt command, the unit is forever returning unitReady = false

#

I'll figure it out. Thanks for the help anyways PiG

hushed turtle
#

Can be end screen text changed using SQF? Right now it's defined in Description.ext. I want to display number of remaining enemies when all players die and both chat and hints get hidden when end screen appears.

hushed turtle
#

Section(third page on end screen) can be added with global structured text variable. That will do

open mirage
#

Does anyone know if its possible to lock some doors of the USS Liberty? I want to lock players inside the ship, at the moment im using invisible walls to prevent players from opening the door, it works if ur looking at the door but if you turn to the side or turn ur back to the door its still possible to open them

blissful current
little raptor
#

use switchMove/playMoveNow instead
you can find all animations in animation viewer
or if you can get the player to perform the anim, use animationState and copy the anim name and use it with those commands

blissful current
pallid palm
#

what is the diff in / does anyone Know ?```sqf
switchMove / playMoveNow

pallid palm
#

ahhhh i see now woohoo It is a good practice to always use playMoveNow after switchMove to make sure the animation plays correctly when using the first syntax:

little raptor
#

but yeah Polpox's Artwork supporter is better than vanilla anim viewer

little raptor
blissful current
violet cove
#

ive been hitting my head against a wall trying to write a paradrop script thatll:

Teleport multiple specified vehicles to another specified vehicle
Detach said vehicles
Add a parachute to said vehicle

can someone help me out?
Also i barely understand coding

blissful current
#

I've noticed while messing around in zeus, that some vehicles have parachutes already applied somehow. I know this because if you move them from the ground to up high they auto deploy. Might be worth testing in your use case.

violet cove
#

i dont think that works in the eden editor

fair drum
violet cove
#

help me get there

#

id rather learn that and then expand that knowledge further

#

i know that you should specify given units you want to tp and that the tp funciton itself is (unit) attachTo(x) and detach(unit)

#

its worded awfully but

#

basically i know how to paradroop regular infantry regardless of loadout

fair drum
#

Teleport multiple specified vehicles to another specified vehicle

  • Know what an array is. You'll need an array of vehicles
  • Iterate over that array with forEach or apply
  • Get the position of the target vehicle with getPosATL or getPosASL (do you want height above ground, or height above water?)
  • Set the position of the teleporting vehicles with the corrisponding setPosATL or setPosASL
  • This position probably should be a couple of meters below the target vehicle due collision (you can do this with vectorAdd)

Detach said vehicles

  • Not needed

Add a parachute to said vehicle

  • Create a vehicle based parachute which is B_Barachute_02_F using createVehicle
  • Set that parachute position to the same position as the moving vehicles target location
  • Attach the parachute to vehicle using the correct attachment point

Additional:

  • Use a waitUntil and check the z index of getPosATL and see if the vehicle is nearing the ground
  • Detatch parachute from vehicle
pallid palm
#

@little raptor do you mean this one ```sqf
[_player, "AmovPsitMstpSlowWrflDnon"] remoteExec ["switchMove"];

violet cove
#

thanks, ill note it down and mess around in the editor

fair drum
violet cove
#

double thanks

fair drum
little raptor
# blissful current What is `playAction` used for? Seems similar to `playMove`.

playAction plays actions, which are context defined animations. for example, you can have an action called MoveF which plays a move forward anim based on your stance, weapon, and weapon mode
playMove plays anim states. these are pure animations (e.g player playMove "AmovPercMrunSrasWrflDf" plays "move, standing, running, weapon rifle, raised, forward" anim)

#

not every anim is mapped to an action. so playMove is more versatile but you need exact animation names

eternal spruce
#

@thin fox I got this script to work and I want to thank you for your help

    while{true} do { 
        { 
            if(side _x == WEST && _x distance (getMarkerPos "safeZoneMarker") < 20000) then {_x allowDamage false} else {_x allowDamage true}; 
        } forEach allUnits + vehicles; 
        sleep 1; 
    }; 
};```
little raptor
#

that's a remoteExec for the first syntax

#

I mean the alt syntax which is like player switchMove [""]

pallid palm
#

ahhh ok m8 thx

#

good thing i w8ed for your reply i would off had the all messed up ๐Ÿ™‚

blissful current
thin fox
violet cove
#

@fair drum ive tried to write my own, now eden says that im missing a ; somewhere

[] spawn { _vehicle = [vic1, vic2]; setpos [heli1, [0, 0, -5]]; sleep 1; _chute = createVehicle ["B_Barachute_02_F", position _vehicle]; _vehicle attachTo [_chute, [0, 0, 0]]; waitUntil(getPosATL _vehicle) <2; detach _vehicle; deleteVehicle _chute; }forEach _vehicle;

ornate whale
violet cove
#

it definitely is a skill issue on my end

blissful current
thin fox
violet cove
#

its weird because as any self respecting developer i then ripped someones code took inspiration from another dev

thin fox
#

We all still do this even guys with experience

ornate whale
violet cove
#

said guys code also isnt workingn

thin fox
#

now get to work

#

in that code in particular, just the setPos and waitUntil were wrong

#

ah, no

#

the spawn code

#

you've putted a forEach in the last line, why?

violet cove
#

because i want to drop multiple vehicles

thin fox
#

ok, but that's not how it works

#

try to make a working code with just one vehicle

#

get rid of that forEach, also read the biki for this command, it's used basically to iterate arrays

#

and fix the rest of the syntax and it should work for one veh

violet cove
#

now i just need to format vectoradd right

thin fox
#

as you're using getPosATL

violet cove
thin fox
#

also for a good practice, make sure to isolate commands with ( ), like (getPosASL heli1) vectorAdd [0, 0, -5]

violet cove
#

ah

#

i think i see

violet cove
#

i need get the coord array of the helicopter

but i eventually want to make the vehicle teleport 5 meters under the transport, wherever said transport might be

#

thats why i wanted to use the get and setpos

thin fox
#

and did you manage to get it working?

violet cove
#

ive managed to make the syntax clean enough to spawn in

#

not clean enough to actually teleport vehicle to the helicopter

thin fox
#

send your code

#

!code

wicked roostBOT
#

Please use !sqf from now on (!enforcescript soonโ„ข)

thin fox
#

!sqf

wicked roostBOT
#
How to use SQF syntax highlighting in Discord

```sqf
// your code here
hint "good!";
```
โ†“ turns into โ†“

// your code here
hint "good!";
violet cove
#

[] spawn {
_vehicle = [vic1];
_vehicle setVehiclePosition [heli1] vectorAdd [0, 0, -5];
sleep 1;
_chute = createVehicle ["B_Barachute_02_F", position _vehicle];
_vehicle attachTo [_chute, [0, 0, 0]];
waitUntil {
(getPosATL _vehicle) <2
};
detach _vehicle;
deleteVehicle _chute;
};

#

what i need now is the setvehicleposition

#

i dont care anymore if im gonna cheat that

thin fox
#

also, remove [ ] on vic1

#

_vehicle = vic1;

violet cove
#

i chose setvehicleposition as it allows me to place an object in relation to another

violet cove
# thin fox `_vehicle = vic1;`

thats where the ripping someone elses code comes in, i eventually want to expand that for multiple vehicles and thats what i ripped from said guy found out by myself

thin fox
thin fox
#

those commands requires object

#

that's why you should remove [ ], at least for now

fair drum
#
private _vehicles = [veh1, veh2, veh3];
{
    private _currVehicle = _x;
    // Do something with _currVehicle
} forEach _vehicles;
violet cove
#

right

#

vectoradd's sytax is (array) vectorAdd (array)

thin fox
# violet cove right

if you manage to make the code working for one object, then you just do what Hypoxic sent

violet cove
#

saved that

thin fox
violet cove
#

i see

#

im experiencing an error in setvehicleposition

fair drum
#
private _originalPos = getPosATL _target;
private _newPos = _originalPos vectorAdd [0,0,-5]; // decrease position by 5 meters
_curretVehicle setPosATL _newPos;

or

getPosATL _target params ["_xx", "_yy", "_zz"];
_zz = _zz - 5;
_currentVehicle setPosATL [_xx, _yy, _zz];

lots of ways you can do it

violet cove
#

i see

fair drum
# violet cove [] spawn { _vehicle = [vic1]; _vehicle setVehiclePosition [heli1] vectorAdd [0, ...

You're close

if (!isServer) exitWith {};
[] spawn {
    private _vehicles = [veh1, veh2, veh3];
    private _targetVeh = heli1;

    {
        private _vehicle = _x;
        private _pos = (getPosATL _targetVeh) vectorAdd [0, 0, -5];
        
        // Make the chute at map origin, then move it (better for this)
        private _chute = createVehicle ["B_Parachute_02_F", [0,0,0]];
        _chute setPosATL _pos;

        // Move vehicle to that position
        _vehicle setPosATL _pos;
        _vehicle attachTo [_chute, [0,0,0]];

        // Create a new scheduled thread that waits for this specific vehicle
        // This is a new scope, so we have to pass our variables to it
        [_vehicle, _chute] spawn {
            params ["_vehicle", "_chute"];
            private _currPos = getPosATL _vehicle;
            waitUntil { _currPos # 2 <= 2 };  // if this is over water, it won't work how you want. This is a more advanced topic so don't do it yet
            detach _vehicle;
            deleteVehicle _chute;
        };

        sleep 1; // whatever sleep before working on next vehicle
    } forEach _vehicles // Do it for all vehicles in _vehicles
};
violet cove
#

ripped your first one

violet cove
thin fox
#

๐Ÿ‘

violet cove
#

you both are arma wizards

violet cove
fair drum
#

unless you absolutely know what you are doing, stay away from the generic position commands. stick with the explicit ones:

setPosATL
setPosASL
getPosATL
getPosASL

// and converters
ASLtoAGL
AGLtoASL
ATLtoASL
ASLtoATL
ASLtoAGL
fair drum
#

some commands like createVehicle take ATL some take ASL some take AGL so pay attention on the wiki. That's why I prefer origin creation, then move it when you are first learning.

violet cove
#

well

thanks anyhow

pallid palm
#

i'm experiencing happyness: cuz every thing is working prefect WooHoo: thx All you great Guys WooHoo Arma 3: ๐Ÿ™‚

pallid palm
#

i just can't thank you guys enough ๐Ÿ™‚

little raptor
#

as for looping, you should use animStateChanged event handler and switch back again

#

btw the new switchMove syntax allows you to switch smoothly instead of an instant jump

blissful current
granite sky
#

Apparently with Arma networking, it is possible for the server to see the created position of this object during the remoteExec, if this is run in unscheduled on a client:

_veh = createVehicle ["someStaticType", [0,0,0]];
_veh setPosATL getPosATL player;
[_veh] remoteExecCall ["someServerFunction", 2];
#

Not consistent though. Could only replicate on a loaded server.

finite bone
#

What is the alternative of scriptDone for remoteExec functions? I have a remoteExec function being run on the server and I want my current code to wait until the function is complete and returns an array/object to the variable

private _playerObject = [_machineID] remoteExec ["Root_fnc_getPlayerFromId", 2];
// wait until _playerObject is initialized
sharp grotto
#

Don' think there is one, you need to "ping pong" call it.

hallow mortar
#

There isn't a direct mechanism for that. Remember that in theory, a remoteExec could be sent to a machine that isn't even in the game yet.
What you can do is having the receiving machine send another remoteExec back that triggers the next phase, or does a setVariable that completes a waitUntil. remoteExecutedOwner is available to help with this.

old owl
#

Ideally something like

[1, "cheeseburger"] remoteExec ["TAG_fnc_sandwhichShop", 2];

private _timeout = serverTime + 5;
waitUntil {
  uiSleep 0.01;
  (!isNil "sandwhichShopData" || serverTime > _timeout)
};

if (isNil "sandwhichShopData") exitWith {
  hint "The server did not respond with the sandwhich shop menu.";
};

-# Now I am hungry meowsweats

atomic niche
winter rose
#

also, sandwich

errant jasper
#

A fresh variant each time; never know what you're going to get ๐Ÿ˜…

exotic gyro
#

You could also do a cba server event that makes the server sent a target event to open the menu

#

Which means the menu won't open until the data is there

#

(and no need to schedule anything or wuae)

blissful current
#

How would I go about achieving this; have an AI unit exit a vehicle, walk to another close by vehicle, and enter that vehicle.

I'd like to try to keep default animations instead of just teleporting the unit.

#

I can't use editor waypoints because the player controls the AI up until this event.

tulip ridge
#

Could probably just assign them to the vehicle and give them a getIn order

brittle thunder
#

Hello there. Guys, how do I add an action to the players context menu? I have sqf function, that i need to call that needs to be called when this action is activated

tough trout
#

How do I have a script identify a private variable as "whatever vehicle activated the trigger that activates this script"

winter rose
#

you don't, but you can obtain the list of currently "valid" entities in the trigger โ€“ using thisList or list _trigger

tough trout
#

K, I may need to get more help with this than I thought. I'm trying to do a cinematic MASH script.

blissful current
#

Anyone know how to use this animation tester in the editor?

#

I get an error when trying the player like this.

warm hedge
#

If you mean Animation Player not animation tester, it is a part of POLPOX's Artwork Supporter. Read the guide of it

winter rose
#

hah, what do you know about it

blissful current
#

I can put these dudes in the chairs to a convincing effect within the editor, but as soon as I start the mission, they move away from where I put them and as a result, look out of place. Is there a way to keep them in the stop I chose in the editor?

hallow mortar
#

They're being pushed out by collision with the chair. Attach them to an object (ideally the chair, but some other dummy will do)

split ruin
#

This works perfectly for land vehicles, not allowing someone who doesn't have the needed gear to be driver, gunner or commander. The problem are jets and helis ... its not working for them ... is the pilot a driver technically?

_veh addEventHandler
[
  "GetIn",
  {
    params ["_vehicle", "_role", "_unit", "_turret"];
    if (_unit == driver _vehicle || _unit == gunner _vehicle || _unit == commander _vehicle) then 
    { 
      if ( headgear _unit != "H_PilotHelmetFighter_B" ) exitwith
      { _unit action ["Eject", vehicle _unit];
        systemChat "You are not Pilot!";
    };
     } else {};
}];
sweet vine
#

UI for this timer: [60] call BIS_fnc_countDown; is only visible after switching to/from Zeus, can't find the UI control either, how could it be enabled for all clients possibly?

#

Seems like some other function just picks up the global var to display the UI, a pointer at what that might be would also be handy, thanks.

blissful current
hallow mortar
blissful current
hallow mortar
#

First of all, a Location is not a 3D position, it is a Location.
Secondly, do you really want to attach a 3D position to an object? Or is it maybe that you want to do it the other way around?

blissful current
#

Ah I see, it's the reverse of what I was thinking. I thought my 3d position would work cause the wiki for location says they have a name, a side, a 3D position, a 2D area, and an orientation.

hallow mortar
#

Yes, a Location has all of those things, but that doesn't mean you can just provide a position and try to convince the game it's actually a Location

thin fox
blissful current
#

Oh I see. A location has a 3D position, but that doesn't necessarily mean a 3D position is a location.

hallow mortar
#

...Did you just read that one line that says have a name, a side, a 3D position, a 2D area, and an orientation and skip all the rest of the page describing what a Location is?

split ruin
#

@thin fox no mods in the scenario, even CBA ... ๐Ÿ˜”

#

and I want the gear, not the classname of the unit

blissful current
thin fox
#

it's the same event handler

#

I just used the CBA function to add the same EH in all Air units

sharp grotto
#

I made that some years ago, for players to be able to sit, didn't use attachTo, maybe didnt have that problem because i used different chairs ๐Ÿคทโ€โ™‚๏ธ

private _chair = _this;    
private _unit = player;
if((_chair distance _unit) > 2) exitwith {["ErrorTitleAndText", ["You are too far away!", ""]] call ExileClient_gui_toaster_addTemplateToast;};
if(ExileClientIsSitting) exitwith {["ErrorTitleAndText", ["You are already sitting!", ""]] call ExileClient_gui_toaster_addTemplateToast;};
private _occupied =  (count (_chair nearEntities [["Exile_Unit_Player"], 1.2]) > 1);
if (typeof _chair == "Land_RattanChair_01_F") then {_chairPos  = _chair modelToWorldWorld [0,-0.15,-1]};  
if (typeof _chair == "Land_CampingChair_V1_F") then { _chairPos = _chair modelToWorldWorld [0,-0.10,-1]};    
if (typeof _chair == "Land_CampingChair_V2_F") then { _chairPos = _chair modelToWorldWorld [0,-0.15,-0.5]}; 
if (typeof _chair == "Land_OfficeChair_01_F") then { _chairPos = _chair modelToWorldWorld [0,-0.05,-0.7]};
if!(_occupied) then
{  
    private _Moves = [["RW_Sitting","RW_Sitting02","RW_Sitting03","RW_Sitting04","RW_Sitting05","RW_Sitting06"],30] call KK_fnc_arrayShufflePlus;
    private _Move = selectRandom _Moves;
    _unit setPosWorld _chairPos; 
    _unit setDir ((getDir _chair) + 180);
    _unit switchMove _Move;
    _unit addAction ["<img image='RW_assets\hud\chair_hud_icon.paa' size='1' shadow='false' /> [Stand up]", {call ExileClient_util_ChairStandUp;}];
    ExileClientIsSitting = true;
    [60, ExileClient_system_SitAnimation_thread, [], true] call ExileClient_system_thread_addtask;
}  
else  
{  
    ["ErrorTitleAndText", ["This chair is occupied!", ""]] call ExileClient_gui_toaster_addTemplateToast;  
};
round hazel
#

Hey folks, anyone know what a GIAS pre stack size violation is when using unit capture?

split ruin
#

@thin fox thank you so much ! it was

moveout _unit;
//instead of 
_unit action ["Eject", vehicle _unit];

that made it, probably because eject system of the jet itself

thin fox
granite sky
round hazel
#

Think something was up with me running the UnitCapture from an objects init; Sticking it in a radio trigger fixed it

blissful current
#

How many triggers can you put in a mission until it negatively affects performance? I have roughly 95 and I ran a test with and without them and seemed to get the same FPS.

versed trail
#

Nothing about a trigger's existence itself negatively affects performance, it's related to the conditions you're running, how slow it is, and how often you're running the check

blissful current
#

The conditions themselves seem fairly benign but I'm not sure. Most of them are missionNameSpace getVariable with the default editor-placed trigger evaluation of .5 seconds

blissful current
#

For some reason, I have to spam setCurrentWaypoint like this or else the group will skip to waypont index 3.

extractHeliGroup addWaypoint [[7050.49,4301.54,0], -1, 1];
extractHeliGroup addWaypoint [[7103.78,4238.36,0], -1, 2];
extractHeliGroup addWaypoint [[7075.68,4182.71,0], -1, 3]; //group skips to this
extractHeliGroup setCurrentWaypoint [extractHeliGroup, 1];
sleep 3;
extractHeliGroup setCurrentWaypoint [extractHeliGroup, 1];
sleep 3;
extractHeliGroup setCurrentWaypoint [extractHeliGroup, 1];
sleep 3;
extractHeliGroup setCurrentWaypoint [extractHeliGroup, 1];
sleep 3;
extractHeliGroup setCurrentWaypoint [extractHeliGroup, 1];
sleep 3;
extractHeliGroup setCurrentWaypoint [extractHeliGroup, 1];
sleep 3;
extractHeliGroup setCurrentWaypoint [extractHeliGroup, 1];
sleep 3;
extractHeliGroup setCurrentWaypoint [extractHeliGroup, 1];
sleep 3;
extractHeliGroup setCurrentWaypoint [extractHeliGroup, 1];
sleep 3;
extractHeliGroup setCurrentWaypoint [extractHeliGroup, 1];
thin fox
blissful current
#

This is after the group exits the heli and is walking around base.

fair furnace
#

does ANYONE know what the attribute for DISABLING AI IN LOBBY is called?

I cannot find it in the wiki ANYWHERE :(

blissful current
#

There is a command (forgot what it's called) that will return their current waypoint. So I checked it periodically and it kept switching from 1 to 3. So if I brute force it like this it works and they hit 1, 2, and 3. But it's odd because setCurrentWaypoint seems straightforward on the wiki.

thin fox
fair furnace
thin fox
fair drum
granite sky
#

entities "CAManBase" select {!alive _x}; is faster than allDeadMen. Not sure whether to praise simpleVM or damn the command.

latent ridge
#

So I'm kinda new to this scripting stuff and wanted to get "away" from chatgpt... cause ew and want to actually learn. Anyway I'm trying to make a "loop" damage to any engines within a 200 meter radius of _fgt, trying to make a emp type thing. The script has no problem firing the "while {alive _fgt} do {" and the part where it talks about finding all the vehicles within a radius... its the part after that.
but the problem is that the script afterward in the later doesn't fire.

All the "private variable" stuff

private _radius = 200; // Effect radius in meters private _damagePerSec = 0.05; // 5% engine damage per second private _fgt = fgt; //Ref Tower private _twinPos = getPosASL _fgt; // Towers Pos

`while {alive _fgt} do {

// Finds all vehicles within a radius
private _veh = getPos _fgt nearEntities [["Car", "Motorcycle", "Tank", "Helicopter", "Jets"], 200];
hint format ["There are %1 around", count _veh];
{
    private _veh = _x;
        private _engineHP = _veh getHitPointDamage ["hitengine"];
        hint "howdy do";
    if (_engineHP < 1) then {
        _veh setHitPointDamage[hitengine, _engineHP + _damagePerSec];
        hint "Engine Damaged";
    };
};
sleep 1  // waits 30โ€“50 seconds before next play

};`

granite sky
#

nearEntities returns an array of vehicles, which you then want to loop over with forEach (or apply).

#

like this:

private _vehArray = getPosATL _fgt nearEntities [["Car", "Motorcycle", "Tank", "Helicopter", "Jets"], 200];

{
  private _veh = _x;
  // your other stuff here
} forEach _vehArray;
#

I think your set & get hitpointdamage calls are also wrong.

latent ridge
#

gotcha; also how do you do that block code? cause that looks so much better lol

latent ridge
granite sky
#

Yeah I don't know how to write that in discord without mangling it.

#

triple backticks at the start and end of the block. If you add sqf immediately after the first set it highlights as SQF.

#

You missed the quotes on "hitengine" for setHitpointDamage. While getHitPointDamage shouldn't have array brackets around "hitengine".

latent ridge
#

yeah I did figure that part out, I havent fixed that yet. ok so its like this?

private _veh = _x;
    private _engineHP = _veh getHitPointDamage ["hitengine"];
    hint "howdy do";
if (_engineHP < 1) then {
   _veh setHitPointDamage[hitengine, _engineHP + _damagePerSec];
   hint "Engine Damaged";
} forEach _vehArray;```
shut carbon
#

!code

wicked roostBOT
#

Please use !sqf from now on (!enforcescript soonโ„ข)

shut carbon
#

!sqf

wicked roostBOT
#
How to use SQF syntax highlighting in Discord

```sqf
// your code here
hint "good!";
```
โ†“ turns into โ†“

// your code here
hint "good!";
latent ridge
#

awesome thank you

shut carbon
#

!enforcescript soonโ„ข, lol. Nice

granite sky
#
private _vehArray = getPosATL _fgt nearEntities [["Car", "Motorcycle", "Tank", "Helicopter", "Jets"], 200];

{
  private _veh = _x;
  private _engineHP = _veh getHitPointDamage "hitengine";
  hint "howdy do";
  if (_engineHP < 1) then {
    _veh setHitPointDamage ["hitengine", _engineHP + _damagePerSec];
    hint "Engine Damaged";
  };
} forEach _vehArray;
#

I think that's correct.

#

Oh, "Jets" sounds wrong. "Plane" maybe

#

Not sure about "Motorcycle" either.

shut carbon
#

"Motorcycle" is correct

latent ridge
#

yeah I was looking for the technical names of it, but I thought thats what they would've been so I took the wild guess lol

shut carbon
#

"Air" is on wiki

granite sky
#

They're CfgVehicles entries anyway. You can check inheritance of various vehicles in config.

latent ridge
#

alright; I'm gonna try this out real quick and I'll be right back.

latent ridge
granite sky
#

If those classnames are wrong then it won't complain. It just won't find everything.

latent ridge
#

It works! thats so freaking awesome thank you!

#

additionally; would this script work neccessarily in Multiplayer or is there something else I need to look into? (I'm fine doing a lot of research on it) as this is for a op im hosting lol

errant jasper
#

How often does it run?

#

For MP, I would wrap the entire code in a function. You can take "_fgt" and 200 as parameter if you want. To be 100% sure I would wrap the body after _veh = x in if if (local _veh) then { DAMAGE HERE.. }. Then if the time runs is say larger than 10s I would remoteExec it from the server, otherwise if the time is lower I would let all machines have their loop that triggers it repeatedly.

latent ridge
#

for damage (as of rn) its every second; but may raise it to 5 seconds. I have no idea how to "wrap" stuff in a function thats something new to me lol

granite sky
#

Damage on global objects is global, so the easiest option is to just run the code on the server.

errant jasper
#

setHitPointDamage explicitly list the argument is local though.

granite sky
#

oh, it does? Curious.

latent ridge
#

I just loaded a server, all the vehicles within the 200 radius is being damaged so Idk?

granite sky
#

Well, they're probably all server-local if you just started it.

errant jasper
#

So at this point the easiest thing would just be to launch this from init.sqf, and only let the machine who the vehicle is local to actuall update the damage. This would work even for JIP players who then get into a vehicle in the zone if they managed to do so before the engine was dead, or after repairs.

granite sky
#

Get into one and see if it's still taking damage.

latent ridge
#

yeah nah it still takes damage, vehicle smokin and all that

errant jasper
#

On a dedicated server? In the "driver seat". If so, well that simplifies it. Guess the biki would need updating.

granite sky
#

Oh yeah, it'll only switch locality if you use the driver seat.

latent ridge
#

I dont own a dedicated; its all on my computer which I host the op on

granite sky
#

ah, in that case you're local anyway.

thin fox
#

Lou summoned

latent ridge
#

well the vehicles which has no body in it also take damage

#

(which is what I want anyway lol)

granite sky
#

localhost without clients is a lot like solo.

latent ridge
#

I can see if I can drag a buddy on and make him a puppet real quick XD

errant jasper
#

Getting it to work on vehicles without players or but with AI inside (or not) is easy. The problem is getting it to work with human players in the driver seatss.

winter rose
errant jasper
#

Reverse Ninja?

winter rose
#

Iโ€ฆ wasn't listening well in school
wazzup?

errant jasper
winter rose
#

so am I, perfect casting!

thin fox
#

it's not me, everytime someone says biki here, Lou gets summoned

errant jasper
#

Wait for real?

thin fox
latent ridge
errant jasper
#

Well depending on how you run it, it will work for others too. If you just launch the script from init.sqf it will work for all too.

#

If you launch it inside like if (isServer) then { DO_THE_THING; } my odds are 98 to 2 it won't work during the duration a non-hosting-player is inside the (driver position of) vehicle.

winter rose
#

*grapples away*

latent ridge
#

gotcha; well I'll try that if thats the case; I dont wanna go changing stuff it aint broke y'know? if it aint broke dont fix it lol

errant jasper
#

I bet Lou is sitting on rooftops waiting until the moment Gotham discord channel needs him.

winter rose
#

this, but for lame jokes here and there

latent ridge
#

Will ask this though; when it comes to
[] execVM "insert.sqf" I remember hearing something about a "server" version of this script that makes it play on all players... is that something I need to get worked out and find?

errant jasper
#
  • The basics of locality here is that every vehicle belongs to a machine. Like a dedicated server or your player machine.
  • Commands like setHitPointGlobal have local argument requires that it is run on the machine that the vehicle belongs to (is local) to.
  • The other side of this is that running the command on a vehicle that is not local will likely not have any effect.
  • So in this case, by running the code on all machines (say started from init.sqf), every machine will go through every applicable vehicle. But only one of the machines "owns" the vehicle, so only one machines "request to damage the vehicle" will work.
  • For vehicle they are owned by the server if the driver seat is empty, or by the machine (player) in the driver's seat.
  • Some scripting can become way more complicated than this locality-wise. It depends a lot on the commands. Other commands have global argument which means if many machines ran the same code the effect would happen multiple times. In your case that would have been the vehicles becoming damaged faster if more players were on the server! Fortunately that is not an issue here.
latent ridge
#

but if its started from the init.sqf, the code would already be running which it shouldn't be running at all until the players destroy the objective they are tasked of destroying

#

because the _fgt is not seen or anything the said obj is destroyed

blissful current
# thin fox is this for loitering around the base?

It's just 3 waypoints for a group of 4 soldiers. All I need them to do is walk down the road. But instead of hitting wp1, then wp2, they skip to wp3. Unless I spam the code the way I do.

I'm about to boot up and play around with it some more. Maybe try some new commands.

errant jasper
latent ridge
#

-# if I understood correctly lol

errant jasper
blissful current
#

No, just with addWaypoint and setCurrentWaypoint. I also have an idea to try a scripted waypoint. Instead of giving the group all three waypoints at once, I can run code when then get to the first one, to give them the second one, etc.

thin fox
#

once the conditions meets, delete this waypoint (required) and continue with the rest

blissful current
#

Oh, I see. I will put that on the list as well, thanks!

errant jasper
#

You don't have to pass args, if you hardcode them in your scripts.

#

So I guess it would look like this as your trigger on act:

if (isServer) then {
   [[], "myEmpScript.sqf"] remoteExec ["execVM", 0, "EMP_SCRIPT_TAG"];
}

If arguments like tgt are hardcoded in your script.

blissful current
thin fox
#

but at the same time I've always added that command just to make sure

blissful current
granite sky
#

This is foot troops this time?

#

How far apart are the waypoints?

blissful current
#

Yes foot troops, they are placed roughly 40 meters apart. I specified in the command exact waypoint placement like so:

extractHeliGroup addWaypoint [[7050.49,4301.54,0], -1, 1, "FirstRoad"];
[extractHeliGroup, 1] setWaypointType "LOITER";

extractHeliGroup addWaypoint [[7103.78,4238.36,0], -1, 2, "MiddleRoad"];
[extractHeliGroup, 2] setWaypointType "MOVE";

extractHeliGroup addWaypoint [[7075.68,4182.71,0], -1, 3, "LastRoad"];
[extractHeliGroup, 3] setWaypointType "MOVE";
#

I don't need the loiter. Just trying to mess around and see if I can get them to move to wp1 without spamming setCurrentWaypoint [extractHeliGroup, 1]

#

I was also hoping that by naming the waypoints the name would be returned with the waypoints command to make it easier to tell which is which. Keeping track of the index numbers and where they are in the world is confusing to me.

granite sky
#

hmm, can't replicate. They get three waypoints here.

latent ridge
blissful current
# granite sky hmm, can't replicate. They get three waypoints here.

Yeah, I just created a new group and used the same code and it worked fine... Something about my heli crew or the position of the heli next to the road maybe?

In the same code block I use this. That and the position of the heli on the ground are the only differences I can think of.

extractHeliGroup leaveVehicle extractHeli;
extractHeliGroup setBehaviourStrong "CARELESS";
extractHeliGroup setSpeedMode "LIMITED";
```,
granite sky
#

Did you give them the waypoints when they were in the heli or not?

blissful current
granite sky
#

As pilot/crew or as cargo?

latent ridge
blissful current
#

So maybe I need a check to waitUntil they are outside then run the code.

#

But I did omit the leaveVehicle stuff for this test.

thin fox
#

just add the loiter waypoint in a "center" pos

#

and when a certain condition meets

#

delete that waypoint

#

and proceed with your stuff

granite sky
#

According to the loiter documentation that doesn't work anyway:

If the group is on foot or inside a ground vehicle, then group will just stand around and the LOITER waypoint will act as a MOVE waypoint.

blissful current
thin fox
#

I thought it was an air unit

blissful current
thin fox
#

just forget what I've said

granite sky
#

So did Arma apparently :P

blissful current
#

Hey I said foot soldiers a bunch! ๐Ÿ˜›

thin fox
#

poor reading of my part

blissful current
#

But John is on to something with them being out of the heli. Gonna try something now.

granite sky
#

I'm guessing what's happening is that it's using the heli completion radius until the pilot exits the vehicle. Which is a bit odd if they're immediately unassigned, but whatever.

#

IME it won't complete multiple waypoints at once. It completes one, and then waits until the next periodic waypoint update.

latent ridge
granite sky
#

remoteExec is pretty complex. You can register remoteExecs to run on clients that join in progress (JIP), and that needs to be registered with a unique tag.

#

Easier but slightly slower way to do what you're trying to do is run the code on init, but have it check whether your condition has been fulfilled.

granite sky
#

what script :/

blissful current
#

Thanks for the help everyone.

granite sky
#

In that example there's a separate script file (myEmpEngineDamager.sqf) that's being executed.

#

So there wouldn't be any code in init.

#

execVM is a command to execute an external script file, while the remoteExec is doing this on every machine (including the JIP clients).

latent ridge
#

I kinda know what the first part does roughly the
ok, so in my trigger I'd do this (this is the full execution script that would be in the trigger)

if (isServer) then {
   [[], "FGTEMP.sqf"] remoteExec ["execVM", 0, "EMP_SCRIPT_TAG"];
}

But the part the confuses me a bit is the

   [[], "FGTEMP.sqf"] remoteExec ["execVM", 0, "EMP_SCRIPT_TAG"];

Specifically the whole "Tag" part im not understand what that does exactly

errant jasper
#

You don't need it, if the emp effect never need to stop again. You can use true instead.

#

The label is useful to remove the command from the JIP queue which is run for all joining players.

latent ridge
#

ok, so it would simply just be this then? because the script itself (FGTEMP.sqf) is in a constant loop.

if (isServer) then {
   [[], "FGTEMP.sqf"] remoteExec ["execVM", 0,];
}
errant jasper
#

, true]; at the end

latent ridge
#

heard, thank you

blissful current
# granite sky I'm guessing what's happening is that it's using the heli completion radius unti...

So that script I got working in SP doesn't work when I test it from local host + client. I see on the wiki that setCurrentWaypoint is LA. When I test group with local command from local host it returns true.

The code itself runs in the Activation field of a Server Only trigger.

I'm guessing this will work if I remoteExec``setCurrentWaypoint? But I dont get why. The code runs inside a server only trigger. I tested the object is owned by the server. So I'm confused.

#

Well maybe I should test this first before I make that assumption.

granite sky
#

I tested the object is owned by the server.
What object? I thought this was an infantry group.

blissful current
#

Sorry, yes, it is a group. The wiki says I can do local group as a test. Which I did from the local host since it has ADT mod. It returned true.

fair drum
#

when working with waypoints, I personally delete every waypoint possible first (also you have to delete them in reverse order)

blissful current
#

Cool, I'll try that after messing with remoteExec, then.

granite sky
#

What does "doesn't work" mean here anyway?

blissful current
#

The helicrew exited the heli but did not proceed to their next waypoints. They just stood around doing nothing. When I checked their waypoints they didn't have the ones in queue that should have been added.

But I tested it a second time and it worked, meaning they received their additional waypoints and off they went.

#

So ๐Ÿคทโ€โ™‚๏ธ . Ima test it again, maybe it was a one time thing.

#

Ugh, its cause I had this. I was watching them in zeus from inside the helicopter. ๐Ÿคฆ

waitUntil {(crew extractHeli) isEqualTo []};
#

They don't get the waypoints until after it resolves. I might want to change this to look to see if the group specifically is out of the helicopter.

pallid palm
#

hello all: you know when you get in a heli: It shows that little heli icon on the map: you know like that little chopper icon: with the chopper blades kinda looks like a gosthawk: where can i find this icon: i want to create it in a chopper script.

#

its not in the regulare icons

thin fox
fair drum
#

theres also the texture viewer with I think Eden Enhanced, but it also might be 7erra's

pallid palm
#

oh nice really cool m8 thx @thin fox

#

@fair drum yeah i don't have Eden Enhanced

#

im old school ๐Ÿ™‚

#

Woohoo found it thx so much @thin fox

eternal spruce
#

Can I plot more than one ilsTaxiIn & ilsTaxioff on this airfield.

#

Does anyone have any experience with Dynamic Airport Configuration, please let me know if it can be done or if i need to explain it better

warm hedge
#

What is plot in this context

#

Also you can't just post inline link

eternal spruce
#

the positions for which the taxi on or off location is

#

here's a better example with the dots on the map

warm hedge
#

So what is the question

eternal spruce
#

can i have more that one taxi

{
    simulation = "airport";

    ilsPosition[] = { -270, 0 };
    ilsDirection[] = { -1, 0.08, 0 };
    ilsTaxiIn[] = { 40, -38, -212, -38, -218, -32, -218, -10, -200, 0 };
    ilsTaxiOff[] = { 20, 0, 240, 0, 250, -10, 250, -30, 245, -35, 240, -38, 40, -38 };
};```
the example on the wiki only shows one
warm hedge
#

No

eternal spruce
#

ok thank you

cobalt path
#

Question, so I looked at a code of a mod thats "suppose to" dig holes in the ground. However it doesnt seem to work in dedicated servers (I think, didnt work yesterday).

private _pos = position player;
private _pos2 = _pos select [0,2];
private _h = getTerrainHeightASL _pos2;
private _h2 = _h - 0.7;
private _list = [ (_pos2 select 0), (_pos2 select 1), _h2 ];
setTerrainHeight [ [_list], false ];

This seems to be entirety of the code. My question is, does "setTerrainHeight" needs to be executed globally? Because from wiki, it seems like its always Global JIP. Unless I missunderstand smth

errant jasper
#

It needs to be executed on the server specifically.

#

So yeah, that looks completely broken on dedis.

#

[[_list, false]] remoteExec ["setTerrainHeight", 2] I would guess.

cobalt path
#

I guess I could remoteExec ["call",2,true];"

#

Oh ye that would work as well

errant jasper
#

I would n'tset JIP arg to true for a server-effect only command - it "shouldn't have any effect" for JIPs. I would expect the server to sync it anyway.

cobalt path
#

ahhh I see

#

thx

split ruin
#

any way to add more radio triggers? ๐Ÿค”

pallid palm
#

yeah that would be cool @split ruin

#

i think there is a way to do this @split ruin

pallid palm
#

wow Awsome Woohoo

pallid palm
#

OMG: Arma 3 is So Much Fun: Woohoo: i love it

cobalt path
winter rose
errant jasper
#

I use events in my stuff, so never fully bothered to get the hang of remoteExec and commands.

I thought that: X command Y became [X, Y] remoteExec ["command", ..] so I just translated that from setTerrainHeight [_list, false] into [[_list, false]] remoteExec ["setTerrainHeight", ...]. Someone else probably know the right syntax then.

#

The biki even gives the example:

hint "Hello";
// becomes
["Hello"] remoteExec ["hint"];

...

winter rose
#

just an issue of array imbrication
setTerrainHeight [ [_list], false ]; โ†’ [[_list], false] remoteExec ["setTerrainHeight", 2];

errant jasper
#

I see. Though I find that confusing and inconsistent with how the hint example then works. So for X command Y make array [X, Y] for remoteExec. For command Y just use Y for remoteExec.. Except hint you can use [Y]..

warm hedge
#

It is not an exception

winter rose
warm hedge
#

X command Y = [X,Y] remoteExec ["command"]
commmand X = X remoteExec ["command"]

winter rose
#
// you could go
["Hello"] remoteExec ["hint"];
// or even
"Hello" remoteExec ["hint"]; // iirc
#

there is nothing preceding hint, so IDK if you could even do

[[nil, "Hello"]] remoteExec ["hint"];
```^^
hallow mortar
#

For single-argument commands it's sometimes safe to pass the argument as an array, if there's no chance of confusion. In this case, the single argument is already an array, so trying to put it in another array just confuses it. This is wrong, see below

errant jasper
#

I get your argument. Now look honestly at example #1 on Biki. Notice how it says you can do both for hint. But then for cutRsc you must wrap.

#

So cutRsc X should be X remoteExec ["cutRsc"] but example is [X].

winter rose
#

yes as it's an array, same as params
they don't know if it's an array of params or if the array is the param

#

if in doubt, wrap in array :)

errant jasper
#

Anyway, that is why I use events. Then I only send one message to potentially execute multiple commands, and don't have to guess the parameter passing ๐Ÿ™‚

hallow mortar
#

Well I've just tested it and half of what we've just been saying was wrong

#

you do need extra brackets, the issue was that the false was in the wrong place

#
[[[_list], false]] remoteExec ["setTerrainHeight", 2]; // correct
[[[_list, false]]] remoteExec ["setTerrainHeight", 2]; // wrong
[[_list], false] remoteExec ["setTerrainHeight", 2]; // wrong
[[_list, false]] remoteExec ["setTerrainHeight", 2]; // wrong```
errant jasper
#

Ah, yeah, I see. The first argument is itself an array of position (another array). Well at least that seems consistent to me.

cobalt path
#

This seems so counter intuitive

#

anyway thanks!

#

I shall test it

digital torrent
#

anyone got an idea on how to do the below?

Let says i have Object "A" at x=0, y=0.
I want it to move only up to 10 meter to the closest player (lets say at x= 13, y=19). If player distance is within 10 meter, the return position would be the closes player position.

How can i return a coordinate that is the closest to player from object A?

For context, i am trying to create something similar to scp 173. I will use setPos to move it. but the coordinate is what i struggle with. If you can add the Z coordinate into it. it would be even better.

sharp grotto
digital torrent
#

oh i didnt know vectoradd existed. perfect i will check it out

hallow mortar
#

vectorFromTo might help you as well

digital torrent
sharp grotto
#

It's hard to get what you mean exactly, i googled scp173 real quick.
For the position 10m near the player something like that should be fine (if not inside buildings etc (then it will get more tricky anyway)).

    private _Distance = 10; 
    private _randomposCount = random [5,10,20];
    for "_i" from 1 to _randomposCount do  
    { 
        private _veh = createVehicle ["Sign_Sphere25cm_Geometry_F", (getPosWorld Trigger_Object), [], 0, "CAN_COLLIDE"]; 
        private _pos = (getPosWorld player) vectorAdd (vectorNormalized [(random 2)-1,(random 2)-1,0] vectorMultiply _Distance); 
        _veh setposATL [_pos #0,_pos #1,0];
    };
digital torrent
#

ok let me try this

#

it has an error. it says createvehicle error 0 element provided, expected 3

#

on your sign

sharp grotto
#

just example code

digital torrent
#

oh haha

sharp grotto
#

either define the Trigger_Object

#

or change it from (getPosWorld Trigger_Object) to (getPosWorld player) or better [0,0,0] for the future

digital torrent
#

yea it get me the template that i want. thanks a lot!

split ruin
#

I need to find a random solitary house on Altis using

nearestTerrainObjects [player, ["House"], 200];

it has to be at least 100 m away for other buildings ...
too dumb to think how the script should be ... ๐Ÿ˜”

fair drum
#

anywhere on the map?

split ruin
#

yeah

fair drum
#

do you want to include placed buildings? or just terrain buildings. if just terrain, you use [worldSize / 2, worldSize / 2] for the position, then sqrt 2 / 2 * worldSize for the radius. Gather all the buildings, then iterate through them individually doing basically the same thing as above, but using the index instead of player.

split ruin
#

no just the terrain ones

#

doing basically the same thing as above, but using the index instead of player.
I didn't understand this part

fair drum
#
private _allBuildings = nearestTerrainObjects [[worldSize / 2, worldSize / 2], ["House"], sqrt 2 / 2 * worldSize];
private _validBuildingPositions = [];
{
    private _nearBuildings = nearestTerrainObjects [_x, ["House"], 100];
    _nearBuildings = _nearBuildings - [_x];
    if (_nearBuildings isEqualTo []) then { _validBuildingPositions pushBack (getPosATL _x) };
} forEach _allBuildings;

copyToClipboard str _validBuildingPositions;

something along the lines of this. not able to test it right now but that's the idea.

split ruin
#

i will test inmediately

fair drum
#

instead of copying the positions, you could also create a marker on each of the spots in the editor as well

split ruin
#

@fair drum I tried this on a fist place and man there are a lot of houses to mark (or positions to take) ๐Ÿ˜‚ your script is working, you are a hero ๐Ÿป

fair drum
digital torrent
#

anyone can help with the below?
the hint always become Any or Scalar NaN. Cant seems to figure out how to fix it

// Initialize health and other variables
private _health = 2000;
_scp173 setVariable ["health", _health]; // Initialize health

// Add event handler for health damage
_scp173 addEventHandler ["Hitpart", {
    (_this select 0) params ["_target", "_shooter", "_projectile", "_position", "_velocity", "_selection", "_ammo", "_vector", "_radius", "_surfaceType", "_isDirect", "_instigator"];
 
    _damageAmount = _ammo select 0; // Based on arma's damage value system

    // Apply the calculated damage
    _scp173 setVariable ["health", (_scp173 getVariable ["health", 2000]) - _damageAmount];

    
    // Display updated health
    hint format ["SCP-173 Health: %1", _scp173 getVariable ["health", 2000]];

}];
wicked roostBOT
#
How to use SQF syntax highlighting in Discord

```sqf
// your code here
hint "good!";
```
โ†“ turns into โ†“

// your code here
hint "good!";
digital torrent
#
// Initialize health and other variables
    private _scp173View = false;
    private _health = 2000;
    _scp173 setVariable ["health", _health];  // Initialize health

    // Add event handler for health damage
    _scp173 addEventHandler ["Hitpart", {
        (_this select 0) params ["_target", "_shooter", "_projectile", "_position", "_velocity", "_selection", "_ammo", "_vector", "_radius", "_surfaceType", "_isDirect", "_instigator"];
     
        _damageAmount = _ammo select 0; // Based on arma's damage value system

        // Apply the calculated damage
        _scp173 setVariable ["health", (_scp173 getVariable ["health", 2000]) - _damageAmount];

        
        // Display updated health
        hint format ["SCP-173 Health: %1", _scp173 getVariable ["health", 2000]];
        
        // If health reaches zero, make SCP-173 fall
        if (_scp173 getVariable ["health", 2000] <= 0) then {
            private _pos = getPosATL _scp173;
            _scp173 setPos [getPosATL _scp173 select 0, getPosATL _scp173 select 1, -10]; // Make it fall to the ground
        };
    }];

winter rose
#

health is not broadcast I would say

#

setVariable ["varName", value, true]

granite sky
#

_scp173 doesn't exist in the EH scope.

winter rose
#

(ouh yeah, time to sleep)

digital torrent
#

i can try this, but i think i did it in my tries and still didnt work

wintry citrus
#

hello guys . i a looking for a scripter to make a script

#

anyone for hire / help

granite sky
#

(this select 0) params [whatever] at the top is also wrong.

wintry citrus
#

or any one has the script that i wannt

digital torrent
digital torrent
granite sky
#

the what

digital torrent
#

the select 0 comes from the template in BIS


this addEventHandler ["HitPart", {
    (_this select 0) params ["_target", "_shooter", "_projectile", "_position", "_velocity", "_selection", "_ammo", "_vector", "_radius", "_surfaceType", "_isDirect", "_instigator"];
}];

#

is that wrong? am kinda lost now lmao

granite sky
#

nah that might be a weird one. Not used it.

hallow mortar
#

That is correct, although pretty much only for that specific EH, because it has an array of sub-events on each firing

granite sky
#

You need private private _scp173 = _target; in the EH though.

#

or just use _target instead.

hallow mortar
wintry citrus
digital torrent
winter rose
#

this is the only EH to use _this select 0, I will fix that โ€“ I don't like that it makes people believe "that's all there is"
I will throw a forEach in there

#

done

digital torrent
#

last question for the day ๐Ÿ™‚

so i made my script and it will be using the "spawn" and the script will be tied to the object (through nearestobject and using player as the center of it).
No sqf script as i am trying to create it for publiz zeus.

the issues, is that "player" cannot be used in multiplayer/publiz zeus.

I thought perhabs placing the specific object i want into the map and using entities or allobjects, but for some reason, neither of them return the object i put for the script.

Any alternative?

I cant do _scp173 = this at the beginning as it wont be defined.. so kinda loss what other method there are. Cant seems to see a command based on curator/zeus, mouse position neither.

fading gorge
#

re: new createObject function - would this be suitable as a substitute for createVehicle'ing 100s of weaponHolders?

granite sky
fading gorge
#

or would it not work? no simulation = can't pick things up from the weaponHolder?

fallen locust
#

no, 1st it has no simulation so you cant interact with it. 2nd its less performant then createVehicle (no idea how that happend)

digital torrent
#

yes (would be me)

fading gorge
#

nice one, thanks @fallen locust

digital torrent
#

nvm, i ended up solving it but it is just not efficient haha. all good

fading gorge
#

saves me installing dev branch to test ๐Ÿ˜ƒ

digital torrent
#

anyone got an alternative to worldtoscreen if i want to check if a unit is within the vision of another?
The script work but i didnt know that if i am viewing from zeus, it screw up with the worldtoscreen.


            private _viewers = _menInRange select {
                !(worldToScreen ASLToAGL getPosASL _test1 isEqualTo [])
            };
devout tide
#

I want to create transport heli script and Im stuck at deleting and creating it from different users.
for example:

user 1 creates heli
user 2 deletes the heli to create new heli
old heli doesnt get deleted

I used the missionNamespace to share the object heli between the users.
Is there another way to share vehicle objects?

stable dune
#
Heff_heli = "yourHeli" createVehicle _pos;
PublicVariable "Heff_heli"

And on 2nd use

if (!isNil "Heff_heli") then {
   deleteVehicle Heff_heli
};
...//create new same way 
warm kestrel
#

So, I barely understand scripting, and I'm trying to struggle through something. I'm trying to make a soldier have the VR flash/disappear effect when they die, and using this works...
[this, true, 5] spawn BIS_fnc_VREffectKilled;

Unfortunately, it also deletes everything else still alive with the same effect. What am I doing wrong?

pallid palm
#

where are you exec-ing this at ```sqf
[this, true, 5] spawn BIS_fnc_VREffectKilled;

warm kestrel
#

In the Init field of the unit I want to have the effect

(Been trying to mess around with various things to get it to work, the pictured line just doesn't at all)

Testing it by shooting one of the soldiers with the script in the face

pallid palm
#

so its in the init of the player or is that a Ai: oh yeah thats Ai i see

warm kestrel
#

It's the AI

pallid palm
#

you have player in the script line

#

put this in the place of the player

warm kestrel
#

That was me changing things to what the wiki suggested as an example just to try it out (it didn't work)

#

Lemme try that

pallid palm
#

the word this means that object where you have the code in

warm kestrel
#

Unfortunately, it doesn't seem to have worked. Tested a few times.

I tried it without the dash just to double-check, and it did the thing where it 'works' but deletes everyone

pallid palm
#

really lets read the wiki more times lets see what we can come up with

warm kestrel
pallid palm
#

yeah it says this is correct hmmm

warm kestrel
#

(If the solution is shockingly simple and I didn't notice because I'm a dummy, that is entirely possible)

pallid palm
#

well we all are learning at some stage

#

[object, instant, delay] call BIS_fnc_VREffectKilled

#

so you only have this in 1 Ai and thats it: right

#

so w8 a sec you want this to happen to your team ?

hexed sundial
#

is the a way to test a mod in game without building it / restarting the game for every change?

warm kestrel
#

For clarify:
I want the players on the ground to shoot the AI units, and for said AI units to have the effect and disappear like the VR units in the tutorials. This is essentially going to be a 'simulated exercise transitioning to something more serious'. I'd implement something mission-wide, but I want to implement something on a per-unit basis so I can transition to the not exercise portion mid-mission with no delay by just using my pre-existing units.

warm hedge
hexed sundial
warm kestrel
warm hedge
#

Same principle. Just assign local SQF file

pallid palm
#

@warm kestrel so your saying that ```sqf
[this, false, 5] spawn BIS_fnc_VREffectKilled;

warm kestrel
#

It ended up working.

Hopefully it works in live multplayer

pallid palm
#

ok ๐Ÿ™‚ cool m8 Awsome

warm kestrel
pallid palm
#

well i didn't do much POLPOX did it all

warm kestrel
#

All that really matters is that you were helping me bash my head against it

pallid palm
#

cool thx m8 i try my best as i can to help

#

i like to help if i can: it makes me happy

hexed sundial
# warm hedge Same principle. Just assign local SQF file

when i load the config everything works great, my config as an init to trigger an sqf, but when i spawn the unit the sqf isn't found

and when i try to trigger the sqf it'sef it doesn't work

sqf file:

/*
    File: initLauncher.sqf
    Description: Initializes Iron Dome launcher, adds a manual fire action using its own ammo,
                 and selects the fired missile for tracking or further scripts.
*/

_launcher = _this select 0;

// --- Server-side message ---
if (isServer) then {
    systemChat "Iron Dome system online";
};

// --- Client-side/manual actions ---
if (hasInterface && {alive _launcher}) then {
    hint "Iron Dome Online";

    // Add manual scroll-wheel action to fire missile
    _launcher addAction [
        ":boom: Fire Missile from Ammo",                  // Action title
        {
            params ["_target", "_caller", "_actionId", "_arguments"];

            if (!alive _target) exitWith {};

            // Fire the first missile from the launcher's ammo
            _target fire ["Missile_AA_04_F", _target];  

            // Wait a short moment for the missile to spawn
            waitUntil {sleep 0.1; ({alive _x} count nearestObjects [_target, ["MissileBase"], 50]) > 0};

            // Select the missile just fired
            private _missile = (nearestObjects [_target, ["MissileBase"], 50]) select 0;

            systemChat format ["Missile fired and selected: %1", typeOf _missile];

        },
        nil,       // arguments
        1.5,       // priority
        true,      // showWindow
        true,      // hideOnUse
        "",        // condition (always available)
        "(_this distance _target) < 10"  // only near launcher
    ];

    systemChat "Iron Dome ready for manual launch.";
};
warm hedge
#

What error

hexed sundial
#

now there is no error but the sqf is not triggering

code i use in console:

diag_mergeConfigFile ["\IronDomeMorji\addons\config.cpp"]; 
diag_mergeConfigFile ["\IronDomeMorji\addons\scripts\initLauncher.sqf"];
private _playerPos = getPos player;
private _launcher = "IronDome_Launcher" createVehicle [_playerPos select 0, _playerPos select 1, (_playerPos select 2) + 0.5];
if (isNull _launcher) then {
    systemChat "Error: Launcher spawn failed!";
} else {
    systemChat "Launcher spawned at player position test!";
};
warm hedge
#

diag_mergeConfigFile does not accept an SQF

#

I have no idea what are you trying to do

hexed sundial
warm hedge
#

What are you trying to achieve

hexed sundial
#

i am trying for an sqf to trigger when the unit is

cfg:

class CfgPatches {
    class IronDome {
        units[] = {"IronDome_Launcher"};
        weapons[] = {};
        requiredVersion = 1.0;
        requiredAddons[] = {"A3_Static_F_Sams"};
        author = "YourName";
    };
};

class CfgVehicles {
    class B_SAM_System_01_F;  // Base NATO SAM launcher

    class IronDome_Launcher: B_SAM_System_01_F {
        displayName = "IronDome_Launcher";
        scope = 2;
        side = 1;
        faction = "BLU_F";
        crew = "B_UAV_AI";
        typicalCargo[] = {"B_UAV_AI"};
        vehicleClass = "Static";
        editorSubcategory = "EdSubcat_Turrets";

        class EventHandlers {
            init = "_this execVM 'scripts\initLauncher.sqf';";
        };
    };
};
#

but it's not finding the sqf

warm hedge
#

And where is scripts\initLauncher.sqf?

hexed sundial
#

C:\Program Files (x86)\Steam\steamapps\common\Arma 3@IronDomeMorji\addons\scripts\initLauncher.sqf
C:\Program Files (x86)\Steam\steamapps\common\Arma 3@IronDomeMorji\addons\config.cpp

warm hedge
#

Do you mean you packed the SQF into a PBO or not?

hexed sundial
#

No, do i need to?

warm hedge
#

Always. I have no idea why you want it in local folder if you are not debugging

hexed sundial
#

????

I am debugging, i want to know if the code works and make changes to it without restarting the game. What i asked you before

warm hedge
#

Then place scripts\initLauncher.sqf in your mission folder

#

Not somewhere like that

hexed sundial
#

Will the cfg pick it up?

warm hedge
#

Pick what up?

hexed sundial
#

the sqf...

warm hedge
#

Do you mean will init = "_this execVM 'scripts\initLauncher.sqf';"; recognize it properly? Yes

#

Because init = "some code"; is just an SQF, it does nothing different than how you run SQF in a mission

hexed sundial
#

So how you test how mods usually?

warm hedge
#

Depends on the Mod I make

#

If the Mod is just about config, I'll just use diag_mergeConfigFile to try whatever I want
If the Mod is about a function, I usually make the function in a mission until it meet the requirement, then I implement into the Mod

devout tide
#

how can I create units and add them to a remote group safely?
its seems to do not work with just create the units direct to the group...

split ruin
#

I have to filter buildings with building positions, this finds ruins, etc

private _allBuildings = nearestTerrainObjects [[worldSize / 2, worldSize / 2], ["House"], sqrt 2 / 2 * worldSize];
private _validBuildingPositions = [];
{
    private _nearBuildings = nearestTerrainObjects [_x, ["House"], 100];
    _nearBuildings = _nearBuildings - [_x];
    if (_nearBuildings isEqualTo []) then { _validBuildingPositions pushBack (getPosATL _x) };
} forEach _allBuildings;

nvm I just spawn needed house LOL ๐Ÿ˜†

devout tide
split ruin
#

bots = units ๐Ÿซฃ

devout tide
thin fox
devout tide
#

creating transport heli with crew in it that I could recreate from other players, when I set or create new its works perfectly, but when a friend trying to overwrite my heli + its crew, its deletes the heli but the crew stays

grizzled cliff
thin fox
earnest valve
#

@grizzled cliff, damn, so we gotta learn a new language now?

#

๐Ÿ˜›

grizzled cliff
#

well you'd need to learn a real language... ๐Ÿ˜›

earnest valve
#

What can get more real than speaking English ๐Ÿ˜‚

fair drum
#

yeah you delete the crew first, then the heli if your reference is the heli

lunar ridge
#

Hey I'm having some issues with subtitles going away to fast

 ["Vasily", "Where is everyone? I thought there was supposed to be unit blocking any travel into Garmanda", 0], 
 ["Aleskander", "Your guess is as good as mine Vasily, the Sargent said they saw blood in the guard shack. If that's true I don't know if I want to stay here for too long.", 10] 
] spawn BIS_fnc_EXP_camp_playSubtitles;```
This is what I am using to play the subtitles. But for whatever reason they only stay on screen for maybe 1 second 2 if I'm lucky
round hazel
#

My only other idea would be their length? Maybe try using smaller subtitles, could be a formatting issue

#

Also, hey folks! Bit of an odd one, is there any way to get AI Units to attack a prop (And possibly attack players if they get in their way?)

#

Specifically AI with Melee weapons

hallow mortar
#

I was going to say doSuppressiveFire until you said "melee".
Melee weapons aren't a real thing in Arma 3. Every implementation of them is some kind of hack or fake, using scripting or secret bullets, and getting the AI to use them depends massively on which specific system you're using.

round hazel
#

I believe it uses IMS, it's the skelebobs from Empires of Old

#

I've tried doTarget and doFire, I'll keep at it. May be I just need just stick an invisible dude down next to the prop and have them target him, then destroy the prop on his death

#

Sweet, for any future searches; Grab a dude, make him invisible, stick him next to the prop and disable his ai. Use doTarget on the AI you wish to attack him (Or stick a 'Destroy' waypoint down). Works a charm

lunar ridge
# round hazel My only other idea would be their length? Maybe try using smaller subtitles, cou...

Was having the same issue even when the text was only 1 to 3 words long.

    
    private _meters = player distance2D TECH_1;
    if (((alive SLDR_1) && (alive TECH_1)) && (_meters < 101)) then {titleText ["<t align = 'center' shadow = '2' color='#860111' size'2' font='RobotoCondensedBold' > Soldier 1: </t><t color='#ffffff' size='1.5' font='RobotoCondensed' > We're freezing our asses out here cause of some fuck head who keeps messing with the tower.</t>", "PLAIN DOWN", 0.7, true, true];};
    sleep 7;
    private _meters = player distance2D TECH_1;
    if (((alive SLDR_1) && (alive TECH_1)) && (_meters < 101)) then {titleText ["<t align = 'center' shadow = '2' color='#860111' size'2' font='RobotoCondensedBold' > Soldier 2: </t><t color='#ffffff' size='1.5' font='RobotoCondensed' > Think it's the Canadians?</t>", "PLAIN DOWN", 0.5, true, true];};
    sleep 5;
    private _meters = player distance2D TECH_1;
    if (((alive SLDR_1) && (alive TECH_1)) && (_meters < 101)) then {titleText ["<t align = 'center' shadow = '2' color='#860111' size'2' font='RobotoCondensedBold' > Soldier 1: </t><t color='#ffffff' size='1.5' font='RobotoCondensed' > I wish... haven't seen any of their forces since the radar base battle.</t>", "PLAIN DOWN", 0.5, true, true];};
};```
This was what I was originally using, borrowed from another member in my event community. But even this was giving me the same issue where the dialogue would disappear far faster than it was set to.
round hazel
#

I'm by no means an expert, so take other user's suggestions before my own;

  1. Make a new project and test if it works in there. If so, something in the settings is buggered and you're going to have to go looking
  2. Use a different subtitles system. I tend to use the subtitles you include with CFGSounds, works grand for me. If you need an example I'll provide happily
lunar ridge
#

An example would be great

round hazel
#

Two tics

#
{
    sounds[] = {}; // OFP required it filled, now it can be empty or absent depending on the game's version

    class voiceline1
    {
        name = "voiceline1";                        // display name
        sound[] = { "voiceline1.ogg", 2d, 1, 100 };    // file, volume, pitch, maxDistance
        titles[] = { 0, "This is a voiceline",
                        4, "This is another voiceline,",
                        7, "You won't guess what",
                        12, "This is also a voiceline" };            // subtitles

        //titlesFont = "LCD14";        // OFP:R - titles font family
        titlesSize = 0.2;            // OFP:R - titles font size

        forceTitles = 1;            // Arma 3 - display titles even if global show titles option is off (1) or not (0)
        titlesStructured = 1;        // Arma 3 - treat titles as Structured Text (1) or not (0)
    };
};```
#

You can define voicelines to show (and the time they are shown) in your description.ext. You can also adjust the font, the size and more. See description.ext on the Wiki and scroll down to CfgSounds for a full breakdown

lunar ridge
#

Thank you very much. I give this a try

round hazel
ornate whale
#

Is there any way how to generate a random floating point number from 0 to x (included) with uniform distribution? Thanks

hushed turtle
#

That's what random is for, but x is excluded

warm hedge
#

Does random [x,y,z] works on your usecase, if not, why?

hushed turtle
#

Don't see that as issue though, you can use number larger than x, to get x included

warm hedge
#

Also a random X included is very very very very unlikely to be X

hallow mortar
warm hedge
#

I must be misremembered what uniform is then

hallow mortar
#

"All the same". Equal distribution across the whole range.

warm hedge
#

English is hard

hallow mortar
#

"uni" + "form", "one" + "shape". A soldier's uniform is called that because they're all the same.

warm hedge
#

Yeah figured. Then uhh, why not just random X and forget about include X?

tender fossil
#

0,01 %, 1 %, 10 %? At least the magnitude would be good to know

pallid palm
#

i agree wjth you @warm hedge and English is my lang. ๐Ÿ™‚

#

really English is kinda stupid cuz there is like 50 words that have the same meaning

#

not 50 but you know what i mean ๐Ÿ™‚

#

like "Uniform" can mean what you are waring: and also can mean "even" as in "Uniform" or the same on both sides: or symmetrical can mean the same all over

ornate whale
tender fossil
west grove
#

does createVehicle add the vehicles to garbage collection? like, spawn a car with createVehicle and it gets deleted even if it's still alive?

tender fossil
#

So no need to use discrete values necessarily

ornate whale
tender fossil
cyan dust
#

Is there a way to force 'doMove' on units? ๐Ÿค” I noticed that they may refuse to follow that order if there is an enemy nearby target position. That can be solved by

_group setBehaviourStrong "CARELESS";
_group setCombatBehaviour "CARELESS";

But that, of course, is sub-optimal. My goal is for enemy units to close the distance to target.

west grove
#

i dont get it. if i spawn my vehicle via script, it gets removed by remains collection. if i place it in 3den, it doesn't

pallid palm
#

its should not if its still alive

#

@west grove are you using Mods ?

west grove
#

no

#

i can only replicate that on our rc40 drone

#

but i dont understand why. it's a normal drone like any other

pallid palm
#

i spawn any vehical via script and it still remains unless its get destroyed

west grove
#

yes, if it wouldn't, a lot of scenarios would be broken

#

which makes this issue even worse

pallid palm
#

oh no

west grove
#

if i manually remove it from remains collection after spawning, nothing happens. if i add it again, it gets deleted

pallid palm
#

what do you mean by remains collection:

#

do u mean garbage collection

west grove
#

yes

#

removeFromRemainsCollector allUnitsUAV; etc

pallid palm
#

i never had to use that: i just set it all in the garbage collection and then if it gets destroyed then it get deleted

#

@west grove mayby you should name the UAV's: and do ```sqf
removeFromRemainsCollector [unit1, unit2, vehicle1];

west grove
#

that's exactly what i don't want to do ๐Ÿ˜„

#

this is terrible

pallid palm
#

whys is there alot of UAV,s

west grove
#

there can be, yes

pallid palm
#

oh shit lol ok

west grove
#

doing this would mean i have to add a kill EH to clean them up

#

which also means that it can be an issue if someone does not want them cleaned up

pallid palm
#

i see

#

you don't have to add a EH to clean up

west grove
#

need to get rid of wrecks at some point

#

i can't do that :p

#

this not for a single mission, but general

pallid palm
#

oh i see

thin fox
#

can be an option

west grove
#

not an option

thin fox
#

why?

west grove
#

this is about the rc40 drone in reaction forces. i can't do stuff like that

pallid palm
#

is reaction forces a DLC ?

west grove
#

yes

pallid palm
#

oh i see ok

#

well im sorry i could not help u m8

#

im still learning as you can tell

thin fox
west grove
#

the drone gets deleted by garbage collector even though it's still alive

pallid palm
#

his UAV get deleted and he's not sure why

#

yeah thasts really funny tho cuz i never had that happen

thin fox
#

and try to exclude the drone from it

pallid palm
#

i use both in conjuntion with each other

west grove
#

better to figure out why it gets deleted in the first place

pallid palm
#

true that

thin fox
pallid palm
#

where's Lou when we need him ๐Ÿ™‚

thin fox
#

but doing your own cleanup is just easier as waiting for them to come back with an answer lol

pallid palm
#

well i like his idea of fixing or figuring out whats going on its like a test ๐Ÿ™‚

#

and then leaning lots from it

west grove
#

ok, fixed it

#

showWeaponCargo = true; was in config for some reason. probably old copy&paste fail. i'm blindly assuming the engine thinks the drone is a weapon holder - since it has no actual weapon, it gets deleted

thin fox
#

noice

west grove
#

still, though, why does it not delete 3den placed objects

pallid palm
#

hmmm yeah i woundering

#

or thinking about it

#

may be the diff in SP to MP

ornate sky
#

Is there a way to change via script the magazines and/or ammo of static weapon backpacks, i.e. a disassembled static weapon such as a mortar or static mg?

blissful current
#

Is my syntax okay for this condition? I can't get it to return true:

(crew extractHeli findIf { _x in units extractHeliGroup }) == -1

It should return true if all units from extractHeliGroup are outside of the helicopter.

winter rose
#
units extractHeliGroup findIf { _x in extractHeli } == -1
#

(less characters, I win!)

blissful current
blissful current
granite sky
#

Well, there's direct animation movement if you're trying to script a particular scene.

blissful current
hallow mortar
#

Well you should be using attachTo, not attachObject, so start with that

blissful current
#

Copy that. I'll go read that wiki now.

blissful current
#
situnit4 attachTo [chair4];
situnit4 setVectorDirAndUp [[0,1,-0.10], [0,0.10,1]];
hallow mortar
#

Any orientation changes must be done after attaching, and their vectors will be interpreted as relative to the parent object

#

Once attached, the attached object inherits the simulation state and rate of the parent object. If the parent object is a terrain object, has its simulation disabled, or is a very-low-simulation object like a building, then that could seriously affect the attached object

blissful current
#

Bingo. I have the sim disabled on the chair.

#

Maybe that's why it's frozen and commands to change the dir don't have an effect?

hallow mortar
#

If you can't avoid problems with attaching to the actual relevant object, you can use a dummy object with better simulation characteristics instead. Attaching doesn't require real contact or even proximity.

hallow mortar
blissful current
hallow mortar
#

It's not a game mechanic. It's just an object you're using as a dummy, a stand-in. Like a clothes dummy.

blissful current
#

I'm not understanding what that means. If I can't get it to work with the chair for whatever reason, are you saying this "dummy object" is a solution?

hallow mortar
#

If you had to have the chair sim-disabled for some other reason, or it turned out the chair object had a very low simulation rate in itself, then you could use some other object which is sim-enabled or has a higher sim rate to attach the unit to. This other object would be a "dummy"; it would have no purpose or function in itself, it would just be there as a stand-in to stick this unit to, instead of the chair. It would probably be invisible or hidden somewhere.

blissful current
#

Ohhh, very clever. I may actually use this!

thin fox
#

or you can check sit function from ace and see what it does

blissful current
#

It's to bad there isn't a log function in the editor to grab the position and vector of an object. Because having to adjust the coordinates with trial and error is slow.

hallow mortar
#

Use BIS_fnc_attachToRelative, or do it in-game with the debug console so you can just keep doing attachTo until you have the right coordinates

cyan dust
granite sky
#

Armed vehicle?

#

I remember that made a difference for vehicle pathfinding.

hallow mortar
stable gazelle
#

hey i was thinking of making a bombing range for my training map anyone know of a way to clear and resetup target vics by a trigger or way way to make it a scoll menu thing?

blissful current
# hallow mortar Use `BIS_fnc_attachToRelative`, or do it in-game with the debug console so you c...

Okay, I think I have an actual workflow now that doesn't take forever.

  1. Use Polpox Artwork Mod; so you don't have to do trial and error positioning from the debug console.
  2. Copy the sit animation from the animation viewer and play the animation in the editor.
  3. Now you can position the unit precisely over the chair as you like.
  4. Start the game, open the debug console, and grab some coordinates:
getPos sitUnit4; // get the unit's position in the world
[situnit4, beachTable] call BIS_fnc_vectorDirAndUpRelative; // get the object rotation axis values.
  1. Go back to the editor. In init.sqf, place your commands and values:
sitUnit4 switchMove "HubSittingChairUA_idle2"; // play the idle sitting animation
sitUnit4 setPos [7105.6,4265.25,-0.125195]; // positions the unit over the chair
situnit4 attachTo [beachTable]; // attach to chair so that engine doesn't move it away (collision issue)
situnit4 setVectorDirAndUp [[0.895294,-0.12485,0.427622],[-0.418435,0.0936603,0.903405]]; // rotates the unit on the chosen axis values
  1. Tested in SP and MP, and so far so good.
blissful current
stable gazelle
#

the most ive found on google is a repair trigger on a area like a heli pad idk how to make it set to a group here is what ive found so far

vehicle (thislist select 0) setDamage 0; vehicle (thislist select 0) setFuel 1; vehicle (thislist select 0) setVehicleAmmo 1;

blissful current
#

Can you please use some punctuation? I'm a little confused about what you are saying.

warm ore
#

What code can I use to attach a camera to the underside of a players vehicle, so the player can drive while watching the suspension move? Single player, Eden Editor.

vivid bridge
#

deleteWaypoint [ alphagroup , 0 ] ;

does this command work?

My bots still keep moving.
I specified this in the activation trigger.

granite sky
#

IIRC deleting a waypoint does not necessarily stop units from moving.

#

alphagroup move getPosATL leader alphagroup; will probably do it.

warm hedge
#

0 means the initial WP, where they are initially placed

vivid bridge
granite sky
#

well, polpox's point is valid as well. 0 is not necessarily the active waypoint.

#

We usually delete that one because vehicles often get created elsewhere and then placed, and then they're trying to drive to [0,0,0] or wherever.

#

If you want them to move elsewhere then just create a new waypoint and set that as the active waypoint.

#
private _wp = alphagroup addWaypoint [_newpos, 0];
alphagroup setCurrentWaypoint _wp;
jade abyss
#

German ๐Ÿ˜„

fair drum
warm hedge
warm ore
warm hedge
#

I'll write a snippet after I get home

warm ore
#

Appreciate it, thanks ๐Ÿ‘

earnest valve
#

lol

warm hedge
warm ore
warm hedge
#

veh is the vehicle variable name

warm ore
#

Could I replace it with "vehicle player"?

warm hedge
#

Ja

warm ore
#

It creates a camera looking at the side of the vehicle, but I'm not able to drive the vehicle any more. In fact it's locked up any input and I think I'll have to task manager kill Arma to get out?

warm hedge
#

You can just press Esc to exit?

#

Also I guess you can't just drive it on your own

warm ore
#

Ah ok - yes ESC worked to recover out of it.

#

I need to be able to drive as I want to observe the suspension close up in action.

warm hedge
#

I don't think there is a simple solution to that other than let AI drive it

warm ore
#

That surprises me. I just want the external camera which we can control to be positioned at a different place.

warm hedge
#

Why you could still be suprised by Arma 3

warm ore
#

Lol, true ๐Ÿ˜‰

#

I think I previously tried extCameraPosition[] = { }; in config and it didn't really work for low down close views, perhaps I'll try it again.

hallow mortar
#

You can have a scripted camera that still gives you control of your original unit

#

IIRC it depends on the cameraEffect used to switch to it, but I don't remember which one

drowsy geyser
warm hedge
#

It is not for vehicles AFAIK

drowsy geyser
#

Just use vehicle player

warm hedge
#

Hm, I have never bothered to mess with switchCamera then, my bad

dim token
#

Hi folks. I've run into a problem where I'm trying to create a queue that clients can write to simultaneously. Is there anyway to implement this that would prevent the case where simultaneous writes from different clients will overwrite the changes of the other?

warm ore
hallow mortar
#

I didn't post a link or say that I had a premade solution for you

warm ore
#

oh my mistake, the link below your post was from someone else

blissful current
granite sky
#

You're saying they loop between standing and sitting, or just that they stand up afterwards?

blissful current
#

So, I just want them to stay sitting after they sit down.

granite sky
#

disableAI "ANIM" should work if you don't want them to do anything except sit there.

pallid palm
#

i don't see no loop in that line where's the loop

blissful current
#

Would that freeze them in place?

#

Like no movement at all. Like a statue?

granite sky
#

Well, they wouldn't be able to do anything on their own.

blissful current
#

I still like the idle animation is what I'm getting at. I don't want it to look like the simulation is disabled or something. I'll give it a try and see how it looks.

granite sky
#

You could manually play suitable idle animations. I wouldn't know what those are for sitting characters.

blissful current
granite sky
#

playMove will add in the transition animation if there is one.

blissful current
#

That makes sense. So why does the unit stand back up though?

granite sky
#

Because the AI wants to stand back up.

blissful current
#

Fair.

pallid palm
#

how about trying ```sqf
"switchMove"

blissful current
#

Tried it.

pallid palm
#

ok

blissful current
granite sky
#

Difference with switchMove should be that it skips the transition, so they'd jump straight to the sitting animation.

pallid palm
#

how about ```sqf
"doStop this";

granite sky
#

I tried that out of interest. Doesn't work.

pallid palm
#

ok

#

well i'm glad i was able to interest you ๐Ÿ™‚

granite sky
#

They don't need to be moving anywhere for them to want to be in the standing animation apparently.

pallid palm
#

copy that

blissful current
#

Is an object a "target"? Or do I have to use some specific syntax to make an object a target?

granite sky
#

No, object and target are equivalent in the context.

blissful current
#

Is there a way to "un-lookAt", or remove the command?

I like the command because it makes a unit look at the player but I also want that unit to go back to it's regular behavior.

hushed turtle
#

Description doesn't say it, but _unit lookAt objNull is worth a try

muted fulcrum
#

is anyone familiar with the mi-6t mod in the workshop?

warm hedge
#

Specify which Mod and specify your question

muted fulcrum
#

i was just wondering if anyone knows what script this runs so it can open cargo doors because i can't find it in the comments anywhere

thin fox
#

it will be like _this animate ["action_name", 1];

#

I think

muted fulcrum
#

"[this,1] remoteExec ['HWK_fnc_MI6_cargodoors',0, true]"; something like this?

thin fox
#

and read about remoteExec and how its syntax works

#

try this on the unit's init field:
this animate ['HWK_fnc_MI6_cargodoors', 0];

hallow mortar
#

That's not an animation name, it's a function

thin fox
#

yeah

#

I saw it now

muted fulcrum
#

i was wondering too

hallow mortar
#

If they got that from the vehicle's config, the mod probably has its own function for managing the doors

muted fulcrum
#

i couldnt find it

thin fox
#

maybe [this] call HWK_fnc_MI6_cargodoors

#

or spawn

#

just test it

muted fulcrum
#

useractions

hallow mortar
#

In the vehicle's config?

muted fulcrum
#

config

#

yeah

#

though

hallow mortar
#

Okay then just use that exactly

muted fulcrum
#

its not on the action menu in game

hallow mortar
#

It might be seat-specific

thin fox
muted fulcrum
#

nono

#

im trying it in the init aswell

thin fox
#

ah okay

hallow mortar
#

If it's in the init field you don't need to remoteExec it; init fields are executed on all machines. In other cases it may need to be a remoteExec - it's done like that in userActions config because action code is only executed on the machine that did the action

muted fulcrum
#

still doesnt want to work both for init and exec

blissful current
#

So, how does one get this EH to trigger?

testUnit addEventHandler ["AnimChanged", {
    params ["_unit", "_anim"];
    systemChat "fired!";
    [testUnit, "HubSittingChairA_idle3"] remoteExec ["switchMove", 0];
    [testUnit, "HubSittingChairA_idle3"] remoteExec ["playMoveNow", 0];
}];

I've tried these lines individually without success of getting it to trigger.

[testUnit, "HubSittingChairA_idle3"] remoteExec ["switchMove", 0];
testUnit switchMove "HubSittingChairA_idle3";
testUnit playMove "HubSittingChairA_idle3";
testUnit playMoveNow "HubSittingChairA_idle3";
testUnit switchMove ["HubBriefing_loop", 0, 0];

I'm trying to achieve an animation looping effect that Leopard suggested (AnimStateChanged). It only fires once but then never again.

So next, I tried AnimDone, which works but it fires a ton of times and makes the begining of the animation look glitchy.

So now I'm trying AnimChanged but can't get it to fire at all.

thin fox
muted fulcrum
#

yeah

thin fox
#

weird

muted fulcrum
#

it is

thin fox
#

do you have all its dependencies?

muted fulcrum
#

yeah

thin fox
#

can you check in the functions viewer if that function really exists?

thin fox
muted fulcrum
#

yes both values dont work

#

im starting to think that it probably doesnt exist

#

but i'll check

#

oh it is here

thin fox
#

๐Ÿค”

muted fulcrum
#

forgive me for the eyesore

#

but

#

if (!isServer) exitWith {};

//[heli, _value] spawn HWK_fnc_MI6_cargodoors
private _heli = param [0, objNull];
private _open = param [1, 1];

_rampendpoint = "ramp_end";
_rampanim = "ramp_move";
_rampdooranim = "door_ramp";

//open ramp
if (_open == 1) then {

if ((_heli getHitPointDamage "Hitdoor_ramp_L" < 1) && (_heli getHitPointDamage "Hitdoor_ramp_R" < 1)) then {_heli animatesource [_rampdooranim,1,0.25];};

waituntil {sleep 1; ((_heli animationsourcePhase _rampdooranim) == 1) || !(alive _heli)};
if !(alive _heli) exitwith {
    _heli animatesource [_rampdooranim,(_heli animationsourcePhase _rampdooranim),true];
};
if ((_heli getHitPointDamage "hitdoor_ramp_b" < 1) && (_heli getHitPointDamage "hitramp" < 1)) then {_heli animatesource [_rampanim,1,1];};
waituntil {sleep 0.1; ((_heli animationsourcePhase _rampanim) == 1) || !(alive _heli) || ((_heli modelToWorld (_heli selectionPosition _rampendpoint))#2 <= 0.05) || ((_heli animationsourcephase 'altRadar' > 1) && ((_heli animationsourcePhase _rampanim) >= 0.5))};
_heli animatesource [_rampanim,(_heli animationsourcePhase _rampanim),true];

}else {

if (_heli getHitPointDamage "hitramp" < 1) then {_heli animatesource [_rampanim,0,1.2];};

waituntil {sleep 1; ((_heli animationsourcePhase _rampanim) == 0) || !(alive _heli)};
if !(alive _heli) exitwith {
    _heli animatesource [_rampanim,(_heli animationsourcePhase _rampanim),true];
};

if ((_heli getHitPointDamage "Hitdoor_ramp_L" < 1) && (_heli getHitPointDamage "Hitdoor_ramp_R" < 1) && (_heli getHitPointDamage "hitdoor_ramp_b" < 1)) then {_heli animatesource [_rampdooranim,0,1];};

};

thin fox
#

try:
[this, 1] spawn HWK_fnc_MI6_cargodoors

muted fulcrum
thin fox
muted fulcrum
#

didnt work :/

#

ill keep looking into it

#

the author of the mod did say something about it atleast

#

though these are the side doors of the helo

delicate tangle
#

Am I the only one still execing scripts via execVM? Should i update all my stuff to cfgFunctions?

thin fox
#

I use execVM to test stuff without needing to restart scenarios

#

but if your script is called only once in your scenario, don't need to worry about it

#

but if you want that script to return some value, maybe it's time to convert to a function

delicate tangle
#

Other than creating cfgfunctions, is there anything ele needed to convert sqf files to functions?

thin fox
#

or if you script is called multiple times

delicate tangle
#

What about loops? As I understand it, you cant use call with loops but you can ise spawn?

thin fox
#

functions are just variable names for the script

#

as I understand

#

and it gets compiled in the mission start

delicate tangle
#

Im really only interested because functions can preinit and scripts cant (from what I know)

thin fox
delicate tangle
#

Does compile produce an output?

thin fox
#

also there are CBA stuff

delicate tangle
#

Forgot about cba

thin fox
delicate tangle
#

Does it do anything to the actual sqf file? Thats more of what Im asking - i have a lot of sqf files organized into folders. Wanna know what, if anything, is needed to convert them to functions other than cfgfunctions

thin fox
thin fox
#

but if you "need", well it's up to you, do you exec those scripts a lot in your scenario? it's better to convert them into functions

delicate tangle
#

I basically just exec some cleanup loops and some scripts which exec when a group is spawned by a spawn ai module (minimum 15 second timer)

thin fox
#

the clean up, you just execute it once right? at mission start

#

don't need to worry about it

delicate tangle
#

Yes at mission start

formal grail
#

How do you work with actionKeys when modifiers are involved in a display event handler? Does anyone have a script/snippet for that?

#

(addUserActionEventHandler does not work for this case)

#
// if my keybinds are:
// networkStats: P
// networkPlayers: R Ctrl+P
// this will trigger even if networkPlayers is pressed because P is part of Ctrl+P
addUserActionEventHandler ["networkStats", "Activate", {
    0 spawn WL2_fnc_scoreboard;
}];

// functionally the same as above in my default keybinds case
_display displayAddEventHandler ["KeyDown", {
    params ["_display", "_key"];
    if (_key in actionKeys "networkStats") then {
        0 spawn WL2_fnc_scoreboard;
    };
}];

// this works for my default case, but not if someone rebinds networkStats to something with a modifier
_display displayAddEventHandler ["KeyDown", {
    params ["_display", "_key", "_shift", "_ctrl", "_alt"];
    if (_shift || _ctrl || _alt) exitWith {};
    if (_key in actionKeys "networkStats") then {
        0 spawn WL2_fnc_scoreboard;
    };
}];
delicate tangle
#

Can you preinit a function that takes input parameters? Or can you only preinit functions that dont take input?

tulip ridge
#

You can use params, but there won't be anything passed to it

delicate tangle
#

So it would still work with preinit = 1 when there are no arguments listed in the cfgFunctions call?

hallow mortar
#

Depends on what the function is set up to require

#

Some functions require no arguments. Some functions require arguments.

delicate tangle
#

What if the function takes a group or group leader for instance?

tulip ridge
#

There won't be a magic group passed to it

#

You can have the params default to groupNull and try to handle something that way

hallow mortar
#

If a function requires a specific argument, and you give it a wrong argument or no argument, it will behave incorrectly or cause a script error. That applies to any function in any context.

delicate tangle
#

Gotcha. That makes preinit pretty useless for me. Most of my stuff takes arguments

#

How do people get around unit init startup order? Ie the unit is calling a function thats not yet defined due to init order?

hallow mortar
#

CfgFunctions should be processed before any code is executed.

delicate tangle
#

Yes but I cant pass arguments there which will cause erro

tulip ridge
#

You can pass arguments from a unit's init

#

It'd just be [1, 2, 3] call ...

granite sky
#

preinit = 1 is just for executing that function in preinit. The function will be compiled regardless.

delicate tangle
#

So preinit execs the function? All functions are compiled pre unit init?

tulip ridge
#

Yes

delicate tangle
#

Gotcha, that makes more sense, thanks

thin fox
delicate tangle
thin fox
#

also don't forget about CBA, XEH is cool

hushed turtle
winter rose
#

yeah well this โ†‘ is the 2nd or 3rd best way after using Functions (please)

#

Functions all the way
they get compiled
they get final'ed
they are global
they love you
go for them

pallid palm
#

lol @ Lou: we love you to Lou ๐Ÿ™‚

hushed turtle
winter rose
hushed turtle
#

On topic of performance. Does having dozens of functions or variables defined hurt performance?

old owl
# hushed turtle On topic of performance. Does having dozens of functions or variables defined hu...

As far as I know when it comes to the functions library, no. All of those files just turn into compileFinal variables afaik and it doesn't make a difference for performance outside of initial compile time which is negligible.

Only cases I can think of with variables is in writing insane excess to the profileNamespace or broadcasting too many public variables clogging the JIP queue.

Someone can correct me if I am wrong on either of those though yap

pallid palm
#

i agree on the all

#

if i only knew what negligible means ๐Ÿ™‚

#

just kidding m8 ๐Ÿ™‚

#

lol

old owl
#

Haha I mean I was gonna say that's fair. Honestly not sure I've ever tried to benchmark or measure compile performance so honestly couldn't tell you what negligible means there

#

Could totally be waffling but as far my understanding goes I've never seen an issue and we've got thousands of files

pallid palm
#

negligible means: so small or unimportant as to be not worth considering

#

yeah i heard you have 1000's of files in your mission wow

#

the most i think i ever had was like 100 or so

#

but then i only make 10 player missions

old owl
#

The code base been around 10 years so very little of it is actually mine. It's very unorganized and there's a lot of really old code that makes me sigh from time to time but I have fun.

A lot of you guys do really cool stuff with AI and a lot of that is stuff I've never ever really even explored before since I don't commit much outside of that code base. I haven't even ever made my own workshop mod before. Just different stuff ๐Ÿ™‚

pallid palm
#

oh shit i counted all the files in one of my missions and its like 200 oh shit lol i never counted before ๐Ÿ™‚

#

cool we do whatever we can do with the help we get in discord: right m8 : ๐Ÿ™‚

#

and its great help

#

i'll tell you one thing my chopper command never would of came to be with out the help i got in Discord: from Dart and other great guys

#

i kept telling myself some day this will be Awsome: ๐Ÿ™‚

bold rivet
#

Does someone know what the diffrence between "Dammaged" and "Hit" EventHandler ist?

errant iron
#

Is it possible to force an AI's laser on even during daytime? I've got a function running in scheduled environment that periodically synchronizes focusOn isIRLaserOn _weapon and focusOn isFlashlightOn _weapon to the entire group with enableIRLasers and enableGunLights respectively.

However, while flashlights are forced on correctly (i.e. cursorObject isFlashlightOn currentWeapon cursorObject reports true), they don't do the same with lasers, despite being in combat mode and having called _group enableIRLasers true. I've confirmed with another player that he can see my green lasers in daytime normally, and that the recruits are using the same laser attachment (CBA attachment modes) as the player, and isIRLaserOn returns true on the player while false on AI.

#

Once the time turns dusk, the AI all turn on their lasers at the same time as desired, but since these are visible lasers, I want them to use it in daylight too.

errant iron
#

(HandleDamage is what i normally use)

bold rivet
#

I tried to use it on an AR-2 now, when I crashed it, it didnt trigger, so I wont use it anyway (I gave it hit and killed EH too, those triggerd)

#

But thanks for the help

errant iron