#arma3_scripting
1 messages ยท Page 751 of 1
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?
@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.
it send the hint globally on a multiplayer server
wrong
what I wrote sends the hint only to the owner of the unit
what you wrote is just weird
Sorry, was just giving it my best shot, not very experienced. I do really appreciate the help. I will give it a test!
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?
"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
https://community.bistudio.com/wiki/remoteExec see example 2
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
Appreciate the help
Thanks Hypoxic, I will start going through it!
If you make compositions with the custom units then you technically get custom factions
Hello, how to add elements in an rsctoolbox with sqf ?
trigger when player gets in a helicopter?
player in yourVehicleNameHere
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?
what doesn't work?
obviously it won't change the description automatically
leading (back)slashes typically don't make a difference, except in includes, which make the path absolute
..\ is only used with includes as well, which goes back in the pack (relatively)
there's also an exception with sounds. iirc they need the @ sign for abs addon path
if it's a script command with specifics, it's usually mentioned on the wiki, if you can, you should just always use it imo(unless you are ofc navigating some relative path)
i have a "Task Description" module
it won't add to the variable
by default it's 0
how'd you set up the default?
checkpoint_captured = 0
where?
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
so just put checkpoint_captured = 0 in init.sqf?
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;
well that means what you have configured in server.cfg > missions, doesn't exist
yes
what was wrong with my code tho?
can i use checkpoint_captured = _x + 1?
no
with that one you don't need to define the variable
as I explained
okay, but what was wrong with my code?
nothing
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
one second, i might be stupid
I have checked multiple files, I am 100% sure they are right. Unless there are other files that I do not know about.
okay, im dumb, there was a problem with a trigger that actually changes description..
whats your server.cfg and what do you have in mpmissions?
(this is also wrong channel)
Do you mind if I private message you???
#server_admins too plz
just use ^ other people may be able to help
Okay thanks guys
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
yes, yes it is
Is it !Alivecheck me1 && ect
In the triggers init?
it's not "Alivecheck". it's alive 
๐ ๐คฏ
!alive me1 && !alive me2 && !alive me3
means all 3 dead
to play a music, use playMusic
to end, use BIS_fnc_endMission
yeah it does. I forgot
Ughh is there any way to check on your killed when playing a mission via eden
you mean besides the kill stats in multiplayer games? (key P)
idk what you mean. it already shows you that by default 
Just shows ya what killed ya
oh when you DIE. right 
idk where the game keeps those stats. probably internally and inaccessible
you have to write a script to keep track of the kills manually
Dang I can't get the Endscenario to work with alive. Because it shows ya the kills on it
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;
};
yes, try and use uiSleep
Happens with uiSleep as well
woops, then you're screwed here
you could check (if has focus then playsound)
isGameFocused yes ๐
can i use apply to discard a value from an array?
i want to remove empty strings("") from my array
use select ๐
private _myArray = ["a", "", "c"];
_myArray = _myArray select { _x != "" }; // ["a", "c"];
That works nicely. Thank you
_myArray = _myArray - [""] will be more efficient
tru
let me flex my SQF dangit!!1!
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.
maybe there are action event handlers you can use
Hey quick quiz question!
How do I get a -NaN in SQF
-(0/0)?
prints error and returns -0 :sad:
-1e39 ?
-1.#INF thats -INF not NaN. But maybe that works for what I need 
const float minusNaN = -NaN;
```deal with it ๐
it doesn't :sad:
log -1
wait 
nvm I think it's correct 
-1.#IND
โค๏ธ
[log -1 isEqualType -1e39, typename (log -1), typename -1e39] [true,"NaN","NaN"] ๐
I have no idea what NaN is then 
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?
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
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
?
I donโt know if its possible, thatโs why iโm asking.
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?
I don't think it's intended, no
make a ticket on feedback tracker
Thanks Leopard!
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.
How are you calling the script
In arma 3 sleep only works in a scheduled environment I believe
once on init field of player and the other times, it gets executed by a trigger every time that the new units to which player is going to be switched
How is it executed? Like what is the actual line that executes it? This is the guide for environments here https://community.bistudio.com/wiki/Scheduler#Scheduled_Environment
execVM is the line
hmm, that is scheduled. Im not sure, arma 2 might work slightly differently in that regard
you should use spawn
the code inside the EH is always unschd
aw damn, I completely missed that
oh I never used that before gotta read more about it :D im a noob scripter >.< thank you J3FF and Leopard20
Hello, how to add elements in an rsctoolbox with sqf ?
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!
use the list box commands:
https://community.bistudio.com/wiki/CT_TOOLBOX
unary call simply opens a scope and executes it. it's no different than, e.g. if then
the binary version overrides the _this variable with what you provide tho
return values and such, are the same, correct?
same as what?
versus if we had arguments or an empty set, i.e. [...] call _callback
Yes but in code sqf
yes, it's the same.
awesome thanks
did you even read the page?
Related commands & functions
Commands: General Commands: UI Eventhandlers Commands: **Listbox**
Yes but lbadd dosen't work in rsctoolbox
only the return value tho. the parameters are different ofc
You have any solution ?
just to be sure, how did you test lbAdd?
actually I think the wiki's definitely wrong
toolboxes have rows and columns 
so it's probably lnbAdd
private _list = (findDisplay 2602) displayCtrl 0503;
_list lbAdd "teste 2";```
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.
_this, it is nil
no. it doesn't create/modify _this
it's the parent scope's _this
๐ก ah okay, so that's how we could chain functions on the parent scope then...
yes. like I said, unary call is no different than e.g. if then
you can even write this instead of call my_fnc_blabla:
if (true) then my_fnc_blabla

