#arma3_scripting
1 messages Β· Page 567 of 1
What's the a,b sizes in meters of map grid (aka mapGridPosition). Is it static? I want to create a rectangular marker that fully fits one grid. Cheers.
From 32 to 33 it would be 1000m
The size of grids on the map however, depends on the zoom level
And on the map itself
Largest zoom => Grid size 100, smallest zoom grid size 1000m
@cunning crown Oh does it? Didn't know that.
In CfgWorlds >> WorldName >> Grid you have the different zoom level and the cell size
Yeah tanks, found some math in BIS_fnc_gridToPos
Hey guys, how does: call compile preprocessFileLineNumbers "EC_BWA3_Units.sqf"; not exist within VSCode? https://gyazo.com/a5a6e9f31e1cb73eec62aa2ea9625026
uh... what
Apparently, EC_BWA3_Units.sqf doesn't exist. By SQFLint.
Okay
SQF-VM is our savior βοΈ
Hm setPos does altitude as well, no?
Because I have this script
[
bunker_exit,
"Enter bunker",
"\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa",
"\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa",
"_this distance _target < 3",
"_caller distance _target < 3",
{},
{},
{ player setPos(getPos (bunker_enter))},
{},
[],
5,
0,
true,
false
] remoteExec ["BIS_fnc_holdActionAdd", 0, bunker_enter];
And its only doing position without altitude
what is bunker_enter?
@oblique arrow take a look here: https://community.bistudio.com/wiki/Position
this should explain how things work
Bunker_enter is an object
yep, alright. Just made sure you wren't using markers
the above biki entry should get you sorted out
Why does the second line of: ```sqf
diag_log format ["TEST1 : %1 TEST2 : %2",_itemsneeded,_amountsneeded];
diag_log format ["TEST1 : %1 TEST2 : %2",_itemsneeded pushBack "test",_amountsneeded pushBack 1];
return this? ```sqf
"TEST1 : [""Wood""] TEST2 : [10]"
"TEST1 : 1 TEST2 : 1"
Is it a bug or intended behavior?
https://community.bistudio.com/wiki/pushBack
Return Value: Number - index of inserted element
@tender fossil
@winter rose I feel so stupid right now... ahaha
Good π hahaha np
@winter rose Hey, good morning. I got some progress and stuff with my unitPlay project - I found some amazing pilots to fly some paths for me
however currently I'm still using the original method I saw on a youtube tutorial, so it only works once. (which is a problem)
here's my current setup: radio trigger that has rec = [] spawn h1; for activation (heli name is hm1)
and in h1.sqf:
h1 =[[0,[3614.00.190832,0.62 more numbers and stuff 7668,-0.754729],[368.046,175.288,11.4204]]];
[hm1, h1] spawn BIS_fnc_Unitplay;
And uh I think I'm going to revise my original idea to use only a radio trigger to spawn in a wave and have the heli delete itself when it dies (I figured that part but)
How do you spawn in a heli and do unitplay at once?
by trigger? you can createVehicle and moveInDriver
Guys I am having trouble with spawning a working TFAR radio on the ground, currently I spawn a radio in a weaponholder but I can't use it when I pick it up
Does anyone have some advice on how to make the radio work
cant equip it
So what happens is, I spawn a weaponholder, put an object in it with the name of one of the radios and then when try to pick it up and equip it, it just doesn't let me
did you spawn the right item?
So uh how do you use a radio trigger to run code in an sqf file
@faint fossil in the trigger, use execVM
but indeed, if you can do it another way, it's good too
yeah, sorry for skirting the question
thanks! I'll try addaction as well
yep
theres also the imo fancier hold action 
This is how I spawn it in@ebon citrus : Radio = "TFAR_anprc152"; ground2 = "GroundWeaponHolder" createVehicle getpos player; ground2 addWeaponCargoGlobal [Radio,1]; ground2 setPos [getPos player select 0,getPos player select 1 ,0.00];
player assignItem "TFAR_anprc152";
see if that works
like after you have picked up the radio
The thing only is, is that my endgoal is to have a loudspeaker system with a lot of spawned radios. Players shouldn't be able to pick them up. I want them to work more or less as a static radio but placeable in the eden editor
and you want them to transmit voice of a specific frequency?
yeah that is the original plan
you can make the object non-interactable if you set it's health to 0
you need to static radio initialize them anyway
so try to setdamage 1 on the groundweaponholder
just placing a radio in a weapon holder doesn't work
radios need to be initialized, and get a unique ID
if you have TFAR 1.0 you can also just pre-place them in 3DEN, instead of doing it manually via script
I tried however they despawned when spawned far from the players during my testing
despawned?
yeah or didn't spawned at all
do you have some sort of cleanup script?
so uh what am I doing wrong? I'm putting this in init.sqf in the hopes that it'll add a scroll option:
player addAction ["Start path", {
private _helithing1 = [[1000, 1000, 1000], 180, "B_Heli_Light_01_armed_F", WEST] call bis_fnc_spawnvehicle;
private _wpdata1 = [PATH GOES HERE];
[(_helithing1 select 0), _wpdata] spawn BIS_fnc_Unitplay;
_helithing1 addEventHandler ["Killed", {
params ["_unit", "_killer", "_instigator", "_useEffects"];
deleteVehicle _unit;
}];
}];
There are already TFAR classes, that are a ground holder with a weapon. Which you can just createVehicle, instead of filling a ground holder manually @livid musk
@ebon citrus Looks like im running wreckManagerMode = 3;
I'll have a look into those then Dedmen
uh in the context of this thing:
this addAction ["Start 5", {
helithing5 = [[1000, 1000, 1000], 180, "B_Heli_Light_01_armed_F", WEST] call bis_fnc_spawnvehicle;
wpdata5 = [very long path];
[(helithing5 select 0), wpdata5] spawn BIS_fnc_Unitplay;
(helithing5 select 0) addEventHandler ["Killed", {
params ["_unit", "_killer", "_instigator", "_useEffects"];
deleteVehicle _unit;
}];
}];
is there way to make "very long path" a separate file so the code isn't like 20 km long?
Thanks @exotic flax! Just found the article too π
class CfgFunctions
{
class myTag
{
class myCategory
{
class myFunction {file = "my\Path\To\myFile.sqf";};
class myFunction {file = "different\Path\To\myFile.sqf";};
};
};
};
might as well just write your own cfgFunctions thing if you want that
Is there some magical thing I gotta do to change camera FOV?
tried both setcamfov and campreparefov with no luck either way
(Yes im commiting)
fixed, needed to make sure _cam cameraEffect ["internal", "back"]; was called as well as opposed to just calling switchcamera
I guessed it's probably best fitted here. For an campaign I need to have all missions as folders and have to write an config for them right? After that I just slap it together with the arma tools mod builder?
yes, switchCamera is more about units/vehicles than camera (although its page says otherwise)
Hi i need a script to make an ai unit perform an animation, i cannot seem to get it to work on my server. If the units variable name is say Matt can someone give me a clue. Many thanks in advance
@vagrant mango https://community.bistudio.com/wiki/switchMove
do also note playMove and PlayMoveNow if you want a smooth transition
Thank you π
@cosmic lichen Do believe yo utagged the wrong person π
Yeah, Discord thought it would be funny to not put the last person who posted here on top of the list. Sorry for that.
Is it possible to "recognize/identify" some terrain objects with script? Like these plants https://i.imgur.com/p3KjYNl.jpg
Is there any way if they don't have a classname?
Maybe with the 3d model?
How'd you do that
With that command: https://community.bistudio.com/wiki/getModelInfo
Thanks! It printed this: ["b_rhizophora_f.p3d","a3\vegetation_f_exp\shrub\b_rhizophora_f.p3d",false]
Now I just need to figure out a way to monitor whether there are these objects in the proximity of player π
Hmm, a quick look at the scripting commands list did not reveal anything special
Is there any command available that can check model info of an object apart from getModelInfo or createSimpleObject?
Or wait, I think I can use getModelInfo itself
is there a command that checks the steam workshop ID?
of what?
if it's mods, then that information is contained in publishedId in meta.cpp in the root folder of the mod. This is as far as i know, outside the configuration, but let me look into it
what do you need this for @marble flare? there might be an easier solution
Well, I found out there's a command nearestTerrainObjects that is a perfect fit to solve my issue
well of course it doesn't ; but you can kill an array of handles this way yes
you would have to store all your handles in an array, e.g with pushBack
but afaik there is no "get all handles" command
what makes you want to do that, though?
I get that; but why
your check would also be terminated by the hack, no?
use BattlEye and eventually passworded servers
Trying to make a script that utilizes the Vehicle Respawn module's "oldVehicle". I'm trying to get a waypoint to go to the position of oldVehicle, but every time the vehicle respawns on "Preserve" setting, the oldVehicle is teleported to 0,0,0. Any ideas on workarounds or solutions?
why is it when we spawn Huron containers, i.e. fuel, ammo, etc, on the carrier deck, they bounce? eventually they sustain damage and destroy themselves.
we place them so they can be engaged. that's the point, for repair, ammo, fuel.
for now I am trapping a special case and _asset allowDamage false.
@dreamy kestrel maybe they are spawned some cm under the bridge level, making them bounce/collapse/explode ?
So has anyone tried making a weapon that fires zeus lightning on a target or a laser designator with the same function?
Yes
Many times
Here's a joke project that fires orbital strikes
https://streamable.com/87y8q
100% vanilla
Let me know if you want the script
Hey, on my script I am trying to set an AI unit as an ace medic. what is the command for such?
@proud carbon have you tried [unit] setUnitTrait ["Medic",true];
Yes
@ebon citrus oh god that's perfect , exactly what I needed
@winter rose it is a possibility, the spawn proxies did seem a bit awkwardly placed. thanks for the suggestion.
@spark kiln you want it?
i mean, it's free, but it needs some touching up for most purposes. Drop a DM or something and i can help you get it going
_wp_2 setWaypointScript "simpleDrop.sqf";```
how would I properly put the params for the script in this line?
@noble storm https://community.bistudio.com/wiki/Waypoint
[groupName, 1] would be the first in-editor waypoint
[groupName, 2] would be the second, etc.
Thanks Grahame, that's what I needed. Guess it was a bit ambiguous.
everything is correct from what i can see
a bit weird variable naming convention, but hey, you do you
wait, you meant, how to pass parameters for the .sqf script
what an ambiguous question
@noble storm Yeah, that description could be better but it is right if not clear: The script receives the following arguments in _this variable: [group, position, target] + [the optional passed arguments]. The optional arguments are appended to the end of the return array.
good job grahame for spotting that
i cant see jack without my glasses on anymore 
it's like using a 4k display for the first time... you can never go back
LOL... I actually really did buy a new pair of glasses today π€£
i got mine a couple weeks ago
My old ones hung together with duct tape
proper harry potter stuff right there
anyone figured out the spectrum analyzer device yet? Is there new info on it for the contact dlc (not platform)?
nope I said for the contact dlc. It says speciffcally in that artilcle that that info is for the platform version.
also tried looking through the configs and functions...
filtered by configFile, Contact, EM_Interface, and got relatively little information back about how the spectrum analyzer actually works.
Well this is the scripting channel, you're better off asking in #contact_discussion or #arma3_questions
yeah, I blanketed all the channels, don't worry. thanks.
I figure I just need to be talking to someone with advanced scripting knowledge.
(which is also above my paygrade)
data is still ebo'd, so⦠all you have is in-game config access and function library
yeah I know.
That doesn't stop someone who's better than me at arma scripting from figuring it out though π
fyi, here is a list
https://community.bistudio.com/wiki/Category:Introduced_with_Arma_3_version_1.94
if you find new intel, let us know in #community_wiki so we can add to the doc
Yeah. I'd like to know who gives the ok to convert ebo to pbo... That's really what I need.
BI makes those decisions
While waiting for that to happen you can try to see how the analyzer weapon is configured and what kind of UI things are connected to it
those can be seen from the in game config viewer or possibly you can make a contact config dump
if there are any internal sqfs in work those you will have to wait for untill the ebo->pbo stuff happens
might as well say bi makes those decisions. I want to know WHO at BI makes that decision.
why? to pressure on them?
Oh yeah, I'm really going to affect them with "presssure" lol.
then why π
It's a self answering question really.
apparently not Β―_(γ)_/Β―
this is why I am asking; now given this is a discussion channel⦠maybe enlighten us?
We dont know who makes the call.
right. just thought I'd shoot from the hip.
not expecting much from discord chats, but you never know I guess.
not expecting much from discord chats
yeah, some people keep not answering π
yeah dealing with mild trolling is always fun too.
BI janitor makes those decisions, but there is a new one each week
I messaged him, he should send me the eboβpbo tonight obviously
You finally caught me. You'll have the pbo tonight. Check under your pillow when you wake up
kill me now.
At least I got the attention of the guy who wrote the article on live feeds for drones on tv screens. that was pretty cool.
if that is the real Killzone_Kid.
Nah he's an imposter, he killed the real one and took up the name but dont tell anyone about it since its a server secret 
(/s)
lulz
sorry to disappoint
what was your original message? π
well probably not something fit for public channels
woops. best to refrain indeed
mhm
never mind, this has degraded far enough.
Ok
moving on, nothing to see here
Anything other than the signal label i can get working on the platform version
It's a self answering question really.
so don't stress it Nica π
Been making a drone-jamming minigame
cool
I'm just pouring through the configFile campaign stuff to see if I can figure out what I want.
What's the bohemia stance on reusing content inside epbo's?
meh, they'll be pbos eventually.
Wrong channel to ask that question, i assume
define "reusing"
I can get the sqf's out. Not the p3d's and textures though
And it's a tedious process
you can use the functions, but technically not extract them to have them used outside of Contact I would believe
I see... better no in that case then
if you actually want to know exactly what you can and can't do, here it is: https://www.bohemia.net/community/game-content-usage-rules
Do not redistribute our games or any files extracted from it, do not reverse engineer it, do not hack it, do not create any alterations of our games.
That solves it
if you really want to use something there's a "contact us" form at the bottom of the page.
(from the link I gave above)
anyone know anything about forcing a vehicle to deploy countermeasures? i can't find much on the internet or wiki
smoke on a tank
@coarse schooner have you tried the "useWeapon" action?
On the vehicle commander
Im pretty sure i saw someone using it like that in a "auto-countermeasure"script
ohh interesting lemme try thnx
this did not work:
(vehicle player) action ["useWeapon", (vehicle player), cmdr_tank, 0];
the commander instead fired his machine gun.
changing the integer didn't do anything either perhaps a different action~~ but idk which ones actually exist or what arguments they need~~
have you checked https://community.bistudio.com/wiki/Arma_3_Actions#UseWeapon for this?
see also fire/doFire maaaybe (because they recently were useless in some (most?) cases)
private _vehicle = tank;
_vehicle action ["useWeapon", _vehicle, commander _vehicle, 5];
Did work for me
"Fire" could maybe work, dofire unlikely
With a Slammer Up; For the Marshall it the weapon index was 0
perfect heyoxe thank you
Finding the index is just a matter of testing
yea I only went up to 4 smh xD
thanks guys
Q: is _this#0 the same as saying _this select 0?
@dreamy kestrel Yes.
Have the following problem:
<-- here all params are ok
[{
params ["_veh","_group","_frompos"];
(_veh getvariable ["OT_Deployed",false]) or (_group getvariable ["OT_Ejected",false]) or ({alive _x} count units _group isEqualTo 0)
},{
params ["_veh","_group","_frompos"];
<-- and here the group is null, but others are ok.
...code;
}, [_veh,_group,_frompos]] call CBA_fnc_waitUntilAndExecute;
How it could be? What I missed?
What's the error?
As the group variable value doesn't pass, then the group is stuck. CBA functions doesn't throw any error for code inside it.
Hm... I found the issue. Seems like the condition string should be all in parentheses.
Getting an error about Local variable in Global space for this. Anything special I need to do to _blackfishVehicle, or should I just make a new variable that's global and put it there?
_wp_2 setWaypointScript "simpleDrop.sqf [_blackfishVehicle]";```
Trying to take the vehicle from BIS_fnc_spawnvehicle and pass it onto a script that'll drop out cargo
Yeah you can't pass local variables into other scripts
Alright so should I just make a global variable to pass on then?
you need to make it a global, or store it otherwise like with setVariable onto the group
Alright, thanks
What errors cause an arma spawned script to self-terminate?
So far I've noticed, a local variable is nil -> just shows error
expected object, got number -> crash
@astral dawn send code
It's a general question not related to a specific script I have
I just noticed that sometimes it terminates the script and sometimes it doesn't. There must be some rule which causes it to terminate it.
@astral dawn thread. If it's the main thread, the script crashes. If it's a spawmned thread, it keeps on wokring
well, the thread in which the error occurs in usually what crashes
ort "terminates"
If it's the main thread, the script crashes. If it's a spawmned thread, it keeps on wokring
what... no
main thread means unscheduled I assume? everything else that's not unscheduled is spawned
Not always, sometimes it keeps on working. Maybe I will just post scripts to show both behaviors here.
My advice: fix everything and nothing will error
^
So! back on topic, @astral dawn iirc sqs scripts would continue running sometimes even after error - maybe it was due to line-based scripts
but it was back in OFP, I don't remember later behaviour properly
aaand there is spam in #general_chat_arma. great.
Error handling is just non existant. I was trying to make a reasonable crash dump by logging each object I am calling a function on, and reading the last one, then making a crash dump of it.
Of course later I found out that sometimes it does not crash immediately upon error.
But will go on and crash later, on another object.
it should throw the error on the spot though
'Just make no error' is not an answer too, sorry.
@astral dawn .rpt -> Check the very first error msg that shows up, when scrolling down. JUST fix that, then recheck again.
it always depends on your usage, we need more info for a more precise answer π
Other could just be followUp Errors
I understand that Dscha. It just didn't terminate the script immediately. So I was confused. Trying to implement some error handling in SQF.
try using try-catch, that might help
how? It doesn't catch script errors
Not script error
with loads of fancy call wraps, one can archive proper error handling
As I understood from wiki
if (myObj == objNull) then { throw 'error'; }
```?
at the (heavy) cost of performance
@winter rose still pointless
the code I suppose π
usage of params + if-check for standard Var = safeside in sqf
yes, hence the "make no error first"
what is the use case @astral dawn ?
No need to overcomplicate everything all the time...
@winter rose == objNull never returns true
yeah well, let me wake up π
isNull π
a sentence I had some issues with when learning coding: "sometimes, you want the code to crash"
it is sometimes indeed pointless to continue running your script in x or y state
Use case is to get automated crash dumps in rpt when spawned thread crashes.
but doesn't the error message bring you enough info though? or use SQF-VM, or Dedmen's debugger?
unless it is for higher purpose (idk)
Not enough of course, I want more data
Like why not have a crash dump when I can easily organize it? Only problem is thread actually crashing not on first script error, which makes it more complicated.
erm
Well we have a framework with lots of objects (OOP objects) and lots of code to do lots of things to control a whole army of bots, idk why there is confusion π
Users have errors sometimes, but on our local tests with ADE enabled we couldn't really catch such error to get a proper call stack dump with ade at least.
Then it's a design problem :/
na
a user error problem
better known as the "i did nothing wrong" syndrome
Apologies I am sure there is a simple answer to this. How do I create and ACE Virtual Arsenal in an area? I want the players to walk into a room and get the scroll wheel option to open an ACE Arsenal as opposed to it being tied to a box. Many thanks in advance.
What? Are you referring to us @queen cargo ? We surely did something wrong in the code. I was hoping that dumping data could reveal what exactly.
Well aim is to have all what is needed in the rpt file (:
"did nothing wrong" said the CEO to the IT tech who tries to find out why the latest ransomware just infected the company network
This is helpful in wich way?
start working backwards from whatever caused the crash and check every variable, every method and everything else what could potentially interfere with it
start working backwards from whatever caused the crash
The issue here is, detecting and logging the crash
finding the cause once you have a log isn't the problem
diag_log everything :meme:
This is helpful in wich way?
Programs are making crash dumps for data to be analyzed later, aren't they? In which way is it helpful?
Although we can't dump local variables :(
So help is limited
logs are useful
but not the ultimate solution
biggest problem still is and always will be the inability of SQFs try catch to actually catch script engine issues π
@astral dawn That wasn't directed to you
Ok sorry!
π
Chat is asynchronous
As mentioned before: diag_log everything
Each line, checking input/ouput of files/functions/calls/commands, where you assume the problem is*:
diag_log ["scriptName","_dataName =",_data]
stuff like that
sure I have considered this option π but it will generate 100s of megabytes of data for some common code until the crash
@primal marten addAction, player inArea "markername" in condition.
Action: https://ace3mod.com/wiki/framework/arsenal-framework.html#2-access-to-ace-arsenal
@still forum thanks sir! So use the add action then "[player, player, true] call ace_arsenal_fnc_openBox"
yes
you'll have to either add the action to the player, or to the building and up its range a bit
to the building would be more efficient, not sure how reliable that'll be tho
@astral dawn
sure I have considered this option π but it will generate 100s of megabytes of data for some common code until the crash
Probably, but better having a huge pile of logs (at least for a while) where you can see Errors/Data and beeing able to fix them afterwards, than just having a crashing Server Β―_(γ)_/Β―
The problem is on the players/users side
you don't want to throw huge piles of logs at them when in 95% of plays nothing bad happens
Why not?
Also:
Just simply checking the previous .rpt's, knowing which functions are failing, add the diag_logs there, done.
How do I remove a weapon from a car?
Yes. There are many items in the car. I only need to remove 1 weapon.
Yeah, no
I can't find the commands.
You have to store all the stuff, then clear it up, then readd it
It's a missing command since... always :/
This madness
I don't like it either, but something we have to live with Β―_(γ)_/Β―
Workaround:
Store all Weapons in an Array, remove the desired weapon (by configname for example), readd it to the car.
Do developers know about the problem?
We just had that topic about 1-2 weeks
And a couple years ago too
It's a missing command since... always :/
βοΈ π¦
Maybe CBA has a function like that
Probably
it does yes
Will this problem be solved?
unlikely
I don't understand arma's inventory system, with its maybe a hundred of functions for specific item types
addItem now works for everything, weapons/items/magz right?
Yes? I dunno. Is there a wiki article which explains how to work with inventory the 2020 way?
It's because the game has been iterating for 20 years. Flashpoint didn't have attachments, then Arma 2 did, so they added the capability, so you have old commands and new commands. Heck, getUnitLoadout is super useful, but that doesn't mean they'd take items away.
Arma 2 didn't have attachments? π€
Arma 2 brought itemMap, itemGPS etc
Arma 3 brought vests/containers, attachments and finally non slot-based inventory
Didn't it? I may be getting them mixed up. Anyway, points stands, they kept on changing how things worked and added new commands, didn't get rid of the old ones
Arma 2 didn't no. You had seperate weapon classes for each configuration, seperate model each
That would have sucked.
and all that without arsenal being a thing :u
*gives pill to Dedmen* it's alriiight, it can't hurt you now. this is all in the past!
we have ragdoll now π
Sometimes I wish we didn't. π
although an "arsenal" existed since ArmA, but not the one we know
some kind of big showcase where you would unlock gear with points
ah, it was the "Armory" - my bad
I remember those ammo boxes with 100 variants of m4's. That was fun...not
Using BIS_fnc_getCfgSubClasses it is possible to retrieve a class' subclasses. It is very useful, and I would like to know if there is a similar command/function allowing to retrieve a list of attributes for a given class ? I browsed through the wiki's functions list but I didn't see anything suitable
Take a look at: https://community.bistudio.com/wiki/configProperties
oh quite interesting, should do the trick
thx !
ah heck, it returns properties in config format (smth like bin\config.bin/whatev). I'm gonna have to fiddle around with substrings and stuff
no it doesn't
thats what you get when you str a config type
just don't do that
use configName and others
was not aware of this command, configName. I'm always amazed by the amount of small, usefull commands/functions that I never had to use but which exists anyway. Thx for the tip
Hello guys i have something to ask i got Grad Peristance working atm still need to test some things out
now i want to make the list buy menu working how do i get all the weapons / items in there how do i know the class/display name.
and how can i add weapons etc from mods
@slow pollen you can use the config viewer in the EDEN editor to see the classnames of everything
Weapons, uniforms, optics etc. will be in cfgWeapons, magazines will be in cfgMagazines
how do i make random task generator?
what do you mean "task" ?
how do i make like random mission appear on map
do you already have experience with scripting already ? if I understand well what you are asking for, that's not gonna be easy to explain from scratch...
Is there a current fix for the floating above chairs?
The one with acex fix pretty much broke after the jan. update
sounds like something some mod does so you may need to ask the mod makers
well depending what mod it is, its makers might be here or you need to reach them wherever they have a contact point, their own discord, BI forums etc
@alpine ledge So can i copy and paste it or is it a bit more work
you'll need to copypaste them individually, but they should all be in the same location roughly so it's not too much effort
i have a question ? i have created a script for bring an helicopter and unload the troops in but when i set the "TR UNLOAD" the helicopter come to the point but don't unload anything so anyone know why ?
ah cool thank you
@faint oasis have you treid this? https://forums.bohemia.net/forums/topic/167810-heli-scripted-waypoints-tr-unload-getout-not-working/?do=findComment&comment=3079344
@ebon citrus thx and i don't have tried this. I will try it but i don't understand because i don't put the waypoint on the vehicle i put it on the group.
_wp1 =_new_group1 addWaypoint [_landing_pos, 0];
_wp1 setWaypointType "TR UNLOAD";
the target group of TR UNLOAD is the vehicle crew
NOT the units you want to unload
The group will move to the waypoint (spatial or object), where any units from other groups who are in cargo spaces of the original group's vehicles will disembark.
yes i'm sorry i don't have post all of the script but the unit who is crew of the helicopter is the new_group1 and the unit to unload is new_group2
ok i will test it
@ebon citrus yes but when i add (driver _new_vehicle) addWaypoint [_landing_pos, 0];
i have an error
because we need a group
and if i add group driver _new_vehicle it's same of "_wp1 =_new_group1 addWaypoint [_landing_pos, 0];"

so i don't know how to do that
yeah, the addwaypoint takes a group
have you tried setting the driver of the vehicle as the commander?
let me fire up arma 3
does the helicopter land?
could it be that there is no room to land?
no worries
i mean, one way is to just "land" the helicopter and then force the gorup outsiode it to get out
but that's sort of hacky
yes i have do that
i have create a scripted waypoint for land my helicopter
he worked but my helicopter when he is on the ground go up and the unit get out in the air
so i will remove all of the waypoint when my helicopter is on the ground but after that my helicopter shutoff his engine so i will add ""Engine on""
but i don't understand why bohemia doesn't add this feature and the land feature because we need to create a scripted waypoint
yeah, i see what you mean now
HOLD
@faint oasis this one work for me without issue :
wp = (group (driver this)) addWaypoint [getPosATL m_0, 0];
wp setWaypointType "TR UNLOAD";
when ia dded it to the init of the vehicle
jsut make sure that the object m_0 is a helipad(invisible)
the TR UNLOAD favors the closest helipad
oh ok
so you want to spawn an invisible helipad nearby where the helicopter will land
i will test it
hello, looking for a reasonable way to calculate breathing rate given fatigue/stamina.
starting with, I suppose, fatigue/stamina comprehension, i.e. what those numbers mean.
Would be helpful to know "out of how many seconds", not just, "seconds until depletion". In order to gauge relative windedness.
or is it feasible to ask for the [0..1] interval from fatigue?
Hey y'all,
Would someone have tips for the setObjectTextureGlobal command?
I have used it on the User Texture object for a .jpg . This displays fine in singleplayer, but in multiplayer games, the texture quickly flashes, then disappears. Does this sound familiar to anyone?
how do you execute the code in MP?
Nope. I retexture my UGVs with a Russian camo and it works fine in MP
Like this in the spawner for UAVs and UGVs: sqf if (_vehicle isKindOf "LandVehicle") then { _vehicle setObjectTextureGlobal [0, "x\addons\EpochZMod\data\UGV.paa"]; _vehicle setObjectTextureGlobal [2, "x\addons\EpochZMod\data\UGV.paa"]; _vehicle removeMagazinesTurret ["96Rnd_40mm_G_belt",[0]]; };
Any tips for smoothing out unitplay movements in helicopters on low player count servers? Everything I find through the google machine is posts from 2015 saying that unitcapture and unitplay dont work at all in MP... but it does.
Were talking like 6-10 player coop mission hosted on a dedicated server.
@jagged trout https://community.bistudio.com/wiki/BIS_fnc_UnitCapture
Set the fps parameter higher
I personally cannot see jitter beyond 34
Cool, I was thinking that but figured I'd asked before re-recording.
I think I recorded at 20, default.
I dont know about the traffic intensity of unitplay though
@acoustic abyss you did put it in the init field, didn't you?
Why do some anims work only with switchMove, and not with playMove(Now)?
Because playMove needs to have transitions configured
So if there's no smooth transition from current anim to played it won't work.
@winter rose it's an external addaction script. Trying to get a kind of slideshow to work, without mod dependencies.
hmm, it should work then
see the notes on https://community.bistudio.com/wiki/setObjectTextureGlobal , but you apparently don't fall into said traps
see notes about material though
Hello!
We have a problems with speed in vehicles. For some players (Very limited amount) the speed of the vehicle is like in "Mph" and for the rest is not. We have some speed radars and theese people get their fine at 50 km/h when normal people get it at 80km/h If i measure the speed with a script, its ok. If i remoteexec the vehicle speed from driver to me, its ok... ANy clue?
Your script is broken; Arma 3 speed is in km/h and the velocity in m/s
Maybe that you have a modded server and user can select in which unit the speed is displayed and you're script use these Β―_(γ)_/Β―
But arma 3 has only km/h support :/
script plz
Maybe that you have a modded server Speed trap... hmm... probably Life server
But if we see the script then we should be easily able to spot the problem
useImperialSystem=0; in <profileName>.Arma3Profile
Well, I did not know that that existed...
Let me check user profile
anyway, script - because just that shouldn't do anything if the script is, well, well done
Sounds like the player playing the cop has imperial units but the rules on speeding are only presented in metric so they can't work out when to give out a speeding violation π€·
Rather than a broken script
but imperial units option only impacts UI, not speed command output
But the user will presumably be presented with mph with that setting ... For some players (Very limited amount) the speed of the vehicle is like in "Mph" and for the rest is not
But seeing the script would confirm
We have some speed radars and theese people get their fine at 50 km/h when normal people get it at 80km/h
it's this part that I worry about
I assume being Life they chase the perp and ticket them... it's what they do
if(_speed < 30) exitWith {};
if(_speed > 50) then {...};
...
Not too much to see there
Waiting for the user still
are you obtaining _speed with the speed command, or calculating with velocity ?
Β―_(γ)_/Β―
That pasted snippet is useles, it gives no context where the value comes from. π
vehicle speed from driver
@minor lance
With
speed objectpatent player
why are you using objectparent and not vehicle?
It doesn't matter that he's using objectparent, it's good
Just make sure you check if it's null @minor lance
hmm, perhaps this is too fancy for A3 to include/code generate?
#define COMPILE_FINAL_LOCALE_FUNC(parent, children, name) MY_prefix_##name = compileFinal preprocessFileLineNumbers "my\prefix\##parent##\##children##\##name##.sqf"
which in practical usage, something like this:
COMPILE_FINAL_LOCALE_FUNC(shared, functions, fnc_test);
Which, if I understand the preprocessor docs, I think, should yield something like MY_prefix_fnc_test compiled from "my\prefix\shared\functions\fnc_test.sqf", should it not? However, an extra space is being injected somehow, i.e. MY_prefix_ fnc_test, contrary to the docs.
What am I missing?
an extra space is being injected somehow
...(parent, children, name)...
^ ^Here are your extra spaces;
Yup
seriously? okay, wow. thanks.
quite an inclusive interpretation of the macro params...
You can try sqf-vm to debug stuff like that
Will be much easier then running the game everytime to test you ist define π
https://forums.bohemia.net/forums/topic/210118-sqf-vm-an-sqf-emulator/
SQF-VM The SQF emulator A fully working, open-source Virtual Machine for the scripting language of the ArmA Games. Links GitHub Repository Discord Invite Discord Bot Authorization Panel (for adding to your server) FAQ How to use this thing? To start using the SQF-VM, you just...
thanks, I'll give that a looksee. anything I can do to up my game, so to say.
hmm, A3 does not seem to like includes within the scope of a class ... {}, in particular class CfgSounds { ... }, drops right off my screen when I do that.
If I'm having some code that isn't having the desired effect (or any effect it seems) when I execute it, but it is proven to work on many other machines/players, and additionally doesn't throw up any errors in the rpt, whats the best way to approach an issue like this?
3 does not seem to like includes within the scope of a class ... {}
doesn't make much sense, the preprocessor doesn't know what a "class" is
got 'er sorted.
Hi, how can I delete a Unit that I created?
Ex, I used "some_unit_name" createUnit [position some_position, group some_group];
"type" createUnit ... doesn't return anything
Huh, like this?
_pos = getpos someloc;
test = "some_unit_name" createUnit [_pos, _group];```
as in 'test'?
"type" createUnit ... doesn't return anything
Huh it doesn't? Just read up on the site. hm then what would be the best way to go about spawning an AI and deleting an AI directly from a script?
use the main syntax that returns the unit:
// group createUnit [type, position, markers, placement, special]
_unit = group player createUnit ["B_RangeMaster_F", position player, [], 0, "FORM"];
@astral carbon
Gotcha, thanks man
Hmm
_pos = getpos scp173loc;
_scpGroup = creategroup east;
scp_173 = group _scpGroup createUnit ["O_SCP_173", position _pos, [], 0, "FORM"];```
Any idea on why that doesn't actually work?
The error is something like, it expects an object - not a group (line 3)
didn't notice that
I'll try that
Error position (type array), expected Object,Location
Yeah, you're trying to get position of position array
Sorry to ask again, I'll try to simplify my question from earlier I think I worded it in a complex way:
How should I debug code that isn't working but isn't throwing up errors in the rpt?
Huh thanks guys, it works.
Well, you need to debug it... Depending on what it is.
Run it line by line.
Try running in scheduled so it errors on nils.
There's no universal way.
Okay right,
so I should try each of the parts step by step
Hm so I can't use deleteVehicle on the main syntax that "returns the unit". Nothing happens (I use deleteVehicle scp_173 in this case)
Actually I lied, appreciate it everyone!
How can I check if a player is in a trigger after sleeping for a few seconds? I found out player inList is a thing that you can put inside the condition but I need to put it inside the on activation or smth. some sort of wait x seconds, check if InList, then whatever. Not sure if that's possible. I can't let this trigger detect if you're in the list right away as I need to give them the ability to run away before any action happens.
You cant sleep within the trigger activation field, if i recall correctly. You'll have to spawn another task
Hello, I need a way to get the player's looking directional vector for a breathing service. The breathe itself is working, but I want the breathing to be oriented in that vector.
eyeDirection is probably the best you can get at the moment
the wiki page does has some examples which could get some better results (to also get vertical direction)
great thank you.
Okay, so eyeDirection is interesting, problem is, getRelPos is working from the object out, and does not take a 3D vector.
literally flow calculation something like this, private _flow = (getPosASL _proxy vectorFromTo (_proxy getRelPos [10, 90])) vectorMultiply 0.5. This is always perpendicular to the player's orientation. Not where his head is turned.
which itself may need a slight adjustment, where the _proxy object is attached in the first place when the head is turned.
Actually, the key is here I think... that is always out from the mouth... _proxy attachTo [player, [0, 0.1, 0], "head"], which I think is a lot simpler than I had feared.
Only problem with attachTo head is that it won't rotate based on the head movements (it's basically a static proxy to indicate where the head is relative to the body).
guess something like this is what you're looking for
_proxy = "anything you want";
onEachFrame {
// get player head position
_head = ASLToAGL eyePos player;
// get vector 1m from head
_vector = (_beg vectorAdd (eyeDirection player vectorMultiply 1));
// set proxy at vector
_proxy setPosASL _vector;
};
if it's breath, you probably dont want the particle effect to be literally ATTACHED to the players head movement, but rather spawned at the direction
local variables declared outside onEachFrame scope aren't inherited
Hello i got my money system and store working
is there anyway i can make Personal Storage for people so whenever they bought stuff but dont want to use it for that mission they can store it and acces it
@slow pollen By stuff do u mean items/ vehicles or both?
would this be a multiplayer server?
yes
I suppose you could have an array assigned to each player and simply add/remove items from this array to represent a vault sort of thing
maybe something like this?
oke going to check it out thanks
π¦
Im confused
hi confused, I'm dad!
Hi All, I know this should be so simple and i have been trawling and trying to find a solution. For a mission I want to give the players some camera's or spotting scopes, they can place these and a feed is then set back to their tablets. This would allow them to use these for surveillance. Is there a script already out there which would allow such thing? Many thanks in advance,
The real simple solution to this is the Remote Designator backpack
Never used or seen that will check it out
Is there a command that tells you the current VTOL status of a VTOL airframe? Ie., something that tells me that it's currently using vectored thrust mode?
the animation source for the vectoring perhaps.
How I can remove handler from addPublicVariableEventHandler?
I know the way by changing event handler to {}. Is it correct?
changesqf {call em_submenu_playerselect} to```sqf
{_this call em_submenu_playerselect}
what is _target?
player addAction [name _x, {call em_submenu_playerselect}, _target];
``` β```sqf
player addAction [name _x, em_submenu_playerselect];
(be sure to define it before though)
em_submenu_playerselect
wait.
without any other change at all, do
player addAction [name _x, {_this call em_submenu_playerselect}, _x];
_selectedPlayer = _arguments```too
no need for _this select 3
copypaste your current code?
player addAction [name _x, {_this call em_submenu_playerselect, _x}]
``` doesn't quite look like what I sent you
β¦ thanks π
yes, because the addAction code is a new scope that doesn't know at all the _selectedPlayer variable
pass it as an argument here once again
player addAction ["DEBUG", { params ["_target", "_caller", "_actionId", "_arguments"]; hint format ["Selected %1", name _arguments]; }, _selectedPlayer];
by new scope, I mean that the addAction code between brackets { } is not aware of _selectedPlayer; it's a totally new and different script
you pass it to the new addAction
even if _arguments are named the same, they are not the same variable
remoteExec returns result of remote command?
@odd pollen yes
@rustic plover https://community.bistudio.com/wiki/remoteExec
addAction is not a good way to do menus
you could try https://community.bistudio.com/wiki/showCommandingMenu , but it's quite advanced
@winter rose it's means that not?
UI is always a mess anyway
@rustic plover Return Value: Anything - Nil in case of error. String otherwise. If JIP is not requested this is an empty string, if JIP is requested, it is the JIP ID. See the topic Function for more information. it returns nil in case of error
@winter rose ok, if i want to get remote result, i must to use BIS_fnc_MP, yes?
no
BIS_fnc_MP, as its page says, is obsolete
what is it that you want to do? it will be faster
yeah?
argument is not local, it's another player I suppose
youshould use remoteExec
remoteExec
no, remoteExec
if what you want to set captive is not local to your computer, it won't work
I know that getPlayerUID returns "" if unit is not local and I try to find a solution if this
language (please edit)
religion has nothing to do with that, actually
(#rules do)
"foul language"
but well, rules are rules, I didn't write them, I try my best not to get kicked ^^
works?
noice
@rustic plover the client would have to send it to the server, or setVariable it on itself and then the server could getVariable it
@odd pollen you do what you want with it, it's a unit reference as good as another; setDamage, vehicle, etc - help yourself!
nope. unless client-side you setVariable save its cursorObject and the server gets it
it's remote_Exec_, not remote_GetResult_
@winter rose ok, I show you my code example:
// Non-sheduled scope
// ...
[[], {
_return = call { /* some code with return */ };
player setVariable ["someReturnValue", _return, true};
// or by publicVariable method
}] remoteExec ["call", _unitId];
// Will it be correct while low server perfomance?
// Or when count of players is 200+?
// Maybe some delay needs to be there (but non-sheduled scope limitations...)
_clientReturn = _unitId getVariable ["someReturnValue", nil];
What do you think about it?
you clearly need the delay, as immediate execution of remoteExec is not guaranteed
but basically, yes - you can do that
Do you know some ways to delay in non-scheduled scope? I think while {true} do {} execution may helps, it'll take little bit of time
don't
duck
unscheduled is meant to be unscheduled, don't wait anything
... and BIS wiki has 502 error
yep
rip
o they use nginx, nice
Anyone know what side (e.g north, east, etc) Bluefor is?
Wait is it north? I know opfor is east
west
Ohh thanks
This is the right syntax right?
_group = createGroup west;
ainame join _group```
or joinAs? not sure what the difference is lol
[unit] join _group
gotcha
/shurg You can still check the wiki with: https://web.archive.org/web/20191203154510/https://community.bistudio.com/wiki/Category:Scripting_Commands (link to web archive)
Not up to date but that's all we got for now
or the Chinese version, too π
https://arma.fandom.com/zh/wiki/Category:Scripting_Commands
Lol
yes
@odd pollen change
name _x
into
"<t color='#FF0000'>" + name _x + "</t>"
addAction parses title into structural text
Is it me or do AI not move to precise positions anymore via script?
This code telling the AI to move to a front passenger wheel only has the AI either walk 5 to 10 meters close to it or just walk to a random position within 20 meters of the vehicle.
grp addWaypoint[(v modelToWorld[_selPos#0+.5,_selPos#1,-1.4]),-1.4]
Even disabled nearly all AI features, aside from anim, move, path, and teamSwitch
Same result with agents with moveTo as well
Seems to only be doable if the simulation is disabled or if it's a simpleObject
I was doing some doMove to make bots walk to vehicles, behaviour was same as you describe
quick question, is the WeaponAssembled EH persistent over respawns?
@winter rose
https://discordapp.com/channels/105462288051380224/105462984087728128/672944692685439016
Makes no difference at all. If you don't pass _this, then it will get passed anyway because lower scope can read higher scope variables..
@winter rose
https://discordapp.com/channels/105462288051380224/105462984087728128/672946485440282645
NO! VERY bad advice. Action code is stored as string, meaning its always recompiled. The second one will have to recompile the whole function.
player addAction ["DEBUG", { hint format ["Selected", name _selectedPlayer] }];
The addAction code is a completely new script, local variables don't carry over into it. And I'm sure endigma has been told that several times already.
oh, didn't know this code string thing!
Hey guys,
I am in need of some script help please.Ive done some research but i still cant seem to get the script to work correct.
Iam using this script in a scripted waypoint so that the waypoint will hold whilst the script is running
heres my code from my pz1.sqf
Its in the scripted waypoint special script exec box in that waypoint
{_x assignascargo h1} foreach units grp1;
{[_x] ordergetin true} foreach units grp1;
{ _x enableai "move" } forEach units grp1;
{ _x setunitpos "up" } forEach units grp1;
activate1 = true;
waitUntil {{_x in h1} count (units grp1) < 1};
h1 vehicleChat "Show this text";
my issue is the waitUntill section toatlly loses me.Any help woulf be greatly appreciated.:)
I have limited script skills so this is getting a bit tough to pull off on my own.:(
Thanks.
why 4 foreach loops when you could just do everything in a single one?
global variables without prefix is bad
the waitUntil should probably use findIf, because thats what you actually do there
cos my scripting skills require me to keep it simple as can be.
the waitunitll is just to make the script hold untill the group is in heli
@wispy cave , yes :)
Try to use codeblocks
_sides = [West, East, Independent, Civilian];
_curSelFac = [(_sides select (_sides find str lbCurSel 2100))] call BIS_fnc_getFactions;
Getting zero divisor error, but doesn't find return a number
Tnx @worn forge π
Makes code snippets more readable

I know this is a bit rich, but please newline π
But anyways, what exactly is the problem?
You dont know how waitUntil works?
Wait a bit for Biki to get online again and then use
https://community.bistudio.com/wiki/waitUntil
Wait a bit for Biki to get online again and then use
https://community.bistudio.com/wiki/waitUntil
waituntil can be really tricky, for example, if one of @thick merlin s guys dies, for whatever reason, the waituntil might never release
@brave jungle yes it returns a number. That being -1 if it didn't find anything.
And your code cna never find anything, because _sides doesn't contain any strings
you can string functions using ;
@odd pollen no you cannot. Your code doesn't work.
oh yeah, sides arent strings.. fallen for that one many a time
ye
Quick question,
I am looking for a way to have a vest change to another vest when the script is triggered. The main issue I am finding is finding a way to move all the contents of the vest into the new vest. Any ideas on how I could start this?
wait for the biki to start working again would be the first advice π
Thanks for the help so far guys.:)I'am aware of doing some things a little tidier but atm I'am keeping things easy for myself to read and to spot typo's.Scripting is not my forte so cut me a little slack.:)
I guess it's more related to #arma3_config
config looks ok
oh crap, sorry, thinking script, I'll delete and move it over there, thanks
@thick merlin thanks! not sure where I am messing up this undercover script setup
looks ok by what i could see.double check filepaths
Regarding my waituntill issue i did some research and spawning it in the script was required.I also messed around with this -
[] spawn {
waituntil {sleep 1;!(grp1 in h1);(vehicle player == player);h1 vehicleChat "Show this text"};
};
still no luck
anyone see any glaring issues?
Its giving a "Generic error in expression" error.
what
spawn = scheduled
It's just that that code is just plain wrong.
waitUntil expects boolean return
ah yes π
vehicleChat returns nothing,
[] spawn {
waitUntil {
sleep 1;
!(grp1 in h1) && (vehicle player == player) // return
};
// ...
};
(linking web archive as wiki is dead atm)
oh no, initialization order's page is not web archived π
wiki is down, anyone have any updates on it coming back up?
Monday most probably
(again, "Chinese" wiki copy can help: https://arma.fandom.com/zh/wiki/)
thanks. well, not a great workaround, but a workaround nonetheless, with Chrome translate.
@dreamy kestrel here is a list of all the currently available options:
https://discordapp.com/channels/105462288051380224/105462288051380224/673217340334276655
Hi! Anyone knows if it's possible to add an image into a HintC text message?!
it is possible, with structured text:
https://arma.fandom.com/zh/wiki/hintC
https://arma.fandom.com/zh/wiki/Structured_Text
@tough abyss ^
I'm trying to attach an object to players like this
testObject attachTo [player, [0,0,0]];
and I have a few questions.
Do all players need to have a variable name to be individually identifiable using this command or is there another way?
If I want to attach the same object to all players do I need to create multiple instances of the same object with different variable names and attach one to each? I'm mostly asking because I don't know how many players there will be when I want/need to do this.
Thanks
https://web.archive.org/web/https://community.bistudio.com/wiki/attachTo
Do all players need to have a variable name to be individually identifiable using this command or is there another way?
depending on the case, you can useallPlayers
If I want to attach the same object to all players do I need to create multiple instances of the same object with different variable names and attach one to each?
yes
@tough abyss
but, in a forEach you can have only private variables
@winter rose Thank you for the answer.
How would allPlayers work exactly? Would it create multiple copies of the object for each player?
no. allPlayers is a command that lists all players, so it is an array of units
so basically allPlayers[0] allPlayers[1] allPlayers[2] and so on?
One attach command for each of those?
what you can do is
{
private _myObject = createVehicle /* params */;
_myObject attachTo [_x, [0,0,0]];
} forEach allPlayers;
This is helpful. And once I no longer wish the object to be attached what do I do?
Q: I've got a script that simulates snow falling... I'd like to do this over water, however, the particles are falling "through" the water surface.
The object I want to attach is a light, not a vehicle
So basically, I will light up all players and then remove it. (with the possibility to attach again in the same session)
is there a way to work with the particles and detect when they are hitting the water surface? or for the particles to "stop" at the water surface?
forEach allPlayers {
testObject attachTo [?????, [0,0,0]];
}
Something like this?
@tough abyss if you createVehicle, use deleteVehicle
The proper syntax is the one I sent you
@dreamy kestrel I think so, but it is expensive - also, the wiki is down for now
no. a module is an editor helper that executes a script, eventually creating objects
Also, in your code you mention _x as a player. where did that come from
_x is the magic variable from forEach
it means "the one item I am iterating"
So how would I create a copy of your code snippet for my module?
I can't know the module's code behind it
I can spawn it in the editor before hand and give it a variable name
@tough abyss virtually everything in A3 is a "vehicle" in one way or another. players, units, are vehicles. player == vehicle player for instance, when the player is standing alone.
your "mod" is probably creating a light source, most likely a vehicle at some level.
How can I set the population of particles falling? IOW, appearance of a blizzard versus light flurry? using the particle array? https://arma.fandom.com/zh/wiki/ParticleArray
Heya is this chat for scripting in the editor?
Here or #arma3_editor, it depends if it is aboutβ¦ scripting, or the editor π
@dark temple
Well my problem involves modules so I think scripting? Idk Iβm kinda new
how "quickly" is setDropInterval capable of dropping? so far running at _x setDropInterval 0.001, that is "heavier" snow fall than at 0.005, for instance. faster than that? adjusting for performance obviously.
four decimal places appears to be the practical limit. anything less than that no discernible effect.
@dreamy kestrel you can create multiple ones to get the proper amount
Can someone who is a expert in modules help
you will just need to ask your question, if someone knows how to help, they usually answer
@winter rose interesting, good idea, thank you...
I need to send a picture to the person. Iβm not sure how to describe it
Idk itβs weird
Dm me or ping me if you can help
We cannot help if we don't know what's the issue
I donβt know what the issue is either
I need to send a picture but it doesnβt send here
use imgur or any image sharing platform
Is there a way to create a playable slot - mid mission?
nope
I am using the artillery support module. Whenever I use a shell it say βsee getvariable βBIS_SUPP_supportingβ)) |#||| !alive_provider
Delete marker _mrk...β
Error undefined behavior: waituntil returned nil. True or false expected.
Says not say
Β―_(γ)_/Β―
Hi @winter rose I was trying and trying how to add an inmage into a hintC box but nothing works, would you show me an example?!
https://community.bistudio.com/wiki/hintC#Examples see Example 5
I was using something like
hintC "<img image='Img\icons\help_faid.paa' width='30' height='50' />";
hintC_EH = findDisplay 57 displayAddEventHandler ["unload", {
0 = _this spawn {
_this select 0 displayRemoveEventHandler ["unload", hintC_EH];
hintSilent "";
};
}];
```sqf
/* your code here */
```
plz
What difference between ' and " in Arma?
For example:
_text = 'Hello world';
// and
_text = "Hello world";
I found something about it:
A string may consist of any number of ASCII characters and is enclosed by single-quotes (only in ArmA) or double-quotes
I can use single-quotes, but only in Arma series and it equal to double-quotes, yes?
Thanks, just I prefer single-quotes because it's looks better :)
But in macros i can't use double-quotes for some defines:
#define TEXT Hello world
#define EXAMPLE "TEXT" // pre-proccess to "TEXT"
#define EXAMPLE 'TEXT' // pre-proccess to 'Hello world'
It's normal?
Hello, I'm trying to change the saturation in game via a command, what is the variable of this one? Thank you! π
π€¦ββοΈ
Sorry for stupid questions
[_this # 0, 8, 'ACE_Wheel'] call ace_repair_fnc_addSpareParts
is this valid syntax for sqf?
specifically the array access inside an array def
or do i need to put the element into a variable and then put that var into the array def
drawIcon3D ["\RSC\targeticon.paa",
[1,1,1,1], _pos, 2 - (_distance / 50), 2 - (_distance / 50), 0, format["%1/%2", _obj getVariable "health", _obj getVariable "maxhealth"], 1, 0.03, "TahomaB"];
How to draw icon from mission files?
All time i getting "Can't open targeticon.paa"
Hey can someone help me with a script to create film grain, the bohemia websites arent working for me so im asking here
drawIcon3D works with absolute file path. How to make correct relative path?
Found - getMissionPath
@[KP] veteran29. will try tonight.Thanks for your help and the linked documentation.π π
@[KP] veteran29. Just tried that code and it too threw the same "Generic error in expression" error.
Heres a link to my test mission if that helps.
My research over these last few days that it is due to scheduled/unscheduled scripts.Thats where it goes over my head.
Any other ideas?
Hey guys, just a quick question. Is there a way to script a missions in a way to detect whether there is a ACE3 medical system adn set it's revive system accordingly? I mean, if there's ace - use it, if there's not, use the vanilla revive
I use single quotes when i want double quotes inside a string
Like so
'Hello "World"'
Otherwise i use double quotes
Because the single quote is in an inconvenient place on the nordic layout
@fair lava valid.
Every array element is a "statement" you can do tons of stuff there. Its basically like one line of script, that will return a value at the end
Hi!!
Anybody knows how to change an image size in a hintC?!
I'm using that script but I'm going crazy trying thinks but nothing works.
My script.
`` private _image = "Img\icons\help_faid.paa";
private _txt = composeText [image _image, "Tutorial Text Here"];
"Help!" hintC _txt; ´´
Thank you so much.
Hey, does anyone know any way to stop the player from reloading from backpack or will i have to jerry-rig it?thanks!
@tough abyss look at https://community.bistudio.com/wiki/parseText
Ok thanks, I'll take a look.
Hope it works now.
Im looking to make script a box so you get zeus when you go up to and interact with it. Anybody know how to do this?
I did not see one, per se, but is there a way to determine the current state of how enableCamShake is set?
is there a scripted way to create a ground weapon holder with a magazine-loaded weapon, besides using the unit action ["DropWeapon"] "hack"?
π
Flashy sparkling new
Yeah, I had to change some of my scripts when they added that. Great command that is.
source of some other issues, but a really nice one nonetheless!
if I wanted to remoteExec some code on a player _unit box, then I need owner _unit, correct? ... from the server, that is.
just _unit is fine
thanks. another Q: in the form, from say3D [sound, maxDistance, pitch, isSpeech], what is isSpeech default? true?
indeed, thanks. it's more for ambiance, really, assume that if I set it true that would incur downstream costs, i.e. 3D sound response from AI, that sort of thing
Is there a way to set default Side that shows first in Role Assignment screen?
Hey folks - could use some help - I'm told it's possible to use saveGame; and loadGame; to save & load saves - but not sure how to actually use it - a friend mentioned I just need to login as admin and execute them?
@woven remnant I may be wrong, but I believe that doesn't work for MP
oooh I keep forgetting about this one
how dare you @winter rose
The best command ever made by the best person ever with the best name ever :U HOW DARE YOU FORGET?!
I didn't make this one!!1! :U
it's just new, why couldn't it simply exist on release Γ¨.Γ©
I wasn't there for release π
Btw seems like things are moving π€
prepare for goodness impact
Wait, what's movin'? π
You'll see when it happened. Just remember that I said smth is movin π
Maybe its the inventory items that are moving 
Maybe that too π
i like the insider references, even tho I'm not sure if they are intended to be references π€
Today's misc scripting question, anyone know if it's possible to set up a user's custom keyboard controls (Controls -> Keyboard -> Custom controls -> Use Action 1 ... 20) from script? I have a feeling it'd be necessary to do by mod, if at all.
Not in any sane way.
no can do (nor do you want to). Who would want his keys to be toyed through script??
I've got some quality of life pilot functions I'd like the user to have access to, but it sounds like the best I can do is say, "You have some actions available, if you want them, go into custom controls and bind some keys to Use Action 1, 2, etc"
Or use CBA keybinding system π
Yeah, vanilla only π

You know what would be great, is if a try-catch, caught script errors π€
naaah, no self-respecting language needs that. I mean, C++ is from ~1983, SQS from ~2000, SQF from ~2003
time to evolve, man
Stop throwing rocks at me, dammit!
Or you can just use intercept and have the game crash, or actually catch the error π€£
or use SQF-VM prior to add unit-tests π
// SQF-VM ONLY! Not for use in Arma
{
// ... your code
}
except__
{
diag_log format["test failed: %1", _ex];
}```
noice! π
So is there a simple script to use on units to designate a win state by taking them out?
something along the lines of "If i am dead then mission=win" but i need it for multiple units
basically set up a "blow these things X all up" mission wise
Trying to automate workshop upload on github actions, 99% of the way there, and now blocked by steam guard. Is it possible to do this with a steam guarded account, anyone doing it already? Or even just anyone pushing to workshop via a CI setup?
Q: windDir ... isn't wind cardinal direction named for the direction from which it is coming? i.e. wind blowing from N to S is a northerly wind.
yes, I see the wiki and the example. I think the example is confused.
Hiya getting an error with my select command:
_sidesstr = ["West", "East", "Independent", "Civilian"];
_curSelFac = [(str _sides select (str _sides find lbText [2100, lbCurSel 2100]))] call BIS_fnc_getFactions;
error at select - Generic error in expression
Surely find is giving me a number no?
@dreamy kestrel I see what you mean, should be Southern
as it relates to the windDir itself, that is the direction the wind is blowing?
@winter rose Plz be a rubber duck again π
@brave jungle _sides not defined ?
also TELL THE ERROR YOU ENCOUNTER :v
@ebon ridge steamguard would be pretty damn useless if it was possible to circumvent it
I'm no quack
legit just says (str _sides #select (str _sides - Generic error in expression
oh wait
have I
oh my
yeah, your expr is a bit messy :p
try expanding it on multiple lines
https://support.steampowered.com/kb_article.php?ref=3330-IAGK-7663 you could create a separate steam Account and pay the 5$ limited crap stuff to upload using that
Article "Limited User Accounts"
stringed the array
yeah, your expr is a bit messy :p
try expanding it on multiple lines
@winter rose Yeah that too π
π π¦
@queen cargo you need to have arma on the account.
BI have set the arma workshop like that.
@brave jungle anytime ^^
Disabling the guard is just easier tho.
BUT, you can't upload public items with guard disabled.
a soul for a soul
So if you want to create new item on workshop you need to re-enable it remporarily.

Stuff im using for auto workshop ci uploads: https://github.com/ArmaForces/FriendlyTracker/pull/8/files
also this is kinda getting into #arma3_tools direction I think.
yeah so basically requires no steam guard, i don't understand you can't upload public items with guard disabled. though? As in I cant add NEW items, or I can't upload updates to any public items? Cos if its the latter its totally useless :/
i can see why so many modders hate steam workshop now...
@ebon ridge steamguard would be pretty damn useless if it was possible to circumvent it
Most systems have ways to create access tokens that give limited API access without requiring login or 2FA specifically for automation, e.g. github has this.
Thats true
Though... In steamcmd you log into your User Account π
π
yeah, i'll refer you to my previous statement on the topic of hating workshop π
thanks for the help, still would like to know if i can upload public items on a non steam guard account at all, as that wasn't clear
Q: when working with particles and the source object in particular, what is the strength of that binding in terms of object "ownership" if you will? i.e. does the drop algo delete the object? or does that fall on the caller "before destroy"? i.e. via the drop call?
I⦠am not sure to understand?
i.e.
_wisp = _particleSourceName createVehicleLocal _pos;
drop [[_wispShapeName, 1, 0, 1], "", "Billboard", 0.5, 0.5 * _duration, _pos, _targetPos, 13, 1.3, 1, 0.1, [1, 10, 15], [[1, 1, 1, 0], [1, 1, 1, 0.1], [1, 1, 1, 0]], [1], 1, 0, _onWispDrop, _onWispBeforeDestroy, _wisp, 0, true, 0.1];
Drop has a life time, correct? What happens to _wisp at the end of that life time?
nothing at all? it is the particle's lifetime, not the emitter's lifetime
you can drop every second a soap bubble that each will live for 5 seconds, but the emitter will not get deleted
also, that is not how you use particleSource π€
can you be more specific?
you are apparently creating a particleSource, but then are using the drop command
you should be able to set particleSource's parameters with commands such as setDropInterval, setParticleClass etc
See https://community.bistudio.com/wiki/Category:Particle_System
@ebon ridge with steam guard disabled you can't make newly uploaded items PUBLIC
only friends and private
items already set to PUBLIC can be updated.
awesome thanks
I might have found a way to quite easily extract the steam guard secret, I'll try to find the time and update my GitHub Action with support for steam guard secret during the weekend.
no promises tho.
soonβ’οΈ
Tbh
Should be the same method as with all 2FA
With the problem being that steam is not providing a way to use other Apps sadly..
however won't github action run on various machines, so steam guard code would be required often/always?
secret is the thing that allows you to generate the codes.
i don't know how 2FA works, but isn't that hidden on a valve server somewhere? we can only see the validation code (public key?) part right?
@winter rose I'm not aiming to create multiple wisps, just drop the one.
current time + secret on your device = code
they have other part of the secret on their servers so they can validate the code
It's similiar to Public / Private key scenario
@dreamy kestrel if you just want to drop one particle, just use drop indeed
if you plan to drop many, use setParticle* commands
he wants to know if drop will delete the vehicle
which doesn't make any sense
no it won't.
An object doesn't automatically get deleted when you shoot at it and it drops hit effect particles
apparently playSound3D does not work with .ogg files? which is kinda funny because I think say3D does work with .ogg files...
it should, no? what does the wiki say
have a problem with select. sqf _sidesstr = ["WEST", "EAST", "INDEPENDENT", "CIVILIAN"]; _curselected = lbText [2100, lbCurSel 2100]; systemChat str _curselected; _selectindex = _sidesstr find _curselected; systemChat str _selectindex; systemChat str _sides select _selectindex; but my final line, _sides select _selectindex; is the entire _sidesstr any ideas?
oh worth mentioning all of the params are passed and are correct, be it "WEST" and 0
What is _sides?
the array of sides that are not str format
_sides = [West, East, Independent, Civilian];
a bad method I know
but
can work on that later
It should play @winter rose
https://community.bistudio.com/wiki/Arma_3:_SoundFiles linked in playsound3d includes Bohemian oggs
I dont get why it's the entire array though
because it'll give you 0 if you select west
Works for me in Eden Lou... so?
I double check my paths, and the path is true, file exists. logs complain that "file not found".
See jacmac's comment on the biki page michaelwpide

