#arma3_scripting

1 messages Β· Page 229 of 1

digital hollow
#

Oh I see. Wouldn't you have the house when creating the stove? And can save it at that time?

restive leaf
#

Nah, is a furniture population script based on Tinter Furniture that runs on the server at mission start/restart. 24x7 public server

hushed turtle
#

Can't hit objects underground. Even when lineIntersects itself runs underground

real tartan
#

what is difference between SENTRY and GUARD and HOLD waypoint types

mortal folio
#

These seem so pointless, wheres the link that steals my personal information KEKW

fair drum
old owl
devout surge
#

Hi, im looking for some HALO script, something for my players to jump, and dont have to make logistics for 20 players to rearm on ground. Does anyone have some solution? i havent find one that works for me

fair drum
#

well what do you need it to do

devout surge
#

jump on a location(i have seen scripts that let you choose a place), replace your backpack with a parachute and load your backpack on landing

sacred fox
#

Im trying to add a A3 proxy to my model, but it doesnt seem to work, i have tested this path: roads_f\a3\roads_f\Runway\RunwayLights\Flush_Light_green_F.p3d and also this one a3\roads_f\Runway\RunwayLights\Flush_Light_green_F.p3d it doesnt seem to want to show up, i have the proxy in these lods, LOD 1, Geometry,Geometry PhysX,Fire geometry. kinda frustrating as it should be an easy task to just add a visual proxy

still forum
#

Technically doable to add to remoteExec. But would it really make any sense to use? Probably not worth adding it.
But you'll be able to move that traffic out of the game pipe if really needed once the http request stuff comes

errant jasper
#

Yeah, I get it. Having the ability to toggle ordered, and reliable on/off for packets across multiple independent channels is of course the ideal dream, but is extremely limited the number of beneficial cases.
And the costs. Oh boy, imagine the amount of "support" necessary for people misusing it unknowingly.

still forum
#

Sending a string, is sending a block of bytes. Very easy and quick CPU wise, but uses network traffic if its long yes.
And array of numbers, is much worse.
Its several level deep of indirection, iterating over elements, for each element check the type, store the type, then based on type the actual data content is stored differently (one number is stored as 4 bytes)

Sending [1,2,3,4] is about 22 bytes + some extra overhead I didn't count. Plus alot heaver on the CPU and RAM.
Sending "[1,2,3,4]" is 12 bytes, and is very easy to serialize and copy over. Both on the sending and receiving side.

Strings used to be a bit heavier on CPU, by iterating through the whole string to determine their length. That went bad on very large strings. But I fixed that.

#

I don't think there is a written resource (like the code performance wiki page). Just random posts by me over the years

versed belfry
#

But that is great to know for the future, thanks a lot for explaining it

errant jasper
#

You could probably toJSON it when sending.
That probably incur a similar cost, but the conversion have to happen somewhere.

versed belfry
still forum
#

Internet speed is less the problem.
Arma's CPU inefficient design makes you hit limits waaaay before you hit your bandwidth limit.

#

A hashmap is internally sent as a single array of [key,value,key,value,...]

#

Sending a string is cheaper than many values. So with hashmaps you could toJSON/fromJSON.
But, the cost of doing the conversion to JSON, is even more than the cost of serializing all the elements directly. But it would save you network traffic.
You can also compress the string and send compressed over network.
In most cases, unless you're sending a really big chunk of data, its not worth it

#

The only script command that reads the variables, is diag_exportKB, which I think is internal only.
So the answer seems to be, there is none

#

There are also only few places that actually use the name.
Like... the rendering code for the commanding HUD... TBH that is the only place I can find that uses this

#

Only with slight delay

fair drum
#

I'm always here for the Dedmen reply dump πŸ™‚. Favorite time to tune in.

still forum
tulip ridge
#

I had suggested featureCam player EH + checking if zeus display exists

#

I think they already did it but no clue

#

Didn't say if it was mod or mission

still forum
#

That is also how the game does it.
It does a trace downward to find the floor you're standing on. For the interior sound effect.

hushed turtle
still forum
#

Think of it as "sending a value" vs "sending many values" and it makes sense πŸ˜„

hushed turtle
#

When are strings are numbers like everything in computer

hushed turtle
versed belfry
#

This is also only being sent like this from the server to the Zeus

versed belfry
errant jasper
#

If hashmap h["x"] = 20, h["y"] = "schnitzel" is basically sent as ["x", 20, "y", "schnitzel"] serialised as bytes why would JSON, e.g. {"x": 20,"y":"schitnzel"} be (noticeable) more compact?

still forum
# versed belfry Usually the data looks like this: ``` [key(playerUID), [_fps, _ping,_ desync]] `...

if you wanted to reduce load, you could store a string per player.
That way the server only needs to deserialize two strings.

Yes converting to string is more expensive. But every player machine only does one, so they don't really care, the processing is nicely distributed.

