#arma3_scripting

1 messages ยท Page 195 of 1

pallid palm
#

or should i say the rail on the under water gun

proven charm
#

Maybe we get waterguns ๐Ÿ”ซ

pallid palm
#

lol @proven charm

#

i remember he said he was going to make it his top mission to fix the rail on the underwater gun

#

i wounder if its already fixed

proven charm
#

he could have been joking

pallid palm
#

no no he seemed for real

tulip ridge
#

They sent an emoji called "nopers", they were being sarcastic

pallid palm
#

oh no really oh nooo

#

darnit

agile pumice
#

Can someone spot a syntax error on this line?: (uiNameSpace getVariable ["playerHUD",displayNull]) closeDialog;

pallid palm
#

ah man

#

its not fixed

#

i forget who but someone said all the stuff is there, for the rail, its just not put in the game

#

i really don't want to change weapons under water, just for the flashLight to be on, and then change back, so i can fire underwate, but if i must i will

warped thicket
#

yes

#

syntax is closeDialog <idc>

pallid palm
#

i wish they would fix that, cuz i dont want to use any mods

#

NikkoJT said
There is a rail in the model, it's just not used in the vanilla game

agile pumice
#

thanks

#

should have checked the wiki but I assumed the code was correct when I acquired it, haha

restive leaf
hallow mortar
signal kite
#

wow, I just got shocked by seeing the default console ingame. I really got very used to the amazing ADT over countless hours.
Hope Leopard20 is well

pallid palm
#

ahhh man

#

well i guess i'll be changing weapons under water then

#

just for a flashlight lol

digital hollow
#

Try a head lamp mod

sly cape
#

How would one go about detecting objects in a 15ยฐ cone from a point going in a specific direction?

granite sky
#

Take the dot product of the cone direction against the relative position of the object.

rich frost
#

whats the magic witchcraft to make an AI helicopter land smoothly ๐Ÿ˜ญ

pallid palm
#

@rich frost helo1 LAND "LAND";

#

@digital hollow yeah umm i only use Vanilla m8

#

no mod is going in my game ever

#

i like a clean Arma 3 game woohoo

#

sep for maybe maps

rich frost
pallid palm
#

yes

#

LAND "LAND"; will land at the safest place it can find so you may want to put a helipad down some where

#

there are many chopper extract scripts out there and they are all realy good

hallow mortar
# rich frost is there a big differnce between land and landAt?

In the way the helo flies, not to my knowledge.
The difference (for helicopters, leaving aside the syntax for planes) is that landAt allows/will allow in 2.20 more precise control over the landing position and when the helo is allowed to depart again.

rich frost
#

i have a situation where ihave helicopters approach an airfield and taxi along the airstrip, lowering speed and altitude, set with flyinheight (also flyinheightASL) so they smoothly glide, down to like 10~15m atl. everything is smooth sailing until they get near the LZ's and they decide to pop up again to like 40m and only then execute the land cmd "land on rail" maneuver

hallow mortar
#

Yeah that's just kinda how it is tbh

tulip ridge
rich frost
pallid palm
#

try that around trees, he he

hallow mortar
#

You could do it by force, waiting until they get close and then doing position/velocity interpolation. Bit risky and probably not too graceful though.

rich frost
#

putting them on rail myself, ay? :kek:

#

is there a way to disable their "object collision avoidance"?

hallow mortar
#

It'd be handy if we had a relative version of unitCapture, so you could fly an example landing and have them use it every time. Or, well, it's a function so someone who understands vector maths could make one, I suppose.

rich frost
#

i played around with that stuff before. guess i have to undust that test mission file. bezzier convertion or what its called is useful for that.

#

i can mangle sqf to execute my will myself, but thanks ๐Ÿ™‚

pallid palm
#

ok

rich frost
#

was just hoping to find some forbidden heli landing knowledge here

pallid palm
#

if you look for other chopper scripts out there you will find your forbidden heli landing knowledge

granite sky
#

Antistasi has a combat landing script that looks pretty good, but the code is wack :P

#

I need to convert that one to eachFrame but first I need to dismantle the algorithm.

rich frost
#

i remember how that started out

novel basin
#

