#arma3_scripting

1 messages ยท Page 751 of 1

little raptor
#

no

open fractal
#

what is this syntax?

#

can you help me understand what the thing you wrote even means

#
"Test Hint" remoteExec ["Hint", _unit]
#

this will hint "Test Hint" on the owner of _unit

#

isn't that all you need?

craggy wyvern
#

@open fractal , thanks for reply, that def works, but it send the hint globally on a multiplayer server. What I would like to do is have the hint display only for the player I drop the "execute code" module on as Zeus. I started with just the calling Hint "test"; but that did the same thing, send the hint globally to all players.

open fractal
#

what I wrote sends the hint only to the owner of the unit

#

what you wrote is just weird

craggy wyvern
#

Sorry, was just giving it my best shot, not very experienced. I do really appreciate the help. I will give it a test!

fair drum
#

there a wiki page on when to use leading slashes, no leading slashes, or ..\ in their respective uses for file paths in configs and elsewhere?

glacial jay
#

"18:46:04 Can't find a mission collection / mission with template name: 'vn_zeus_master.cam_lao_nam', skipping to next mission.
" Get this error message every time I try and start my server

#

It is correct I do not understand why it wont work

open fractal
#

and the rest of the page

#

the stuff that goes before remoteExec is parameters for the command

#

and for the command you just write, well, the command

craggy wyvern
#

Appreciate the help

craggy wyvern
#

Thanks Hypoxic, I will start going through it!

hushed tendon
#

If you make compositions with the custom units then you technically get custom factions

grizzled lagoon
#

Hello, how to add elements in an rsctoolbox with sqf ?

digital wasp
#

trigger when player gets in a helicopter?

hallow mortar
#

player in yourVehicleNameHere

digital wasp
#

if i need a task description to change every time i capture a checkpoint ("Capture checkpoint [0/3]), i have to change a flag to capture a checkpoint and on activation it should add 1 to variable checkpoint_captured. by default it's 0, i have it set up like this:

checkpoint_captured = checkpoint_captured + 1
``` but it doesnt work. any help?
little raptor
little raptor
copper raven
digital wasp
digital wasp
little raptor
digital wasp
little raptor
#

where?

digital wasp
#

may sound weird, but
a trigger on spawn that fires when blufor is in area (it spawns there)

#

it does work tho

#

i put a trigger that fires (with sound) when checkpoint_captured = 0 and it fired

little raptor
#

it is weird yes

#

use init.sqf

#

you don't even need to initialize it tho

digital wasp
#

so just put checkpoint_captured = 0 in init.sqf?

little raptor
#

you can just make it use the default value if it doesn't exist, without any need to define it elsewhere

_current = missionNamespace getVariable ["checkpoint_captured", 0];
 checkpoint_captured = _current + 1;
copper raven
digital wasp
#

can i use checkpoint_captured = _x + 1?

little raptor
#

no

little raptor
digital wasp
#

okay, but what was wrong with my code?

little raptor
#

nothing

digital wasp
#

i may use yours, but i just wanna know

#

so why didn't it work?

little raptor
#

perhaps the trigger's functionality gets changed

#

and it doesn't use its statements anymore

#

put a systemChat "Capture point activated" in there

#

see if it shows it triggers

#

if it doesn't trigger, there are probably scripted event handlers for capture points that you can use instead

digital wasp
#

one second, i might be stupid

glacial jay
digital wasp
#

okay, im dumb, there was a problem with a trigger that actually changes description..

copper raven
#

(this is also wrong channel)

glacial jay
winter rose
copper raven
#

just use ^ other people may be able to help

glacial jay
#

Okay thanks guys

coarse dragon
#

Is it possible to get a trigger to do alive check for 3 different playable units and also play music in the effect and end the game scenario

winter rose
#

yes, yes it is

coarse dragon
#

Is it !Alivecheck me1 && ect
In the triggers init?

little raptor
#

it's not "Alivecheck". it's alive meowsweats

coarse dragon
#

๐Ÿ˜‘ ๐Ÿคฏ

little raptor
#
!alive me1 && !alive me2 && !alive me3
#

means all 3 dead

#

to play a music, use playMusic

#

to end, use BIS_fnc_endMission

coarse dragon
#

I've music on the effects thing of a trigger

#

3eden must have added it

little raptor
#

yeah it does. I forgot

coarse dragon
#

Such a wonderful thing

#

Thanks

coarse dragon
#

Hm it doesn't do anything ๐Ÿ˜ฌ

#

Meh doesn't matter that much

coarse dragon
#

Ughh is there any way to check on your killed when playing a mission via eden

little raptor
coarse dragon
#

Hm

#

On the end screen. After you die in a scenario.

little raptor
coarse dragon
#

Just shows ya what killed ya

little raptor
#

oh when you DIE. right meowsweats
idk where the game keeps those stats. probably internally and inaccessible

#

you have to write a script to keep track of the kills manually

coarse dragon
#

Dang I can't get the Endscenario to work with alive. Because it shows ya the kills on it

tepid vigil
#

Having a loop like this and alt-tabbing makes playSound3D create a new sound every 60 seconds and when you alt-tab back to the game they will all play at the same time, is there anything I can do to prevent this?

while {true} do {
        private _soundToPlay = selectRandom _radioArray;
        playSound3D [_soundToPlay, radioSpeaker, false, getPosASL radioSpeaker, 0.7, 1, 0, 0, true];
        sleep 60;
    };
tepid vigil
winter rose
#

woops, then you're screwed here

#

you could check (if has focus then playsound)

#

isGameFocused yes ๐Ÿ™‚

ebon citrus
#

can i use apply to discard a value from an array?

#

i want to remove empty strings("") from my array

winter rose
#
private _myArray = ["a", "", "c"];
_myArray = _myArray select { _x != "" }; // ["a", "c"];
ebon citrus
#

oh yeah

#

that's reasonable

#

โฃ๏ธ

tepid vigil
copper raven
winter rose
#

let me flex my SQF dangit!!1!

wet shadow
#

Any tips to detect when/if chat channel is changed by the player? Haven't found any BI or CBA eventhandlers for it and having a constant check/check for every key press seems a bit overkill.

little raptor
still forum
#

Hey quick quiz question!
How do I get a -NaN in SQF

winter rose
#

-(0/0)?

still forum
#

prints error and returns -0 :sad:

still forum
#

-1.#INF thats -INF not NaN. But maybe that works for what I need meowsweats

winter rose
#
const float minusNaN = -NaN;
```deal with it ๐Ÿ˜„
still forum
#

it doesn't :sad:

little raptor
#

wait thonk

#

nvm I think it's correct thonk

still forum
#

-1.#IND
โค๏ธ

copper raven
#

[log -1 isEqualType -1e39, typename (log -1), typename -1e39] [true,"NaN","NaN"] ๐Ÿ˜„

little raptor
#

I have no idea what NaN is then meowsweats

still forum
#

IND is NaN

#

or it is what I wanted atleast

lofty rain
#

Ugh. Iโ€™m trying to add (ace inter)action, to object, which is only interactable with ugv (or its turret). Ace action is not a problemโ€ฆ Any help?

still forum
#

I didn't know that a UAV camera can use ace interaction? can it really?

#

in your action condition, try diag_log'ing the user of the action and see if it returns the UGV

bitter jewel
#

does anyone know, if using ace, is it possible to script damage to an infantry unit so it guarantees that 1) the unit doesnt die or go unconscious 2) fractures its left leg and 3) makes the units face bloody

#

?

lofty rain
opal zephyr
#

Im trying to use forceWalk on my player, and its working great. But when the player reloads it circumvents the movement restriction and the player has the full range of movement again for the duration of the reload... Is this a known issue and is there a workaround for it?

little raptor
opal zephyr
#

Thanks Leopard!

fading magnet
#

