#arma3_scripting
1 messages Β· Page 686 of 1
There is no error, I checked the RPT
It simply doesn't return 'true'
@sharp peak That condition might never become true
its evaluated on mission creation, is that a problem mabye?
maybe elder_1 isnt created yet when checked so it says "false"?
Is the issue that it spawns after intel_1?
if elder_1 comes after this entity in mission.sqm it might not even exist
Trying to spawn them after the other now
Indeed, it worked
Arma do be silly like that
Thx for helping figure it out)
how did you change spawn order?
I put down a new object
Otherwise you can also edit the mission.sqm by hand
and just spawn the two objects around in places
This condition of presence is more meant to be used for things like (difficultyOption "friendlyTags") > 0
Thats whats so beautiful about Arma, meant for one thing - (somewhat) works for other))
Would not be a problem if the tooltip was not so generic
Been trying to get a script that practically disables players from drowning to work. It doesn't. Something odd I noticed is that if you're experiencing the drowning effects and execute this it WILL bring your oxygen up to max, but it won't stay that way/it won't loop. Anything I'm doing wrong?
while {underwater player} do {
player setOxygenRemaining 1;
};```
!isAbleToBreathe player;
lemme try that out
About underwater
While without sleep 
oooh didn't catch that initially
Use waitUntil
Either way, your loop is flawed
It won't stay
I take it back, it doesn't work. Rather, it only works when using units, not objects
So if I have unit1 spawn when unit2 exists, that works. But object1 when unit2 exists - object1 will be instantly deleted
waitUntil {
if (!isAbleToBreathe player) exitWith { setOxygenRemaining 1 };
};```
Something like this maybe?
How come?
It should be an infinite loop
What that loop does is execute the code while the player can't breathe
If he can breathe the loop exits
wat? 
So once the player leaves the water, it won't reactivate?
Ye (and if he's not in the water at the beginning it never executes)
I'm talking about the while one
Yeah yeah
Your waitUntil is nonsense
waitUntil { sleep 1; !isAbleToBreathe player } player setOxygenRemaining 1;```
You don't really need a condition
setOxygenRemaining 1; missing left argument, and also missing a ;
while {true} do {
player setOxygenRemaining 1;
sleep 1;
}
It won't matter if he's in water or not π€·
Hey, so does anyone know what the best way would be to get a logo to appear at the exact center of the screen?
I'm trying to use structured text and titleText/bis_fnc_dynamicText but having mixed results
Nvm, got it
thanks, this worked
Just wondering what was wrong with this?
waitUntil { sleep 1; !isAbleToBreathe player } player setOxygenRemaining 1;```
It's not an infinite loop
And it checks a useless condition
Like I said, who cares if the player can breathe
i suppose
if the condition is never true, it wont exit the loop
do Arma 3 animations have any kind of declaration whether they can be played with switchMove or not?
I have this code:
a_4 setBehaviour "CARELESS";
0 = a_4 spawn {
waitUntil {time > 0};
a_4 switchMove "Acts_CivilListening_1";
while {alive a_4} do {
waitUntil {animationState a_4 != "Acts_CivilListening_1"};
a_4 switchMove "Acts_CivilListening_1"}
};```
and it works perfectly with `Acts_CivilListening_1` while it freezes when used with `HubStandingUB_idle1`. I don't really see any answers why does it happen, I don't see anything special in the animation config either. I tried changing switchMove to playMove and playMoveNow but then the animation doesn't even start
the only thing I have noticed is that Acts[...] is defined in Biki as "Actions" while the Hub[...] thing is "States"
Use switchMove + playMove
There's no guarantee that the unit can exit the animation state
It depends on the connections/interpolations
i tried both but the animation either freezes on it's first frame or doesn't start at all.
Both together?
Yes, certain animations like the one I mentioned simply freezes
Animation freezing at the end is due to lack of interpolation/connection
So can it lack connection within this one animation? Because my problem is not tha it doesn't loop - the animation just does not end, it stops after the first frame.
How would I go about selecting two ai from an array then getting the two ai to have a random conversation
I have 9 different topics to chose from and 4 ai, I would like to get a1 and a2 to pick one of the 9 topics and start a conversation, and then have the same done for b1 and b2.
pick a random number between 0 and 3, use it as index1, and then pick another random number between 1 and 3 for the sum. Add it to index1 and wrap around ( % 4) to get index2
@little raptor I kind of get what you're saying but I'm not fully understanding it, could you provide an example?
_i1 = floor random 4;
_i2 = (1 + _i1 + floor random 3) % 4;
Although you don't need the floor
One thing that is not clear about your question is if those AI are random
I assumed they are
Also do you want to pair them up?
The following code changes the position of option_2 instead of the caller. I want the caller to change it's position when activating "Spectate CQB". Any advice on the matter?
option_2 addAction [
"Spectate CQB",
{
params ["_caller"];
_caller setPos (getPosATL entrance_spectator);
_caller addAction [
"Exit Spectate",
{
params ["_target"];
_target setPos (position option_2);
removeAllActions _target;
}
];
}
];
your params are wrong
dang. What are my params supposed to be?
Wow. Both methods you mentioned worked. I understand params far less now lol
_caller setPos (getPosATL entrance_spectator);
use compatible position formats
removeAllActions _target;

if it works, it works
params ["_target", "", "_id"];
_target removeAction _id;
does the Exit Spectate action even need a "" param?
"" means skip
params ["_target", "_caller", "_actionId", "_arguments"];
params is nothing special
it just assigns array elements to private variables
[1,2,3] params ["_1", "_2", "_3"]; //_1 is 1, _2 is 2, _3 is 3
For some reason, I just thought it "initialised" variables of a particular functions. So if one wanted to use _target, they'd need to make a params with _target.
no
thanks for the help, leopard!
np
here is the version with Leopard's improvements:
option_2 addAction [
"Spectate CQB",
{
params ["", "_caller"];
_caller setPosATL (getPosATL entrance_spectator);
_caller addAction [
"Exit Spectate",
{
params ["_target","", "_id"];
_target setPos (position option_2);
_target removeAction _id;
}
];
}
];
i have an ace selfaction, which should only be availalbe to Zeus. how do i test if a unit is a zeus?
allCurators biki tells me: Returns list of all curator logic units, not the units assigned to the logic.
which i dont know what that means
ah maybe its the gamemaster editor module?
maybe this?
_dude in (allCurators apply {getAssignedCuratorUnit _x});
ah thanks revo
Let me know if it works. The biki description could need an update.
not exactly what i hoped to hear, but sure lol will keep you updated
it says false, even tho i have zeus
(β―Β°β‘Β°οΌβ―οΈ΅ β»ββ»
π
gettext (configfile >> "cfgvehicles" >> typeof _curator >> "simulation") == "curator"
That's all it does
so yeah you need to use assigned* with allCurators
hint str (allCurators apply {getAssignedCuratorUnit _x});
seems to do the job
can some one help me to make a kill eventhandler? it has to give 250 money for each kill to a variable, in this case if west and east units are killed by resistance. also if resistance kills a civilian it should substract 1000 money. i have here somthing that was made for a earlier stage: https://pastebin.com/QyfVu1e0
it also completely broke the ace interaction GUI when i put it as a condition lol
Yeah, because it returns false
not just my action, all actions
You have everything there already. Just use some side checks
i have no clue. i cannot code yet. i can rudimentary get stuff done alone. i learned all from sqf so far.
ah im dumb, it put it in the childcode, isntead of condition, thats why ace broke
if (side _killer isEqualTo independent && side _killed in [east, west]) then {add money};
if (side _killer isEqualTo independent && side _killed isEqualTo civilian) then {substract money}
side group _killer / _killed
@sacred slate
it also means that friendly fire is rewarded
well, the script of the pastebin causes also the substraction to east and west kills
thx lou, but i am not familar where in between i should add that
if (dmpPlayerCash < 0) then {dmpPlayerCash = 0;}; use max command here
3 max 2; // Result is 3
more like this:```sqf
addMissionEventHandler ["EntityKilled", {
params ["_killed", "_killer", "_killerID"];
if (_killer != player || { side group _killer != independent }) exitWith {};
if (side group _killed in [east, west]) then { dmpPlayerCash = dmpPlayerCash + 250; };
if (side group _killed isEqualTo civilian) then { dmpPlayerCash = dmpPlayerCash - 1000; };
dmpPlayerCash = 0 max dmpPlayerCash;
hint str dmpPlayerCash;
}]
!isNull getAssignedCuratorLogic _unit // true if _unit is a zeus
i used
(_target in (allCurators apply {getAssignedCuratorUnit _x}))
yeah that's way slower ^^
agreed but its an array of one person usually π€·ββοΈ
ill put yours into a todo π
many thanks @winter rose
any quick check if a helo is able to fly?
ugh im refactoring a helo supply script, which was never meant to be zeus usable. i hate frontend
yeah that was the first i searched lol
{
player sideChat "He's nailed on the ground! Now hurry!";
};
where else would he be nailed? in the sky? biki do be like that lol
the player is dumb, not the wiki hmmkay? :p
@winter rose should the eventhandler work for a hc unit far away?
yes
for the hc far away i am not sure, but a close squad member wont trigger it.
where did you add the EH�
the init.sqf does execVM "scripts\dmp\moneyonkill.sqf";
and are you an independent unit�
yes
try setting systemChats to debug? because it should work ^^
also, the dmpcash var should be defined somewhere too
oh well its drongo's map population, and i am in the editor with it.
and it does work π
at least for the player
well yeah, it is a local script
@winter rose so its not possible to make that for all fighting units?
what are you trying to achieve? your code specifically says "if you are not the player, exit"
ohhhhhhh
yeah that was once the case.
i just would like the handler happening side based
but removing that won't help much more
what is the end goal?
one moneypot per side?
then you cannot use a local "per-client" script, but a server-script
i am in a lan free single player scenario, i would like to keep it that way. so thats a no go?
server-side script can happen in SP too - the machine "is" a server
so yeah just remove the player check and then it will be fine - script won't be MP compatible and that's it
haha how do i make the civ kills only for the player? π
also the handler even triggers if the enmy kill each other. but there could be another cause for that.
drongo map pop can read any mixed units and put them on a side. some how that behaves strange at start
i am even not sure if this is right now: https://pastebin.com/F2sP4Ghb
well the civ punishment could happen for whole resi, but not for east and west, i maybe have to slow down the test trigger. but it looks like it does all kind of wild mixed things
make a sentence of it π
if "it is the player" and the person killed is civilian" then β¦
that's my code π so perhaps
i mean i just commented the player check
if you dont check for players, then an AI soldier killing an AI soldier will trigger dmpPlayerCash
the eventhandler fires for all units its attached to, regardless of who killed who
so this would it be then https://pastebin.com/W8xBiWhW
ok
ok i did read it lol: if side killer is equal ind and side killed is equal civ, then
oh. while side ind and killed is civ
maybe..
Yes I would like to pair the ai up
sorry but π
yeh thats true. the learing to exploit ratio is quite harsh. still i rly contribute if i can. but surly not in scripting yet.
no worries, it was the expression itself that made me chuckle π there is no shame in not knowing everything, otherwise everyone should be π
in the end that was the beginning we forgot everything.
the art of coding without coding.
I believe you should try the method described here
https://community.bistudio.com/wiki/Code_Optimisation#Make_it_work
When starting from scratch if you know what you want but miss the specific steps to get to your point, it is a good practice to write down in your native language what you want to do. E.g Get <all the units> <near the city>, and <for each> <west> soldier in them, <add 30% damage>.
yeah i noticed how that all ready affect my daily routine some how π
the starting point here would be "boom! someone got killed. now what?"
uh is this "_myFunction = compile preprocessFileLineNumbers "myFile.sqf";" the best way to use functions?
theres no mention of the description functions framework in that page
no 
also, where do i read up on sqf compilation? ("interpretation" idc)
read up what?
read precedence
https://community.bistudio.com/wiki/Order_of_Precedence
all sqf commands are operators
read up to figure out how sqf is read by the computer so i can write most performance efficient, ideally compiled code
to avoid on-runtime-interpretation
or however that works
This is exactly what Dedmen is bringing to Arma with sqfc
the fewer commands (especially slow commands) you use, the better
that's the only rule to sqf
if there's an engine alternative, pick that one
e.g. don't use findIf if you can use find
don't use loops as much as possible
don't use ifs as much as possible
there is a biki page for 'optimization'
gives you faster alternatives for common 'functions'
that and just using good programming logic
yeah thats where i got this snippet from lol
not really at all how it works
Less code == more efficient.
Thats about all of it
well, where do i find out how it works π
nowhere
rip
blackbox
it's operator based, as I told you
everything is an operator, and executes at runtime
even if (true)
ill just keep using
while {true} do {["uwu"] execVM "iron_function.sqf"}; then
wat?
syntax error
are description declared functions also interpreted at runtime as loadfile -> string -> interpret?
while true, eww
waitUntil { ["uwu"] execVM "iron_function.sqf" ; false };
```here, I optimised it for you π
you're killing the scheduler (at least better than @spark turret 's)

SQF is compiled into instructions, not interpreted from string, that was SQS
why on earth are you adding new code to the scheduler?
just loop the code
so correct me if im wrong:
a normal "myfile.sqf" which i execVM from somewhere is compiled at runtime, which is slow.
is there a way to compile it at missionstart to keep load away during mission instead (as a description.ext declared function)?
it was a joke
execVM loads script from file and compiles it yes
compile it once and store it in a variable, using CfgFunctions for example.
And then call/spawn it
execVM equals spawn compile preprocessFile
okay, so CfgFunctions are better, bc they compile at missionstart once, instead of when they are called
is any of those both right?
if (_killer != side group player) exitWith {};
if ({ side group _killer != independent }) exitWith {};
sqf lint in VSC will tell you
even spawn compile preprocessFile ? π
yeh i have that still on my list
_killer != side something is wrong, youre comparing a unit to a side
if takes bool
not code
{ side group _killer != independent } is a code (because it's wrapped in {})
^
{uwu} is code. (uwu) is a condition
or arithemetic or anything else
depending on uwu
why is (position player) a condition
cause it has ()
i tried to read some scripting basics
makes more sens if its jumping one in the face
() has no meaning in sqf
it's only used to group statements
well it groups stuff together so anyting inside is evalutaed before its passed
how do you call the () in (position player)
yeah, thats what i mean by grouping
I have no idea what you mean 
floor 3.5 + 1;
floor (3.5+1);
that's what parentheses are used for
ok thx
us round brackets for readability and to ensure the execution order is what you want
or just learn the precedence instead of bracketing up the whole place 
((3+1)*5) = 15 and (3+(1*5)) = 8
still, readability matters
I'd call that unreadable 
lets agree to disagree (and im right oc)
no
my nemesis are one-liners without brackets
() are how you assert dominance
(((@zenith edge))) then π
(define subsets(lambda (org)(letrec((worker(lambda (in accu)(match in((make-pair x xs) (worker xs (append accu (map (lambda (y) (append y (list x))) accu))))(empty accu)))))(worker org (list empty)))))
perfectly readable
is there an easy way to measure how much a helicopter is in danger (while approaching his LZ?)
_myHelo.pilot.getPanicValue()
define "danger"
(((_myHelo).pilot).getPanicValue())
```FTFY
@little raptor To answer your question from last night, I have 4 ai placed down, and I would like to pair them up with random conversation topics.
well, danger of being shot down. i want to decide if the LZ is to hot for a supplydrop or not
maybe hit eventhandlers on the Heli and a max count?
Just define the LZ area and check how many enemy units are there and how many of them have AA etc
but that would magically know about hidden untis
use knowsAbout or whatever
hmhm yeah
nearEnemies something?
select {helo knowsabout _x > 0.5} or sth
no, its an AI helo
but i rather have it react than act with magic knowledge
ill try both, hit EH, and knowsabout nearEnemies
if hit EH fires when a stinger hits the heli he sure knows it was too hot
yeah, but thats realistic tho
for a fraction of second only, let's hope the scheduler isn't busy then π
you dont know before you dont get hit
@winter rose I looked more into the bis_fnc_kbtalk, and I saw that's there's a param that can be pasted to enable an array for actors. I implemented it and it worked for me when I want a different ai to start a topic then the one defined in the .bikb file
I found a fix for my problem, apparently this certain animation is looped in itself, I mean it continues after its "end", so I only needed to place it once and add a sleep function.
time to redesign my helo supply script into an FSM
bc i hate Zeuses and want the helis to be even less controllable
pair up random AI?
@little raptor Well I have them placed down in pairs of two, and I would like to get all 4 ai to have random conversation with the ai that they're paired with.
How can I force the spawn of Zeus once the player joins? Right now the player get the respawn menu, which causes a 'buggy' respawn screen since I also force Zeus to open and stay open.
I had a look at a few possibilites. But none of them work, or I use it wrong.
https://community.bistudio.com/wiki/Description.ext#respawnOnStart
I think this would apply it for everyone, which I do not want.
hmm maybe on the initlocal, check if the player is a zeus and if not just kill the player?
Huh?
instead of using respawnOnStart, add a bit of code in the initPlayerLocal.sqf that checks if the player has access to zeus, and if not, kill the player so it forces the player that isn't a zeus to the respawn screen
initPlayerLocal.sqf where can I find this?
I have little experience in scripting.
then it's really easy. I don't see what you need help with.
if they're in an array, just select them
Well. I wouldn't know how to achieve this at all anyway...
I hate programming and scripting with a passion.
thats the true spirit of a programmer
I am not.
I am a network administrator.
Fuck them programming languages. Although... I must have to succumb to it sometime.
if (isNull getAssignedCuratorLogic player) then {
player setDamage 1;
};
put that in the initPlayerLocal.sqf
anyone that does not have zeus should be killed, and anyone who does shouldn't
That's not what I need.
I need to have the player who is Zeus to be forced to spawn.
Because I have zeus mode forced. So the spawn screen bugs out and is black.
Zeus needs a helping hand and be forcefully spawned.
so in your case the first thing the players see is a respawn screen?
set respawnOnStart to 0
Because Zeus gets a respawn screen, but the game also forces the zeus menu open it bugs out and gives a black screen.
And where do I fill that in?
Wouldn't that make it so everyone has an instant respawn on start?
afaik you can't only have certain people start with a respawn screen and other not without a bit of code
I completely understand that.
So that respawnonstart needs to have something that checks if the player is Zeus.
Right?
not respawnonstart itself
that's a parameter you put in description.ext, which acts as a config file for the mission
// initPlayerLocal.sqf
if (isNull getAssignedCuratorLogic player) then {
player setDamage 1;
};
I understand everything you say, but I just don't have the brain power to comprehend the logic on how to build it.
create a file in the mission root called initPlayerLocal.sqf
then add that code above
if (isNull getAssignedCuratorLogic player) then {
respawnOnStart = 0;
};
Would this help?
no
respawnOnStart should be in the description.ext file
create a file named description.ext
then put
respawnOnStart = 0;
This would force it for all players.
yes
That, again, I do not want.
but the code forces the players that don't have zeus to respawn, to which it sends them to the respawn screen
That they get the respawn screen so they can select a respawnpoint.
But the zeus player NEEDS to respawn with that menu appearing.
you mean without that respawnmenu appearing
do you have a respawn point?
for players in general
but other players have to respawn too right?
No. Zeus needs to place a respawn first.
I want it to be like the normal real zeus mode.
Where players need to wait for a respawn point to be placed.
But where Zeus starts right away.
@patent lava
Would this work on the localplayer.sqf?
if (isNull getAssignedCuratorLogic player) then {
respawnOnStart = 0;
};
If not, why not. I don't understand the scripting logic at all.
Isn't respawn on start a mission config value?
it is
someone got a suggestion for "isTouchingGround _myHelicopter" but it includes landing on builds or anywhere else?
yeah that would work better, but you'd still need to put it in the if statement
if (isNull getAssignedCuratorLogic player) then {
forceRespawn player;
};```
Like this?
And where do I then putt this in?
yes, initPlayerLocal.sqf in your mission root
do you have a file named description.ext with respawnOnStart = 0; ?
Let me try.
Still at the respawn screen.
Respawn disabled
if (isNull getAssignedCuratorLogic player) then {
forceRespawn player;
};```
the code isn't the problem
PS: no respawn in Eden Singleplayer (just to be sure π¬)
that's a good one
so im trying it myself now and indeed it is showing the respawn screen for both even though the description.ext has the respawnOnStart = 0
yeah that's really trippy wow
working on a solution now
yes, see Arma 3 Tools
@lavish sparrow i have no idea honestly, can't help you
respawnOnStart = 0; for now is better than nothing.
But if I do find a solution, I'll let you know.
Actually...
Is there just no wait to add the 'virtual' side to the game?
Like the real Zeus modes have.
How do I add a virtual side?
maybe with more trial and error, but i have other plans tonight haha
I will figure it out somehow.
Scripting wise can I search for a particular type of logic and then link a created entity too it?
I take it synchronizedObjectsAdd goes about adding a the thing to the logic object assuming I have a reference to it, do I just find an existing logic object with allUnits since its created with createUnit?
allCurators is game logic objects or something else?
Returns list of all curator logic units, not the units assigned to the logic.
gives you the Zeus'es
(allCurators apply {getAssignedCuratorUnit _x})
Ah so not that then. nearestObject should find it I presume given I have its type?
is it possible to make a truck a UAV truck? so once you get in it you have access to a uav terminal?
if so what is the code you would run in the object init of that vehicle
you can add an action to the truck which remoteControls the UAV
@little raptor hmmm there are multiple uavs going up and spawning so i'm not sure how that would work
yea same question, is there suppose to a func to call up that uav terminal screen ???
You can open the display itself (it's "RscDisplayAVTerminal"), but I don't think it's functional?
you want the actual uav terminal display? or you want to just control the UAV?
full uav controls
this addAction ["UAV-Terminal","cw_terminal.sqf"];
would this work?
what is cw_terminal.sqf?
i'm sorry
i've confused myself
one sec lmfao
just looking thorugh forums posts
i just wnat to add the UAV terminal actions to a vehicle
so like instead of using a terminal on your body, you have to go into a specific vehicle
yeah I get that
I just found an action for opening the UAV terminal UAVTerminalOpen
ok so I think you can do this:
this addAction ["Open UAV", {
params ["", "_player"];
_terminal = ["O_Uο»ΏavTerminal", "B_Uο»ΏavTerminal", "I_Uο»ΏavTerminal", "C_Uο»ΏavTerminal"] select (side _player call BIS_fnc_sideID);
if !(_terminal in assignedItems _player) then {
(getUnitLoadout _player select 9) params ["","_ItemGPS"];
if (_itemGPS != "") then {_player unassignItem _itemGPS; _player removeItem _itemGPS};
_player setVariable ["gps_item", _itemGPS];
_player addItem _terminal;
_player assignItem _terminal;
_player setVariable ["uav_item", _terminal];
_player addEventHandler ["GetOutMan", {
params ["_player"];
_item = _player getVariable ["uav_item", ""];
_player unassignItem _item;
_player removeItem _item;
_item = _player getVariable ["gps_item", ""];
_player addItem _item;
_player assignItem _item;
_player removeEventHandler ["GetOutMan", _thisEventHandler];
}];
};
_player action ["UAVTerminalOpen", _player];
}];
it doesn't seem to work 
the issue is that it doesn't give me the uav terminal for some reason
the code itself is correct
even this doesn't work:
player addItem "B_Uο»ΏavTerminal";
player assignItem "B_Uο»ΏavTerminal";

what's even weirder is that I do the exact same thing in my own mod and it works 
if (_type == 4) exitWith {
{
_x addItem "FirstAidKit";
_loadOut = getUnitLoadout _x;
(_loadOut select 9) params ["_ItemMap","_ItemGPS","_ItemRadio","_ItemCompass","_ItemWatch","_NVGoggles"];
(_loadOut select 8) params [["_Binocular", ""]];
if (_ItemMap == "") then {_x addItem "ItemMap"; _x assignItem "ItemMap"};
if (_ItemCompass == "") then {_x addItem "ItemCompass"; _x assignItem "ItemCompass"};
if (_ItemWatch == "") then {_x addItem "ItemWatch"; _x assignItem "ItemWatch"};
if (_ItemRadio == "") then {_x addItem "ItemRadio"; _x assignItem "ItemRadio"};
if (_ItemGPS == "") then {
_side = ["O", "B", "I", "C"] select ((side group _x) call BIS_fnc_sideID);
_ItemGPS = format ["%1_UAVTerminal", _side];
_x addItem _ItemGPS;
_x assignItem _ItemGPS
};
if (_NVGoggles == "") then {_x addItem "NVGoggles"; _x assignItem "NVGoggles"};
if (_Binocular == "") then {_x addWeapon "RangeFinder"};
} forEach _units;
};
hmmmmmmmmmmm
Anyone know of a good way to get rid of a dynamicText?
I tried doing a terminate, but it just gives me a generic error since the dynamicText is running on a
waitUntil {
player == player
};
waitUntil {
!isNull player
};
what is a dynamicText?
Mod that I'm playing with has their logo spawned in with that, and I was wanting to find a way to add an addon setting to enable and disable it externally without editing their code.
if they spawn it and don't store the handle there's no way (afaik)
Could you give an example of a script with a handle or?
blabla = [] spawn {};
blabla is the handle to the spawned code
actually I just looked at the code
_spawn = missionnamespace getvariable format ["bis_dynamicText_spawn_%1",_layer];
that's the handle that dynamicText uses
just get the layer
This is gonna be an interesting search
/*
File: credits.sqf
Author: Karel Moricky
Description:
Dynamic opening credits
Parameter(s):
_this select 0: Text
_this select 1: (Optional) X coordinates
_this select 2: (Optional) Y coordinates
_this select 3: (Optional) Duration
_this select 4: (Optional) Fadein time
_this select 5: (Optional) Delta Y
_this select 6: (Optional) Resource layer
*/
...
_layer = if (count _this > 6) then {_this select 6} else {[] call bis_fnc_rscLayer};
basic question about scripting, scopes, etc. since SQF can be highly functional in nature, I should be able to refer to "local" variables in the parent scope to a callback? i.e.
_callback = {isNull _target};
_target = objNull;
[] call _callback; // true
Regardless of where/when that callback happened, has access to the variables that are in scope?
Not counting more complex cases like spawn where the scope vanishes apart from the args you provided, for all intents and purposes.
yes
even just call _callback;, it is faster than [] call _callback; @dreamy kestrel
call is "run this code here as if it was copy-pasted"
cool, I like it; much more readable than _this#n ...
well, trying to avoid even that, leverage more scope vars
still better than _this#0 on multiple accesses
memory for a var should not be of concern; readability and speed should
Not wanting to push Leopard more π , is there a way to override a CfgFunctions?
_spawn = scriptNull;
_timer = 0;
waitUntil {
_spawn = missionnamespace getvariable [format ["bis_dynamicText_spawn_%1",3090], scriptNull];
_timer = _timer + diag_deltaTime;
!isNull _spawn || _timer > 20 //exit after 20s
};
terminate _spawn;
This is what Leopard came up with to remove the dynamicText, but it's called under a function that preinits calling the script that adds the dynamicText. So I'm guessing that's why the dynamicText isn't disappearing
is there a way to override a CfgFunctions
through a mod maybe, not via #arma3_scripting
Damn... thanks
does that stop the dynamic text tho?
No, it just stays there π¦
it stays there, yes, but it shouldn't move
I just noticed that the control was created before the spawn, so it won't disappear
Well at least that's good, but it wouldn't be possible to remove it then I assume
look at the bis fnc code again
see where the control is created
then delete it
or terminate it's display altogether if possible
That's the main issue, the BIS_fnc_dynamicText shows this for the parameters
text: String - text to display
x: Number - (Optional, default -1) X coordinates
y: Number - (Optional, default -1) Y coordinates)
duration: Number - (Optional, default 4) display duration
fadeInTime: Number - (Optional, default 1) fade-in time
deltaY: Number - (Optional, default 0) Y position delta:
= 0: Text will not move
> 0: Text will move down
< 0: Text will move up
duration and the absolute deltaY value will influence the movement speed.
rscLayer: Number - (Optional, default) resource layer
waitUntil {
player == player
};
waitUntil {
!isNull player
};
_pic = "\TOP\gris.paa";
[
'<img align='
'left'
' size='
'1.5'
' shadow='
'1'
' image=' + (str(_pic)) + ' />',
safeZoneX + 0.027,
safeZoneY + safeZoneH - 0.1,
99999,
0,
0,
3090
] spawn bis_fnc_dynamicText;
I'm not experienced for this sort of stuff yet. I don't see what I would classify as a control. I hardly was able to find the rscLayer without your help π
wherever you like? π€·ββοΈ
I don't know how all this works.
I don't know what to do exactly. I mean, the documentation is scarce and very uncentralised.
HoI IV does it better in the modding community in that regard, I must admit.
I just don't see the logic behind the scripting, yet.
Would love some lessons, but preferably live.
I mean, do I simply execute that example and should it work. Or should I make it point to something it should execute towards? Like a specific player?
Documentation is shit also in that regard, it's all scattered. Would really love to get into it. But that specifically gives me a really high bar to go over.
I now use this ```sqf
hint parseText "<t size='2.0'>Large text</t>";
sleep 5;
hintSilent "";
What is the exact build up? I get errors, is my format wrong? I just cannot find documenation in what order and format I need to place this.
Error Generic error in expression.

Documentation is shit also in that regard, it's all scattered.
Documenatation of BIS_fnc_guiMessage is perfectly fine.
Are you using spawn?
No
How is sleep supposed to work then?
Where do you see it?
See what?
sleep page
Are you now talking about hint or guimessage?
I just want a message, somewhere, to notify the player.
Don't care how.
Just somewhere.
Someway.
Then use the example on BIS_fnc_guiMessage
Doesn't matter. Execute it when you need it
How do you know?!
Where does it show whee I can and cannot use it?
That's the problem for me, I don't know where I can and cannot use something. It doesn't tell me >you can use this 'here' or 'here'.
Lets just say
If I'd put ["Hello World"] spawn BIS_fnc_guiMessage; in the init part.
Would I then work right away?
Test it
'Unable to create message box'.
Yep, so what is the issue now?
I don't get the message box?
You know where to look up code of functions?
No
I have no affinity with scripting, coding and anything like it.
I rather stay away from it.
But I have no choice.
All I can do, is hate it with a passion.
I had no affinity with it as well, nor am I a programmer
But you have to try to solve issues yourself and don't expect every bit to be documented.
I don't know where to start to solve it.
The reason the message will not show is because the display it uses it not available at the time of execution
[] spawn
{
sleep 1; ["Hello World"] spawn BIS_fnc_guiMessage;
};
This will work
It's simply not yet initialized.
Object is created, but the scene (display) is not yet there
Using spawn creates a scheduled environment
so that you can delay the script from being run until after the display has been initialized
sleep 1;
So sleep gives that timer?
that's what's delaying your script
Yessir
if you're using CBA, I believe it has an extended event handler system that taps into specifically post-initialization
unsure as to what the context is here though as I've only just jumped in
The reason I want to use this message is for a workaround though...
What I really want is the player, playing Zeus to spawn in immediately, while all the regular players get the spawn screen.
That, I simply cannot get to work. It's only possible for all players or none.
And this message is basically meant to show so people know what to use 'zeus' since they spawn as 'nothing'.
Because I want to open Zeus automatically, but got to have that turned off... Because that gives the player a black spawn screen. Which works...
But people think it's broken and just don't play the scenario.
respawnOnStart = 0; helps...
But it's for all players. Which I do not want.
And what about forceRespawn ?
That doesn't work anymore. Before it worked? But it gave me spawn unavailable.
if (isNull getAssignedCuratorLogic player) then {
forceRespawn player;
};
That's what I used.
Yup
Respawn is setup correctly?
100% sure, yes.
I now still get the respawn screen with the timer.
Forces the unit to respawn. The effect is as if the player pressed the RESPAWN button in the game pause menu; the unit is killed but there is no "X was killed" message and no score adjustment.
Wouldn't this mean it would only work if Zeus is already alive?
Yes.
But I can spawn now though.
But I don't want the respawn menu.
I want to be spawned automatically.
Just disable the menu then
So you want to menu now or not?
Don't think that's possible
Why don't you just display a blackscreen with a message for none zeus players
What would that fulfil?
I mean, they would still spawn then?
Because that's what I try to avoid, the players spawning on the location the playable entities are placed.
Zeus has to place a spawn first. Like normally.
Like in the vanilla zeus missions?
YES! :D
I want to make my scenario as true to that as possible. But specifically made for IFA3.
What do you think would be the easiest way to achive that?
Having the player 'stuck' in the spawn menu till Zeus places a spawn point.
And Zeus not being able to get out of Zeus mode.
Is that not shielded off?
no
Then that's one of the few games in existence nowadays.
Where can I find those missions?
arma3 root folder
C:\Program Files (x86)\Steam\steamapps\common\Arma 3\Curator\Addons
missions_f....
So I got to extract those?
Well...
I find multiple things pointing to Armaholic...
But that's dead of course.
Where can I find a tool for it?
All the results go to armaholic.
Download arma 3 tools from steam
Workshop?
Ah found it.
and use the tool BankRev
Seems like an interesting tool altogether.
Failed to convert one file...
I might know why.
Now it worked.
Thanks, will look into it tomorrow.
Will make a back-up and start over with the map as it is.
So I don't need to replace all the items I placed.
Plus, I can learn from this for sure, see how all the ends connect together.
Hmmm... Not totally sqf proficient (< understatement), and trying to put together a simple script I can drop in an init as zeus to create a periodic area denial mission by enemy artillery as long as the object is there. Trying this utilizing an invisible helipad, and crashed arma - obvious I'm missing something. What should I look at to fix this? Thanks
_shell1 = "Sh_120_HE" createVehicle [((getPos _this select 0)+random [-100,0,100]),((getPos _this select 1)+random [-100,0,100]), 0];
_shell1 SetDamage 1;
sleep random [0.5,1,1.5];
_shell2 = "Sh_120_HE" createVehicle [((getPos _this select 0)+random [-100,0,100]),((getPos _this select 1)+random [-100,0,100]), 0];
_shell2 SetDamage 1;
sleep random [120,140,180];
};```
use alt syntax of getPos to define a random position to get rid of all that jankiness
also, don't use unit init and use []spawn {}
As in distance/heading and give those randoms of 0-100 and β°-359,respectively?
yes
thanks
OBJECT removeMagazine ARRAY exists, but does nothing? π€
`Result:
0.0356 ms
Cycles:
10000/10000
Code:
player removeMagazine []`
interesting, some random overload π
Grrr... Have been trying the createVehicle alternate syntax:
while {true} do {
_shell1 = createVehicle ["Sh_120_HE", getPos _this, [], 100, 'NONE'];
_shell1 SetDamage 1;
sleep random [6,8,10];
};
}; ```
But my getPos is throwing an error : "Type Array, Expected object, location"
(I've also tried with parens around (getPos _this), and separating it out in to [(getPos _this select 0), ...]
[] spawn {
replace [] with the object you want _this to be
ok so, if you are familiar with the save loadout script when walking away from the BIS arsenal, now i have a problem, how do i...get a similar script which works on ace arsenal? π€
cuz im an idiot...
nvm
found it
thx reddit
for those who's wondering
paste this into initPlayerLocal
`_id = ["ace_arsenal_displayClosed", {
player setVariable["loadout", getUnitLoadout player];
hint "Selected gear saved!"
}] call CBA_fnc_addEventHandler;`
wat?
you only need 1 event handler
idk i found it on reddit, it works(?)
should;ve stated i have no idea what the hell im doing
It works but it's adding duplicate EHs
OH I COPY AND PASTED IT WRONG
I mean no need for onPlayerKilled and onPlayerRespawn
so random question, is there a way to make the Airstrike module to only attack a point selected by the unit with the radio menu?
so it isnt a set point it will attack
so they can freely choose where the airstrike will happen?
im only getting into the whole scripting recently so i have no idea
there are support modules that you can use instead (not sure if they do what that "Airstrike module" does)
if you want to use that module, you have to create a comms menu with a custom script that creates the module
dammit
have you even looked into support modules?
they appear in the menu already
oh so you just place the module and it shows up?
I can't tell you how it works off the top of my head. you can google it
like arma support module
hey short question is there any way to get the way how the aim assist of the Praetorian 1C works? wants to improve this one by make the preaim visible for incoming missiles and stuff
it has an invisible AI gunner
Apologies for reposting what I posted in #arma3_scenario , I remembered that this channel exists and is more appropriate
Could anyone help me figure out multiplayer compatibility for one of my actions?
My issue is how to make sure that the action executes code remotely upon its completion
https://pastebin.com/mqxzDCp3
Basically, although clients have the action available to them, them completing it has no effect.
when you change channels, remove from the source otherwise it is still crossposting @quaint ivy
can someone help me
_teleport "_this select 0;
_caller " _this select 1;
_caller setPos (getPos (mine));
hint "Welcome"
i am struggling to find out why this script dosent work
it's wrong
if you simply add syntax highlighting you'll see why (partly)
!code
```sqf
// your code here
hint "good!";
```
β
// your code here
hint "good!";
Is there a way too give pilots access to Pylons without the truck or Zeus?
is there something similar to x++?
_c = _c + 1;```
yeah just wondered if it could get shorter
sadly no
_c=_c+1;
there, shorter
c=c+1
or _=_+1
if you use it more than once make a function
// fn_countUp.sqf
params ["_x"];
_x=_x+1
_=_-_;

