#arma3_scripting
1 messages ยท Page 647 of 1
you could do an OR, or you could make an array of acceptable backpacks
so you could do
private _acceptableBackpacks = ["backpack1","backpack2"];
if ((backpack _unit) in _acceptableBackpacks)```
@bold mica
Also it seems that addMissionEventHandler is missing the eventhandler type
No worries
where can i set that array
(easier for future stuff)
addMissionEventHandler ["",{
if (toLower backpack _unit in ["tfw_ilbe_a_gr","tfw_ilbe_dd_gr"] && _itemRemoved isEqualTo "ACRE_PRC117F") then {
_unit addBackpackCargoGlobal ["ACRE_PRC117F",1];
};
}];``` my friend just gave me this
You could make a global variable
Global variables dont begin with an underscore (_). And are accessible from anywhere within the mission. If you want to learn more search for Scopes on the wiki
but quickly you could just write above the addMissionEventHandler:
MyAllowedBackpacks = [];
addMissionEventhandler blahblahblah```
Yes thats the right link
wouyldnt a global variable send it to everyone to process?
no, thats a public variable
your pfp is a mood
global means accessible in different scopes
surely take would be better than invenntoryclosed
player addEventHandler ["Take", {
params ["_unit", "_container", "_item"];
if (
_container isEqualTo backpackContainer _unit &&
toLower backpack _unit in ["tfw_ilbe_a_gr","tfw_ilbe_dd_gr"] &&
_item == "ACRE_PRC117F"
) then {
_unit addBackpackCargoGlobal ["ACRE_PRC117F",1];
};
}];
then you just need to delete the item you removed, perhaps with a Put event.
for "_i" from 1 to 78 do
{
private _pos_1 = missionNamespace getVariable [format ["arr_%1", (_i-1)], objNull];
private _pos_2 = missionNamespace getVariable [format ["arr_%1", _i], objNull];
map drawline [getpos _pos_1, getpos _pos_2, [128, 1, 1]];
deletevehicle _pos_1;
};
I'm trying to get a line drawn between a serious of arrow objects with variable names arr_0 through arr_78. The script above isn't throwing any errors but isn't working either.
is that in a Draw event?
if not, needs to be. check the example
https://community.bistudio.com/wiki/drawLine
why take?
because you are taking it from your backpack
Ok, thanks. I saw the example just didn't know it had to be wrapped in that.
but also im hoping that if they drop it from their backpack or move it anywhere that isnt their backpack, itll just put another radio in it
so it constantly checks with close inventory
like "if player has no brick but has backpack, add brick, but if brick is removed, add brick"
thats basically what im trying to do
private _item = "ACRE_PRC117F";
if (_unitItems findIf {_item == _x} == -1) then {
_unit addBackpackCargoGlobal [_item,1];```
https://cdn.discordapp.com/attachments/788909053035413525/801306703958114324/unknown.png
for "_i" from 1 to 78 do
{
private _pos_1 = missionNamespace getVariable [format ["arr_%1", (_i-1)], objNull];
private _pos_2 = missionNamespace getVariable [format ["arr_%1", _i], objNull];
(findDisplay 12 displayCtrl 51) ctrlAddEventHandler
[
"Draw",
"(_this select 0) drawline [getpos _pos_1, getpos _pos_2, [128, 1, 1]];"
];
deletevehicle _pos_1;
};```
So now I'm getting that error after I but in the eventhandler bit.
map ctrlAddEventHandler ["Draw",{
params ["_map"];
for "_i" from 1 to 78 do
{
private _pos_1 = missionNamespace getVariable [format ["arr_%1", (_i-1)], objNull];
private _pos_2 = missionNamespace getVariable [format ["arr_%1", _i], objNull];
_map drawline [getpos _pos_1, getpos _pos_2, [128, 1, 1]];
//deletevehicle _pos_1;
};
}];
lines are only shown for the frame they are drawn in, so you cant delete the position objects
player addEventHandler ["Put",{
if (toLower backpack _unit in ["tfw_ilbe_a_gr","tfw_ilbe_dd_gr"] && _item == "ACRE_PRC117F") then {
_unit addBackpackCargoGlobal ["ACRE_PRC117F",1];
};
}];
Alternatively my friend gives me this but it'll just add another brick and not remove it
you could probably make a bunch of thin rectangle markers and position and angle them to the shape you need, but drawLine like this is the usual (and easier) way.
there is a few issues with that. if you're happy with inventoryclosed then stick with it ๐
It's still not working, would the 12 and 51 values matter at all?
Alright I'll test this tomorrow hopefully, if not friday
yes. display 12 ctrl 51 is the main map control. if that is not the map control you want this to be on, change it to reference your control.
I don't really know what you mean by that but I guess it should be fine as it is. Any idea why I can see the lines still?
possibly because you provide an rgb color, but it expects rgba
Nope didn't fix it. Still no lines.
do the position objects exist?
I have gotten 4 ways to do the same function and idk if any of them work
Yeah, the put eventhandler is going to be the best. Also, I wasn't thinking and had you use the mission eventhandler, that was incorrect. Needs to be added to the unit
How would the put event handler work
It is triggered everytime an item is moved into a container
Into or out of
take is out of, put is into
Yeah
Objects 100% exist and yet no line?
show your code snippet as it is now
for "_i" from 1 to 78 do
{
private _pos_1 = missionNamespace getVariable [format ["arr_%1", (_i-1)], objNull];
private _pos_2 = missionNamespace getVariable [format ["arr_%1", _i], objNull];
map drawline [getpos _pos_1, getpos _pos_2, [128, 1, 1, 1]];
};
.... is it in an event?
No, I thought the event thing went with the drawline thing?
Wait so wouldn't take be better for if someone moved it out of the bag? Or....
Does it all need to go in the event thing?
copy this snippet in its entirety
#arma3_scripting message
that is why i suggested it
I didn't notice the event had been moved only the commented out line. Sorry.
Why does playAction work for my player but not a civilian unit? Is it only certain gestures it works with?
tested with GestureNo
map ctrlAddEventHandler ["Draw",{
params ["_map"];
for "_i" from 1 to 78 do
{
private _pos_1 = missionNamespace getVariable [format ["arr_%1", (_i-1)], objNull];
private _pos_2 = missionNamespace getVariable [format ["arr_%1", _i], objNull];
_map drawline [getpos _pos_1, getpos _pos_2, [128, 1, 1, 1]];
};
}];
I've removed the commented out line and also changed the colour from RGB to RGBA
So this
player addEventHandler ["Put",{
if (toLower backpack _unit in ["tfw_ilbe_a_gr","tfw_ilbe_dd_gr"] && _item == "ACRE_PRC117F") then {
_unit addBackpackCargoGlobal ["ACRE_PRC117F",1];
};
}];```
you arent defining any variables so that will error
And sadly, no lines.
look at how i did it here #arma3_scripting message
ill get in game and test some things. give me a few minutes
Ok, thank you.
Can I just copy and paste this into my unit.sqf
init
probably. give it a go and see if it works
@cerulean cloak this works for me
test_polygon = [];
for "_i" from 1 to 11 do
{
test_polygon pushBack position (missionnamespace getvariable [format["a_%1",_i],objnull]);
};
findDisplay 12 displayCtrl 51 ctrlAddEventHandler ["Draw",
{
params ["_control"];
_control drawPolygon [test_polygon, [0,0,1,1]];
}];
mostly copied from https://community.bistudio.com/wiki/drawPolygon
What am I expecting to see on the map?
https://cdn.discordapp.com/attachments/788909053035413525/801313461652815942/unknown.png
Because I can't see anything.
well you'll need to modify it to work for you...
test_polygon = [];
for "_i" from 0 to 78 do
{
test_polygon pushBack position (missionnamespace getvariable [format["arr_%1",_i],objnull]);
};
findDisplay 12 displayCtrl 51 ctrlAddEventHandler ["Draw",
{
params ["_control"];
_control drawPolygon [test_polygon, [0,0,1,1]];
}];
Works quite well expect for a line linking the first and last points
ughh, yea ๐ฆ go back to the draw line code you had. idk why it isnt working as that also works for me.
Would CBA or ACE have any impact on this?
its possible i guess. i wouldnt know what part though.
Since it seems the polygon function draws a line from each marker to the next looping at the end what if we added all the points again but in reverse order?
it connects the first and last position, no matter what order you add them in
test_polygon = [];
for "_i" from 0 to 78 do
{
test_polygon pushBack position (missionnamespace getvariable [format["arr_%1",_i],objnull]);
};
for "_i" from 0 to 78 do
{
test_polygon pushBack position (missionnamespace getvariable [format["arr_%1",(78-_i)],objnull]);
};
findDisplay 12 displayCtrl 51 ctrlAddEventHandler ["Draw",
{
params ["_control"];
_control drawPolygon [test_polygon, [0,0,1,1]];
}];
It worked
oh, i see.
you could have from 78 to 0 step -1 do for the second loop, and get rid of the (78-_i)
Yeah, I should do that.
or this and avoid the second loop entirely
private _copyArray = +test_polygon;
reverse _copyArray;
test_polygon append _copyArray;
Yup, that works great. Thank you very much for working that through with me.
Is there a way to check if a unit has canDeactivateMines = true; in there config as a condition for a addaction?
I don't know about that but getunittrait seems like it could fill a similar function?
https://community.bistudio.com/wiki/getUnitTrait
Ah perfect thank you!
hey @high marsh just wanted to ping you to say I gave your idea a try in my mission and it seems to work! thanks a bunch
No worries.
one thing I'm having trouble with is the AI seems to detect people way too well at night and I'm not sure how to change this
do you have any examples? And if you're running a dedicated server what difficulty are you running. If you're running the host off your client which difficulty are you running.
I've tried 2 approaches to animation looping a moving target traveling along a wire. I want the target to travel from one end of the wire to the other, then return back. And doing this continuously until told to stop with a useraction.
1st approach was using a while loop with 1 sqf. But I couldnt make that work.
2nd approach is using 2 different sqf. TargetStart.sqf and TargetStop.sqf called by using 2 user actions. One for start, one for stop. But couldnt make this work either, and I've found very little info on animation looping on the internet except doing so with unit static animations, which isnt the same.
I need a little help in thinking something out...
I want a simple way for players to enable/disable an set ('layer') of mapmarkers.
I know how to hide/show them. Thats easy through setMarkerAlpha.
But anyone has a good simple idea for player to do this.
All I can think of is changing a radio trigger. Any other thoughts?
addAction/holdAction?
thats actually not bad. Can that be accessed through the map? Im not sure
ooh ACE interaction!
Hm yeah that could be good
I create a script where players can spawn a camp to sleep, chill etc... But i want to add when a camp is spawned it also creates respawn point and when camp is packed up it deletes respawn point. I was thinking with BIS_fnc_addRespawnPosition to create respawn point and Position to get position of the camp and to place a respawn point there
I was thinking of getting position for respawn point from current player position with getPos player
I would be curious to give this a shot if you get it working. I've been wanting something similar for a mission I'm working on
But will that keep the respawn persistent on location or will it be always on player?
i have an issue with creating a module for achilles
[] spawn {
if(isClass (configFile >> "CfgPatches" >> "ace_main"))then{
["[SRBMOD]", "Unit suicide", {
params [["_position", [0,0,0], [[]], 3], ["_object", objNull, [objNull]]];
_curator = getAssignedCuratorLogic player;
if( !(_object isKindOf "Man"))exitWith{
[_curator,"No valid unit"] call BIS_fnc_showCuratorFeedbackMessage;
};
[_object, true] call murshun_suicide_fnc;
}] call Ares_fnc_RegisterCustomModule;
};
};```
this is the script
I'm wondering if maybe someone can give me some insight: I had created a couple small scripts to remote control units with during a mission. I wanted to have like a medic and engi I can switch to when needed, and what I came up with kinda works, but there are issues. I input an addAction command into my player init in 3den, which gives me the action, but only until I die, which is no good. I want it to persist with the player even after death and respawn. It also shows the action on the screen all the time until I open scroll wheel menu and close it again; this isn't a huge issue but the disappearing on respawn makes it kinda useless overall. Any ideas?
This is the addAction: this addAction ["Control Medic", {[med1] call zen_remote_control_fnc_start;}];
And this is to switch back to the player: this addAction ["Back to Player", {objNull remoteControl player; player switchCamera "INTERNAL"; sleep 0.1; findDisplay 312; closeDisplay 2;}];
I'm creating a task from scripting, using BIS_fnc_taskCreate, description takes an array with description, title and marker. what is this marker? the position where the task is shown on map? and in that case what is the optiona destination parameter next to the description array?
@next eagle you might add an handler for when you respawn to re-execute the add-action command
Thanks for the suggestion. I'll see if I can figure out how to do that and see if it works
otherwise
add that code on onPlayerRespawn.sqf
that script get's executed when someone respawns
maybe check for the guy respawning being effectively you and you would be set
Ok, I'll see what works. cheers
good luck
I'm not sure what the marker does
I don't think it does anything
destination is the actual place where the task icon will point at
if you want to use a marker for the task, you can put <marker name='markerName>Text</marker> in the description (it will highlight in yellow, and you can click on it when the map is open)
okay, I'll experiment with it
one last thing, best way to check from scripts if a bool variable has been changed without hogging the VM using an endless while loop?
@past mist
best way is to do what you want wherever you change the bool
in other words:
Setting var in one script:
VarIsTrue = true;
```and checking when it becomes true in another spawned/execVMed code using a loop:
```sqf
waitUntil {
VarIsTrue
};
//do something
```Is bad.
But this is good:
```sqf
VarIsTrue = true;
//do something
to cover both cases of true and false, you can make a function
My_fnc_setBool = //use a better tag, not just "My"
{
params ["_isTrue"];
someVar = _isTrue;
if (_isTrue) then {
//do this when enabled
} else {
//do this when disabeld
};
};
//
[true] call My_fnc_setBool; //change the var to true
any one free to give a hand?
I have a task that has to complete when players finish an holdaction on an NPC (taslking to an informer), when that completes i should make the next task available, my tasks are all inside an SQF file to manage the tasking itself.
how do i set up sectors to have team base spawn pos? that can change based of what side controlls it
then, I should not use an external SQf at all
what do you mean external SQF?
i have a tasking.sqf file where I wrote all the code for the tasks
that file gets execVMed at the start of the mission
and adds the first task
I think you didn't understand what I said
let me explain for your case
let's say task1 completes, and you want to add task2:
this is the completion code for task1:
//complete task 1
["task1", "SUCCEEDED"] call BIS_fnc_setTaskState;
//add task 2:
["task2", .....] call BIS_fnc_taskCreate;
as you can see, all of it is taking place in one script
and it can be an "external" sqf
if you want
got it
in my case I should add it when the holdaction callback for being completed get's called
k, thanks
np
are you sure your question isn't related to #arma3_editor?
it seems to me it is
ok wait
i was referred to here
so im setting up a team deathmatch, with sector control, how can i set up spawn points to become active/inactive off who controls the said sectors
how did you set up the spawn points?
sector module with linked blufor independent AREA logic entities
well that's the sector modules
are you talking about AI spawn points? or player respawns?
sector
sectormoduleF
and player respawns
ok but you can't just respawn on the sector
are you using markers for the respawn?
modulerespawnpositionF
Is there any compilation of the functions that you can apply to a unit? (setPos, getPos, getDir, getUnitLoadout, etc..)
is there a way to script is so it enables blufor spawn if blufor owns it, but if opfor caps the sector it disables the blufor spawn and enables a opfor spawn
I might have answered my own question: https://community.bistudio.com/wiki/Category:Command_Group:_Object_Manipulation
are they both the same?
the spawn positions?
and what where do i put that
if you disable a respawn module's simulation you can't spawn there anymore
so put that into the spawn module?
no
you have to use it when it changes side
but I'm not sure if there's an scripted EH for that
let me check
ok good news
there is
?
@scarlet flume
put this in the sector's init field:
if (!isServer) exitWith {};
[this, "ownerChanged", {
params ["_sector", "_owner", "_ownerOld"];
respawn_west enableSimulationGlobal (_owner isEqualTo west);
respawn_east enableSimulationGlobal (_owner isEqualTo east);
}] call BIS_fnc_addScriptedEventHandler;
so how do i set up the REspawns that are to be attached to the sector
so thats respawn-east/west
yes
so i only need to add/change a number on the end of both the respawn_east/west and in the init?
to add this to more sectors
the names correspond to whichever respawns you want to be affected by the sector
ok thank you my good sir and i shall go have a play with this
real quick
so i dont need to change ANY think in the respawn module, like set sides?
well they have to belong to some side
but that's all you have to do
ok well i jsut had a test run and it enabled from the start? give me a few to play about with it
you can disable the simulation for the respawn points if none of the sectors are captured at the start
how and where?
or disable the simluation for the respawn points that belong to a sector not captured yet
very sorry how would i do that?
I already told you how
so you just put this in the init of respawn modules:
if (!isServer) exitWith {};
this enableSimulationGlobal false;
thenks
very sorry leopard every time i run a test it still dont work
it works for me
so i have this in the sector init
if (!isServer) exitWith {};
[this, "ownerChanged", {
params ["_sector", "_owner", "_ownerOld"];
respawn_west1 enableSimulationGlobal (_owner isEqualTo west);
respawn_guerrila1 enableSimulationGlobal (_owner isEqualTo independent);
}] call BIS_fnc_addScriptedEventHandler;
and i have your after mentioned code in the respawn modules
so what doesn't work?
its not enabling the spawns when a side caps the sector
these names are correct right?
respawn_west1 respawn_guerrila1
yea, for bluefour and inderpendent
?
i did say that it was for west/east, but i was thinking that is was easier just to sayt east to west and change it to blufour AFF after all was said and done, but im apparently not that good
do you get any errors?
that doesn't matter
it should've worked
never mind i have found what was problem
thank you for your help and time
10/10 rating
I think the problem was
#arma3_scripting message
if you disable the module at the beginning it won't work anymore
Is there a way to set capture rules for a sector based of which sides are friendly with each other?
how would i assign RopeAttach to every helicopter in the game, for example is there an event for when an entity is created
does anyone know if the cba class eventhandler is fired on the server if a zeus-player owned unit is placed?
cba class eventhandler "init"
the easiest is to set an init EH with configs
class DefaultEventHandlers;
class CfgVehicles {
class Air;
class Helicopter: Air {
class EventHandlers: DefaultEventHandlers {
init = "_this#0 enableRopeAttach true"
};
};
};
or use CBA XEH, which is a lot better (both scripted and configured)
it says that doesn't count for spawned vehicles in editor tho?
actually i think that was another thing nvm
CBA XEH has an option to run for already initialized objects too (editor placed i assume)
yeah nvm cheers
i just dont know if it has the EH has to be local to the machine taht spawns the unit
I'm using this function in unit unit field but it only works in SP, not MP. Any idea why? this addAction ["<t color=""#F8FF24"">" +format["Set Up Camp"], {_this execVM "addons\Camp_Script\spawn.sqf";}];
here is the script where this takes you
the original command was player addAction ["<t color=""#F8FF24"">" +format["Set Up Camp"],"addons\Camp_Script\spawn.sqf"]; but this does not work in MP at all for some reason.
The problem is that there is no action created, therefor you cannot spawn camp
@tidal swallow Just place the original line (player addAction [...];) in onPlayerRespawn.sqf or initPlayerLocal.sqf.
Does getUnitLoadout not return the current inventory of a unit?
mayhaps ๐ฎ
https://community.bistudio.com/wiki/getUnitLoadout
Yes, but specifically "Returns a Unit Loadout Array with all assigned items, " is a bit unclear
Or do I have to execute it on the machine that the unit is local on?
containers and their stored items
Yes, but currently Im trying to save a players inventory on disconnect. But the output includes items that I've removed from the inventory of the character
that's another issue then
how do you remove such items?
Manually, using the ingame inventory
Drop them on the ground -> disconnect. getUnitLoadout in disconnect handler includes dropped item.
there may be a sync delay yeah
Any idea if it's possible to force a sync somehow?
Would be "simple" if the player was still connected
But since I'm running it in the disconnect handler I'm a bit restricted
disconnections are always hard to track, it can be a network error, a slow connection etc
you can e.g give the player an action to disconnect, which would send his current gear to the server
Might go that route, thanks ๐
Guys and Gurus, quick question...
Is there any way to add a timer to a task created via https://community.bistudio.com/wiki/BIS_fnc_taskCreate
And that: The player can see the remaining time in seconds to complete said task and that the task is automatically failed when the timer has expired...
- taskCreate (remember taskID)
- set and show countdown timer
- if complete:
- taskSetState: "SUCCEEDED"
- remove timer
- if timer at 0:
- taskSetState: "FAILED"
[] spawn { while (_taskNotFailed) { timer = timer -1; if (timer <= 0) then { _taskFailed }; sleep 1}; }
BIS_fnc_countdown will end the mission when the timer runs out... not a good idea for single tasks...
that's not sqf
No, it's pseudo sqf
Perhaps you can end the countdown when it is at 1 with "[-1] call BIS_fnc_countdown; // Sets bis_fnc_countdown_time to nil"
but than you need to have a second loop (one in countdown and one of your own) to check the current time...
waitUntil {sleep 0.1; _timeLeft = [0] call BIS_fnc_countdown; _timeleft < 2};
so easier to just make your own, and have a single loop ๐คทโโ๏ธ
Yeah, it would be optimal if the time left shows on the Task Description on the Map and not as a hint or something
Too bad a Time Left param isn't featured on BIS_fnc_taskCreate by default
Although simply storing the TaskID, (end) time and callback in missionNamespace, and checking every second if the current time is past the one stored, if done; run callback
prolly takes 20-30 lines of code ๐ค
i know how to program, but just started with Arma 3's code today, so sorry if this seems obvious. I have a group set up with soldiers in it, but when using variableName disableAI "MOVE"; it says error generic error in expression or something like that. what am i doing wrong?
Where do you use that line of code?
In the init of a unit, in the init of a group, or in a separate script (like init.sqf)?
I put it in the completion of a waypoint i believe
and i've successfully printed hints from it so i know it triggers
disableAI "ANIM";?
How would I disable the NV sights on a backpack drone after it's assembled?
WeaponAssembled eventHandler on the unit will let you access the newly created drone.
this addEventHandler ["WeaponAssembled", {
params ["_unit", "_staticWeapon"];
weapon disableNVGEquipment true;
}];
Just like that?
You need to make sure this is the unit, so if this is in its init then it's ok.
Then you need to make sure _staticWeapon and weapon are the same thing, since you need them to be the same thing.
So would I need to change _staticweapon to the classname of what's being assembled?
params ["_unit", "_staticWeapon"]; is telling you that inside the braces, _unit is the unit and _staticWeapon is the new weapon. So use those private variables.
i have a group whos variable name is o1squad. Running o1squad disableAI "MOVE"; returns generic error in expression. what should i do?
Yeah, that worked now with the vanilla AR-2 shame it's not working with the RHS RQ-11 Raven.
Hello, I have a small question, how can I make an npc pass to be alloyed to an enemy when touching a trigger?
o1squad references a group not a unit you need.
{
_x disableAI "MOVE";
} foreach units o1squad;
so same thing if im running this in a waypoint init?
Yeah, should be.
Just make sure you've coppied the version above. Made a slight change
got it, let me check
it has the same error for trying to change task status, so i'm guessing there's a similar fix. would you be fine with showing me that too? task is called o1task.
also should i declare variables as _name or name?
_name = <something>;, name is occupied
@tight jungle https://community.bistudio.com/wiki/Variables
Anything you might need to know about variables in sqf is there
appreciate it
I'm trying to test the player's ATL position for a Trigger condition. What's wrong with this formatting? getPosATL player > 0
getPosATL returns an array, so you can't compare it directly (imagine [0,0,0] > 0) the ATL position of it is stored in select 2 or #2
So how would I need to type it, then, to find the player's Z coordinates ATL?
getPos player#2```
would this be a proper way to check a private variable for a nil value?
private _check = isNil{_returnPos isEqualTo nil}
if(_check) ...
@fiery orbit```sqf
isNil "_returnPos"
thank you
Is there a way to check or avoid AI unit spawned under rock?
@winter rose We need a wiki page for that query
Im trying to find resources related to packing my scripts into a mod (instead of having them all shipped with the mission), is there any good guides related to this?
which one? isNil?
AI in rocks
utilizing BIS_fnc_findSafePos I bet you could avoid spawning them there in the first place
@fiery orbit because of the lineIntersectsSurfaces in BIS_fnc_findSafePos ?
actually based off what I found in the documentation, I would do a maximum gradient to eliminate large rocks (most are utilized for cliffs and mountains) and then use a nearest object to deal with small rocks
so set an objDist and maxGrad
and experiment until you find something you like
I just thought BIS_fnc_findSafePos is not enough to avoid under rock, but I'll give it a try. thanks.
tried setting an AIs name by remotely executing setName. no effect on server. any advice?
Sets the name of a location or a person. In Arma 3 this can be used to set name of a person but only in single player.
yeah but there is a way to do it in MP
ive done it before, i just cant remeber how
maybe its ace_common_fnc_setName; ? can t find the docu for that function
https://github.com/acemod/ACE3/blob/master/addons/common/functions/fnc_setName.sqf is the best I can do
ah i think thats it!
how did you find it?
ace_common_fnc_setName
ace = mod
common = addon
fnc = function ๐
setName = name of file
alright cool
standard CBA/ACE mod structure
Can someone explain me how the tasking system works on dedicated server? My mission has tasks working in both single player and self-hosted multiplayer, however when run in a dedicated server no tasks are assigned. I'm assigning all tasks by calling BIS_fnc_taskCreate. Is it because I'm using execVM? should I call a remote exec? Or what else?
taskCreate is a global function. no need for remoteexec
show the rest of your code?
so, on init.sqf along with the respawn points being set, I get the first call to my "tasking.sqf" script, that takes a number as parameter to know what task complete/add.
[0] execVM "tasking.sqf";
on tasking.sqf (i'm going to skip all the task variable setup for simplicity sake) this code get's executed:
private _taskN = param[0, 0];
switch (_taskN) do{
case 0: {
_task1 call BIS_fnc_taskCreate;
};
case 1: {
["task1", "SUCCEEDED"] call BIS_fnc_taskSetState;
_task2 call BIS_fnc_taskCreate;
prisonerMrk call BIS_fnc_showMarker;
};
case 2: {
["task2", "SUCCEEDED"] call BIS_fnc_taskSetState;
_task3 call BIS_fnc_taskCreate;
_task4 call BIS_fnc_taskCreate;
"EnemyBase" call BIS_fnc_showMarker;
};
case 3: {
["task3", "SUCCEEDED"] call BIS_fnc_taskSetState;
};
case 4: {
["task4", "SUCCEEDED"] call BIS_fnc_taskSetState;
};
case 100: {
["task2", "FAILED"] call BIS_fnc_taskSetState;
["task4", "FAILED"] call BIS_fnc_taskSetState;
_task100 call BIS_fnc_taskCreate;
};
case 200: {
_task200 call BIS_fnc_taskCreate;
};
case 201: {
["task200", "SUCCEEDED"] call BIS_fnc_taskSetState;
};
case 202: {
["task200", "FAILED"] call BIS_fnc_taskSetState;
};
case 300: {
["task300", "SUCCEEDED"] call BIS_fnc_taskSetState;
["SUCCESS"] execVM "ending.sqf";
};
};
_task1 call BIS_fnc_taskCreate;
is that even a valid syntax? afaik it doesn't accept numbers
and _task1 is an array of format: [owner, taskID, description, destination, state, priority, showNotification, type, visibleIn3D] ?
this does work in single player, also I tried it in the editor by hosting it as multiplayer and it was still working.
Yesterday on the dedicated server with my group all the tasking was not present.
of course
task1:
private _task1Title = "Parla con l'informatore";
private _task1Description = "Thamos Roumpesi ha delle informazioni riguardo alla milizia che sta agendo sul territorio di Malden. ร disposto a collaborare con noi, potete trovarlo nel villaggio di Lolisse. Il villaggio รจ neutrale, tenete le armi basse e non causate panico tra la popolazione. I civili non ci vedono molto amichevoli, cercate di non complicare la convivenza.";
private _task1 = [west, "task1", [_task1Description, _task1Title, "Informatore"], Informer, true, 1000, true, "talk"];
I avoided pasting all the lines just to not bring a giant wall of text
oh, does discord support sqf syntax?
yes
nice to know
have you tried debugging if task1 is successfully created?
yeah. also the init.sqf gets run on every machine, so you will create the task again for every joined player
should I move it on initServer.sqf?
at least thats what the framework recommends
however, even if it would create the task for every player, I still don't understand why no task appeared yesterday
how I can check for a task existence from the debug console?
see (and bookmark) https://community.bistudio.com/wiki/Arma_3:_Task_Framework_Tutorial ๐
I actually followed that page
uh, noice
time to spin up server and client and test
okay, task does not exist
Then, I can confirm that for some reasons, even calling the script file myself from inside the server tasks aren't created
I can't even create a task by calling #exec from the chat (I'm logged in as admin)
got any CfgRemoteExec which blocks executing BIS_fnc_setTaskLocal in any way?
I don't think so
any way to check?
I think if they are present, they would be on description.ext, but there I only have my 2 possible endings in CfgDebriefing
could be in mission (Description.ext) or a mod (although I doubt any mod would do that)
with the same modlist we played a lot of times DRO missions, that generate tasks at runtime, so I doubt.
in that case it could be in description.ext, but that should be "obvious" (although can cause a lot of headaches)
okay. I might have discovered the culprit of this is issue
YOU
High command
literally, removing high command subordinates from the company commander made all the tasks started working again.
!purgeban @runic obsidian 60d spam
*fires them railguns at @runic obsidian* ร_ร
pew pew
never forget the donnager!
So, anyway, is there a reason for tasks not working when groups are under high command? Wiki doesn't say anything about that. Is it intended behaviour or is it a bug?
How can I check what a class name (e.g. "launch_NLAW_F") is referring to? In this case a weapon
Solved it with isNull (configFile >> "cfgWeapons">> _className) for now
quick question: what does the "0 max" and "min 1" mean here?:
_pain = 0 max (_pain + _addedPain) min 1;
it clamps the value between 0 and 1 ๐
0 max 50 = 50
0 max -10 = 0
1 min 50 = 1
1 min -10 = -10
@pale ridge
it's "weird" to read but technically not wrong, as min means "pick the smallest value of the two" and max the biggest
while we would naturally translate 0 < value < 1 to 0 min value max 1, it is the opposite for semantic reasons ^^
the minimum of { } = "min"
So this didn't at all do what I wanted it to... Any suggestions?
you're on the right track
just add more
this is actually the fastest way to check
example:
[
configFile >> "CfgVehicles",
configFile >> "CfgWeapons",
configFile >> "CfgMagazines",
configFile >> "CfgAmmo"
] findIf {isClass (_x >> _className)} != -1
this will cover objs, weapons, mags, items, uniforms, etc.
isClass (configFile >> "CfgWeapons" >> "U_OG_Guerilla1_1") shouldn't return true though, right?
(U_OG_Guerilla1_1 being a uniform, rather than a weapon)
Aha!
(almost anything that you can "equip" in inventory is defined in cfgWeapons)
Ah, kinda weird choice... But then I have to check the subclasses of cfgWeapons for my entry, right?
I wanted to get the type of the object that I had a class name of
aka, is it a weapon, items, etc
if it's defined in weapon you also have to check its type
for example, for uniforms: type = 131072;
Aight, how do you get the type ?
configProperties?
I AM GOD
getNumber ((configFile >> "CfgWeapons" >> "U_OG_Guerilla1_1" >> "type"))
hello I have a question is there any way in which an npc is eliminated by touching a yrigg?
Trigger *
npc -> !isPlayer _unit
kill -> _unit setDamage 1
Any chance I can get some guidance?
Im trying to make custom vests but for some reason they are constantly spawning in the ground instead of on the character... can someone take a look over my congif and tell me where i messed up?
@tepid osprey see #arma3_config ๐
thank you
this addAction ["Deploy To HALO Airframe", {player setPosASL (getPosASL SLTele)}];
Could somebody advise me where in that code to add a CutText or PLAIN DOWN etc.? Just a flag teleporter but would like to add a 10 second black fade
I would do something like this:
this addAction ["Deploy To HALO Airframe", {
params ["_target", "_caller", "_actionId", "_arguments"];
private _loadingLayer = "TeleportLoading" cutText ["Teleporting now!", "BLACK", -1, false, true];
_caller enableSimulationGlobal false;
[_caller] spawn {
params ["_caller"];
_caller setPosASL (getPosASL SLTele);
sleep 5; // <-- time in seconds between TP and removing black screen
_caller enableSimulationGlobal true;
"TeleportLoading" cutFadeOut 1;
};
}];
not tested
[_hostage,true] call ACE_captive_fnc_setHandcuffed;
is this the proper prefix for ACE captive?
according to the in-line documentation; yes
@exotic flax thank you! Ill give that a go ๐
Is there a way to teleport a player in multiplayer into a position & an animation? (Subsquently they would be set free with another trigger)
So far ive got (I know this is probably awful to look at but at least I tried ๐ )
this addAction ["Teleport", {player setPosASL (getPosASL object)}; {(player, "Acts_SittingJumpingSaluting_loop") remoteExec {"switchMove", 0)}];
In this instance, teleported to a position and also into a sitting animation
well, that how it's done? ^^
{_this call MY_fnc_unitSpawn;} // _this == _spawnedObject where should this be placed. I'm using AI caching and I'm intending to use GF script for zombies
@tidal swallow Check the documentation of the framework you ripped that from ๐คทโโ๏ธ
ooo, Leo.. advanced developer tools?
lets see what this is then
๐
I was planning on some mission dev today, but this looks like it can usefully kill some time
Hello everybody
i'm new to arma 3 and i'm looking for one who helps me with the animations so that they belong in the mp i have already watched several tutorials and it explains to me how I have to proceed exactly, any can helph ?. or what was a good tutorial for me where I have to see myself go by for the removal
=? sory this is all google translate my englisch is bad im from swiss and im only speaking german or somthing like german xD
greetings Lรผc #
I am trying to use EH AnimChanged or AnimStateChanged. Looking to way to execute script only when unit is unconscious. Which of these should I use ? And it is better (performance wise) than doing while loop to check for condition ?
AnimStateChanged
animChanged triggers when the unit "wants" to perform an animation (for example, if you're prone and want to start running, animChanged returns the "running" animation)
And it is better (performance wise) than doing while loop to check for condition ?
if what you do in the EH is fast and you only do it for a few units, yes. You can measure your code performance and see the performance impact.
If the while loop only runs for a short time (with appropriate sleep), it may also be used. but if it's an infinite loop, it's better not to use it
@little raptor
to add to the context (used only local for player)
pseudo code
player addEH ["xxx", { if _anim = "unconscious" then _unit spawn { sleep 5; code } }]
vs
while { alive player } do { if user unconscious then do code; sleep 5; }
Both good performance-wise, but they don't do the same:
The while-loop version will execute your code at most every 5 seconds.
The Event Handler version can execute your code more frequently because it spawns the code again every time the EH fires and the condition is met.
every time the EH fires
@willow hound how often will it fire when you are in unconcious (animation locked) state?
That depends on the context. (In MP) someone could pick the player's body up and carry it around for example.
what for i script i need to make a animation on f2 in mp
if you want to create an animation, go to #arma3_animation
if you want to use an existing animation:```sqf
myUnit playMove "animationName";
yea but then any script exist how does that i can use pieing animation on f5 in mp
?
playMove is the scripting command
https://community.bistudio.com/wiki/Arma_3:_Moves is the list of animations
i want to have more animations in multiplayer and i have to do that via the editor i know that
and I have to make the animation on a button so that I can use it in multiplayer, I have to have a script that I insert somewhere but I don't know where or what the script is
see https://community.bistudio.com/wiki/playMove
https://community.bistudio.com/wiki/switchMove
https://community.bistudio.com/wiki/Arma_3:_Moves
go to #arma3_animation to learn how to create animations.
how exactly can I write the animation on a button that is somewhere
you need to know GUI (buttons) and scripting:
learn GUI:
-ย https://community.bistudio.com/wiki/Arma:_GUI_Configuration
-ย https://community.bistudio.com/wiki/Category:Command_Group:_GUI_Control
learn scripting:
-ย https://community.bistudio.com/wiki/Introduction_to_Arma_Scripting
thx a lot
is BIS_fnc_showMarker synced along clients in multiplayer? Or should it be remoteExec'd?
Have a look at the source code, if it uses (a) global marker command(s), it's global.
it is global, but also not ideal (too much
network sync)
whats the optimal way to make markers show up at runtime then?
BIS_fnc_showMarker makes the marker show up fading; otherwise you can simply use setMarkerAlpha for an on/off option
I'll go with setMarkerAlpha then. Thanks!
anyone able to give me a hand with some waypoint issues? i want to have a designated driver that picks me up from the side of the road, takes me to a point and drops me off and drives off. then i kill the specific target and he comes back and picks me up and drives me away.
i had it working initially, he would take me to the drop-off point then leave. but as soon as i started adding triggers for the target everything broke and now he wont even drive when i get in when he picks me up the 1st time
@copper cipher in ur case id just spawn a new vehicle for the exfil instead of using the same one
ill give it a go
can you use addAction on an ai unit and then use that action when you take control of him as zeus?
good question ๐ค
If he's willing to have a mod there's an easier solution
guess it's testing time
which mod?
Simplex support services
already got that 
Use it
The answer should be yes; since addAction is attached to an object (or ai or player) and can be activated by any player (when within parameters).
But I've never tested it, or thought about it ๐ค
But ai don't count as players I believe, especially zeus controlled
I guess the biggest question would be; who is returned as _caller? The AI, the player or the Zeus instance?
now that's interesting, lucky for me my attached script doesn't need to know who the caller is
As a zeus tonight I'll have to role out a couple of NPCs to give players optional side tasks and rewards. If they will attack me I prepared an action to turn all of the bodyguards as enemies. Tested with play as character and it works. Time to test this out in Zeus
i wiped every waypoint and started from scratch and now it wont even do the pickup and drive 
if(!isMultiplayer){
[east, "zaboye", "Zaboye"] call BIS_fnc_addRespawnPosition;
["start"] execVM "tasking.sqf";
};
Log says line 1 is missing a semicolon. WTF?
arma ai/scripting is so much more painful then it needs to be 
if (!isMultiplayer) then {
I know the problem ๐คฃ
I also tend to forget once in a while to put a ; behind everything
while () too
answer: it does work. Haven't tested what _caller returns.
I did: _caller is the remote controlled AI itself (since that is the one who called the action)
is there any way to make map markers appear only once a certain task has been done?
i want the "extract" marker to appear only when the target is dead
you can either create the marker with scripts on success (createMarker),
or set the marker opacity to 0 (invisible) and only show when the task is successful
how do i do the 2nd option
setMarkerAlpha
the markers var name is marker_4
where do i put the script?
targets name is target1
Let's say I have a couple of inline functions in a sqf file. From my understanding I can't call them until I preprocess and compile the file?
When using in-line functions you don't have to do any weird stuff
private _fnc_someFunction = {
// code
};
[] call _fnc_someFunction;
what if I need to call a function from the Init field of an unit placed in the editor?
in that case you shouldn't use in-line functions, but https://community.bistudio.com/wiki/Arma_3:_Functions_Library
calling an inline function that is on another file is possible or I also need to use a function library for that too?
k, thanks
and safer
So, if I have multiple functions in one file how should I configure classes inside CfgFunctions?
matching name of the class with name of the function and givin it a path to the file?
you can't; check that wiki page on how to do it
each function will need its own file
Can anyone confirm this will only fire the "fob\time.sqf" just once and get past JIP players i am getting issues with (called from the init.sqf") :
if (isNil "move_players") then {
move_players = false;
publicVariable "move_players";
waitUntil {time > 1};
execvm "fob\time.sqf";
};
enableSaving [FALSE,FALSE];
if (isServer) then {
move_players = true;
publicVariable "move_players";
};
from the wiki tho:
File Path
The easiest and the most transparent way is to set path for each function.
class CfgFunctions
{
class myTag
{
class myCategory
{
class myFunction {file = "myFile.sqf";};
};
};
};```
This will try to compile function `myTag_fnc_myFunction` from the following file: `%ROOT%\myFile.sqf`
yes, so each file will be its own function
must love Arma errors:
Error Type Number,Not a Number, expected Number
It's not a number but it's a number I want
it's more: "You give me a Number, which is not a Number, I want a Number"
the error type number is the confusing part
it really should be a "error type mismatch"
and the last 2 should be flipped
does anyone know how to make script-created markers Zeus-editable ?
is it possible to reload the description.ext on runtime? Or do I really need to reload the mission every time?
reload the mission yep
hmmm does this apply to CfgFunctions I have defined there as well, or can I "recompile/reload" them on runtime?
I think it does yes
you can recompile them on runtime
if you enable recompiling
and find the correct function that does it, probably BIS_fnc_recompile
you can recompile functions โ but not refresh CfgFunctions (afaik)
I'm very new to scripting, how would I write an expression for a trigger, so that when an entity i've named brit is dead, the trigger activates?
i've managed to get to using the alive command and now I have no idea what to do lmfao
condition = not alive brit
thanks! being an idiot, i tried alive brit = false and gave up after realizing i didn't know how to do shit
Is there a way to check if an object is a terrain object?
I'm done with this piece of s....cript ๐
private ["_winnerTeam","_loserTeam"];
_winnerTeam = _this select 0;
_loserTeam = "";
["INFORMATION", Format ["LogGameEnd.sqf: Team [%1] has won the match!", _winnerTeam]] Call WFBE_CO_FNC_LogContent;
if (_winnerTeam == west) then {
_loserTeam = east;
} else {
_loserTeam = west;
};
if (isNil (profileNamespace getVariable format ["%1_WIN_CHERNARUS",_winnerTeam])) then {
profileNamespace setVariable [format ["%1_WIN_CHERNARUS",_winnerTeam], 1];
if (isNil (profileNamespace getVariable format ["%1_WIN_CHERNARUS", _loserTeam])) then {
profileNamespace setVariable [format ["%1_WIN_CHERNARUS",_loserTeam], 0];
};
saveProfileNamespace;
} else {
profileNamespace setVariable [(profileNamespace getVariable format ["%1_WIN_CHERNARUS",_winnerTeam]), (profileNamespace getVariable format ["%1_WIN_CHERNARUS",_winnerTeam] + 1)];
if (isNil (profileNamespace getVariable format ["%1_WIN_CHERNARUS", _loserTeam])) then {
profileNamespace setVariable [format ["%1_WIN_CHERNARUS",_loserTeam], 0];
};
saveProfileNamespace;
};
_westWins = profileNamespace getVariable WEST_WIN_CHERNARUS;
_eastWins = profileNamespace getVariable EAST_WIN_CHERNARUS;
["INFORMATION", Format ["LogGameEnd.sqf: Team BLUFOR has %1 wins and team OPFOR has %2 wins on Chernarus since start of logging.", _westWins, _eastWins]] Call WFBE_CO_FNC_LogContent;
Can anyone spot any mistakes here?
yes, you are not using private _var = value ๐
its not very pretty ๐
I, huhโฆ what?
I know, it's Arma 2 stuff and hacked together quickly ๐
@tender fossil would you happen to be coding while tired?? ๐ ๐จ
if you must use private in arma 2 use local _var instead
@winter rose I confess nothing!
what is this?
WEST_WIN_CHERNARUS
The script's not working and I have no idea why lol
im not really sure its worth spamming isnil if the vars dont exists instead of doing it once anyway at the beginning
@proper sail The variables must persist between matches and server restarts
So can't just place a default value
Well, now I get this output: LogGameEnd.sqf: Team BLUFOR has <null> wins and team OPFOR has <null> wins on Chernarus since start of logging.
go to sleep
Oh boy
isNil works only for missionNamespace variables
How do I check whether profileNamespace variable exists or not?
== null?
Is it possible to change the Role Description of a player while a mission is live?
nope
get it
check if nil
Ok, maybe I should really go to sleep... rofl
Trying to figure out ways to communicate live information to players at the role selection menu
Like what roles are available or not
I usually have no roles in the lobby (using CBA to set custom naming).
And only use respawn templates (or our custom ORBAT system) to have people select a role
systemChat?
@winter rose But how do you trigger the execution of the script before the mission has been loaded?
init.sqf triggers for everyone on mission load, before the mission is started
(I think)
But isn't it too late for selecting a role then?
try it for yourself, place systemChat "Hello!"; in an MP init.sqf - I think it should work (I am not sure for non-JIP players, but maybe)
idk where to put this script ```sqf
player addEventHandler ["Take", {
params ["_unit", "_container", "_item"];
if (
_container isEqualTo backpackContainer _unit &&
toLower backpack _unit in ["tfw_ilbe_a_gr","tfw_ilbe_dd_gr"] &&
_item == "ACRE_PRC117F"
) then {
_unit addBackpackCargoGlobal ["ACRE_PRC117F",1];
};
}];```
initPlayerLocal.sqf? ๐คทโโ๏ธ
o h
i put it in serverinit
oops
i..
rip the script doesnt workk
i get no erroes
but it doesnt want to give me the radio
does it at least trigger?
nope, it doesnt activate nothing happens @winter rose i just get a return value of 1
you did not wait until not isNull playerโฆ?
what
in initPlayerLocal.sqf
waitUntil { sleep 0.25; not isNull player };
// do stuff with player
Btw... Why try to break my mod? ๐คฃ๐คฃ๐คฃ
..did i need that
if you are JIP, yes
whats JIP
โฆjoin in progress
JoinInProgress
im a clown ok
That's news to me
@bold mica see https://community.bistudio.com/wiki/Multiplayer_Scripting#Join_In_Progress ๐
When using proper EH's you usually don't have to worry about it, bit it's good practice to also make sure the player object is loaded before doing something
PS: management, pushing to production
https://community.bistudio.com/wiki/Initialization_Order
https://community.bistudio.com/wiki/Event_Scripts#initPlayerLocal.sqf
player should work by the time initPlayerLocal.sqf comes up (and I have not experienced the opposite yet), but even if player does not work, _this # 0 is also available.
Time for a launch party ๐ฅณ
weeeeee ๐พ
ah yes the actual trick is to use jipwaitfor from bis 
scriptName "MP\data\scripts\JIPwaitFor.sqf";
if (!isServer) then
{
//textLogFormat ["INIT_INITJIP JIPwaitFor 0 %1", time,player];
waitUntil {!isNil {player}};
//textLogFormat ["INIT_INITJIP JIPwaitFor 1 %1", time,player];
waitUntil {!isNull player};
///textLogFormat ["INIT_INITJIP JIPwaitFor 2 %1", time,player];
if (player != player) then
{
waitUntil {!(player != player)};
};
//textLogFormat ["INIT_INITJIP JIPwaitFor.sqf (CLIENT) %1", [time,player]];
};
simply genius
UGH
it didnt work
try it from the debug console, it will save you time
got a return of 1
we don't care about the return, that's EH index
tried picking something up?
check your vars, the values, etc
systemChat str _this```
See, player is not the baddie ๐
THIS TIME!
initPlayerLocal.sqf would not make much sense if there was no local player 
didnt work either
player addEventHandler ["InventoryClosed", {
params ["_unit", "_container", "_item"];
if (
_container isEqualTo backpackContainer _unit &&
toLower backpack _unit in ["tfw_ilbe_a_gr","tfw_ilbe_dd_gr"] &&
_item == "ACRE_PRC117F"
) then {
_unit addBackpackCargoGlobal ["ACRE_PRC117F",1];
};
}];```
using mooods? ๐
they are modded items
ACE?
yes
๐จ
"InventoryClosed" passes different params
yee ik, i just wanted to test
i also tested "take"
theres a CBA version my frined gave me
["loadout",{
params ["_unit"];
if !(toLower backpack _unit in ["tfw_ilbe_a_gr","tfw_ilbe_dd_gr"]) exitWith {};
private _unitItems = [primaryWeapon _unit,secondaryWeapon _unit,handgunWeapon _unit,uniform _unit,vest _unit,backpack _unit,headgear _unit,goggles _unit];
_unitItems append assignedItems _unit;
_unitItems append itemsWithMagazines _unit;
private _item = "ACRE_PRC117F";
if (_unitItems findIf {_item == _x} == -1) then {
_unit addBackpackCargoGlobal [_item,1];
};
},true] call CBA_fnc_addPlayerEventHandler;```
How can your testing work if there is no _item param?
wait what
What exactly is the goal of the Event Handler? Unlimited 117s?
akljdghasg no, its "if you have a specific backpack you MUST have the 117, if you remove it, you get another one
so essentially yes
player addEventHandler ["Take", {
params ["_unit", "_container", "_item"];
if (
_container isEqualTo backpackContainer _unit &&
toLower backpack _unit in ["tfw_ilbe_a_gr","tfw_ilbe_dd_gr"] &&
_item == "ACRE_PRC117F"
) then {
_unit addBackpackCargoGlobal ["ACRE_PRC117F",1];
};
}];```
you scared me for a second, I thought my template broke something ๐
RV Template rules
let's hope so!
wait are you saying backpackcargoglobal is not supposed to work
Well the documentation says it's for adding backpacks to vehicle inventories... 
i am going to murder the dude that helped me make this script brb
what should i replace backpackcargo global with
wait
would it be
addItemToBackpack?
read and thou shalt see (and cry perhaps)
https://community.bistudio.com/wiki/addItemToBackpack
YEP IT WAS

player addEventHandler ["Take", {
params ["_unit", "_container", "_item"];
if (
_container isEqualTo backpackContainer _unit &&
toLower backpack _unit in ["tfw_ilbe_a_gr","tfw_ilbe_dd_gr"] &&
_item == "ACRE_PRC117F"
) then {
player addItemToBackpack _item;
};
}];```
so like this?
yay
(or "_item")
i alt tab back into arma and my base just got scud launcher'd
It surprises me that _item == "ACRE_PRC117F" works as ACRE should replace that base class with a unique class.
no, it's because you used "_item" instead of _item
i am a monkey
go to bed too, if you are too tired to read code ๐ nothing good can come out of it
its 5pm
lies!
wine oclock
wah it still no work
โฆtake a nap? ๐
player addEventHandler ["Take", {
params ["_unit", "_container", "_item"];
if (
_container isEqualTo backpackContainer _unit &&
toLower backpack _unit in ["tfw_ilbe_a_gr","tfw_ilbe_dd_gr"] &&
_item == "ACRE_PRC117F"
) then {
systemChat "Success!";
};
}];
```Can you run this and tell us if you see the "Success!" message?
nope
Would have been weird. We need to use https://acre2.idi-systems.com/wiki/frameworks/functions-list#acre_api_fnc_iskindof.
player addEventHandler ["Take", {
params ["_unit", "_container", "_item"];
systemChat str _this; // RUN THIS
if (
_container isEqualTo backpackContainer _unit &&
toLower backpack _unit in ["tfw_ilbe_a_gr","tfw_ilbe_dd_gr"] &&
_item == "ACRE_PRC117F"
) then {
systemChat "Success!";
};
}];
_item should be something like "ACRE_PRC117F_ID_123"
But different for each unit and each radio you add / pick up
i..
thats a pain..
so each ACRE radio has its own ID and everytime you pick up a new radio it assigns a new ID?
Yes. It needs to be that way because inventory stuff is not actually objects, so the only way to distinguish stuff in the inventory is by its class name.
you can check if a string starts with such class (and maybe use isKindOf)
Replace _item == "ACRE_PRC117F" with [_item, "ACRE_PRC117F"] call acre_api_fnc_isKindOf.
That's why I was wondering there
player addEventHandler ["Take", {
params ["_unit", "_container", "_item"];
if (
_container isEqualTo backpackContainer _unit &&
toLower backpack _unit in ["tfw_ilbe_a_gr","tfw_ilbe_dd_gr"] &&
[_item, "ACRE_PRC117F"] call acre_api_fnc_isKindOf
) then {
systemChat "Success!";
};
}];```
Almost
.
Try if you get "Success!" now
Post the code you ran please 
player addEventHandler ["Take", {
params ["_unit", "_container", "_item"];
if (
_container isEqualTo backpackContainer _unit &&
toLower backpack _unit in ["tfw_ilbe_a_gr","tfw_ilbe_dd_gr"] &&
[_item, "ACRE_PRC117F"] call acre_api_fnc_isKindOf
) then {
systemChat "Success!";
};
}];```
Did you check all three of the checks in that if statement separately, to see if they work?
player addEventHandler ["Take", {
params ["_unit", "_container", "_item"];
if (
_container isEqualTo backpackContainer _unit &&
toLower backpack _unit in ["tfw_ilbe_a_gr","tfw_ilbe_dd_gr"] &&
([_item, "ACRE_PRC117F"] call acre_api_fnc_isKindOf)
) then {
systemChat "Success!";
};
}];
```Worth a try I guess, I'm running out of ideas 
SYSTEMCHAT STR _THIS
sys chat responeded with []
if you did put it under params, no
// debug
player addEventHandler ["Take", {
params ["_unit", "_container", "_item"];
private _initialThis = +_this;
private _isUnitBackpack = _container isEqualTo backpackContainer _unit;
private _isWantedBackpack = toLowerANSI backpack _unit in ["tfw_ilbe_a_gr", "tfw_ilbe_dd_gr"];
private _isWantedItemType = [_item, "ACRE_PRC117F"] call acre_api_fnc_isKindOf;
systemChat str [_initialThis, _isUnitBackpack, _isWantedItemType];
}];
no response ins syschat
dummyweapon.p3d for everytime i reload
pickup the backpack i get false false
acre_117f_id3, false, true
player addEventHandler ["Take", {
params ["_unit", "_container", "_item"];
systemChat str _this;
systemChat str (_container isEqualTo backpackContainer _unit);
systemChat str (backpack _unit);
systemChat str ([_item, "ACRE_PRC117F"] call acre_api_fnc_isKindOf);
}];
```Restart the mission / preview and test with this, we're missing something here 
Okay that sounds good
player addEventHandler ["Take", {
params ["_unit", "_container", "_item"];
systemChat str (_container isEqualTo backpackContainer _unit);
systemChat str (toLowerANSI (backpack _unit) in ["tfw_ilbe_a_gr", "tfw_ilbe_dd_gr"]);
systemChat str ([_item, "ACRE_PRC117F"] call acre_api_fnc_isKindOf);
}];
```Should be three times "true" when you use one of the target backpacks and drop the 117 on the ground
when i drop it on the ground i get nothing
when i pick it up
i get something
false
(backpack classname)
true
false
true
true
Hmmmm then "Take" doesn't fire when taking items from backpack / inventory.
Progress
could the backpack config be broken?
i kinda... edited ILBE's backpack a little bit, ltierally just changed weight and mass, imma post it to the workshop as unlisted tho
Do you have permission for that?
No, with "Put", _container is the target container, and that's not your backpack
ya
weird
btw... you could look at https://steamcommunity.com/sharedfiles/filedetails/?id=1875281645 (TFAR version), which works (compared to the other versions)
Only need to change mass and rework the ACRE antenna's (is a pain to do, trying to do that for a year now)
yeah im just making this jerry rig for now
because ACRE has separate radios which are not tied to backpacks, so you need to handle ALL event handlers in case you want to add it.
And then simply use:
if (_item == backpack player && _item isKindOf "tfw_ilbe_Base") then {
Since the 117 doesn't fit into anything but backpacks, we can probably also do something like this:
player addEventHandler ["Put", {
params ["_unit", "_container", "_item"];
if (toLowerANSI (backpack player) in ["tfw_ilbe_a_gr", "tfw_ilbe_dd_gr"] && !([player, "ACRE_PRC117F"] call acre_api_fnc_hasKindOfRadio)) then {
systemChat "Player has no 117!";
};
}];
like I said; better work off a good base instead of something that is already not working ๐คทโโ๏ธ
false true true + message
its held to gether by duck tape and hope
waht if i just use the backpack base like grez suggested
Using the "Put" EH you can only detect the player dropping it from the inventory himself though, if somebody else takes it from his backpack I don't know, and if he has access to an Arsenal he can get rid of it there without firing the EH.
Take, ContainerClosed and arsenalClosed are the EH's you're looking for
And dropping anything else from the inventory triggers it too because that code doesn't care what the current _item is.
no, but if you take the backpack from a container it will trigger
Huh
https://community.bistudio.com/wiki/Arma_3:_Event_Handlers#Take
Triggers when a unit takes an item from a container.
the ground counts
and reloading also triggers it
i mean i could make a group rule for people who run this backpack... and ill just enforce it via zues..
That might be simpler
that means i can be a d*** and delete their medical supplies to fit it!
Could also run a loop every minute or so to check it for you
i mean...
So unless the classnames of the radios are borked, this will work
player addEventHandler ["Take", {
params ["_unit", "_container", "_item"];
if (toLowerANSI _item in ["tfw_ilbe_a_gr", "tfw_ilbe_dd_gr"] && !([_unit, "ACRE_PRC117F"] call acre_api_fnc_hasKindOfRadio)) then {
_unit addItemToBackpack "ACRE_PRC117F";
};
}];
player addEventHandler ["InventoryClosed", {
params ["_unit", "_container"];
if (toLowerANSI (backpack _unit) in ["tfw_ilbe_a_gr", "tfw_ilbe_dd_gr"] && !([_unit, "ACRE_PRC117F"] call acre_api_fnc_hasKindOfRadio)) then {
_unit addItemToBackpack "ACRE_PRC117F";
};
}];
[missionNamespace, "arsenalClosed", {
if (toLowerANSI (backpack player) in ["tfw_ilbe_a_gr", "tfw_ilbe_dd_gr"] && !([player, "ACRE_PRC117F"] call acre_api_fnc_hasKindOfRadio)) then {
player addItemToBackpack "ACRE_PRC117F";
};
}] call BIS_fnc_addScriptedEventHandler;
ok, lemme test ๐
Just keep in mind that if the backpack is full, it won't add the radio!!!
wut? that doesn't make sense...
its for the take
event handler
reloading a mag makes you "drop" and then "pick it up"
which is why you should check if the taken item is the backpack, and not anything...
and it will break when someone carries another LR radio ๐คฃ
you just get 2 radios (if it fits), but I have no idea how ACRE handles that
hence why I'm working on a solution to have different antennas (as the whole mod is designed for), and don't care about the radio being used
If you already have a 117 !([_unit, "ACRE_PRC117F"] call acre_api_fnc_hasKindOfRadio) becomes false.
wdym different antennas, as different ranges for the 117? or a different radio altogether
different antenna; ACRE supports different antennas for each radio
oh
so possible to have different ranges based on the antenna being used
yee like the placeable, so ur turning the backpack into a range extender basically?
no; just change the actual antenna config which is connected to the radio
backpack is just a visual
h
welcome to the pain of modding ACRE...
yeap its really hard to understand... also how do you change the antenna on the SEM 52SL
["ACRE_PRC152_ID_1",0,"ACRE_120CM_VHF_TNC",HASH_CREATE,false] call acre_sys_components_fnc_attachSimpleComponent
uh
yup; better start reading the source code of ACRE to still not understand how it works... I'm exactly at that part
Hmm so im trying to think of methods to evaluate the spatial cohesiveness of players
Basically a coefficient that goes up the closer a player is to everyone else
if you have the math for it, it's easy to implement
my initial gut reaction is to just get the average distance from every player to every other player but that feels expensive to me
I dont know if it actually is
That wouldn't make much sense; having 4 people close and 1 far away will then have a worse result than all 5 at an equal mid-range. Although it's easy to do.
For a "perfect" number you would need to have a very complex formula based on amount, range, and how close other people are to others (eg. if you are close to a group it's better than close to multiple single players)
That will be complex, but still doable
and as long as it doesn't have to run on each frame (and can be off-loaded to only calculate own numbers per client), than the performance should be too big
Each player stores the amount of other players with 10m, 25m and 50m, which is calulculated in a number (eg. (_amount10m * 1) + (_amount25m * 0.7) + (_amount50m * 0.5))
In addition it will take the _amount10m value from all players within 10m distance, and add the total + (_other10mtotal * 0.2).
And this is the total number you can use further in your calculations/scripts.
greetings ... this might be a stupid quiestion ... is there a easy way to assign multi variables the same value... like a1, a2, a3, a4, enableAI "MOVE";
with out having to copy pasta each enableAI section to each var
you can loop over all the variables
like this ```sqf
{
_x enableAI "MOVE";
} forEach [a1, a2, a3, a4, a5];
thank you good sir .... i cant tell you how many hours ive been banging my head against the keyboard trying to work this crap out... now things are finally starting to fall into place ...
it's a well know problem ๐คฃ
when creating squads, can i apply the disableAI move to the group or do i need to apply it to each individual unit
for each unit
balls
but you can use some magic:
_groupVars = [g1, g2, g3];
{
{
_x enableAI "MOVE";
} forEach units _x;
} forEach _groupVars;
This will loop over the groups, and then over each unit in that group
so each unit needs its own var name? or is it just the group name
no, just the group
ah so "g1" is the group var name ... right.. i will get this programming stuffs... eventually
SQF has a lot of commands and functions which can make your life easier; simply check the wiki for what is possible and how stuff works
sqf?
The scripting language youre using for Modding arma is called sqf
ah
anyone ever use "bis_fnc_arsenal_data" ?
How do I convert this model space position to world space?
cursorTarget selectionPosition [(_doorArr select 1) select 0, "Memory"];```
I've been looking at modeltoworld and worldtomodel but I can't make it make sense
modeltoworld requires an object for the first param
is this the correct usage?
_memPointPos = cursorTarget selectionPosition [(_doorArr select 1) select 0, "Memory"];
_memPointPosWorld = cursorTarget modeltoWorld _memPointPos;```
Im trying to make foldable peltors compatable with ACE does anyone have a sample or is there any chance I can get some help with making my configs/getting it to work
I have the model and function SQF but what should I put in the config?
So question is it possible to set the max fly in height of a unit in a config?
config not really, except using fliyInHeight commands in init EH - but this can then be overriden later
#arma3_config and/or #arma3_model may help
How can I pass stuff into functions called via setWaypointStatements?
This works ["true", "[this] spawn taro_ta_fnc_deleteVehAndCrew"]; and this refers to the vehicles driver. However this:
["true", "_stuff spawn taro_ta_fnc_deleteVehAndCrew"];
does not work and I have no idea how to pass more complicated params down the line.
And yes I do have to use the setWaypointStatements, because I'm creating new waypoints on the fly and running variety of scripts and functions on them.
and yes I do realize that setWaypointStatements expects a string, but I have no idea how to turn an array with params into a string and then put it into the setWaypointStatements
Can someone explain me whats causing this error.
15:18:19 Error in expression <ce}count playableUnits isEqualTo 16)
) then {
_Unit_list = _Unit_list - [_x];
d>
Error position: <then {
_Unit_list = _Unit_list - [_x];
d>
Error Undefined behavior: waitUntil returned nil. True or false expected
waitUntil returned nil. True or false expected
brackets
Where ๐
(count playableUnits) isEqualTo 16
perhaps post the whole code, instead of just the error message (which tells you what is wrong...)
I can't at the moment because I'm not at my computer. I can tag you when I post it
what youuu @finite sail
... posts error for help, gets help but can't receive it...
it's like a deaf person calling a support phone...
any reason you're using playableUnits instead of allPlayers?
because they are different?
just wondering if hes using the best one for his use case,
based on previous comments on this Discord do I doubt that he knows how the script even works... let alone why it's using one command or another...
end of rant
probably, yes
Hey peeps, any chance you know if there is a way to move a vehicles turret, without the need of ai?
afaik, you need AI
And even with AI in the turret it's a pain...
just give the AI a lookat
Best I've managed was making a turret turn around (move horizontal), but it was not possible to make it move vertical reliable
yes, me too
I could use allPlayers. This is not my script.
It's GFs' zombie script
well thanks for that ig...
I am here asking for help when I'm fixing others scripts. I know how my scripts work and I can fix that, but If i cannot find solution for other peoples scripts on the forums or myself I come here for help. Thats all
does anyone know how to get a random sound from a list each time a script fires?
selectRandom
selectRandom ["className1","className2"];```Will just do
oh okay thanks
but how would i put that in this
[_object,"pali1"] remoteExec ["say"];```
and is this function even correct
because it doesnt work
I think you could create an array of classes and in remoteExec use selectRandom, or create an array from selectRandom. I think both should work. But this is like really basic logic function. Try if it works
Use remoteExec to call a class from array
like... remoteExec [selectRandom[_say], 0]
array should be _say = [class1, class2,...]
But if u want it to be executed on client side (for server use) I think its better to use exevVM in initPlayerLocal.sqf
_sounds๏ปฟ = ["sound1","sound2","sound3"];
here is also another function you could use
that you add playSound (_sounds select ([0,(count _sounds)-1] call BIS_fnc_randomInt๏ปฟ))๏ปฟ into remoteExec
If it's some static param like string or position you can just format it.
If it's an object reference or something, setVariable it on group and fetch it from group when statement is executed.
I see, I was using setVariable, but I thought there might be more elegant solution
Is there a way to get a bullet owner? For example - to get a person who set the damage?
Looking into changing time locally for a user.
I noticed the skipTime command syncs up with the server every ~5 seconds.
Is there a way to disable that sync?
so, im trying to create a cod style uav thingy and i cannot figure it out, tried pre-made scripts i tried making some none worked, the obj is, i want to create a script that generates a marker on a player for about 10 seconds every minute
and i need a hint that announce that opfor is being marker on map
https://community.bistudio.com/wiki/setDate
Might work, might not work, possibly somewhere in between.
You can use createMarker, setMarkerPos and setMarkerAlpha combined with sleep and a while-loop to get there.
Mind sharing what you have so far?
i was using this
_center = param [1,player];
_deleteTime = param [2,10];
_posTolerance = param [3,0];
_nearestUnits = nearestObjects [_center, ["man"], _radius];
systemChat "Scanning in progress...";
for "_i" from 0 to (count _nearestUnits) - 1 do
{
_unit = _nearestUnits select _i;
if (side _unit != playerSide) then
{
_marker = createMarker [format ["tempMarker_%1",_i], [_unit, _posTolerance, random(360)] call BIS_fnc_relPos];
format ["tempMarker_%1",_i] setMarkerType "o_unknown";
format ["tempMarker_%1",_i] setMarkerColor "ColorUNKNOWN";
format ["tempMarker_%1",_i] setMarkerSize [0.5, 0.5];
};
sleep 1;
};
systemChat format ["%1 hostile Entities found.",count _nearestUnits];
systemChat format ["Position tolerance: %1 m",_posTolerance];
sleep _deleteTime;
for "_i" from 0 to (count _nearestUnits) - 1 do
{
deleteMarker format ["tempMarker_%1",_i];
sleep 1;
};```
inside reveal.sqf
activated via radio alpha
I'm guessing your main problem is that the marker positions don't update?
Does the "Scanning in progress..." message show?
negative
Hello,
Which do you think is the smartest/fastest ?
waitUntil { ((allDeadMen) findIf {isPlayer _x}) isEqualTo -1 };```
```SQF
waitUntil { {alive _x} count allPlayers isEqualTo count allPlayers };```
i think the second one is the fastest not sure tho
the first should be faster, though they are checking slightly different things.
itl stop at the first time the condition passes, whereas the second will continue counting even if it fails one.
iirc allDeadMen is quite slow though, so Iโd check if a unit in all players is not alive with findIf.
params [["_radius", 50], ["_center", player], ["_deleteTime", 10], ["_posTolerance", 0]];
private _ttl = time + _deleteTime;
while {time < _ttl} do {
private _markersArray = [];
{
if (side _x != playerSide) then {
private _marker = createMarker ...;
//Do the other marker creation stuff here
_marker pushBack _markersArray;
};
} forEach (_center nearEntities ["Man", _radius]);
sleep 2;
{
deleteMarker _x;
} forEach _markersArray;
};
```This is still not ideal as the markers get deleted and recreated every cycle, so there is still room for improvement (for example if you know that `_center nearEntities ["Man", _radius]` will always return the same units).
Then I would assume that your script is not starting properly... You have a trigger with Radio Alpha activation and execVM "reveal.sqf";?
i'll try it now and thanks
yep
By the way, you don't need to use format ["tempMarker_%1",_i] every time, you can use _marker.
didn't know that thanks alot m8
waitUntil { allPlayers findIf {!alive _x} isEqualTo -1 };``` ?
Do you get the option to use the trigger with uhhhhhh 0-8-1 (I believe)?
Or does Radio Alpha not show up?
yea, i think that should work.
nono, radio shows up but i get an error script once i activate it
Well well well what does it complain about?
sending screenshot
This seems like such a basic question, I even personally feel I'm missing something obvious, especially relating how Arma handles scopes/variables:
Is there a way to earmark a unit?
Example, some groups got placed in the editor, then during game I create group A, B and C usingBIS_fnc_spawnGroup, and after some trigger, I give some waypoint to all units of a SIDE, except group A and B
As is, all I can think of is putting A,B in a custom array at creation and then subtract that array from allGroups. But that does require to keep track of that created custom array somehow, and I can see it getting real messy if I want to run that initial spawn script multiple times (so have multiple "group A"). ||Again, super hypothetical example, just trying to wrap my head around Arma 3 scripting||
private _marker = createMarker ...;
//Do the other marker creation stuff here
Well, I didn't complete that because it's not relevant to the logic, you can easily fix / complete it yourself 
Oh, okey dokey thank you for your time
Does it work?
You are right, I think I would do that with an array too. It's pretty simple though:
SpecialGroupsArray = []; //Only run this once (in initPlayerLocal.sqf for example)!
//Every time you create a special group you do it like so:
SpecialGroupsArray pushBack ([...] call BIS_fnc_spawnGroup);
```That way all your special groups are always in `SpecialGroupArray` and you can access and exclude them easily.
#arma3_config Will know
ah ok wrong section, thanks will clear this and post there.
private _marker = createMarker ["o_unknown",player]; this should work right?
i don't know what im doing lol
Oh, maybe I should have written it after all since you seem to have not used forEach before. This is how I had it planned:
private _marker = createMarker [format ["tempMarker_%1", _forEachIndex], [_x, _posTolerance, random(360)] call BIS_fnc_relPos];
_marker setMarkerType "o_unknown";
_marker setMarkerColor "ColorUNKNOWN";
_marker setMarkerSize [0.5, 0.5];
```Inside a forEach-loop, `_x` is the current element and `_forEachIndex` is the current loop iteration.
now i understand and it works : )
looking for best effiiciency
Uhm
wat is that?! 
https://community.bistudio.com/wiki/Identifier
You can't use numbers as variable names.
or maybe this?
_line1 = ["Commaner Zlatko", "Well this is a fine fucking mess we're in, welcome to the party, Americans. I'm down over half my men, and these barbarians show no sign of stopping."];
_line2 = ["Commaner Zlatko", "Help my men re-inforce the compound, we MUST hold this position."];
_line3 = ["Commaner Zlatko", "I also have critically wounded that need CASEVAC on the lower level. Our supplies are low and our own helicopters are at least an hour away."];
_comeback = ["Commaner Zlatko", "Come back, I have more to say!"];
{
if ((player distance o1) > 3) exitwith {[[_comeback],"COMMAND",0.1,true] execVM "scripts\fn_simpleConv.sqf";};
[[_x],"COMMAND",0.1,true] execVM "scripts\fn_simpleConv.sqf";
} forEach [_line1,_line2,_line3];
@little raptor its a proof of concept
https://community.bistudio.com/wiki/Function
Then, since your file is already named fn_simpleConv.sqf and since you use it multiple times, I suggest you make it an actual function.
its not my code and I don't have permission to modify it
You don't need to modify fn_simpleConv.sqf to make it a function.
You're right, my mistake
you do realize that what you wrote is wrong in every way right?!
the first time?
both times
what's wrong the second time?
oh true, missing [
and it's logically flawed
Problem is, unless TAG_fnc_simpleConv offers a way to detect when the conversation is done, you can't really use a forEach-loop for your _comeback-message. In fact, unless TAG_fnc_simpleConv has a queue of conversations, you can't really use the forEach-loop at all (unless you want all conversations to happen at the same time).
I'm gonna have to double check with that
okay so here's the loop inside simpleConv
//Loop through all given lines
for "_i" from 0 to (count _lines) - 1 do
{
private _nameSpeaker = (_lines select _i) select 0;
private _currentLine = (_lines select _i) select 1;
private _speaker = (_lines select _i) param [2,objNull,[objNull]];
private _break = count _currentLine * _breakMultiplier;
if !(isNull _speaker) then {_speaker setRandomLip true};
private _handle = [_nameSpeaker,_currentLine,_colourHTML,_break,_showBackground] spawn _fnc_showSubtitles;
waitUntil {scriptDone _handle}; //<-- line 132
if !(isNull _speaker) then {_speaker setRandomLip false};
sleep FADE_DURATION + 0.5;
};
perhaps if I add a new variable and add it like such, I can use it for iteration outside the script:
waitUntil {scriptDone _handle}; //<-- line 132
Revo_fnc_simpleConversation_lineDone = true;
Yeah you could suspend the loop waiting till the line is said
Convos in arma suck behind and are awful.
something like this should work right?
{
if ((player distance o1) > 3) exitwith {[[_comeback],"COMMAND",0.1,true] execVM "scripts\fn_simpleConv.sqf";};
[[_x],"COMMAND",0.1,true] execVM "scripts\fn_simpleConv.sqf";
waitUntil {Revo_fnc_simpleConversation_lineDone};
} forEach [_line1,_line2,_line3];
No it won't get messy (at least if you do it right)
From my understanding you want to exclude some groups from being assigned something. So you create a global array and add those to the array (pushback) and subtract the array from allGroups (as you said it yourself)
Groups also have their own namespace (setVariable). You can look into that too.
Im a relative noob to arma modding.
I want to change some of the properties of a vehicle and I dont know which classes I need to reference to get it to work.
I want to edit the sensors of the vehicle, so im calling the class like this:
class Components: Components
{
class SensorsManagerComponent
{
class IRSensorComponent: SensorTemplateIR
{
class AirTarget
{
minRange=0;
maxRange=2000;
objectDistanceLimitCoef=-1;
viewDistanceLimitCoef=-1;
};
at the start of the file I added this, but it doesnt seem to work
class VES_AV14_AGM
{
class components;
};
Nvm figured it out, I just needed to call the correct base class.
Can someone help me with setting up the inheriting correctly?
I have no idea how to navigate this maze.
Obtaining the script handle and waiting is much easier:
_handle = [["Sample text"], "Sample text", 0.1, true] spawn Revo_fnc_simpleConv;
waitUntil {scriptDone _handle};
```But, again, you can't really use a forEach-loop because it will break with `_comeback`:
```sqf
{
if (_x == "2") exitWith {
systemChat "!";
};
systemChat _x;
} forEach ["1", "2", "3"];
```This will output "1" and "!" and then terminate the loop because of `exitWith`; "2" and "3" are skipped.
In your code it's the same, if the player is too far away when the condition is checked, `_comeback` is executed, but nothing after that.
https://community.bistudio.com/wiki/Class_Inheritance
This page might help, and if it doesn't, the #arma3_config have got you covered.
Thanks, ill go look in the other channel.
_handle = [["Sample text"], "Sample text", 0.1, true] spawn Revo_fnc_simpleConv;'
Holy cow, that's old ๐
is uiNamespace available on preStart?