newUnit = group player createUnit ["USMC_Soldier", getMarkerPos "marker_1", [], 0, "FORM"]; 
addSwitchableUnit newUnit; 
SelectPlayer newUnit; 

}]; ``` 

is there anyway to delay this script by 5 seconds after the player died ? I tried putting ```sleep 5;``` but it seems like this line was skipped. I'm trying to create a respawn point in arma 2 singleplayer but it does work but I respawned instantly I just want like 5 seconds delay.
opal zephyr
#

How are you calling the script

#

In arma 3 sleep only works in a scheduled environment I believe

fading magnet
opal zephyr
fading magnet
#

execVM is the line

opal zephyr
#

hmm, that is scheduled. Im not sure, arma 2 might work slightly differently in that regard

little raptor
opal zephyr
#

aw damn, I completely missed that

fading magnet
grizzled lagoon
#

Hello, how to add elements in an rsctoolbox with sqf ?

dreamy kestrel
#

Q: been a little while, I have an elementary refresher question... when we invoke call _fn_myCallback, what happens with arguments, contextual magic variables? the magic variables are available, correct? all other things in consideration, return values and such, are the same, correct? i.e.

// _retval from callback, may also be NIL
private _retval = call _fn_myCallback;

Thanks!

little raptor
dreamy kestrel
dreamy kestrel
#

awesome thanks

little raptor
grizzled lagoon
little raptor
#

then the wiki's wrong

#

ยฏ_(ใƒ„)_/ยฏ

little raptor
grizzled lagoon
little raptor
#

actually I think the wiki's definitely wrong

#

toolboxes have rows and columns thonk

#

so it's probably lnbAdd

grizzled lagoon
#
private _list = (findDisplay 2602) displayCtrl 0503;
_list lbAdd "teste 2";```
dreamy kestrel
# little raptor only the return value tho. the parameters are different ofc

that's what I am trying to clarify. if we did something like, [...] apply { call _transform; } what does the callback "see" in terms of variables? i.e. _this, it is nil? versus if we passed [...] for args, of course, then we would have args to deconstruct with params, correct? assuming also _x is visible in the context.

little raptor
#

it's the parent scope's _this

dreamy kestrel
little raptor
#

you can even write this instead of call my_fnc_blabla:

if (true) then my_fnc_blabla

meowsweats

dreamy kestrel
#

yup, that much I comprehend, code is code, whether it is behind a variable.

#

thanks so much

little raptor
#

also when I do lbAdd and check lbText, it's empty

#

so it's not using lbAdd either

#

you can however use lbSetText

little raptor
grizzled lagoon
#

Yes I will do that thanks

opal zephyr
#

Hey Leopard20, I wont ping ya for this, but an update on that walk issue I was having. Seems to be tied to a mod thats loaded, works fine in vanilla.

bitter jewel
#

i did this stupid thing where i wrote a script with a while loop and executed it in the debug console

#

now i am learning that the condition is probably allways true

#

is my only option to kill arma?

little raptor
#

it's probably stuck elsewhere

#

if your game is stuck, yes, you have to close it

grim ravine
#

๐Ÿ‘‹ is there an equivalent to addMagazines for items, or do I have to addItem individually?

#

I.E If I want to add 5 hats/bananas to a players inventory

open fractal
#
for "_i" from 1 to 5 do { player addItem _banana }
little raptor
grim ravine
#

Thanks both, yeah magazines isn't working in this case

#

For Ace Bandages

open fractal
#

How can I get the position where a projectile impacts? I've tried this

player addeventhandler ["Fired", { 
    params ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile", "_gunner"];
    systemchat "Fired!"; 
    _projectile addEventHandler ["Deleted", {
        params ["_entity"];
        private _pos = getposATL _entity;
        systemChat format ["Collided: %1",_pos];
    }];
}];

but i just get "Fired!" and not "Collided"

little raptor
open fractal
little raptor
#

they'll be added in v2.10

open fractal
open fractal
#

huge

#

thanks

little raptor
#

its last position before it's dead is roughly its impact pos

open fractal
#

would that hurt performance or is it negligible if the loop only tracks position

little raptor
#

depends how many projectiles are in flight

open fractal
#

fair enough

still forum
#

it very bad for performance :3