Hey, so quick question
Do .Arma3Profile files support preprocessor commands like #include?
does anyone know how i can make gun runs with the support module?
How do I get the text to say on the screen longer??? I am using [] Spawn {[str ("Shanoa"), str("August 21, 2021"), str("07:35")] spawn BIS_fnc_infoText,;}
tried sleep command but it creates an error in the script
There is no way I'm afraid the delay is hardcoded in the function
but you can create your own function based on that function
with adjusted timings
is https://community.bistudio.com/wiki/setAnimSpeedCoef still working?
whenever I use it it only seems to work for about 1 second and then it returns to default
is there any way to lock it?
How'd ya using it?
just running from an sqf
need to slightly slow down movement speed and this seems to be what I need
I've tried just dumping it in a while do loop with no sleep and it works
but I don't think its a very performance friendly way
I mean the actual code
Uh... and Mods? Seems like a conflict
mhm could be
I did have some problems with other animation related things
I guess I could just use the while do loop
its just for a short scene
Hi guys is there any way I can tweak this script so it could also spawn a helicopter or the occasional apc?
Ps.. I'm on mobile sorry for the formatting
_Spawntarget = squadleader;
_Spawndistance = 200;
_Deletedistance = 1000;
_Spawngroups = [
(configfile ΛΛ "CfgGroups" ΛΛ "East" ΛΛ "rhsgref_faction_chdkz" ΛΛ "rhsgref_group_chdkz_insurgents_infantry" ΛΛ "rhsgref_group_chdkz_infantry_patrol"),
(configfile ΛΛ "CfgGroups" ΛΛ "East" ΛΛ "rhsgref_faction_chdkz" ΛΛ "rhsgref_group_chdkz_insurgents_infantry" ΛΛ "rhsgref_group_chdkz_infantry_mg"),
(configfile ΛΛ "CfgGroups" ΛΛ "East" ΛΛ "rhsgref_faction_chdkz" ΛΛ "rhsgref_group_chdkz_insurgents_infantry" ΛΛ "rhsgref_group_chdkz_infantry_at"),
(configfile ΛΛ "CfgGroups" ΛΛ "East" ΛΛ "rhsgref_faction_chdkz" ΛΛ "rhsgref_group_chdkz_insurgents_infantry" ΛΛ "rhsgref_group_chdkz_insurgents_squad")
];
_Spawnmaxdelay =40;
_Spawnavgdelay =50;
_Spawnmindelay =60;
_Spawnside = OPFOR;
_AISkills = [];
while {true} do {
_SpawnPosistion = _Spawntarget getRelPos [_Spawndistance, round random 360];
_NewGroup = [_SpawnPosistion, _Spawnside , _Spawngroups select (floor (random (count _Spawngroups)))] call BIS_fnc_spawnGroup;
_NewGroup setVariable ["spawned",true];
{
_EditUnit = _x;
{_EditUnit setSkill _x;} forEach _AISkills;
} forEach units _NewGroup;
_NewGroup setBehaviour "AWARE";
_NewGroup setSpeedMode "FULL";
_NewGroup setCombatMode "RED";
_GroupWayPoint = _NewGroup addWaypoint [position _Spawntarget, 0];
_GroupWayPoint setWaypointType "MOVE";
{
_EditGroup = _x;
for "_i" from count waypoints _EditGroup - 1 to 0 step -1 do { deleteWaypoint [_EditGroup, _i];};
_NewGroupWayPoint = _EditGroup addWaypoint [position _Spawntarget, 0];
_NewGroupWayPoint setWaypointType "MOVE";
{
if (_Spawntarget distance _xΛ_Deletedistance) then {deleteVehicle _x;};
} forEach units _EditGroup;
} foreach (allGroups select {side _x == _Spawnside && (_x getVariable ["spawned",true])});
sleep (random [_Spawnmindelay,_Spawnavgdelay,_Spawnmaxdelay]);
};```
Is there a way where I can put arrays of classnames instead of cfgGroup paths?
So I can customise my groups that have a chance of spawning
_Spawngroups select (floor (random (count _Spawngroups))) use selectRandom
{
_EditUnit = _x;
{_EditUnit setSkill _x;} forEach _AISkills;
} forEach units _NewGroup;
Does this even work?
i get no errors when i click preview
oh i added them in afterwards
I totally missed the foreach inside the foreach
so instead of _Spawngroups select (floor (random (count _Spawngroups)))
put _Spawngroups selectRandom ?
check doc
will do
for "_i" from count waypoints _EditGroup - 1 to 0 step -1 do { deleteWaypoint [_EditGroup, _i];};
there is awaypointscommand
i must state that i didnt write the script lol
Yeah, but you are using it now
i aint got a clue lol
thats why i let 3den enhanced do a lot of it for me π
_Spawngroups selectRandom [];
but what goes inside the []
selectRandom is unary
there is nothing on the left
About your initial question. It'd probably just add the vehicle class name to _spawngroups
and add a type check
how do people learn this stuff lol
while {true} do {
_SpawnPosistion = _Spawntarget getRelPos [_Spawndistance, round random 360];
_thingToSpawn = selectRandom _spawnGroups;
if (_thingToSpawn isEqualType "") then
{
createVehicle....
} else
{
_NewGroup = [_SpawnPosistion, _Spawnside , _Spawngroups select (floor (random (count _Spawngroups)))] call BIS_fnc_spawnGroup;
};
Does this help?
my brain just farted but ill do what i can
appreciate the help
so _thingtospawn is a classname?
Depends, it can also be a group config, hence the type check

dont worry mate honestly π
it would be too much of a pain in the a.. to teach me i do apologise
I am not teaching anyway. Gonna read up on a few things if you really wanna learn it.
A good start would be that script you are trying to modify
yeah thats what i thought
anyway, give a few minutes. I will see what I can come up with
@idle jungle
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
There are a few issues with this script
- Vehicles will not be deleted
- There is no upper limit for how many groups can be spawned
ah no worries, i plan to use it like a defence type thing so the players wont be moving anyway
https://community.bistudio.com/wiki/hintC
Doesn't seem to work, do I need a trigger first?
I put it in the 'initserver.sqf'.
I suppose it doesn't work in very first second of mission
Nevermind. I think I may fixed it.
Hopefully. lol
Nope
if (isNull getAssignedCuratorLogic player) then {
setPlayerRespawnTime 0;
//Message to Zeus
[] spawn {
sleep 2;
"Instructions" hintC [
"TEXT"
];
};
};
Doesn't seem to work.
initServer, checking playerβ¦ there might be an issue here π
in SP yeah
I run it as a local MP server
But it also work on my online one.
I don't get the message either when running it on the local side.
if (isNull getAssignedCuratorLogic player) then {
[] spawn {sleep 2; hintC "Press W to move forward"; };
};
I run this on the local side.
But nothing.
It's not done yet of course, but I first want it to show up. 
I do have another idea as this is a workaround.
Can I use a script that would kill Zeus if it's not occupied by a player, so to reset it basically?
waitUntil { not isNull player };
[] spawn {
sleep 2;
if (isNull getAssignedCuratorLogic player) then
{
private _sentence = ["hah! not isNull", "Press W to move forward"] select isNull getAssignedCuratorLogic player;
hintC _sentence;
};
};
Does anyone know if I must whitelist my custom functions in CfgRemoteExec before I can use them with remoteExec?
Thansk, will try it out soon.
The scripting is confusing me. I still try to understand it. Although I start to more and more bit by bit each day.
only if you have filters active, otherwise not
Good day. Is there a way to find out in scripts if '#reset' server command was called or server was restarted in some other way (#restartserver or hard reset). I have an extension which Init must be called only after server process was restarted and not in any other case. Maybe some init scripts are called only once on server startup?
#restart?
scripting-wise, I don't think so
but why?
Why using it? Well.. There's a need to restart a server once in a while, and sometimes simple mission restart is enough? Any better way to do this?
Also, thanks for the answer. Will bicycle something.
I mean, why do you want to detect it π
Because Extdb3 extension breaks for me when script is trying to establish connection after mission restart. And does not break when same thing happens after 'bigger' restart.
oh okay
hello, how do color work on dialog ?
depends on what you use
- through config, see the
color[] =argument (#arma3_gui) - through scripting, see
<t color="#FF00FF">MyManlyText</t>and Structured Text
r g b a iirc
all right tysm !
yw ^^
Try CfgFunctions preStart
How could I convert this trigger On Activation to call a custom function instead of the script?
Condition
call{{_x iskindof "plane" && speed _x < 1} count thislist > 0 }
On Activation
call{_handle = [(thisList select 0)] execVM "SOG\utility\ServicePlane.sqf";}
My Function: ```sqf
SOGServiceVehicle = {
params ["_vehKind"];
private ["_veh", "_vehType"];
_veh = _this select 0;
_vehType = getText(configFile>>"CfgVehicles">>typeOf _veh>>"DisplayName");
if ((_veh isKindOf _vehKind) && (driver _veh == player)) exitWith {
_veh sidechat format ["Servicing %1.", _vehType];
_veh setFuel 0;
sleep 3;
_veh setVehicleAmmo 1;
_veh sidechat format ["%1 Rearmed.", _vehType];
sleep 3;
_veh setDamage 0;
_veh sidechat format ["%1 Repaired.", _vehType];
sleep 3;
_veh setFuel 1;
_veh sidechat format ["%1 Refueled.", _vehType];
sleep 2;
_veh sidechat format ["Service Complete", _vehType];
};
};
Called Via: ```sqf
["plane"] call SOGServiceVehicle;
You can declare your function in a CfgFunctions
@winter rose I've created the function and packed it into a pbo file, I'm now trying to figure out how to replace the On Activation ```sqf
call{_handle = [(thisList select 0)] execVM "SOG\utility\ServicePlane.sqf";}
With ```sqf
["plane"] call SOGServiceVehicle;
It looks as if the On Activation takes the list that was created by the Condition, then executes the ServicePlane.sqf script.
params ["_vehKind"];
private ["_veh", "_vehType"];
_veh = _this select 0;
??
@cosmic lichen I'm presuming that _veh is being taken from the list that was created in the Condition of the trigger. I don't believe I converted it correctly
I have 3 different script all of which do the same thing, just one line that is different in each of the scripts. ```sqf
((_veh isKindOf "plane") && (driver _veh == player))
```sqf
((_veh isKindOf "helicopter") && (driver _veh == player))
((_veh isKindOf "landVehilce") && (driver _veh == player))
Here's one of the original scripts: ```sqf
private ["_veh","_vehType"];
_veh = _this select 0;
_vehType = getText(configFile>>"CfgVehicles">>typeOf _veh>>"DisplayName");
if ((_veh isKindOf "landvehicle") && (driver _veh == player)) exitWith {
_veh sidechat format ["Servicing %1.", _vehType];
_veh setFuel 0;
sleep 3;
_veh setVehicleAmmo 1;
_veh sidechat format ["%1 Rearmed.", _vehType];
sleep 3;
_veh setDamage 0;
_veh sidechat format ["%1 Repaired.", _vehType];
sleep 3;
_veh setFuel 1;
_veh sidechat format ["%1 Refueled.", _vehType];
sleep 2;
_veh sidechat format ["Service Complete", _vehType];
};
Hey, I'm having tons of trouble with actions being performed by clients. The following is a block of code that the hold action executes on start of the action
{
_caller switchMove "Acts_Accessing_Computer_Loop";
_target setObjectTextureGlobal [1,"a3\structures_f_epc\items\electronics\data\electronics_screens_laptop_device_co.paa"];
_target setObjectTextureGlobal [2,"a3\missions_f_oldman\data\img\screens\csatntb_co.paa"];
_target setObjectTextureGlobal [3,"a3\structures_f\items\electronics\data\electronics_screens_laptop_co.paa"];
systemChat "Start code being executed";
if(_target getVariable "reinforcementsCalled" == false) then {
systemChat "Remote code being called";
[_target] remoteExec ["CO_fnc_SFIntelHackStart",2];
_target setVariable ["reinforcementsCalled", true];
};
}```
I would really appreciate any help
action works fine if I (the host) perform it, but if one of the clients does it, nothing happens
actually, the block is executed and the clients do get the system message, but the function that needs to be called doesn't
Does anyone know if initPlayerLocal.sqf fires on Headless Client, or only on player client?
is that a public variable?reinforcementsCalled
if not, its undefined on the client
^Try using publicVariable
That If statement does get executed because the clients can see the system message "Remote code being called"
my issue has something to do with [_target] remoteExec ["CO_fnc_SFIntelHackStart",2]; because everything else works
but that function doesnt get executed
and the function is not broken because it works if I use it trough the console or with spawn/call
it's just not working with remoteExec for some reason. In fact, like I said, it works with remoteExec if the person doing the action is also the host, just not for other clients
Headless client also runs it π
Sweet, thanks!
should
Sweet, thanks!
Hey, so another question
How many times would {} foreach [missionNamespace] execute? Trying to improve/understand some code I wrote a while back
Would it execute once for the missionNamesspace itself, or once for everything in missionNamespace?
Ah right gotcha
but why? 
I was stupid, you were right
thanks
Nah, just sorting something with arsenal script and I realized I did it in a completely backwards way and was trying to figure out why
So literally no good reason π
Also, in another question, does anyone know if isRemoteExecuted will mark as true/false from 3den Object Init?
Basically I want to execute code from object init, but only on client machine
Instead of having it execute every time a player joins
same difference
I meant
In MP, Object Init fires every time client connects, right?
Well, basically I have an object with code I want to only execute once on client machine
Where the result is local to client machine
Wait
Nvm
Next question- BIS_fnc_holdActionAdd only has local effect by default, right? π
yep
ye
ze wiki page says so
Gotcha, just wanted to make sure
Object init fires only for the connecting machine, not for all machines on every JIP.
Afaik
Correct
But it gets fired on each connected machine on startup
Hence why the "be sure about locality/usage"
setFace is cool, setDamage is not
Ah gotcha
Next question- I'm working on making a switch-do block, is it possible to use case to evaluate nil?
Or should I just use default?
Also, am I able to use a switch-do block to get a return value, e.g. _result = switch (_var) do {[...]};?
Ah wait nvm
Okay, so very whack question
Is it possible to make a date evaluation in preprocessor command? E.g. if the date is before a current date, a certain part of the config will not load
I don't think it is but I wanted to ask anyhow
no
there are game version macros
if it matters
Yeah, darn
are you trying to make a backward compat time machine forward compat?
Nah
if it's a script you can use scripting commands to check the date
it's a bit slower than a macro obviously
Nah, basically just adding some content to a mod but don't want it to be seen until a certain date, sort of like preloading a game
Pretty sure it's not possible with preprocessor
update the mod then? 
I know, but we need to balance giving people enough time to DL the mod and not being too early that people will try and peek at stuff
update the mod then (when you want new stuff to appear)
they won't have anything when it's not there
Yeah I know, just wanted to see if we'd be able to give people extra time to download ahead of the release date
Some of our guys have really slow/sporadic wi-fi so we usually update mods well in advance of when they're needed
break the mod into chunks
steam will only download the diff
Yeah, it's in a new PBO so hopefully will minimize time to only essentials
question about creating a unit inside a vehicle ("O_UAV_AI"). Is it possible to have the option to control that AI from a UavTerminal?
you can only control vehicles that are uav (isUAV = 1)
you can create your own display (or use the vanilla one). it's not anything special
is it possible to write into the map text fields at the top? like in arma 2 you had a "conversation log"
what are some keywords for commands there
create your own control
I assume that config value can't be set by scripting?
no
is there no easier way to write to the briefing tab f.e. on runtime?
yes
Well I guess you'd have to be a bit very creative with that
I mean like, to evaluate the current date against a set date via preprocessor
why don't we have a unix timestamp π€
Yes. Thats what I mean too
briefing tab or custom text?
for briefing tab you can use diary records
i think setDiarayRecordText is what i want
Okay, just wanted to make sure π
ideally i want my own tab but its not super important
you can
under briefing
@tidal ferry I'll see about adding UTC Timestamp in 2.06. I apparently forgot that
thx will check it out
ah cool thats far easier than i expected
Oh, fantastic! Thanks!