Hi
How can i, with script, simulate the SHIFT + left Mouse button (player's custom waypoint) ?

#

addWaypoint doesnt help

rich frost
novel basin
deft zealot
#

is netId of an object always [owner id] + ":" + [unique int] ?

gritty escarp
#

I'm having an issue where AI after spawning and getting their patrol waypoints, they always set a waypoint to [0,0,0], I believe the issue to be VCOM, and instead I am trying to fix the symptom, instead of the root of the issue, is there a way I can script a way to put all waypoints on [0,0,0] into an array and just delete them? I'm thinking of something similar to nearestobjects, but for AI waypoints

granite sky
#
{
  {
    if (waypointPosition _x isEqualTo [0,0,0]) then { deleteWaypoint _x };
  } forEachReversed waypoints _x;
} forEach allGroups;
flat sonnet
#

Guys how do I stop players from a certain side from accessing an object's inventory (or at least taking anything from it)

granite sky
#

I guess InventoryOpened EH, check the primary container, return true if it matches.

flat sonnet
#

thanks! I will check this out

grand oracle
#

Anyone able to aid me in a script to lessen damage taken by vehicles.
I'm using ace also, tried event handlers and it would reset the damage each time a new damage was created. Would prefer to avoid pulling and modifying a cpp for that

granite sky
#

So damage handlers normally pass the new damage value rather than the added damage.

#

You have to look up the previous damage value for that hitpoint with getHitPointDamage so that you can find how much new damage was added in that hit.

fair drum
#

yes, leo has taken it down

#

Some do. But for now, just know that they are off the workshop and don't reupload them. If you have one still local, you can still use it, just can't redistribute.

edgy dune
carmine sand
edgy dune
# carmine sand Via attribute or whats your exact plan?

its not actually something I do now. just that back in the day before I knew how to config I would change vehicle texture in init field. now pretty much I can just config like vehicle skins in right. so I was more so curious really

carmine sand
rich frost
#

how to force AI Aircrafts landing gear?

warm hedge
#

If you mean lower their gear, no. There is no reliable way other than let them land to a airstrip

faint burrow
rich frost
#

i should add for helicopters specifically

warm hedge
#

LandGear is actually broken. It never worked properly on my end

rich frost
faint burrow
warm hedge
#

IIRC it worked when the camera is close to the plane, but they refuse to do when the camera went away

rich frost
#

amazing

warm hedge
#

At this point actually, I want a command to force animate a animationSource

rich frost
warm hedge
flat sonnet
#

okay I'm a bit confused as to how I can restrict access to a container to one side

rich frost
warm hedge
#

Wipeout is a Ghost Hawk is b, both are not pilot but vehicle

rich frost
#

hm

warm hedge
flat sonnet
#

Thank you!

faint burrow
#

Yes.

thorn saffron
#

Is there a way to get explosions that happen? Basically an event handler that detects that an explosion has happened at all, not just damage from explosion.

finite sail
#

Hello all!
https://community.bistudio.com/wiki/getPlayerScores
says
This command does not work (returns empty array) if the unit's side has been changed (e.g [player] joinSilent createGroup east).

Do we know if starts to work again if the unit is returned to his original group?

finite sail
#

i used use a traffic cone as a sensor and hide it

finite sail
thorn saffron
#

I need to detect any and all explosions that can happen at any time at any place.

exotic gyro
#

There's a projectile created mission EH?

#

I tend to avoid using it because, uh,

A lot of projectiles get created

thorn saffron
#

Yeah, same I think I could check the projectile itself if it's explosive and track it after that, but I was hoping for something simpler.

exotic gyro
#

What's the general goal, anyway?

thorn saffron
#

Detect any and all explosion that can potentially happen on the map at any time for... reasons...
I want to log them.
Note that it can be something using CBA.

exotic gyro
#

Suspicious. I like it.

I'm not sure projectilecreated will work for mines and planted explosives, but that's close. Also have to decide how "explosive" a bullet should be before it's considered explosive to you (for instance, some bullets are like 0.2 explosive)

#

You can do allMines though

thorn saffron
#

yeah, but I need rockets, bombs, grenades, mines and pretty much all the explody things. Fired or spawned by scripts.

exotic gyro
#

Yeah.

So allMines at the start to check for 3den ones, then...

I guess check if projectile created works with mines and whatnot, since they're technically cfgammo

thorn saffron
#

Ok, got something working with this, I'm just worried about performance.

addMissionEventHandler ["ProjectileCreated", {
    params ["_projectile"];
    systemChat format ["Projectile created: %1", _projectile];
    _projectile addEventHandler ["Explode", {
        params ["_projectile", "_position", "_velocity"];
        systemChat format ["Explosion: %1 at %2", _projectile, _position];
    }];
}];
#

However it does work and catches all explosions.

#

Welp, it catches all explosions by weapons, but not objects exploding due to damage. That will require a separate function.
As for the projectiles I settle on this for now:

addMissionEventHandler ["ProjectileCreated", {
    params ["_projectile"];
    //we check if boolit is boomy
    if (getNumber(configFile >> "CfgAmmo" >> typeOf _projectile >> "explosive") > 0) then {
        // boolit is boomy so we need to attach an event handler to track where it explodes
        systemChat format ["Projectile created: %1", _projectile];
        _projectile addEventHandler ["Explode", {
            params ["_projectile", "_position", "_velocity"];

            // function for handling booms goes here
            systemChat format ["Explosion: %1 at %2", _projectile, _position];
        }];
    };
}];
thorn saffron
#

I'm looking through configs to figure out what tells the game if a vehicle is to explode on death. The HMG on tripod and the car has the "FuelExplosion" as explosion effect, but the HMG does not explode on death. They bot have "DestrDefault" as destruction type. What governs that I wonder.

granite sky
#

I think this came up in #arma3_config recently and the suspicion was that it was hardcoded inheritance-based.

finite sail
#

is there an alternative or workaround?

granite sky
#

What are you actually trying to get?

finite sail
#

if player is in a given seat

#

in prowler, it's command , which is turret 1

#

but remote player is reported as driver regardless of what seat he's in

granite sky
#

fullCrew should do it.

finite sail
#

yeah, looking at the now

#

is more reliabe

granite sky
#

You can specifically check against driver/gunner/commander if you only care about a specific seat.

#

There is also getCargoIndex but weirdly no command to just ask what seat role a unit is in.

finite sail
#

in prowler, im looking for commander

#

and in hunter, im also looking for commander, but thats actually a cargo seta

#

seat

#

ugh, commander _vec always returns nul in a prowler

#

regardless of if the seat is occupied or not

granite sky
#

huh

#

What does fullCrew say the seat is?

finite sail
#

fullcrew is accurate, both locally and remotely

#

will have to use that

#

ah no, it isnt

#

ffs

#

its returning a nonexistant player unit as prowler gunner

granite sky
#

It can't. Non-existent units don't exist :P

finite sail
#

i have alpha_1 and and alpha_2 in mission

#

on remote player, it's returning [[alpha_1, "gunner",-1,[0],false,alpha_4, etc etc

#

there is no alpha_4 and never has been

#

when done on alpha_1 machine (also server) it's accurate

granite sky
#

Assigned units are likely local but you don't care about them anyway?

#

You wanted to know what unit was occupying the seat, didn't you?

#

Assigned unit is separate.

finite sail
#

im running scripts on clilents to give addactions when in particular vehicle seats

granite sky
#

The unit in the seat is just the first parameter. "unit".

#

Not necessarily the same as the assigned unit.

finite sail
#

yes, its the assigned unit that returns nonexistent

granite sky
#

Why does that matter?

finite sail
#

its doesnt, does it

#

nope

granite sky
#

Also it is returning an object, so it must be an object that exists somewhere. You could go find it with getPosATL or similar.

finite sail
#

i was just worried the command was even returning non existent units, not really inspiring confidence of the reliability of the command

#

especiually when assignvehiclerole is brokne too

granite sky
#

assignedVehicleRole isn't broken, Arma just doesn't necessarily assign players to the seats they're in.

#

And a non-existent unit is objNull. If it returns anything else then the unit exists somewhere.

finite sail
#

huh yeah, alpha_4 has a position, its an AI

#

ive been writing code for these games since 2005. i think i spend more time battling the engine than i do OPFOR

granite sky
#

well yes

finite sail
#

ok, from what i can see, assignedvehiclerole for players is accurate if they are in cargo seats

fallen locust
#

not really

#

[owner id of creator of object] + ":" + [int++]

#

more like it

minor viper
#

Is there any way to make a trigger that opens a simple/steerable parachute on a player whenever they fall through it?

#

I've been combing back through this channel but all I can find is broken code because that's all anyone brings here lol

fair drum
minor viper
#

Ideally it would provide them with an "Open Parachute" option without them having to equip a new backpack or use a mod like BackpackOnChest. Sorry if I caused offence, I was just being flippant because I've been really struggling to find code which fits my purposes.

#

I'm currently trying


{[_x,(getPos _x) select 2] call BIS_fnc_halo;} forEach thisList;

which seems to work well but is throwing some kind of error

#

This, to be precise

#

Presumably because the BIS function includes a suspend which isn't allowed inside of the trigger

proven charm
#

use spawn instead of call

fair drum
#

also, note on that function:

minor viper
minor viper
fair drum
#
{
    private _unit = _x;

    private _pos = getPosASL _unit;
    private _parachute = createVehicle ["Steerable_Parachute_F", [0,0,0]];
    _parachute setPosASL _pos;
    _parachute setDir (getDir _unit);
    _unit moveInAny _parachute;
} forEach thisList;
#

but remember, you might have your trigger set up weird, say if you have it to detect a single person, the trigger will fire and only that person might be in the trigger area (thisList)

proven charm
fair drum
#

if you want an action version example:

player addAction [
    "Open Parachute",
    {
        params ["_target", "_caller", "_actionID", "_arguments"];

        private _pos = getPosASL _caller;
        private _parachute = createVehicle ["Steerable_Parachute_F", [0,0,0]];
        _parachute setPosASL _pos;
        _parachute setDir (getDir _caller);
        _caller moveInAny _parachute;
    },
    nil, 0, false, true, "",
    toString {
        isNull objectParent _this && {
            (getPos _this) # 2 >= 5
        }
    }, -1, false, "", ""
];
minor viper
#

wow you did it before I could even finish typing

#

wild

fair drum
winter rose
minor viper
#

Damn that's impressive that you had something prewritten for this occasion. I'm trying to set it up so that a team leader selects a location on the map, their squad gets teleported into a Xi'An which is flying towards the location selected, the ramp lowers, and each player is ejected and given an open parachute option.

Basically a gentrified HALO drop for your whole squad.

Think I know how to do most of it but I've been struggling with the parachutes and with setting up the Xi'An on a flight path. At least now half of my problems are solved lol.

fair drum
#

i have a LOT of stuff prewritten in various things. just have to adapt them to people's uses

#

but that is a VERY common question

#

for halo jumping

minor viper
#

Ah apologies for repeating it then. I did have a poke about but what I was trying just wasn't working. Fortunately for people like me there are people like you, or I would never be able to make half the awesome stuff I put together.

minor viper
#

Alas the inside of the Xi'An is not walkable so far as I can tell

digital hollow
#

ah, correct.

minor viper
# minor viper Damn that's impressive that you had something prewritten for this occasion. I'm ...

Okay so I feel like I'm getting pretty close with this script. But I can't figure out how to get the pilot to fly a predictable route over the drop zone instead of getting distracted and headhunting a random unit or flying off in some bizarre holding pattern. Is there a way to turn his brain off so he just spawns, flies over the DZ, and then gains altitude and flies off so I can delete him?

granite sky
#

force to careless behaviour or maybe disableAI "CHECKVISIBLE" may help.

thin fox
#

Careless behaviour + flyInHeightASL

rich frost
minor viper
#

I shall experiment and report back salute

solar chasm
#

Using RID to 'trigger' a shotgun trap.
Place a shotgun weapon/prop, rotate it to point towards the door, and attach it to the table.
The shotgun gets a checkbox from RID, which gives it an init box for scripting that is activated when the trap is triggered.
Use the RID mod to create a tripwire, and then connect it to the shotgun.

I think I should be using _this ForceWeaponFire [_this, "Single"] but I'm questioning the double _this, especially as the first variable is meant to refer to a unit - which is missing in this case! Is there a proper syntax, or perhaps a different command I can drop in that init box?

Was trying to check the Bohemia forums, but I keep getting the 'maintenance in progress' screen - would appreciate any assistance!

minor viper
#

Er is getting players to eject from a flying vehicle harder than it sounds? None of the commands I'm using are working...

minor viper
#

No it made the Xi'An land on the ground to let all the AI out lol

thin fox
minor viper
#

Just did nothing

thin fox
minor viper
#

let me try it

#

Yeah that works, apologies I didn't see that one.

thin fox
fair drum
#

also, using actions is better/more consistent when you execute it locally

minor viper
#

So everything works except after the pilot flies over the waypoint and all the infantry gets kicked out the back, he always pulls a u-turn and hovers randomly, ignoring any new doMove's or flyInHeightASL's I give him

#

not really sure what I need to do to just get him to fly in a straight line up into the clouds

granite sky
#

Are the infantry in the same squad as the crew?

minor viper
#

That's an interesting question

#

_xian = createVehicle ["O_T_VTOL_02_infantry_dynamicLoadout_F", _spawnXiAnPos, [], 0, "FLY"];
createVehicleCrew _xian;

{_x moveInCargo _xian;} forEach _infantry;

#

would this put them in the same group?

granite sky
#

Shouldn't do. createVehicleCrew creates a new group for the crew.

#

Oh, make sure you do leaveVehicle on the infantry group.

#

Otherwise they might have some brainworm about trying to get back into the vehicle.

#

LA/LE btw.

minor viper
#

{group _x leaveVehicle _xian;} forEach _infantry;

Like this?*

granite sky
#

No, leaveVehicle on the group.

#

Uh, if all the infantry are in the same group then you should only do it once.

minor viper
#

For performance presumably

#

makes sense

granite sky
#

Nah I just don't trust any Arma AI command to be spam-proof.

minor viper
#

Understood

#

Still does an unexplainable U turn I'm afraid

#

is there any way I can just force the aircraft to go forwards and up

#

I just want it out of sight of the playerbase before it gets deleted 20s later

granite sky
#

setVelocityTransformation, yes

#

Not the easiest command :P

minor viper
#

Yeah lol I just sighed when I pulled up the wiki

#

Anything cheap and dirty?

#

I'm just annoyed doMove isn't working

granite sky
#

setVelocity/setPosASL/etc spammed eachFrame does the same thing.

gaunt scaffold
#

Anyone know why a composition init might execute when copied as part of a larger composition by Zeus but not when placed in Eden prior to start?

manic kettle
#

Is it possible to stop terrain object damage? Specifically to trees?

warm hedge
#

allowDamage should do

manic kettle
#

Hmm, so allow damage false to all trees on the map? That should be ok to do?

warm hedge
#

I don't believe it would do any bad

thin fox
still forum
#

Game updates basically never break mods though, so why would it?

frozen seal
#

though considering Arma 4 is just a few years out I guess we should be good

#

I'll for sure backup my local copy of Advanced Developer Tools in multiple places cuz that sheesh is gold ๐Ÿ˜„

warm hedge
#

I would blame the Mod if that is a case

real tartan
#

is thereenableUAVConnectability alternative command that uses specific UAV as reference instead of player ?

minor viper
proven charm
#

do you give the plane a waypoint?

minor viper
#

I've tried every variation of waypoints and setting velocity etc... that my skillset allows

#

I just need it to fly in a straight line from south to north at about 200m/s over a specific location

proven charm
#

try these: ```
_wp setWaypointBehaviour "CARELESS";
_wp setWaypointCombatMode "BLUE";

minor viper
#

The only issue I'm ever having is that after all the infantry jump out, the pilot will randomly do a U turn and hover in midair about 50% of the time. I wonder if there is just some AI behaviour that I can disable?

#

It changes direction between the waypoints and then just ignores any other code that I write

proven charm
#

well you can use waypoints all the way to give the plane position where to go

little raptor
#

like this

hushed turtle
minor viper
#

What does this do? I'm trying to reverse engineer it but I don't really understand what is going on?

still forum
#

We are breaking one mod in 2.20
But that is because the mod's config was totally and utterly broken and wrong

minor viper
#

I don't know whether the pilot is spotting units on the ground or getting upset about the friendlies disembarking

proven charm
minor viper
#
_xian = createVehicle ["O_T_VTOL_02_infantry_dynamicLoadout_F", _spawnXiAnPos, [], 0, "FLY"];
createVehicleCrew _xian;
_xian deleteVehicleCrew gunner _xian;
_xian setPosASL _spawnXiAnPos;
_xian setDir 0;
_xian setVelocity [0,200,0];


_XiAnWaypoint = group driver _xian addWaypoint [_despawnXiAnPos, -0];
_XiAnWaypoint setWaypointBehaviour "CARELESS";
_XiAnWaypoint setWaypointCombatMode "BLUE";

driver _xian disableAI "CHECKVISIBLE";
driver _xian setBehaviour "CARELESS";
driver _xian disableAI "AUTOCOMBAT";
//driver _xian disableAI "PATH";
driver _xian disableAI "TARGET";
driver _xian disableAI "CHECKVISIBLE";

_xian flyInHeightASL [1600,1600,1600];

#

It just completely ignores the waypoint and starts doing donuts in the sky

#

flies in an arrow straight perfect line for 30 seconds, then usually about 5 seconds after the infantry bail it just starts ignoring all instructions

proven charm
#

you dont need all the disableAI code

#

infact it could create more problems

minor viper
proven charm
#

weird i had this same problem but "BLUE" etc helped

#

it made the plane fly straight

still forum
#

no

cosmic lichen
#

Ah no. That was too recent

still forum
#

Well I guess we are not breaking the mod itself.
We are just allowing letting the mod break everything else (like it intended to do from the beginning)

ornate whale
#

Hi guys, do you know of any simple tool that would allow me to create simple documentation for my SQF functions by extracting and formating comment headers, possibly identified by a XML tag or any other string? Thanks

minor viper
#

It just doesn't care

proven charm
#

๐Ÿซค plane cant move outside the map?

thin fox
# minor viper It just doesn't care

is it in careless mode? otherwise it just ignore it... but I saw that you're already did that.
Can you check with zeus if the unit/Group of the jet is really in careless mode?
Do you use AI mods?

minor viper
#

It's true I had LAMBS on but moving the waypoint inside of the coloured area of the map fixed the issue

minor viper
#

Arma is the worst

little raptor
thin fox
# minor viper This was the problem

weird, I've never had any issues with this, I can set waypoints outside of the map and it works. I'm working on a CAS menu and some times I place the waypoint for the jet outside of it.

minor viper
#

Just outside the map seems to work

#

significantly outside the map seems not to

thin fox
minor viper
#

perhaps it wasn't the issue directly but moving all waypoints inside the map area and adding a second waypoint after the first seems to have fixed it

minor viper
thin fox
#

setVelocityTransformation is hard to understand at first sight, but try to read it line by line, see where the local variables come from and what changes based on the parameters required by the command

minor viper
#

Nvm not fixed

#

still just hovers randomly

#

completely stationary

proven charm
#

waypoint is so close to map edge though

thin fox
minor viper
#

player opens map, clicks on map, xian is spawned 6km directly south of where they clicked on the map, xian flies directly north over the point where the player clicked, ejects all infantry over this point, flies off the map and despawns

thin fox
minor viper
#

The problem is that about 30% of the time just after the infantry get ejected the xian does a U-turn and hovers near where they were ejected

thin fox
minor viper
#
_xian = createVehicle ["O_T_VTOL_02_infantry_dynamicLoadout_F", _spawnXiAnPos, [], 0, "FLY"];
minor viper
thin fox
#

first thing, the aircraft can go outside of the map

minor viper
#

Even if I manually give them new waypoints in zeus the pilots just hover and ignore their commands

minor viper
thin fox
# thin fox running your code

@minor viper
The problem is that about 30% of the time just after the infantry get ejected the xian does a U-turn and hovers near where they were ejected
so why do you spawn another waypoint near the ejected place? sometimes the aircraft can't reach the required distance to despawn (those waitUntil distance of yours)

#

also, if you working on with waypoint, you don't need those waituntil to delete the aircraft, you can just use setWaypointStatements

minor viper
#

_despawnXiAnPos = [_posX, _posY + 15000, _posZ + 1600];

_moveXiAnWaypoint = group driver _xian addWaypoint [_despawnXiAnPos, -0];
_moveXiAnWaypoint setWaypointBehaviour "CARELESS";
_moveXiAnWaypoint setWaypointCombatMode "BLUE";
_moveXiAnWaypoint setWaypointType "MOVE";

Originally it looked like this, with one waypoint 15km north. I only added the 2nd waypoint on the suggestion it was due to waypoints being outside of the map

thin fox
thin fox
#

and use setWaypointStatements

minor viper
#

Okay but this bug was still happening even when there was just one waypoint. I will delete the 2nd waypoint now and test.

thin fox
minor viper
thin fox
minor viper
#

something is breaking the AI and stopping it from following waypoints

#

is it the moveOut code?

minor viper
#
_pos = _this select 0; //_pos = position selected for airdrop
_vipers = [viperLeader, viperDemo, viperMedic, viperMarksman, viperRecon];

openMap [false, false];

_posX = _pos select 0;
_posY = _pos select 1;
_posZ = _pos select 2;

_movePos = [_posX, _posY, _posZ + 1000];
_spawnXiAnPos = [_posX, _posY - 6000, _posZ + 1600]; //6km south of drop
_despawnXiAnPos = [_posX, _posY + 15000, _posZ + 1600]; //15km north of drop

_xian = createVehicle ["O_T_VTOL_02_infantry_dynamicLoadout_F", _spawnXiAnPos, [], 0, "FLY"];
createVehicleCrew _xian;
_xian deleteVehicleCrew gunner _xian;
_xian setPosASL _spawnXiAnPos;
_xian setDir 0;
_xian setVelocity [0,200,0];
_xian flyInHeightASL [1600,1600,1600];
//_xian doMove _movePos;

_moveXiAnWaypoint = group driver _xian addWaypoint [_despawnXiAnPos, -0];
_moveXiAnWaypoint setWaypointBehaviour "CARELESS";
_moveXiAnWaypoint setWaypointCombatMode "BLUE";
_moveXiAnWaypoint setWaypointType "MOVE";
_moveXiAnWaypoint setWaypointStatements ["true", "{ _xian deleteVehicleCrew _x } forEach crew _xian;
deleteVehicle _xian;"];

{_x moveInCargo _xian;} forEach _vipers; //Teleports all OPFOR into XiAn passenger slots

waitUntil {_xian distance2D _pos < 1250};

_xian animateDoor ["Door_1_source", 1]; //Opens XiAn Ramp

waitUntil {_xian distance2D _pos < 150};

group viperLeader leaveVehicle _xian;

#
{
    moveOut _x; //ejects passenger
    _vel = velocity _x;

    _vx = _vel select 0;
    _vy = _vel select 1;
    _vz = _vel select 2;

    _vel = [_vx/8,_vy/8,_vz]; //reduces velocity of paratrooper

    _x setvelocity _vel;

    _x addAction //adds parachute
    [ 
        "Open Parachute", 
        { 
            params ["_target", "_caller", "_actionID", "_arguments"]; 
            private _pos = getPosASL _caller; 
            private _parachute = createVehicle ["Steerable_Parachute_F", [0,0,0]]; 
            _parachute setPosASL _pos; 
            _parachute setDir (getDir _caller); 
            _caller moveInAny _parachute; 
        }, 
        nil, 
        0, 
        true, 
        true, 
        "", 
        toString 
        { 
            isNull objectParent _this && 
            { 
                (getPos _this) # 2 >= 5 
            } 
        }, 
        -1, 
        false, 
        "", 
        "" 
    ];
    uisleep 0.1;
} forEach _vipers;

uisleep 1.5;

_xian animateDoor ["Door_1_source", 0]; //closes ramp door

_xian flyInHeightASL [2000,2000,2000];
#

Somewhere in here, something is disabling the AI and preventing it from following waypoints

#

It only happens about 30-50% of the time, and it only happens after the infantry are ejected

thin fox
#

only using CBA + zeus enhanced + ADT

minor viper
#

can we go to creativity lounge and I will show you?

thin fox
proven charm
#

enemies on map also effect the AI planes behaviour

minor viper
thin fox
proven charm
#

right

#

and you also need "BLUE", CombatMode

minor viper
proven charm
#

yep..

thin fox
#

it's working fine with enemies near the position

proven charm
#

are they near enough ๐Ÿค”

thin fox
proven charm
#

yea, try putting tank on the planes path

thin fox
#

okay

#

and even got deleted in the last waypoint

#

working nice

proven charm
#

ok then im once again out of ideas :/

thin fox
#

@minor viper

_moveXiAnWaypoint setWaypointStatements ["true", "_xian = vehicle this; { _xian deleteVehicleCrew _x } forEach crew _xian;
deleteVehicle _xian;"];
minor viper
#

Testing without LAMBS now

thin fox
minor viper
thin fox
#

Advanced Sling Loading <- at least in Liberation this mod breaks up AI

#

gonna test your code with lambs

#

with lambs_danger: okay

minor viper
thin fox
#

with a pre-placed position

minor viper
#

Still bugs

thin fox
#

so, the aircraft makes an U-turn after dropping out the troops?

#

try a new scenario

#

and try without ANY mods

#

or at least with zeus enhaced

minor viper
#

but not all the time

#

only 30% of the time it bugs

thin fox
minor viper
#

I mean it's a whole gamemode I've been working on for weeks

#

but nothing should interfere with the script

thin fox
minor viper
#

there are infantry on the ground and stuff which I thought were distracting it but it's not that

minor viper
thin fox
#

only with the required troops and pre-placed position

minor viper
#

Empty scenario with full modpack loaded it doesn't seem to bug, so the AI must be getting distracted by something else in the scenario?

thin fox
minor viper
#

How do I check that

thin fox
#

double click on the group of the aircraft and check what behaviour is selected

minor viper
#

Careless yeah

thin fox
#

so it's something else then, in your scenario

#

nothing to do with mods or arma itself

gaunt scaffold
#

Can anyone tell why this script isn't working? It is supposed to help with mission design by showing a group's varname as a callsign in Zeus during scenario tests.

this setGroupIdGlobal [str(this getVariable "varName")]; 
hint str this;
{ _x addCuratorEditableObjects [units this, true]; } forEach allCurators;

Edit: The solution turns out to be creating a trigger and putting the below code into it. getGroupIdGlobal gets overwritten if it is executed during init, so you need to create a trigger and set it to 'any player not present 1 second'

hint "Processing";

{ 
    _x setGroupIdGlobal [str (units _x select 0)]; 
} forEach allGroups;

gaunt scaffold
# thin fox what is not working

Would it be too flippant to say 'anything'? XD

The tooltip says "R " and the Zeus sees the callsign as Delta 3-6 currently. I've done some debugging, but there are a few things still vexing me.

setGroupIdGlobal["Test"]
hint str this
gets me 'This' but still shows the group as Delta 3-6 in Zeus.

I'm not sure if adding an object to Zeus again actually updates the callsign, or if I have to remove it before re-adding it. I'm also not sure I'm calling the varname correctly, because it seems to be interpretting str(this getVariable "varName") as a blank string.

#

So I've currently got two lines of code, one operation, and three errors. Sadly not a record.

thin fox
gaunt scaffold
thin fox
gaunt scaffold
#

Indeed

thin fox
thin fox
gaunt scaffold
#

Editor

thin fox
thin fox
gaunt scaffold
# thin fox where did you get this "varName" idea?

My friends are used to me giving faction templates with pre-filled callsigns to use as tooltips, but the export function I used to use is broken, so I'm looking for other ways to help them tell which unit is which.

frozen seal
# little raptor I already reuploaded it

Thank you so much! Whatever happened, I hope everything is going well for you ๐Ÿ™
I can not overstate how much this mod helped me with developing mods and advancing my arma knowledge!

minor viper
#

as long as there is at least 1 player it works fine

thin fox
minor viper
#

in the back of the Xi'an

thin fox
#

nope

#

it works fine with AI

#

it's something else

minor viper
#

If you zeus control the viperLeader, start the airdrop, then release control it bugs every time for me

thin fox
#

did you test this without any mods?

gaunt scaffold
thin fox
# gaunt scaffold So this is where I'm trying to execute it, and where it doesn't seem to be worki...

that getVariable will always return nothing, because "varName" doesn't exists if don't set it up first (setVariable). And if so, you need to remember that the game has a Initialisation order (https://community.bistudio.com/wiki/Initialisation_Order), object's init execute before any scripts, except functions with preinit, also, why are you doing in this way? sorry, I still not sure what are you trying to achieve here

gaunt scaffold
#

But str this returns the callsign, so how do I check the variable name of the object? I thought it was varName.

thin fox
hallow mortar
#

str this will use the Editor-set variable name if it has one. If it doesn't, the entity doesn't actually have a human-readable representation, and it will be represented by its group ID instead.

thin fox
gaunt scaffold
# thin fox why do you want to check the var name? for what?

I made a more detailed note about it in the Editor channel yesterday, but I am going through my custom faction compositions and setting the default varname for each group to a suggested callsign. I chose that because it appears in the Eden editor when they are initially dropped in, and my friends are used to my using the callsigns as tooltips.

So when they place the groups in the editor, they're going to look to the callsign expecting something like 'FactionnameUnitPurposeNote'. Unfortunately I'm coming back to a version where it doesn't appear to be possible to copy units without resetting their callsigns, so they're going to expect [Tooltip] and get [Lima 3-2] instead, and I would prefer they see [Lima 3-2(Tooltip)].

Typical behavior is to copy units in, test the scenario, and then write scripts for them, so I want the default script to preserve that tooltip until someone replaces it.

hallow mortar
gaunt scaffold
thin fox
hallow mortar
#

Might be different for groups vs normal entities

gaunt scaffold
#

It sounds like I might just be able to use str(this)?

hallow mortar
gaunt scaffold
#

It seems like Zeus doesn't use the actual callsign of a unit, but assigns one, so the real question is probably 'How do I set the callsign that curators see from a script?'

thin fox
gaunt scaffold
#

It's super weird.

You can see it here. I've manually set a callsign, 'Yet Another Callsign', which the script is supposed to override and change to 'Thisisstupidbutitworks', but instead it ends up called 'Echo 1-5', but Zeus shows it as 'Delta 3-4'.

So there's at least four callsigns here, and the one I want, 'Thisisstupidbutitworks' is the only one that the game seems to ignore completely.

hallow mortar
gaunt scaffold
thin fox
gaunt scaffold
#

If the script were working, both the top left and top right of the in-game screenshot should say 'Thisisstuipidbutitworks'.

thin fox
#

and also you have many alternative ways

#

where is this function or script that are you talking about?

hallow mortar
gaunt scaffold
# thin fox I'm sorry, but i'm still trying to understand why you want to get the var name i...

I'm trying this because I've got a couple people who are going to use these units I'm making, and are going to look at the Callsign in Eden expecting information, and I want the same information to carry over to Zeus. Variable name just happens to be displayed in the right place in Eden, and I expect they'll prefer to see the message and then change the variablename if they need to than to not see the message.

gaunt scaffold
hallow mortar
#

I'm testing in local Editor test and all callsigns are being set as I would expect them to (I can see the Editor-set callsign, and if I change it with setGroupIDGlobal I can see the new version)

thin fox
gaunt scaffold
hallow mortar
#

Group init field

gaunt scaffold
# hallow mortar Group init field

That's great. So if you put it in the group init, set the variable name of the group to ITWORKS, and then press 'Enter' twice to test the scenario, you can go into Zeus and it shows the Callsign as ITWORKS?

Can you paste the code you used? Do I maybe have my Zeus misconfigured? I'm using the GameMaster module and syncing it to the player.

thin fox
#

this should be simple: this setGroupIDGlobal ["newName"]. You can explain to me 1000x times, I still don't understand why you want to use var name, I'm dumb meowsweats

gaunt scaffold
thin fox
#

group init field

hallow mortar
# gaunt scaffold That's great. So if you put it in the group init, set the variable name of the g...

I can see the Editor-set callsign in Zeus, and if I change it to something different using setGroupIDGlobal in the group's init field, I can see that new version. I do not see any autogenerated callsigns.
I cannot use this setGroupIDGlobal [str this] because it doesn't work like that. Object and unit entities return their Editor-set variable name if you do str this on them, but group entities do not; they return their group ID.

hallow mortar
blissful willow
#

sup! I'm trying to do local mod for more brighter nights but everytime I try I got this "'bin\config.bin/CfgWorlds/Altis/Lighting/sunSunset' is not a value'" error what should I do ?

blissful willow
#

oh okay thanks

snow viper
#

hey guys when i use either this or getArray function to get an array out of the configFile, the bools and arrays inside those always become strings

#

is there anything i can do about that?

faint burrow
#

Example?

snow viper
#

oh i found the arrays being returned as string was my syntax error, they were moved from a sqf and still were [] in stead of {}

#

but the issue with bools persists, here is an example

#

if you have in configFile class MyClass { parameters[]= {0.5, true}; }; then getArray (configFile >> "MyClass" >> "parameters") returns [0.5, "true"]

faint burrow
#

Is this correct class? AFAIK it must have properties.

snow viper
#

the same happens when using BIS_fnc_getCfgData

#

sorry yeah made a mistake in my example, its corrected

#

its been a long day of digging at this ๐Ÿฅฒ

#

decided to just use ints in stead blobdoggoshruggoogly

faint burrow
hallow mortar
#

Config doesn't actually support bools. If you type true in your config the parser just assumes it's a string.

snow viper
#

thanks for the help guys

faint burrow
#

You can try this:

parseSimpleArray (str (getArray (configFile >> "MyClass" >> "parameters")));
snow viper
#

im trying to take as few steps as possible in the code, so just opting for replacing the true and false in my data with 1 and 0, its no big deal to change it

faint burrow
#

Or you can store arrays as strings and then

parseSimpleArray (getText (configFile >> "MyClass" >> "parameters"));
lime rapids
#

is there the ability to animate a non simulated object?, im sure its been asked a million times i dont care for the actual animation, i just need the end appearance of an animation

molten yacht
#

gun_0 addMagazinesTurret ["100Rnd_127x99_mag_Tracer_Yellow",[0],10];

#

what do you MEAN

faint burrow
#

What version of the game are you using?

molten yacht
#

Latest profiling branch

lime rapids
molten yacht
#

no, it's an FIA m2 machine gun (low)

lime rapids
#

additionally check a lower number on last parameter (see warning)

faint burrow
hallow mortar
#

Command is dev branch only until 2.20

molten yacht
#

eourgh

#

okay, I'll have to use a different command. thanks

faint burrow
#
for "_n" from 1 to 10 do {
    gun_0 addMagazineTurret ["100Rnd_127x99_mag_Tracer_Yellow", [0]];
};
ornate whale
#

Hi guys, do you know of any A3 addon template, that I could use as a starting point for building my addon and for learning about best practices for structuring folders and naming files? Thanks.

gaunt scaffold
# gaunt scaffold Can anyone tell why this script isn't working? It is supposed to help with missi...

Thank you to @warm hedge and @modern plank for being actually helpful as I attempted to do this, and also to the others who said things, and I have officially done the simplest possible thing one could want to do after only 24 hours banging my head against it.

hint str (units this select 0); <- Returns the variable name of the the first object in a group. This allows you to get a variable name from Eden into a group for use in scripts.

This is almost a solution to the people who have had issues with the Set Callsign module as well, and I will update it when I eventually get there.

fair drum
pallid palm
#

hello does anybody know the script command to switch fire modes, or can we even switch fire mode by script command

fair drum
#

also theres:
unit action ["SwitchWeapon", targetUnit, targetUnit, muzzle index]

pallid palm
#

@fair drum thx man Awsome

#

ummm i don't see any switch fire mode in there @fair drum ummm em i missing somthing

hallow mortar
pallid palm
#

ahhh ok i see thx man: thx NikkoJT and Hypoxic, you guys Are Awsome

pallid palm
#

thx guys works perfectly woohoo Arma 3

haughty linden
#

can someone please helpme, I cannot load savegame in single player missions.

nimble hill
#

Hey any chance of disabling friendly fire for grenades(Its a long shot i know), asking for a friend btw.

fair drum
haughty linden
lyric gulch
#

So for some reason my dedicated server just seems to somewhat ignore my difficulty settings am I doing smth wrong. It says custom difficulty when I press escaoe and look at the mission in the bottom left but my settings are not 1 to 1 what I put.

To test im placing a guy down in Zeus and checking his skill level

This is the misssion cycle in my Server.cfg
// MISSIONS CYCLE

class Missions
{
class Overthrow
{
template="OverthrowMpAltis.altis";
difficulty="Custom";
};
class Training
{
template="RB_Training1.altis";
difficulty="Custom";
};
};

This is alll text in my .Arma3Profile

class DifficultyPresets
{
class CustomDifficulty
{
class Options
{
groupIndicators=0;
friendlyTags=0;
enemyTags=0;
detectedMines=0;
commands=0;
waypoints=0;
weaponInfo=1;
stanceIndicator=1;
reducedDamage=0;
staminaBar=0;
weaponCrosshair=0;
visionAid=0;
thirdPersonView=0;
cameraShake=1;
scoreTable=1;
deathMessages=0;
vonID=1;
mapContentFriendly=0;
mapContentEnemy=0;
mapContentMines=0;
autoReport=0;
multipleSaves=0;
tacticalPing=0;
};
aiLevelPreset="Custom";
};
class CustomAILevel
{
skillAI=1;
precisionAI=0.69999999;
};
};
activeKeys[]=
{
"BIS_DROace.Zargabad_done"
};

hallow mortar
#

Server config AI skill is a multiplier on the mission-level skill, not a direct setting/override. (I think it's actually more complicated than a simple multiplier but you get the idea)

lyric gulch
#

so I would have to change it through the mission?

#

there is no way to overide it?

hallow mortar
hallow mortar
#

Yes, they can change the server config skill, but it's still not an absolute override. The server config skill is combined with the AI unit's individual skill, which is set on the mission level, to produce its final effective skill.

lyric gulch
#

crazy

lyric gulch
hallow mortar
#

Any script that runs during the mission can adjust the mission-level skill settings. You could use a mod for it if you want. For example, your mod could contain a postInit function (runs when a mission launches) that changes the skill for all existing AI, then adds an entityCreated mission event handler to catch units that are created later.
A mod can also change CfgAISkill as described on that page.
All the different ways of setting skill are combined together. If you want total control, you'll need to change all of them. There is no one place that fully and exactly overwrites the final number - everything works together to produce the final total through maths.

lyric gulch
hallow mortar
#

I mean, presumably, but it's pretty opaque. We don't have direct access to see how the engine crunches the numbers. That page contains about the best information on it you're going to get, unless a dev shows up to give more exact details.
I think there might have been some slightly (slightly) better insights shared here over time, but I am not getting into a fight with Discord search to hunt them down.

lyric gulch
hallow mortar
#

(If a dev does show up to give more exact details, ask them to add the information to the wiki page :U)

hallow mortar
# lyric gulch why was it made that way ๐Ÿ˜ญ

Partly because the game's ancient and many of its systems were built on top of each other over many years.
Partly because having multi-level control is good, actually. The mission can decide how its units are skilled relative to each other - elites vs grunts, etc. Then the server owner (who may be a different person) can decide a more general range within which those relative values exist. This allows the mission to have its different flavours, while still allowing the server owner to calibrate the difficulty they want for their community.

lyric gulch
#

can you give me an example of how the command would go to set all units to 1

hallow mortar
#

The documentation is very much a work-in-progress. For a long time there wasn't really a lot of documentation direct from BI, on anything, and the community had to reverse-engineer it. Now BI does do direct documentation, but most of the people who originally built the game are no longer working on it, so now BI is also having to reverse-engineer it. And even for BI, the AI code is a horrifying nightmare that no one wants to touch.

open marsh
#

How in ARMA 3 can i check if something is inside a building or outside

#

I want to avoid placing things outside of a house

hallow mortar
# lyric gulch can you give me an example of how the command would go to set all units to 1

This is a general example and there are other ways you could approach this for different situations and results.

{
  private _unit = _x;
  {
    _unit setSkill [_x, 1];
  } forEach ["aimingAccuracy", "aimingShake", "aimingSpeed", "spotDistance", "courage", "commanding", "spotTime", "reloadSpeed", "general"];
} forEach units west;```
Remember, this will still be affected by the global config settings.
open marsh
#

im using that but it says 0 when my char is inside a building

lyric gulch
open marsh
#

its weird, sometimes says 0 and sometimes it gives value, do i nee dto create a test unit and test a position with it

hallow mortar
lyric gulch
#

I can have my friend who is more experienced at coding do it and then explain it to me verbally

#

that would probably be easier

hallow mortar
#

You could put this in the debug console and global exec, in which case it would affect all currently-existing units on BLUFOR - but not others created later.
You could put it in init.sqf or in a postInit function, in which case it will affect all BLUFOR units existing at the start of the mission.

lyric gulch
#

for some reason the global exec isnt even there for me rn

#

im logged in as admin

hallow mortar
#

๐Ÿคท
That's going to be down to your game/mods/server stuff, not really a scripting issue.

open marsh
#
// Debug script to test interior position validation at player position
private _debugInteriorValidation = {
    // Get player's exact position and nearest building
    private _playerPos = getPosATL player;
    private _nearestBuilding = nearestObject [player, "House"];
    
    systemChat format ["DEBUG: Testing position %1 in building %2", _playerPos, typeOf _nearestBuilding];
    
    // USE insideBuilding - much simpler and more accurate!
    private _insideValue = insideBuilding player;
    
    systemChat format ["insideBuilding value: %1", _insideValue];
    
    if (_insideValue == 1) then {
        systemChat "โœ…โœ…โœ… FULLY INSIDE BUILDING โœ…โœ…โœ…";
    } else {
        if (_insideValue > 0.5) then {
            systemChat "โš ๏ธ PARTIALLY INSIDE (maybe doorway/window area)";
        } else {
            if (_insideValue > 0) then {
                systemChat "โŒ BARELY INSIDE (likely porch/balcony/covered area)";
            } else {
                systemChat "โŒโŒโŒ COMPLETELY OUTSIDE โŒโŒโŒ";
            };
        };
    };
    

};

// Run the debug check
[] call _debugInteriorValidation;

#

how it says completely outside, 0 ๐Ÿ˜ฆ

faint burrow
#

Try the command I suggested.

open marsh
#

is it the else condition thats wrong

hallow mortar
#

insideBuilding depends strongly on how the building is configured, because it reads information from the surface you're standing on. If the building is set up wrong (not uncommon) then that's it.

open marsh
#

yes i did

    lineIntersectsSurfaces [
        getPosWorld _this,
        getPosWorld _this vectorAdd [0, 0, 50],
        _this, objNull, true, 1, "GEOM", "NONE"
    ] select 0 params ["","","","_house"];
    if (_house isKindOf "House") exitWith { true };
    false
};
onEachFrame { hintSilent str (player call KK_fnc_inHouse) };```

but it considers this to be inside a house
#

and if i walk out of it, it says im outside

#

what minimal code can i add that would detect this as outside

hallow mortar
# open marsh yes i did ```KK_fnc_inHouse = { lineIntersectsSurfaces [ getPosWorl...

This code works by drawing a line straight down from a position 50 metres above your head, and if it hits an object that's roughly houselike, it considers you to be in a house. It looks like there's an awning above your head, which is probably configured as a house-type object or is part of the house, and that's what it's hitting.
You could reduce the distance if you want it to be a bit more specific. You could also add more line checks running horizontally, to see if you're surrounded by walls.
It does get very complex though, because e.g. being in an alley with something above you could seem to be "in a house".

open marsh
#

yah and thats the isuse..

#

issue...

hallow mortar
#

This is a difficult problem to solve with 100% reliability, just because the definition of what is "in a house" isn't something that really exists as a measurable thing within the game. House objects aren't set up with invisible volumes denoting indoor areas that you could check against. You can check various things that usually correlate with being in a house, but ultimately it's just an educated guess.

open marsh
#

That really sucks, one would think it'd be a fairly rudimentary thing to have

hallow mortar
#

Nice to have yes, rudimentary no.
Most of the game doesn't need it. Players will largely do whatever regardless, and AI doesn't think in these terms. If a system did exist for defining indoor areas, it'd mean a lot of extra work for the people making the house objects, for information that's not actually used that often.

open marsh
#

Basic building block command that'd be useful for many users

#

Hmm i'd think you'd at some point wanna check if something is inside or not

warm hedge
#

Maybe you can try something with soundControllers

open marsh
#

If you want to let's say avoid placing things that are out in the open for example

hallow mortar
warm hedge
#

Hm

open marsh
#

i think i can just skip this kind of building

hallow mortar
faint burrow
hallow mortar
hallow mortar
faint burrow
#

Maybe, or maybe the command returns the intersection with the floor, which I encountered.

hushed turtle
#

lineIntersectsSurfaces seems to be working well most of the time. Other times it will consider you inside, just because you're stading bellow whatever roof(no walls) and sometimes it will consider you outside while you're inside building with destroyed roof. Seems like there is no easy way to this.

#

I had idea to check if position is above the terrain and close enough to a object, which returns at least one position by buildingPos -1, but there are objects with no roof nor walls of any kind, but have building positions.

faint burrow
fleet sand
#

It would be nice to have insead of line intersect surfaces to have like a sphere cast

hallow mortar
#

Sphere casting? I believe that's called bowling

winter rose
#

or throwing a fireball but yeah

hushed turtle
#

I think using lineIntersectsSurfaces horizontally at 4 different directions could lead to more accurate results, but also more performance hungry. Consider position inside if at least 2 opposite lines intersects same object. Of course it needs to be positions outside of ceiling, wall or any part of the object itself

still forum
#

but also more performance hungry.
There is multithreaded lineIntersects in 2.20, you can run all 4 in parallel at once

fleet sand
#

For example to achive this with line cast is possible but you need multiple lines to go in diffrent direction but if you have a sphere cast you dont need multiple casts one is enough

hallow mortar
drifting badge
#

Hey guys, hope everyone is doing alright. I ran into an issue with a script and hope someone might know what I am doing wrong.

I got a trigger (repeatable) that is activated when any Blufor/West unit enters it. Upon activation I am trying to get a list of all the enemy units within the trigger, which I understand can be achieved with "list".

But I must be doing something wrong, as the following does not seem to work as intended:

"Trigger_02" is the name of the trigger and "Squad_02" is the name of the squad.

_enemy02 = (list Trigger_02 select 0);
{ _x doTarget _enemy2 } forEach units Squad_02;```

neither did 

```sqf
private _pos02 = [getpos (list Trigger_02 select 0)];
{ _x dowatch _pos2 } forEach units Squad_02;```

What I am trying to achieve is that when an enemy unit enters the trigger the linked squad should:
 1) turn towards the enemy (or one of the enemy units present, can be random)
 2) move towards the enemy unil they are like 80 m from them
 3) stop their movement & adjust their heading if needed
 4) aim at the enemy
 5) fire at the enemy
 6) rinse and repeat

I know the AI can do some of those things "out of the box", but I need them to move in a specific way, in a specific custom formation and do not want them to start to run all over the place (so most of the AI behaviour has been turned off).
hushed turtle
#

You could add move waypoint 80 meteres before _enemy02 to Squad_02

#

And disable AI autocombat to keep them in aware behaviour, so they stay in formation during combat

drifting badge
#

Thanks for your input @hushed turtle , but I have the feeling that the "list" thing does not work. I tried to check with a

hint (name _enemy2);```

 to see if it does provide the name of a unit entering/being inside the trigger, but  I get nothing (even though the trigger itself fires just fine -> tested it with a sound effect that does play as expected).
hushed turtle
#

Is west the enemy in this case and is trigger set to activate when west is present?

drifting badge
#

yeah, like I said the trigger fires fine and repeats (tested with attaching a sound effect to the trigger), but the "HINT" does not provide a name (so no hint is displayed -> makes me think this part must be wrong somehow) or anything and the AI squad does seem to ignore the enemy target (does not look at it or aim towards it).

#

I can even force the enemy to fire their guns just fine with the same trigger but, as they do not aim at the enemy target that entered the trigger area, it is pretty moot and ineffective so to speak.

hushed turtle
#

Are you running this code inside of trigger's activation field?

drifting badge
#

yeah

hushed turtle
#

This in on activation field should print array of units who activated the trigger

systemChat str thisList;
#

There should be something

#

Even if you do

systemChat str list Trigger_02;
#

It would be really weird if list command wasn't working correctly

#

and not returning units who activated/would activate trigger

thin fox
#

send us a screenshot of your trigger

drifting badge
#

ok this was driving me crazy - I now put down a simple test trigger, featuring ONLY the trigger name and

systemChat str list Trigger_02;
hint (name (list Trigger_02 select 0));```

in the activation field. And what do you know THAT worked! But in the other more complicated trigger (got it overloaded during testing with lots of crap in there) it does not do anything (i.e. it does not even want to relay any info to systemchat nor in hint => which made me think that it did not fire or work for some reason, so small wonder that the squad did nothing, as it did not even have the data required for any action)

I did have the original code set within this codeblock thingy and when I did the same to the test trigger ->
```sqf
_fn_enemy = {
systemChat str list Trigger_02;
hint (name (list Trigger_02 select 0));
};```
-> lo and behold it suddenly did NOTHING and did NOT use the gathered list data (that is did not display a hint nor any systemChat while still playing the alarm sound to show the trigger still works). So that was the problem. I guess I have to move that part out (hope I can still call the data from within that code part).

(btw is there any ETA when they will fix the BohemianInteractive Forums so one can more easily search for scripting infos there? They have been down for ages now :( )
faint burrow
hushed turtle
#

It may be stupid question, but were you calling _fn_enemy using call?

fair drum
#

And thisList should also work. Triggers have been pretty solid since release so its most likely a user error.

drifting badge
#

That is not a stupid question actually. Been trying to get all of this to work for a very long time. Got frustrated and put everything away for a while and just decided to try again two days ago, so some of the reasons why I utilized some things are no longer clear even to me.

One of the main reasons why I used that code part, I think, was because I needed to have a "random sleep" part in the trigger

sleep random 1;

and that somehow was the only way I got the random sleep thing to work.

#

That said @hushed turtle you were a great help because now I figured out why things were not working (and why putting more and more - very probably VERY useless - code in to somehow make it work did nothing).

modern osprey
#

I saw that in the last update they added WebBrowser with js api. I also see that you can transfer data to the browser. But is it possible to receive events from the browser in sqf? For example, pressing a button.

ivory ferry
#

Heyo, i have been trying to get a proxy id from a model or to reference a proxy at all in sqf. Any ideas on functions i could use, I have been at this for quite a bit now.

agile pumice
#

where can I find a guide for adding to the field menu items?

digital hollow
ivory ferry
#

ight, thanks i didnt think of that one, kept going around KindOf and inherits. etc

fleet sand
#

Why not just this in InitPlayerLocal.sqf ?

player setVariable ["TAG_StartLoadout", getUnitLoadout player];
player addEventHandler ["Respawn", { private _loadout = player getVariable "TAG_StartLoadout"; if (!isNil "_loadout") then { player setUnitLoadout _loadout; }; }];
mellow ice
#

I don't suppose any of you folks know an effective way to implement an addAction for Eject to appear within the action menu whilest vehicles like the MH9 are airborne? I know it's a common feature but weirdly this sandbox-ish mission I'm attempting to use for some cinematics seems to have the feature disabled for some reason and I'm trying to find a way to re-enable it kekw

tulip ridge
mellow ice
hallow mortar
#

BIS_fnc_planeEjection is meant for jets configured with proper ejector seats. For aircraft like the MH-9 you'll need to use moveOut, "Eject" action, etc

crisp cairn
#

Hey all, I don't know if this channel can be used for ACE 3 issues, but I've created a custom bandage, however, I am trying to test if the bandages function works. I am using this with my custom classname but its throwing the error shown in the screenshot.

[player, "Body", "ws_PlasterDressing", player] call ace_medical_treatment_fnc_bandageLocal; 

The Error is attached.

open hollow
#

im doing somehing wrong here?

_elementz= [];    
for "_" from 0 to 10 do{
    _direction = getCameraViewDirection player;
    _raw = eyepos player vectoradd (_direction vectorMultiply 50);
    _pos = _raw vectoradd ([random [-1, 0 , 1],random [-1, 0 ,1],random [-1, 0 ,1]] vectorMultiply 30);
    _elementz pushBack [eyePos player, _pos, player];
}; 
_intersecs = lineIntersectsSurfaces _elementz;    
_intersecs 

https://community.bistudio.com/wiki/lineIntersectsSurfaces

#

trying to use the new syntax

#

im using developer tools mod btw*

warm hedge
#

[_elementz] instead

fast hemlock
#

can yall send loadouts porfiles

open hollow
#

and makes sense too meowfacepalm

nova berry
#

How do you play animations on an through a script? Can't really find much online beyond forums stuff that are down right now

Figured it would be something like this but it doesn't do anything. anim1 playActionNow "Act_Alien_Gesture"

(anim1 in this is the name of the ai unit)

fair drum
#
// if global
if (local _unit) then { _unit switchMove "myAnimation" }:

// or from server
[_unit, "myAnimation"] remoteExec ["switchMove", _unit];

// if local
_unit switchMove "myAnimation";
tulip ridge
hushed turtle
#

In SQF we send parameters info functions using arrays, which makes it hard to work with them, since you have to use indexes to do anything

#

Params creates variables, so you can use these instead of indexes, which makes code more readable

warm hedge
#
[player] call {
  private _unit = _this select 0;
  if (isNil "_unit") then {
    _unit = objNull;
  };
  if !(_unit isEqualType objNull) then {
    _unit = player;
  };
};```vs```sqf
[player] call {
  params [
    ["_unit",player,[objNull]]
  ];
};```
#

Nonsense code, but you can get the idea

cosmic lichen
#

Note the difference between Param and params though

hushed turtle
#

Didn't even realised

warm hedge
#

I honestly don't see a big point to use param instead of params though

cosmic lichen
#

Same

#

I never use it

winter rose
#

+1

cosmic lichen
#

Well no, that's not true.

hushed turtle
#

๐Ÿคฃ

warm hedge
#

!true

cosmic lichen
#

There are some cases where you can do a one liner with it

#

Instead of select I can additionally have a default value and check the data type.

#

But these are edge cases in the code I have written thus far.

#

Also note that you can skip parameters by using an empty string as variable name in the params command.

meager granite
#

param is useful as getOrDefault but for arrays

drifting badge
#

Since you guys been able to help me so brilliantly yesterday, there is another issue I am fighting with for a while now (but have been unable to make it happen): I am trying to get a unit to "rotate" slowly towards a given position (in two ways for two separate purposes: 1) is to rotate a set amount of degrees right or left and 2) is to rotate towards a marker position).