yup, that much I comprehend, code is code, whether it is behind a variable.
thanks so much
now that I look more closely at toolboxes I doubt it's possible
a toolbox needs an array of strings, and an array of checked strings
and there's no command for the second one
also when I do lbAdd and check lbText, it's empty
so it's not using lbAdd either
you can however use lbSetText
so the only solution I can think of is adding empty elements in the config ("" as text) and then using lbSetText to "add" new elements
Yes I will do that thanks
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.
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?
while loops only run for 10000 iterations in unschd env
it's probably stuck elsewhere
if your game is stuck, yes, you have to close it
๐ 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
for "_i" from 1 to 5 do { player addItem _banana }
if addMagazines doesn't work with items already, you can just write a for loop
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"
projectiles don't support scripted EHs right now

they'll be added in v2.10
see #community_wiki and #dev_rc_branch for what's coming

if you need a workaround (since 2.10 is so far away, probably 3+ months), you have to create an each frame loop, and constantly track the projectile's position
its last position before it's dead is roughly its impact pos
would that hurt performance or is it negligible if the loop only tracks position
depends how many projectiles are in flight
fair enough
it very bad for performance :3
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];
}];
relatively speaking yes. but like I said, generally it depends
if you only have a few it won't "reduce your FPS" or something
there's no better solution rn
(there's no setVariable and EH support)
ammo EHs are not even on dev branch 
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?
what if you do:
player switchMove "Acts_UnconsciousStandUp_part1";
player playMoveNow "Acts_UnconsciousStandUp_part1"
```?
nope, the sound still plays itself after I gain the control
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?
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 
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 โฆ
doors aren't necessarily named "door_%1_rot"
oh that code opens gates i place in the editor but not the one already on the map
is it the same object type?
im not getting an error
Deletecollection
I've never seen this command, and according to wiki it's obsolete
that works perfectly except for the said gate im trying to remove
you never get error for invalid anim name
thus my confusion 0.0
no errors at all
witchcraft bro
losing my mind over this all
that wasn't my question. you said it works with "objects you place". is it the same type of object?
im assuming it is because it fires and gives no errors for type of object... ?
I see no animation for the rot animation you are trying to do for the object Land_Net_Fence_Gate_F in the config
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.
Animations are not defined in config tho
They're part of the model
Which you can get using animationNames
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
it seems it's an animation bug, I tried every method I could think of, asked a friend of mine to replicate that and he also was stuck with the sound being played after the animation ends, I made a ticket on this but I guess I'll have to live with it
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?
A function can return a boolean
Ah OK, I just got up this morning ready to work on this again, will look into functions return values. Ty!
To remove it you can just use the Hide Terrain Objects module
A waitUntil would do it, e.g.
waitUntil {yourBooleanVariable && triggerActivated yourTrigger};```
why are a lot of the positions returned by livonia-buildings using buildingPos commmand under the floor?
are you using the correct position format?
buildingPos was AGL iirc
that makes sense
if only the wiki mentioned it :p
if i just had the patience to read the biki...
... Lou, would you be so kind to hand me the hammer?
I suggest that you just keep the hammer with you at all times ๐
to defend or to self-apply ๐
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
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
afaik after each one is created
create > init > create > init
That's inconvenient
im working on a script, i tried several things, nothing works, could someone corect me please ?
how do i do this code text?
!code
```sqf
// your code here
hint "good!";
```
โ
// your code here
hint "good!";
_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 ๐
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
you could go forEach (thislist select { isPlayer _x })
{_x moveInCargo heli} forEach (allPlayers inAreaArray thisTrigger);
@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
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.
its missionConfigFile
if it's inmissionConfigFilewhy are you looking upconfigFile?
(configFile >> "ProcessAction" >> _x >> "Text")
https://community.bistudio.com/wiki/configClasses returns configs, you're tryingCONFIG >> CONFIGwhich doesn't exist
I'm not sure if I'm understanding what you mean
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)
Ohhhh
thats what I mean in short
Thank you! Makes sense
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?
100 storage units
it's a virtual unit that accounts for both storage & weight
time to test mass in items then ๐
thanks
Is sqf bytecode only recognized when using functions library or compileScript?
compileScript only, yes, and that is used by functions library
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.
If im not wrong, that can be done in the weapon's config. Look around in cfgWeapons reference. Otherwise setup displayeventhandlers
the death star laser is nearing completion
unrelated but what does -1.#IND mean
indeterminate??
please report wiki problems in #community_wiki
gotcha,
some division by zero?
no that should throw an error 
probably invalid/out of bounds math
e.g log -1 that I mentioned before
It is possible to get NaN if you do like 10e100 or smth AFAIK
i just messed up the parentheses and put abs on a number that was supposed to be negative
i am a math expert actually
bingo
https://community.bistudio.com/wiki/setMaxLoad does someone wants to talk about the yomama joke in the example ๐ ๐ ๐ ๐
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
allMines + inAreaArray + triggerAmmo
But now...
https://community.bistudio.com/wiki/triggerAmmo Yes mines don't work with triggerAmmo ๐คฃ
you can setDamage 1 them to kill them maybe
is there an EH to handle message being sent? I only see one for message being received
it should work for both
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
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
alright
Is there anyway to make a tank just drive in a straight fucking line without them seeking out roads to drive on ๐บ ๐บ
actions maybe?
didn't I already tell you that? setDriveOnPath
No?
yes
Oh. Is that a code? Or a option
it was said already โ
it's a command
Does it ignore all obstacles, including other units and vehicles?
kinda. but no
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 
Hmm. I'm ok with unit avoidance, I just want something to drive across bridges.
unit avoidance
oh no it still ran them over ๐คฃ
just didn't want to ๐คฃ
https://community.bistudio.com/wiki/sendSimpleCommand
For literally going straight with "FORWARD". I would hope at least.

