#arma3_scripting
1 messages Β· Page 612 of 1
values might be
#define REVIVE_MODE 2
```or something
they are not documented but opening the revive stuff might explain
yeah nope, apparently no default values settable
so defaults should come from Eden settings
I'll try thanks.
What defines.inc?
private _canUseMedikit = CAN_USE_MEDIKIT2(_unit,_target);```
This seem to be broken
Its in [_unit,_target] call bis_fnc_reviveAllowed; codes
/*
Author: Jiri Wainar
Description:
Returns true if unit is in general able to revive someone.
Parameters:
0: OBJECT - unit performing revive
1: OBJECT - unit that will be revived
Returns:
SCALAR (check defines.inc for exact values)
> 0: unit is able to perform revive action
< 0: unit is NOT able to perform revive action
Example:
_reviveAllowed = [_unit,_target] call bis_fnc_reviveAllowed;
*/```
And I get -2 which means #define ALLOW_CHECK_REQUIRE_MEDIKIT -2 in defines.inc
Which comes from here
//require 'medikit' or 'firstaidkit'
private _canUseMedikit = CAN_USE_MEDIKIT2(_unit,_target); //It says false even I have medikit, fakit
if (bis_revive_requiredItems == 2) then //bis_revive_requiredItems = 1 medikit. so false.
{
if (!_canUseMedikit && {!CAN_USE_FAK2(_unit,_target)}) then
{
[ALLOW_CHECK_REQUIRE_FAK,ALLOW_CHECK_REQUIRE_MEDIKIT_OR_FAK] select _isMedic;
}
else
{
[ALLOW_CHECK_OK_USE_FAK,ALLOW_CHECK_OK_USE_MEDIKIT] select _canUseMedikit;
};
}
else
{
if (!_canUseMedikit) then {***ALLOW_CHECK_REQUIRE_MEDIKIT***} else {ALLOW_CHECK_OK_USE_MEDIKIT}; //I get -2, which means ALLOW_CHECK_REQUIRE_MEDIKIT
};
return from *** value from my values so far
But now I'm stuck on how to fine CAN_USE_MEDIKIT2(_unit,_target); this function.
Nothing even on google..
check the includes?
how did you know
#define CAN_USE_MEDIKIT2(unit,target) (unit getUnitTrait "Medic" && {('Medikit' in items unit || {(!isNull target && {'Medikit' in items target})})})
ok so...
?
why...
why CAN USE MEDIKIT... ask for medic trait...
then it means We cannot make other roles revive only with medikit and allow them to use fakit
it was feature of 3rd party revive system
@winter rose Thank you for help
hello again everyone, got another question if somebody can help with:
Device2 addAction ["<t size=2.0 color='#FF0000'>Search Device</t>", "Nothing.sqf"];
How do I add an icon next to the text? like the search icon from arma 3 it self?
See the note in addAction
Thanks but is it possible by any chance to have the text Next to the icon? or is it either text or icon only?
Just do it outside of the <img> tag will do?
Sorry I am a bit confused π , where do I add it exactly cause if you mean outside as in before? I think it is already:
private _action = Device2 addAction ["<t size=2.0 color='#FF0000'>Search Device</t>", "Nothing.sqf"];
Device2 SetUserActionText [_action , "<t size=2.0 color='#FF0000'>Search Device</t>", "<img size='2' color='#FF0000' image='\a3\ui_f\data\IGUI\Cfg\Actions\heal_ca'/>"];
https://cdn.discordapp.com/attachments/615522175281135676/744138519882104872/unknown.png
Device2 SetUserActionText [_action , "<t size=2.0 color='#FF0000'>Search Device</t>", "<img size='2' color='#FF0000' image='\a3\ui_f\data\IGUI\Cfg\Actions\heal_ca'/>Your Text Here"];```try
@warm hedge works, thanks a lot and sorry for bothering ^_^
So we have a mission file that is able to load on 1 server, but not on a different server, although both servers are running the same exact mods. It's terminating with a message that a certain script cannot be found, but that script is present in the mission file
7:53:22 ErrorMessage: Include file mpmissions\__cur_mp.vt7\numericBillboard\setLit.sqf not found.
7:53:22 Application terminated intentionally
ErrorMessage: Include file mpmissions\__cur_mp.vt7\numericBillboard\setLit.sqf not found.
Any ideas?
don't forget to shutdown the Arma 3 server before updating its missions, else it won't work properly
also this is #server_admins , not #arma3_scripting @mental wren
My bad, I was thorn between the 2 channels since it could've been a script error!
no worries, but if it works on one and not on another, scripting is most likely not the issue (hopefully)
The limits on addRespawnInventory... Are they limits per squad? Cause I had a sniper class set to 1 and I saw a player from each squad select the kit.
When I wanted 1 for the whole team
@fair drum the limit is I guess depending on the target parameter
I had my target as player run locally
@rocky nest you'll likely need a game extension. sqf itself doesn't provide any networking. there's a project called intercept which provides c++ binding for sqf commands that could be useful
Why does 3 fadeMusic 0 not work for me?
Music is playing and the volume in Description.ext is defined as db + 10 which is an optimal value according to the wiki.
I tried it with +9 but no difference.
@slate cypress how do you play the music?
@rocky nest vectorUp and vectorDir can provide roll pitch yaw, as for heave and sway, the best i can think of is sining vectorDir/Up with current velocity. not sure how to handle surge though, you could just compare velocities in prev/current frame
I tried db + 10 too but no luck.
I play the music using playMusic "music class name"
sooo it should work, weird.
I got no volume change.
Will be there any means to check non-remote-detonatable mine's ownership? getAllOwnedMines Doesn't return mines put by someone.
Yeah I just tried it in a LAN server and it still doesn't work Montana
@slate cypress wait, it is a local effect command
weird then, try with vanilla musics?
works well here
[] spawn {
playMusic "Defcon";
sleep 1;
2 fadeMusic 0;
};```
@slate cypress β
@slate cypress?
Anyone have a simple ai aircraft spawner? Looking to call enemy aircraft when certain criteria are met. Thought Iβd reach out here first before taking a crack at it. Thanks!
_add ctrlAddEventHandler ["ButtonClick","[true,_item,_amount] call RR_fnc_handleInv;"",SELECTED_TARGET_PLAYER"];
says error missing "" but i have tunnel vision and can't see where lol
ah right, the buttonclick is supposed to give a virtual item amount (from an rscedit) to a player i select in a RscTree
well you'd need to remoteExec that function of whoever is clicked
as that function is run locally
we can help, with more details ^.^
@odd pollen By far the simplest solution is to make your curators civilians and set the respawn point for civilians.
I believe π
Sorry?
They can use global chat. And I assume there is voice chat between players?
I had a question myself.
How do you make an object (vehicle) visible but without collisions ? The Eden editor doesn't distinguish and I couldn't find the relevant script command so fast.
hehe, found that one. Is there a disableCollisionWith everything ? π
I just want something floating in the air, basically
@odd pollen Errrr, so in Eden, you can uncheck "Enable Simulation", but my AMV-7 Marshall object most definitely still has collisions, even though you can't really interact with it. "Show Model" is the only thing that disables collisions, but also makes it invisible.
PS. Sure that picture is what I want. Well to be exact, I want my posed AI characters to execute their animations correctly next to it, without collisions interrupting them.
Appreciate the brainstorming! Was that picture a bug or intentional?
OK, not to be argumentative. But getting the Marshall to sit still is not a problem. I just want the 6 characters to NOT collide with it. And the exact reason I am asking this question is because disabling simulation does not solve the problem. I suppose I will play around with disableCollisionWith by executing it several times at mission start.
Yeah I'm making a cinematic :). By the way disableCollisionWith does work. Just need to execute it for every character. What's a helper?
Sounds great. Ya got an example? Searching for "Arma 3 Helper" is giving me cheat sites π
use disableCollisionWith in conjonction with forEach for your 6 characters @tough abyss
Yessss merci. That was the solution I went with. Wonder why endigma 's messages are gone. Hope I didn't accidentally get him banned! 
he did it himself, one too many profanities. not permanent though
Ah. . How do you know this?
β¦I'm a moderator?
Riiiiiight
I've got a follow-up question. Does anybody know how to create in-game sparks with scripting? Am trying to simulate welding in a cutscene.
Edit: seems someone tried to figure this one out before me: https://forums.bohemia.net/forums/topic/175676-creating-spark-effects/?tab=comments#comment-2752713 Can't make heads or tails of (which?) script actually resulted from his brainstorming. Anybody got experience with scripting particle effects?
drop command can be used but likely needs a bit more to it too
@winter rose Ah I haven't tried it with spawn. I'll try that after this current mission I'm in
spawn is not the issue/solution, it's just a way to use sleep
I tried it in a real time scenario using debug console
I executed playMusic command locally, waited about 10 seconds
Then executed fadeMusic command locally
It should have the same result as your code block but it doesnβt seem to
I know it might sound patronising, but for debug's sake can you copy/paste the exact sqf lines you used in both debug executions @slate cypress ?
do you have CfgDisabledCommand defined?
Hey peeps any chance anyone remember off of the top of their head if there's a command to join a server π ?
I'm tinkering around a bit with the main menu spotlight buttons and wether I can use them to make a sort of quick join button for the unit I'm playing with
in dev there is connectToServer
Hm okay
there is a couple of restrictions to it but its ideal for main menu use so should be fine
https://community.bistudio.com/wiki/connectToServer
oh yeah that looks like the thing I want, if there's nothing else I'll props just have to wait for that to come to main branch
KK has something like that on his blog @oblique arrow
π Oki gonna take a look at it, thanks
http://killzonekid.com/farewell-my-arma-friends/ for reference (@oblique arrow)
Ah thanks
Aaah I think I understand what it does now? It manipulates the different displays to enter the server information and connect to the server... I think
yes, it's a very hacky but efficient way to do so, right now
note that connectToServer won't work from a mission, either - only from the main menu
Yeah I only want to do it from the main menu
I'll try out connectToServer on dev branch first and then just wait for it to come to main branch or try tinkering around with KKs work, I gotta figure out the rest of what I want to do too so 
isn't the main menu technically a mission with specific UI dialogs?
World scene is a scenario shown behind main menu when a specific terrain is loaded and -skipIntro is not used. If you're playing on Altis and leave to main menu, Altis scene will be used.
The scene is configured with the terrain and is responsibility of a terrain creator.
I guess the command itself does some checks too
@rocky nest vectorUp and vectorDir can provide roll pitch yaw, as for heave and sway, the best i can think of is
sining vectorDir/Up with current velocity. not sure how to handle surge though, you could just compare velocities in prev/current frame
@tough abyss Thanks man! those values are what i will be required to retrieve.. I was wondering what they would be called. now to find a way to export that data. maybe a custom .dll or something hmm
The command checks for non-multiplayer and uicontext, it miiight work in singleplayer. Never tried, and officially not supported
@rocky nest you can make a extension
https://community.bistudio.com/wiki/Extensions
Then grab all your data in script and send it over to the extension https://community.bistudio.com/wiki/callExtension
Cool ill check it out. Thanks!
How should I approach limiting the range of the SAM batteries? Modifying the missile itself? Modifying the AI? Or is there something I can modify on the launcher itself?
it would be a config change⦠or viewdistance change
Are ai affected by view distance settings?
K gotcha I'll mess with it. Going the config route would result in a mod right? Never messed with game configs before.
yep
I'm 100% sure this has been asked and solved here already, but how can I get a custom flag texture to work on my server?
Currently I have put:
this setFlagTexture "custom\GOCLogo.jpg";
Into the init of multiple white flags, which then will get this jpg picture put onto them at the start of the mission, but my buddies only see an empty flag pole.
Seems that it should work locally on every machine, but it doesn't seem to be able to find the picture even though it is in the mission file. (Note that before I did not have the 'custom' folder)
If I remember right, you have to convert the jpg to .paa(?) File type using Arma Tools, when I've used JPG in the past, it doesnt show unless the player gets real close to it...then it loads
https://community.bistudio.com/wiki/ImageToPAA make sure to check out the Important Note about texture sizes too @hollow plaza
Yeah, I downloaded that to add a text onto the Corvette
I guess it only works with jpg when it's about pictures like in documents or something.
I've used jpg a bunch, mainly cos I'm too lazy to switch it, but it doesnt load in MP unless a player gets close to it....no idea why lol
Seemed like stuff wasn't loading in at all during my op, like the small flag at the end of the corvette wasn't showing for others. I'm unsure whether people could see the custom name of the ship, but it's problemful as I cannot test it myself.
Guess I'll try switching it all over to .paa
Let me know!
It'll take a moment before I know for sure due to the fact that I cannot check it myself, but I'll try and remember to post the results over here
Hi anyone here know what causes SP animations to not work in MP properly? (guy doing animation on the spot / AI fall over and stay down when something bumps them despite doNotCollide being on) :3
@torpid pike which anims?
1 sec, will do it in code quote
BIS_shooter_1 switchMove "Acts_JetsShooterNavigate_in";
sleep 1.033;
BIS_shooter_1 switchMove "Acts_JetsShooterNavigate_loop";
sleep 2;
BIS_shooter_1 switchMove "Acts_JetsShooterNavigate_stop";
sleep 2.7;
BIS_shooter_1 switchMove "Acts_JetsShooterNavigate_out";
BIS_crew_1 switchMove "Acts_JetsCrewaidF_runB_m";
sleep 3.667;
BIS_crew_1 switchMove "Acts_JetsCrewaidFCrouch_in";
BIS_crew_2 switchMove "Acts_JetsCrewaidRCrouch_in_m";
BIS_crew_3 switchMove "Acts_JetsCrewaidLCrouch_in";
sleep 1.366;
BIS_shooter_1 switchMove "Acts_JetsShooterIdleMoveaway_in_m";
sleep 1.2;
BIS_shooter_1 switchMove "Acts_JetsShooterIdleMoveaway_loop_m";
sleep 1.8;
BIS_shooter_1 switchMove "Acts_JetsShooterIdleMoveaway_out_m";
sleep 3.66;
BIS_shooter_1 switchMove "Acts_JetsShooterShootingReady_in_m";
sleep 0.766;
BIS_shooter_1 switchMove "Acts_JetsShooterShootingReady_loop_m";
BIS_crew_1 switchMove "Acts_JetsCrewaidFCrouchThumbup_in";
BIS_crew_2 switchMove "Acts_JetsCrewaidRCrouchThumbup_in_m";
BIS_crew_3 switchMove "Acts_JetsCrewaidLCrouchThumbup_in";
sleep 2.5;
BIS_shooter_1 switchMove "Acts_JetsShooterShootingReady_pointing_m";
sleep 4.166;
BIS_shooter_1 switchMove "Acts_JetsShooterShootingLaunch_in_m";
sleep 1.791;
BIS_shooter_1 switchMove "Acts_JetsShooterShootingLaunch_loop_m";
vehicle player call BIS_fnc_AircraftCatapultLaunch;
sleep 8;
BIS_shooter_1 switchMove "Acts_JetsShooterShootingLaunch_out_m";
BIS_crew_1 switchMove "Acts_JetsCrewaidFCrouchThumbup_out";
BIS_crew_2 switchMove "Acts_JetsCrewaidRCrouchThumbup_out_m";
BIS_crew_3 switchMove "Acts_JetsCrewaidLCrouchThumbup_out";
sleep 2.366;
BIS_crew_1 switchMove "Acts_JetsCrewaidFCrouch_out";
BIS_crew_2 switchMove "Acts_JetsCrewaidRCrouch_out_m";
BIS_crew_3 switchMove "Acts_JetsCrewaidLCrouch_out";
sleep 0.5;
BIS_shooter_1 switchMove "";
BIS_shooter_1 setPosWorld getPosWorld BIS_resetShooter1;
BIS_shooter_1 setDir 343.933;
BIS_crew_1 setPosWorld getPosWorld BIS_resetCrew1;
BIS_crew_1 setDir 64.271;
XD okay thanks discord, lemme format that, sorry
thanks β€οΈ
I'm also trying to make sure that no matter whoever touches that AI, vehicle or otherwise, they don't flop down and hide
see https://community.bistudio.com/wiki/switchMove Multiplayer's note π
yeah i didnt understand it sadly
i tried applying it but it seems to confuse the daylights outta me
basically, try to do the same as in Example 2 π
yep
I'll attempt that now, thanks!
Will that also stop the AI from hitting the deck if a vehicle goes near or hits them btw?
like, me or any other player
hum, switchMove never did that iirc?
It might be how the animation is being executed, should I disableAI from init.SQF to prevent that occurring?
well, try first, adapt later then
i think it's just that the current way i have it is... (in their init field)
this disableAI "TARGET"; this disableAI "AUTOTARGET"; this disableAI "MOVE"; this enableAI "anim"; this setbehaviour "CARELESS"; this switchMove "Acts_JetsCrewaidR_idle"; BIS_crew_2 disableCollisionWith vehicle player;
if characters get hit, they might get damage to their legs and be unable to stand
Hmm, i disabled damage on them though
is there a way to check if mod is loaded with pre-processor in description.ext ? Probably using __EVAL
description.ext
#ifdef MOD_ENABLED
#include "file.hpp"
#endif
checking if mod is loaded when starting mission
ah! I read that wrong, I thought "how can one know (in the mission) if a mod has been loaded by description.ext" π€―π§
I would say EVAL config reading indeed or some other sorcery
trying to use isClass (configFile >> "CfgPatches" >> "name_of_the_mod" with __EVAL
yes you can do that.
with EVAL
but EVAL is not preprocessor, its ran after preprocessor is done, you cannot know INSIDE preprocessor
nobody said inside preprocessor
nobody said EVAL is a pre-processor either
I guess this can do ? #define MOD_ENABLED (isClass(configFile >> "CfgPatches" >> "mod_base_class"))
nobody said inside preprocessor
You said
is there a way to check if mod is loaded with pre-processor in description.ext ?
And you posted
#ifdef MOD_ENABLED
from that I assumed you want to do it with/in the preprocessor
which means you can only use the preprocessor, and __EVAL is not preprocessor, meaning you can't use it
*with pre-processor commands, happy now ?
Yeah. That means, what I said above.
__EVAL is not a pre-processor command
I don't understand why the offensiveness?
Just trying to explain to you
@real tartan there have been two misunderstandings, and we tried (and managed) to help π
it's not mockery, it's "wait, what exactly are you trying to do?"
@winter rose
playMusic "MyIntro";
wait 10 secs
5 fadeMusic 0;
so "MyIntro" in a custom music, ok
when you say "wait 10s", it's unpaused I assume
so yep, that's weird and I don't know how or why it's not working on your side πππ
can someone prompt me, playing HC mode, switching to one of the squad leaders and give order to soldiers to get in empty vehicle, when i switch back to HC they getting out of the vehicle. Can i solve it somehow?
High Command. I was stuck on Headless Client π
Why dont you command them to get into vehicle in HC mode? SL orders unit to get out when you stop controlling them.
in HC level, your orders will persist.
so in HC, you give orders to the group
as a leader, you will give orders to your subordinates, but the leader himself has not been told to get in, so will get out and tell everyone else to, too
in A2 the same works
When there is someone mind controlling him regularly, he of course forgets what is happening. 
There is anyway to get all arma3 faces ids?? including those that are in mods
Get all entries in CfgFaces most likely
Get all entries in CfgFaces most likely
@exotic flax Where can i check it?? βΉοΈ
under the debug console > Config > CfgFaces
under the debug console > Config > CfgFaces
@winter rose Thanks man
confirming, triggering something that falls under water would be a ASL Z value of <0 right?
ASL = Above Sea Level so I guess yes
_nom = getText (configFile >> "CfgFaces" >> (face player) >> "Displayname") does anyone know how to make this work??
should work no?
should work no?
@winter rose returns ""
starting A3 for the 12th time todayβ¦ π
There's no displayName in faces
Or I cannot find one in the config atleast
Ah well, your cfgPath is wrong getText (configfile >> "CfgFaces" >> "Man_A3" >> (face player) >> "displayName")
CfgFaces >> XXX has subclasses of faces, and the Man_A3 is the one with Arma 3 heads
Ah well, your cfgPath is wrong
getText (configfile >> "CfgFaces" >> "Man_A3" >> (face player) >> "displayName")
CfgFaces >> XXX has subclasses of faces, and theMan_A3is the one with Arma 3 heads
@cunning crown Working!! THX!
Hey everyone,
I am currently making a script that involves animations and within this script it is very important that _source looks at _unit as the command is executed but for some odd reason there is a delay of between 1 and 4 seconds before this takes effect after the systemchat:
systemchat "test";
_source dowatch _unit;
The _unit performs a switchmove and the _source performs a playmove at the time, removing the playmove fixes the issue but adding a delay below a second or multiple dowatch/lookat commands wont help. Does anyone knows what I can do make the lookat push through the playmove?
I think it is the animation that comes with lookat. Is there any way to just skip the animation?
@fair drum Thanks for the tip π I'll test that out! Never used remoteexec before but it should be like this right;
[_source] remoteExec [0 playMoveNow "babe_rvg_zed_stand_zombie_bolter"];
nopes lol
that throws an error
ill figure it out
got it π
normal command:
A command B
remoteexec
[A,B] remoteExec ["command",client,JIP]
Hmm, i got it to work with remoteExec [_source playMoveNow "babe_rvg_zed_stand_zombie_bolter", 0]; but despite it working it still throws an error
your syntax makes no sense
standby
[_source,"babe_rvg_zed_stand_zombie_bolter"] remoteExec ["playMoveNow",0];
Awesome π Thanks a ton for the help! Now that command makes sense
Got myself a crispy animation of the wendigo eating a victim π
or... actually... I dont think it changed anything lol
whats your error
Well, no error really but the lookAt is still executed with a huge delay
I also tried executing lookAt remotely
Hmm I think i know what happens
Ahh nevermind
For a second I thought it's because the position of _unit doesn't update until the whole animation for _unit has played out. But if i remove the animation of _source it properly looks at _unit even directly after the animation
Hmm i can possibly fix this with a waituntil
waituntil _source looks at _unit
then execute the playmove
Try maybe Take and Put event handlers
that case just use EachFrame
what's stopping you from using eachframe?
eachframe isnt performance intensive
if you're just adding one eachframe per client
checking uniform types is almost instant so there'll be close to no performance impact
unless you're checking the uniforms of all units on the map that might be a different story (even then there can't be that many units to cause a performance penalty)
it looks like bottleneck is those <equipment> in tsp_allowedStuff. i'm guessing there's dozens of string comparisons in each iteration
you could create a game logic and set everything in tsp_allowedStuff as variables in that game logic, then to check if some equipment is allowed, use <game logic> getVariable <equipment class>. that's the fastest way to do dynamic sets in arma that i know
the best code you can get is the one you do not execute ^^
Both ace and vanilla arsenals emit events so Take, Put and arsenal EHs should be enough.
the scripted Arsenal EH is only for Opening/Closing afaik
I love that how eventually once you get the hang of the language mostly everything becomes clear. Arma3 has a great documentation. I have yet to find misinformation which is pretty amazing
hi, so i managed to add an FiredNear eventhandler to my character http://prntscr.com/u10l1e and it works fine. The problem only is that after a while, while the music is playing and another shot is being fired, the music cuts off and restarts from the beginning again. how can i fix this?
you could add a cooldown for which you will need a scheduled environment, In this case I would execute a script from the init. Let's write something up
I know only very minimal basic scripting and copy paste my way 95% of the time so I don't know how to write one exactly
I have yet to find misinformation which is pretty amazing
if you useplayer setDamage 1, your AI subordinates will flank the enemies using smoke, then come back to you bringing you elderberries
you said you wanted amazing misinformation, no?
so for starters add the following line to the init field
this addEventHandler ["Firednear", {[this] execVM "yourscript.sqf";}];
Love it Lou π
best undocumented "feature": if you place player setDamage 1 to the init field of any object, it will kill all players the moment they join π€£
I bet that's a hackers delight π
@sonic thicket done
Then to the yourscript.sqf add the following:
_myfancycooldown = 10;
while { _myfancycooldown > 0 } do { _myfancycooldown = _myfancycooldown -1; sleep 1; };
playMusic ["Music_FreeRoam_Battle_Human",0];
There are better ways of doing this with E.G. waitUntil but I'm still lacking the confidence in my arma scripting skill to share a solid working method.
Also got a question for whoever could answer this;
Not that the else would ever fire but is this a proper string, as in does while also accepts else ?
while {true} do {} else {};
it works
awesome π
could u explain whats happening in the script though? usually i can read and understand them somehow but this gets me off a bit
as in does while also accepts else ?
no, better said "do" doesn't accept an array.
the variable _myfancycooldown has a value of 10.
Each loop within the while { } checks if the _myfancycooldown has a value higher then 0 and if it does it substracts 1 from the _myfancycooldown value.
This keeps repeating until it reaches 0 and then it continues the script with the playmusic
Thanks dedman π
@sonic thicket
while { true } do
{
if (condition) then
{
// x
}
else
{
// y
};
};
Not aware of any Dedman being here
And here i am trying my utmost best holding in the urge to ping everyone in my responses π¦
_myfancycooldown = 10;
while { _myfancycooldown > 0 } do { _myfancycooldown = _myfancycooldown -1; sleep 1; };
whats the point of this? just sleep 10 instead?
Well.. if the script gets executed 10 times in the first second it would play 10 times π
same with your while and a simple sleep tho
but your while is less exact.
So yours will sleep probably between 10 and 12 seconds or so
I just realized lol, how would I fix that?
just replace it with a sleep?
but if the script gets executed 10 times in the first second there wouldnt be a cooldown
each script would have a 10 second wait
do you want to queue them up, or do you want to just skip calls to the script before the end of the cooldown
skip the calls
store last execution time in a global variable
hmm that can be added easily
get it from diag_tickTime
on call check if currentTime < lastExecuteTime + 10seconds
if yes, exit
_start = diag_tickTime;
while {true} do { if ( currentTime < _start+10 ) exitwith { playMusic ["Music_FreeRoam_Battle_Human",0]; }; sleep 1; };
So i guess that should do it instead then, I hope it works π I haven't tested it myself
@astral oxide
what
π€
currentTime doesn't exist.
_start is a local variable.
why the while loop??
and that yes lol improved version:
if ( currentTime < diag_tickTime+10 ) exitwith { playMusic ["Music_FreeRoam_Battle_Human",0]; };
wait no it should save diag_ticktime
currentTime still doesn't exist.
diag_tickTime is current time, so that if condition will always be true
this addAction
[
"<t color='#0000cc'>REFRESH SCOPEBOX</t>",
{
params ["_target", "_caller", "_actionId", "_arguments"];
_arguments params ["_addScopes"];
{
_target removeAction _x
} forEach ((actionIDs _target) - [_actionId]);
_target call _addScopes;
},
_addScopes, 10, true, true, "", "(_target distance _this) < 3"
];
Is there a better way of removing having an addaction remove actions, without using global vars?
I want to remove every action added by _addScopes, but the actionIDs added by _addScopes can't reliably be communicated to the scope of this addAction
This works, but would remove any other action on the object which isn't always what I want.
if (diag_tickTime < (uiNamespace getVariable ['tag_cooldown',-1])) exitWith {};
_cooldown = 10;
uiNamespace setVariable ['tag_cooldown',(diag_tickTime + _cooldown)];
playMusic ["Music_FreeRoam_Battle_Human",0];
@astral oxide did a check on this one, it really does work now
I was wondering, if I have a normal soldier of whatever side/class, and I do something like that :
_soldier enableSimulation false;
_soldier disableAI "ALL";
_soldier hideObject(Global) true;
is this enough to make this soldier almost "invisible" performance-wise ? If I have this guy and, let's say, 200 others like him, will the game run like there was nobody on the map ?
(question relative to dynamic ennemy spawners and stuff, because I always felt like creating/deleting soldiers on the fly is quite intensive and can sometimes be "felt" by players approaching cities and highly defended areas)
That's what I did this last two years, but to be honest I'm interested in trading a small bit of steady performances against a huge drop of FPS when entering a sector, and another one when leaving the said sector π€·ββοΈ
although reactivating simulation and pathing and stuff on a large group of AI will certainly lead to a FPS drop too
Anyone know if there is a way to whitelist or blacklist certain unit patches from ace arsenal? Or is there a working method of setting unit patches to certain roles that won't be overridden by the ARMA group manager?
I am not sure if this is the right place to ask this. I am wanting to create a zeus addon and it manipulates an object under it. I aint exactly sure where to start on it and I dont see much documentation on scripting for zeus. Can someone point me in the right direction?
Reference the Zeus Enhanced code on GitHub. They also have functions you can run to make custom modules pretty easily.
@brave violet ^
I was hoping to try and do it with out any need for a required mod
In that case see how ZEN adds their new modules, and do it that way.
I'm not an admin either if you were talking to me, the people that have the veteran_moderator role and a brown name are the admins here @brave violet
Very well, so many colors!
Okay peeps if I want to use custom picture for the main menu spotlight with the picture being at the location
P:\@ACQuickJoin\Addons\ACQJ.pbo\ACLogo.paa
how do I enter that correctly in the arma 3 main menu spotlight config? (https://community.bistudio.com/wiki/Arma_3_Main_Menu#Spotlight)
Ah okay 
Hm I cant really find much online about file paths in relation to the P drive, maybe my google fu is just weak though
Looking at ACE is always a good plan
Especially if you use their project template
do you mean their wiki or their files?
Files
Ah oki
it is not however the most simplest way π
if you have Arma data unpacked you have the A3 folder in P:\
thats how BI build their folder structure
Nop I dont have the arma data unpacked
You should
Hm still havent figured it out, I've tried using a UI folder too but that just resulted in pbo project complaining about a missing file
I got it to work with enough fiddling
Thank you to everyone that helped me 
Okay now I gotta dig into the real scripting part
is it possible somehow spawn bots/object behind eyes of player(s) via scripts ?
No you can only affect what is happening inside the game. not the realworld

I mean to have a condition that could confirm: nobody looks at it now
sure
you can check if any characters direction is towards the object for example
if you want to check if it is in the view of any character it does get more tricky
I would prefer to have max distance as one of parameters for condition processing
like 500 meters
if (allPlayers findIf { _x distance _pos < 500 } == -1) then
{
hint "_pos is at least 500m away from all players!";
};
```@warm blaze
thx a lot π
is this:
missionNamespace setVariable ["var1", 0, true];
the same as this:
var1 = 0; publicVariable "var1";
Hi guys, quick question, from a mod directory, any quick access methods to get say, a message to pop up on 3den Load? Not asking for a do it for me, just seeing if anyone has the knowledge on hand
@smoky rune that's not #arma3_scripting , that's #arma3_config
I'm running into an issue with BIS_fnc_createSimpleObject, where it spawns objects floating
What I'm trying to do is store some data regarding an object, delete it and spawn at a later point
For simple testing I'm just doing [typeOf cursorObject, getPosWorld cursorObject, dir cursorObject] call BIS_fnc_createSimpleObject
but same result
Found a solution, it appears that getPosWorld for a regular object is not the same as for a simple object
using it for simple objects you need to use getPosASL for some reason
except maybe not
Copying from BIS_fnc_replaceWithSimpleObject, you need to setPosWorld again after creating the object
apparently
it depends on the createSimpleObject command syntax it seems: World vs ASL
Yeah but supplying it with either getPosWorld or getPosWorldVisual spawns it floating in mid air
short question; is there a (big) difference between
_unit linkItem "NVGoggles";
and
_unit addItem "NVGoggles";
_unit assignItem "NVGoggles";
Since both should add the item to the players inventory, and put it in the correct slot
or is it as simple as I think it is; linkItem will bypass the inventory, and therefor also work when inventory is full
addItem won't work if there is no inventory room yep
Is there any easy way to get a vehicles icon and then mark said vehicle with said icon for either one person or one side?
The reveal doesn't seem to be a good solution so I am thinking about attaching a marker with the vehicle icon to said vehicle.
drawIcon3D + Draw3D mission EH?
But how to I get the vehicle icon?
through config, I suppose
Yeah, I thought about a more automated solution.
Anyways other question: Does anyone happen to know where I can find a kbtalk sentence that announces the Estimated Time of Arrival with a variable time?
@vague geode pretty sure you can do
getText (configFile >> "CfgVehicles" >> typeOf _vehicle >> "icon")
check the config viewer
you can't be more automated than that indeed π€·ββοΈ
@random loom Thanks, that's exactly what I was looking for.
π
Still is there a list of all sentences that can be spoken (by any player) with kbtell?
I suppose so
should be available in config viewer
you can compose your sentence with CfgWords in radio config
^
Just a complete pain to navigate though
probably better to extract the game files and look for it there
see https://community.bistudio.com/wiki/Conversations#.bikb_advanced_example for an example of sentence composition
The advantage is you can make a fully dynamic sentence, as in "target at 030, 200m"
an Operation Arrowhead sniper mission had your spotter speak like this
So I can simply add a .bikb-file to my mission folder and add all the sentences I need and can then use them with BIS_fnc_kbTell?
Also what I meant was a list so that I could search the right sentences with ease instead of needing to click through all the subconfig thingies in the CfgSentences because that can take ages...
E.g. "Everyone out!" is configfile >> "CfgSentences" >> "Showcase_SlingLoading" >> "37_Landed" >> "Sentences" >> "showcase_slingloading_37_landed_PIL_0" so you have to click through numerous submenues.
these are already defined sentences
I don't know of a list of all the official kb assets
Ah, ok. But how does the building sentences thing work because I can not record me saying them...
Ok, but I can just put a .bikb-file to my mission folder, put in the sentences with reference to their soundfiles and then use them with BIS_fnc_kbTell, right?
yes can
Ok, thanks alot.
Hey, Im currently working on a comms script where i change the players comms depending on a situation, however after holding PTT for over 3seconds (give or take) it cuts u off
I can give codeif u need it but im not sure what you will need, im just looking for knowledge abt it
exitWith just exits that code block right? or does it terminate the whole script
okay
How can I let someone say something from the "RadioProtocolENG"?
Ah, ok. I am trying to figure it out...
if I do something like this:
private _timer = [600,true] call BIS_fnc_countdown;
private _alarm = true;
while {[true] call BIS_fnc_countdown} do {
while {_alarm} do {
playsound "evacuate";
sleep 30;
};
_timeleft = [0] call BIS_fnc_countdown;
hintSilent format ["%1 seconds until detonation!",floor _timeleft];
sleep 10;
};
the code will never pass to the _timeleft line as long as that _alarm is true correct?
yep
hmmm. how could i get two loops going in the same code or should i just make two separate files and call them?
what do you want to do? that alarm keeps going? spawn it?
i intend on having the alarm phrase going every 30 seconds cause I'm going to add a looping panic music that occurs during the whole 600 s duration (so that will be another loop). then timer will update every 10 seconds (3rd loop)
the original code i had was
while {} do {};
while {} do {};
while {} do {};
but that wouldn't pass to the next while. I'm now at,
private _timer = [600,true] call BIS_fnc_countdown;
private _alarm = true;
playSound "escape";
private _escapeSound = ASLToAGL [0,0,0] nearestObject "#soundonvehicle";
while {[true] call BIS_fnc_countdown} do {
playsound "evacuate";
_timeleft = [0] call BIS_fnc_countdown;
hintSilent format ["%1 seconds until detonation!",floor _timeleft];
sleep 10;
};
due to me combining different things
still need to loop the "escape" though and I'd like to pull the "evacuate" out for a 30 sec timer
store countdowns for each thing, and just compare the deltas to the delays you want, rather than having so many loops
TAG_alarmLastPlayedTimestamp = diag_tickTime;
while {...} do {
private _currentTimestamp = diag_tickTime;
if (_alarm && {_currentTimestamp > TAG_alarmLastPlayedTimestamp + 30}) then {
TAG_alarmLastPlayedTimestamp = _currentTimestamp;
playSound "...";
}
}
etc etc
@fair drum quick and dirty solution:```sqf
private _handle = [] spawn {
while { true } do {
playsound "evacuate";
sleep 30;
};
};
waitUntil { !_alarm };
terminate _handle;
while { alive player } do {
waitUntil { !isNil { player getVariable "BIS_SUPP_selectedProvider" } && {!isNull (player getVariable "BIS_SUPP_selectedProvider")} };
_pilot = player getVariable "BIS_SUPP_selectedProvider";
_vehicle = vehicle (player getVariable "BIS_SUPP_selectedProvider");
_vehicleType = typeOf vehicle (player getVariable "BIS_SUPP_selectedProvider");
_icon = getText (configFile >> "CfgVehicles" >> _vehicleType >> "icon");
_colourArray = [1,1,1,1];
_index = addMissionEventHandler ["Draw3D", {
drawIcon3D [_icon, _colourArray, ASLToAGL getPosASL _vehicle, 1, 1, 0, 'str_a3_wl_custom_transport' call BIS_fnc_localize, 1];
}];
waitUntil { player knowsAbout _vehicle > 0 };
removeMissionEventHandler ["Draw3D", _index];
};```
For some reason I get an error saying drawIcon3D is expecting 3 elements while getting 0 even though it is clearly getting more. Any idea why?
Do you know any way to count the words of a text obtained from a RscEdit?
@high horizon you could split by spaces then count
any way to get the playSound to not have these spikes of attenuation? I know that this area is technically under the map in some spots and as I walk over those spots it attenuates.
https://streamable.com/s9ar1x
well.. nvm. me being the dumb dumb I am, I didn't test the navmeshes or the hitboxes on this user created map... the AI shoot through the walls so thats a scrap π
Hey guys, I am trying to make a music player for within cars that uses createVehicle and say3d so i can attach it to moving objects However the createVehicle location always has some sort of offset. Same goes for when using the player to determine the location.
I am not sure if this is what causes the issue but I am using HeliHEmpty to create an object
vehicleRadio provided an excelent solution
post code so far
Can someone give me a hand with some radio chat stuff? I want to set a custom callsign for a gamelogic to be used for a simple sidechat. This is my test string [west, "Tower"] sideChat "Hi there";
And this is the class I made for Tower:
class CfgHQIdentities {
class Tower {
name = "Tower";
pitch = 1;
speaker = "Male03EN";
};
};```
I don't think you can define CfgHQIdentities in description.ext
:<
you could use one unit left somewhere at sea to be the HQ, and name it as you wish ?
I tried the setCallsign module for that and I couldn't get it working
use it on a unit, not on a HQ
rubber-ducking the solution!
I currently have 2 Scripting Issues I hope you Guys can Help me with. Its not much really. The First thing is: How am I able to Move Objects with Scripting Smootly, appearing like they have been Animated? (Up and Down Motions, not more) And 2nd, is there a way in Scripting where I can Measure the Distance a Vehicle has Driven?
@vale sky for the latter, you can count every second, or every meter, the distance from earlier position
for the former, see key animations (I don't know anything about them)
Thanks, I'll look into that! To get more into Detail with the 2nd Thing, Distance Stuff, I have to Measure the Distance which a Vehicle Traveled in a Straight Line from some Point on. If the Vehicle Moves Back or to other Sides, it should not Count. Maybe im just Stupid and my 1:23 AM Mind cant wrap around how you could use the "distance" Command for that π
Its a Bulldozer Moving, and if it Moves forward with the Shield down, the Hill its Creating gets bigger, the First thing I asked about was about the Hill, because I dont want to "Animate" it in Visible Steps
pointA distance pointB for a straight line
hm, yea maybe that could work. I'll see if im able to make it work π
How i can add custom flag to vehicle?
Example i found unique flag on google and i want to use it as flag for vehicles on my mission
Like a floating flag?
i'll send you pic in dm
Flag pole, and in the Eden properties there is a flag texture path
You can set your own flag in the mission directory
That or setFlagTexture
So like if my flag is in missions/MissionName/flags/flag1?
No, directly flag1.jpg (or paa)
And everyone will see it on server?
I sure hope so π
Thank you,again
cursorObject setVehicleInit "this addaction ["Arsenal", "["Open",true] call BIS_fnc_arsenal;"];";
does this work?
if not whats the fix?
have you tried it?
yeah not working
what is it that you want it to do?
add arsenal to a box that im looking at
probably use the addaction part only
no setVehicleInit
init does really nothing here as the object is already spawned
init is already over
so
cursorTarget this addaction ["Arsenal", "["Open",true] call BIS_fnc_arsenal;"];
?
didnt work
still didnt work
How did you even tried to do that?
console
Didn't work at what context?
nope
anyone got a RHS and CUP class list? the RHS site link for their classes has been broken forever.
interesting. is there a list of different things such as 'transportSoldier' in the example?
You can if you want
no i mean, how would i know the tons of possibilities i can throw into this command lol, is there a list
Meant a list that contains transportSoldier numbers per vehicles?
no, for example
_transporters = "getNumber (_x >> 'transportSoldier') >= 10" configClasses (configFile >> "CfgVehicles");
where can I find a list of things i can replace 'transportSoldier' with if I wanted to check for anything else
Ah
its the same thing with this
_respawn = _logic getvariable ["respawn",[]];
how would I ever have known to put "respawn" to get this logic
You just can use all of config values
so i would have to go into each config and actually see what categories are available to acquire then
Maybe https://community.bistudio.com/wiki/CfgVehicles_Config_Reference this helps
Hello everyone, I am trying to create a music player with CreateSoundSource so I could delete the source when E.G. someone switches the track playing. I have tried setting the SounrSource Variablespace and then deleting the soundsource with deleteVehicle but without any luck.
Could anyone explain how I would go about deleting the soundsource attached to the player parentobject (car) at the // comment lines in the following part of the script:
_vietnamtrack1 = ["Track01", "Track01", "", {
_playergroup = group player;
["Album BFV", "Track: Fortunate Son", "By: Creedence Clearwater Revival"] spawn BIS_fnc_infoText;
_vehicle = objectparent player;
// ----------------------------------------- Need to delete any current track attached to the objectparentplaying here.
_musicplayer = createSoundSource ["BFVTrack01", position player, [], 0];
_musicplayer attachTo [_vehicle];
}, {true}] call ace_interact_menu_fnc_createAction;
_vietnamtrack2 = ["Track02", "Track02", "", {
_playergroup = group player;
["Album BFV", "Track: On The Road Again", "By: Canned Heat"] spawn BIS_fnc_infoText;
_vehicle = objectparent player;
// ----------------------------------------- Need to delete any current track attached to the objectparentplaying here.
_musicplayer = createSoundSource ["BFVTrack02", position player, [], 0];
_musicplayer attachTo [_vehicle];
}, {true}] call ace_interact_menu_fnc_createAction;
Even deleting the soundsource using allMissionObjects does not seem to work
Well.... it works with say3D lol
Hehe, that works all too well π I've probably missed it on the workshop but If there really is no mod that does this I'm very supriced. It's not too hard to add an music player
curious to know why you are doing it this way instead of something like playSound3d/say3d
Because at first I didnt knew about the #soundonvehicle you can find with E.G. nearestObject and to my knowledge the only way to make a say3d stop is with deleteVehicle.
So i had to make a seperate createVehicle _musicplayer, do an _musicplayer say3D and then I could delete the object but createVehicle has some sort of positional offset
if the _vehicle location is used it spawns next to it instead of dead center and this bothered me big time so I explored all other options, found nothing, posted the issue here and then at the last moment I found out about allMissionObjects which i now use in nearestObject
Ofcourse I could've asked here from the bat and get it all explained but I like to explore how the code works and try out everything so in the end i can believe that what I code is quite roundabout. I think this one is pretty straight on this time though π
@sonic thicket did you check the syntax
Use "CAN_COLLIDE" to set the vehicle EXACTLY where the object position is
Or setpos it after
Whichever
Example from biki:
createVehicle ["Weapon_Empty", getPosATL player, [], 0, "CAN_COLLIDE"];
Oh damn ofcourse, thanks for the tip π
That is very nice to know for future implementations π
dont underestimate the power of BI wiki
setVehicleInit```is **deprecated** and has been neutralised. See https://community.bistudio.com/wiki/setVehicleInit
@grim wing @young current @warm hedge
π
The BIki is a gateway to many abilities some would deem... unnatural
So, for some reason I can't create this simpleobject with any of the following commands:
_craterBB = createSimpleObject["a3\weapons_f_orange\ammo\bombcluster_03_f.p3d", position player];
_craterBB = createSimpleObject["bombcluster_03_f", position player];
I got the info with the command getModelInfo cursorObject
["bombcluster_03_f.p3d","a3\weapons_f_orange\ammo\bombcluster_03_f.p3d",false]
However if I make it a vehicle it does work
isn't it
\a3
instead of
a3
? I don't remember
I have tried both & @ π¦
I wanted to automatically create a crater and more at a location that has a bomb dud, seems I will have to add in this dud manually, its perhaps even better as the amount of locations I will add those are forseeable
@sonic thicket createsimpleobject takes ASL position
position returns AGL
createvehicle takes AGl
That's why createvehicle works
Createsimpleobject was just generating the object underground