I have been experimenting with "getpos" and "setpos", but those make the change happen instantaneous (i.e. the unit "snaps" towards the new position) but I need it to be a continuous (slow) momement. I also tried with attaching the unit to a marker and use BIS_fnc_rotateMarker to rotate it. That does work, but the problem there is that, once the unit reaches the set azimuth of the "first" rotation (i.e. if you enter the repeatable trigger) it does not rotate the same amount of degrees again if you enter the trigger once more. (So if you set the azimuth in BIS_fnc_rotateMarker to for example 90ยฐ, it will stay at that heading, no matter how often you activate the trigger - while it should be able to rotate again, with +90ยฐ form its new position). This is driving me nuts.

fair drum
#

!quote 5

lyric schoonerBOT
drifting badge
#

@fair drum - Thanks for your input, that does sound interesting, but how do I get the unit to turn smoothly? What commands/scripts should I use instead?

hallow mortar
#

How slowly do you want?
setFormDir shouldโ„ข make the unit do its normal turning animation (if it's AI). Won't be slow but it will look more natural.

drifting badge
#

Thanks @hallow mortar will look into that (but it might pose a problem since - according to the wiki - this might be a less precise way of doing it). Have to test if the "speed" is too high for my purposes.

open marsh
#

Hi guys I made a script that explodes a Claymore mine facing a door when the door opens, however when I open the door from a side hugging the wall, I get 0 damage and I can basically exploit the whole thing. Does this make sense? Is there a way to prevent this, i want it to be challenging and def. hurt or kill me, (without having to do that manually with scriptcmds)

#

Is this an ArmA engine issue? That you get 0 damage because you're hugging a wall, even though you're 1-2m close to the explosion source

#

even with a demo charge exploding 1-2m from me, very close, i get 0 damage

atomic niche
open marsh
#

yeah but it also happens with demo charge

#

also entire building collapsing, doesnt kill me either

open marsh
#

but only when Im facing a door, opening, i get dmgd

fair drum
#

And why are you against modifying the damage?

crimson quarry
#

one more question

#

where do I find the mission directory?

dusty flicker
#

Anyone good at arma 3 servers, I did everything right but server isnt appearing

fair drum
fair drum
open marsh
thin fox
# drifting badge <@177167602768936960> - Thanks for your input, that does sound interesting, but ...

You can try this command with a really small sleep (faster) inside it
https://community.bistudio.com/wiki/for
But for rotation you need to convert some values so the unit don't go from 10ยฐ to 270ยฐ lol, instead going the other way around to reach the same value faster
But it will look like robotic thing, so idk, try it.
For this command, get the actual dir of the unit (from) and put the wanted dir (to)

open marsh
#

I just wish these smaller explosions could kill me when im 1m to it, but hugging a wall.. wish this exploit wasnt a thing

#

if a demo charge explodes 1m near u it shud kill u even if theres a wall ur against

cloud stirrup
#

Hey,
I've read the last spotrep multiples times but i'm can't find anything related to my problem
I have a custom handleDamage event, but since last update it looks somethings has changed because every player in vehicle receive the damage differently from a collision
Unfortunatly i can't find anything related to a change about that event in the last update
Do you have any other ideas of what could cause that ?

granite sky
#

Your videos appear to have vehicles taking extreme responses from impacts with bushes and fences?

#

That seems to be a thing with today's perf/prof branch update, but I'm not sure what it has to do with your question.

real tartan
#

does anybody have snippet from forums to listing all sounds from game? with gui

iron flax
open hollow
#

im not sure where this question falls lol

im testing the new CT_WEBBROWSER, and want to use it un a ui2texture.

i have some HTML that works perfectly as hud ( im using the example code forn the wiki)

import RscText;
class HudOverlayUIT
    {
        idd = 133713370;
        duration = 1e+011;
        onLoad = "GHUDOverlay = _this"; // Store our Display in a variable so we can access it from script

        class controls
        {
            class Texture: RscText
            {
                type = 106; // CT_WEBBROWSER
                idc = 1337;
                x = safeZoneXabs; // Full screen from corner to corner
                y = safeZoneYabs;
                w = safeZoneW;
                h = safeZoneH;
                url = "file://test.html";
            };
        };
    };

im calling it like this:

//bb setObjectTexture [0, '#(rgb,1024,1024,1)ui("HudOverlayUIT","abc")'];
pc setObjectTexture [1, '#(rgb,2048,4096,1)uiEx(display:HudOverlayUIT,uniqueName:"tesat name with space and quotes")'];
private _ctrl = ((GHUDOverlay#0) displayCtrl 1337);
_ctrl

this return 1337 so the ui is created.

but a black texture is placed instaed

#

ive tested just with createdsiplay and it works perfectly

cloud stirrup
granite sky
#

It isn't. It was a new bug in today's perf/prof branch.

eager lynx
#

how do u like get arma 3 by serching it up on mac

cloud stirrup
cloud stirrup
eager lynx
#

like i dont have steam or money to buy the game

#

and im on an macbook

winter rose
eager lynx
#

i think know here to get same

#

THE BANK ๐Ÿ™‚

winter rose
#

don't take a credit for 10โ‚ฌ

viral yew
#

I need your help blobcloseenjoy Thank you in advance.

When I spawn a camera, point it at the player, and let the player run an animation, the player just stands there instead of performing the animation.

  • This only happens when the player has a currentWeapon.
  • When I destroy the camera, the player immediately runs the animation.

I suspect that, since I am in the camera, either the player is not rendered or the animation is not loaded? Any idea?

winter rose
#

you may need a little delay before you do "playmove"

still forum
still forum
#

ye

open hollow
# still forum ye

Perf hit is noticeable or meh?
I should made some conditions like proximity isnโ€™t it?

still forum
#

It will only update if displayUpdate has been called AND its in view

open hollow
still forum
west umbra
#

Hello guys, do you know if it's possible to retrieve the trunk size of a vehicle ?

faint burrow
open hollow
#

any idea why i have this distortion in the screen ( of if its a feature lol)

split oxide
#

What texture type are you using? co or ca?

#

Happens with an alpha channel in my experience (or set to ca)

open hollow
#

im using the dedmens mission to test the new webreowser and ui2texture feature

split oxide
#

I use the advanced procedural UI on texture with the tag texType=co. i.e.,

tv setObjectTexture ["hiddenSelectionName", "#(rgb,512,512,1)uiEx(display:RscDisplayName,uniqueName:tvReferenceName,texType:co)"];```
https://community.bohemia.net/wiki/Procedural_Textures?useskin=vector#UI_On_Texture_Advanced
#

It defaults to ca which assumes alpha

#

You can also do that with the basic notation

#
"#(rgb,width,height,mipCount)ui(<displayClassName>,<uniqueName>,<textType>)"```
still forum
fervent prism
#

Hi guys! I'm building a training ground mission I'm wondering if there is a script for making the targets stay down longer, let's say a whole minute. I've spent some time trying to write the script with chatgpt but nothing seems to work

stable dune
#

Targets,
Are alive units?
And you want them just lay down or what do you mean.

fervent prism
#

I'm using the yellow pop up targets

fervent prism
#

managed to create it with this

#

this is my reward for trying to slave AI into doing what I should be doing

idle violet
#

After the update, I'm having problems with my Altis Life server, when the player enters the server the loadout saved in the database is not loaded and the player is born "naked", even if he buys items and clothes, it is being registered in the database normally, but when he enters the server, it seems that the database loadout is ignored and he is born only with virtual items, without clothes and equipment, I've been trying to solve this since yesterday and I can't, can someone help me?

lost vortex
#

YO HELP im currently doing a fun op

#

but ive reached the unit cap mid op

#

does anyone know the script to override it in zeus?

next gust
#

what unit cap

fair drum
#

its a group number cap, not a unit cap

#

start making larger groups, not many 1 unit groups

empty pilot
#

Hi

#

How can i get same marker in my map main ctrl ?

#

is there is bis_fnc for it ?

tepid hornet
#

hell all, I'm making a Nassau mission, trying to use inidbi2 for persistence, my scripts are fine, but the actual mod keeps breaking, i'm using faster on a dedicated windows, every time i deploy @inidbi2 through faster, the folder corrupts, anyone experienced this?

#

ths is where i put it, folder composition and the error i get when i add to faster as a local mod

drifting badge
hallow mortar
#

Instead of setPos and getPos, you should use either setPosASL/getPosASL or setPosATL/getPosATL as appropriate.
getPos is much slower, and the reference system it uses for its altitude return is not actually the same as that used by any of the setPos* commands. Sometimes it returns the correct altitude for use with other commands, but it is calculated differently and can have noticeable vertical error. The ASL/ATL command pairs are guaranteed to use the same altitude format as their partners, and are faster.

open marsh
#

I want to enhance AI by cheating for him, if lets say i enter a room , i want him to be able to face me directly and fire as soon as he spots me, what do i need for this?

drifting badge
#

I think that can be achieved if you do a "reveal" on the player, as that makes the AI aware of you. Btw if you want to enhance the AI in general you can use VCom or LAMBS, which make the AI do pretty cool things (like trying to surround and flank you).

open marsh
# drifting badge I think that can be achieved if you do a "reveal" on the player, as that makes t...

This is what I want to do, I want to have a soldier face a specific dirrection inside a building.

What I did was have a eden editor pre placed default soldier facing somewhere, and then replacing it with the soldier i want and taking over the properties like pos and direction its fcing, however when unit spawns in, it lowers it weapon, when i exec the script, the result isnt good as it doesnt really look at where i want it to look / aim. Do u have any idea how i can achieve this? i wanna spawn it and then have it sit still, facing the direction i set in eden editor or target

drifting badge
#

the sitting still/not moving can be done with disableAI "move" and disableAI "path", if you want the AI to have the weapon raised, ready to fire you can setCombatMode "RED" and setBehaviourStrong "COMBAT" and if you want the ai soldier to already face the direction it should be facing, you can just place it this way in the editor (unless you want to see it turn when you enter the room)

you can also set the AI's skill to be high (check the AI unit's attributes in Eden), but it will make things very difficult for the player

pallid palm
#

hello all : how do i use Call or spawn to exec this ```sqf
SFH_fnc_Heal1 = Compile preprocessFileLineNumbers "Scripts\Heal1.sqf";

stable dune
#
[args] call SFH_fnc_Heal1;

[args] spawn SFH_fnc_Heal1;
pallid palm
#

ahhh ok cool thx man @stable dune thats Awsome

open marsh
pallid palm
#

is Suspending allowed in Spawn or Call

fair drum
#

If you are doing it the config way, delete this and ask over at #arma3_config . You'll get better answers.

gloomy lily
#

alright

pallid palm
#

oh man thx man your Awsome @stable dune

hushed turtle
#

Suspending is allowed in call too, if you called it from scheduled environment.

open marsh
#

any1 know how to make AI mute on command? if i fire somewhere close to the ai, but not at ai, the ai starts shouting and all, i want him to remain quiet then at some point re enable

pallid palm
#

i see thx m8 your the best m8 @stable dune

winter rose
prisma nimbus
sharp dew
#

is there a way to scale up AI like x1.2 their size? I tried using SetObjectScale but that seems to only work on vehicles, but I did saw the AI scale up for split second before reverting back to normal

granite sky
#

I think you have to spam it with eachFrame.

sharp dew
#

yea but wouldnt that affect performance, I'll try it out, thanks

granite sky
#

well yes

hallow mortar
sharp dew
#

is there no mod to scale AI?

tulip ridge
#

No

#

And if there is, it's just calling setObjectScale on every frame

sharp dew
#

is there a way to not make it stutter? or am I just scripting it wrong. The AI kept getting big and reverting back constantly and stuttering

hallow mortar
#

I don't know how you're scripting it so I can't say if you're scripting it wrong.
The best way to do it is using an EachFrame mission event handler (https://community.bistudio.com/wiki/Arma_3:_Mission_Event_Handlers), but even then, there are likely to be limitations, because as I said, this feature is not really designed to work with anything other than static objects.

sharp dew
#

I got it to work, thanks

prisma nimbus
#

There was a Giants mod going around for a while back in the day

ornate apex
#

Does anyone know if there were any changes to ctrlSetEventHandler lately? According to https://community.bohemia.net/wiki/ctrlSetEventHandler, it should always return Nothing but it's no longer the case, and it causes some scripts to break. I've noticed it in Ravage mod a few days ago. The script in question is:

{
    ((findDisplay 602) displayCtrl _x) ctrlSetEventHandler ["LBDblClick", "_this call fnc_gearLBDblClick"];
} count [633, 638, 619];

According to https://community.bohemia.net/wiki/count, count can be used in this manner with one caveat described in Notes section by user Ebay:

With the alternative syntax each iteration should result in an interior return of bool or nothing. Example:
createDialog "RscFunctionsViewer";
{ lbAdd [292901, _x]; } count ["first", "second", "third"];
lbAdd returns a number, so this throws "Error Type Number, expected Bool". Tested in A2OA 1.63.131129

To verify that note: the following test causes Error Type Number, expected Bool.

{
  2
} count [1]

Now, I checked ctrlSetEventHandler in game and it does return a number. I assume it didn't until a couple of days ago. I've scrolled through the latest changelogs but couldn't find any information about this specific command being modified.
I guess more existing scripts related to controls management might be affected if they use a combination of ctrlSetEventHandler and count for iteration. I suspect the culprit might be https://dev.arma3.com/post/spotrep-00118. It doesn't mention any ctrlSetEventHandler updates, though.

ornate apex
# thin fox isn't that an obsolete command?

Yeah, seems like it is. Still, the problem started occurring all of a sudden a few days ago so I assume there must've been some sort of update to ctrlSetEventHandler. However, it's difficult to say for sure without reverting ArmA 3 version to compare the behaviour.

thin fox
ornate apex
# thin fox but you're having problems with `count` command right?

Yes, but the problem occurs when you use both commands at the same time (i.e., ctrlSetEventHandler inside count iteration code block). That's why I lean more towards ctrlSetEventHandler being modified to return some numeric handle ID, perhaps to match the return value of ctrlAddEventHandler. The problem isn't ctrlSetEventHandler in itself - any command returning a number would cause the same problem.
However, this specific script from Ravage was working for years (even though it was using the long-deprecated ctrlSetEventHandler), and suddenly started throwing an error suggesting that a number began appearing inside the count code block, returned by the ((findDisplay 602) displayCtrl _x) ctrlSetEventHandler ["LBDblClick", "_this call fnc_gearLBDblClick"]; command. My idea is that if it's been returning Nothing before some recent update, it would work just fine with the count function. If it suddenly started returning a numeric ID, it would make sense that the script would break.

thin fox
#

well, with my limited knowledge, this is a weird count syntax and it shouldn't work at all, the ctrlSetEventHandler actually returns nothing as it says biki

ornate apex
thin fox
#

afaik, the code block for the count command must return a bool in order to count the elements from the array if returns true

ornate apex
#

And yes, this is a very weird construction. Didn't know you can use count like that.

thin fox
#

but any case, this is a weird construction lol

thin fox
ornate apex
thin fox
#

idk how to help you because I really don't know what that code does and why it exists in that way lol

ornate apex
#

So we have an undocumented change in 2.20 ๐Ÿ˜‰

thin fox
ornate apex
# thin fox well the command is obsolete, so...

Yeah but then: why update a command that's obsolete?
Anyway, I think it's worth knowing if anyone starts getting weird errors in their weird count iterations, or in some mods that aren't updated on a regular basis. I started getting it in Ravage, and that's how I found the issue. Hopefully there aren't many creators who used the same combination of ctrlSetEventHandler and count.

thin fox
#

can someone else help in this case?

ornate apex
# thin fox my first impression of that code block, is that it wasn't working even before th...

According to the count documentation, the command inside the block is allowed to return either bool or Nothing, and ctrlSetEventHandler was returning Nothing - that's why it's been working before the update.
Now that I know the reason, I don't think there's anything else we can do here ๐Ÿ™‚ I'll try to get in touch with Ravage's author, and see if he can update it with this modification in mind. Thanks for the help, though. I didn't notice the command was obsolete, and looking at ctrlAddEventHandler gave me an idea what the new return value might mean (it's probably handler ID).

broken pivot
#

Good Evening people ๐Ÿ˜„

Is someone awake who quickly can say me why my trigger always come
activated when no one is around...

Code:

sascha_trg_charkiaRadio = createTrigger ["EmptyDetector", [17547.2,15269.8], true];
sascha_trg_charkiaRadio setTriggerArea [193,132,157, true, 100];
sascha_trg_charkiaRadio setTriggerActivation ["ANYPLAYER", "PRESENT", false];

if (triggerActivated sascha_trg_charkiaStatisch) then
    {
    systemChat "CharkiaStatisch spawnt!";
    execVM "EBER\Erweiterungen\Charkia\Erweiterung\CharkiaStatisch.sqf";
};
#

Why is my trigger activated?

pallid palm
#

because you pulled the trigger ?

broken pivot
#

Im not in the area

pallid palm
#

what's in the condition of the trigger

broken pivot
#

It confuses me

#

["ANYPLAYER", "PRESENT", false];

#

Its posted in the code above

pallid palm
#

you need to put this in the condition of the trigger

broken pivot
broken pivot
pallid palm
#

yeah that looks ok to me

broken pivot
#

Ill try

#

Didnt work

#

Nope

#

It turns the trigger repeatable

pallid palm
#

just do ANYPLAYER", "PRESENT and put the word this in the condition of the trigger

broken pivot
#

# Like (this)?

sascha_trg_charkiaRadio = createTrigger ["EmptyDetector", [17547.2,15269.8], true];
sascha_trg_charkiaRadio setTriggerArea [193,132,157, true, 100];
sascha_trg_charkiaRadio setTriggerActivation ["ANYPLAYER", "PRESENT", this];

if (triggerActivated sascha_trg_charkiaStatisch) then
    {
    systemChat "CharkiaStatisch spawnt!";
    execVM "EBER\Erweiterungen\Charkia\Erweiterung\CharkiaStatisch.sqf";
};
pallid palm
#

oh you didnt tell me it was a scripted trigger

broken pivot
#

Now?

#

ok

#

trigger activated

#

West also triggerd the activation

#

BRO

#

Do you know what your doing or just try&error?

pallid palm
#

heres my trigger

#
_t = createTrigger ["EmptyDetector",_pos];
_t setTriggerArea [500,500,0,true];
_t setTriggerActivation ["WEST","PRESENT",true];
_t setTriggerStatements ["this && {((getPosATL _x) select 2) < 75} count thislist > 0","",""];
_t setTriggerType "NONE";
#

i think you need setTriggerStatements

#

if you follow this Ex it will work

broken pivot
#
sascha_trg_charkiaRadio = createTrigger ["EmptyDetector", [17547.2,15269.8], true];
sascha_trg_charkiaRadio setTriggerArea [193,132,157, true, 100];
sascha_trg_charkiaRadio setTriggerActivation ["WEST", "PRESENT", false];
sascha_trg_charkiaRadio setTriggerStatements ["thisTrigger", "thisTrigger", "thisTrigger"];

Dont work

#

Good night and thanks for the try

pallid palm
#

why didnt you follow my 1st EX

fair drum
#

well just looking back, you didn't address the main issue for a while which was the if condition right after creating the trigger instead of using a statement. a couple of pages of moving the wrong direction, he probably lost faith in you in combination with him not truly understanding the magic variables that triggers use. I'd suggest next time, take a little more time in getting the full picture of what they want before offering "fixes".

pallid palm
#

well he didnt tell me it was a scripted trigger at 1st

fair drum
#

according to the OP currently, don't know if it was edited, it was clearly scripted

pallid palm
#

well yeah i saw that later

fair drum
#

yeah, all i'm saying is slow down. you probably would have caught it

pallid palm
#

oh i see ok

#

i will do

thin fox
pallid palm
#

oh i see

#

but still if he would of followed my EX it would work

thin fox
pallid palm
#

yes im learning that slowly

#

i'll take more time to get all the info next time befor i jump in

#

i mean well, i guess i want to help so bad i mess up

#

i'll do better next time you just w8 and see ๐Ÿ™‚

pallid palm
#

btw he said the trigger was activating and he didn't want that, until player was in the trigger

errant iron
# broken pivot Good Evening people ๐Ÿ˜„ Is someone awake who quickly can say me why my trigger a...

i don't create triggers in SQF often, but looking at the default trigger statement, apparently the condition always starts off as true: sqf triggerStatements _t; // Result: ["true", "", ""] true means the trigger will activate regardless of what you set in setTriggerActivation, since that result is only stored in the this variable - in other words, to make it behave normally, you need to change the condition to this in your trigger: sqf _t = createTrigger [...]; _t setTriggerStatements ["this", "", ""]; ... // Any other commands as usual

pallid palm
#

yes thats what i said as well

errant iron
#

oh right, yea you did

pallid palm
#

thx m8

hallow mortar
# broken pivot ```sqf sascha_trg_charkiaRadio = createTrigger ["EmptyDetector", [17547.2,15269....

setTriggerStatements is directly equivalent to setting the trigger code fields in the Editor. You need to set them the same as you would there.
https://community.bistudio.com/wiki/setTriggerStatements
The Condition (statement 0) should likely be this. In a trigger condition, this represents the result of the conditions you set up in the trigger's basic attributes (e.g. ANY PLAYER, PRESENT)
The On Activation (statement 1) should be whatever code you want to be executed when the trigger is activated.
The On Deactivation (statement 2)...I think you can figure that out.

pallid palm
#

i gave him an EX trigger but he did not follow it but thats ok i guess

hallow mortar
#

Your if check at the end is incorrect. if only checks once, not continuously, unless you script a loop to make it check again (which you didn't). So you're creating the trigger, immediately checking once if it's been activated, and then never checking again.
Just put your code in the trigger's On Activation statement, and let the trigger handle checking whether it's activated, just like in the Editor.

pallid palm
#

in my Ex i only want the trigger to be checked 1 time, cuz i have another loop deleting the trigger after it gets activated

#

or deactivated as it were

hallow mortar
#

I was not talking to you or about your example.

pallid palm
#

oh ok sorry

#

i was thinking you were giving me hell cuz im not the sharpest tool in the tool box ๐Ÿ™‚

hallow mortar
drifting temple
#

can anyone tell me how do i make the bullets of cram like this in my game ,the bullets get very spread out

split ruin
#

I need some help
I am using a function to change spawned unit loadout but it gives error "undefined variable" for local variable _unit

private _unit = delta createUnit ["tweed_acu_summer_ocp_trop", flg, [], 7, "NONE"];       
            [_unit] call KIB_fnc_jTac;                
            private _unit setSkill 1;
            private _unit setUnitTrait ["camouflageCoef", 0.5, false];
            private _unit setUnitTrait ["audibleCoef", 0.5, false];
            private _unit setUnitTrait ["UAVHacker", true, false];
proven charm
#

you have many extra privates there

split ruin
#

@proven charm oh yeah, probably only _unit has to have private but I am spawning two units

#
for "_i" from 0 to 1 do {
            private _unit = delta createUnit ["tweed_acu_summer_ocp_trop", flg, [], 7, "NONE"];       
            [_unit] call KIB_fnc_jTac;                
            private _unit setSkill 1;
            private _unit setUnitTrait ["camouflageCoef", 0.5, false];
            private _unit setUnitTrait ["audibleCoef", 0.5, false];
            private _unit setUnitTrait ["UAVHacker", true, false];
            };
proven charm
#

i dont know how that involves multiple privates. all you need is the first private

warm hedge
#

That is not the question. private only used when it came for declare the variable

split ruin
#

same error with

for "_i" from 0 to 1 do {
            private _unit = delta createUnit ["tweed_acu_summer_ocp_trop", flg, [], 7, "NONE"];       
            [_unit] call KIB_fnc_jTac;                
            _unit setSkill 1;
            _unit setUnitTrait ["camouflageCoef", 0.5, false];
            _unit setUnitTrait ["audibleCoef", 0.5, false];
            _unit setUnitTrait ["UAVHacker", true, false];
            };
hallow mortar
#

What is the exact error, please?

split ruin
hallow mortar
#

Is the unit actually being created?

proven charm
#

should be null if not ๐Ÿค”

#

i assume the "span class="re5">" thing in the pastebin was paste error and not your code

split ruin
#

yes

#

my line is just

params ["_unit"];
#

@hallow mortar nothing spawns

hallow mortar
#

Is "tweed_acu_summer_ocp_trop" actually a unit classname? It looks more like a uniform classname.

split ruin
#

@hallow mortar its a unit classname form a mod, I changed it to

"B_Soldier_F"

but it gives the same error

hallow mortar
#

What is flg? Specifically? What type of thing does that variable contain?

#

Also, the full, exact, and complete error would be useful to see.

stable dune
split ruin
#

omg I am an idiot I forgot to create a group for the units, now its working

deltagrp = createGroup [west, true];
            deltagrp setGroupIdGlobal ["Delta"];
            for "_i" from 0 to 1 do {
            private _unit = deltagrp createUnit ["B_Soldier_F", flg, [], 7, "NONE"];       
            [_unit] call KIB_fnc_jTac;                
            _unit setSkill 1;
            _unit setUnitTrait ["camouflageCoef", 0.5, false];
            _unit setUnitTrait ["audibleCoef", 0.5, false];
            _unit setUnitTrait ["UAVHacker", true, false];
            };
proven charm
#

i was gonna ask that ๐Ÿ˜„ (but for some reason didnt)

pallid palm
#

@split ruin your not a idiot your like me, to fast, lol, we need to slow down

west grove
#

weird question, but i'm a bit at a loss right now. when a helicopter gets destroyed, it swaps to the wreck model - but only once it hits the ground. is there any way to detect when this happens?

#

i'm thinking of spawning additional wreck clutter in that moment, but it doesnt seem as easy as i expected it

#

almost sure this should be possible, since a2 was also spawning stuff like craters once an aircraft crashed down?

thin fox
west grove
#

isnt that really heavy? checking constantly even though nothing might happen at all

west grove
#

i know, but it would still "filter" on every creation

thin fox
#

your mission is too heavy?

west grove
#

it would run everywhere where the airplane is used

pallid palm
#

are you saying you want the wreck to happen before it hits the ground ?

west grove
#

no, i want to spawn additional wreck parts once it switches to the wreck model

#

imagine rotor parts or stuff like that

pallid palm
#

i see

#

i have not seen any wreck parts in the game is there such a thing /

west grove
#

i could probably spawn some entitycreated EH once the vehicle gets destroyed, and delete that EH once i know the wreck is created. but would have to check first if it can even detect the wreck

west grove
pallid palm
#

oh copy that

#

no wounder i have not seen any wreck parts i only use vanilla lol

thin fox
west grove
#

that might be another solution

thin fox
#

you can add some sort of smoke or something to hide the change

#

idk

west grove
#

i could even add a wait that checks if the wreck model is created

west grove
#

oh, that will be even more useful

thin fox
#

ohh

#

ofc, commands from 2.18 that I've never tested it

ivory lake
west grove
#

(getEntityInfo test)#12 works

#

just have to slap a wait in a killed EH and it should be reliable i guess

modern osprey
#

How i can open url in external browser without displays and controls?

drifting badge
#

I thought these two would provide me with the same result - the heading towards another unit - but I just had a testrun and for some reason I do not get the same results (althought, as far as I understand the wiki, it should be the same).

_vd = getPosASL _enemy2 vectorDiff getPosASL English_SGT_01; 
_dir = (_vd select 0) atan2 (_vd select 1);
_dir = (_dir + 360) % 360;```
```sqf
 _dirTEST2 = [_enemy2, English_SGT_01] call BIS_fnc_relativeDirTo;```
What am I missing? The first one does as it should, providing 0 to 360 results, depending on where the other unit is, the other just gives me a number that does not correspond to the other result.
digital hollow
#

should be _y atan2 _x

drifting badge
#

? like I said the first gives me correct results, the latter does not (i.e. the two results do not match for some reason, but should?); been trying to clean up some code I cobbled together, hence me trying to shorten some things if possible

proven charm
drifting badge
#

I am just confused that the results do not match and can not explain it (because I do not see the mistake I must have somewhere)

granite sky
#

The second one gives a direction relative to the first object's heading. Command equivalent is getRelDir

#

You should find that if the unit is pointing north then they return the same values.

drifting badge
#

ah ok so I was wrong in thinking these two do the same thing, got it, thanks! was driving me nuts :)

real tartan
#

I am doing force fire for turret with BIS_fnc_fire, but turret is not turning to target, how to wait for turret to turn to target ( +- 60 degree angle ) + ( 0 to 90 degree vertical ) ?

#

want to turn turret as fast as possible, to turn and fire at many targets

#

    if ( _targets isNotEqualTo [] ) then 
    {
        private _target = _targets select 0;
        _vehicle lookAt _target;
        // _vehicle lookAt getPosVisual _target;
        sleep 0.1;

        private _angle = "?";
        private _elevation = "?";

        if ( _angle <= 60 && _elevation >= 90 ) ) then 
        {
            [ _vehicle, weaponState [ _vehicle, [ 0 ] ] select 1 ] call BIS_fnc_fire;
            _vehicle setVehicleAmmo 1;
        };

        sleep 0.1;
    };
drifting badge
iron pebble
#

Does anyone know where to find the script for these symbols? I have a few of them. Looks like this:
"\A3\Ui_f\data\GUI\Cfg\Ranks\sergeant_gs.paa"

proven charm
#

you mean the path?

stable dune
iron pebble
#

The part that changes is "sergeant_gs" like one is recon and the other is repair I think. They give you different icons. There's private, corperal, captain, and many more

faint burrow
#

Arma 3\Addons\ui_f_data.pbo/GUI/Cfg/Ranks

hallow mortar
#

There are also 3 of them in .../RespawnRoles

stable dune
#

these are only what i find -->
a3\ui_f\data\GUI\Cfg\Ranks
a3\ui_f\data\GUI\Cfg\RespawnRoles

iron pebble
#

Amazing!!

iron pebble
# stable dune

That's amazing thank you so much. Any guess where I might be able to find more?

stable dune
#

If you are using dlcs, I bet those have more.
And mods too.
It's pretty easy find you have object/ layout/ or something where you see xx icon.
I don't know does vanilla arma (without dlc/ mods) have more than that.

proven charm
tulip ridge
#

3DEN Enhanced also has an image viewer, also has a search bar and sorts images by resolution

somber harness
#

silly question i know, but how exactly can i learn more scripting myself? i mean as in like, there is the wiki, yeah, but do i just gotta sift through everything on the wiki, or is there like a โ€œhubโ€ where i can go to start with learning how to do it on the wiki

tulip ridge
#

Come up with something you want to do / make, google what you don't know, and learn as you go

proven charm
#

and small

somber harness
thin fox
# somber harness thanks bro

I started learning like Dart said, googling and such... but I've really learned a lot by looking other people's work, trying to understand each line what it does, etc

somber harness
#

Iโ€™ve been doing that some, but I must figure out how to decrypt it. However, the payoff is worth it, so

thin fox
#

search for Gunter Severloh in youtube

stable dune
#

And you can always ask here.
Here is a lot of ppl who know and help.
I bet there is no stupid questions, and every time you learn something new.

somber harness
#

Very true. Thank you all very much

somber harness
thin fox
somber harness
#

when I'm trying to create an enemy infantry group that spawns, will it already be in it's own group?

For example

_destination = "defensArea";
_enemInfType = ["O_Soldier_F","O_Soldier_AR_F","O_Soldier_GL_F","O_Soldier_LAT_F","O_Soldier_SL_F"];

_enemInfGroup = _enemInftype createUnit getMarkerPos _stMarker;
_enemInfGroup setDir markerDir _stMarker;

_wayp = _enemInfGroup addWaypoint [markerPos _destination,0];
_wayp setWaypointType "SAD";```
#

will it just make all those few units into it's own squad?

tulip ridge
#

createUnit takes a group as the left side argument

#

You have to specify what group that the unit will be in

somber harness
#

so I cannot just say for a group to create unit from that array I gave, I need to do something like _enemInfGroup = createGroup east and add onto that?

tulip ridge
#

Oh alt syntax has it as right side

somber harness
#

Yeah I looked at it already, just not entirely sure how I can specify for a group to have those units I want. I looked over it a few times, may be blind or overthinking it however. Do I just have to put 2 lines where I specify _enemInfGroup = createGroup east; _enemInfGroup = _enemInfType createUnit getMarkerPos _stMarker;
or is there more to it than that?

tulip ridge
#

You're creating a group, and then assigning the variable to the unit nothing?

#

That version of createUnit doesn't even return the unit

somber harness
#

I was just focusing on _enemInfGroup

#

I'll just send the whole thing, sorry for the confusion

tulip ridge
#
_enemInfGroup = createGroup east; // Creates a new group and assigns _enemInfGroup to it
_enemInfGroup = _enemInfType createUnit getMarkerPos _stMarker; // Assigns _enemInfGroup to nothing
somber harness
#
_destination = "defensArea";
_enemInfType = ["O_Soldier_F","O_Soldier_AR_F","O_Soldier_GL_F","O_Soldier_LAT_F","O_Soldier_SL_F"];

_enemInfGroup = createGroup east;
_enemInfGroup = createUnit getMarkerPos _stMarker;

_wayp = _enemInfGroup addWaypoint [markerPos _destination,0];
_wayp setWaypointType "SAD";```
tulip ridge
#

But that's still not the right syntax

#

Read the wiki page I linked

somber harness
#

Alright I shall, my b

#

okay I missed the part where it said group, that was a brain fart on my end, I was just assigning a variable to it. Or it's something else, I don't mean to be frustrating here my apologies, it's not that I'm not even reading it or not being attentive I'm just being stupid here ๐Ÿ˜ญ

somber harness
#

ok yeah i completely misunderstood what I was reading

fair drum
#

Running into an issue where hashmapobjects aren't truely creating a new instance:

Psudocode:

testBaseClass = [
    ["numUnits", 6],
    ["units", []],
    ["group", grpNull],

    ["#create", {
        params ["_side"];

        _self set ["group", createGroup _side];
        private _group = _self get "group";
        private _numUnits = _self get "numUnits";

        for "_i" from 0 to (_numUnits - 1) do {
            private _unit = _group createUnit ["B_Soldier_F", [0,0,0], [], 0, "NONE"];
            diag_log format["Unit created: %1",_unit];
            private _units = _self get "units";
            _units pushBack _unit;
        };

        diag_log format["All Units: %1",_self get "units"];
    }]
];

groupObject_1 = createHashMapObject [testBaseClass, [west]];
groupObject_2 = createHashMapObject [testBaseClass, [east]];

log output:

14:50:25 "Unit created: B Alpha 3-2:1"
14:50:25 "Unit created: B Alpha 3-2:2"
14:50:25 "Unit created: B Alpha 3-2:3"
14:50:25 "Unit created: B Alpha 3-2:4"
14:50:25 "Unit created: B Alpha 3-2:5"
14:50:25 "Unit created: B Alpha 3-2:6"
14:50:25 "All Units: [B Alpha 3-2:1,B Alpha 3-2:2,B Alpha 3-2:3,B Alpha 3-2:4,B Alpha 3-2:5,B Alpha 3-2:6]"
14:50:25 "Unit created: O Alpha 2-6:1"
14:50:25 "Unit created: O Alpha 2-6:2"
14:50:25 "Unit created: O Alpha 2-6:3"
14:50:25 "Unit created: O Alpha 2-6:4"
14:50:25 "Unit created: O Alpha 2-6:5"
14:50:25 "Unit created: O Alpha 2-6:6"
14:50:25 "All Units: [B Alpha 3-2:1,B Alpha 3-2:2,B Alpha 3-2:3,B Alpha 3-2:4,B Alpha 3-2:5,B Alpha 3-2:6,O Alpha 2-6:1,O Alpha 2-6:2,O Alpha 2-6:3,O Alpha 2-6:4,O Alpha 2-6:5,O Alpha 2-6:6]"

each hashobject should have its own new set of properties, yet its stacking them unless I'm getting the syntax wrong

same result if i use a hashmap as the base class instead of an array

somber harness
#

that was very dumb of me

hushed turtle
somber harness
minor viper
#
_vipers = [viperLeader, viperDemo, viperMedic, viperRecon, viperMarksman];
_seatChooser = 0;

{
    switch (_seatChooser) do
    {
        case 0: 
        { 
            _x moveInCargo [_xian, 0];
        };
        case 1: 
        { 
            _x moveInCargo [_xian, 1];
        };
        case 2: 
        { 
            _x moveInCargo [_xian, 15];
        };
        case 3: 
        { 
            _x moveInCargo [_xian, 14];
        };
        case 4: 
        { 
            _x moveInCargo [_xian, 13];
        };
    };
    _seatChooser = _seatChooser + 1;
} forEach _vipers;

Anyone know why this works perfectly on AI and the user but not other players? presuming you need to execute moveInCargo locally but not sure how I would do that while passing the right parameters. How would you write it to work for players?

fair drum
minor viper
#

wow that's much easier than I was expecting

fair drum
#

basically, you are telling the machine where _x is local to do the thing

minor viper
#

Awesome, I thought you would need to do like machine _x or something like that but it's really useful to know you can just write it like that

#

would this still work for AI as well?

#

Epic, thank you โค๏ธ

fair drum
hushed turtle
#

It doesn't care if unit is player or not

fair drum
#

and yes it will, it will just target whatever machine has the AI (which typically is server, which if sent from server, means no real network traffic anyways). This only really matters if you are leading a group of AI, or if you have a headless client that is controlling AI

hushed turtle
#

That code is pretty interesting with it's usage of switch and _seatChooser variable

fair drum
# fair drum Running into an issue where hashmapobjects aren't truely creating a new instance...

Now if split them individually, keep in mind, its STILL passing an array in the end:

groupObject_1 = createHashMapObject [[
    ["numUnits", 6],
    ["units", []],
    ["group", grpNull],

    ["#create", {
        params ["_side"];

        _self set ["group", createGroup _side];
        private _group = _self get "group";
        private _numUnits = _self get "numUnits";

        for "_i" from 0 to (_numUnits - 1) do {
            private _unit = _group createUnit ["B_Soldier_F", [0,0,0], [], 0, "NONE"];
            diag_log format["Unit created: %1",_unit];
            private _units = _self get "units";
            _units pushBack _unit;
        };

        diag_log format["All Units: %1",_self get "units"];
    }]
], [west]];
groupObject_2 = createHashMapObject [[
    ["numUnits", 6],
    ["units", []],
    ["group", grpNull],

    ["#create", {
        params ["_side"];

        _self set ["group", createGroup _side];
        private _group = _self get "group";
        private _numUnits = _self get "numUnits";

        for "_i" from 0 to (_numUnits - 1) do {
            private _unit = _group createUnit ["B_Soldier_F", [0,0,0], [], 0, "NONE"];
            diag_log format["Unit created: %1",_unit];
            private _units = _self get "units";
            _units pushBack _unit;
        };

        diag_log format["All Units: %1",_self get "units"];
    }]
], [east]];
#
15:19:26 "Unit created: B Alpha 3-6:1"
15:19:26 "Unit created: B Alpha 3-6:2"
15:19:26 "Unit created: B Alpha 3-6:3"
15:19:26 "Unit created: B Alpha 3-6:4"
15:19:26 "Unit created: B Alpha 3-6:5"
15:19:26 "Unit created: B Alpha 3-6:6"
15:19:26 "All Units: [B Alpha 3-6:1,B Alpha 3-6:2,B Alpha 3-6:3,B Alpha 3-6:4,B Alpha 3-6:5,B Alpha 3-6:6]"
15:19:26 "Unit created: O Alpha 3-4:1"
15:19:26 "Unit created: O Alpha 3-4:2"
15:19:26 "Unit created: O Alpha 3-4:3"
15:19:26 "Unit created: O Alpha 3-4:4"
15:19:26 "Unit created: O Alpha 3-4:5"
15:19:26 "Unit created: O Alpha 3-4:6"
15:19:26 "All Units: [O Alpha 3-4:1,O Alpha 3-4:2,O Alpha 3-4:3,O Alpha 3-4:4,O Alpha 3-4:5,O Alpha 3-4:6]"
#

so something is up with the command I think

hushed turtle
#

It could be intended behaviour

fair drum
#

its just weird to me. you are either passing in an array stored in a var, or directly and you get 2 different results

#

unless... its still using the stored var as reference instead of creating a whole new reference once the object is made

hushed turtle
#

You could copy array and it would create two instances

groupObject_1 = createHashMapObject [+testBaseClass, [west]];
groupObject_2 = createHashMapObject [+testBaseClass, [east]];
fair drum
#

so not quite OOP imo

hushed turtle
#

Agree on weird one though

#

๐Ÿ˜€

fair drum
#

i'll make a wiki edit with its current behavior

somber harness
#

i finally did it, got it working with waves too

hushed turtle
#

Maybe game detects that HashMapObject based on same array already exists, so it just calls #create method second time on the same array?

hushed turtle
#

It's not HashMap object issue. Two objects get created, but they share same units array! Arrays are passed as references
@fair drum

#

You gonna need to create new empty array in #create to avoid it being shared

fair drum
#

i'm going to just do a +copy on creation

hushed turtle
#

That's whole new array created for no reason