also you can just set their combat mode to Combat
they won't go on roads anymore
and avoid obstacles properly (well in Arma terms...)
That's exactly what I've set it too and they still seek out the roads
I created a light at day with_light setLightDayLight true;but at night the light was not there.
you can put this in the tank's init and add a waypoint for the group:
this spawn {
_veh = _this;
_dr = driver _veh;
_gr = group _dr;
_dest = waypointPosition [_gr, currentWaypoint _gr];
doStop _veh;
sleep 0.01;
_veh setDriveOnPath [ASLtoAGL getPosASL _veh, _dest];
}
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
what's up with networkID and owner ID not being the same thing?
networkID is kept unique
for tracking
ok
set the group on careless maybe 
owner ID and network ID had me pulling my hair for a bit because i presumed they were the same
๐จ
Then they won't fight ๐ฌ
they do
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.
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
try the new code
I'd made a mistake 
I did xD
this one
I just updated it
oh my
Mixed results
why?
When they engage one just spins and the other doesn't want to move anymore
and you updated both scripts?
Both?
- Please just stops and engages long rang. Like very very long range
you have to add that code to every tank
and they must not be in the same group
Further testing
and again, make sure you're using this code:
#arma3_scripting message
4 separate tanks.. 1 Spins then rest stop and engage at long range
are they in different groups?
DM me the mission.sqm file. save it as unbinarized
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
well yeah with that code they're only supposed to move to a certain point and stop
they don't follow waypoints or anything
as the wiki and your note there state
Aka they stop very short of thier way points
like how far?
halfway
way way too short of the desired waypoint.
also doesnt explain why 1 spins and now another turns around and runs away
ยฏ_(ใ)_/ยฏ
based on what I tested it seemed to work
like I said, DM me the mission.sqm
@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];
}
I love you
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?
Are you testing that in MP with multiple players?
or in singleplayer or without a player in the PlayerObject slot?
MP but with no multiple players
but the unit PlayerObject is still there
the remoteExec target executes the code where that unit is local
ah
if there is no other player in it, it is local to the server
makes sense
isn't there a way to avoid this side effect?
I think I should just add an If statement to check if the current player is actually that unit?
you could remoteExec a script function that does additional check
Leopard is here, he will help you
with the function having an if statement in its code?
he has been summoned
you can for example use clientOwner and remoteExecutedOwner
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];
alright, say 4 players are connected, will this avoid any problems?
if PlayerObject is not occupied by a player yet
not really no
it just makes sure the command is not being applied to YOU (the one who called it)
I guess you can just chcek if (player!=playerobject) exit
thats what I wanted to do
thank you, both of you
any collide EH or script that will work with drawLaser with addMissionEventHandler? wanna test stuff like booby trap
no EH
you can use lineIntersectsSurfaces tho
hmm smart
does anyone know why doMove works in singleplayer/hosted environment, but moveTo works in dedicated environment?
implying doMove doesn't work in dedi & moveTo doesn't work in SP/hosted?
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
most likely locality issue
if i call both doMove and MoveTo in that order, then the units take commands
AI calcs are local
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
owner only works on the server
im just wondering why
everywhere else is 0
you should move agents using setDestination
Leopard ๐
yes?
yeah how can you!!
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?
it works
why is there a regular colon at the end
oh shit
https://community.bistudio.com/wiki/sideChat
unit sideChat chatText; // โ semicolon indeed
@open fractal you sir are awesome

