#arma3_scripting
1 messages · Page 33 of 1
oooh, got you now -- thank you 🙂
Help! I am trying to reskin a T100 but can not figure out how to add all 3 textures to different parts of the tank currently trying this
Fnc_Set_Textures = {
_vehicle = _this param [0,objNull,[objNull]];
if (isNull _vehicle) exitWith {false};
private ["_texture","_selection"];
switch (typeOf _vehicle) do {
case "O_MBT_02_cannon_F" : {
_texture = "Data\VehicleSkins\mbt_02_greengrey_body_co.paa";
_selection = 0;
_texture = "Data\VehicleSkins\mbt_02_greengrey_turret_co.paa";
_selection = 1;
_texture = "Data\VehicleSkins\mbt_02_greengrey_co.paa";
_selection = 2;
};```
```sqf
// your code here
hint "good!";
```
↓
// your code here
hint "good!";
I dont understand, You dont set them in the init file?
No, you retexture vehicles by setting their hiddenselections in their config
I am editing this in the mission file's init
Now given the way its setup how would i add hiddenselections? Ive seen that on the mod im making for uniform textures but havent seen any vic textures using that
Always setObjectTextureGlobal and then the path
Also edditing vanilla assets. Are you saying it is easier to add it to a mod and do it in the config.cpp? Because i figured that was the hard way
class CfgVehicles {
class classnameparent;
class classname : classnameparent {
hiddenSelectionsTextures[] = {"yourpathtotex1", "yourpathtotex2"};
};
};```
its easy enough
#arma3_config for that though
Again though that is for a mod not the mission init yeah?
See i had been doing it like that and setting up a vehicle respawn to keep the textures added
Appreacite the advice will look into it
to clarify
classs classnameparent;
classnameparent is just my variable right?
then the class classname : classnameparent it would the vic class name : my vairiable
no
classnameparent is the parent class of the one youre retexturing
found in config viewer
no, place in 3den, right click, find in config viewer, at the bottom it should say parents or something of that ilk
you want the one thats at the end of that
if you need any more help tag me in #arma3_config
Anyone familiar with putting "livestream" cameras on a rugged large screen in a base? I'm attempting to have multiple UAVs show different areas at different times during a mission but the things I'm finding online aren't working to my liking. I have 3 uavs for 3 different screens. I would appreciate any assistance anyone can provide. Thank you in advance.
EDIT: I am stupid dumb when it comes to scripting so I apologize if I come off that way.
What you're looking for are r2t dynamic textures.
There's a good tutorial about using r2t with UAVs by killzone kid here:
http://killzonekid.com/arma-scripting-tutorials-uav-r2t-and-pip/
Thank you. I tried following it but I must of messed up along the way because it doesn't seem to working at the moment. I'll keep at it. Thanks!
It is me again,
I can't seem to get lineIntersectsSurfaces to work how I want it to -- only return the number of object surfaces between the player and a pre-exiting object.
count (lineIntersectsSurfaces [_objPosASL, _playerPosASL, player, _obj1, true, -1, "GEOM", "VIEW", false])```
variables are fairly self explanatory, however this returns 1 always -- even when there's nothing between `_obj1` and the player
So here, return 0. On the other side of the cube, return 2 (as there's 2 faces of the cube between the player and object, though I'll settle for 1)
Assuming _obj1 is the object associated with _objPosASL, I don't see why it'd be returning 1 with nothing between you. Can you show what the command returns in that case?
Does anybody have, Any clue how you would use "BIS_fnc_removeRespawnInventory". for some reason i just cant find any resources on removing loadouts. and i have no clue what im doing
What is the goal for you?
ive got an issue with JIP in my current setup
in which, every unit has a variable name
and ive used "[Soldier1, "Rifleman"] call BIS_fnc_addRespawnInventory". to do each thing, however they'd all be jumbled if another person joined. so now ive switched to west, call bis_fnc...
and the issue it
i wanna remove the loadout from a single unit. whilst keeping it on west so that JIP isnt removed
So far this is my initServer.sqf file
BIS_fnc_addRespawnInventory returns the target and the id needed for BIS_fnc_removeRespawnInventory. So you can just use them like so:
private _temp = [west, "US"] call BIS_fnc_addRespawnInventory;
_temp call BIS_fnc_removeRespawnInventory;
so, Is private and _temp representing something? because im quite lost
private _temp is defining a variable named _temp to store the results of [west, "US"] call BIS_fnc_addRespawnInventory
which you then use as the value to send to BIS_fnc_removeRespawnInventory
So i could do something like
private, (as in private variable) _Officer = [west, "US"] call BIS_fnc_addRespawnInventory;
_Officer call BIS_fnc_removeRespawnInventory;
and this would somehow result in everyone but the officer getting the loadout?
correct, though you're missing an = on the BIS_fnc_addRespawnInventory line
(and a space between _Officer and call)
Ok. and this isnt just removing it for everyone, but just the officer?
Well actually no, hold on
hmm
...try this
private _target = blahblah; // Set this to whoever you want to remove the inventory from
private _temp = [west, "US"] call BIS_fnc_addRespawnInventory;
_temp set [0, _target];
_temp call BIS_fnc_removeRespawnInventory;
ok so Target is the person who i want to remove the loadout from. temp is the loadout, and setting it to 0 is a Boolean, that disables it on them, and then calling it removes it for just them?
Not a boolean, _temp ends up being an array of format [target, id] which set [0, _target] sets the 0th index (target) to _target
and then that modified _temp is used with BIS_fnc_removeRespawnInventory to hopefully only remove it from that target
ill try that then. and let you know if it doesnt work
blahblah; is the Variable name yes?
_target is the variable name, replace blahblah with the unit variable name
Right
Damnit
didnt work
is there a way too see whats running in the background like scripts and which ones are taking the longest to process etc? building an altis life server and FPS seems pretty bad
That might be checking 1. Task manager and PC, or 2. experimenting with some things in eden
btw Sysroot it might help if i mention that the end goal is to apply the respawn loadout to west, however create an exemption script that can be used to stop others from having it. so if theres a way to simply remove someone from the west script. like an "uncategorised.cfg" or something that would also probably do the job
the only thing i can really think of would be to instead of going _temp call saying _target call
won't work
one thing you could do, is just apply it to each unit on west individually, excluding a list of units you want to exclude
like so:
private _excludedUnits = [unit1, unit2, ...];
{
[_x, "US"] call BIS_fnc_addRespawnInventory;
} forEach (units west) - _excludedUnits;
Holy moly thats exactly what i was hoping for
a thing that just skips over certain ones
Thanks man!
No problem
_x meant all correct?
basically, it gets replaced by each individual unit
thank you!! i gather for 1 i just make sure pc (dedi) is running well. with 2 EDEN is it just less objects mean more FPS?
Right
With eden its simulation
for starters, Vehicles
make them simple where possible, or cut down AIs
then try to make it Multi script if its choppy, but if its doing 20 things per frame then maybe try to cut down the number of scripts and focus more on dynamic simulations
and with eden i've found making walls simple is really helpful. same with cutting code to make the code smaller and thus faster to run through
@blazing loom If you run that command I sent in debug console, it'll give you a printout of all of the SQF scripts currently running in the background.
that helps! thanks.
yeah i ran it but it was too big for screen so im trying to get it to work with diag_log ""; but not sure on syntax to use
https://community.bistudio.com/wiki/diag_captureFrame this is useful too
would i use that like this? doesnt seem to work.
[] spawn { hint str diag_captureFrame 1; };
and i tried hint "diag_captureFrame 1;";
Can't hint it, it opens a gui
doesn't return a string
or, alternatively, if it's running serverside, it just logs the data in the same directory as diag_log
Can get the actual returned later on but it was the terrain I believe
However when I did a systemchat oneachframe of the returned value it never changed anything except positions, regardless of my position in regards to the object
I.e if I was behind the cube it gave the same result as in front
hm, would need to see the returns
[[[2772.84,879.524,5],[0,0,1],<NULL-object>,<NULL-object>,[],"#GdtVRsurface01"]] is what's returned by this.
private _obj1 = KJW_Source;
private _playerPosASL = getPosASL player;
private _objPosASL = getPosASL _obj1;
//End variables
//Begin code
systemChat str (lineIntersectsSurfaces [_objPosASL, _playerPosASL, player, _obj1, true, -1, "GEOM", "VIEW", false]);```
with me just stood here
Hi, well some reason bis_fnc_randomPos return position which is not in given area. Could you say what i should change?
[[3103.54,5951.89,0],[250,255,0,true]] call BIS_fnc_randomPos
[center - position of module (3103.54,5951.89,0) ], [a,b (a = 250, b = 255 (size of area)), angle (0), rectangle (true)]
at it return
[3495.71,4491.24,0]
Which is not in area
250 & 255 is from the center I believe
Yeh, seems i don't have correct syntax
Also, the second argument is a blacklist, not a whitelist
Yeah
it's in 1 array that 1st, thats my problem
Nvm you're just using the first arg
you need one more array level
Yeah
should be [[[[3103.54,5951.89,0],[250,255,0,true]]]] call BIS_fnc_randomPos
Found out that with pasting my code to Watch list and it give error for wrong syntax
👌
changing to eyepos player doesn't change anything either 
Not even any positions returned
Hm, not sure
try moving your source object to be hovering slightly off of the ground
gotcha
aha, vectoradd [0,0,0.5] works
However is only returning 1 count when behind the VR object, any way for there to be 2?
I guess I can just double it actually
Yeah just double it
will probably want to filter out objNull results if you don't want to include the ground
I do want to include the ground but not when it's at the same level as the player so
It works as is, just need to deal with the slight vector add 🤷
Is there an easy way to find the thickness of the intersection? Assumption is no
The thickness? As in the thickness of the raycast?
As in, if I'm stood behind the VR object, find the length the raycast is inside of the VR object
Mm
You could do some math with the boundingBox of the object combined with the vector of the raycast
but there's no built-in command or anything like that
overall, would be hard to do precisely
actually
I do have a simpler way in mind
just do a raycast from both sides and get the difference in their intersect positions
That'd need to be done for every intersection, no?
Correct, but raycasts are cheap
I'm effectively just trying to find the distance the raycast is inside of objects so
Well a two-way raycast is the simplest way I can think of doing so
Don't think I actually need it to be that precise anyway as the only instance where this would be noticeable has an incredibly short range
Yeah, just number of intersections will work
Inside of object in what sense? If you for example line intersect with geometry lod, it's surface might be accurate to visual model or it might not
Usually geometry is simplified a bit and made to fit inside the visual model, but not always the case
Firegeometry is usually the most accurate
It's fine for this, but I meant the distance the raycast "travels" through the object
next question, though
private _countRate = player getVariable ["KJW_Radiate_CountRate",0];
player setVariable ["KJW_Radiate_CountRate",_countRate+1];
playSound "KJW_Geiger_Click";
systemChat str [_countRate];
``` seems to return 0 every time its run
you never change _countRate in that snippet (after you assign it), so it prints the same value twice
I thought it points to the getVariable rather than the value specifically returned from it..?
mb, fixed
variable is set to 0 on player init too so it is already defined
so what's the issue with that piece again?
systemchats [0] every time its run (every 0.005 seconds)
will grab relevant init fields 1mo
//Player init
player setVariable ["KJW_Radiate_CountRate",0];
//Object init
this setVariable ["KJW_Radiate_RadiationSource",true];
this setVariable ["KJW_Radiate_RadiationType", "Alpha"];
this setVariable ["KJW_Radiate_Activity",300];```
KJW_fnc_radiationProcess is just a switch statement and doesn't touch variables, only returns them
private _countRate = player getVariable ["KJW_Radiate_CountRate",0];
private _radiationProperties = [_radiationType] call KJW_fnc_radiationProcess;
private _penetratingPower = _radiationProperties#0;
private _ionisingPower = _radiationProperties#1;
private _countRate = _radiationProperties#2; // ?
...
im stupid
my bad, sorry -- i'd been totally ignoring that 😅
second countrate is only for background radiation so isn't defined on an object
Yeah, that works fine now -- sorry for such a stupid mistake
private _penetratingPower = _radiationProperties#0;
private _ionisingPower = _radiationProperties#1;
private _countRate = _radiationProperties#2;
private _dropOff = _radiationProperties#3;
private _breathable = _radiationProperties#4;
params plz
if (player distance _obj1 > _dropOff) exitWith{};
if (_random > _sourceActivity) exitWith{};
if ((count (lineIntersectsSurfaces [_objUpPosASL, _playerPosASL, player, _obj1, true, -1, "GEOM", "VIEW", false])*2) > _penetratingPower) exitWith{};
can all be combined into a single if
As in params["_penetratingPower", "_ionisingPower"] etc?
Yeah I'm just doing them one at a time atm for the sake of debugging, there were systemchats in the exits previously
_radiationProperties params ["_penetratingPower", ...]
Ah, I didn't know that was a thing, thank you 🙂
I'm trying to change a camera's bank/roll angle. I can control it in other axes using setVectorDirAndUp/BIS_fnc_setPitchBank, but nothing seems to affect the bank angle. Any ideas?
https://community.bistudio.com/wiki/setVectorDirAndUp
Command can be also used to rotate camera in all three axis (which also mean it is possible to set camera bank).
not anymore?
Wouldn't be surprised if it doesn't work, given that camSetBank is non-functional
I couldn't get any combination of numbers to affect bank. And at its root, BIS_fnc_setPitchBank uses setVectorDirAndUp, and the bank component of that also doesn't do anything.
I assume you've tested with something like [[1,0,0], [0,1,0]] for setVectorDirAndUp?
That gives me a nice 90 degrees of right yaw but no bank
are you using camSetTarget?
I am not
that gives you yaw?
should give you bank with the upVec 90 degrees offset from the standard [0,0,1]
I put the number into the computer and right yaw comes out
interesting
what about exchanging the two vectors
(granted, if the camera didn't start pointing at [1,0,0], that'd likely be why you're seeing yaw)
On a fresh camera, no observed change from its starting orientation
this is particularly weird to me because I know banking them is possible
i remember such an issue when i used the command camPrepareTarget
At this moment I'm doing absolutely nothing else to the camera
camFront = "camera" camCreate (getPosATL player);
camFront cameraEffect ["External","BACK"];
camFront setVectorDirAndUp [[0,1,0], [1,0,0]];```
Yeah, upon reviewing my code, setVectorDirAndUp seems to do the trick for me
get the initial vectors and then we can work from there
camFront = "camera" camCreate (getPosATL player);
camFront cameraEffect ["External","BACK"];
private _newUp = (vectorDir camFront) vectorCrossProduct (vectorUp camFront);
camFront setVectorDirAndUp [vectorUp camFront, _newUp];
^ or just try this
That leaves it in the same orientation as its default when created
No change
Well, thanks for trying
It seems the problem is the camera type "External". Bank doesn't work with that, you have to use "Internal".
I don't know, do they?
The cameraEffect types aren't terribly well-explained on the wiki page. I picked one, tested it, it appeared to work, and I thought nothing more of it until now.
I'm teasing you :) yeah, it's an automated reflex to me since I saw OFP's camera scripts ["Internal", "BACK"] at the time 🙂
I never understood what does what 🙃
Isn't there a command to round any numbers above a number down to it? Can't seem to find it
Mhm, my midnight brain struggles to understand what you've said but... is it min?
Nvm, ceil works for it as I'm using decimals 😅
Any numbers above a number can be anything!!!!😠
no wait no it doesnt ❗
floor, then?
Basically trying to make sure 1/(distance from object) will never return a value greater than 1
Then _distance max 1 or something
Oh wait yeah min works for that
1/_distance min 1
Perfecto
Time to convert it into % chance 
min in this context? Thought you don't want to divide by zero
Potentially useful: https://community.bistudio.com/wiki/linearConversion
If distance is less than 1, value returned is never above 1
so 1/0.1 min 1 will return 1 as 1/0.1 = 10
any idea what this animation is to??? What is the thing/ computer it is opening? How to animate that said object and not the NPC. "Acts_TerminalOpen"
The object is probably Land_DataTerminal_01_F, and the method for controlling that is https://community.bistudio.com/wiki/BIS_fnc_dataTerminalAnimate
Don't DM me for no reason
No, I don't know how to do a typing loop. If there's no animation for it then there's no animation for it.
thanks for the help.
Anyway to disable a light flare effect?
is there a way to force exit the server/local server im in? really dont want to force close the game when I break mission code and cant hit escape.
Pretty sure wanting to force exit while simultaneously not wanting to force close is an oxymoron
Unless you have a different definition of the differences between the two
I think they mean kick the account from the server basically
Though how you'd manage that if you can't hit escape I have no idea
If your client is locked up to the point where escape doesn't work I'm not sure what other option you have other than to force close the game
The bigger question is why your debugging is leading to such a deadlock to begin with
mike force locks the client into a loading screen until server postInit is finished, my code in the server init errored and caused that loading screen to never finish, thankfully after a few minutes of waiting the mission ends itself
Ah I see
Sorry if im in the wrong place but i think this would be it
Im looking at a old mod years out of maintanence that looks cool but none of the stuff spawns in zeus
What kind of code would that faction be missing to let is be usable in zeus?
Its already fully working in eden
This is for #arma3_config
Whoops, Sorry
No worries, people over there will be able to help more
how do you create a destroy waypoint attached to an object?
oh nvm i misread the wiki article for waypointAttachObject
whats a good script to make enemies disappear when about 1 kilometer away
im using the show hide module
but i still want them to reappear once i return
something like antistasi
- 1km away from what? Consider MP.
- What do you want to do with the enemies when they're out of range?
i want them to hide
so they dont take up fps
from a certain objective
i already have them show up on a show hide module
but when i go about 1 km away i want them to disappear so they dont take up fps
You have units associated with specific locations?
yes
And given that you completely ignored the MP point, I guess you mean SP?
from a trigger
whenever a trigger in the 1km mark is touched
the ai disappear
then reappear when going through the same triggers
in that 1km point
Don't know what it is
Easiest way drop mod by mod of and test your GUI again, if that is in same with tablet GUI, you need to fix that your self or ask from mod owner to do fixes
@stable dune the tablet works on the first page!!!only the pictures are all in a heap on the second page
Tablet is from mod, you need to ask the mod maker and/or remove other mods that might break it
Test tablet mod alone first, then add other mods to see where it breaks.
@young current ✅
yo bros how do convert turn a string to an already assigned variable?
_myVar= {hint "hello!"};
_myString = "_my" + "Var";
how do i make it so that when i call _myString it returns the hint hello
Probably by call compile ?
Can the command handle more than one blacklist? I mean if I have _blacklistmarkers = "blacklist1, blacklist2, blacklist3" Which are not "", or if I do, they are ""blacklist","blacklist2","blacklist3"" So Can I get the first and last "off. Well, I don't need the last option if only one blacklist is allowed
doesn't look like it, it has a predicate that you can use for filtering though
actually nvm, it can
i read it wrong
should work if you pass an array of markers to it
thanx, apparently had to use double call as explained by killzone kid in a forum example:
call call compile format ["AW_fnc_%1",_playerClass];
1. format ["AW_fnc_%1",_playerClass]; => "AW_fnc_B_Soldier_F"
2. compile format ["AW_fnc_%1",_playerClass]; => {AW_fnc_B_Soldier_F}
3. call compile format ["AW_fnc_%1",_playerClass]; => call {AW_fnc_B_Soldier_F} => AW_fnc_B_Soldier_F
4. call call compile format ["AW_fnc_%1",_playerClass]; => call AW_fnc_B_Soldier_F
this is just bad practice in general, what are you trying to do?
turn a string to a variable
I will try this out, thanks.
ok actually this is a better solution by moricky using getvariable
call (missionNameSpace getVariable format ["AW_fnc_%1",_playerClass]);
~~Yeah, ~~
seems in module example is not told you can usetypeName = "ARRAY" , and when i wrote in box in module attributes blacklist1,blacklist2
~~it return text ["blacklist1,blacklist2"]. So this works perfectly! thanks alot! ~~
~~in example of module configs at wiki is ~~
typeName = "STRING"; // Value type, can be "NUMBER", "STRING" or "BOOL"
So the wiki should state typeName = "STRING"; // Value type, can be "NUMBER", "STRING", "BOOL" or "ARRAY"?
It is way better just to leave your "simple miss" but not apologize and clear what you did
Just forgot i tried get them earlier to array via function just simple _blacklist = [_logic getVariable "VRK_IEDDblacklist"]
but i cannot add there more than 1 marker because box in module does string from all text what i wrote,
so when i add
blacklist1,blacklist it return
"blacklist1,blacklist"
but even i try same what alive use blacklist1, blacklist (with space)
it return
"blacklist1, blacklist"
So is there way to get multiple text seprated from 1 edit box
don't use the module
or even if you want to, you can create a "fake" module, set the parameters, then and call the module function manually
actually modules have init fields right?
so you should be able to change the parameter using the module init field
How do i change those? i mean which part and how
i would get blacklist area of module area, and like in alive mod you could write them to blacklist editbox
i have
is that your module?
Yes
oh. well you can check if the user is passing a valid array using a regex and if so parse it using parseSimpleArray
Awesome , that's look pretty simple solution
does anyone know how antistasi rngs its defenders at outposts and whatnot
how does unscheduled behave if you call a function that uses while/waitUntil? especially if the wait may be influence by unit/group creation?
will it delay the frame completion like crazy and eventually cut to the next? or turn it into scheduled code?
Yes, the solution was found in the CBA_replace and CBA_split functions.
Now ppl can type wo "" [] , and it doesn't matter if you use a space between character names or not.
It seems that these functions remove spelling "mistakes" easily. I got a lot of errors when I had to write too precisely
or you could just use regex 
depends where it's called
call in schd env -> schd -> will wait for the whole code (including waitUntil) to complete before going to the next line
call in unschd env -> unschd -> error on waitUntil (unless skipped in the same frame)
well you don't want to replace anything do you?
you can simply use _text regexFind ["[a-z_0-9]+", 0]
and it will give you all words in the text
or even simpler, \w+ (but this one allows non-English characters, which are obviously not valid variables)
"blacklist, blacklist2"
Then if i split with ,
It gives " blacklist2" ,
So want replace empty .
""
that way is just too long and inefficient
from unscheduled env this gets called in BI's fn_spawnGroup:
while {count units _grp > 0} do {
private ["_maxRank","_unit"];
_maxRank = -1;
_unit = objnull;
{
_rank = rankid _x;
if (_rank > _maxRank || (_rank == _maxRank && (group effectivecommander vehicle _unit == _newGrp) && effectivecommander vehicle _x == _x)) then {_maxRank = _rank; _unit = _x;};
} foreach units _grp;
[_unit] joinsilent _newGrp;
};```
that one is fine
p:\a3\functions_f\Spawning\fn_spawnGroup.sqf
it doesn't have any suspensions
it could however freeze the game which ends after 10000 iterations
from the looks of the profiler, it gets dragged into multiple following frames
i assume as the entity creation takes longer than some max frame limit
it doesnt freeze the game though. just down to 5-10 fps
Creating large numbers of units does tend to have a temporary effect on frame rate. Not because of the script, just because...creating large numbers of units
validate = "expression";
typeName = "string";
expression = "_this setVariable ['%s', call compile _value]";
defaultValue = "[]";
i'd configure it like this (attribute), then, simply _blacklist = _logic getVariable "VRK_IEDDblacklist"
then in the editbox, you'd type ["my_blacklistmarker1", "blabla"]
👍
So that is pretty less cost way to do. Seems i need modify my others to.
Is there examples / guide how to use expression/ what that do. Didn't know how that works
Thanks alot
that function probably does some suspending
while {true} do {
that's why nothing executes after you call this
spawn it instead
[_uid, 0, _id, "recieve"] remoteExecCall ["BIS_fnc_WL2_dataBase", 2]; //CP Saving system
sleep 1;
Why the sleep here?
Also, sending the value of clientOwner to a remoteExec'd function is a bit redundant -- you can easily access it via remoteExecutedOwner at the receiving end
Mm I see
just wanted to be sure it wasn't some sort of kludge for making sure the remoteExec goes through before the script continues
because such a method wouldn't be reliable or the correct way of doing so
Because there's no way to reliably ensure that the remoteExec'd code would actually finish within 1 second, scheduled code can be delayed by the scheduler indefinitely
and a kludge is pretty much a term used for bad solutions to problems in programming -- solutions that usually don't actually solve (or badly solve) the problem at hard
use a callback function for things like that
sure thats to be expected. my question is more in regards to unscheduled and that while from BI's function
As far as I know there's nothing special about a while loop aside from the 10,000 iteration unscheduled cap.
If you put a short sleep in a while loop then it acts a lot like a waitUntil, but the loop itself has no yielding functionality.
Hey my dudes! So, I was wondering what does the paremeter "addCrew" in addCuratorEditableObjects does to a unit/vehicle if you apply it to them?
It doesn't seem to add actual crew to vehicles, also doesn't seem to make any difference on a unit (be it AI or player).
Sometimes I'm under the impression it gives/removes the ability of Zeus to move a AI unit around, but I feel it's inconsistent.
Am I losing something here? What's the catch?
Ps: I can make it Curator-accessible with said paremeter being either true or false.
What it's supposed to do is add the crew to editable objects if you added their vehicle.
If you do something like allUnits+vehicles then it won't make a difference.
Ooooooh so it's supposed to add the vehicle crew and spare me the job to do so manually.
Never would have noticed it as my codes always already adds vehicle + crew
what would be the best way to detect a player that's in water but not inland water? Can't check with depth because player won't dive, thought about checking distance from land overwater
i suppose you've tried https://community.bistudio.com/wiki/surfaceIsWater and it's not what you want?
unfortunately this one detects swamps and inland ponds in which player should be able to go in
I mean this probably could work but still I cannot imagine how to detect a range from land that's Z=0 is above sea level, these swamps and stuff do not go further away than 100 meters
In general it's an expensive search problem.
There was a command that might work for it though, if I can remember the name...
oh, so with this I could check water depth around player?
I mean I assume it's for checking below 0 sea level, not for how deep the player is
It's just sampling a bunch of random points and sorting them by an arbitrary expression, which you could do in SQF, but this might be faster depending on how the expression is processed.
If you know how large these ponds and swamps are that you want to exclude then that helps.
You can check if it's water with surfaceIsWater and then check Z value from getPosATL. If that's somewhat high then the unit is probably in a large body of water (sea, lake, middle of a river) floating/swimming.
So I have a question for the scriptors of Arma - what kind of information can you send outside the game using scripting? Can you send information like where a player is, where a player is in relation to an objective, what kind of vehicle a player is in, etc, to an external script that controls something like a teamspeak bot?
so if for example I wanted to create a script that tracked where a player is and moved them to different teamspeak channels within a teamspeak server based on their current location, and proximity to an objective, would that be possible?
It's possible via extensions
but they need to be manually approved by battleye to work with battleye enabled
and you'd need to write the extension in a language like C++ or similar
that probably wouldn't be a problem? we're talking about a script for a public server in theory that would be a permenant fixture
the problem is that getting battleye to actually respond to anything not made by a large group can be... annoying
anyways, here's the page about them
ok before i start looking into this further, would this be possible completely vanilla
using a server sided script
no
SQF is completely incapable of interacting with things outside of the game other than via extensions
so it would require both the player and the server to download a mod
I mean whether the server would need it or not is up to how you implement it, but the players would need it, yes
ok
if only the bot needs to know the information, then just having it serverside would work
the server would need to be running the mod which would then need to funnel the info to the bot
yeah I didn't want to have to have people install a ts3 plugin so I figured a server bot would be a better way to go
I would recommend first looking into how you can interface with the bot from C/C++/C#
as those are the primary languages for making extensions
right
and then look into making the extension itself
this probably won't happen but its good to know that its theoretically possible
gotta be realistic lol
thanks again
👍
On vanilla you can always create and modify radio channels (radioChannelCreate) within the match and apply them to players based on your ideas. IDK if that helps you.
Is BIS_fnc_target specifically assigned to object type "TargetBootcamp_base_F"? or am I being an eejit?
looks like it is, otherwise I don't think Lou would mention that very type in every row possible
Is there any way to animate and open the top hatch on the Hunter?
No
what are the best techniques to stop AI in a group from "forming up"?
Hi,
Where i should save Eden attributes?
I do not get to init current area and isrectangle from module.
I get them in if Eden attributes changed. So can I save those some space and get them from there?
I read somewhere that decreasing view distance will decrease the client requests to the server for object positions. Is this true?
If so, does having client side triggers that check for objects out of view distance mess with it?
is it possible to reactivate a non-repeatable trigger?
You could try toggling its setTriggerActivation state, maybe changing that will reset it. Not certain on that though.
Other options:
- just create a new one with the same settings
- have it actually be repeatable all along but with a secondary activation condition that only lets it activate when you want, e.g. a variable
- disable unit pathing with
disableAI - stopping a unit from taking orders with
doStop
Seems this is saved (Area and isrec) "objectarea"
_module getVariable "objectarea"
Greetings, any insight on why { _x forgetTarget SO1} forEach (units independent); or (units independent) apply { _x forgetTArget SO1}; Dont make side forget a target? units independent seems to return a array of independent units correctly
can anyone confirm that playSound "3DEN_notificationWarning" no longer works for them too?
I noticed that config entry for it has empty string in sound[] property, maybe it's a bug or I'm doing something wrong?
nevermind, it's Eden Enhanced addon clears sound[] property for both 3DEN_notificationWarning and 3DEN_notificationDefault CfgSounds entries for some reason
locality issue probably
Should i run it only on server? Or everyone?
try [_x, SO1] remoteExec ["forgetTarget", _x] and see if it works
(that's terrible code though in that context, could make it better)
Bear in mind that they can immediately regain that knowledge if they can still see the target / someone who can report to them can still see the target
Okay, the side forgetting target has 1 player and a big bunch of AI, does this affect it any way?
you should loop groups, not individual units
so just switch units to groups?
allGroups select { side _x == independant } if you're in stable, if dev you can use groups independant
no
but i'd suggest using forEach if you only want to iterate over an array
if you use apply for that it's abit missleading (imo)
Okay, thanks for your help! Ill try it out
Someones thread on the subreddit got me in a mindpuzzle mode, and I threw something together. Unfortunately, Im at work, and unable to test it - and tbh, its just something I put together to see what Id do to get the effect they were going for, not something I need myself to work; thoughts welcome as review, though content warning: edited on a phone in haste, so not the prettiest or cleanest code.
Params ["N","POS","Hider","Seeker"];
params doesn't allow global identifiers.
,"F_40mm_Yellow"] missing ;
Sleep 10 random 15 precedence issue
`} // here
_flareTrg setTriggerStatements ["this","call flareTrgAction",""];missing;again_flareTrg setTriggerStatements ["this","call flareTrgAction",""]; flareTrgActionrequires suspension and you're usingcall` here (from unscheduled), wrong
many undefined variables
Sounds about right xD
Heck, when I was about to post I only just remembered to put Params items in quotes.
Doing this off the cuff would be so much easier if I could just convince them to let me install Arma on the work computers 👀
Hello, is there anyway to delate or remove a trigger with another trigger? I have a repeatable trigger that I wont to remove/permanently deactivate when another trigger is activated.
Thanks.
you can put ... && !triggerActivated my_other_triggerwhich will prevent this trigger from activating while my_other_trigger is active
thanks
alternatively you can deleteVehicle
and that where it goes? On the deactivate of the trigger?
it goes to the activation of the trigger that would "disable" the other trigger
thanks
Is there a way to run code when the game looses focus?
Is there anyway to delate a mark placed on eden with a ingame trigger?
I trt delatevehicle and didnt work
marker? Markers aren't vehicles. Use https://community.bistudio.com/wiki/deleteMarker
not sure why you would want to do that specifically, but https://community.bistudio.com/wiki/isGameFocused is what you want
what's the sqf command for getting current map's config name? There's one iirc, right?
Ok, right
worldName
Is there an easy way to do either of the following:
Subtract Weapon_ from a string "Weapon_classname" to result in classname
Or get the first (or only) subclass occurrence in a getText -- i.e
getText (configFile >> "CfgVehicles" >> _obj1 >> "TransportWeapons" >> some class here >> "weapon");
get the first (or only) subclass occurrence in a getText
huh?
Subtract
Weapon_from a string"Weapon_classname"to result inclassname
select
select works, thanks -- I didn't know it had so many uses 
Or get the first (or only) subclass occurrence in a getText -- i.e
for this you can dogetText ((configFile >> "CfgVehicles" >> _obj1 >> "TransportWeapons") select 0 >> "weapon")
I saw after looking at the wiki for select again, thanks
All good now though, streamlined making compat files to running 2 functions and some ctrl+h business now.
How do i center this text? I heard of the safezone stuff but i'm not sure how to use it to make the text centered
[parseText "<t font='PuristaBold' size='1.6'>My Mission</t><br />by Username", [0, 0, 1, 1], [9, 3], 2, [0.80, 0.30], 0.035] spawn BIS_fnc_textTiles
align='middle' in the structured text params
or do you mean entire control/whatever?
that was such a fast reply, thanks-
i tried using align='middle'
but it still doesn't really center
[parseText "<t font='PuristaBold' align='middle' size='1.6'>My Mission</t><br />by Username", [0.5, 0.5, 1, 1], nil, 2, [0.80, 0.30], 0.035] spawn BIS_fnc_textTiles```
[0.5, 0.5 is wrong, you need to adjust for the width and height of the text
how would I do it?
oops
caps
0.5 - 0.16?
would need to look at how that function calculates stuff
did you figure out?
idk, open functions viewer and see what it does with the coordinates, you can try something like
private _h = 1.6 * getNumber (configFile >> "RscStructuredText" >> "size");
private _w = ("My Mission" getTextWidth ["PuristaBold", _h]) + 0.016;
[parseText "<t font='PuristaBold' align='middle' size='1.6'>My Mission</t><br />by Username", [safezoneX + safezoneW / 2 - _w / 2, safezoneY + safezoneH / 2 - _h / 2, _w, _h], nil, 2, [0.80, 0.30], 0.035] spawn BIS_fnc_textTiles
but height will be incorrect (your text is multiline), you can try playing with it by multiplying maybe
Hello, IIRC there is a simple fire and smoke column effect I can attach to a target object? I do not recall what that is, but IIRC it was baked in as a resource I can call up?
Look under Modules (F7), and they're under Effects.
well now it does align but it does some weird shenanigans
it looks like all the text is stacked on top of each other
private _w = ("My Mission<br />" getTextWidth ["PuristaBold", _h]) + 0.016; this should fix it
oh actually it should be align='center' not middle
edited 
haha i was wondering why it threw like 3 errors i never seen before
do i have to give it some height for the other text to appear?
private _size = getNumber (configFile >> "RscStructuredText" >> "size");
private _h = 2.6 * _size;
private _w = ("My Mission<br />" getTextWidth ["PuristaBold", 1.6 * _size]) + 0.016;
[parseText "<t align='center'><t font='PuristaBold' size='1.6'>My Mission</t><br />by Username</t>", [safezoneX + safezoneW / 2 - _w / 2, safezoneY + safezoneH / 2 - _h / 2, _w, _h], nil, 2, [0.80, 0.30], 0.035] spawn BIS_fnc_textTiles
try this
perfect
can't thank you more
i wanted to sync this with the music but the music still seems to play when i'm tabbed out
afaik there's no way to pause the music when isGameFocused resolves to true so i'm kinda screwed here
https://community.bistudio.com/wiki/getMusicPlayedTime when the game loses focus, then, https://community.bistudio.com/wiki/playMusic again with the played time
didn't think of that even tho i was already using getMusicPlayedTime
that's pretty smart
thanks I recalled the modules were there... now how do I attach the effects to an object?
hrm I would half expect that something like an 'effects module' be an effects factory, in effect, and attach manufactured effects to target objects. but I'm not certain my expectations would be dashed where fire, smoke effects modules are concerned... is there a cohesive example that demonstrates both or either of these?
I know it is possible, so that once the target object is deleted, the effects go away as well... not sure this is the case here, however.
it's not clean but i wanted to make sure i did it correctly
lastMusicPlayed = "";
lastMusicTimecode = -1;
addMusicEventHandler ["MusicStart", {
params ["_musicClassname", "_ehId"];
lastMusicPlayed = _musicClassname;
}];
addMusicEventHandler ["MusicStop", {
lastMusicPlayed = "";
}];
addMissionEventHandler ["EachFrame", {
if (lastMusicTimecode == -1 and !isGameFocused) then {
lastMusicTimecode = getMusicPlayedTime;
playMusic "";
};
if (lastMusicTimecode != -1 and isGameFocused) then {
playMusic ["EventTrack02_F_EPA", lastMusicTimecode];
lastMusicTimecode = -1;
};
}];```
so ModuleEffectsFire_F and ModuleSmoke_F appear to be objects. I can just create them then? using what, createVehicle? i.e. "ModuleEffectsFire_F" createVehicle _firePos?
When I create a new function the path has to include also the pbo folder?
example: eugfunction.sqf is inside the path "@eugfolder\addons\folder1\folder2\eugfunction.sqf"
Is it correct to use only file = "\folder1\folder2\eugfunction.sqf"; ?
Here the example code:
`class CfgFunctions
{
class TAG
{
class Category
{
class myFunction {};
};
class OtherCategory
{
file = "My\Category\Path";
class myFunction {}; // file path will be <ROOT>\My\Category\Path\fn_myFunction.sqf";
};`
use exitWith for the first if
also keep in mind that playMusic "" won't fire the MusicStop event (if you decide to stop the music at some point manually), so if you run playMusic "" and unfocus&focus the game it will keep playing
make a macro or a function for it, e.g.,
#define STOP_MUSIC playMusic ""; \
lastMusicPlayed = ""
and tag your global variables, see https://community.bistudio.com/wiki/OFPEC_tags
Vehicles with brain cannot be created using 'createVehicle' (?)
you need to use https://community.bistudio.com/wiki/createUnit for modules
i think that's correct yes, unless you use pboprefix
what am I doing wrong... trying something like this, I see no smoke created.
_grp = createGroup sideLogic;
module_smoke = 'ModuleEffectsSmoke_F' createUnit [getPos bar, _grp];
[module_smoke] call BIS_fnc_moduleEffectsSmoke
bar is a random object, H-barrier in this case. Just something to reference the effect.
the syntax you're using of createUnit doesn't return the created unit, use the primary syntax
even with that, I get the object, but I see no smoke...
_grp = creategroup sidelogic;
module_smoke = _grp createunit ['ModuleEffectsSmoke_F', getPos bar, [], 0, 'none'];
[module_smoke] call BIS_fnc_moduleEffectsSmoke
https://community.bistudio.com/wiki/BIS_fnc_moduleEffectsSmoke
Creates smoke on position of module (called usually by BIS_fnc_moduleEffectsEmitterCreator).
try
[module_smoke, "BIS_fnc_moduleEffectsSmoke"] call BIS_fnc_moduleEffectsEmitterCreator instead
call it a success... so... how do I get the effect to stop?
does not appear to be attached to the module, i.e. deleteVehicle module_smoke does not do it
{
deleteVehicle _x;
} forEach (module_smoke getVariable "effectEmitter");
deleteVehicle module_smoke;
should work
okay doke... thanks. not the most elegant interface, but it works.
Is it possible to delete the trigger as well as the vehicle using AddAction ?
this addAction["Turn Alarm Off", {
sleep 1;
{deleteVehicle _x} forEach crew jarda;
deleteVehicle jarda;
};
(in mission on dedicated server)
what is jarda? the vehicle?
also, use deleteVehicleCrew instead of what you are currently doing
to delete trigger, it's simply deleteVehicle myTrigger
jarda is the trigger
and the vehicle? is it synchronized to the trigger?
I want to delete the trigger, no vehicle..
{deleteVehicle _x} forEach crew jarda; what is this for then?
deleteVehicle jarda; is enough
Okey thanks
It doesn't seem to work at all..
to better describe what I'm trying to do, I have a trigger that activates an alarm when entering the zone, I'm trying to use another object via addAction to delete this trigger so that this alarm can be deactivated before entering the trigger zone
so it's essentially just a naming convention? it's not really necessary unless i want to make the code public
is the \ there on purpose?
it's advised, so your identifiers don't collide with some badly written mod or w/e
yes
did you name the trigger jarda? is it maybe a server only trigger?
so #define... fires the music stop event everytime playMusic="" is ran?
it's a preprocessor macro, it simply replaces text
instead of typing everytime
playMusic "";
lastMusicPlayed = "";
you can make a macro,
#define STOP_MUSIC playMusic ""; \
lastMusicPlayed = ""
// then simply
STOP_MUSIC;
after this is preprocessed, it becomes
STOP_MUSIC playMusic "";
lastMusicPlayed = "";
sweet, another part of sqf syntax i will forget in 2 months haha
Yes trigger named jarda
also, at the top of your EachFrame, you should add if (lastMusicPlayed isEqualTo "") exitWith {};
it should work, put
systemChat str ["deleting trigger", jarda];
deleteVehicle jarda;
systemChat str ["deleted trigger", jarda];
as your action code
Hello, I got a little problem to solve problem.
So i am using the flight record function to have a more immersive helicopter landing. but after the recorded flight has finished the helicopter goes back in air.
I have tried:
using setThrottleRTD but wen i use this i get "blackhawk1 |#|setThrottleRTD"- error missing ;
even tho the "isObjectRTD blackhawk1" ist true on this object the "difficultyEnabledRTD" is false.
why not having the landing and starting in one recording? because i cant know for sure how long the ai will need with getting in the helicopter.
Would be nice if someone could help me.
"blackhawk1 |#|setThrottleRTD"- error missing ;
https://community.bistudio.com/wiki/setThrottleRTD is a binary command, you're missing right argument
sorry
i had give your the wrong command i entered.
blackhawk1 setThrottleRTD [0, -1];
ah, that command is actually not in arma 3, that's why
!?!
try this instead maybe https://community.bistudio.com/wiki/setEngineRpmRTD
thanks m8
look here https://community.bistudio.com/wiki/Category:Command_Group:_RTD maybe you'll find the command you want
wut? I'm kinda curious about this one. how are engine rpms at all related to throttle? I mean, at least when you set a thermostat using BTUs you have some frame of reference, for instance.
at the top left corner, below the command name, there is a list of supported games
yes i saw it. thank you man
i have no clue how all the AFM stuff works 😅 just a guess
but whats about "difficultyEnabledRTD" comes false? I already set up "forceRotorLibSimulation = 1" multiple times
forceRotorLibSimulation = 1
where did you put that?
uhmmm Trigger at startup
it should go to description.ext
alright
Which value i set to config so i can see in curator mode objects which are placed from module function?
seems none
I clearly need longer nerves, and waiting time. now everything is visible.
Is there value to set some of invisible? I mean if i have object where is multiple attached objects, all those is in empty list on curator mode
_pos = getPosASL kjwshower;
_arr = [];
{
if (getPosASL _x inArea [_pos, 2, 0.25, getDir kjwshower, true, 4]) exitWith {_arr pushBack _x};
} forEach nearestObjects [kjwshower, [], 20];
_arr```
seems to only be returning `[30: <no shape>]` when only the player is in the area, pretty sure that's not what is returned -- anyone know what that even is?
No matter how big the inArea ones are it still returns that 
Varying the nearestObjects just changes the number returned to 29/28
"exitWith" inside "forEach"? Lemme check
fml forgot you cant do that 
Yeah, that works -- just need to figure out how you actually exit the current cycle
continue?
ah perfect thanks
Nah, chopped out a check from the code for variable
if (_x getVariable ["KJW_Radiate_Irradiated",0] == 0) then {continue};```
ye, converting only makes sense if it gets rid of forEach completely
Yeah, then need another forEach of that array to reduce the variable every tick or so 
ok sadly this didn't work. i need to find another way of blocking the helicopter from taking off
i dont know why it does this in the first place
Can you not just damage the engine of the helicopter?
if a recorded flight ends and the helicopter is on the ground why does it take of again?
this would result in stopping the rotors and having smoke
not a great solution
Oh, you're using AFM -- I'd assume it's going back up due to Arma AI or something similar
uhm i don't care which one i use in the end
i just want the helicopter to not take off
doesn't AI just love to take off after landing?
hmm i will try agian to diableAI features
Alternatively you could try give the AI a land waypoint at their position, don't know if that'd work or not
no. they alwas take off and fly to a more save place even if it is already right at the position. thats why this is so frustrating
That's arma AI for you
LUV IT 🫡
How setTargetAge does? does ai behavior change somehow when target is known for longer time?
yes, different lengths of time will result in different behaviour
it was the closest analogy I could think of, closed feedback loops and all... i.e. throttles, engine rpms, etc...
Anyone has a solution to stop the halo animation?
Nope sadly not
Somehow Arma3 has a loop in it, if you do switchmove "" or playmove "" it stops for like 0.2 secs and then it goes back to the halo animation.
i guess you can use https://community.bistudio.com/wiki/Arma_3:_Event_Handlers#AnimChanged and just switch it
but it might be ugly/glitchy, not sure
Stop it when?
_unit addEventHandler ["AnimChanged", {
params ["_unit", "_anim"];
if (_unit getVariable ["tag_preventHaloAnim", false] && {"halo" in _anim}) exitWith {
_unit switchMove "";
};
}];
something like that, with a switch (optional)
We will try it ✌ its for the jumpjet infantry
I tried putting it in there and testing it differently no less trigger "jarda" still works even after using addAction with your code
(laptop with name "ac" used with addAction)
this addAction["Turn Alarm Off", {
sleep 1;
systemChat str ["deleting trigger", jarda];
deleteVehicle jarda;
systemChat str ["deleted trigger", jarda];
player attachTo [ac, [0,-0.59,-1]];
player playMoveNow "Acts_Accessing_Computer_in";
sleep 0.8;
ac say3D ["music1", 1000, 1];
player switchMove "Acts_Accessing_Computer_loop";
sleep 3;
ac setObjectTextureGlobal [1, "pic\disarmed.jpg"];
player playMove "Acts_Accessing_Computer_Out_short";
detach player;
alarmToggle = false; publicVariable "alarmToggle";
}];```
If some one(blufor) step inside trigger "jarda" after use this action still trigger "jarda" in the place and activate the alarm..
Your code work only on localhost in editor as multiplayer.. on dedicated server absolutly game ignor the code..
yo can anyone help me with setting up a script like this
i want to setup patrols of gendermerie within 1-2 kms of the player
but when you are too far away from the patrols they disappear
or get deleted
what do the system chats print?
in editor test'
deleting trigger
next
deleted trigger
but on dedicated server nothing..
doesn't make sense
sounds like you aren't reloading/repacking the mission correctly
Hmmm, i try put in another trigger and now worked.. 🤔
(Mechanically it works but it doesn't write anything in the chat..)
don't crosspost thanks (see #rules)
what have you tried so far?
thought i posted in the wrong place
ive tried a video
where you have to make a sqf file
So in this video we will look at a script which can spawn in various predefined AI groups around a target unit in random directions and times. INstruct those AI groups to move towards the player. As well as delete any units that have been left behind in order to help optimize the mission.
NOTE: Because of the rules around characters that can be...
this one to be exact
so, just this script?
yeah
couldnt find any other tutorials about it
or guides
i just want ai to spawn about 300 meters from independent players
then delete at about 900 meters
to a kilometer
and patrol
does anyone know why the squad radar UI shows up during cutscenes?
Because it's a third-party scripted element that doesn't know it's in a cutscene
is it the dev's fault?
it's a pretty popular mod so i thought they would've thought about that
yes (tho to be fair that's an MP mod anyway and MP games don't have cutscenes)
spawn a group with https://community.bistudio.com/wiki/BIS_fnc_spawnGroup generate some path with https://community.bistudio.com/wiki/addWaypoint use https://community.bistudio.com/wiki/setWaypointStatements for checking if there are any players nearby (https://community.bistudio.com/wiki/inAreaArray), depending on that, delete the units
Hey! I'm trying to make something for a dedicated server, but for some reason this doesn't work correctly.
if (!isServer)exitWith{};
h1 allowDamage true;
h1 setHitPointDamage["HitVRotor", 1];
h1 setFuel 0.02;
{ _x removeweapon "ItemGPS"} foreach allplayers;
{ _x removeweapon "ItemAndroid"} foreach allplayers;
{ _x removeweapon "ItemMicroDAGR"} foreach allplayers;
{ _x removeweapon "ItemcTab"} foreach allplayers;
sleep 0.5;
h1 allowDamage false;```
It's a simulated helicopter crash, basically. But for some reason, the items get removed, however, the helicopter takes no damage and the fuel doesn't get removed. It works if I locally or globally execute the damage and fuel changes, but won't work with either of the:
```remoteExec [`...',2]
remoteExec [`...',0]```
Anyone know how to fix this? Thanks 🙂
yes
https://community.bistudio.com/wiki/setHitPointDamage takes a local argument
so you should use remoteExec with it
remoteExec on the target
removeweapon also takes local arg though? (same for allowDamage)
Ah, alright, I thought that would be done since I was running the script with remoteExec?
[h1, ["HitVRotor", 1]] remoteExec ["setHitPointDamage", h1];
[h1, 0.02] remoteExec ["setFuel", h1];
// also one loop is better than four
{
[_x, "ItemGPS"] remoteExec ["removeWeapon", _x];
[_x, "ItemAndroid"] remoteExec ["removeWeapon", _x];
[_x, "ItemMicroDAGR"] remoteExec ["removeWeapon", _x];
[_x, "ItemcTab"] remoteExec ["removeWeapon", _x];
} forEach allPlayers;
Ah alright, that makes sense, and about the loops, yeah I'm still learning haha, I suppose it's gonna be spaghetti for a while 😉
Thanks Lou 
I'm trying to capture the moment when a tripwire mine is tripped and detonated. I want to run a custom function when that happens. Sadly I cannot find a way to patch myself into that, even with ACE explosives. I want to avoid any dumb stuff like spawning a waituntil or something for every tripwire, just to get if they were tripped or not.
hey guys...
wrote a function to get to the property of a class, can't figure out how to the content of that property.
code is as follows
TGF_fnc_getConfig = {
params["_config"];
{
if (isNil "_config") exitWith {};
diag_log format ["Config %1", _x];
diag_log format ["Name %1", configName _x];
diag_log format ["Properties %1", configProperties [_x, "(configName _x) isEqualTo 'file'"]];
("true" configClasses _x) call TGF_fnc_getConfig;
} forEach ("true" configClasses _config);
};
_configs = "(configName _x) isEqualTo 'TGF'" configClasses (configFile >> "CfgFunctions");
_configs call TGF_fnc_getConfig;
a quick way to do this:
- have a global scope array variable where you store created groups
- run one script periodically (e.g every 30s) that will delete groups when their units are > 900m
getText (configFile >> "TGF" >> "file")?
or are you looking to recursively get all file properties?
pff, lolz... so easy when you know... 😉
thx m8
and yes, recursively
better way, I'm all ears (eyes?)
TGF_fnc_getConfigPropertyRecurse = {
params ["_cfg", "_name", "_arr"];
private _value = getText (_cfg >> _name);
if (_value isNotEqualTo "") then { _arr pushBack _value };
{ [_x, _name, _arr] call TGF_fnc_getConfigPropertyRecurse } forEach ("true" configClasses _cfg);
};
private _arr = [];
[configFile >> "CfgFunctions" >> "TGF", "file", _arr] call TGF_fnc_getConfigPropertyRecurse;
on phone, bit hard, but should work
edited, missed the CfgFunctions
I litterally asked the same stupid question again. Thank you
no worries, it's sometimes tricky - and rares are the commands that were in TKOH and not ported in A3
exactly!
yap, that just about does it...
thx man...
day in reflection about working with BIS_fnc_moduleEffectsEmitterCreator and so forth... the one flaw I can determine is that I do not seem to be able to specify a target object. Or maybe I can, I do not see the options for it. Why, because when "effects", really particle effects, are created, IIRC, I can connect them with a desired target object. Say I have a helicopter wreck, I want to create the FIRE+SMOKE effects. When I delete that wreck, I want the effects to automatically go away. However, AFAIK, the module is the target object, correct? If I delete the module, will the effects go away? I have the GC mention from yesterday, so I know how otherwise to deal with it, but I think that is somewhat of an oversight...
This message provides a way of getting the actual emitters created by the module: <#arma3_scripting message>
Now that you have that reference, you can save them as a variable, attach them to something, delete them when you want, etc.
right but "attaching them" to a vehicle is not the same thing, IIRC, as the particle system having that as a target object.
Have you tested that? I'm much less confident than you sound, that there is any difference between the object param of a particles array and just attaching the emitter with attachTo.
If you're really worried, just don't use the module function at all. Use one of the examples here: https://community.bistudio.com/wiki/Particles_Tutorial#Full_examples
yeah I mean while I could, it is so much extra leg work... when the modules could be receiving the object (18) in behalf of the caller.
https://community.bistudio.com/wiki/ParticleArray
just so we're clear on the bit of extra GC bookkeeping the caller has to handle using the modules.
it's all good; would be better if the particle source was connected to a target, but we can handle the bit of bookkeeping besides.
Is it so much extra legwork? I would argue that it is in fact much easier, since the lack of documentation of the effects module is proving to be so inconvenient
yeah well the docs issue aside of course...
Make your own function that just contains one of the examples I linked, and accepts an object as an argument. You only have to write* the particle thing once, you know exactly how it works (having tested it, I assume) and you can use it easily.
- and by "write" I mean "copy and paste"
can somebody explain to me what values the BIS_fnc_unitCapture function exports?
Like this is the output of a flight recording BIS_fnc_unitCapture
[[0,[5994.6,7589.56,117.871],[-0.0612043,0.994945,-0.0796084],[0.0987933,0.0854049,0.991436],[-5.86476e-005,-5.91099e-006,3.07709e-005]]];
What does each spot mean?
[[value1, [value2-1,value2-2,value2-3], [value3-1,value3-2,value3-3], [value4-1,value4-2,value4-3], [value5-1,value5-2,value5-3]]];
Would be interesting for me because i want to manipulate these values to maintain the current position as of my questing earlier that day due to that ai pilot always trying to take of when recorded flight file ands and helo on the ground.
I say yes it is more leg work. I mean, you can still monkey with particle or other module parameters besides, but it is better having the canned approach, IMO, and just tuck that away into an effects adapter layer, easy-pea-zee.
see BIS_fnc_unitCapture what it stores there 🙂
…or the documentation 😄
https://community.bistudio.com/wiki/BIS_fnc_unitCapture
How do i fade a sound created using playSound3D? i tried fadeSound but it fades all the sound and not the one i'm playing
not possible
if you use say3D instead you can move the source away to mimic fading
oh true
i saw there was createSoundSource too but i still didn't get how it works lol
hey guys...
can anyone tell me what's wrong with this...
PS G:\Program Files (x86)\Steam\steamapps\common\Arma 3 Tools\AddonBuilder> .\AddonBuilder.exe "P:\TGF_A3\x\tgf\addons\sspcm" "D:\Users\TGF\Documents\Arma 3\Mods\@TGF_A3\addons" -project="P:\TGF_A3" -prefix="x\tgf\addons\sspcm" -temp="P:\temp" -sign="P:\TGF_A3\keys\TGF.biprivatekey" -include="G:\Program Files (x86)\Steam\steamapps\common\Arma 3 Tools\FileBank\include.txt" -exclude="G:\Program Files (x86)\Steam\steamapps\common\Arma 3 Tools\FileBank\exclude.lst" -binarize="G:\Program Files (x86)\Steam\steamapps\common\Arma 3 Tools\Binarize\binarize.exe" -cfgconvert="G:\Program Files (x86)\Steam\steamapps\common\Arma 3 Tools\CfgConvert\CfgConvert.exe" -filebank="G:\Program Files (x86)\Steam\steamapps\common\Arma 3 Tools\FileBank\FileBank.exe" -dssignfile="G:\Program Files (x86)\Steam\steamapps\common\Arma 3 Tools\DSSignFile\DSSignFile.exe" -clear -binarizeAllTextures
[2022-12-02 21:38:05,334] [INFO ]: ==========================================================================
[2022-12-02 21:38:05,338] [INFO ]: WELCOME TO ADDON BUILDER
[2022-12-02 21:38:05,340] [INFO ]: Version: 1.5.146305
[2022-12-02 21:38:05,341] [INFO ]: ==========================================================================
[2022-12-02 21:38:05,342] [INFO ]:
[2022-12-02 21:38:05,342] [ERROR]: Invalid value for argument specified. [ArgumentName]=, Invalid number of arguments. There can be only one source_path and destination_path at the same time
[2022-12-02 21:38:05,342] [INFO ]: Use -help to see all parameters and example```
and please don't tell me "There can be only one source_path and destination_path at the same time" xD
FYI SSCPM is forbidden to be repacked.
I may mod it right?
license is pretty straightforwad, it would be wise to read it.
@jade acorn , you know, it's this king talk that discourages nobodies like myself from doing... whatever, you make it sound I'm a thief. Dude... I look some code and try to make my own. Nothing is published, nothing is sold, nobody is making any kind of profits, but most importantly, no one is claiming credit for anything...
and this wall of text http://www.bistudio.com/community/licenses/arma-public-license-share-alike
right... you need some context of one is, and what one does... like I said, a nobody just messing around with some code, after fucked up day of work, in an attempt to feel some fulfilment.
Don't get me wrong, I don't take what you said personally, but take a chill pill... you have never heard of me, ever, and neither will you, ever... that's how we nobodies roll...
why are you linking me a license different to which SSCPM was published under? And am I supposed to be ashamed of myself because I tell you stealing is bad? Why repack this stuff anyway? Make a collection or a HTML preset and follow the EULA. Your feelings have no legal power, Workshop EULA and the licenses do have.
Simple Single Player Cheat Menu by Benargee
This work is licensed under the Arma Public License Share Alike http://www.bistudio.com/community/licenses/arma-public-license-share-alike
---v1.0
--March 19, 2015
-Initial Release
---v1.0.1
Huh, forum version does say APL-SA.
APL-ND: no derivatives, you may mod it but not share it nor publish it
the licenses have a short summary
So... I'm good?
No Derivatives - If you remix, transform, or build upon the material, you may not distribute the modified material.
This is me:
https://steamid.io/lookup/STEAM_0:0:73808719
https://forums.bohemia.net/profile/1187412-prectatorium/
I'm I good?
steamID output for STEAM_0:0:73808719 (76561198107883166)
Changelog inside the mod also says APL-SA.
Yeah, so maybe one of more of these is a mistake but if two different licenses are specified then you can choose.
As for your initial problem, no idea. Syntax looks correct.
gez... thank you...
On Workshop the license type was changed from SA to ND in 2019, according to wayback machine.
for clarity
PS G:\Program Files (x86)\Steam\steamapps\common\Arma 3 Tools\AddonBuilder> .\AddonBuilder.exe `
>> 'P:\TGF_A3\x\tgf\addons\somethingSoNoOneIsOffend' `
>> 'D:\Users\TGF\Documents\Arma 3\Mods\@TGF_A3\addons' `
>> -project='P:\TGF_A3' `
>> -prefix='x\tgf\addons\somethingSoNoOneIsOffend' `
>> -temp='P:\temp' `
>> -sign='P:\TGF_A3\keys\TGF.biprivatekey' `
>> -include='G:\Program Files (x86)\Steam\steamapps\common\Arma 3 Tools\FileBank\include.txt' `
>> -exclude='G:\Program Files (x86)\Steam\steamapps\common\Arma 3 Tools\FileBank\exclude.lst' `
>> -binarize='G:\Program Files (x86)\Steam\steamapps\common\Arma 3 Tools\Binarize\binarize.exe' `
>> -cfgconvert='G:\Program Files (x86)\Steam\steamapps\common\Arma 3 Tools\CfgConvert\CfgConvert.exe' `
>> -filebank='G:\Program Files (x86)\Steam\steamapps\common\Arma 3 Tools\FileBank\FileBank.exe' `
>> -dssignfile='G:\Program Files (x86)\Steam\steamapps\common\Arma 3 Tools\DSSignFile\DSSignFile.exe' `
>> -clear `
>> -binarizeAllTextures
>>
[2022-12-02 21:51:20,148] [INFO ]: ==========================================================================
[2022-12-02 21:51:20,152] [INFO ]: WELCOME TO ADDON BUILDER
[2022-12-02 21:51:20,153] [INFO ]: Version: 1.5.146305
[2022-12-02 21:51:20,155] [INFO ]: ==========================================================================
[2022-12-02 21:51:20,155] [INFO ]:
[2022-12-02 21:51:20,156] [ERROR]: Invalid value for argument specified. [ArgumentName]=, Invalid number of arguments. There can be only one source_path and destination_path at the same time
[2022-12-02 21:51:20,156] [INFO ]: Use -help to see all parameters and example```
so I believe the newer one stands.
@jade acorn m8, can we move on... it's for personal use,
pack of reuploaded mods for personal use? Why not make a preset or steam collection?
no idea what you are taking about. But to answer your question... sometimes one likes to one owns bread, rather then baying it from a bakery...
it's not about what you like, "m8", but you do you. You're making your first "modding" steps in a wrong way.
In fairness, a lot of people start out by editing a mod or mission for personal use.
@jade acorn , you know what, I'm sorry... 🚪
are "nested" operators meant to work within in an if statement? i.e
if (((_maskDependent == 1) && (_backpackDependent == 0)) || ((_maskDependent == 0) && (_backpackDependent == 1)))```?
no issues there except a bunch of useless parentheses
i like brackets
thank you
I have however realised an easier way of doing this regardless
you could also write that as _maskDependent + _backpackDependent - 1 == 0
Yeah, they're altering values so I'm just going to use them as coefficients to multiply the values by 1 or 0 instead of worrying about conditional statements
no that doesnt work nvm
Assuming that the valid values are only 0 and 1, _maskDependent != _backpackDependent also has the same results.
Yup, now using that -- then flipping them 
if (_maskDependent != _backpackDependent) then {
_maskDependent = (_maskDependent - 1)*-1;
_backpackDependent = (_backpackDependent - 1)*-1;
_maskProtection = _maskProtection * _maskDependent;
_backpackProtection = _backpackProtection * _backpackDependent;
};```
They are config values so keeping 1 as true and 0 as false makes most sense
(_x - 1) * -1 is equivalent to (1 - _x)
convert them to bool, easier to work with on SQF side
Will I not need to getText instead? more room for spelling mistakes there
Though if it's performance actually bool is better
getNumber _cfg == 1
I'm confused
don't use getText, keep using getNumber, and compare the value to 1, this will evaluate false if it's not 1 and true if it's 1
Not sure what happens if you multiply by a bool though :P
^
In some cases SQF does treat them as 0/1
I'll look in debug console one mo
use && over multiplying
Yeah, can't multiply bool by number
it's instead of using a conditional to add the protection values.
so I can set the protection values to 0 if false
No wait, if true
if (_maskDependent == _backpackDependent) then { //If they are both true or both false.
_protectionStrength = _protectionStrength + _uniformProtection + _maskProtection + _backpackProtection;
};
if (_maskDependent != _backpackDependent) then {
_maskDependent = 1 - _maskDependent; //Flip from 0 to a 1 and vice versa. Means if it's true (dependent on a mask) there'll be no protection.
_backpackDependent = 1 -_backpackDependent; //Flip from 0 to a 1 and vice versa. Means if it's true (dependent on a backpack) there'll be no protection. Used for SCBA.
_maskProtection = _maskProtection * _maskDependent;
_backpackProtection = _backpackProtection * _backpackDependent;
};```
thats the full checks
strength is 0-1 value and dependent is 0 or 1
Do you actually use maskDependent or backpackDependent after that?
No
ok, that's way overcomplicated then :P
Also not sure in what cases you're intending to add _uniformProtection, because that looks wrong.
my god, i was literaly 10 minutes searching for functions and missed that 
normal for wiki :P
It's generating a 0-1 value of protection for the object given its uniform, backpack and facewear, checking if facewear is dependent on backpack (SCBA)
Or rather, should do
No worries, I was using it the other day to automate inheritance so that's the only reason I know 😅
Your code's just doing this as far as I can tell, but it doesn't make any logical sense to me:
if (_maskDependent == _backpackDependent) then {
_protectionStrength = _protectionStrength + _uniformProtection + _maskProtection + _backpackProtection;
} else {
if (_maskDependent == 0) then { _backpackProtection = 0 } else { _maskProtection = 0 };
};
_maskDependent == 0 means that it is dependent on having a backpack which has a protection value > 0, and the same is true for backpacks about masks
This probably isnt the most intuitive thing to explain lol
Basically if _maskDependent == 1 then it's dependent on having a backpack with protection value > 0 to get any protection (SCBA from contact DLC for example)
If 0 then it's fine (regular gas mask)
But _backpackDependent == 1 means that to get any protection from the backpack, it must have a mask with protection value > 0 to get any protection (stops you just running around with an air tank on your back)
Basically does it need a tube from the backpack to the mask lol
me again with yet another elementary question that i cant figure out the answer to
how do i exit the script/all scopes in sqf? 
i.e
if !(isNull objectParent player) then {
_protection = [objectParent player] call KJW_fnc_protectionProcess;
_random = random 1;
if (_random < _protection) exitWith {systemChat "pee"};
};
systemChat "hi";
``` exits the entire script rather than just the `if` statement as it does here
You can use breakout
exitWith {break} works, had to specifically type in the url for break into the wiki on the off chance it was a thing
It's a bit goto but sometimes preferable to "proper" methods.
breakout there would make it do the "hi" systemchat wouldn't it?
break specifically exits out of loops so it's a bit different.
With breakout you specify a scope to exit, so you can have scopename "main" at the top of the script and then breakout "main" will exit the whole script.
Oh, I'd assume that it'd just breakout to the same scope the scopename is in
that's breakTo
ah gotcha
how exactly does the DESTROY waypoint work? a lot of the time if i give an ai helo a destroy waypoint they'll just ignore it.
conversely, the loiter waypoint seems to cause the helicopters to ignore enemies and just loiter around aimlessly..
I think they still need to spot the targets, which they're quite bad at considering that they have a copilot with high-grade thermal optics.
I random-walk search & destroy waypoints for them and they usually find a target eventually.
If you want them to destroy a specific target then you could try a reveal.
Trying this but nothing seems to be happenjng
Et it to init space of a unit
Changed player to the unit name
The event does fjre
But nothing gets copued
Or sent in chat
Oh well, it wasn't working on my oc
This is a script that simulates a sniper that will not miss non moving targets. One shot, one kill. Its also possible to have a distant gunshot sound that originates at the virtual shooter... and therefore is directional. It came about from this thread by Melmarkian. I had fun doing it and it see...
Trying to use use this, any way to check where the shots are going to adjust the heights?
nul = [target,vsniper,aimhght,muzhght,projectil,muzzveloc] execVM "vsniper.sqf";
aimhght => The height of aim. The further the target the higher the aim point. Default is 1.75m (chest height).
the aimhght seems to determine that
I am not sure what do I place in there is it relative to the the shooter
Or the Z axis shown in editor
Is there any way to trace its path??
Or any other simple way to do this
aimhght is relative to the target
muzhght is relative to the shooter
BIS_fnc_traceBullets traces bullet path but you need an actual shooter
u can use projectile motion equations
I know them, but not sure how would I employ those
I will make something for you. Give me a bit.
This should (perhaps?) do the trick
small error, new version
should draw a red line along the trajectory of the bullet, much the same as BIS_fnc_traceBullets
can confirm the code works, on the caveat that the bullet actually successfully travels
Very quick question: is there any way to make BIS_fnc_typeText display over the cutText/titleText black screen? or would I require some other sort of workaround to make the screen black?
(because currently the typeText seems to be a layer under the black screen)
you weren't supposed to change anything, put a unit in the editor, press play and shoot the gun
this would get you the ammo classname to use for createVehicle
THANK YOU!
👍
hello, i want to get the camera position of spectator, but for some reason cameraon its not working, there is a nother way?
Do you mean the local game's spectator's camera position, or someone else's?
yes, mine
Then positionCameraToWorld would help
ive tryed but ask for a position
_posply = getpos player;
_poscam = getpos cameraon;
//this is the same pos
if i use positioncameratoworld:
>>getpos player
[2583.07,9840.8,0]
>> positionCameraToWorld player;
error
>> positioncameratoworld getpos player;
[14.2896,10160,9844.12]
Huh wait, you're trying to get the spectator mode's current camera position right?
yep
Then positionCameraToWorld [0,0,0]
It does happen when it does happen
Is there not an event for when someone enters/exits the zeus interface?
I don't believe so, but you can use a userAction EH to detect when they hit the Zeus button
https://community.bistudio.com/wiki/Arma_3:_Scripted_Event_Handlers OnDisplayRegistered & OnDisplayUnregistered
idd is 312 i believe, or you can filter by class, which should be RscDisplayCurator iirc
why this script not workink for SP ?? "this enableStamina false" it worked a while ago 😦
nothing wrong with that line, something wrong on your side
could it not work because of some mod?
could be, yes
ok thx mate
will this script work cursorObject addWeaponWithAttachmentsCargo [["rhs_weap_XM2010_d", "optic_Tier1_LeupoldM3A_Geissele_Tan", "bipod_Tier1_Harris_Bipod_Tan", 1];?
ive tried putting it in and it says init missing ]
im not sure what ive missed out
Is there any way to do this with eventhandler?
the error says missing ] 
no, there is no such event
ok
according to wiki you're also missing several params for weapon config
rfip
weaponConfiguration: Array in format [weapon, muzzle, flashlight, optics, primaryMuzzle, secondaryMuzzle, bipod]
that message wasn't for you 
cursorObject addWeaponWithAttachmentsCargo [["rhs_weap_XM2010_d", "", "", "optic_Tier1_LeupoldM3A_Geissele_Tan", [], [], "bipod_Tier1_Harris_Bipod_Tan"], 1];
thank you
init missing ]
have you put that in init?
well it won't work in init ofc
but dont i put it in the init of the object i want the weapon to go in?
im actually so dumb
as soon as i re read the wiki i saw this
that it said container name
if (!isServer) exitWith {};
this addWeaponWithAttachmentsCargoGlobal [["rhs_weap_XM2010_d", "", "", "optic_Tier1_LeupoldM3A_Geissele_Tan", [], [], "bipod_Tier1_Harris_Bipod_Tan"], 1];
use this
are they even compatible with that weapon?
May be the command isn't compatible with CBA Rails -- though I would imagine it should be
Try with base game gun and attachment to check
use arsenal to give yourself that weapon with the attachments and everything then run this in debug console:
weaponsItems player
and paste the result here
[["rhs_weap_XM2010_d","","","Tier1_LeupoldM3A_ADM_Tan",["rhsusf_5Rnd_300winmag_xm2010",5],[],"Tier1_Harris_Bipod_Tan"],["hgun_P07_F","","","",["16Rnd_9x21_Mag",16],[],""]]
it's not the same as what you put in there
wait
if (!isServer) exitWith {};
this addWeaponWithAttachmentsCargoGlobal [["rhs_weap_XM2010_d","","","Tier1_LeupoldM3A_Geissele_Tan",["rhsusf_5Rnd_300winmag_xm2010",5],[],"Tier1_Harris_Bipod_Tan"], 1];
[["rhs_weap_XM2010_d","","","Tier1_LeupoldM3A_Geissele_Tan",["rhsusf_5Rnd_300winmag_xm2010",5],[],"Tier1_Harris_Bipod_Tan"],["hgun_P07_F","","","",["16Rnd_9x21_Mag",16],[],""]]]
there
i equipped the wrong scope
but all the names look the same
no. the bipod and scope names were wrong
try this
alr
works
oh yeah also, i want an objective that says "take the sniper rifle" is it possible to make it complete when the player takes said item out of the crab
you can either check if player has that weapon or if it was removed from the vehicle inventory, two ways
which script would i use
so it would be this addEventHandler ["Take", { params ["player", "weaponcrate", "rhs_weap_XM2010_d"]; }];
put this in initplayerlocal.sqf
player addEventHandler ["Take", {
params ["_unit", "_container", "_item"];
if (_container == myCrate && _item == "rhs_weap_XM2010_d") then {
["myTask", "SUCCEEDED", true] call BIS_fnc_taskSetState
};
}];
no
no
replace myCrate and myTask with what you have
i see
you can also put it in the init of player
if it's a SP mission
thank xou i missed the part where the out is explained
I have a question regarding hashmaps. I want to get the magazines inside a container summarised.
[["A3S_Item_Salt",1],["A3S_Item_Salt",1],["A3S_Item_Salt",1]]
To this:
["A3S_Item_Salt",1,3]
you can use ["A3S_Item_Salt",1] pairs as keys and counts as values
tho if you don't have that many unique items using hashmaps is not worth it here
{
_item = _x;
_index = _list findIf {_x#0 == _item#0 && _x#2 == _item#1};
if (_index != -1) then {
_oldCount = _list#_index#1;
_list set [_index,[_item#0,_oldCount+1,_item#1]];
} else {
_list pushBack [_item#0,1,_item#1];
}
} forEach magazinesAmmoCargo cursorobject;```
Currently Im using this, but yea trying out to get it work with hash maps
When 1000 unique items are inside a container
For some reason extdb3 can't send long arrays to the database, atleast Im getting errors all the time
Thats why I need to count the items
_list = [];
{
_item = _x;
_cnt = _list getOrDefault [_item, 0];
_list set [_item, _cnt + 1];
} forEach magazinesAmmoCargo cursorobject;
if you want it in this format ["A3S_Item_Salt",1,3] then do:
_list = _list apply {flatten [_x, _y]};
_list = createHashMap;
{
_item = _x;
_cnt = _list getOrDefault [_item, 0];
_list set [_item, _cnt + 1];
} forEach magazinesAmmoCargo cursorobject;
_list = _list apply {flatten [_x, _y]};
_list```
Works good, thank you
1.55ms
right I forgot to add createHashMap 😅
what about
_list = _list apply {_x + [_y]};
?
I wonder which one is faster 
seems to be the same tbh
I'm sure you didn't have 1000 unique items otherwise it could be much slower
yea wasnt unique
_obj1 = KJW_Source;
_objProtection = 0;
_objProtection = if (_obj1 isKindOf "CAManBase") then {
[_obj1] call KJW_fnc_protectionProcess;
};
_uniformProtection = _objProtection#0;
_maskProtection = _objProtection#1;
_backpackProtection = _objProtection#2;
_objProtection```
KJW_Source is an object here and yet `_objProtection` is still returning as null 🤔 -- works fine for players
I will try with unique items
well for one thing your if doesn't cover the other case
Will it set it to nil if it's false?
it returns nil if _obj1 is not CAManBase
yes
wat? has nothing to do with scoping here
Hello there,
How to get player weight in kg? I'm using ACE3 mod.
the chunk after the bracket
if _objProtection = 0 it wont work
and running an if for each variable isnt the smartest
you simply need to provide an else case
_obj1 = KJW_Source;
_objProtection = if (_obj1 isKindOf "CAManBase") then {
[_obj1] call KJW_fnc_protectionProcess;
} else {0};
_objProtection = if (_obj1 isKindOf "CAManBase") then {
[_obj1] call KJW_fnc_protectionProcess;
}
else {
0;
};``` is what I'm doing at the moment
Yeah, _objProtection is an array for the then and a number for the else
Ok further test good results so far.
395 Items (76 custom items)
magazinesAmmoCargo cursorobject; // 0.129ms (8464 symbols long)
Compiled with Hashmap // 1.4ms (2238 symbols long)
Compiled the shit way // 6.2ms (2238 symbols long)
yep. told ya 😅
🤣🥹
I suppose I could use [0,0,0] and just have to deal with using uniform variables for vehicles 
https://github.com/acemod/ACE3/blob/8cdf0b2c686e9d763b950222e897eea154018aea/addons/common/functions/fnc_getWeight.sqf im guessing you're looking for this
thanks mate, I searched on ace3 repo, I'm blind xDD
im trying to disable the simulation for the triggers but i get an error that says:
error enableSimulation: Typ Array, expected Object
_allTrgs = nearestObjects [player, ["EmptyDetector"], 500, false];
_allTrgs enableSimulation false;
If there is more than 1, use
{
_x enableSimulation false;
}forEach _allTrgs;
is code execution inside the apply code block unscheduled?
ok thanks. cant quite make sense what i am seeing in the profiler
only isNil <code> and some other eden command forces unscheduled in the same script, nothing else
[player, "STAND1", "ASIS"] call BIS_fnc_ambientAnim; How would i use select random in this context to use for animations? Say i have STAND1 and SIT1.
selectRandom ["STAND1, "SIT1"] https://community.bistudio.com/wiki/selectRandom
[player, selectRandom ["STAND1", "SIT1"], "ASIS"] call BIS_fnc_ambientAnim; cannot be? Oh it works. Ty
Mhmm, how do i make a given unit refrain from calling out contacts and speaking in general?
can i disable that with disableAI?
NEED HELP WITH:
Looking to spawn after death as a player in my current squad and to become squad leader?
(wanting to spawn as a different guy on my team after I die pretty much. doesn't have to be specific person, just random.)
@wary sandal I think that's the only way. Can always re-enable the AI.
@radiant siren Attibutes/ Respawn. Then maybe using an event handler.
this addMPEventHandler ["MPRespawn", {
params ["_unit", "_corpse"];
}];
alrighty thank you!
right when i need it haha, thank you for remembering me this function
i will try disabling only "RADIOPROTOCOL" because i have some anims running
@wary sandal I should have been more specific. That's what i ment. Wojtek le second.
how would I grab the variable from a marker? currently im doing this
_zoneMarkers = [];
{
_x = toArray _x;
if(count _x >= 3) then {
_x resize 3;
if(toString _x == "AO_") then {
_zoneMarkers = _zoneMarkers + [_x];
};
};
} foreach allMapMarkers;
copyToClipboard str _zoneMarkers;
but it just returns this array
[[65,79,95],[65,79,95],[65,79,95],[65,79,95],[65,79,95],[65,79,95],[65,79,95],[65,79,95],[65,79,95],[65,79,95],[65,79,95],[65,79,95],[65,79,95],[65,79,95],[65,79,95],[65,79,95],[65,79,95],[65,79,95],[65,79,95],[65,79,95],[65,79,95],[65,79,95],[65,79,95],[65,79,95],[65,79,95],[65,79,95],[65,79,95],[65,79,95],[65,79,95],[65,79,95],[65,79,95],[65,79,95],[65,79,95],[65,79,95],[65,79,95],[65,79,95],[65,79,95],[65,79,95],[65,79,95],[65,79,95],[65,79,95],[65,79,95],[65,79,95],[65,79,95],[65,79,95],[65,79,95],[65,79,95],[65,79,95],[65,79,95],[65,79,95],[65,79,95],[65,79,95],[65,79,95],[65,79,95],[65,79,95],[65,79,95],[65,79,95],[65,79,95],[65,79,95],[65,79,95],[65,79,95],[65,79,95],[65,79,95],[65,79,95],[65,79,95],[65,79,95]]
why are you using toArray?
unsure, code I grabbed online to try and quickly grab the markers since trying to copy them in the editor wasnt working. Im gonna try and write some new code to get the markers. All I want is the Empty markers
if (_x select [0,3] == "AO_") then { _zoneMarkers pushBack _x };
what happened is you took the marker name, converted it to an array of numbers, resized it, and then appended the resized array of numbers instead of the marker name because your code overwrites _x instead of declaring a separate variable for the test
the code you copied must've been designed to resize a string before select took strings
ah thank you, and yeah I think your correct. It was like a 2015 or earlier post
you can't use == with an array and a number
that's not what you wrote here but count returns a number yes
yes it will get the variable then compare the array length with the number
Anyone know if config actions allow while loops? Mine doesn't seem to be getting into it.
params["_obj1"];
//Variables
_objPos = getPosASL _obj1;
_dimensions = switch (true) do {
case (typeOf _obj1 == "DeconShower_01_F") : {[1,1,2]};
case (typeOf _obj1 == "DeconShower_02_F") : {[2,0.5,4]};
};
_dimensions params ["_posX", "_posY", "_posZ"];
//End variables
//Begin code
systemChat "ran";
while {_obj1 animationSourcePhase 'valve_source' > 0} do {
systemChat "ran2";``` ran2 is never chatted
this works outside of the config one though 
you're missing a bracket at the end
chopped the code at the systemchat
It's much longer inside of the loop but calling the function through debug console works
spawning even
Ah, it wants a short sleep at the start for some reason 🤷

Indeed