The Zeus would then get the strings, and convert the back from string on their machine.
Higher CPU load on Zeus. But better have the load on the Zeus machine (Which doesn't really care if fps drop a little), vs on the server (where every player depends on it running well)

still forum
# errant jasper If hashmap h["x"] = 20, h["y"] = "schnitzel" is basically sent as `["x", 20, ...

String: 1 byte type, 1 byte length, 26 bytes content = 28
Remove the space before 20, and you're at 27 bytes.
Deserialization is 1 memory allocation for the value, 1 memory allocation for the string content.

Array: 1 byte type array, 1 byte array length. 1 byte string type, 1 byte length, 2 bytes content. 1 byte number type, 4 bytes content, 1 byte string type, 1 byte length, 2 bytes content, 1 byte string type, 1 byte length, 10 bytes content = 27 bytes

Deserialization is 1 memory allocation for the array, 1 memory allocation for the array content, 1 memory allocation for the string value, 1 memory allocation for the string content, 1 allocation for number value, 1 allocation for string value, 1 allocation for string content, 1 string value, 1 string content

errant jasper
#

Yeah, I see, so it would boil down to whether the string or binary representation is more compact for each element
Like number 42 is 2 bytes in JSON, but 1+4 bytes for type and number in SQF
But number 123456789 is 9 bytes in JSON but still only 1+4 bytes for type and number in SQF

#

Array in JSON has constant [] overhead + N-1 commas. Array in SQF has constant, 1+ (1 to 3?) length byte overhead.

granite sky
#

Note that [1,2,3] is shorter sent as a string, but [0.617888,0.106399,0.00141811] is not :P

#

We use JSON serialization for saving games now, but that's because the alternative there is the format used in the vars files, which is far more wasteful than the network transmission format.

still forum
#

Network doesn't have the classnames, and types are stored by index rather than string name. Otherwise pretty similar

granite sky
#

IIRC for our saves it worked out ~5x smaller, without even compressing the data.

versed trail
#

it ended up as like 88% smaller on a large save that was about 5mb

cursive tundra
#

hey, when i want to automatically detect if a launcher is AT/HE/AA, how would i do that? I looked at a few values in the config that i could check, like indirectHit, indirectHitRange, hit etc., however the values seem to be not really decisive alone.. a RHS AT launchers ammo has like a hit of 280 for example, while a basegame one will end up with only 150... and some Ammo types with HE in the name will also have values of 100+.
has anyone done this before and can maybe supply his values to categorize them properly?

#

also hitMin and hitMax confuses me - sometimes "hitMax" will be far higher than "hit", sometimes they are not present at all

sly cape
granite sky
#

ACE changes some guided AT launchers to lock on to aircraft as well, so there's no hard rule there.

cursive tundra
#

submunitionAmmo = "rhs_ammo_9m17_penetrator"; so i need to check this for example? where does it show the penetration / dmg there?

sly cape
granite sky
#

You calculate it from the (sub)projectile velocity and caliber values.

#

_penetration = (15/1000) * _caliber * _subVelocity

#

submunition velocity is the highest of the parent projectile's current velocity and submunitionInitSpeed on the parent.

sly cape
granite sky
#

Almost all HEAT rounds use high submunitionInitSpeed values but there are a couple of CUP ones that don't.

#

RHS AT rounds tend to have hit set much higher than vanilla but the penetration values are similar.

#

Oh yeah, RHS also has extra spalling submunitions so watch out for that.

#

rhs_ammo_spall is the classname.

cursive tundra
#

rhs_ammo_9m17: maxSpeed = 125;
and
rhs_ammo_9m17_penetrator: submunitionInitSpeed = 200;
are what i saw in the config - are these the values for to calculate the speed?

cursive tundra
granite sky
#

Yeah the trouble is that you can't really calculate the real impact velocity.

cursive tundra
#

well, i only need to return true or false for if my unit has appropriate AT capabilites to be sent to deal with a tank - i dont need to know precise values

granite sky
#

If submunitionInitSpeed > maxSpeed then it's certainly going to be an override, but I would have to check those two busted CUP rounds for whether it works there.

cursive tundra
#

just "hey, i have an AT launcher that can deal with a T72 prob"

hallow mortar
#

It's not foolproof but there are some values the AI use to decide whether they'll use a weapon against certain targets

#

You could get some information from checking those

cursive tundra
#

(and maybe the ranges but the ranges are easier to find from looking at the config)

cursive tundra
hallow mortar
#

It's in the ammo config somewhere but I don't remember the names off the top of my head

teal fog
#

Hey

#

im trying to change the size/height of a unit

#

but dosent seem to be working for me

#

im not an expert or anything close useing scripts

tulip ridge
#

If you mean with setObjectScale, I don't think it works on units at all

May still work if attached but I thought that was a bug and fixed, not at home to verify

devout surge
#

it usually fails, more if its a player. i have seen it working on drones.

wispy kestrel
#

How do I remove respawnInventories (taken from my profileNamespace) added by zeus Respawn -> Arsenal module? If I get the array of respawnInventories _riWEST = [WEST, true] call BIS_fnc_getRespawnInventories; it returns the items prefixed with missionNamespace: like this ["missionnamespace:my save"]. Using { [WEST, _x] call BIS_fnc_removeRespawnInventory; } forEach _riWEST; should work and it in fact does for all added respawnInventories except the ones from my profileNamespace.

rugged coral
#

Hey guys any known fixes for the bug which will randomly delete some global markers for a single client?
Or do I really have to manually set / check each global markers??
In like 10+ years of arma scripting I have never experienced that bug tho idk..
But yeah seems to be an issue.

#

There isn't a marker limit or?

#

Also only 1 of like 20 users do have this issue.
And for the users themselves often the same markers are missing.
But different users do have different missing markers too.

fleet sand
#

make sure its not one of the mods doing it.

rugged coral
#

f. ex. I never experienced this for myself. But yeah another player almost daily these days for one single marker..

#

Also checked all the code there is no reference to it within. (also would prob then cause the marker to be deleted or so for everyone)

errant jasper
#

Well it used to be markers were not by default JIP compatible and properly multiplayer synced, but that is years ago.

rugged coral
#

so I really have to double check/send them? :/

errant jasper
#

No, they should work fine now, assuming proper use of the marker commands.

rugged coral
#

it is an eden editor marker in this case πŸ˜„

#

Scripted markes do not have the issues or not known so far. Only related to eden editor placed ones (at least so far).

errant jasper
rugged coral
#

Mh ok will try thanks for the hint.

errant jasper
#

Also just in case have them look around the edges of the map for the markers

#

if positioning goes awry stuff often ends up in bottom left corner of map

rugged coral
#
_localQuestMarkers = getArray(_cfgClass >> "LocalQuestMarkers");
{
    deleteMarkerLocal (_x select 1);
} forEach _localQuestMarkers;
_globalQuestMarkers = getArray(_cfgClass >> "GlobalQuestMarkers");
{
    //>> deleteMarkerLocal (_x select 1);
} forEach _globalQuestMarkers;```
Mh eventually I have missed here πŸ˜„
Will be prob the fix.. Feel kind dumb now haha but yeah I have asked some stuff about the bug and seemed to be not related to the story missions so didn't look further there..
Also yeah explains why it might feel a bit random since it was related to the story mission progress of each user.. Also explains why often the samers have been missing..
split ruin
#

any way to create a target camera ?

errant jasper
split ruin
#

just the whole thing, like targeting pod πŸ˜†

errant jasper
#

This is super old stuff, but, created a camera and "cut" to that. I only copied camera and switchCamera related part so take it with a grain of salt.

#define MAIN_DISPLAY 46
  waitUntil {!isNull (findDisplay MAIN_DISPLAY)};
  _mainDisplay = findDisplay MAIN_DISPLAY;
  _camera = "Camera" camCreate [0,0,0];
  //Get look direction
  _newPos = _vehicle modelToWorld _relativeCameraPos;
  _newDir = (vectorDir _vehicle) call DE_REARVIEW_InverseVector;
  _upVector = vectorUp _vehicle;
  //Set direction and pos
  _camera setPos _newPos;
  _camera setVectorDirAndUp [_newDir, _upVector];
      #ifndef FORCE_1ST_PERSON_WHEN_ACTIVE
          _camera switchCamera "INTERNAL";
      #endif
      camUseNVG (currentVisionMode player == 1);
  // Not actually run here, I think this was used to switch back from the camera in my case.
  (vehicle player) switchCamera "INTERNAL";
#

If by target in 'target camera' you mean something more elaborate, like HUD or stuff, I guess you overlay that like normal UI stuff when switching.

#

Lol vectorMultiply from 2014, can replace call DE_REARVIEW_InverseVector;. My zipped archive says above is from 2011 and on utes hmm.. So probably Arma 2.
Maybe it is possible to circumvent by preloading terrain and objects, but from what I recall, changing camera doesn't change what is loaded visually, so switching to a far away camera might render "fog", or partially.

digital hollow
#

Hatchet H-60 tries but there's bugs xD

split ruin
#

gives error ...

errant jasper
#

I mean, yeah that isn't self contained. You will have to work with the camCreate and switchCamera commands and go from there.

#

Above, was basically rearview camera. You probably need something more forward looking for your targeting pod, and camSetFov for "zooming"

split ruin
#

I am reading camCreate now πŸ™‚

errant jasper
#

Fair warning: what I just gave is only the "camera" part. Any input, from what I recall, is still done to your player. So if you want to effect the camera by controls you have to do some things with "remote turret" or capturing keypresses, I guess.

hallow mortar
#

In a future update it will be possible to make a native functioning targeting pod camera as a pylon, though of course that depends on the vehicle having pylons, and will require a mod

split ruin
#

I want to control the camera so ...

errant jasper
#

Hopefully someone will help you, cause in that case I ain't your guy.

split ruin
#

I was having this on my mind for a week ... there should a way to do this ...

#

or maybe there is a mod for targeting pod for AH-9 🀷

errant jasper
#

Well you can look how he did it.
My guess with zero info is that config patching to add a "turret" to the heli.

digital hollow
manic sigil
#

I'm using BIS_fnc_EXP_camp_guidedProjectile to drop some cruise missiles into a tunnel entrance; I want a reliable way of detecting when the last one impacts to set off other explosives and an earthquake effect. What can I do to track the missile objects created?

sly cape
indigo coral
#

What would be the best way to script AA turrets firing into the air without hitting the plane that has my players in it? I know there's a way to do that but I can't remember the command.

fair drum
indigo coral
#

How would I go about the detonation part?

indigo coral
#

I appreciate the guidance, you guys rock

fair drum
#

and if you wanted to go full coke mode, you can build a frame system that registers/unregisters projectiles as they are fired and detects when they get a certain distance from a set of vehicles so you can trigger them and then unregister them from the system

iron flax
#

I was just doing a script were an AA missile intercepts a cruise missile, and wasn't use how to denonate the missile. I didn't know about the triggerAmmo command, I'll try it out.

fair drum
#

triggerAmmo is getting some buffs next patch 2.22

iron flax
sly cape
nocturne bluff
#

he meant

#

oh dear

#

nwm

tulip ridge
old owl
round hazel
#

Hey chaps, anybody know how I can trigger a scud strike on a position through script? I'm using the 3CB one, there's a scud strike module under effects but I'd quite like it to occur via script if possible

sly cape
# round hazel Hey chaps, anybody know how I can trigger a scud strike on a position through sc...

How I'd do it is first find the position you want to strike _myPosition = [123, 456, 789];,
And add the distance above you want it to spawn _myMissileSpawnPoint = _myPosition vectorAdd [0, 0, 4000]; https://community.bistudio.com/wiki/vectorAdd
Then _myScud = "Whatever_Classname" createVehicle _myMissileSpawnPoint; the ammo https://community.bistudio.com/wiki/createVehicle
And set it's velocity _myScud setVelocity [0, 0, -1000]; https://community.bistudio.com/wiki/setVelocity
Replace the variable names with whatever you like and of course replace the classname with the classname of the Scud's missile in CfgAmmo.

round hazel
#

You are absolutely fantastic, i'll test this out now! Do you know by chance if this will have the missile smoke, or will it just create an 'unlaunched' missile?

sly cape
open flume
#

Question, im using
player setPosATL getPosATL tpExit;
to teleport a player via Trigger, however I was wonder if/how I can make the player face the same direction as the object theyre teleporting to.

#

would it just be
player setDir tpExit;

#

nvrmind figured it out
had to set a number instead of tpExit for it :P

hallow mortar
open flume
#

dat works even better [i completely missed that when looking at the wiki XD]

#

TY!!!!!!!!!!!!

warm hedge
#

getDir returns the object's direction as a number (0 to 360) means you throw a number into setDir. So yes, that's how script works

open flume
#

gotcha, i missed the getDir entirely XD

#

tho considering theres a getPos, i shoulda figured :P

broken pivot
hushed turtle
#

There is ACE Discord server aceanvil ace3

broken pivot
#

Please send it to me I cant find it

hushed turtle
#

ACE Discord is private it seems

old owl
#

I have a feeling the bot is gonna yell at me for this but here we go xd

#

Oh wow

#

I'm shocked that actually worked pikachusurprised

#

Wait

#

That might not be it standby

hushed turtle
#

I'm in different one

old owl
#

Yeah, that one appears to have been the wrong one sorry that's my bad

south swan
#

inb4 24h mute for posting multiple invites in a row πŸ™ƒ

broken pivot
#

I was to slow notlikemeow

old owl
old owl
broken pivot
#

# Your hero!!

hushed turtle
#

That's the one

mortal folio
#

so i've made a custom armor system that's essentially a hashmap identical to the hitpoints where each hitpoint has an armor value assigned - hitpoints dont receive any damage until the armor damage receives a certain amount - im calculating armor damage in the handleDamage based on _damage, however i've noticed that the damage to armor is always much greater than damage to hitpoints, even though im feeding them the same value - im suspecting this is because the way the engine handles armor protection (i.e from a vest) is internally AFTER the handleDamage gets passed off to it, so actual armor protection never gets applied to _damage from the eventhandler; any way around this? is using the LastHitPoint context the right way to do it for armor damage maybe?

south swan
#

_damage in EH is total damage after the hit IIRC, do you compensate for that?

#

although if you're zeroing all incoming until the armor is broken it shouldn't matter πŸ€”

mortal folio
#

im aware the return is total, but the _damage passed to the handler is technically the "added damage", so the formula is current damage + _damage

#

and yeah im only adding the "added damage" (i.e _damage from EH) to the armor damage

mortal folio
#

this is the function

private _damageStates = _unit getVariable ["CE_damageStates", createHashMap];
private _currentArmor = CE_armorHitpoints select (CE_hitpoints find _hitPoint);

(
    [
        [CE_weakpointArmorDamageMultiplier, CE_weakpointHealthDamageMultiplier, CE_weakpointArmorHealthDamageThreshold], 
        [CE_strongpointArmorDamageMultiplier, CE_strongpointHealthDamageMultiplier, CE_strongpointArmorHealthDamageThreshold]
    ] select (("neck" in _hitPoint) || ("joint" in _hitPoint))
) params ["_armorTypeDamageMultiplier", "_healthTypeDamageMultiplier", "_armorHealthDamageThreshold"]; 

private _newArmorDamage = ((_damageStates get _currentArmor) + (_damage * _armorTypeDamageMultiplier * CE_damageMultiplier)) min 1;
_damageStates set [_currentArmor, _newArmorDamage];

if (_newArmorDamage >= _armorHealthDamageThreshold) then {
    if !CE_absoluteArmor then {
        if (_considerArmor > 0) then {
            _damage = (_damage * _newArmorDamage * _healthTypeDamageMultiplier) * CE_damageMultiplier;
        }
        else {
            _damage = 0;
        };
    }
    else {
        if (_newArmorDamage isEqualTo 1) then {
            _damage = (_damage * _healthTypeDamageMultiplier) * CE_damageMultiplier;
        }
        else {
            _damage = 0;
        };
    };
}
else {
    _damage = 0;
};

((_unit getHitPointDamage _hitPoint) + _damage) min 1;
#

(im handling total damage elsewhere that's why it's not being handled here, this is just for hitpoints)

#

but yeah for some reason the behaviour is that if damage to hitpoint is idk, 0.25, the damage to armor can be around 0.75 (i havent really checked for a pattern but its definetly larger for the armor hashmap and idk why)

south swan
#

_damage = (_damage * _newArmorDamage * _healthTypeDamageMultiplier) * CE_damageMultiplier; huh? "Derive _newArmorDamage from the _damage, then multiply _damage by _newArmorDamage"?

mortal folio
#

the health part of the handler works fine, it's just the armor one that doesnt, 2 hits and its destroyed in most cases, while health can take up to 4-5 to get to max damage alone (in that test case i ignored the armor completely, so no the health wasnt being affected by it)

pulsar kindle
#

I've been smashing my head with this. So, I've got this function working to randomize vests, uniforms, and backpack, it was heavily based off the BIS headgear randomization function.

Problem, it doesn't work on a dedicated server. It leaves units with no vest or helmets. I can't figure out why. I first I thought it was a locality issue, but when I noticed that helemts were being affected despite me not touching those in my function, I realize something else was wrong. I just don't know where to start looking in this case. I'm hoping someone might point me in the right direction.

This is what my eventhandler looks like in my unit config as well. Not sure if I'm running into a problem because of this.

    { 
        init = "if (local (_this select 0)) then { [(_this select 0), []] call BIS_fnc_unitHeadgear; }; if (local (_this select 0)) then { [(_this select 0), []] call TAG_fnc_unitVest; };";
    };```

This the function itself.

https://pastebin.com/2zFFHP2i
winter rose
#

@pulsar kindle please use pastebin or something

pulsar kindle
split ruin
twilit scarab
#

good scripts for making a convoy stick together with spacing and staying on the road

real tartan
#

Something that’s really bothering in the last years is how much we’ve allowed information to be gatekept by Discord.
few years ago if you ran into a problem, you could just go to the BIS forums and look for someone who already had this problem solved.
Nowadays you have to join a discord server, use their shitty search bar, don’t find what you want, and ask a burnt out dev who already gave out the same answer a million times.

split ruin
#

@twilit scarab I am using Wolfenswan's script, very robust, the only downside is the convoy doesn't push through contact

real tartan
split ruin
#

I have used this one before, Wolfenswan's script is much better πŸ™‚

split ruin
#

Better Convoy have problems when ran on headless client, you have to blacklist all the units in the convoy

real tartan
#

I usually place empty vehicles on map, and then spawn crew via script. How do group units in convoy? assuming group per vehicle and separate group per cargo.

split ruin
#

actually is better to spawn everything else but the drivers of the convoy πŸ™‚

#

u asking for Better Convoy or the script?

real tartan
#

for script

split ruin
#

just make the convoy in editor, name every vehicle like : veh, veh_1, veh_2, etc. then place markers on its route like: mrk, mrk_1, mrk_2, etc
then just run

[veh,"mrk", 15] spawn ws_fnc_taskConvoy;

15 is the speed limit of the convoy, default is 15 I think but you can change it
the convoy will start moving on route and then stop when reaches final destination, everyone will dismount at the last marker

#

you can spawn the vehicles or the markers just name them like in the example

#

I am actually lookin to change the script so have the option the convoy to push not stopping when attacked
otherwise this is the best script I have used

manic flame
#

Objective is: The alarm begins playing for all players locally, then we want them to stop it, so I use CBA global events to replicate

exotic gyro
exotic gyro
fair drum
#

People keep going man, if only I could get this script that was posted 12 years ago it would fix my problem. When really it would either barely run, or it would tank your performance.

mortal folio
#

i just found out something interesting - HandleDamage on a vehicle that uses the armorComponent system returns the new final damage as _damage, compared to HandleDamage on things that dont use armorComponent (such as every Man unit for example or vehicles that dont use armorcomponent) where you have to do _damage + _currentDamage

hallow mortar
#

No, that's the same way as handleDamage works for Mans

#

You don't do _damage + _currentDamage to find the final damage, you do _damage - _currentDamage to find the hit size

mortal folio
#

nvm yeah misspoke, went into sqf too early in the day and did a whoopsie notlikemeow

mortal folio
#

pretty sure i've been getting sqf fatigue lately working with damage systems suffer seeing unicorns and "why... oh that's why"'s

split ruin
#

what exctly does this function ? πŸ€”

[renderTarget, cameraParams, vehicle, replace] call BIS_fnc_PIP;

I want to make player to recieve feed from enemy UAV ...

#

ok, I am getting feed from enemy UAV with

_UAVFeedDisplay = [opforUAV, player, player, 0] call BIS_fnc_liveFeed;
private _UAVFeedDisplay = uiNamespace getVariable "BIS_fnc_PIP_RscPIP";

so cool for "drone detector"

#

I am not sure I am getting what the uav is loking or just feed from the uav to player πŸ€” doesn't matter really, especially for fpv drones lol

#

is there a way to make video feed window a little bigger ? Even like it is is clearer then in Chuyka drone detector mod 🀫

twilit scarab
split ruin
#

@twilit scarab not sure because there are parts of the script making them leave the vehicles ...
these part can be removed because if the convoy suddenly turns into open field battle its not a convoy mission anymore πŸ˜†

twilit scarab
#

ya that sucks, Id probably try to keep my infantry and the convoy seperated as much as possible group and script wise

#

maybe if you just force the drivers to be careless

split ruin
#

I will do some testing, I want to change the script so it keep moving even under enemy fire

#

this part should be removed I think

    // If convoy was engaged exit the loop and set the convoy to combat mode
    if (({!canMove _x || !alive _x || (!isNull (_x findNearestEnemy (getPosATL _x)))} count _convoy) > 0) then {
        _run = false;
        {[(group (driver _x)),"COMBAT","NORMAL"] call ws_fnc_setAIMode;} forEach _convoy;
    };
#

test it and share results if possible ...

old owl
#

We had some issues recently we suspected may be caused by the way we handled group deletion so we made the following change:

-{
-    if ((units _x isEqualTo []) && local _x) then {deleteGroup _x};
-    uiSleep 0.02;
-} forEach allGroups;
+addMissionEventHandler ["GroupCreated", {
+    params ["_group"];
+    _group spawn {
+        uiSleep 60;
+        _this deleteGroupWhenEmpty true;
+    };
+}];

Can anyone here think of any edge cases where this may not work, or somewhere this might cook us we are not thinking of? From what I tested locally it seems okay, but a little spooked to merge since I don't ever really need to tamper with groups and haven't used this event handler before.

old owl
old owl
oblique arrow
#

Hi peeps, I need a quick sanity check to make sure what I'm doing makes sense.
I'm currently tweaking the basegame debrief screen to add a button that automatically copies all the group members of the players(/pressers) group into a certain format (see pic)
But on the debrief screen the player unit already doesnt exist anymore (turns into Null object) so I cant get the players group nor group members
Thus I add an eventhandler ('Ended') which records the player, player group and each group members name+color team, this all then gets funneled into profileNameSpace(?) so I can read it when the button is pressed on the debrief screen
Any thoughts/complains?

old owl
young mist
#

I think im missing something here. It wont deactivate the triggers.

granite sky
#

I'm not sure whether you're intending to disable the triggers temporarily or permanently.

hushed turtle
#

I thought I one can disable simulation to disable trigger

cosmic lichen
turbid jolt
#

@sacred fox You need to make a cfgnonAIVehicles class for that proxy object

oblique arrow
cosmic lichen
#

Yeah, looks like it indeed. TBH I'd use the same font but a wider button.

#

Or go with just "COPY" and add the detailed text to the tooltip.

oblique arrow
tardy panther
#

I have a bit of a complicated question im working on a lore item and I want to take a launcher slot but once dropped on the ground i want it to have a unpack prompt and swap it model for a object

(Kinda how the vanilla drone back packs work)

hallow mortar
#

You can probably make some kind of scripted system, but it's not going to be simple.
It might be easier to have an action when the weapon is in your inventory, rather than trying to make it work when it's on the ground.

split ruin
#

I need event handler that triggers when speaking on VON, is there one ?

old owl
#

Well, I guess I said I didn't believe so. I guess maybe why you're asking again?

#

As far as I know though, none exists.

#

@split ruin Actually though might've found you a better solution depending on what your use case is. Looks like getPlayerChannel returns the channel ID that the player is using when they're speaking.

If you're looking to detect when they start speaking, the actionKeys method I answered earlier might be better.

If you're wanting to show when they're speaking though using some sort of drawIcon3D, some other on frame event handler / quick loop or voice of other player; the getPlayerChannel method will probably be much better.

Apologies if I sounded bitchy, didn't mean to. Went to look back to where I responded to someone and saw I responded to you. Best of luck in whatever you're working on πŸ™‚

split ruin
#

I as again because first I forgot and second I really hope this EH exist, can you imagine mixing sounds with radio ? like explosions of attacked base etc

hallow mortar
split ruin
#

@old owl I am very dumb ... how is named the "Push to talk" key ? Keyname ?

addUserActionEventHandler ["KeyName", "Activate", {
    params ["_activated"];
}];
old owl
#

The instance I linked though I used true to block usage of the key. Assuming you still want the key usage to go uninterrupted, I believe you'd return false if I am remembering correctly

#

The findDisplay 46 is just adding it to the main mission display. You could use any display you want though or even in a specific UI class by using onKeyDown instead of KeyDown

hallow mortar
#

It can be any of pushToTalk, voiceOverNet, PushToTalkAll, PushToTalkCommand, PushToTalkGroup, PushToTalkVehicle, and PushToTalkDirect

#

If you are using a User Action Event Handler you do not need to use actionKeys or look for specific key codes. The EH refers to the event by its action name, not by the keycode like a keyDown event handler would.

old owl
#

Oh I kinda missed he was attempting to use it with addUserActionEventHandler. That's much better than displayAddEventHandler in this context for sure- honestly forgot that event handler existed.

#

Sorry about that.

#

Now that I think about it I wonder if we use that in our mission any. Might be a way of avoiding issues described here #arma3_scripting message thonk Ah nah nevermind it wouldn't :/

twilit scarab
#

Im using the Follow Road function but sometimes when they get to intersections they bug out and get stuck in a loop trying to decide what road to take, when it should be obvious...

#

Idk if this is specifically a problem with Sefrou Ramal or what

#

But if anyone knows how to force a decision or make them go straight that would be nice

thin fox
twilit scarab
#

The AI drives like its drunk with just move waypoints

#

Maybe I need a way to toggle the Follow roads function so it can be turned off for any intersections

zealous solstice
queen cargo
#

@zealous solstice does it supports breakpoints?

#

((ohh wait ... just had a great idea what i could do with intercept))

#

would be exactly what i need right now XD
have to find out why my code is not willed to properly create objects for me ...

zealous solstice
#

no

#

its just reading and writing variables

queen cargo
#

but isnt it quite useless then?

zealous solstice
#

no

#

you can too read "thread" and kill the threads

#

and did you ever try to read a variable in one line?

queen cargo
#

you mean the spawn stuff?

zealous solstice
#

yes

queen cargo
#

still, i do not rly see where the benefit for the reading is
the spawn stuff ... ok ... that actually can get useful but only on debuging other ppls mods/missions
however, the rest is possible with pure SQF already

still forum
#

Ive seen that tool already... made by a hacker called douggem... as i remember it looks very similear..

queen cargo
#

tbh @still forum ... thats litterally the most basic UI elements you can throw together

zealous solstice
#

yeah the base idea is from there

queen cargo
#

thus i would not accuse @zealous solstice of being a hacker

still forum
#

i didnt ^^

queen cargo
#

implicitly you did

zealous solstice
#

i did it for debuging and it will not run on Battleye server for reasons

still forum
#

Being a hacker is not really a bad thing.... Doesnt mean youre using it for bad stuff

queen cargo
#

the word hacker carries bad habit with it

#

thx to 4chan that bad boy πŸ˜ƒ

granite sky
#

Anyone remember what the new-ish command was called to get more information about the pathfinding state of a unit?

#

ah, getUnitState

sullen marsh
#

Who is this 4chan

queen cargo
#

wohoooo ... so now just one thing to solve before i can release XInsurgency 2.0 ...
fukcing units dont spawn where they should and even though, im using random selection of buildings, they always tend to spawn in the same one -.-*

#

btw. anybody some idea for an arma "continue" equivalent for loops?

#

only idea i yet had was this:

while {<yourcondition>} do {
    scopeName "continue";
    while{<yourcondition>} do {
        breakTo "continue";
    };
};```
#

but thats kind of shit

radiant lark
#

Not an EH tho, sorry, didnt even read 😭

#

I use it inside a draw3D EH

tough trout
#

Is it possible to include a condition on a HoldAction to restrict it to a player with a specific variable name?

graceful current
#

hello chat, very green with sqf + triggers, is there a way to make a trigger that activates continuously every x seconds?

split ruin
#

@graceful current

//REPEAT FOREVER TRIGGER 
//every 5 sec
true && round (time %5) ==5
//good when you need a trigger for alarm for example
//every 5 sec the trigger will re-execute the code 
//works only with repeatable triggers 

edit: my mistake you have to have true instead of **this **πŸ™‚
in case you need only time to be condition

graceful current
#

ty <3
assume i bung this on a trigger in the Conditions field?

split ruin
#

yes

graceful current
#

sound

split ruin
#

@old owl I have a "real" radio now (with radio clicks) 🀩

//initServer.sqf
addUserActionEventHandler ["pushToTalk", "Activate", {
    params ["_activated"];
    playSound3D [getMissionPath "radio.ogg", player];
}];
addUserActionEventHandler ["PushToTalkCommand", "Activate", {
    params ["_activated"];
    playSound3D [getMissionPath "radio.ogg", player];
}];
tulip ridge
#

@graceful current ^

graceful current
#

is the interval option not for how often trigger should check for criteria?

split ruin
#

exactly

tulip ridge
#

Yes

#

That way you're not checking if it's been 5 seconds, every 0.1 seconds (which is the default iirc)

#

The default is way too low anyway imo, could have easily been set to 1 as a default and been fine

split ruin
#

does anyone knows how to get rid of all the info (caller name, channel) when having vanilla radio calls?

#

the guy needs self repeting trigger, people are telling to change condition evaluation time ... I don't inderstand these are two completely different things πŸ€”

tough trout
tulip ridge
#

Your code is doing the dame thing as the just changing the interval

granite sky
#

(except slower)

queen cargo
split ruin
#

oh yeah, wtf am I on meowfacepalm

digital hollow
#

Does anyone know if drawLaser renders in pip? Possibly "no" for ir laser in nvg pip

real tartan
#
[getMarkerPos "marker_0", civilian, 7 ] call BIS_fnc_spawnGroup;

does not work, as there is no civilian case in switch inside function 😒

winter rose
proven charm
#

well this works [getpos player, civilian, ["C_Man_casual_3_F","C_Man_casual_1_F"] ] call BIS_fnc_spawnGroup;

granite sky
#

So civilian + number doesn't work.

winter rose
#

aaah, yes, it uses groups indeed
civilian + classes works though yes

I'll add a note on the wiki about that specific case
edit: done

proven charm
#

also: CfgGroups entry - works.. probably not

brittle badge
granite sky
#

Are you talking about your own revive system or the BIS one?

#

If it's your own then the basic tools are the HandleDamage EH and setUnconscious.

brittle badge
# granite sky Are you talking about your own revive system or the BIS one?

Yes, I'm trying to script my own new medical system (for public Zeus). In the standard settings, there is "revive ON/OFF" and "basic or advanced" and "required items" as far as I know. Let's say we take the standard settings "revive for players yes, basic, no required items," then the player goes, from 50% health, by default into the incapacitation mode where their life is then reduced to 5%. Upon a revival, the HP is then set to 100%. I now want the incapacitation to be set only from 12% (for example) and the player then be set to 13% after being revived so that they can be treated or treat themselves. I also already have my own UI interface for this; I just now need the necessary functions.

hallow mortar
#

The BI revive system is a scripted system, not engine behaviour. It doesn't have controls exposed for things like that.
If you want to make your own system that does have that sort of control, you need to turn off BI revive and make your own system.

brittle badge
hallow mortar
#

I guess 🀷

hushed turtle
#

I thought revive is configured by mission, not server

brittle badge
proven charm
#

should be disabled by default

brittle badge
meager granite
#

Is there an event for engine refueling or something close to it? (Fuel station, fuel trucks, etc.)

hallow mortar
#

There is service Mission EH.
I don't know if it also covers scripted resupply.
There's also Fuel object EH but it seems to be very limited (only fires for "no fuel"/"some fuel" transitions, not any refuelling)

proven charm
austere granite
#

How does one one about creating an extra Exit / leave / whatever button? I got a custom spawn thing and want an exit button on it. I'm trying to use RscDisplayRespawns buttons and code, but no luck with it

queen cargo
#

leave/exit/whatever is all done using normal SQF functions

#

Respawn just is player setDamage 1

#

"to lobby" is a simple end mission command

#

and exit is ...

#

well ..

#

good question actually

#

could not tell right now tbh if it is in the menu available

austere granite
#

I'm checking this code here now and there's no end mission for some reason

#

That's the weird thing

#
    case "buttonCancel": {
        _params spawn {
            disableserialization;
            _ctrlButtonCancel = _this select 0;
            _text = if (isserver) then {"str_msg_confirm_return_lobby"} else {"str_msg_confirm_return_lobby_client"};
            _cancel = [localize _text,"",nil,true,ctrlparent _ctrlButtonCancel,true] call bis_fnc_guiMessage;
            if (_cancel) then {
                _ctrlButtonCancel ctrlremovealleventhandlers "buttonclick";
                ctrlactivate _ctrlButtonCancel;
            };
        };
        true
    };

Just this. No other EHs on said button and this is the only code that gets run

queen cargo
#

check the code in bis_fnc_guiMessage

austere granite
#

Doing the same thing myself

#

Ahk, it's a matter of doing closeDisplay 2 on 46

little eagle
#

findDisplay 46 closeDisplay 0

#

or my fav:
_a = {call _a}; "call _a" configClasses configFile
works on servers too
πŸ˜›

queen cargo
#

stackOverflow

austere granite
#

Alternative kick command

real tartan
#

is there an event handler to check if object changed position ? rather than loop and check for pos ?

#

object could be unit (animChanged EH ?)
vehicle (getSoundController ?)
static object that was moved by zeus

fair pilot
#

No

#

For zeus there are CuratorObjectEdited

#

But you need to add it to the curator module

verbal shoal
#

hey yall, im running into an issue with my ejection seats. This solved the issue where players in the transport could eject the pilot, however now players cant get out of the aircraft unless its stationary on the ground. This makes it so our parajumpers cant leave the aircraft. Does anyone know a way that could make it so passangers can still jump ("eject") out without interfearing with the pilot?

old owl
verbal shoal
old owl
#

You're good! πŸ™‚

verbal shoal
old owl
verbal shoal
verbal shoal
old owl
#

!sqf

wicked roostBOT
#
How to use SQF syntax highlighting in Discord

```sqf
// your code here
hint "good!";
```
↓ turns into ↓

// your code here
hint "good!";
verbal shoal
#

that said, it is the vanilla ejection script except i deleted the lines that had to do with animation

old owl
#

Ahh okay. Looks like there's a lot in here that seems really specific to the cockpit. The solution I propose of changing this -> player probably isn't best here. For the passengers, do you just want them to be able to have the ability to simply just get out of vehicle when they use the eject action?

old owl
#

Oh sweet! I got you then 1 sec

old owl
# verbal shoal yessir!

Sorry for the time it took- currently fighting a losing war against my internet right now πŸ₯² but this should work :D

class Plane_Fighter_01_Eject
{
    priority=0.050000001;
    shortcut="Eject";
    displayName="<t color='#ff0000'>Ejection Seat Activate</t>";
    condition="(player == driver this && {speed this > 1}) || (player != driver this)";
    statement="if (player == driver this) then {[this] spawn W41_fnc_planeEjection;} else {player moveOut this};";
    position="pilotcontrol";
    radius=10;
    onlyforplayer=1;
    showWindow=0;
    hideOnUse=0;
};
old owl
#

Oh wait

#

I trolled sorry forgot this after driver in the statement

#

Should be good to go now, also changed hideOnUse to be 0 assuming you want them to be able to use it again when they get back in

#

Ope

#

It was already deleted

#

Haha

verbal shoal
#

BOT DETECTED

#

lmaooo

old owl
#

Yay!! You're very welcome πŸ˜„

past wagon
#

how do I make a player spectate another player in 3rd person?

#

creating a camera and attaching it to the target is not working -- very janky

past wagon
hallow mortar
#
_alivePlayer switchCamera "EXTERNAL";```
hushed turtle
#

Why not EGSpectator?

hallow mortar
#

That would work too. Depends whether you just want a very basic camera or a more fully featured spectator.

past wagon
#

I want nothing but a 3rd person pov on another player

past wagon
hallow mortar
#

I think that's why I suggested it

past wagon
#

i was confused about how the parameters worked

harsh vine
past wagon
#

great

#

its gonna be best br ever 🀩

harsh vine
#

nice looking forward to it 🫑

steep rapids
#

Hey @still forum
Im trying to get the remoteExec to server to switch mission files through a hold action but its not working.

["blaze51", "#51_intro.Kamino"] remoteExec ["serverCommand", 2];

#

This is for swapping missions on a dedicated server with a password, and the user isn't admin

winter rose
#

#51_intro.Kamino is not a server command

steep rapids
#

["blaze51", "#mission 51_intro.Kamino"] remoteExec ["serverCommand", 2];?

winter rose
#

how would you use it if you did not remoteExec it?

lone steeple
#

Hi everyone!
I’m currently working on a heavy-lifting mod (JC_Lifting) and I'm trying to replace the vanilla synthetic ropes with custom industrial chains.

I've attempted the official Wiki 'Rabbit Rope' implementation (defining the Rope in CfgVehicles and the segment in CfgNonAIVehicles with simulation = "ropesegment"), but I can't get it to render custom models or textures. Even the raw Wiki example doesn't seem to workβ€”it just renders the standard vanilla rope.

What I've tried:

  • ropeCreate using the 8th parameter for a custom class.
  • Model swapping to VRRope.p3d and custom models with hiddenSelections.
  • Path hijacking (\A3\Data_F\Helpers\Data\rope_co.paa).
  • Overwriting SlingLoadRope directly in CfgNonAIVehicles.

Is the ability to override procedural rope segments currently broken or hardcoded? Or is there a specific trick to getting the engine to recognize a custom segmentType in 2026?
Any insights?

Cheers!
🍻

P.s.: the "rabbit" attempts I mentioned are those from official wiki:
https://community.bistudio.com/wiki/Arma_3:_Ropes?useskin=darkvector
and
https://community.bistudio.com/wiki/ropeCreate?useskin=darkvector

steep rapids
winter rose
#

!purgeban @alpine bay 1h crypto hijack

lyric schoonerBOT
split ruin
#

@steep rapids players to have access to console ? 🫣 πŸ’€

steep rapids
#

A prop

#

I figured it out anyway

old owl
wind hedge
tulip ridge
#

Sets or gets the combat pace for the local player.
That's the double tap C walk with the gun up

old owl
past wagon
#

im using _target switchCamera "EXTERNAL" to make a dead player (seagull) spectate an alive player (_target). The problem is that when the target uses NVGs, the spectator doesnt see it. The spectator cant enable their own NVGs either. How can I allow a player to see with NV while their camera is switched to the target?

#

even when the spectator is an alive player with NVGs instead of a seagull, they still cant use NV. is there no way to allow NV while switching a player's camera?

past wagon
#

I wish I could look at BIS_fnc_EGSpectator inside the functions viewer to see how they do it, but all the EGSpectator functions are inexplicably MISSING from the functions viewer meowsweats

fair drum
#

many functions are inline includes. open up the a3 source in vscode and search for the include

past wagon
#

oh they showed up after I recompiled all

old owl
#

Has anyone experienced an issue where you cannot select a slot like shown in the attached video?

https://insightsgg-user-content.com/ue2/videos/e14a888c04501473173a5462231b3fc3def3c1e2/video.mp4?token=YF5zhQ1P-hj7OQHoAGla1o7zGsabEBpecEO779lJUw8&expires=1777032000

We had a user submit a bug report with us showing that they can connect and join other servers just fine, but for whatever reason; have an issue with ours. They've also claimed to have followed the following steps from advice of others:

  • Using a new profile.
  • Deleting their %localappdata%\Arma 3 folder.
  • Disabling all client-side mods.

First thing my head goes to is some weird BE issues as I've heard of that causing weird issues with the lobby. Although he doesn't seem to have any issues with other servers, which makes me think not. I would also like to think could be that he needs to delete his mission, but if he truly did follow the steps above; then his mission should've been deleted.

#

Also I should note it appears he is on main build from another video he had attached.

past wagon
#

if im making a mission where everyone has 1 life, and becomes a spectator after they die, how should I set up the death/respawn system? should the player enter a dummy unit after they die and THEN have their camera switched to an alive player's view?

#

I'm so lost. When I use switchCamera to make a dead player spectate an alive player, everything is blurry because theyre dead

#

and apparently theres no possible way to use night vision with switchCamera anyway so that command is literally useless at night??

#

whats the proper way to do this? what kind of spectating system was the engine designed for? I dont want players to be able to freely spectate others. they need to request their permission, and I want their view to be locked to the alive player's view

#

is there a way to call EGSpectator to do nothing except set the dead player's view to that of the target? I dont want any BIS spectator UI elements on the screen

fair drum
past wagon
#

I dont know what to do at all

fair drum
#

if you want to keep the player from respawning, but not dead, you can set the players respawn time to -1 but you have to wait for the player object to transfer and not be null, but still not alive. this is how you create you own respawn systems

past wagon
#

My goal:

  • mission starts
  • if you die, you go to "spectate menu" where you can request to spectate any player
  • if a player approves your request, your view is switched to theirs
past wagon
#

I really dont know where to start

#

what do I set the respawn type to?

fair drum
#

through description.ext, not that

past wagon
#

what do I set it to tho?

#

BIRD?

#

INSTANT?

fair drum
#

this custom respawn system stuff isn't documented, because its still pretty experiemental and I can't seem to find my old code before my carrier strike migration. but when i did my custom respawn system, i used base and I also had my own custom ui that when confirmed, it would pull the player out of limbo spawn (timer at -1).

#

what you want to do might not be possible at your level without someone fully writing it for you. but i would check out those handles i posted above to see if you can get it to trigger when someone changes focus in spectator. then you can do whatever you want when that event occurs. its going to take experiementing if you want to deviate from the default systems because the functionality isn't that customizable out of the box

past wagon
#

I dont care about someone changing focus in spectator

#

i dont really know what that means

fair drum
#

you just said you want to approve requests, that is when that would happen.

past wagon
#

what do you mean by changing focus?

fair drum
#

when you click on the player name bar in spectator to change who you are spectating

past wagon
#

in the default spectator UI?

#

I want to have a custom UI

#

press button on custom GUI -> make dead player spectate alive target

fair drum
#

then you need to do the player limbo thing and experiment with it. see what happens when respawn time is set to -1 as they are respawning while on BASE

past wagon
#

ok

#

thanks

fair drum
#

don't soft lock yourself lol

fallow pawn
#

Does the scripted event handlers "arsenalOpened" and "arsenalClosed" fires twice for everyone or is it just me? 😭

fair drum
#

make sure you didn't accidentally dupe it somewhere

fallow pawn
hushed turtle
harsh vine
past wagon
harsh vine
#

oh im adding team buy back to mine

pallid palm
#

and btw i found that no One ever wants to play No Respawn missions: that's why i made my missions to have diff selected respawns

#
class Params
{
    class Respawn
    {//paramsArray 0
        title = "Respawn";
        values[] = { 0,10,11,15,20 };
        texts[] = 
        {
            "infinite Respawns",
            "10 Total Respawns",
            "11 Team Respawn",
            "15 Total Respawns",
            "20 Total Respawns"
        };
        default= 11;  // this is Now Set for Team Respawn
        code = "";
    };
};
molten yacht
#

hey question

#

could you rig it so a UAV terminal is somehow connected to a Person, much like how zeus is actually controlling a person like a UAV?

warm hedge
#

No but you can remoteControl it

past wagon
cosmic lichen
#

Afaik there is no way to do that in vanilla. You probably have to write your own spectator script based of the BI one.

past wagon
#

well I can use _target setCamera "EXTERNAL" to get the desired effect (minus the NV). It works smoothly when tested with 2 alive players. When used on a dead player the view is blurry.

#

I think i just need to figure out how to handle respawns and then itll work

#

maybe add bright night locally for spectators since NV isnt possible with switchCamera

split ruin
pallid palm
#

but i bet, in that case: no one will let anybody Spectate them, cuz of the telling of other players position, or cheating as it were

#

try this to keep the blurry stuff away

#
BIS_fnc_feedback_allowPP = false;
#

i like No respawn missions: i just found, that most people don't like it:: i really like Team Respawn missions

hushed turtle
#

It can work in short missions or in Battle Royal

split ruin
#

if the mission is around 1 hour its the perfect tension building effect you can have

thin fox
#

we never completed that mission

split ruin
#

ACE medicine helps a lot and there is option to make units to take a little more damage before going down
it helps especially when someone is not really tier 1 operator πŸ™‚
try not to stay exposed to enemy fire
sometimes you have to take your chances, shot in the head is how sometimes soldiers die πŸ™‚

thin fox
small perch
#

is there a way I can run code whenever a Ace Medical wound is created?

hushed turtle
#

There should be EH for that

small perch
#

I see, would I add the eventHandler the same way I add base-game ones?

hushed turtle
#

It's scripted EH

#

It gets added by CBA function

#

Looking into ACE I don't see any wound created EH

#

What are you trying to do?

tulip ridge
#

There is, it's ace_medical_woundReceived

hushed turtle
still forum
small perch
#

so how do I actually add the eventHandler to a specific unit?

#

nvm, figured it out

hushed turtle
#

You don't add it to unit

small perch
#

it seems to work just fine if I do add it to a unit tho

#

I see, it doesn't work just fine.
so how do I use it to work only for specific units?

hushed turtle
#

It fires for every unit and every time you have to check if that's right unit

small perch
#

I see, would I then add the eventHandler on Init?

#

also what Parameters does it have? I looked on the wiki that you posted to see if I could find it on other pages but I could not find any parameters. I only need the unit and wound type

tulip ridge
# small perch so how do I actually add the eventHandler to a specific unit?

Jouklik already kind of explained but CBA event handlers are added to a machine, not any specific object. But you get the unit that received the wound in the event handler, so it's pretty easy to filter stuff out

["ace_medical_woundReceived", {
    params ["_unit", "_allDamages", "_shooter", "_ammo"];
    if !(local _unit && _unit == theUnitYouCareAbout) exitWith {};

    // whatever you want
}] call CBA_fnc_addEventHandler;
#

_allDamages being the array of all the wounds that were received

/*
Example output of _allDamages. Note that body parts are sorted by the damage they recieved.
Values are:
    0: Actual damage
    1: Body part
    2: Damage *before armor reduction*
_allDamages = [
    [1.06597, "Body", 17.0556],
    [1.06597, "LeftLeg", 17.0556],
    [1.06597, "RightLeg", 17.0556],
    [0.411558, "RightArm", 6.58492],
    [0.353302, "LeftArm", 5.65284],
    [0.189946, "Head", 2.27935],
    [0.0527364, "#structural", 0.210946]
]
*/
#

Tweaked it slightly for some extra precaution in case you add it on other machines

small perch
#

I was kinda hoping it would have the name of the created wound rather the damage number, is there a way to get that? if not then this will do, thanks!

tulip ridge
#

_ammo is the damage type (i.e. bullet, explosion, burn, etc.) but that's as close as you'll get

hushed turtle
#

Maybe we can check current unit's wounds from this EH?

tulip ridge
#

You could

small perch
#

is there maybe a way i could use a Wound Handler to figure out what damage type was done?

tulip ridge
small perch
#

there has to be a way to get the actual wound, it needs to be created somewhere

small perch
real tartan
#

I was hoping for some generic CfgNotifications class, so I don't need to define it in config in order to use it. Wish there was some "default" with %1 for parameters

hushed turtle
#

What is actual wound though?

tulip ridge
small perch
tulip ridge
#

I think there's an explanation on on the ace wiki somewhere, but I just put that example in all of my custom wound handlers

small perch
hushed turtle
#

Maybe it's possible to read it on the unit

tulip ridge
#

You can, but you'd get all wounds on the unit not the ones that were just created

small perch
#

technically if I do that every time wounds are created I could compare the wounds to the old ones, probably not a good way to do it

tulip ridge
# small perch there has to be a way to get the actual wound, it needs to be created somewhere

There's not really a way to get the wounds created by the damage. The general flow is:

  1. Vanilla handle damage is raised, ACE hooks into it and decides the damage type, and raises the woundRecieved event.
  1. ACE takes the params passed to woundRecieved all runs all the applicable wound handlers for that damage type.
  1. The applicable woundHandler then handles things like adding new wounds to the unit, setting fractured limbs, etc.
small perch
#

that sucks

#

thanks anyway

split ruin
#

what is the intent behind all that?

tulip ridge
#

Intent behind what

split ruin
#

I mean getting the inflicted wounds, etc . what is he trying to do ?
I am just curious

small perch
#

It is honestly for math calculations, working on a simple incapacitation mod as both testing how everything works and for a scenario
was gonna have the chance to incapacitate ai be based on the would dealt so bruises would be the lowest (unless on the head) and stronger wounds would be more likely, I will just use the damage number

split ruin
#

so basically what ace does but with vanilla ?

small perch
#

not exactly, it would use ace but instead of using the base ace ai unconsiousness it would use what my code is doing, which is fairly different from how the ace one works

split ruin
#

but with the same effect or you will add something else?

small perch
#

currently I have it working similarly to Project Injury Reaction with the ai playing a injured animation depending on where they were hit. I am kinda copying (not copying any of the code) what that mod has but my own take and without the medical

#

how can i print all the values from _allDamages ? (this don't work)

tulip ridge
#

That's not how selecting values works

small perch
#

:(

tulip ridge
#

Can just do this if you want each index on its own line

{
    systemChat str _x;
} forEach _allDamages;
small perch
#

wow that's so much simpler, thanks!

#

what is the structural damage mean?

tulip ridge
#

It's kinda like overall damage for the hitpoint, its tracked but mostly ignored by wound handlers iirc

#

Stuff like drowning only deals structural damage for example

#

From Baer

small perch
#

so when ace creates a wound does it only take into account the most damaged limb?

tulip ridge
#

For the most part yeah, arma can/will have damage bleed over quite a bit

#

So shooting someone in the arm can damage the chest and whatnot

granite sky
#

The part where ACE tries to figure out which was the most damaged limb for a particular hit is actually pretty complex :P

#

Would be easier now due to the added context param on HandleDamage, but I don't know if they rewrote their stuff for it.

#

I think there are some bugs there too, because if you shoot a unit directly between chest & abdomen hitboxes then ACE generates two wounds.

tulip ridge
analog bluff
#

Hi, I'm looking for someone who can make some patches for the game. If anyone can do it, please contact me; I'll pay for it.

sly cape
real tartan
proven charm
#

well you can make that "default" class your self

real tartan
#

indeed

proven charm
# real tartan indeed

looks like there are predefined classes and default in configfile >> "CfgNotifications" >> "Default"

real tartan
#

yes, but no %1 values, as everything is predefined to empty string, so can't really create custom notification without defining class first

proven charm
#

oh

split ruin
#

@real tartan is it that difficult ...

class CfgNotifications
{
    class friendly
    {
        title = "Friendly Reinforcements";
        iconPicture = "\A3\ui_f\data\igui\cfg\simpleTasks\types\radio_ca.paa";
        iconText = "";
        description = "Friendly reinforcements arrived on the battlefield!";
        color[] = {1,1,1,1};
        duration = 5;
        priority = 0;
        difficulty[] = {};
    };
};

just change the classname, title and description, done in like 2 minutes ...

split ruin
#

call with

["friendly"] remoteExec ["BIS_fnc_showNotification",0];
old owl
#

Super vague question; but does anyone know the specifics of what damage handling changes were made to the Ghost Hawk (or perhaps aerial vehicles in general) a while ago?

#

Can't really remember when they changed but maybe less or around a year ago?

small perch
#

I want to run code on a unit whenever either of these Zeus Modules is used on a unit, how do i do that?
the Heal I believe is vanilla, the Toggle Unconscious is from Ace

tulip ridge
#

There are events for when those things happen (getting healed and going uncon / waking up), but not for the modules specifically

small perch
#

I see, thanks

hallow mortar
#

You could use an entityCreated mission EH, or CBA class event handler, to detect when one of those modules is placed

#

Getting the target unit would be more difficult, but you could look at how the module function does it and then do the same

tulip ridge
#

Modules just attach themselves to the unit

#

Well for those kind, where you take the module and click on an object

hallow mortar
tulip ridge
#

Never seen the mouseOver bit, everything I've seen has used curatorCanAttach =1 in the module config

#

Interesting

old owl
proven charm
#

idk but they no longer explode if flipped

hallow mortar
#

2.18: collision detection for vanilla helo rotors was made more accurate; a mission option was added to ignore helo trickle damage when upside down
2.16: helos no longer explode instantly when upside down

old owl
#

Right now just trying to get specifics on how the damage handling of rotors has changed values wise. Hawks are a large part of faction balance in our mission so they've become a subject of debate recently as the rotors are much easier to be taken out with a MK-1 or other weapon.

#

Ideally just looking to impose changes via handleDamage event handler to put it back more how it was before so can put the argument to rest on both sides for a while. I do wonder though how that will affect the changes Nikko mentioned as it sounds like the changes might have been made to accommodate the upside down changes in 2.16 maybe?

hallow mortar
#

The 2.16 change was literally just "there was a special piece of code that instantly kills the helicopter if it's upside down, and we turned that off".

hushed turtle
#

Heli didin't even need to be upside down. It was enough to be flipped 90 degrees to right or left while touching ground and heli exploded.

primal trench
#

Is there a way to disable simulation for a physX rope, effectively "freezing" it in whatever position it's in?

proven charm
#

attach the rope to something invisible?

old owl
#

Never tried so take with a grain of salt but could you use the ropes command to get the rope objects and disable simulation like this maybe?

{
    _x enableSimulation false;
} forEach (ropes object);
small perch
#

I am not sure if it is better to ask this here or #arma3_animation but is there a way to force certain bone's rotation outside of animations?
I was looking at how dismemberment mods deal with removing limbs and the 2 ways I saw.
The "DISMEMBERMENT+GORE" mod replaces the uniform with a version that is missing certain limbs. This is not great as the original clothing is replaced with a bloody body.
Then Webknight's "Death and Hit reactions" mod makes the lower arm rotate into the upper during the animation, then he attaches a stump to the bottom of the limb. This is not perfect because it relies on the animation and fully breaks if the animation stops playing for any reason.
My idea (if possible) is to force the lower arm/leg bones to rotate into their upper part and have it override any playing animations.

brittle badge
#

Γ€mm. i checkt my server logs and saw this:

Warning Message: You cannot play/edit this mission; it is dependent on downloadable content that has been deleted.\na3_characters_f

and i so.. what?

#

any idea?

granite sky
#

Normal error, doesn't do anything.

glossy pine
#

I'm currently creating a simple weapon object using Syntax 1 of createSimpleObject because it's the only syntax that lets me spawn it directly from model path. According to the wiki, this syntax doesn't support texturing. I'm trying to use setObjectTexture, but it doesn't apply the skin. The weapon model has hiddenSelections (camo1 and camo2) defined, along with hiddenSelectionTextures pointing to the .paa files. Syntax 2 allows texturing, but it seems to be restricted to CfgVehicles only. Why is that?

pallid palm
#

ah haaa i got it Woohoo

#
player addAction [
    "<t color='#FF0000'>Player Reload</t>",{
    [] call SFA_fnc_playerReload},
    [],
    1.5,
    false,
    true,
    "",
    "true"
];
mortal folio
#

I dont know how or why but my server somehow got a script error on a script that is inside of an addaction action expression (that most definetly should not be callable by a server) meowsweats

winter rose
#

it may not have executed it, but if the script file is read by the server, it is enough 9f a wrong the syntax to trigger a parsing error

mortal folio
#

the whole thing is entangled in so many functions and i dont have reproductibility so... errr... simply behold my bewilderment sadpepe

small perch
#

Is there a way to force certain bone's rotation and have it override animation rotation of that bone?

warm hedge
#

No

small perch
#

I see, thanks

versed trail
#

are there any group-related handlers that are attached to the player instead of the group? like something for when a player leaves / joins a group thats not attached to the group itself, when it might be hard to track, e.g. dynamic groups system, where I'm trying to trigger events when people leave or join groups but those groups arent very easily trackable

hallow mortar
#

Doesn't look like it. However, there is a mission EH for GroupCreated, so you can detect and track all groups

versed trail
#

yeah I saw that, it's not great because presumably when that event runs its just been created so I cant distinguish it at all from any other group that might have been made through a different scripted system, but I did make it work. thanks

edgy dune
#

how can I tell when to use getPosATL vs getPosASL?

#

like how would I detect im over water vs over ground

#

basically tryna spawn something at the same position as something else, I guess I could use attachto and unattach a frame later?

mortal folio
#

On the wiki that is

edgy dune
edgy dune
mortal folio
#

yeah positionAGL is just ATL over terrain and ASL over water

#

you can actually do a "getPosAGL" by doing _vehicle modelToWorldVisual [0, 0, 0]

pallid palm
#

ahh he wanted to spawn somthing

edgy dune
#

Yeah the modelToWorldVisual thing works

hushed turtle
#

I do getPosAGL by:

ASLToAGL getPosASL player
edgy dune
#

very cool good knowledge

pallid palm
hushed turtle
#

getPosASL gets you ASL position and ASLToAGL converts it to AGL

hallow mortar
#

Usually I don't bother with trying to get what createVehicle needs. Just always use ASL and do setPosASL immediately on the created vehicle, it's a much simpler way to stay consistent.

mortal folio
#

I prefer ATL myself but yeah same deal

pallid palm
#

so is it posable to addAction to a player that no other player can see ?

hushed turtle
#

addAction is local so yeah

pallid palm
#

hmmm i wounder why i can see the action in the other players

hushed turtle
#

Sounds like something runs it on all machines

pallid palm
#

so if i addAction to a player, when he respawns will the addAction still be in the respawned player

mortal folio
#

No

hallow mortar
#

No, actions don't persist over respawns. They're object-specific and the new unit is a new object. (object variables and EHs, however, are copied to the new unit.)

hushed turtle
#

Do attached objects get copied too on respawn?

pallid palm
#

oh i see, thats what i was thinking

hallow mortar
#

The action will remain on the corpse of the old unit, so be careful with the action conditions if it's possible for the player to find their old body.

pallid palm
#

yes i saw that as well

hallow mortar
# hallow mortar No.

* qualifier: not in the vanilla game. I don't know if ACE or other mods have any scripted handling for their attachable stuff.

pallid palm
#

i see thx Nikko

mortal folio
#

Yes respawn and JIP - probably the two biggest nightmares in arma notlikemeow

hushed turtle
mortal folio
#

those and whatever is the questionable phase between loading into a mission and starting a mission lol

pallid palm
#

i find the onPlayerKilled.sqf and the onPlayerRespawn.sqf files make it better

mortal folio
#

Granted i made it easy for myself with a framework but still i see many mods struggle with it

pallid palm
#

well i take care of a lot of stuff in the Description.ext

#
// -1 - Don't respawnOnStart  Don't Run Respawn Script on Start
//  0 - Don't respawnOnStart  Run Respawn Script on start
//  1 - respawnOnStart        Run Respawn Script on start
respawnOnStart = 0;
#

i don't know about mods any more i have not used them for i don't know 10 years πŸ™‚

#

new respawned units, ? is that not done on the server only ?

#

or did you mean players

mortal folio
#

?

#

players

pallid palm
#

ahh ok i see

hallow mortar
pallid palm
#

yes sir agree: i never did Zeus, so i really don't know about that as well

pallid palm
#

now i have the player addAction all fixed up now and remove on death thx you NikkoJT

warm hedge
#

Why you need an answer? You can't achieve it because it won't work

glossy pine
#

Why is it restricted to CfgVehicles only? What's the limitation that prevents it from supporting CfgWeapons as well?

warm hedge
#

Engine feature/limit

tulip ridge
#

Probably has something to do with all weapons of the same weapons class being rendered the same

#

Like if you UI on texture a weapon, you'd see that same display on every other gun with the same class

#

Same for helmets, vests, etc.

glossy pine
#

ok, I would be interested if a developer could confirm what you're saying and that it's a engine limitation, thanks

old owl
#

In reference to the questions I've been asking here regarding the helicopter rotor damage changes from 2.16 here #arma3_scripting message does anyone know of a way I could find these? I imagine those changes were derived from changing their config values or something maybe? Does anyone know if there is a way I can revert my game version back to 2.16?

proven charm
#

get old profiler exe?

old owl
#

I don't think that would work since all the SQF and configs are stored in addons although I could be mistaken

proven charm
#

i would think the heli changes are in the exe tho

old owl
#

Ah okay I see where you're getting at. The changes to them flipping over did sound like they were engine. I shouldn't kick it before trying it, I'll give it a whirl :)

hallow mortar
granite sky
#

Yeah there was some weird old code that hard-killed units that intersected the rotor blades.

old owl
mortal folio
#

just to confirm, is it all event handlers that persist after unit respawn, or is there a list of those that do/dont?

granite sky
#

HandleDamage, GetInMan, GetOutMan and SeatSwitchedMan persist. I don't know of any others that do.

old owl
#

Ah actually. Maybe scratch all of that. I wasn't really thinking of what you and Nikko were talking about which was a new unit on respawn.

mortal folio
#

Seems like most of them do yeah, uuh... ill test later

obtuse prawn
#

Is there some way to generate a clear image file of the game map and scenario markers, and move it to the mission folder?

oblique arrow
#

thanks again @cosmic lichen since I only found out how to edit the debrief screen through you

small perch
#

How does the "Animate - Rewrite" do the arm gestures?
I tried looking at the code but did not understand it

tulip ridge
small perch
#

could switchGesture be used to permanently keep a arm/leg in a certain position while any animations play?
also how does it work if the character is ragdolling?

#

or does switchGesture only work on arms

mortal folio
small perch
#

that stinks

mortal folio
#

Tho it would be nice to have a command that lets you arbitrarily override position/rotation of any bone

#

Gestures are quite limiting since you cant layer them

small perch
#

I have been looking for something like that, trying to brute force it is sadly not an option as I still do not know much how the code is actually structured and stuff.
but there has to be a way, how exactly do the animations move bones? it might be possible to replicate that

mortal folio
small perch
mortal folio
small perch
#

what if we just try harder πŸ₯Ί

mortal folio
#

well the only way its gonna happen is if one of the nice devs implements it (i was actually gonna make that suggestion at some point but i guess you beat me to it)

small perch
#

if they would then that would be great, do they implement this kind of stuff or is it just hoping that they would?

mortal folio
#

they do, you just gotta put some effort and be nice and patient about it

#

(and if it's plausible ofc, which i personally think it should be but idk the engineside code and how spahgetti it is with animation)

fierce marlin
#

Wondering if anybody could give me a link to the update posted a few years ago with a description on how to make visible wavelength laser attachments from the base (IR) laser using a child / inheritance class.
I don't remember the title, or type of update it was, and I've tried to find it a few times with no luck :(.

small perch
#

is there a way to modify animations with scripts, like moving bones inside the animation before it is played?

hallow mortar
#

No

small perch
#

dangit

fierce marlin
small perch
#

sadly i do not believe that will do what I am looking for, thanks anyway

haughty hare
#

So I've made a script, that should be triggered by a radio. (That alpha, bravo, echo thing that can be used with 0-0-(1-9)) And I'm trying to do that you can use it only in certain trigger. Will putting the whole script like that work?
Player inarea triggername: { script };

cosmic lichen
#

this and player inArea yourTrigger

#

Where this refers to the radio condition

haughty hare
#

Oooh

#

I didnt thought that I can do it like that

#

Thanks

hallow mortar
#

@crimson lion The Play Sounds module script seems to know that its search could take a while - after building the list of sound sources once, it caches the list in a uiNamespace variable, and loads that variable if it exists instead of redoing the search. That's why the freeze only happens on first use.
If you can do a faster search first and pre-populate that variable, the existing script will pick that up and skip its expensive search.

#

In my case, Play Sounds isn't very frequently used, so rather than always precaching I made another module that can be placed first, which creates the cache. But you could also have e.g. a postInit function that does it automatically.

crimson lion
#

Oooh. Good looking out!

cosmic lichen
# crimson lion Oooh. Good looking out!
uiNamespace setVariable  
[ 
     "RscAttributeSound_objects", 
     toString {((getNumber   (_x >> 'scope')) > 1) &&  
     {(getText (_x >> 'sound')) != '' &&  
     {getText (_x >> 'simulation') == ''}}} 
     configClasses (configFile >> "CfgVehicles") 
];
crimson lion
#

Thank you both! I'll set this up as a postinit function and mess around shortly

oblique arrow
#

I feel like I remember there being a mod that I used at some point that does pretty much that

pallid palm
#

a mod omg no πŸ™‚

pallid palm
#

lol

odd kayak
#

Question, are we really supposed to keep trying to guess what Pubzeus's RemoteExec restrictions are or is there actual documentation somewhere? I can only do so much by checking how EZM does it.

#

In the last hours I've been kicked more times by BattlEye then I ever been kicked by lag in all games I played in my freaking life.

old owl
# odd kayak Question, are we really supposed to keep trying to guess what Pubzeus's RemoteEx...

I'm not familiar with the resources you mentioned but can definitely agree that the lack of documentation by BE on that end is insanely miserable. I'm very fortunate that all of that has already been done years ago and is maintained by other people on our team. I remember having the same "what the hell", and the guy who maintains ours sent me this if it helps as a resource:

https://opendayz.net/threads/a-guide-to-battleye-filters.21066/

#

Obviously that link there is to some DayZ forum but it does cover Arma and there is crossovers. Most comprehensive documentation I've seen anyway πŸ™ƒ

odd kayak
#

Thank you very much

small perch
#

what do ragdoll mods do to affect the way the ragdoll can bend it's limbs? (for example preventing the knees from bending backwards). And would this way work on animations or is it ragdoll exclusive

warm kestrel
#

I'm working on a mission set in Livonia, and I want to make it so that, on a trigger, a 'hide object' module comes into effect and hides a bridge. I already know the module can hide a bridge, I just don't know how to not have the module working at the mission start and then enable it mid-mission. Going to be for multiplayer, too.

I also wasn't sure if this belonged here or the #arma3_editor channel.

oblique arrow
warm kestrel
#

In an ideal world, I want to sync it to a satchel charge on the ground. I'm planning an operation where a team has to disarm explosives, or the bridge blows.

tulip ridge
mortal folio
#

^

#

also to save you the trouble, the answer is no

small perch
#

alright, thanks

restive leaf
#

You could just actually blow it up with an action on a prop though I guess

edgy dune
#

I spawn a empty vehicle with zeus, and then use createVehicleCrew _this but when i try to then delete the vehicle in zeus it says "one of the selected vehicles has a non editable crew in it", what does that mean/why cant I then delete vehicle after making the crew?

#

oh....I need to add that unit to zeus

#

very interesting

haughty hare
#

guys Im trying to make a mission where u have to spot a enemy vehicles, lock on them with a laser and then guide a rocket. The thing is that if I stop looking at the vehicle, progress is still going on and rocket gets sent. How can I do that progress will stop after you stop looking at the vehicle?

_i = 0;
_t_naved = _timer / 100;

_spotted = false;
_engaging = false;

_currentTarget = objNull;

_lastLaserTime = time;

while {true} do {
    private _lt = laserTarget player;
    if (!isNull _lt) then {
        _lastLaserTime = time;
        if (_currentTarget != _lt) then {
            _currentTarget = _lt;
            _i = 0;
            _spotted = false;
            _engaging = false;
        };
        _i = _i + 1;
        if (_i > 100) then {_i = 100};
        call _navedenie;
        if (_i >= 35 && !_spotted) then {
            playSound "target_spotted";
            _spotted = true;
        };
        if (_i >= 100 && !_engaging) then {
            _engaging = true;
            playSound "target_locked";
            sleep 2;
            playSound "engaging_target";
        };
    } else {
        if (time - _lastLaserTime > 0.5) then {
            _i = 0;
            _currentTarget = objNull;
            _spotted = false;
            _engaging = false;
            hint "Lost target...";
        };
    };
    if (_i >= 100 && !isNull _currentTarget) exitWith {};
    sleep _t_naved;
};

_obj = _currentTarget;

if (isNull _obj) exitWith {
    hint "No valid target!";
    sleep 2;
    hint "";
};
#

i can send the whole script if needed

austere granite
#

Does anyone know if there's a way to mod the server lobby at all? I tried searching but no luck.

torn thunder
#

how do i add my mod's logo to the left side of items in virtual arsenal like in RHS or BAF mods?

austere granite
#

CfgMods

#

Basically have something like this

class CfgMods
{
    class TacBF
    {
        action = "http://www.tacbf.com";
        author = "TacBF Team";
        dir = "ICE";
        dlcColor[] = {0.31,0.78,0.78,1};
        hideName = 1;
        hidePicture = 0;
        logo = "\ice\tb_main\images\logo_tacbfsquare_ca.paa";
        logoOver = "\ice\tb_main\images\logo_tacbfsquare_ca.paa";
        logoSmall = "\ice\tb_main\images\logo_tacbfsquare_small.paa";
        name = "Tactical Battlefield";
        overview = "The Arma 3 PvP Mod!";
        tooltipOwned = "Tactical Battlefield";
        picture = "\ice\tb_main\images\logo_tacbf_ca.paa";
    };
};
#

then in your weapon / uniform / whatever, add dlc = "TacBF"; entry

proven charm
#

@haughty hare is that AI generated code?

torn thunder
#

should i create external .hpp file for it?

austere granite
#

It needs to be in a config.cpp

torn thunder
#

okey

#

thanks

austere granite
#

so if you want to create external file and include it, that's up to you

haughty hare
#

Originally it's from that video https://youtu.be/rzweGLb6KV4?si=yUQIquNzgDh0UuI2
And I'm trying to fully complete it, cus I couldnt download it from any links

ВсС сприкты ΠΎΡ‚ нашСго ΠΊΠ°Π½Π°Π»Π° Π²Ρ‹ Π½Π°ΠΉΠ΄Ρ‘Ρ‚Π΅ Π² ΠΏΠ°ΠΏΠΊΠ΅ "Π‘ΠΊΡ€ΠΈΠΏΡ‚Ρ‹" нашСго шаблона миссий.
Π¨ΠΠ‘Π›ΠžΠ ΠœΠ˜Π‘Π‘Π˜Π™ https://drive.google.com/open?id=1YtWlNySZU52i3_jfzu-Ipzs2m-bHjTUa
Или https://cloud.mail.ru/public/GnRK%2FDMDj3Bi5m или https://yadi.sk/d/E2mta0GGiMiIwA

β–Ά Play video
#

But ai is bad in sqf from my experience

proven charm
#

ok well at first glance it might work but the code is kinda hard to read so idk

haughty hare
#

I'll just send the whole code

hushed turtle
#

I don't think this check helps anything.

still forum
#

It does if you read the original code, and not what scotty posts

#

In general probably a good Idea to ignore what scotty posts.
Most of it is just offtopic garble.

west grove
#

does the drop command to spawn a single particle only work if that particle was spawned a few times before? like, particle objects needs to be preloaded or something? (space object, not billboard)

pallid palm
#

@still forum all i said was it looked kinda funny to me: and i also said i don't know that much: and thx for sayin most of it and not all of it: so i'll take that as a win win: and i don't agree with the offtopic garble: and i hope you don't expect me to take offance to what you texted

still forum
west grove
#

hm the texture should already be in memory, since the object that spawns the particle uses the same texture

sullen marsh
#

Oh shi, BIS actually implemented a useful EH

paper idol
#

any scripting god i can dm for some help maybe if possible and has some free time to help with something ?

sly cape
paper idol
# sly cape Post your question/thing/etc., here.

well its for a mod specifically thats mainly why i dont wanna flood this discussion here and i dont think what im doing is possible because im trying to use a script in the debug console instead of the code itself

sly cape
split ruin
#

@paper idol its impossible to dm you and you are not accepting friend requests

paper idol
#

also i cant post the code i dont have nitro Xd

little eagle
#

huh?

sly cape
real tartan
#

how can I delete or hide terrain object marker ?
e.g.

sullen marsh
#

EntityRespawned mission EH

#

I asked for that a few months ago

#

They granted my wishes

little eagle
#

still no entity spawned though

sullen marsh
#

Does it not trigger on a normal spawn?

little eagle
#

no

sullen marsh
#

Awwwww mediocre

little eagle
#

I guess it works on JIP when respawn is enabled

austere granite
#

... maybe a stupid quesiton, but what does it do?

sullen marsh
#

It fires when something respawns

paper idol
# sly cape Post a link to Pastebin or something.

https://pastebin.com/nybHADRj this is the script that "somewhat" works what im trying to do is for Antistasi Ultimate, when i recruit AI the gear they spawn with i want to also be consumed from the arsenal box, at the moment my only "success" is the fact that the AI will actually consume the gun at the very top of the arsenal but nothing else they wont try to use any other gun from the arsenal besides the top one and (as planned if the top one is not more than 10 they spawn with it but it dissapears from their inventory and they stay with a pistol)

austere granite
#

'something' being?

sullen marsh
#

A thing

little eagle
#

any SQF you want

sullen marsh
#

that can respawn

austere granite
#

i mean how is it different from normal respawn EH?

sullen marsh
#

Normal respawn EH only fires locally

#

This fires server-side

austere granite
#

ah okay sweet

#

server-side or everywhere?

little eagle
#

and the respawn eh has to added to all units. This one is a mission eh

sullen marsh
#

"Mission event handler, always executed on the computer where it was added."

#

And what @little eagle said

austere granite
#

sweet. brb rewriting global respawn events

little eagle
#

lol

sullen marsh
#

If it triggers for spawning JIPs then that's like 90% of what I personally needed it to do

#

Top EH, 10/10 BI

austere granite
#

Now just a bullet hit / bulletNear EH

little eagle
#

they can't even fix missiles being reported as objNull on remote machines in the fired eh. don't hold your breath.

austere granite
#

If i did that i wouldve died a year ago

little eagle
#

param still broken
["a","b"] param [[1,2] find 3, "none"]
-> "a"

little eagle
#

The new clientOwner command is in 1.56

#

warning though. Don't use it

sullen marsh
#

?

little eagle
sullen marsh
#

resolved?

little eagle
#

Apparently the fact that clientOwner gets ++ed is "as designed". There was a reason for it no one remembers now.

sullen marsh
#

oh it works fine on dedicated

austere granite
#

yea ammo explode and incomingFire would be so good 😦

little eagle
#

it doesn't. I tried it

#

Exact same issue

austere granite
#

Ony on resumed games though?

little eagle
#

yes

#

I mean if you make missions for your comm, then fine.

#

But I can't afford getting "hard to reproduce" bug reports on multiple issues in ACE

indigo snow
#

@austere granite the slotting screen is just an rsc you can modify

austere granite
#

Which one? I couldn't find it for some reason.

#

I thought it was RscMultiplayer somethingsomething, but that's the actual server browser

indigo snow
#

RscMultiplayer blah

#

Sec

#

@austere granite RscDisplayMultiplayerSetup

austere granite
#

Sweet, thanks a lot

jagged mica
fair drum
real tartan
real tartan
proven charm
delicate hedge
#

when projectile is created (fired), it creates local projectiles on every client including server, but parameter isReal in getShotInfo is true only where projectile is local (client), and so simulation of explosion handles client to which projectile isReal. But Event Handler onExplode fires on every projectile even non isReal, so it will fire on server too. So, can i call some damage calculation function on projectile onExplode EH, only in server even if it non isReal for server. Is it right way? or i should call serverEvent where projectile isReal?

#

Because on tests it seems that onExplode position argument can be a little bit different from where projectile isReal (it can offset even by 1 meter)

tulip ridge
#

Is it possible to get a 2d position on a UV from a 3d position?

I'm assuming no and have done some browsing on the wiki without seeing anything that could do it

split ruin
#

remove the third element from the position array ? 🀷

warm hedge
#

What exactly is the goal here? Reading texture to find which vertex is the responsible for the UV Map? Hell no

cyan dove
#

I have a question ladies and gentleman cuz plane(jet) models that I downloaded dont have a crosshair when I go in 3rd person can this be somehow changed in terms of scrypting? thx from now on

split ruin
#

@cyan dove crosshair is not part of jet model but a difficulty setting ... high difficulty disables it
but you can try

showHUD enable;

or the advanced syntax

showHUD [
    true,  // scriptedHUD
    true,  // info
    true, // radar
    true, // compass
    true,  // direction
    true,  // menu
    true,  // group
    true,  // cursors <- crasshairs too :)
    true,  // panels
    true,  // kills
    true   // showIcon3D
];
#

if you use ACE you can change hud elements from the mod settings

cyan dove
#

Thanks I will try it and see :)

split ruin
#

is it possible to make some targets pop up and some don't?
I tried set variable to the target object but doesn't work

popup setVariable ["noPop", true];

edit: actually is working πŸ˜‚

#

any script for moving targets btw ? meowawww

warm hedge
#

What kind of? What exact thing is the goal?

split ruin
#

targets on rails, moving left and right

warm hedge
#

So similar to official shooting range?

split ruin
#

yes

warm hedge
#

Bunch of setPos each frame, actually

split ruin
#

oh, I got it, i will try

winter rose
lyric schoonerBOT
warm hedge
#

I don't trust of god

#

...But SQF god

manic sigil
#

Is there a way to make a spawned grenade explode immediately, or are they always on their timer?

#

I'm doing some beginning work on a more complex IED/defusal system, trying to pick out some good lower power explosives.

proven charm
manic sigil
quick venture
#

Is there any way for me to disable the entirety of the Modules selection from the Zeus Interface post-mission start? I'm running a modded Zeus mission and there are a handful of modules that I want to be removed from the Zeus players' hands, but they have no built-in addon settings to disable them.

If I can target a specific module, that'd be great too, but I'm entirely okay with completely disabling the Modules tab from the Zeus Interface as well!

pulsar kindle
#

I'm having trouble with this particular if statement. For some reason, when I get a warning saying that the first line is missing a ). Am supposed to be enclosing the ! too?

if !(isNill "_currentBackpack") then
{
    _backpackItems = backpackItems _unit;
    removeBackpack _unit;
};
heady temple
#

not nill but nil. try

pulsar kindle
#

Yo.....I feel incredibly stupid now. That fixed me. I can't believe I never noticed that....

heady temple
#

its bcs similarity with null. dont worry

pulsar kindle
#

I've been writing this script to randomize gear on troops based on config values. I have the individual parts of the code working, but once I turn this into a function, I can't seem to get it working. I don't think my parameters are being passed correctly, though I've tried _this params and params. I was hoping someone could take a look tell me where I'm going wrong.

https://pastebin.com/vTNS0DkF

warm hedge
#

First of all, make sure your function is even running

pulsar kindle
#

It is. Or, at the very least it shows in function viewer. I tested it by calling it through eden's unit init and through the init eventhandler in my config.

warm hedge
#

Do you mean that hint is actually working?

pulsar kindle
#

No. That doesn't pop as it is. I've had show when I make the hint an non-variable.

warm hedge
#

Which config defines and calls the function?

pulsar kindle
#

Fucking a....I found my problem. I was missing my semicolon at the end of params line.....

#

To answer your question, it's the character config in CfgVehicles, where you would normally find helmetList[];

#

calling it is done through class Eventhandlers

old bronze
#

You guys probably get this a lot but does anyone have any good resources for learning sqf scripting? Just like docs or something I can use to play with the editor tonight

native hemlock
proven charm
#

has anyone noticed lag before RscCombo list gets populated since last stable was released? i cant figure why it now takes second or two so that RscCombo shows the items it has

cosmic lichen
#

Related to data type checks?

#

Wait

#

Since last stable. No

#

How many entries?

proven charm
#

nothing really happens even with one

#

ugh nevermind, think i found the problem. it started with new stable time but seems to be my own doings

#

thx for the help 😁

haughty hare
proven charm
#

well there is this part ```sqf
private _lt = laserTarget player;
if (!isNull _lt) then

#

so the rocket sending code seem to be in somewhere else

old bronze
#

Cheers guys, I'm getting along so much better with this 3d editro than I did with the 2d one that's for sure

proven charm
#

does anyone know good way to make unit lie down like in sleeping? the anim browser is useless πŸ™‚

mortal folio
proven charm
#

i mean so many anims to go thru

#

i found only injured-lie down anims so far

mortal folio
#

Ye but like.... theyre sorted πŸ˜‚ and under cutscene/unknown theyre named more readably

proven charm
#

funny i went thru just those

little raptor
#

this is so funny 🀣
Acts_Undead_Coffin

proven charm
#

thx Leo i did try those but the guy is hitting he's hand to ground in pain. but this seems better: HubWoundedProne_idle2 bit restless sleep tho

#

oh but with attachto the anim twitches. is it possible to stop the animation from playing?

mortal folio
proven charm
#

oh ok

edgy salmon
#

Hi, Some mods have custom logos in the main menu. Now, I have a mod for my unit that adds our logo and backround to the main menu. Is it possible to add code to our mod to be prevent other mods from replacing our logo? For reference, it's CWR3 that's replacing our logo for the time being

cosmic lichen
#

Make a compat mod for cwr3 which only loads if cwr3 is present and overwrite the logo

edgy salmon
#

Yes, and how would i overwrite the logo?

#

code wise

sly cape
edgy salmon
#

So, add the cwr3_core (where logos are) to the requiredAddons line in the .cpp file (I'm relatively new to in arma code so sorry if I'm asking to many clarifications)

sly cape
novel mountain
#

just wanna check on trigger logic if someone got time =
IF I WANT MY RADIO TRIGGERS TO BE ACTIVATED BY ZEUS ONLY
create file - initPlayerLocal.sqf

#
    waitUntil { !isNull player };
    sleep 3;

    if (isNull (getAssignedCuratorLogic player)) then {
        1 setRadioMsg "NULL"; // hides Radio Alpha
        2 setRadioMsg "NULL"; // hides Radio Bravo
    };
};```
#

Right??
works on local host but unsure how its gonna behave live

#

(Double posted in editor and here not sure which is more proper channell)

simple stirrup
#

How do I properly do the setflagtexture thing for each one of my vehicles? I am the creator of the Generic Balkan Conflict series (and most notably its first mod, and only mod so far, the Balkan Paramilitary https://steamcommunity.com/sharedfiles/filedetails/?id=3702271995) and I plan on using the setflagtextures to differentiate between factions' vehicles. The problem is, I don't know how and I don't know how to do it in an easy way (I use Virtual Studio Code and I intend on using their replace feature).

The flag in question is balkan_paramilitary.paa ("\BalkanParamilitary\data\balkan_paramilitary.paa")
Also I constructed the faction in ORBAT so there's that too...

past wagon
#

if my mission's date and time is selected in initServer, should I do this? remotely executing it with JIP doesnt seem to be working.
initServer.sqf:```sqf
missionNamespace setVariable ["dateTime", [2035, 6, 9, _hour, _minute], true];

`initPlayerLocal.sqf`:```sqf
waitUntil { !(isNil { missionNamespace getVariable "dateTime" }) };
private _dateTime = missionNameSpace getVariable ["dateTime", [2035, 6, 9, 18, 50]];
setDate _dateTime;
old owl
#

Does anyone here have an idea of how best to prevent damage to a certain hit point of a terrain object? I currently have the following code:

private _allOfficeBuildings = (nearestTerrainObjects [player, ["House"], 20000000]) select {
    (typeOf _x == "Land_Offices_01_V1_F")
};
{
    _x addEventHandler ["HandleDamage", {
        if ((_this param [1, ""]) == "glass_15") exitWith {0};
        1
    }];
} forEach _allOfficeBuildings;

Obviously though this doesn't work due to locality. Currently having a bug in our mission where the office buildings ladder addAction will not be accessible by players after a heli blows up on top.

Through looking through the event handlers category I see these but not quite sure which would be the best approach to take or if they will even acomplish what I am looking to.
https://community.bistudio.com/wiki/Arma_3:_Event_Handlers#Dammaged
https://community.bistudio.com/wiki/Arma_3:_Event_Handlers#Explosion
https://community.bistudio.com/wiki/Arma_3:_Event_Handlers#HitPart_(Entity)
https://community.bistudio.com/wiki/Arma_3:_Event_Handlers#MPHit

old owl
old owl
#

Ah okay, didn't work unfortunately since that office building doesn't have a ruins state.

past wagon
#

damn

granite sky
#

BuildingChanged can't block damage anyway.

#

HandleDamage should work as long as you install it where the object is local. Not sure if map-object houses are server-local or local everywhere.

dusk gust
old owl
#

Spoke with a colleague and he came back with this solution that worked:

cursorObject addEventHandler["HandleDamage", {
  params ["_unit", "_selection", "_damage", "_source", "_projectile", "_hitPartIndex", "_instigator", "_hitPoint", "_directHit", "_context"];

  [0, _damage] select ("glass" in _selection);
}];

I haven't tested yet to verify I can reproduce the same results with the code above yet but I believe it's because I was only checking glass_15 instead of just allowing damage for everything except the building.

Hi and thank you @dusk gust :)!

#

Haha you caught me mid typing

#

He would be the "colleague" in question πŸ˜„

edgy dune
#

for street light objects with class reflectors is there away to to turn off the light? only way I know is to damage the hitpoint for the light if it has

granite sky
versed ledge
#

Is there a way to make a texture mods lod kick in at a further distance? Mh60 skins looks good but the gray texture doesn’t become visible until you’re already within site of the normal texture. Can you script to make the skin always on or show up a few under yards sooner?

proven charm
warm hedge
#

Nope. It is very likely model issue which lower LOD doesn't apply the texture properly. Ask the author I guess

edgy dune
#

I was looking for like reflector in the name

#

silly me

versed ledge
#

Is getMarkerDir a thing?

novel mountain
proven charm
novel mountain
#

Dont got server atm

#

using 3rd party for the events so gotta pray i guess

#

πŸ˜„

proven charm
#

you can start the server in arma. just goto editor and run in multiplayer mode

novel mountain
#

????

#

i said i tried local host

proven charm
#

with another client?

novel mountain
#

not sure what you mean in that part

proven charm
#

basically run arma twice so you have two clients

novel mountain
#

that would fry my PC

#

with the addon, local host, etc.

versed ledge
austere granite
#

@sullen marsh You happen to test if those new mission events work for JIP yet?

sullen marsh
#

I haven't yet, nop

austere granite
#

In that case it's pretty much a global player connected event isn't it?

sullen marsh
#

that already exists

austere granite
#

That's server only though isn't it?

sullen marsh
#

no it's a mission eh

austere granite
#

Ah wait you're right, never mind πŸ˜„

sullen marsh
#

difference between this and onPlayerConnect is connect only fires when they actualyl connect

#

not join the game

#

so they can connect then immediatley disconnect, never having spawned

austere granite
#

That's a good point.

sullen marsh
#

also, onplayerocnnect doesn't give a unit they're in

#

because they're not in a unit when it fires

kind hatch
#

Hello, quick question: how can I make it so that when I enter an area and wait there for a bit, I get this window, meaning the screen goes black and it shows me the text

granite sky
#

It's usually done with cutRsc I think.

austere granite
#

That's a good point. I diddn't think about that.

proven charm
#

cutText ["teeeeeeeeeeeeeeeest", "BLACK OUT"];

austere granite
#

In that case it's actually a lot more useful than I realized

past wagon
#

I'm having an issue with a variable being undefined. The variable is _type, and this is the pattern im using to define it:

private _type;

if (condition1) then {

    if (condition2) then {
        _type = "string1";
    } else {
        _type = "string2";
    };

} else {
    _type = "string3";
};

_veh = createVehicle [_type, _loc, [], 0, "CAN_COLLIDE"]; // ERROR: _type is undefined here

Here's the actual code: https://pastebin.com/L0YDqkvW

Am I doing something wrong?