woman/uni/ect...
btw. my words for this are really bad.. i dont know how to word nato stuff correctly
Useful words:
received
Mediterranean
major
reinforcements```
Epps anyway to keep AI inside a mission area
APC doesn't seem to work
do someone know the class names of the Art of War presentation?
the classname ofโฆ what? the frames, the mission, the building, etc?
mission
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]
the variable you used it on was probably not defined
That makes sense and I'm blind. Ty for helping my small brain work once again
don't code when tired ๐
still applies ๐
I should stop copy/pasting everything cause it makes me do stuff like that
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
"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
networkId is creatorId:objectId
and I think there is a seperate just objectID
Object network ID is the string
"machine network id" is the creatorId
the first number in the netId
the second part in netId is the objectid
yes, but i cant get netID with machine ID
There might be hundreds or thousands of netId's belonging to one creator
the netID given by OnUserConnected
the first parameter is a netID
same for OnUserDisconnected
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?
:poutcat:
i want to get that ID from a machine ID
remoteExecutedOwner returns the machine ID
but i need the dpId since i keep track of players with that
why don't you keep track using the machine ID? 
((getUserInfo _networkId)#1);
that, but it's a hacky way
and machineID is not unique
so when another player connects, they might be assigned the same machineid
that returns the dpid
but i dont have an object
thats the only solution :poutcat:
i have the machine ID
Where do you get the machineid from?
you could search allPlayers, I guess
If someone remoteExec's a thing, they should have a unit
search through allplayers yeah, find that machineID's unit
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
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
"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
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
:u
Pretty sure that shouldn't happen
If you want unique per player, just use their steamid?
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
Why not?
https://community.bistudio.com/wiki/getUserInfo
Try to iterate through all of... oh thats serverscript? is that serverconfig script only or does it run in sqf too
which converts machine ID to dpID by using a hashmap updated on user connection
Yes :U :bigsadcry:
getUserInfo :bigsadcry:
problem solved
getUserInfo takes an object ID
not a machine ID

no u
done
i made a machine ID to dpID conversion function
works only on server-side
problem solved

๐ข
I now finally looked it up because you confused me
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
what is ownerID?
what you call machineId
it's what biki calls machineID
ownerId script command, clientOwner command, netId command (first half)
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
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
https://community.bistudio.com/wiki/BIS_fnc_spawnGroup tells you it returns the Group value
from this, you can find the vehicles and setPosATL/setDir them all ๐
though there is an azimuth parameter ๐
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
what about the relPosition then?
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
it doesn't matter how you spawn them
you have to set their position and dir individually
the problem isn't just road not facing "north-south". road isn't a flat line. it's a curve
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)
that sounds like I need to spawn them each individually
no not necessarily. as Lou said you have the group
you can get each vehicle in the group
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
if you ask me a loop is easier but meh 
the real question here is why do you even need them?
problem already solved
yeah but it's easier for me to spawn each vehicle individually at the correct pos and dir
i disagree with this
how do i get an array of players in a vehicle?
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
I think your spacing is backwards (first vehicle should be at front, but instead the last one is)
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;
}
also according to the wiki dir is relative
so it's completely wrong now ๐
if you want to do this 180
but like I said no need to do it like that
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?
I mean no need to use getRelPos (since it needs an object, and you had to work around it by wrapping your code in if
)
_newPos = _pos getPos [_dir + 180, _spacing * _forEachIndex];
oh my goodness
also this made me notice another thing:
private _pos =
your pos was private in its own scope ๐
0 always has a use
๐ 
๐คฏ
I assumed that was how you would set a new _pos for each iteration, which obviously isn't necessary in this case but do I have the wrong idea about scopes?
I guess so yeah.
private always defines a new variable local to its scope
scopes above it will neither see this nor will be affected (the only exception is if you use a command that modifies a value by reference, e.g. pushBack)
alright thanks
actually your code was correct. I didn't read it correctly 
I thought you were using _pos outside its scope
it's in its own scope
i felt insecure about my privates for a minute there
private _parts = objNull;
private _parts = "o==>"


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
Does it say which variable is undefined
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
yes it is then ๐
anyway, the error you're getting is from the _inVic variable. spawn doesn't execute in the current code (obviously, since it creates a new script handle which executes later), so it doesn't see any of the local variables you defined before
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;
yes
it can probably be condensed even more than that
it can
that
that's a good idea
thanks i have those about once a week
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 ...
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
private _inVic = vehicle player;
//private _vehicles = [v1,v2,v3,v4];
private _triggers = [v1trig,v2trig,v3trig,v4trig];
private _trg = _triggers # (_triggers findIf {(str _inVic) in str _x});
posAE = [[_trg]] call BIS_fnc_randomPos;
player setPos posAE;
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})
I have no idea what Airwolf mode is 
but what you ask might be possible using addForce or setVelocityModelSpace
thank'u for your help.
there's a zero division error
however it works
This still applies since _trg is not an array <#arma3_scripting message>
findIf is slow...
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
_id = ([v1, v2, v3, v4] find _inVic) + 1;
_trig = missionNamespace getVariable [format ["v%1trig", _id], objNull];
Got teleported to the debug corner for some reason
_inVic wasn't any of them then
it defaults to objNull when it's not found (which is at [0,0,0], aka corner of the map as you said)
ok
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 ):
no but afaik you can use setMass to make the cargo lighter
tried that, but it wont let me sling load them ):
probably because it looks in the config of the vehicles
another idea is attaching them to a temporary lighter object and sling load that obj instead
can they even be sling loaded?
not sure but I think vehicles can always be sling loaded 
anyway you can try this
yeah, ill give it a shot in the weekend ๐ thanks
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.
I take that vehicle's Fired EH does not work?
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?
Fired does not work with horns
so, maybe out of luck
or on soundController perhaps

What about detecting the primary fire input action
something like this yeah.
is SportCarHorn a derivative of CarHorn or would I have to include both there?
The first line I've linked literally gathers all horn weapon classes...
you can use user action event handlers now... 
in case someone doesn't use the mouse for firing
I see why you reacted with this now ๐
yeah it should use the weapon's simulation, not inheritsFrom 
or not? 
it doesn't have a special simulation 
yeah it's just using the drySound of the weapon ๐คฃ
so it never fires to begin with 
that's why Fired doesn't work ๐คฏ
unplayable!!1!1!!ONE!
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?
addItem?
Is there a classified type or way that identify a LandVehicle which have driver + gunner's seat only and driver + gunner + commander's seat?
depends. if you already have the vehicle as object you can simply use the fullCrew command
alternatively, or if you have the class name only, you can check the config to see if it has driver and gunner
and for detecting whether it's a land vehicle you can check its simulation (from config)
@winter rose does that work recursively like that?
i thought it only added to uniform
@little raptor thx, I'll check it out.
_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
setUnitLoadout
and I see no reason why you just don't write them out normally 
because pasting my wack code in here and getting the
is the extent of my computer science education
also i forgot
setUnitLoadout
existed thanks
๐ค
can you guys help out with some helpful resources for beginners?
Depends on the context
POLPOX i want to script ineractions
If you want to continue what in #arma3_editor do it there. Not here
but here is what i need
Swear to Eden, I don't know what Interactions you mean
you can preform conditions with triggers right? , I'm looking for resources to start doing so
there are no examples there for conditions and triggers I already looked into that
I want to start get my hands dirty so I can better practice this
A trigger's condition can be anything that returns a boolean
A command's article
everything here return bool ?https://community.bistudio.com/wiki/Category:Arma_3:_Scripting_Commands
No. Some do, some don't
so for every command you look for , you use documentation? or you got some editor snippets?, how do you work?
The link you posted is the greatest source to script
what is the type of file read in eden editor where you can place conditions and On activations and On deactivation?
Type of file.......? You can just use SQF there
so i need to install it first right?
sqf
Why? SQF is always there, with Arma 3. What you see is SQF already
I don't know VSCode does have it. It's just your call
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.
that's what i look for:D
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.
I found it its a plugin called SQF Language
with 33k downloads
Isn't it deprecated nowadays?
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 ๐
Someone please tell me that I'm wrong
Sqf syntax editors are for pansies
Real sqf magicians write sqf in hex ascii
If you doubt me, ask Lou
php*
cf SQF highlighter/linker in #community_wiki on which I am working right now ๐
if making a mission anywhere in the mission folder (including subfolders)
thankss!
How do I move an array of players to a random position in a trigger area using a global script?
what's a global script? 
_pos = _trigger call BIS_fnc_randomPosTrigger;
{
_x setVehiclePosition [_pos, [], 0, "NONE"];
} forEach _players;
okay ty
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
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
setDriveOnPath
how would a complete script look?
this is one example
It places everyone in roughly the same position
Is there a way to make the placement randomized for each player within a single trigger
call that function multiple times
How so?
put it in the loop
{
_pos = _trigger call BIS_fnc_randomPosTrigger;
_x setVehiclePosition [_pos, [], 0, "NONE"];
} forEach _players;
it has nothing to do with what I wrote
ye it was on my part
Still hoping for someone with Lil bit of time to continue the sqf-vm language server...
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.
@native slate are the uniforms of a side of the units theyre on?
do uniforms have a faction per se?
@native slate isUniformAllowed gives you more information

I'll have to go dig through their configs
but this seems like a promising thing to look into tbh - thanks
okay, so, this doesn't seem to be the problem
the issue still occurs even with items that don't really inherit any classes from CWR, like this helmet:
https://i.imgur.com/MwyZfN1.png
maybe in some way the server might have issues loading the external textures it points to, or something like that?
I'm afraid to say that it might not be #arma3_scripting related; maybe more #arma3_troubleshooting
makes sense, tbh - I'll post it there
thx! hope you find the quirk
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.
[_unit] spawn {
params ["_unit"];
while {alive _unit} do {
[_unit] call ace_medical_treatment_fnc_fullHealLocal;
sleep 0.1;
};
};```
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;
};
};```
@little raptor Could you help me with the settings.txt file we were discussing in the Comments of your Command Menu mod?
I don't think an action for running fast is defined for chickens... 
make a settings.txt file in your mission root and paste the exported settings in it
create a file called initPlayerLocal.sqf too, and put [loadFile "settings.txt"] call cba_settings_fnc_import; in there
I'm not 100% sure whether it should be initPlayerLocal or initServer or init but I think that's fine
yea i have try to make it go faster with this command but no effect ๐ญ ```c
_chicken forceSpeed(_chicken getSpeed "FAST");
You are doing God's work. I'll try "initServer" first, then the other, I'll lyk when I got it worked out. Thanks again
I'll do dedicated server testing with it too
ok but I think initPlayerLocal is more likely to be the one 
since some settings are local
okay, i just figured the "initServer" would be the one I need, since its running on a server. Thanks again dude ๐
well yeah when there's no action they can't go any faster.
if you really want to make them move fast you have 2 options:
use setVelocityModelSpace to "push" them (they might lose their path tho)
use setVelocityTransformationto manually move them along the path
you can get the agent's path using PathCalculated event handler
also just a fair warning: my mod is not really MP compatible...
My unit has been using it for about a year now with pretty much no issues, I just recently discovered the settings for it which is why Im experimenting around. I think it's a fantastic mod, I got no complaints whatsoever. Thanks again for everything
btw if initPlayerLocal.sqf doesn't work try init.sqf next
Yea that is way to mutch to calculate for just a little bit of fun with chicken. Also a Qustion is there a way to make chicken follow a specific player. Do i give player a variable name and make it follow variable name player or what do i do ?
ight, I'll have all the info in about an hour
Do i give player a variable name and make it follow variable name player or what do i do ?
yeah
just to be sure, the "settings.txt" file in the mission folder is simply named "settings", and the file type is a Text Document?
I guess. enable file extensions in Explorer to be sure
awesome, looks like im doing it right. Just double checkin
well you need the file extensions for the .sqf file...
yeah i got em
@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!
put this in the init.sqf file:
[loadFile "settings.txt"] call cba_settings_fnc_import;
[] spawn {waitUntil {alive player}; sleep 5; hint "Init executed"}
it should show a message that init executed (when a player joins the server he should see the message). if you don't see the message you didn't do it right
k I'll give it a try. Want me to try that code with other sqfs like initPlayerLocal?
no. init.sqf executes for everybody
awesome, thanks
Made the edits, threw it on the server, and the message did show. Unfortunately the settings still did not transfer. It's all good, thanks for the help
so I just did some reading on CBA settings. looks like there are other ways too if you really want to make it work:
https://github.com/CBATeam/CBA_A3/wiki/CBA-Settings-System#add-settings-file-to-mission-without-cba
so I guess rename the settings.txt file to cba_settings.sqf and add cba_settings_hasSettingsFile = 1; to description.ext (if you don't have this file create it)
there's no need for init.sqf anymore
cool, i got nothing better to do so ill try it out
i really hope youre getting paid for this shit lol
holy toenails
it worked
you sir
are literally jesus
Anyone know if you can get the AIspawn module to work with POG?
How do I delete the Orbat module so that the group is no longer visible on the map? DeleteVehicle does not work
thx
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
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
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
description.ext must be located in the same folder with mission.sqm yes
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
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?
Oh wait, I misread the context, as long as it's a vanilla or integrated file, you can reuse it
good, then how would I in this instance?
cuz it plays fine, I just want to change the source
https://community.bistudio.com/wiki/Description.ext#CfgRadio
As NikkoJT suggests this could be it
According to https://community.bistudio.com/wiki/sideRadio (very bottom) you might not need to use CfgRadio. Best to test that first, doesn't cost anything to try it
https://community.bistudio.com/wiki/Description.ext#CfgSounds
Also the bottom note of this one, IDK if CfgRadio can use this trick
Oh, didn't know that trick somehow
...Wait, that trick is not something related to this one isn't it
I don't know, I think you pasted the wrong link in your second message
Yes I did, I meant the @ trick

Okay, sounds my brain slips some context sorry :>
Oh the one in CfgSounds not CfgRadio :P
It seems like a similar function and it might work in CfgRadio too. But I don't think it helps in this case
what should I try first.
Uh oh I get it
Use sideRadio with the # trick described on its wiki page and the file path you already have
When (if) you have that working, look at the remoteExec page to see how to make it happen on all clients
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];
?
That's still using playSound3D. You'll notice I said to use sideRadio
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];
all of it or the bottom part?
Yes all of it, you are using the command and you need to do it properly or it won't work
Through the magic of copy and paste, all scripts are easy to replicate
I found how to get the AI spawner to potentially work with SOG units.
But it's beyond my understanding ๐
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
https://community.bistudio.com/wiki/getAllHitPointsDamage
This to fetch the name
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
Scroll down right to the very bottom and read KK's comment
I have
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?
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";
The second one as described in the comment
neither of them seems to have worked
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
It is the side radio channel so yes
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
];
}];
hmm nothing happend
thanks, found it (hitturret duh)
I tried it but no luck it seems
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";
You better have tested it with what you edited it to, not what you had before the edit
hu?
I tested it with both for safe mesure
one said the command was wrong, the other just, nothing
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
a3in the file path. No promises but in some cases this matters.
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
Highly doubt this syntax works for it, I'm guessing that KK's note is only for the sounds that stored in profile
Just for fun, let's try that thing POLPOX spotted and replace # with @.
(also try it both with and without the leading \)
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
Also, just to be absolutely sure, make sure the transmitting unit does have a radio item. Not all unit types have one by default.
Then you will probably have to either extract the file or go find its entry in CfgRadio, if it has one.
I can try my own file
for testing sake
Could be usefull too
ogg is the format right?
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
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"
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.