little raptor
# open fractal would that hurt performance or is it negligible if the loop only tracks position
projectiles = [];
onEachFrame {
    {
        if (alive (_x#0)) then {
            _x set [1, getPosASL (_x#0)];
        } else {
            systemChat format ["Last Pos: %1", _x#1];
        };
    } forEach projectiles;
};

player addeventhandler ["Fired", { 
    params ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile", "_gunner"];
    systemchat "Fired!"; 
    projectiles pushBack [_projectile, getPosASL _projectile];
}];
little raptor
#

if you only have a few it won't "reduce your FPS" or something

little raptor
#

ammo EHs are not even on dev branch meowsweats

jade acorn
#

when I play player switchMove "Acts_UnconsciousStandUp_part1" on the player unit, it looks like the sound attached to this animation stops in the middle of the anim and continues to play when the player moves. It doesn't happen if I press any movement key during the animation. adding switchMove "" doesn't help, it just automatically plays either the rest of the sound or the sound that should be played with part2. Is there any way to end the emitted sound with the animation?

little raptor
jade acorn
#

even if I make sqf [] spawn { player switchMove "Acts_UnconsciousStandUp_part1"; sleep 45; player switchMove "Acts_UnconsciousStandUp_part2"; }; the sound will still be played after both animations are finished, is it just an animation bug or is there a one strict way to play both without that issue?

hollow thistle
# little raptor ```sqf projectiles = []; onEachFrame { { if (alive (_x#0)) then { ...

I've written something like this recently to track projectiles, works nicely and you can use it for submunitions easily with nearObjects and using it again.

vet_fnc_onProjectileHit = {
    params ["_projectile", "_fnc_handler"];

    vet_tracked_projectiles pushBack [_projectile, _fnc_handler];

    if (vet_tracked_projectilesEh == -1) then {
        systemChat "adding EH";
        vet_tracked_projectilesEh = addMissionEventHandler ["EachFrame", {
            private _delete = false;
            {
                _x params ["_projectile", "_fnc_handler"];
                if (alive _projectile) then {
                    _x set [2, getPosATL _projectile]
                } else {
                    [_x select 2] call _fnc_handler;
                    vet_tracked_projectiles set [_forEachIndex, 0];
                    _delete = true;
                };
            } forEach vet_tracked_projectiles;

            if (_delete) then {
                vet_tracked_projectiles = vet_tracked_projectiles - [0];
            };

            if (vet_tracked_projectiles isEqualto []) then {
                systemChat "removing EH";
                removeMissionEventHandler ["EachFrame", _thisEventHandler];
                vet_tracked_projectilesEh = -1;
            };
        }];
    };
};
#

But thankfully dedmen looked into my request and is doing the ammo event handlers so I will be able to throw it in the trash meowtrash

sand mesa
#

How do you remove or open a gate already placed on the map
All of these are placed in game logics:

{ Deletecollection _x } forEach (( nearestObjects [ getPos this , [], 35 ]) - (( getPos this ) nearObjects 35));6

kill everything but the gate

hideObject ([0,0,0] nearestObject 3751667);
delh = [0,0,0] nearestObject 3751667; delh hideObject true; 

3751667 is the id i got from the debug console:

do3DENAction "ToggleMapIDs";

I tried the class names and this:

nul = this spawn { 
_obj = nearestObject [ (getpos _this), "Land_Net_Fence_Gate_F" ]; 
{ 
 _obj animate [ format [ "door_%1_rot", _x ], 1 ]; 
}forEach [ 1, 2 ]; 
};

And still doesn't open or work, I'm new to this so, I have to be doing something wrong or that gate is invincible โ€ฆ

little raptor
sand mesa
#

oh that code opens gates i place in the editor but not the one already on the map

little raptor
sand mesa
#

im not getting an error

little raptor
#

Deletecollection
I've never seen this command, and according to wiki it's obsolete

sand mesa
#

that works perfectly except for the said gate im trying to remove

little raptor
sand mesa
#

thus my confusion 0.0

#

no errors at all

#

witchcraft bro

#

losing my mind over this all

little raptor
#

that wasn't my question. you said it works with "objects you place". is it the same type of object?

sand mesa
#

im assuming it is because it fires and gives no errors for type of object... ?

fair drum
#
configFile >> "CfgVehicles" >> "Land_Net_Fence_Gate_F" >> "AnimationSources" >> "Door_1_locked_source"
configFile >> "CfgVehicles" >> "Land_Net_Fence_Gate_F" >> "AnimationSources" >> "Door_1_noSound_source"
configFile >> "CfgVehicles" >> "Land_Net_Fence_Gate_F" >> "AnimationSources" >> "Door_1_sound_source"
configFile >> "CfgVehicles" >> "Land_Net_Fence_Gate_F" >> "AnimationSources" >> "Door_2_locked_source"
configFile >> "CfgVehicles" >> "Land_Net_Fence_Gate_F" >> "AnimationSources" >> "Door_2_noSound_source"
configFile >> "CfgVehicles" >> "Land_Net_Fence_Gate_F" >> "AnimationSources" >> "Door_2_sound_source"

these are your options

#

now there is a simple object config entry which has the rot's in them, but they are simple objects and I don't think you'll be able to animate them.

little raptor
#

They're part of the model

#

Which you can get using animationNames

fair drum
#

well just doing

private _obj = (get3DENMouseOver select 1);

_obj animate ["door_1_rot", 1];

works fine for me and the animation is the same as animateSource ["Door_1_sound_source", 1] from the config

#

so he's probably just not grabbing the right object in the beginning

jade acorn
atomic crystal
#

Sorry this is such a basic question, just been having some trouble wrapping my head around something. Is it possible to call a script that will run until a returned value is true/false? For example a script that checks if different tasks are completed or if triggers have been activated.. Or am I overthinking the idea and I should have the script called on a loop?

#

Or, should I have loops inside of the script being called?

grizzled lagoon
atomic crystal
#

Ah OK, I just got up this morning ready to work on this again, will look into functions return values. Ty!

hallow mortar
hallow mortar
ebon citrus
#

why are a lot of the positions returned by livonia-buildings using buildingPos commmand under the floor?

little raptor
#

buildingPos was AGL iirc

ebon citrus
#

that makes sense

winter rose
#

if only the wiki mentioned it :p

ebon citrus
#

if i just had the patience to read the biki... sigh ... Lou, would you be so kind to hand me the hammer?

little raptor
winter rose
#

to defend or to self-apply ๐Ÿ˜„

ebon citrus
#

i'd need a toolbelt for that, but i accidentally forgot to transform the waist-coordinates i used to set the toolbelt position into world coordinates and now it's under the ground

hallow mortar
#

For Zeus-placed custom compositions, are the init fields of the objects executed as the objects are created, or after all objects are created? e.g.

create > init > create > init```
vs

create > create > init > init```
I ask for the purposes of referencing other objects in the same composition from an init field

little raptor
hallow mortar
#

That's inconvenient

zinc loom
#

im working on a script, i tried several things, nothing works, could someone corect me please ?

#

how do i do this code text?

distant oyster
#

!code

wicked roostBOT
#
How to use SQF syntax highlighting in Discord

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

// your code here
hint "good!";
zinc loom
#
_processClass = "true" configClasses (configFile >> "ProcessAction");
{
_test = (configFile >> "ProcessAction" >> _x >> "Text") call BIS_fnc_getCfgData;

lbAdd [3511, _test];
} forEach _processClass;
#

this is like the 15 try

#

im an idiot i think

#

its missionConfigFile

#

i hope ๐Ÿ™‚

ruby bronze
#

Hey guys, how would I go about converting this trigger code:

{_x moveincargo heli1} foreach allPlayers;

to only move the players who are inside the trigger, instead of every player in the game?
I did try a few variations of

{_x moveincargo heli1} foreach allPlayers in thisList;

But no luck with that. I feel I'm missing something so obvious

winter rose
distant oyster
#
{_x moveInCargo heli} forEach (allPlayers inAreaArray thisTrigger);
ruby bronze
#

@winter rose Sadly that one did not work for some reason (I caught the closed parenthesis don't worry lol), but I appreciate the try!

@distant oyster That however worked perfectly, thank you! Now I just need to test on my dedi, but I see no reason why it wouldn't work like the old code. =D

#

I've never seen inAreaArray before, that's good to remember for later as well

crude vigil
#

u could just use thisList as well but if Lou's solution didnt work, your activation target was not "Any Players". Which makes Terra's solution only valid way since thisList is unrelated than units to be affected.

copper raven
ruby bronze
crude vigil
#

thisList is affected by your Condition (as in who can activate your trigger, it lists only people that can activate it even if there are other people in it)

ruby bronze
#

Ohhhh

crude vigil
#

thats what I mean in short

ruby bronze
#

Thank you! Makes sense

kindred zephyr
#

does

_this setMaxLoad 100;```
will make a container carry capacity 100kg? 100apples? 100 items?
Also, will it prevent overfilling of containers that are filled using code?
winter rose
kindred zephyr
#

thanks

tepid vigil
#

Is sqf bytecode only recognized when using functions library or compileScript?

copper raven
modern root
#

Does anyone know how to completely disable the zoom in feature? Where for example, you have a weapon with iron sights yet, are still able to zoom in via the arrow keys on your mouse of hold right click, etc. Iโ€™m looking to disable that feature so iron sights are truly a 1x sight and for immersion purposes.

ebon citrus
open fractal
#

yo this update goes hard

#

brb drawing mf lasers

open fractal
#

the death star laser is nearing completion

#

unrelated but what does -1.#IND mean

#

indeterminate??

winter rose
#

NaN, Not a Number

#

yep

open fractal
#

thanks

#

i should've paid attention in algebra class, Lou

#

this is rough

little raptor
night grove
#

gotcha,

winter rose
little raptor
#

no that should throw an error meowsweats

#

probably invalid/out of bounds math

#

e.g log -1 that I mentioned before

warm hedge
#

It is possible to get NaN if you do like 10e100 or smth AFAIK

little raptor
#

or acos 2

#

or maybe sqrt -1

open fractal
#

i just messed up the parentheses and put abs on a number that was supposed to be negative

#

i am a math expert actually

open fractal
woeful sundial
hallow shard
#

anyone know how to detonate all mines in front of a vehicle? I'm working on a mineclearing vehicle composition, and want all mines in the area of the "plow" to go boom

still forum
#

But now...

#

you can setDamage 1 them to kill them maybe

ebon citrus
#

is there an EH to handle message being sent? I only see one for message being received

ebon citrus
#

ok

#

i just want to catch it before it's sent

#

on the client-side or server-side

#

preferably server-side, but that doesnt seem to be a possibility, so i had to resort to client

still forum
#

chat you mean?

#

chat handlers might fire on server, and you can then drop it? not sure ๐Ÿค”
But if you want to stop from showing after sending you can do that.

But before sending no

ebon citrus
#

alright

coarse dragon
#

Is there anyway to make a tank just drive in a straight fucking line without them seeking out roads to drive on ๐Ÿ‘บ ๐Ÿ‘บ

winter rose
#

language

#

yes, there is

little raptor
coarse dragon
#

No?

little raptor
#

yes

coarse dragon
#

Oh. Is that a code? Or a option

winter rose
#

it was said already โ†‘

little raptor
#

it's a command

granite sky
#

Does it ignore all obstacles, including other units and vehicles?

little raptor
#

the driver freaks out a bit near obstacles

#

near units at least

#

last I tried it kept going left and right when there was a unit in front of it meowsweats

granite sky
#

Hmm. I'm ok with unit avoidance, I just want something to drive across bridges.

little raptor
#

just didn't want to ๐Ÿคฃ

granite sky
#

this is fine :P

#

I have that one firmly in "normal for Arma" category

crude vigil
little raptor
#

they won't go on roads anymore

#

and avoid obstacles properly (well in Arma terms...)

coarse dragon
#

That's exactly what I've set it too and they still seek out the roads

noble zealot
#

I created a light at day with_light setLightDayLight true;but at night the light was not there.

little raptor
coarse dragon
#

ill go it a go, thanks

#

They won't even move now ๐Ÿ˜ฌ ๐Ÿ˜‚

little raptor
# coarse dragon They won't even move now ๐Ÿ˜ฌ ๐Ÿ˜‚
this spawn { 
    _veh = _this; 
    _dr = driver _veh; 
    _gr = group _dr; 
    _dest = waypointPosition [_gr, currentWaypoint _gr];
    _start = ASLtoAGL getPosASL _veh;
    _gr selectLeader _dr;
    doStop _veh; 
    sleep 1;
    _veh setDriveOnPath [_start, _dest];  
}

this works for me

ebon citrus
#

what's up with networkID and owner ID not being the same thing?

little raptor
#

for tracking

ebon citrus
#

ok

coarse dragon
#

Omg it's beautiful

#

Well it was

#

Now they are spinning on the spot while engaging

little raptor
#

set the group on careless maybe thonk

ebon citrus
#

owner ID and network ID had me pulling my hair for a bit because i presumed they were the same

#

๐Ÿ”จ

coarse dragon
#

Then they won't fight ๐Ÿ˜ฌ

little raptor
granite sky
#

In some vehicles they'll happily shoot you from the turret hatches on careless, but won't button down.

#

We're currently using some horrible group-splitting scam because nothing else worked.

coarse dragon
#

Them stone walls are annoying. Had to hide em all

#

I give up. They get to a certain point and just start spinning on the spot

little raptor
#

I'd made a mistake meowsweats

coarse dragon
#

I did xD

little raptor
#

I just updated it

coarse dragon
#

oh my

coarse dragon
#

Mixed results

little raptor
#

why?

coarse dragon
#

When they engage one just spins and the other doesn't want to move anymore

little raptor
coarse dragon
#

Both?

little raptor
#

one just spins and the other doesn't want

#

didn't you mean you have 2 tanks?

coarse dragon
#
  1. Please just stops and engages long rang. Like very very long range
little raptor
coarse dragon
#

Further testing

little raptor
coarse dragon
#

4 separate tanks.. 1 Spins then rest stop and engage at long range

little raptor
coarse dragon
#

Yep

#

And all have the code

little raptor
coarse dragon
#

Found the problem

#

Doesn't seem to work well with the mod tanks

#

Even still. They stop and never move again after they kill everything

little raptor
#

they don't follow waypoints or anything

winter rose
#

as the wiki and your note there state

coarse dragon
#

Aka they stop very short of thier way points

little raptor
coarse dragon
#

halfway

little raptor
#

I mean distance in meters or something

#

if it's only a few it's normal

coarse dragon
#

way way too short of the desired waypoint.

also doesnt explain why 1 spins and now another turns around and runs away

little raptor
#

ยฏ_(ใƒ„)_/ยฏ

#

based on what I tested it seemed to work

#

like I said, DM me the mission.sqm

little raptor
#

@coarse dragon
try this code instead:

this spawn { 
    _veh = _this; 
    _dr = driver _veh; 
    _gr = group _dr; 
    _dest = waypointPosition [_gr, currentWaypoint _gr];
    _start = ASLtoAGL getPosASL _veh;
    _gr selectLeader _dr;
    {
        _dr disableAI _x;
    } forEach ["FSM", "TARGET", "AUTOTARGET", "AUTOCOMBAT", "COVER"];
    _veh setEffectiveCommander _dr;
    doStop _veh; 
    sleep 1;
    _veh setDriveOnPath [_start, _dest];  
}
coarse dragon
#

I love you

drifting portal
#
AplayableUnit remoteExec ["selectPlayer",PlayerObject];

I want the player who is playing as PlayerObject to be switched to AplayableUnit, but I playing as AnotherPlayableUnit is being switched instead?

still forum
#

Are you testing that in MP with multiple players?

#

or in singleplayer or without a player in the PlayerObject slot?

drifting portal
#

but the unit PlayerObject is still there

still forum
#

the remoteExec target executes the code where that unit is local

drifting portal
#

ah

still forum
#

if there is no other player in it, it is local to the server

drifting portal
#

makes sense

drifting portal
#

I think I should just add an If statement to check if the current player is actually that unit?

still forum
#

you could remoteExec a script function that does additional check

#

Leopard is here, he will help you

drifting portal
#

with the function having an if statement in its code?

drifting portal
little raptor
#

if you want the command to take effect for someone else you can compare those 2

#
[AplayableUnit, {
  if (remoteExecutedOwner == clientOwner) exitWith {}; //being applied to the same client, so skip
  selectPlayer _this;
}] remoteExec ["call",PlayerObject];
drifting portal
#

if PlayerObject is not occupied by a player yet

little raptor
#

not really no

#

it just makes sure the command is not being applied to YOU (the one who called it)

still forum
#

I guess you can just chcek if (player!=playerobject) exit

drifting portal
#

thank you, both of you

leaden scaffold
#

any collide EH or script that will work with drawLaser with addMissionEventHandler? wanna test stuff like booby trap

little raptor
#

you can use lineIntersectsSurfaces tho

leaden scaffold
ebon citrus
#

does anyone know why doMove works in singleplayer/hosted environment, but moveTo works in dedicated environment?

winter rose
#

implying doMove doesn't work in dedi & moveTo doesn't work in SP/hosted?

ebon citrus
#

yep

#

this is what i found

#

i have the same FSM running with execFSM, but doing doMove works in SP/hosted, where as it wont work in Dedi

ebon citrus
#

if i call both doMove and MoveTo in that order, then the units take commands

little raptor
#

AI calcs are local

ebon citrus
#

i have moved the AI ownership to the client

#

they are agents

#

and i call setOwner on them

#

checking in-game, i get 0 if i check locally owner on the units, which should imply clientside

#

but just calling both works in both environments

little raptor
ebon citrus
#

im just wondering why

little raptor
#

everywhere else is 0

ebon citrus
#

ah, right

#

so i guess local works on clients too

little raptor
errant fiber
little raptor
#

yes?

errant fiber
#

love your work c:

#

sorry dont mind me

winter rose
coarse dragon
#

jim sideChat "NATO Command.....Warsaw has Fallen..Germany has recived bombardment.Mederation is mayjor battle ground..German reinforments are arriving. NATO Command out":

#

why wont this work?

winter rose
#

it works

open fractal
#

why is there a regular colon at the end

coarse dragon
#

oh shit

winter rose
coarse dragon
#

@open fractal you sir are awesome

open fractal
coarse dragon
#

woman/uni/ect...

#

btw. my words for this are really bad.. i dont know how to word nato stuff correctly

hallow mortar
coarse dragon
#

Epps anyway to keep AI inside a mission area

coarse dragon
#

APC doesn't seem to work

cerulean moth
#

do someone know the class names of the Art of War presentation?

winter rose
cerulean moth
#

mission

winter rose
#

try checking CfgMissions' config

#

(I don't know it)

hushed tendon
#

So any reason why getObjectScale returns exactly scalar when it should return "Number - Scale relative to the original model"

#

Example: ```sqf
["Land_TimberLog_01_F",[[0.599995,-2.62e-008,0.00239828],[0.599995,-2.62e-008,0.00239828]],[0,0.000481017,-0.031517],scalar]

little raptor
hushed tendon
winter rose
#

don't code when tired ๐Ÿ˜„

hushed tendon
#

Nah not tired this time

#

just being dumb

winter rose
#

still applies ๐Ÿ˜†

hushed tendon
#

I should stop copy/pasting everything cause it makes me do stuff like that

ebon citrus
#

How do i get object network ID from machine network ID?

#

I have the machine network ID (number) and i need the object network ID (string)

#

netId takes only objects as parameter

#

so can i get an object somehow with machine network ID

#

it seems no such method exists

#

now isnt this backwards

#

i can get machine network ID from object network ID but not the other way around

#

i guess i'll do it myself

still forum
#

"creator id" its called, or ownerID

#

"but not the other way around" well a machine might have tons of objects

#

or am I confused as to what you're talking about

ebon citrus
#

machine network ID is the number

still forum
#

networkId is creatorId:objectId
and I think there is a seperate just objectID

ebon citrus
#

Object network ID is the string

still forum
#

"machine network id" is the creatorId

#

the first number in the netId

#

the second part in netId is the objectid

ebon citrus
#

yes, but i cant get netID with machine ID

still forum
#

There might be hundreds or thousands of netId's belonging to one creator

ebon citrus
#

the netID given by OnUserConnected

#

the first parameter is a netID

#

same for OnUserDisconnected

still forum
#

oh dpId

#

thats not a netId nor a creator/machine ID

#

thats the engine internal handle for that user

#

Do you want to get that id for a specific player?

ebon citrus
#

(ใƒŽเฒ ็›Šเฒ )ใƒŽๅฝกโ”ปโ”โ”ป

#

how many ID's do you need?

still forum
#

:poutcat:

ebon citrus
#

remoteExecutedOwner returns the machine ID

#

but i need the dpId since i keep track of players with that

still forum
#

why don't you keep track using the machine ID? notlikemeow

ebon citrus
#

BECAUSE onUserConnected doesnt return that

#

and machine ID isnt unique

still forum
#

ah uh oki yes

#

one sec

#

There is a solution, I just need to find it

ebon citrus
#

((getUserInfo _networkId)#1);

#

that, but it's a hacky way

#

and machineID is not unique

still forum
ebon citrus
#

so when another player connects, they might be assigned the same machineid

still forum
#

that returns the dpid

ebon citrus
#

but i dont have an object

still forum
#

thats the only solution :poutcat:

ebon citrus
#

i have the machine ID

still forum
#

Where do you get the machineid from?

ebon citrus
#

remoteExecutedOwner

#

returns a machine ID

granite sky
#

you could search allPlayers, I guess

still forum
#

If someone remoteExec's a thing, they should have a unit

#

search through allplayers yeah, find that machineID's unit

ebon citrus
#

my soul cries

still forum
#

but then you can also just use getUserInfo

#

creatorID IS unique per game

#

so on the remoteExec you can use it to convert to dpid

ebon citrus
#

i'll rather keep a hashmap of all machine ID's and update it on connection with value as the dpID

#

that way, when a machine ID gets swapped for another user, the data from the other user doesnt carry over

#

since i associate the data with the dpID

still forum
#

"when a machine ID gets swapped for another user"
that should never happen

#

new player connects, player gets new creatorId. Atleast thats how I think it should work

ebon citrus
#

i log into server, check my machine ID, log out, log back in, i still have the same machine ID

#

i log out, my friend logs in, he now has my machine ID

still forum
#

:u

#

Pretty sure that shouldn't happen

#

If you want unique per player, just use their steamid?

ebon citrus
#

this doesnt always happen, but happens on random

#

i cant get steamID from machine ID

#

so i need to anyways keep the hashmap

#

ok, i had my answer already

#

i wasnt looking for a solution, since i have one, i was looking for a yes/no

#

can you get dpID from machine ID? answer is no, from what i gather

#

Thank you for your help Dedmen โค๏ธ

#

i'll continue with my hacky solution that does not involve iterating over an entire playerbase

#

made a fn_machineIDdpID

still forum
ebon citrus
#

which converts machine ID to dpID by using a hashmap updated on user connection

still forum
ebon citrus
#

problem solved

ebon citrus
#

not a machine ID

still forum
#

omg getUserInfo takes dpid as input

#

ahhh

ebon citrus
still forum
#

direct play ID, creatorId, objectId

Ahhh

#

Why is wiki using wrong names

#

annoying

winter rose
#

no u

ebon citrus
#

done

#

i made a machine ID to dpID conversion function

#

works only on server-side

#

problem solved

still forum
#

๐Ÿ˜ข

ebon citrus
#

awwww...

#

dont be sad

#

you helped

still forum
#

I now finally looked it up because you confused me

ebon citrus
#

i confused you?

still forum
#

int NextPlayerId() {return _nextPlayerID++;}
OwnerId is UNIQUE! it starts at 3 for the first player that connects, and from then on only increments when a new player connects

ebon citrus
#

what is ownerID?

still forum
#

what you call machineId

ebon citrus
#

it's what biki calls machineID

still forum
#

ownerId script command, clientOwner command, netId command (first half)

ebon citrus
#

ok, but i already use getPlayerID elsewhere, so im stuck with this

#

and there still isnt a conversion from dpID to machine ID

#

so im going to stick to my guns

#

and it still doesnt explain that somehow sometimes other players get the same machine ID as i had when i logged out

light stirrup
#

can anybody help me out with BIS_fnc_spawnGroup? I'm trying to spawn vehicle groups on roads but they always come in facing north and I have no idea how to rotate them via script

#

by which I mean the entire convoy of like four vehicles are arrayed north so south, which means if the road isn't also north-south, then three vehicles will just be like 50 meters off the road

#

and most likely will explode when they spawn inside a tree, cause I'm doing this on a jungle map

#

Is the only solution to spawn each vehicle individually? Please ping me if you respond

winter rose
#

though there is an azimuth parameter ๐Ÿ‘€

light stirrup
#

the azimuth parameter changes the rotation of each vehicle individually but doesn't move them

#

so they all end up facing west for example but strung out north/south

#

I think I'll just spawn them each individually; if I have to change their pos and dir individually anyways then it'd probably be easier

#

thanks for the help though

winter rose
light stirrup
#

I have absolutely no clue how the relPosition works

#

I've tried putting in an array of [0,5,0], [0,10,0]... and so on

#

but it throws me an error in the function itself

#

at the point where I had to find a3\functions\spawning\whatever and start debugging vanilla functions I decided to see if someone else had done it already lol

#

iirc it was complaining about the data type

#

said it expected an array and was getting a bool

#

which makes no sense cause I definitely wasn't giving it a bool

little raptor
#

if you want them to spawn on a road, you have to first find a road, use it as basis for the first object, then put the rest of the objects on other road segments connected to the previous one (making a chain)

#

you can use setVectorDir to align each vehicle with the road (you can get the road beg and end pos using getRoadInfo and then doing vectorFromTo to get the road dir)

light stirrup
#

that sounds like I need to spawn them each individually

little raptor
#

no not necessarily. as Lou said you have the group

#

you can get each vehicle in the group

light stirrup
#

yeah but it's easier for me to spawn each vehicle individually at the correct pos and dir, than it is for me to spawn a group, then iterate through that group and change their pos and dir individually

#

it's a little extra up front work since I have to say define an array of three vehicles instead of just using the group

little raptor
#

if you ask me a loop is easier but meh blobdoggoshruggoogly

little raptor
ebon citrus
open fractal
#

yeah but it's easier for me to spawn each vehicle individually at the correct pos and dir
i disagree with this

mental prairie
#

how do i get an array of players in a vehicle?

open fractal
# little raptor if you ask me a loop is easier but meh <:blobdoggoshruggoogly:748124048025714758...
private _dir = 0;
private _pos = [0,0,0];
private _spacing = -20;
private _vehicles = [];
{
    _vehicles pushbackUnique (vehicle _x);
} forEach units _group;

_group setFormDir _dir;

{
    _x setDir _dir;
    if (_forEachIndex == 0) then {_x setPosATL _pos} else {
        private _pos = (_vehicles # (_forEachIndex - 1)) getRelPos [_spacing, _dir];
        _x setPosATL _pos;
    }
} forEach _vehicles;

Do you think this would work for spacing out vehicles of _group 20m apart in a column?

#

not my mission but I wanted to see if I could figure it out in one go

little raptor
#

also no need to do it like this:

if (_forEachIndex == 0) then {_x setPosATL _pos} else {
private _pos = (_vehicles # (_forEachIndex - 1)) getRelPos [_spacing, _dir];
_x setPosATL _pos;
}

little raptor
#

so it's completely wrong now ๐Ÿ˜…

open fractal
#

classic

#

so it'd just be 0

little raptor
#

but like I said no need to do it like that

open fractal
#

or arbitrarily make spacing negative

#

as in there's a better way to line up objects like that or that the AI can just do it themselves?

little raptor
#
_newPos = _pos getPos [_dir + 180, _spacing * _forEachIndex];
open fractal
#

oh my goodness

little raptor
#

also this made me notice another thing:

private _pos =
your pos was private in its own scope ๐Ÿ˜›

open fractal
#

are you telling me that 0-based index has a use? ๐Ÿง 

#

it's special.

little raptor
#

0 always has a use blobcloseenjoy ๐Ÿ˜ praise_the_sun

open fractal
#

๐Ÿคฏ

open fractal
little raptor
open fractal
#

alright thanks

little raptor
#

it's in its own scope

open fractal
#

i felt insecure about my privates for a minute there

winter rose
#
private _parts = objNull;
little raptor
#
private _parts = "o==>"

meowsweats

hollow thistle
mental prairie
#

hey, I'm having some issues with my script ```sqf
_inVic = vehicle player;

unrelated code here

[_inVic] spawn {
if (_inVic == v1) then {
posAE = [v1trig] call BIS_fnc_randomPos;
player setPos posAE;
} else {
if (_inVic == v2) then {
posAE = [v2trig] call BIS_fnc_randomPos;
player setPos posAE;
} else {
if (_inVic == v3) then {
posAE = [v3trig] call BIS_fnc_randomPos;
player setPos posAE;
} else {
posAE = [v4trig] call BIS_fnc_randomPos;
player setPos posAE;
};
};
};
};

#

I'm getting an undefined variable in expression error

hallow mortar
#

Does it say which variable is undefined

little raptor
#

it's obvious which one tho ๐Ÿ˜…

#

unless you're asking to make him notice...

hallow mortar
#

I'm on mobile and walking, no syntax highlighting and bad line wrap. I can't see it

#

Or "yes" if you'd prefer to think of me as smarter

little raptor
#

yes it is then ๐Ÿ˜›

little raptor
open fractal
#

wouldn't switch be a neater way of accomplishing the same thing?

#
switch _inVic do {
    case v1: {
        posAE = [v1trig] call BIS_fnc_randomPos;
    };
    case v2: {
        posAE = [v2trig] call BIS_fnc_randomPos;
    };
    case v3: {
        posAE = [v3trig] call BIS_fnc_randomPos;
    };
    case v4: {            
        posAE = [v4trig] call BIS_fnc_randomPos;
    };
}
player setPos posAE;
little raptor
#

yes

open fractal
#

it can probably be condensed even more than that

little raptor
#

it can

mental prairie
#

that's a good idea

open fractal
#

thanks i have those about once a week

hallow mortar
#

also if those v*trig references are triggers, not arrays, then the BIS_fnc_randomPos argument probably needs to be an array e.g. [[v4trig]] call ...

mental prairie
#

ahh, that's why i'm getting those errors

#

was about to ask that

#

ty

stark scaffold
#

good evening everyone,
To improve the Airwolf mode, I would like to add an afterburner turbo type to my helicopter.
Is that even possible?
Could you help me create such a script?
Thank you in advance

open fractal
#

just doing this as a personal exercise but I wonder if there's an even shorter way

#

particularly if there is a shortcut for this
_triggers # (_triggers findIf {(str _inVic) in str _x})

little raptor
mental prairie
#

however it works

hallow mortar
open fractal
#
switch _inVic do {
    case v1: {_trig = v1trig};
    case v2: {_trig = v2trig};
    case v3: {_trig = v3trig};
    case v4: {_trig = v4trig};
};
player setPos ([[_trig]] call BIS_fnc_randomPos);
#

take it or leave it

little raptor
open fractal
#

he can't keep getting away with it

#

i keep forgetting getVariable takes a string

mental prairie
#

Got teleported to the debug corner for some reason

little raptor
#

it defaults to objNull when it's not found (which is at [0,0,0], aka corner of the map as you said)

mental prairie
#

ok

trim tree
#

hi, is there a way without creating a mod to change the max capacity a helicopter can lift via vanilla slingload? at least from the scripting commands it doesnt appear that way ):

little raptor
trim tree
#

tried that, but it wont let me sling load them ):

#

probably because it looks in the config of the vehicles

little raptor
little raptor
trim tree
#

well i dont know

#

officially not

#

its regarding the merkava and hemmt support trucks

little raptor
trim tree
#

yeah, ill give it a shot in the weekend ๐Ÿ™‚ thanks

jade acorn
#

How can I detect if player uses car horn, if possible? I'm trying to make AI get into vehicle when player is within area and uses the horn. I couldn't find any EH for this and BI Forums only shows some old topic from 2007.

winter rose
jade acorn
#

I think I tried it in every way with CarHorn but it didn't even detect it.

#

does it work the same way as if trying to fire with no ammo/magazine in your weapon?

hollow thistle
#

Fired does not work with horns

winter rose
#

so, maybe out of luck
or on soundController perhaps

jade acorn
hallow mortar
#

What about detecting the primary fire input action

jade acorn
#

is SportCarHorn a derivative of CarHorn or would I have to include both there?

hollow thistle
#

The first line I've linked literally gathers all horn weapon classes...

jade acorn
#

right..

#

okay I'll try to work with that, thank you

little raptor
#

in case someone doesn't use the mouse for firing

little raptor
#

it doesn't have a special simulation meowsweats

#

yeah it's just using the drySound of the weapon ๐Ÿคฃ

#

so it never fires to begin with meowsweats

#

that's why Fired doesn't work ๐Ÿคฏ

winter rose
#

unplayable!!1!1!!ONE!

brazen lagoon
#

is there a function that will add an item to a unit's inventory? Like will see if there's space in their uniform and add there, or will add to their vest, or will add to their backpack?

quasi rover
#

Is there a classified type or way that identify a LandVehicle which have driver + gunner's seat only and driver + gunner + commander's seat?

little raptor
#

and for detecting whether it's a land vehicle you can check its simulation (from config)

brazen lagoon
#

@winter rose does that work recursively like that?

#

i thought it only added to uniform

quasi rover
#

@little raptor thx, I'll check it out.

open fractal
#
_commands = [
    [" addHeadGear "," headgear "],
    [" forceAddUniform "," uniform "],
    [" addGoggles "," goggles "],
    [" setFace "," face "]
]; 
removeGoggles _unit;
{[_unit, _player] call compile format (["(_this#0) %1 (%2 (_this#1))"] + _x)} forEach _commands

someone save me from my own code

#

is there better way to iterate through commands like this

#

literally just copying the appearance of the player onto a unit

#

it works but it feels jank

little raptor
#

and I see no reason why you just don't write them out normally meowsweats

open fractal
#

because pasting my wack code in here and getting the meowsweats is the extent of my computer science education

#

also i forgot

setUnitLoadout
existed thanks

coarse dragon
#

๐Ÿค”

lethal mortar
#

can you guys help out with some helpful resources for beginners?

warm hedge
#

Depends on the context

lethal mortar
#

POLPOX i want to script ineractions

warm hedge
#

If you want to continue what in #arma3_editor do it there. Not here

lethal mortar
#

but here is what i need

warm hedge
#

Swear to Eden, I don't know what Interactions you mean

lethal mortar
#

you can preform conditions with triggers right? , I'm looking for resources to start doing so

lethal mortar
#

I want to start get my hands dirty so I can better practice this

warm hedge
#

A trigger's condition can be anything that returns a boolean

lethal mortar
#

how do you know what you call return bool

#

?

warm hedge
#

A command's article

lethal mortar
warm hedge
#

No. Some do, some don't

lethal mortar
warm hedge
#

The link you posted is the greatest source to script

lethal mortar
#

what is the type of file read in eden editor where you can place conditions and On activations and On deactivation?

warm hedge
#

Type of file.......? You can just use SQF there

lethal mortar
#

so i need to install it first right?

warm hedge
#

What?

#

Install...what?

lethal mortar
#

sqf

warm hedge
#

Why? SQF is always there, with Arma 3. What you see is SQF already

lethal mortar
#

I want to open it in visual studio code

#

in a code editor

warm hedge
#

I don't know VSCode does have it. It's just your call

hallow mortar
#

sqf files are pretty much text files and can be opened without any special software. There is a syntax highlighting/linting plugin for VSCode on the wiki somewhere.

hallow mortar
#

Activation statements and conditions are related to triggers. They are written in sqf, but are typically placed in the appropriate fields in the trigger's Editor attributes. You can change them with commands in an sqf script, which could be saved in a non-Editor .sqf file, but that's not necessary to use them for basic stuff.

lethal mortar
#

with 33k downloads

tender fossil
#

I had a weak moment and thought about developing my project for fun (instead of CDLC) and making BI management fatter, then I remembered that we don't have a working/up-to-date linter for SQF ๐Ÿ˜„

tender fossil
ebon citrus
#

Sqf syntax editors are for pansies

#

Real sqf magicians write sqf in hex ascii

#

If you doubt me, ask Lou

winter rose
#

php*

#

cf SQF highlighter/linker in #community_wiki on which I am working right now ๐Ÿ˜„

digital wasp
#

where do i create sqf file?

#

*which folder

little raptor
digital wasp
#

thankss!

mental prairie
#

How do I move an array of players to a random position in a trigger area using a global script?

little raptor
#

what's a global script? thonk

mental prairie
#

I mean a script that's executed on the server

#

sorry

little raptor
mental prairie
#

okay ty

digital wasp
#

is there a way to make a specific way for a bot to drive? i have a bot that needs to pass a checkpoint but it cant find a path

mental prairie
#

If you really want the Exact way, you can use unitcapture

#

however that requires a lot of space, and might be buggy at times

#

You can use it as a last resort tho

digital wasp
#

how would a complete script look?

mental prairie
#

Is there a way to make the placement randomized for each player within a single trigger

little raptor
mental prairie
#

How so?

little raptor
#

put it in the loop

#
{
    _pos = _trigger call BIS_fnc_randomPosTrigger;
    _x setVehiclePosition [_pos, [], 0, "NONE"];
} forEach _players;
mental prairie
#

ah kk

#

I'm getting some missing "{" errors but it works

#

nvm

little raptor
mental prairie
queen cargo
native slate
#

Hey. I'm stumbling across a very strange problem, where some custom uniform retextures that I've made appear to work correctly in SP and when running a local MP server - but simply do not show up (i.e. any unit with them equipped when the mission is loaded in will simply spawn in underwear) when used on a dedicated server. It works fine when a unit wearing them is spawned in using zeus on a dedicated server, but if someone leaves and rejoins the game, they'll see said unit in their underwear while everyone else sees the uniform correctly.

#

I've been bashing my head against this problem for a couple days now, and it's extremely strange to me. Has anyone seen anything like this before, or has any suspicions what could be happening based on that behaviour?

#

A friend advised me to post this here rather than in the config channel, since my configs look correct to them

#

All the uniforms this happens with inherit classes/use textures and materials from other mods; they're CWR retextures. Here's an example of the config entries for one where this occurs:

#

I've tried comparing how I've done this with other retexture mods from the workshop, but I haven't found anything significantly different.

ebon citrus
#

@native slate are the uniforms of a side of the units theyre on?

native slate
#

do uniforms have a faction per se?

ebon citrus
#

@native slate isUniformAllowed gives you more information

native slate
#

right

#

I'm not sure, actually - I'm inheriting from CWR quite a bit

ebon citrus
native slate
#

I'll have to go dig through their configs

#

but this seems like a promising thing to look into tbh - thanks

native slate
#

okay, so, this doesn't seem to be the problem

#

maybe in some way the server might have issues loading the external textures it points to, or something like that?

winter rose
native slate
#

makes sense, tbh - I'll post it there

winter rose
#

thx! hope you find the quirk

jolly dune
#

Hi guys I need help putting together a code for a infantry unit using Ace medical. Basicly I need specifically a code which goes like this:
if alive > full heal > sleep 0.1 > repeat
Im bad at this could anyone please put this together for me? I would be very grateful.

hallow mortar
fleet sand
#

Hi guys i have a question is there a way to make agent follow at ceartan speed.(contex) so i have a script where chicken is following a player but run of the chicken is a bit to slow is there a way to make it follow faster ? This is the code:```c
// Spawn chicken
_chicken = createAgent ["Cock_white_F", getPosATL player, [], 5, "NONE"];
_chicken allowDamage false;
// Disable animal behaviour
_chicken setVariable ["BIS_fnc_animalBehaviour_disable", true];

// Following loop
[_chicken] spawn {
params ["_chicken"];

// Force dog to sprint
_chicken playMove "Cock_Run";

while { sleep 1; alive _chicken } do
{
    _chicken moveTo getPosATL player;
};

};```

errant fiber
#

@little raptor Could you help me with the settings.txt file we were discussing in the Comments of your Command Menu mod?

little raptor
little raptor
#

I'm not 100% sure whether it should be initPlayerLocal or initServer or init but I think that's fine

fleet sand
errant fiber
#

I'll do dedicated server testing with it too

little raptor
#

since some settings are local

errant fiber
little raptor
#

you can get the agent's path using PathCalculated event handler

little raptor
errant fiber
little raptor
fleet sand
errant fiber
little raptor
errant fiber
little raptor
errant fiber
little raptor
#

well you need the file extensions for the .sqf file...

errant fiber
#

@little raptor Tests complete. init did not work, initServer did not work, and initPlayerLocal did not work. I could have done something wrong, i wouldn't put it past myself, but I did:

create a settings.txt file containing the exported settings.
Tried the init.sqf file containing "[loadFile "settings.txt"] call cba_settings_fnc_import;"
Uploaded and tested on the server, checked the AIO stuff to see if it changed and it did not.
Tried the initServer.sqf file, doing the same as the other.
and tried the initPlayerLocal.sqf file, doing the same as the other.

Unfortunately, it didn't work for me but like I said I may have done something wrong. It was worth the try and I really appreciate the help. The settings I wanted for AIO are not game-breaking or anything, it still runs as my unit needs, I just wanted to see if I could prevent the possibility of a player using the "high command" and "cheats" features along with enabling ACE medical for the medic AI. Regardless, I've experienced no unfixible issues with the mod in my unit's lifespan of a year. Thanks again for the help and for the awesome mods you provide!

little raptor
errant fiber
little raptor
#

no. init.sqf executes for everybody

errant fiber
errant fiber
little raptor
#

there's no need for init.sqf anymore

errant fiber
#

i really hope youre getting paid for this shit lol

errant fiber
#

it worked

#

you sir

#

are literally jesus

coarse dragon
#

Anyone know if you can get the AIspawn module to work with POG?

exotic yarrow
#

How do I delete the Orbat module so that the group is no longer visible on the map? DeleteVehicle does not work

exotic yarrow
#

thx

stray flame
#

Hey, how can I make this play over radio?

playSound3D ['a3\dubbing_f_tank\ta_tanks_m02\019_eve_support_inf01_casualties_heavy\ta_tanks_m02_019_eve_support_inf01_casualties_heavy_ARINFANTRYA_0.ogg', player];

#

I want it to play for each player (on a mulitplayer server) as if it was in side chat

hallow mortar
#

sideRadio command and remoteExec. sideRadio requires the message to be described in CfgRadio; that message looks like it might have an existing CfgRadio entry you can find (good luck), otherwise you'll need to make a CfgRadio in description.ext

stray flame
#

the message is pulled from arma itself

#

nothing custom

hallow mortar
#

That doesn't change anything I said

#

What does potentially change things is the bottom-most comment on the wiki page for sideRadio, which suggests you can use # to use a direct file path rather than a config reference, so you might not need to bother with CfgRadio

stray flame
#

that would be good

#

would this file need to be in the same folder as my mission.sqf?

warm hedge
#

description.ext must be located in the same folder with mission.sqm yes

stray flame
#

yes ik

#

I meant the sound file

warm hedge
#

Every sound/script/whatever files that needs to be loaded in the mission can be located anywhere in the mission folder or its sub, subsub, subsubsub... folder

stray flame
#

so i will need to extract this sound file from arma and then repost it in my mission folder for it to be done easily or, how many I do this with a file already in the arma files?

warm hedge
#

Oh wait, I misread the context, as long as it's a vanilla or integrated file, you can reuse it

stray flame
#

good, then how would I in this instance?

#

cuz it plays fine, I just want to change the source

warm hedge
hallow mortar
warm hedge
#

Oh, didn't know that trick somehow

#

...Wait, that trick is not something related to this one isn't it

hallow mortar
#

I don't know, I think you pasted the wrong link in your second message

warm hedge
#

Yes I did, I meant the @ trick

stray flame
warm hedge
#

Okay, sounds my brain slips some context sorry :>

hallow mortar
stray flame
#

what should I try first.

warm hedge
#

Uh oh I get it

hallow mortar
#

When (if) you have that working, look at the remoteExec page to see how to make it happen on all clients

stray flame
#

playSound3D #['a3\dubbing_f_tank\ta_tanks_m02\019_eve_support_inf01_casualties_heavy\ta_tanks_m02_019_eve_support_inf01_casualties_heavy_ARINFANTRYA_0.ogg', player];
?

hallow mortar
#

That's still using playSound3D. You'll notice I said to use sideRadio

stray flame
#

sideRadio #['a3\dubbing_f_tank\ta_tanks_m02\019_eve_support_inf01_casualties_heavy\ta_tanks_m02_019_eve_support_inf01_casualties_heavy_ARINFANTRYA_0.ogg', player];

hallow mortar
#

You need to read it

stray flame
#

all of it or the bottom part?

hallow mortar
#

Yes all of it, you are using the command and you need to do it properly or it won't work

stray flame
#

Jesus Christ okay

#

I hope it's easy to replicate once done

hallow mortar
#

Through the magic of copy and paste, all scripts are easy to replicate

coarse dragon
#

I found how to get the AI spawner to potentially work with SOG units.

But it's beyond my understanding ๐Ÿ˜–

trim tree
#

does someone know what the hitpoint or name selection the turret of a HMG MATV (Hunter) is called? I want to disable it but neither "turret" or "vez" (apperantly the translation of turret) work with sethit

warm hedge
stray flame
#

wait okay so im reading through the SideRadio wiki page

#

I am confused on just how I may skip on cfgRadio

#

cuz its all described in the context of cfgRadio

hallow mortar
#

Scroll down right to the very bottom and read KK's comment

stray flame
#

I have

hallow mortar
#

So where the comment says to use the file path of the file you want to use, prefixed with #, and gives an example of how that looks...have you tried that?

stray flame
#

player sideradio #"a3\dubbing_f_tank\ta_tanks_m02\019_eve_support_inf01_casualties_heavy\ta_tanks_m02_019_eve_support_inf01_casualties_heavy_ARINFANTRYA_0.ogg";

#

or is it

#

player sideradio "#a3\dubbing_f_tank\ta_tanks_m02\019_eve_support_inf01_casualties_heavy\ta_tanks_m02_019_eve_support_inf01_casualties_heavy_ARINFANTRYA_0.ogg";

hallow mortar
#

The second one as described in the comment

stray flame
#

neither of them seems to have worked

hallow mortar
#

This will cause the player to be the transmitting unit, as the wiki says. If you want the player to receive a transmission from a different unit, you need to replace player with a reference to that unit

stray flame
#

ah

#

so like another unit on the same side?

hallow mortar
#

It is the side radio channel so yes

drowsy geyser
#

hi, is there a way to start the laser from the gun and not from the "eyePos" ?

addMissionEventHandler ["Draw3D", {  
 drawLaser [  
  eyePos player vectorAdd [0, 0, 0.1],  
  player weaponDirection currentWeapon player,  
  [1000, 0, 0], // Bright red  
  [],  
  0.05,  
  0.05,  
  -1,  
  false  
 ];  
}];
stray flame
#

hmm nothing happend

trim tree
stray flame
#

nothing played

#

idk if its the wrong sort of file path or what

#

Man sideradio "#a3\dubbing_f_tank\ta_tanks_m02\019_eve_support_inf01_casualties_heavy\ta_tanks_m02_019_eve_support_inf01_casualties_heavy_ARINFANTRYA_0.ogg";

hallow mortar
#

You better have tested it with what you edited it to, not what you had before the edit

stray flame
#

hu?

#

I tested it with both for safe mesure

#

one said the command was wrong, the other just, nothing

hallow mortar
#

Right.
It's possible this trick just doesn't work without sounds outside the mission folder, so you might need to dig into CfgRadio after all. Here are some things to try first:

  • try playing a sound file from your mission folder using the same technique. Must be .ogg format. This will help narrow down what's wrong.
  • try adding a \ before a3 in the file path. No promises but in some cases this matters.
stray flame
#
Man sideradio "#\a3\dubbing_f_tank\ta_tanks_m02\019_eve_support_inf01_casualties_heavy\ta_tanks_m02_019_eve_support_inf01_casualties_heavy_ARINFANTRYA_0.ogg";```
#

nothing

warm hedge
#

Highly doubt this syntax works for it, I'm guessing that KK's note is only for the sounds that stored in profile

stray flame
#

well

#

I could try that

hallow mortar
#

Just for fun, let's try that thing POLPOX spotted and replace # with @.

stray flame
#

just gadda convert some sounds I have to the format

#

aight

hallow mortar
#

(also try it both with and without the leading \)

stray flame
#

Man sideradio "@\a3\dubbing_f_tank\ta_tanks_m02\019_eve_support_inf01_casualties_heavy\ta_tanks_m02_019_eve_support_inf01_casualties_heavy_ARINFANTRYA_0.ogg";

Man sideradio "@a3\dubbing_f_tank\ta_tanks_m02\019_eve_support_inf01_casualties_heavy\ta_tanks_m02_019_eve_support_inf01_casualties_heavy_ARINFANTRYA_0.ogg";

#

Nothing

#

didnt say wrong syntax tho

hallow mortar
#

Also, just to be absolutely sure, make sure the transmitting unit does have a radio item. Not all unit types have one by default.

stray flame
#

yep thats coverd

#

both me and them to

hallow mortar
#

Then you will probably have to either extract the file or go find its entry in CfgRadio, if it has one.

stray flame
#

I can try my own file

#

for testing sake

#

Could be usefull too

#

ogg is the format right?

hallow mortar
#

Or .wss but you'll probably find it easier to convert things to .ogg. Actually I think .wav might work too but .ogg is the better choice

stray flame
#

Man sideradio "#ANGRY_SCAV.ogg"

#

weird, nothing

#

I can try to change it to player just for testing

#

I tried changing it to say3D just to make the sound play at all

#

and on player

#

(i have 2 triggers, one is say 3D the other one is radio form the other unit)

#

and neither worked

#

trigger 1:
player say3d "#ANGRY_SCAV.ogg"
trigger 2:
Man sideradio "#ANGRY_SCAV.ogg"

hallow mortar
#

Well, perhaps like POLPOX said, this is only for profile custom user sounds, not mission user sounds. say3D is a different command and I wouldn't expect this to work with that anyway, it requires a CfgSounds entry.

stray flame
#

ah

#

Where should I put the sound?

hallow mortar
#

If it's only for profile custom sounds then this method is not going to work for you in this context.

#

So now your choices are to search through CfgRadio to try to find the entry for this sound, if it has one, or write a CfgRadio in description.ext for this sound.