Use this on player object: https://community.bistudio.com/wiki/getPosASL
Read here on more information about coordinates in arma 3
https://community.bistudio.com/wiki/Position#PositionWorld
VERY RELEVANT
Next time check if your object exists with !isNull
Let me know if you get it working or if more issues arise

Thanks @ebon citrus π I've already switched things around and placed the objects on the map itself, however with the following tiny script i have tested it:
_craterBB = createSimpleObject["bombcluster_03_f", GetposATL player];
isNulL _craterBB;
this returns true, no object was created
@sonic thicket asl and createSimpleObject takes the FULL shape path
bombcluster_03_f is not a shape path
It looks like a classname
So ofcourse it would create nothing
createSimpleObject may take CfgVehicles class but not CfgAmmo IIRC
hopefully, there is a wiki at hand
You right, didnt check the alternate syntax
But if you use cfgVehicle, then you use asl
Not positionWorld
Minor difference likely
But still meaningful
isn't it
\a3
instead of
a3
? I don't remember
@winter rose it always changes in places π But leading backslash is usually the way to go, but then there are also places where that doesn't work.
Leading backlash is not meant to be on createSimpleObject.
It reads on the biki page
But i found it always confusing when and when not to use it

Maybe if you dig back bohemia historical commits for decades, you might find what and why
Programmer just thought he'll do what he did and not think about standards that's why :D
But for simpleObject mission relative paths work too, so leading \ for absolute path would have been neat π
if i have a bunch of boxes all over the map but don't give them variables, how could I go about selecting them script wise?
mk. trying to learn configclasses... so if i wanted to get the classes of everything that contains the text "OPTRE" would I do something like this?
_configs = "(getText (_x >> 'OPTRE'))" configClasses (configFile >> "CfgWeapons")
Use "'OPTRE' in toUpper configName _x"
will i have to take out the file path then add in quotations to make it a normal array of strings?
Mean you want the array of classNames?
yeah
Then something like this:
"somecondition" configClasses (configFile >> "CfgWeapons") apply {configName _x}```
so like this
_weaponList = "('OPTRE' in configName _x)" configClasses (configFile >> "CfgWeapons") apply {configName _x};
well i guess i have to add a kindOf condition now as well as that pulls in armor
Note that in command is case-sensitive and is why I used toUpper in the example
I guess its time to learn how to manipulate arrays cause now I have an array of class names which I wanted, but now I need to remove things like helmets and stuff from the array
Or make an array of helmets, an array of stuff, and join their content when needed
I have an interesting issue with groups:
On the server I create an empty group and give it a name, and set 'deleteWhenEmpty' to false so it doesn't get removed directly.
_callsign = "CallSign";
_group = createGroup [west, false];
_group setGroupIdGlobal [_callsign];
On a client I call a script to set the player to one of the groups created on the server (this always happens AFTER the server ran its code).
_player = player;
_callsign = "CallSign";
{
if ((toUpper groupId _x) isEqualTo (toUpper _callsign)) then {
[_player] joinSilent _x;
}
} forEach allGroups;
However, when I check allGroups I don't see the groups being created (and I know the script has ran) until I manually run the server script in the debug console (executed by server).
And until I manually did that, the client can't join the group (obviously).
I know that both createGroup and setGroupIdGlobal are global, so it locality shouldn't matter. And with 'deleteWhenEmpty' set to false it should stay even when empty (although wiki notes this is always the case in Arma 3?).
Is there something I'm doing wrong?
PS. the data is retrieved from a database, although for testing purposes the data is hardcoded. It also uses CBA_fnc_serverEvent and CBA_fnc_targetEvent to get data from the server (after DB access) to the correct events at the server/client.
I believe there is an "issue" with deleteWhenEmpty, that deletion will happen no matter what
But nobody was in the group (yet), and it should only be deleted the moment it becomes empty (after units were in)...
Guess it's just a "feature"... so now I need a solution π€
yup
server part, on mission start (XEH postInit)
client part, called manually while in-game
It seems to be related to the "deleteWhenEmpty" feature, which basically removes empty groups.
Question is; is this happening because it takes too long to use the group, or is it caused due to locality π€
Although locality I already busted, since I can run the above scripts from the console (as server and as client) and it works without issues.
So it's most likely a timing issue...
yup - you could add one default unit in it?
yup - you could add one default unit in it?
I could, although that gives the problem of disconnects;
- server creates group with dummy
- client joins group, kicks dummy
- client disconnects (aka leave group)
- group gets deleted anyway?
- client joins again, group is gone...
will try
Not sure if anybody can talk me through this, i want to do a CO-TVT where you have to locate a crash site defended by AI and take it back to your start.
The crash-site I want to be at one of a number of pre-determined locations, easiest way I could do this is set a few spawn markers for it I believe? I'm looking for something a little more complex... so that I can make each crash site look a little more of a set piece, so to do that I would create each full crash-site and have a condition for them to spawn... so lets say condition for spawn might be SITEA, SITEB etc etc...
How would I make the mission script at the beginning to randomly choose which site to spawn this round? Please and thankyou...
selectRandom
switch
so I wouldn't create an array that would randomly set SITEB=true; or anything?
what is this fascination with the set difference operator? in A3 you even have a command to remove from array by index...
to satisfy my curiosity, would you mind seeing what happens if groups are created once the mission is fully initialized say...cba_missionTime > 1
@tough abyss
Doesn't seem to do anything, even added aCBA_fnc_waitAndExecutewith 5 seconds.
But it seems that the groups are not created at all on the server. I also added a diag_log allGroups after the createGroup code, and it just returns the default group which was created in the editor (Alpha 1-1).
Will try to execute the code globally instead and see if that works (although I'm afraid I just create n*1 groups with it...
after choosing an index i and moving out a[i], i would normally move the last element from a[n-1] to a[i] and shrink the array but since this is sqf and you're probably dealing with a small array, deleteAt even if it is O(N)
even if it is O(N)
The overhead of executing more commands will be worse than any in-engine performance thing
per command overhead is going down by about 8% on next perf/prof tho :3
are you still using the same dynamically allocated OOP instructions?
i.e. BlahInstruction derives Instruction with some overriding Execute function
i bet you could get orders of magnitude improvement with a contiguous instruction stream, a tight execution loop, a union for values where possible, and preprocessing local variable access to get rid of the map lookups
at least over a2. i don't know how much you've changed it for a3 of course
at least in some worklods... e.g. any linalg stuff would probably see huge improvement
with a contiguous instruction stream
nah, I tried
a tight execution loop
it already is, iterate through array of instructions until timelimit runs out
preprocessing local variable access
can't do, your function can be called from anywhere, and if you have a call in there it can call to anywhere
orders of magnitude improvement
no
you tried a bytecode instruction stream?
why not? lots of ISAs have variable size instructions
we currently have array of instructions. not much different from a bytecode stream with all the info in there. Minus some padding ofc
the tight loop kind of plays into this. in most "high performance" script vms instead of an actual loop, after each instruction you jump directly to the next one. think gnu address-of-label extension.
huff
I have another 10% performance improvement for script execution that I couldn't do yet
as for optimising local variable access, i bet you could do it locally to some extent at least
mark your variables as private if you want to get fast access/set
right
One big problem making scripts slow is that we also need to constantly do things against cheaters/hackers. Such a drag
many CPU cycles are lost to the great hackers warβ¦
but even with private locals you're still doing a table lookup on each access, yeah?
yeah but only one table
right. i think you could eliminate the lookup in many cases
link the instruction directly to the variable slot at script compile
as soon as you have a single "call" or "isNil" or && or || or tons of other stuff that executes code, your variable might have been replaced with something else
I grab things by profiling and seeing whats slowest.
local variable lookup did barely show up in my benchmark script
How to I get a title to show to only one player, this message goes to everyone on the server titleText ["<t color='#44ff00' size='3'>test message</t><br/>", "PLAIN", -1, true, true]; This script is running in a mod. It is supposed to send "onPlayerConnected" to the person that is connected but it sends to everyone.
@tough abyss where is it run?
heh, i suppose it's not worth the effort of completely reimplementing the vm or building an optimiser. you've got that new dayz sa language as well right
you've got that new dayz sa language as well right
not in A3 afaik
right, but they wouldn't be pouring resources on SQF at this point i imagine
meant to only be on the server
right, but they wouldn't be pouring resources on SQF at this point i imagine
ah now I got it yes "you got that on your arms already"
right, and i'm guessing there will be no new titles using SQF
@tough abyss is it a mission EH, an object EH, ?
where's the fun in that
I don't know Β―_(γ)_/Β―
where is it written, where is it run, what are you trying to do?
@tough abyss Thanks, your example worked great, seems to be deleting all the props, one more question, how would I get it to incorporate things like smoke modules, chemlights etc
constant propagation and some math identities might be interesting but i guess if you can't inline functions you're missing the best part of an optimiser
but i guess if you can't inline functions you're missing the best part of an optimiser
exactly, can never know what will be in a global variable.
I got it Lou, i need to put in an initPlayerLocal.sqf, thanks for the help
still, you could do local constant propagation, identities, loop transforms, dead code elimination, at least to some extent
but callees being able to write your locals definitely screws with that
dead code doesn't need to be eliminated
yeah it's not the most important optimisation certainly
if it's dead-dead, performance impact = 0
if it does unneeded operations, improvement/refactoring is welcome
a if statement that always evaluates false does waste some performance
but not really worth the effort
might aswell just not write bad code
things like inlining array creation does alot tho
even if it's never touched technically it's still eating up cache in a tightly packed contiguous instruction stream
if the instructions are all over the place then you're probably wasting a lot of cache anyway
they are
can't know if "if" branch will be taken or not
and if then code can be a variable too, and a global one too. Meaning no optimization
ah but that's a rare case
sure
but you could optimise the 99% of cases where the code following a then is inline
i'm not saying it's worth it writing that optimiser for sqf
the rules are too loose
It won't help much
what would help moist is constant folding and changing how arrays are created
changing array creation sounds easy enough
any hint on the perf gain?
don't remember the results
ofc depends on what you're doing. There is no real benchmark script that does something from everything
One could in theory optomize away false evaluating Code, unroll loops etc
But that is quite complex to do
And requires pre compilation
Guys, I need to find a way to see get the distance a vehicle has driven forward, no Matter what direction it turns. Could I use Distance2D for that?
so if it it drives around a circle you want 2*pi*r?
distance2D only returns the distance between 2 points, so if he would stear left/right -> false result
yes, thats the Problem in Facing
you could poll it and add up the distance
You probably want something like (of course not 100% accurate):
store last pos -> wait 1s -> check distance2D between those two points and add it to an existing distance counter -> repeat
exactly
(rough example to give you the idea)
problem is
As i said: not 100% Accurate.
Why unknown?
you need to keep track of the last known location
oh wait
now I think I know what you mean
Basically the Vehicle Starts Moving > Creates Point1 > 1sec later Creates Point2 > after Point2 was created it measures the Distance between Point1 and Point2
and adds them up when the Vehicle Continues driving
keep going
_start = getPos _car;
_someBoolStatement = true;
_dist = 0;
while{_someBoolStatement}do
{
_end = getPos _car;
_dist = _dist + (_start distance2D _end);
_start = _end;
uisleep 1;
if _dist > 10 then{_someBoolStatement = false;}
};
systemchat str ["Distance driven:", _dist];
something like that βοΈ
But as said: Not 100% accurate + it also counts if the vehicle moved backwards etc
hm, yea the Backwards Driving is still a Problem
Yep, that is something for you to solve now π
is there a Command to get the Speed of a Vehicle?
surely you want velocity..
just found it
sshh Untelo
No fun in serving everything on a plate π
you what mate
(hint: speed)
with Keanu Reeves right?
Yeah
Not the whole
is Backwards driving giving Negative Values?
yes
Just check it out (+read the Descriptions on the biki)
performance-wise: is there any value in declaring a script as a function and call/spawn it, instead of using execVM?
(for a one-time call, should I add)
I guess it's faster, since it won't need to "load" the file?! Never rly used execVM tbh.
execVM reloads the file, recompiles the whole script
and preproc
one time call, not really a difference
execVM saves you some memory, as all the stuff is thrown away after use. But you don't care about memory
I guess memory is the least of the problems
btw: Was there a simpler way to get the "player" from the ownerID, except for cycling through units?
nope, and I got a function for that
same here, was just curious if there was a simpler way added recently
Anyway to check if vehicleplayer is on road or grass?
thx
https://community.bistudio.com/wiki/surfaceType
@high marsh
π
Can somebody help me in dm about attaching object to vehicle ?
If you ask your question here more people will be able to help
I cant send pic here
I want to attach banner on my truck left side
But i dont know how to get right cordinates
i've heard about getpos but i have no idea how to use it
boom, if you already have any points setup on the left side you can do that
otherwise, I believe when using attachTo it's literally just relative to the model center.
Attachto syntax and https://community.bistudio.com/wiki/setVectorDirAndUp
if houses are under 'house', what are military buildings under?
Uhh
Strategic?
Im pretty sure everything is under house to some degree
Even gates

Is there a land in the map that the height of ATL is lower than ASL?
I mean the surface of the map is lower than ASL. which area? excluding sea.
I don't think there is. Pond water and stuff is frequently just placed there by the terrain maker and doesn't count as a water surface for ASL
what command do I use to change the heading a unit in a turret is looking at? setDir moves the whole object
iirc there's something like 'target'
looks like everything involving 'target' involves the ai looking at an object. im just trying to get them to look around.. so far i have
_direction = 0;
while {alive gunner aa} do {
aa setDir _direction;
_direction = _direction + 60;
sleep 5;
};
but I don't want to use setDir since it moves the whole turret base
or is there the ability somehow to call the function that controls the "scan horizon" on the player to AI command bar
Can i get help making a exile server here?
@tough abyss #server_admins #server_linux #server_windows #server_tools
Remember not to break the crossposting rule @tough abyss
@oblique arrow sorry I thought building a server was a version of scripting. Still new to this kind of stuff
eventually when you want to customize that mission, it will involve that, but getting it off the ground is for those channels
hey guys, is it possible to put a space where patches can be seen on a vest?
Hey guys little question how can i force ai to shoot while he is doing an animation, i tried to look for it in the forum but i found nothing i also tried to use the forceweaponfire function but it didnt work, i will be glad if someone can help me
@frail vault yes => #arma3_model
Try that
This leads me to believe it would work
Weapons can be fired in this way from a not-readied position (eg, firing a rifle on a soldiers back).
I have a question concerning the HandleDisconnect mission event handler: It says in the community wiki that "If this EH code returns true, the unit, previously occupied by player, gets transferred to the server, becomes AI and continues to live, even with description.ext param disabledAI = 1;"
Does that mean that it becomes an NPC until it dies or does it become and NPC as if the AI option was enabled in the description.ext meaning it respawns after death and just continues to play until the mission ends?
Depends on your respawn options and methods. I dont think vanilla AI respawn in this way with vanilla respawn modules if AI is disabled
I could be wrong, though
Usually best is just to handle the unit at disconnect if you need continuity
Like moving them to a debug area outside the map and disabling their AI
Try it?
There's already a system in place for dealing with disconnecting players (thy either drop dead or despawn altogether) so moving them out of map etc. isn't necessary.
I just thought it would be cooler if their unit lived on until dead because despawning comrades isn't very realistic, is it?
live until it dies, yes
but the question was "will it blend respawn?"
what for�
Does that mean that it becomes an NPC until it dies or does it become and NPC as if the AI option was enabled in the description.ext meaning it respawns after death and just continues to play until the mission ends?
@fair drum try https://community.bistudio.com/wiki/doWatch
hey guys is there any way to make heli engines look like they are on and moving in editor?
yes, but why?
if for screenshots, I would recommend you use Polpox's screenshot framework π
yeah i am using
but i just want to save time and screenshot it in editor
so i need to know how to make the heli engines on effect
you select it, then get it with```sqf
(get3DENSelected "object" select 0)
then you enableSimulation true
thank you man
and one more quick question
how can i make heli stay static in air but with engine on?
@winter rose
not in eden editor hh
not in editor? just place it > 30m altitude iirc
place above the ground > 30-50m in Eden,
then setPos where you want and enableSimulation false
not sure if rotorblur will be visible with disabled sim. attachTo mby?
It's already explained in the guide I wrote and linked in the #screenshots_arma ...
I did try a lot of stuff and it seems to be working now, although no idea why and how...
I did add some fallbacks just in case, because sometimes it still removes the groups before I can access them
@fair drum try https://community.bistudio.com/wiki/doWatch
@copper raven
The problem with dowatch is I need a target. I just want to use a unit circle heading.
just calculate some position relative to the heading you want
@bold mica
https://community.bistudio.com/wiki/Introduction_to_Arma_Scripting to begin with SQF π
look at the examples
@eager pier click the "Show Text" button in the description, it's a bit hidden
it is not structured text, but close enough
How can I sign the mods so that they cannot be messed with hacks? and what do I have to sign
Γ§
Uh I'm not sure what you mean with signing them, if you mean signing them with a bikey that just means that they can be used with the signature verification feature on servers @slow falcon
what I want to do is encrypt the mods so they don't mess with cheats
what exactly are you looking to encrypt?
you can obfuscate sqf to make changing its behaviour more difficult
only one altis can be encrypted or it can be from pop3 mods
what you're talking doesn't make much sense
only one altis can be encrypted or it can be from pop3 mods
Sorry can you rephrase what you mean? I'm not really understanding it
and I don't understand what #arma3_scripting you want to do
Educated guess is Altis Life server that would be protected from hackers and cheaters.
I'm pretty sure he's talking about a multiplayer mission so yeah could be altis life
I got a script where I have a backpack and when i Drop it I can delet it to use the inside
Now I want to get the same backpack back after I am finished
I just need to get the class name of the backpack from the config.cpp saved into a variable in my delet script and open this variable in the finished scrpit
As dedmen mentioned you can use backpack to get the players backpack https://community.bistudio.com/wiki/backpack
yeah but i need to delet it and get it again later so how can i save it to a variable which is Shared in 2 files
I'm not sure how you can transfer it between 2 files but cant you just save the classname in a seperate variable before the backpack is deleted and then use that?
I don't know beacause I'm new to scripting
I would use anything that works
do you have abny idea
config.cpp
class Backpack{
class EventHandlers
{
init="_this execVM (""\scripts\init\init.sqf"")";
};
};
init.sqf:
_staticBackpack = backpack player;
finish.sqf:
use _staticBackpack;
explain more detail what is it you want to happen
why do you delete the backpack and then need it again
why not just not delete the backpack
if you delete it you cant access it anymore
i want to get the profile or steamprofile name of a player... profileName and profileNameSteam look to have no defining syntax. How would I use these?
i guess it works if it is run locally, guess i need to figure out how to collect all the player names for the server only script
one way is to setvariable the return onto the unit with the server as the target, then the server can getvariable the name off the player object.
sooo....
_profileName = {profileName};
engie1 setVariable ["userName",_profileName];
running locally then,
_profileName = engie1 getVariable "userName";
etc
run serverside?
well I'm just trying to do some death messages, and this is where I'm at so far...
_engie = [engie1,engie2,engie3,engie4];
{
_engineer = _x;
if (!alive _engineer) then {
format "%1 has been killed!", blahhhhhhhh something something hint remoteexec on clients
}
} forEach _engie;
blah is where I'm at. if i had to do something locally, i would have to do two scripts instead
or remoteexec a function server-side
the client passes the player steam name as a variable to that function
and it's fired at the killed eventhandler
maybe something like this?
_engie = [engie1,engie2,engie3,engie4];
while {true} do {
{
_engineer = _x;
_owner = owner _engineer;
if (!alive _engineer) then {
_profileName = [] remoteExec ["profileName",_owner];
[format ["%1 has been killed!",_profileName]] remoteExec ["hint",0];
};
} forEach _engie;
sleep 1;
};
i was meaning
engie1 setVariable ["userName",profileName,2];
and then the server can get the variable off the unit whenever it needs to.
for death messages specifically I would normally do that with a killed or mpkilled eventhandler, but whatever works.
_profileName = [] remoteExec ["profileName",_owner];
[format ["%1 has been killed!",_profileName]] remoteExec ["hint",0];
that would not return the profileName from the first remoteexec, because remoteexec does not return the result of the remote executed command/fnc.
ran into a super weird AI issue:
an AI/GL walks after a setPos into a cover position (bush) no matter what (fleeing returns false)
doStop, stop, disableAI "move"/"fsm"/"all", removing all WPs, allowFleeing 0, etc - nothing worked
only switchMove "" made him stop in the end
What's the mode of the AI? e.g. Combat, casual (or however they are called)
was careless and yellow, but tried all variants too
π€
I call "mods" for 5000 Alex!
so i am trying to introduce pain inducing bullets into a mod, and i have no experience with scripting. This is my best shot at it, i am pretty sure i messed up alot there. Can someone help me with that?
this addEventHandler ["HitPart", {
params ["_ammo","_target"];
if _ammo = ["AmmoSplinterRM","AmmoSplinterRS"] then (
if (isClass(configfile >> "CfgPatches" >> "ace_main")) then (
_painLevel = _painLevel + 0.2 _target;
else (
_currentdamage = getDammage _target;
_newdamage = _currentdamage + 0.1;
)
)
}];```
another option would maybe be to give _target the ace modifier of : painReduced=-X , as it is stated in medicaltreatment for e.g. morphine.
Tho i don't know if painReduced works with negative numbers
How would one saves placed objects via ACEs fortify tool to inidbi?
So they save into a database and donβt poof after a restart
Hello, in the creation of my clothing shop I have this problem: line 273: Config: 'U' encountered instead of ','. Yet there is nothing wrong with this line?
Paste the line of code, 4 before and 4 after
class gang_clothing {
title = "STR_Shops_C_Gang";
conditions = "";
side = "civ";
uniforms[] = {
{ "NONE", $STR_C_Remove_uniforms, 0, "" },
{ "U_IG_Guerilla1_1", "", 1500, "" },
{ "U_I_CombatUniform", "", 5000, "" },
{ "U_I_CombatUniform_tshirt", "", 5000, "" },
{ "U_I_CombatUniform_shortsleeve", "", 5000, "" },
{ "U_I_GhillieSuit", 75000, "" },
{ "U_I_OfficerUniform", "", 155000, "" },
{ "U_I_C_Soldier_Bandit_1_F", "", 4000, "" }, //Apex DLC
{ "U_I_C_Soldier_Bandit_2_F", "", 4000, "" }, //Apex DLC
{ "U_I_C_Soldier_Bandit_3_F", "", 4000, "" }, //Apex DLC
{ "U_I_C_Soldier_Bandit_4_F", "", 4000, "" }, //Apex DLC
{ "U_I_C_Soldier_Bandit_5_F", "", 4000, "" } //Apex DLC
};
headgear[] = {
{ "NONE", $STR_C_Remove_headgear, 0, "" },
{ "H_BandMask_blk", $STR_C_Civ_BandMask, 300, "" },
{ "H_Cap_headphones", "", 400, "" },
{ "H_Booniehat_dgtl", "", 500, "" },
{ "H_Booniehat_tna_F", "", 500, "" }, //Apex DLC
{ "H_MilCap_dgtl", "", 35000, "" },
{ "H_HelmetIA", "", 95000, "" }
};
goggles[] = {
{ "NONE", $STR_C_Remove_goggles, 0, "" },
{ "G_Balaclava_oli", "", 15000, "" }
};
vests[] = {
{ "NONE", $STR_C_Remove_vests, 0, "" },
{ "V_PlateCarrierIA1_dgtl", "", 39000, "" },
{ "V_PlateCarrierIA2_dgtl", "", 49000, "" },
{ "V_PlateCarrierIAGL_oli", "", 59000, "" },
{ "V_PlateCarrierIAGL_dgtl", "", 79000, "" }
};
backpacks[] = {
{ "NONE", $STR_C_Remove_backpacks, 0, "" }
};
};```
^^
Where's your line 273?
{ "V_PlateCarrierIA1_dgtl", "", 39000, "" },
Also use ``` <- this formatting
But when I remove the vest lines, the error is still there for the goggles, etc etc etc.
Pastebin your entire code
And you put this into description.ext, and how?
It's a config master that includes the config shop.
What's the config master?
I get nothing, since I know nothing about the script/config format or something
#include "Config_Clothing.hpp"
Paste your entire description.ext please
but I know the mistake didn't come from there, the mistake came from the clothing config.
You meant if you comment out the #include won't cause an error?
I mean, if I hadn't put more clothes in the shop, there wouldn't be this mistake...
Excuse me?
I added clothes, and that added that mistake.
The file without the modifications yes has no error
No, it doesn't even work without
The error then goes from 273 to 269
Might caused by wrong and invisible character. How about to rewrite the same thing?
I'm thinking of doing it by elimination, since the error is not visible. I'll see and tell you again if it still doesn't work. Thanks to you π
config.cpp
class Backpack{ class EventHandlers { init="_this execVM (""\scripts\init\init.sqf"")"; }; };init.sqf:
_staticBackpack = backpack player;finish.sqf:
use _staticBackpack;
@young current
I need to delete the backpack which is empty and then spawn an backpack (just the same model) again so I can use it again
I can not explain it more but thi sbackpack has an funktion with lets "transform" the backpack (delet it and spawn something else) and later I want to make it backward but I dont know how I can save my backpack model/class name
After running
player action ["Surrender", _unit];
Is there a way to un-surrender captive unit? That is to return him to normal animations state.
nope, afaik
You mean like:
player action ["", _unit];
Returns Foregin error: Unknown Enumeration
try
player switchMove ["", _unit];
or just put ANIM in the quotations
also could try just the regular player switchMove "ANIM"; / "";
Thank you so much. I could give you a big fat kiss
np π
I need to delete the backpack which is empty and then spawn an backpack (just the same model) again so I can use it again
I can not explain it more but thi sbackpack has an funktion with lets "transform" the backpack (delet it and spawn something else) and later I want to make it backward but I dont know how I can save my backpack model/class name
@thin owl can you help me too
bit of an odd thing to do
I know but rest is finished and works
you got everything, you just need to find the backpack model?
yeah I just need to save the classname of that backpack and open it in an other file
thats a little outta my realm fella lmao
no i want to delet it in init and later replace it in finish
@eager pier
I alredy can spawn it but not with the same model/texture
the texture is saved in the config.cpp of this mod
A script which delets the other things and spawns a backpack (already on the player)
_caller addBackpack _staticBackpack;
if I wrote the classname of one of my backpack it works but for that I have to change it everytime in the script so I want to use a variable which knows the classname of the backpack which i deletet in init
you cannot remove stuff from an init and move it to another file
I want to define a variable in one script and call it in anotherone
like
_staticbackpack = backpack player;
other script
Addbackpack _staticbackpack ;
if I wrote Addbackpack (name of backpack class); it works but due to multiple backpakcs this script is for I need to use a variable
Hello people of this fine discord.
I have a simple and humble request of assistance.
What is the most simple way to check if a group of AI has completed their 1 and only waypoint?
_wpBoatSatus = False;
_wp = _BoatCrew addWaypoint [_Targetpos, 50, 0];
_wp setWaypointStatements ["true", "_wpBoatSatus = True"];
waitUntil {sleep 15; ((not alive _TheBoat) or (_wpBoatSatus))};
so something like this?
@eager pier THank you very much it works but one last question
is it possible to make something like _staticbackpackID setVariable ["backpackClassNameToRemember",_staticbackpack];
because this script will run in multiplayer and so if someone dies and anotherone wants to use his backpack it doesn't work anymore
_wpBoatSatus will always be false, local variables carry over into lower scopes, but not into new scripts, either make it a global variable, or better - call some function when either _theBoat is destroyed, or the waypoint is completed, and run stuff there, rather than having waitUntil mess constantly checking, when you can actually know at what time exactly the condition will be true. @proud carbon
ok due to I am really new to scripting do you know howI can do this
@eager pier
I am a bit lost. how do I know the time at which the condition is true?
well my script will spawn in boats every time a boat dies.
killed event handler on the boat + what you already have with the setWaypointStatements
I'm a bit new to event handlers, but how do I resolve when the boat reaches the destination?
because then I want to give it another waypoint
I'm a bit new to event handlers, but how do I resolve when the boat reaches the destination?
https://community.bistudio.com/wiki/setWaypointStatements
ok I see what you mean
With the kinda support of this discord, I got the script working. only problem is the bridge kills the waypoint for some reason.
but that's a mod problem. Thank you @copper raven @eager pier
@eager pier Thank you very much for your help
does anyone which type is a backpack which lays on ground (backpackContainer or simlar)
Is there a way to add a class? For eg I have below in description.ext. Done searching (https://community.bistudio.com/wiki/Class_Inheritance)
//description.ext
class CfgCommunicationMenu
{
class someCommMenu;
};
//myComm.cpp
class myCommMenu;
And I want my class to be added to there without conflict and letting my script user do #include once at the last part of description.ext.
Like below
//description.ext
class CfgCommunicationMenu
{
class someCommMenu;
};
#include "myComm.cpp"
//myComm.cpp
class myCommMenu;
And I expect result config to be like this.
class CfgCommunicationMenu
{
class someCommMenu;
class myCommMenu;
};
Is it possible or should I just say users to manipulate their description file?
you can, but place your include inside the CfgCommunicationMenu
include is just "write this file here"
You again?
me again
Brilliant
Always forget...
#include should be something like #ItReallyReplacedTo>>>>>>>>>>> "here"
hey guys i am getting an error with my script, maybe im blind but i cant find what i missed
the game say "Error Missing ;"
then something is wrong indeed
post on e.g sqfbin.com ?
wait i am posting the script
maybe i am missing something
and you guys can help me
this is the script
the game say "Error missing ;" in line 10
indent plz π
what hhh?
use tabs please, and spaces π so it is easier to read
reading it rn to find the issue
kinda, I redid the indent and something was off
thank you let me check it
mine is butter, there
;γ ;
textFx for npp is great but can we indent sqf file in VSCODE too?
Just as same as NPP TextFX
Its now giving me a big error
I use npp to beautify code and VSCode to code..
what a small screen
no
i just took a screen shoot with light shoot program
and it looks realy small
hhh
imgur
still small to read
I have attached a variable to a backpack and want to access it when the backpack is laying on the ground, anyone knows how it works?
backpackContainer on the weapon holder
Ok i am really sorry but I dont get it
backpackID = unitbackpack player;
backpackID setVariable ["backpackClassNameToRemember",_staticBackpack],
instead of unitbackpack backpackcargo to write the variable?
here with script @still forum @thin owl
init.sqf 1.
private _id = backpack player;
backpackID = unitbackpack player;
backpackID setVariable ["backpackID",_id]
use.sqf 2.
_backpack = cursorTarget; //Script is started from backpack laying on ground
_id2 = _backpack getVariable "backpackID";
Shouldnt you be able to cut out the ID and just do
unitbackpack player setVariable ["backpackClassNameToRemember",_staticBackpack],?
yeah but I need tha variable later in other things too, but it don't works with both sets
ah oki
do you know how it could work?
nop
ok thanks anyways
backpackID = unitbackpack player;
why do you use unitBackpack when I told you to use backpackContainer?
my
on the weapon holder
was wrong though, on weapon holder (on the ground) its
everyBackpack command
is it still impossible to fully replicate vehicle inventory? i seem to recall even in A3 there were some cases you either couldn't query or reproduce with something like attachments on a rifle in a backpack in a vehicle
init.sqf 1.
private _id = backpack player;
backpackID = backpackContainer player;
backpackID setVariable ["backpackID",_id]
use.sqf 2.
_backpack = everyBackpack cursorTarget; //Script is started from backpack laying on ground
_id2 = _backpack getVariable "backpackID";
why do you use unitBackpack when I told you to use backpackContainer?
@still forum so?
"everyBackpack" returns an array of backpacks
_id2 = (_backpack select 0 )getVariable "backpackID";
ok thx
Hello, I need to know when the player starts aiming down sights
How do I know that the player has started aiming down sights?
As soon as RMB is pressed (even if it is rebinded)
"everyBackpack" returns an array of backpacks
@still forum thank u u are the best
@peak plover https://community.bistudio.com/wiki/cameraView
ok and this is hopefully my last post to this mod
is it possible to make something like an if ()then{} in the config.cpp to look if an extra mod is installed
no
ok
