#arma3_scripting
1 messages · Page 84 of 1
Hug
how do you know they're ommited?
maybe you're logging a nil value?
e.g. diag_log nil doesn't work. diag_log [nil] does
wojtek check pm
well it always worked, now only 90% of my logs are actually logged
for example, this is what happens when i click on a button I have
(the WRITE macros just translate to call {params ["_content"]; diag_log _content; })
so yeah i clicked on the button that triggers that logging but nothing
this might attempt to log a nil
which might fails as I said
is this exactly where it fails?
that one shouldn't produce a nil ever
it sometimes doesn't fail, and it sometimes fails elsewhere in the script
I'm very confused
does it skip some of them? or just not log anything at all after some point?
no, it just skips some of them and goes on with the rest of the script
until now? are you using profiling branch? or dev branch?
if not, "until now" doesn't make sense because the game hasn't been updated for a while
hmm what if you do params[["_content", "Im trying to log nil!"]]
none
well i've been getting new messages in the rpt such as
19:25:38 No speaker given for 'Samuel O'Connor'
but i think it's normal
I debugged the issue for hours, the thing is that it's so random
well the game hasn't been updated for several months so unless your issue started happening since then the problem is in your code
there's no substance to debug because the issue constantly changes
well it could actually be due to nil
just do diag_log [_this] in that function for now
or do this
if that solves your issue you know what you've been doing wrong
so there is still logs missing, and i don't see anywhere in the rpt "any"
so I guess no nil values on the horizon
I'm gonna guess that the logging code isn't always executing due to bugs further up.
I'd like to log this text via a different medium than the rpt file
to see if the issue has to do with my code
what else can i use? systemChat? the history is too short
diag_log or systemChat, or dll that writes in a txt file
the dll is my ultimate goal but it will take some time for me to learn rust
for now i think i will quickly setup a list UI and log it there
Avoiding repetitive code by shrinking it to a single word or two
as far as my knowledge goes, the scripts are first preprocessed (resulting in macros being processed) and then compiled
so it'd make no difference in performance
A macro might actually (slightly, if it was a big macro/used a lot) reduce performance if you were preprocessing and compiling the file every time you executed it (e.g. execVM, preprocessFile). Otherwise, no impact; at runtime, the game is seeing the code as if it were typed out in full, because the macros were already done during initial loading.
it appears that it is the diag_log command failing
everything works as expected... so far
I'll see how it develops tomorrow
Delete marker when unit is looted?
macros are stupid
they'll often end up evaluating the same expression multiple times
Hi guys I have a question about scope. so I have this code:
LEG_createFireRune = {
params ["_pos"];
//Place Fire Rune Picture on Surface
private _surfaceNormal = surfaceNormal _pos;
private _textureObj = createVehicle ["UserTexture1m_F",[0,0,0],[],0,"None"];
_textureObj setObjectTextureGlobal [0,"Img\Rune_01.paa"];
_textureObj setPosASL _pos;
_textureObj setVectorDirAndUp [_surfaceNormal vectorMultiply -1, vectorDir _textureObj];
private _dir = getDir _textureObj;
//Create light
private _light = createVehicle [ "#lightPoint", _pos, [], 0, "CAN_COLLIDE" ];
_light setLightAmbient [ 0,0,0 ];
_light setLightBrightness 10;
_light setLightColor [ 1,0.6,0.4 ];
_light setLightIntensity 10000;
_light setLightAttenuation [0,0,0,2.2,500,1000];
_light setLightDayLight true;
//createTrigger
private _trigger = createTrigger ["EmptyDetector",_pos,true];
_trigger setTriggerArea [2,2,_dir,true,2];
_trigger setTriggerActivation ["ANY","PRESENT",false];
_trigger setTriggerStatements ["this", "
systemChat 'BOOM!';
{deleteVehicle _x} foreach nearestObjects [position thisTrigger,['UserTexture1m_F'],2];
deleteVehicle thisTrigger;
", ""];
};```
What would be best practice for me to delete the light in the trigger. Also NOTE: i also could have N number of FireRunes in a scene.
_trigger setVariable ["mylight", _light];
deleteVehicle (thisTrigger getVariable 'mylight')
Thank you very much.
I feel like this has probably been made already, is there a script for reporting over system chat a player killing civilians?
"As in (player name) has killed a civilian"
https://community.bistudio.com/wiki/Arma_3:_Mission_Event_Handlers#EntityKilled
https://community.bistudio.com/wiki/Side
https://community.bistudio.com/wiki/isPlayer
https://community.bistudio.com/wiki/systemChat
https://community.bistudio.com/wiki/remoteExec
Should be straightforward. "If the killed unit is a civilian and the killer is a player, display a system chat on every machine"
I would encourage you to learn to read the docs and figure this one out if you're in the business of making missions but if you've never coded before and this is literally all you want then I'll write it up when I have a minute
you can either remoteExec or add the mission event handler locally to every client
dont worry about it, it was more of a if it had already been made sort of question
it's already been made in my mind 🧠
thats ok, thanks though
ok
I have the drawnametagsicon function right now
I think this is the important bit //Set Text: _name = if (_iconType in [ICON_NAME, ICON_NAME_RANK, ICON_NAME_SPEAK]) then { [_target, true] call EFUNC(common,getName) } else { "" };
I thought ` was used for code tags?
what's the correct way to check if extension is installed?
anyways, couldnt find out how to find the macro for EFUNC(common,getName)
fileExists, no?
hmm wiki says "Absolute paths are not supported"
I have extension in arma3 main folder so not sure if that works
aah seems to work but I have to use the DLL name like "ArmaTools_x64.dll"
that's a problem
make a valid call, if it returns empty string then it's not installed
yeah was thinking about that
ace_common_fnc_getName
Is there a command to retrieve the items (or the amount) in a listbox?
for code blocks use tripple `
I think the extension ARGS variant has that number return code. That might tell you not dound
Hi guys question is there a way to Push a player in a direction with out setting him Unconscious ?
setVelocity, but you might wanna add a small nudge in z axis
setVelocity can be deadly
Because players are stuck to ground quite hard, and just pushing them wont make them move, unless you use high amounts of force
You mean atl?
If they are on a hill, you will sink them into da ground
increasebeight by .005m
Ty guys very much and also by any chanse do you guys know how to get the player facing vector. Basicly i want it to push a player in direction he is facing.
something like this player setVelocity (((vectorDir player) vectorMultiply 5) vectorAdd [0,0,2])
found this little bit in the setName function:: _unit setVariable ["ACE_Name", _name, true];
Ty very much i got it to work a bit diffrent here is the code:
player allowDamage false;
player setPosASL [getPosASL player select 0, getPosASL player select 1, (getPosASL player select 2) + 10];
_vel = velocity player;
_dir = direction player;
_speed = 100;
player setVelocity [
(_vel select 0) + (sin _dir * _speed),
(_vel select 1) + (cos _dir * _speed),
(_vel select 2)
];
sleep 3;
player allowDamage true;
…setVelocityModelSpace?
player allowDamage false;
player setPosASL (getPosASL player vectorAdd [0,0,10]);
player setVelocityModelSpace [0, 100, 0];
sleep 3;
player allowDamage true;
That works too. Thank you very much.
Ello,
Can I check if wp1 (waypoint - 1) exists?
Uh, you use something like _waypointIndex < count waypoints _group
okay...
A waypoint is [group, index]
what's the output of that?
Q: how can player be an object and yet not isPlayer?
the scenario is MP joining but not yet 'spawned' or deployed.
my guess is still in the 'slot' object...
if (waypoint 1 exists) then {
add another one
} else {
//do nothing
};```
adding it with a script
playerLocation = [player, 5, 7, 5, 0, 0.5, 0] call BIS_fnc_findSafePos;
hint "meow_1";
if (leader team_1 distance player > 10) then {
if ( check if wp1 exists ) then {
wp = team_1 addWaypoint [playerLocation, 0];
hint "meow_2";
};
};
if (!isNull objectParent player) then {
{
_x assignAsCargo vehicle team_1
} forEach units team_1;
{
_x orderGetIn true
} forEach units team_1;
} else {
team_1 leaveVehicle vehicle player;
};
6th line
I want to check if wp1 exists
or wp0 exists (but yk)
What makes you think that either of these waypoints would or wouldn't exist?
uh
I dont want it to add another wp
I just want 1 waypoint
if its finished then add another one
Ok, waypoints don't get deleted/removed when they're finished.
hmmm
If a group has two waypoints then it still has two waypoints after they're completed.
hmmm
You can tell that a group has finished it's waypoints because currentWaypoint _group >= count waypoints _group
can I just have one waypoint to a group?
If you like, yes.
Delete any others, change that one. Use setCurrentWaypoint to switch back to it after completion & editing.
example??
no

setWaypointPosition is the only other command that you probably need.
it's not hard rtfm
for my wee brain it is
definitely have a "Man" object, but reporting false for isPlayer _player
felines have god brains, surely you can figure it out
ah... I have the peasant brain lol
okay, what if I can check if there is a waypoint (counting) and if there is a waypoint like less than 2 then add another one (or something)
also getPlayerUID player is reporting "". that and isPlayer player reporting false... why would that be the case in MP?
as I stated, joining the server, not yet deployed so spawn. still in the mission slot, perhaps?
I take player is objNull
take one or two steps back:
what do you want to achieve - if a group is currently moving?
I got it working
this works
no it's not, it actually has a value, I get a name from it and everything...
12:09:35 [...] [2429.52] [INVENTORY] [fn_inventory_onAceVirtualItemsAdded] Entering: [_name, _uid, _playerIsPlayer, count _virtualItems]: ["<name>","",false,13296]
I am passing it as a CBA EH argument, not sure what is happening to the object through that plumbing though...
this log tells me nothing, I don't speak ACE
my params are:
params [
[Q(_player), objNull, [objNull]]
, [Q(_virtualItems), [], [[]]]
];
_player has a value, I got the name, but reporting isPlayer getPlayerUID, false ""
Headless client would be one way. In that case player is the HC logic object.
Otherwise maybe a timing thing. I'm not sure on the exact order of how player units are constructed.
it's not a HC, I am joining the server...
however, my thought is, somehow still occupying the player slot...
but it is strange, if I just use player the player information seems okay.
when I route it through a CBA event, the information appears to be lost...
sprinkling in some logging to verify the sequence of events
so for purposes of these events, local events client side, no need to pass any player object as an argument.
somehow it is an issue with argument passing, players lose their information.
but if I always start from player, seems 'okay'
¯_(ツ)_/¯
Question is there a way for me to overlay texture with another texture. For example When I aim at person, I would like to put a custom image over his clothes and face Overlaying those texture with a texture.
no
You might be able to fake it using a UI-to-texture with the original texture as a background. Bit advanced though - and any scripted texturestuff will only work on parts of the person that can actually be retextured with setObjectTexture, which is not necessarily all of them
if object texture,
if PiP is enabled,
so not for everyone and definitely not something to count on
Yep, that worked
Does UI-to-texture require PiP? I know video R2T does but I've not heard about it for UI2T
oh wait, perhaps not
but still couldn't do it, because I believe he wants some decal system out of it
I would need something like this is this really not a overlay texture ? https://www.youtube.com/watch?v=8kTtNaMojaE
a different material perhaps
i did this but it is still not working, this is my file
it's not an overlapping set of textures but would help you achieve something similar to what's on that video
what happens to player (_player) objects crossing a mission start boundary? I am observing odd behavior isPlayer getPlayerUID reporting false "". I know isNull _player is false because I have a valid name _player. but I wonder there is something going on there, I have a callback in progress when the mission start happens.
Yo this is so cool will try to make something with this.
How does missionProfileNamespace identify the corresponding mission ?
Just mission name ? https://community.bistudio.com/wiki/missionName
missionProfileNamespace is separate to single missions. If you save missionprofilenamespace in mission #1, you can't load it it mission #2, because mission #2 has a separate missionprofilenamespace
https://community.bistudio.com/wiki/saveMissionProfileNamespace read description
i know, i just need to know what the identifier is.
I guess it's missionName but im not sure.
identifier?
nvm it's written there "the variables are saved into missionName.vars"
anyone have any ideas? in a MP scenario, it seems like these event callbacks are being torn across a mission start boundary... which is wreaking havoc on the _player (player) object in hand. anyway, trying to workaround that issue with couple of countermeasures best I can, but if anyone could offer any insights there, would be appreciated.
that worked! thank you so much!
no need for disableSerialization in non scheduled environments (event handlers like onEachFrame) right?
does uisleep work with saving?
when I save my mission and restart, the state of the script skips to after the uisleep (even tho the 30 seconds I specified have not elapsed)
I hope I made some sort of sense, it's not easy to explain
IDK, use sleep
I can't because sleep doesn't work when the game is paused
why do you want this?
for a button cooldown
everytime I click on the button it changes the text, waits a couple seconds (should work both in game pause and while playing) and then makes the button clickable again and change the text
I came up with this workaround
private _startTime = time;
waitUntil { time - _startTime > 5 };
I know it's bad but uisleep's behavior is weird
that's… sleep, no? time halts while on pause
This is incredibly cool, could you give a brief explanation as to how its done? Does it just change the texture to each frame every set time?
oh yeah, my bad
I think using diag_tickTime instead would work perfectly fine
iirc it's a set of paa's played one after another, there's a demo mission on workshop and in that repo which you can play and check what's inside
Thanks!
animated markers... never thought about that
yes
basically you can make a video or a gif, cut it into frames with any free or paid software allowing this and paste into an array through which script goes every frame
Ive always wanted an overlay system, would be cool if the ui2texture addition could manage that somehow
dunno, this would have to be a question to @robust hollow whether he had time and willingness to play with that stuff
you can make a floating UI with e.g a UserTexture set right in front of the camera
sorry, I realise it is unrelated but this popped in my mind
what does the fox doc say?
can a CT_LISTBOX have both a vertical and horizontal scrollbar?
I can't get a horizontal bar to appear
class screen: RscListBox
{
x = safeZoneX + safeZoneW - 0.5 - 0.025;
y = 0;
w = "pixelW * 500";
h = 0.8;
style = "0x10 + 0x20 + 0x200";
font = "RobotoCondensed";
sizeEx = GUI_GRID_H * 0.80;
colorSelectBackground[] = {1,1,1,0.85};
colorSelectBackground2[] = {1,1,1,0.85};
class ListScrollBar: ScrollBar
{
color[] = {1,1,1,1};
autoScrollEnabled = 1;
};
};
style shouldn't be a string, no?
doesn't make a difference, with or without the quotes
he doesn’t 🙂
this is not working for me
hey guys can I just check the syntax pls
if (({player isKindOf B_mas_aus_recon_M_F_mas} count _opticsAllowed)
it did read
if (({player isKindOf _x} count _opticsAllowed)
cheers
- mismatched brackets
B_mas_aus_recon_M_F_masis a variable not a string
you mean like https://community.bistudio.com/wiki/typeOf ?
sounds like you need https://community.bistudio.com/wiki/netId
dunno about that :/
every network object gets a unique ID before its creation
interesting, do countermeasures and projectiles get netIDs too?
Re-read what I wrote
its just a incrementing counter
I don't know if bullets and flares for example are network objects on arma
I have a hashmap where keys are objects (I used this workaround https://community.bistudio.com/wiki/HashMap#Unsupported_Key_Types), would it be better in my case to use network IDs instead (because they are provided in strings, so no need for that workaround)?
That workaround uses the network id
hashValue of object, hashes the object/network id
#define IS_BOX_EMPTY(arg1) ((weaponCargo arg1 + itemCargo arg1 + magazineCargo arg1 + everyContainer arg1) isEqualTo [])
Is there a better way of checking if a vehicle's cargo is empty?
Hi, I am currently trying to make a "pseudoitem" in arma, here's what my description.ext looks like;
class CfgWeapons
{ class ItemCore;
class InventoryItem_Base_F;
class HL_Item: ItemCore {
type = 4096;//4;
detectRange = -1;
simulation = "ItemMineDetector";
};
class HL_TestItem: HL_Item {
scope = 2;
picture = "\A3\ui_f\data\map\markers\flags\Spain_ca.paa";
displayName = "Testing Item";
descriptionShort = "A testing item.";
descriptionUse = "";
class ItemInfo: InventoryItem_Base_F {
mass = 10;
};
};
};
For some reason, the item does not appear in the arsenal. Any idea why?
you can't add weapons in description.ext
Oh, so i must make it a mod?
checking individually 
Is there any way I can add an item to the arsenal through mission?
yes
Even so
What do you mean?
instead of summing the arrays and counting the total
because that would be slower (if there are items in there) 😛
weaponCargo box isEqualTo [] && itemCargo box isEqualTo [] && magazineCargo box isEqualTo [] && everyContainer box isEqualTo []
This seems to be a wee bit faster.
Too bad that there is not simple isCargoEmpty box command
oh, there might actually be one
load box
Ah yes. That's kinda new
beware of weightless items :p
Well. Fix that damn config then
weaponCargo box isEqualTo [] && {
itemCargo box isEqualTo [] && {
magazineCargo box isEqualTo [] && {
everyContainer box isEqualTo []
}
}
}
```if performance is of the essence
looks slower
but thanks for putting the correct var name in it so I can just copy paste it ❤️
Result:
0.0062 ms
Cycles:
10000/10000
Code:
weaponCargo box + itemCargo box + magazineCargo box + everyContainer box
Result:
0.0051 ms
Cycles:
10000/10000
Code:
weaponCargo box isEqualTo [] && itemCargo box isEqualTo [] && magazineCargo box isEqualTo [] && everyContainer box isEqualTo []
Result:
0.0062 ms
Cycles:
10000/10000
Code:
weaponCargo box + itemCargo box + magazineCargo box + everyContainer box
Result:
0.0051 ms
Cycles:
10000/10000
Code:
weaponCargo box isEqualTo [] && {
itemCargo box isEqualTo [] && {
magazineCargo box isEqualTo [] && {
everyContainer box isEqualTo []
}
}
}
Result:
0.0003 ms
Cycles:
10000/10000
Code:
load box
I go with the last one, taking the risk of having items in it without weight.
fair enough
Given that I know what classes can be in the box I'd say that's a well calculated risk 🤣
Is there a way to script tasks to show up after another task has been completed?
so there are no reasons for me to switch to BIS_fnc_netId?
or maybe there are performance implications?
I meant more like:
count _a + count _b + count _c + ... == 0
they all bad 
Well...
Result:
0.005 ms
Cycles:
10000/10000
Code:
(count weaponCargo box + count itemCargo box + count magazineCargo box + count everyContainer box) == 0
Aint much better 😄
are you using Dedmen's simpleVM?
count weaponCargo box == 0 && {
count itemCargo box == 0 && {
count magazineCargo box == 0 && {
count everyContainer box == 0
}
}
}
```:D ?

well I mean do you use Dev or Profiling? 😅
Neither
Hey. I've go a problem: I attach a player to an object and try to rotate him. But setDir and setVectorDirAndUp don't change anything.
Any idea? (tested on local MP server)
player attachTo [_table, [0,0,-0.54], format["seat_%1",(_seat+1)],false];
Make it true and see
from hashValue, no
[0] apply {(count weaponCargo box + count itemCargo box + count magazineCargo box + count everyContainer box)}
😄
But pretty sure that'll still be slower, even just the array creation
Uff the sight of that.
Is there an event fired when the mission is reloaded?
I have a display KeyDown EH that toggles a control. The issue is when I reload the mission, the event isn't disconnected resulting in the event triggering two times after a reload, 3 times after 2 reloads, etc...
DisableSerialization in that function?
no
Ok 😦
private _mainDisplaycode = 46;
waitUntil { !isNull (findDisplay _mainDisplaycode) };
(findDisplay _mainDisplaycode) displayAddEventHandler ["KeyDown", {
params ["_display", "_key", "_shift"];
switch (_key) do {
case 33: { // 33 keycode corresponds to the F key
if (!_shift) exitWith {};
systemChat "Screen opened";
logs_screen_opened = !logs_screen_opened;
if (!logs_screen_opened) then {
private _devLogs = _display displayCtrl 49124;
private _devLogsBorder = _display displayCtrl 49125;
if (!isNull (_devLogs)) then { ctrlDelete _devLogs; ctrlDelete _devLogsBorder };
} else {
_devLogs = _display ctrlCreate ["WTK_DEVLogScreen", 49124];
};
};
};
false // indication that the input is not meant to be intercepted
}];
code ran at mission startup (postinit)
it has nothing to do with restarting a mission. you're adding it to display 46, which is not destroyed unless you close the mission completely
you must always save event IDs on the event object to prevent duplicating EHs
if (findDisplay 46 getVariable ["myEH", -1] >= 0) exitWith {};
_EH = findDisplay 46 displayAddEventHandler ["...", ...];
findDisplay 46 setVariable ["myEH", _EH]
clever solution thanks, don't know why I was thinking doing it the other way around (removing the event)
I will also note getVariable ["var", -1] >= 0, it looks better than when wrapped in isNil
evening o/
Hmm, will this work at all like I hope it will?
while {conditionVariable} do {
delay = (timeleft * 50) max 300;
sleep delay;
playSound3D [proper sound arguments etc]
}```
specifically, it'll play the sound more and more often up until it gets lower than 300, and then 300 will be returned instead?
seems so
Okay, cool.
For while scripts that are meant to be running all mission - they are the entire focus of the mission - where should they be called from, and how?
They should only be evaluated on the server, to avoid duplication.
But playSound3D should fire on all clients even if the thing is only evaluated on the server... right?
Maybe a trigger ingame that fires the script once the mission is triggered to start.
https://community.bistudio.com/wiki/playSound3D
effect: global
right, I'm just trying to figure the best time to invoke a thing that's gonna be silently looping literally all mission
and needs to work for JIP
what does this mean?
while does take a code not a boolean
Is not a code
?
{} <- a code
() <- just a bracket
good evening
Ello, sorry for interjecting.
How do I check if a specific player joins the server and is in a specific slot?
OR
If any player is in a specific slot?
Like if there is a slot in a server with name Slot-A, I want…
if (PlayerInSlowA) then (execute script). I want to check if a player is in a specific slot :)
That sort of stuff is usually allUsers + getUserInfo but I'm not sure if it's possible to detect slot presence.
Hmmm that’s sad
Can I check if a slot is controlled by Ai or player tho?
Or like if player is ai or a player?
If u know what I mean
How to check for a player slot? The only way I found was to name the object in the editor and act on that, but the game keeps showing errors about it not existing if that player slot is not taken. if (!(isnil b)) then { if (b1 == player) then { }; };
I found this
oh yeah, variable per slot might work.
Yeah
has anyone ever written a function that converts a base10 number to base16 (hex)?
it'd save me some time
Orgo_Andy pointed me here because i'm stuck!!! I have a question.. which i hope i simple and just not seeing it... XD.. . What is the most efficient way for fire a script on a client or capture the event of a client exiting a vehicle. ANY vehicle. could have been server spawned, other player spawned, ect. i have thought of several ways.. but all seem to have major downsides... event handler spam... or dealing with server event handler ping lag. Thanks in advance for your time everyone.. i see some legends in the arma world in here o_0 :bows:
Hello everyone,
Is there a method that allows, on buildings where chairs are already implemented in 3D, to make a script to sit on them?
I looked a bit to try to do it, but without success so far!
?
Operator precedence. That's effectively if ((!player) inArea _x), which is obviously not the intention.
You need to write it as if (!(player inArea _x)). if !(player inArea _x) is also valid.
Oh wait, it's a while.
yeah
while takes code, not bool. So while { !(player inArea _x) }
oh thats what i was doing wrong the whole week lol, thanks
The code is completely wrong still though.
Looks like you need a while loop on the outside of the forEach, and an if on the inside.
while just executes until the condition is true. So in your loop there it just sticks on the first while and doesn't check the other areas.
while {true} do {
sleep 1;
{
if !(player inArea _x) then {
_x setMarkerAlpha 0;
};
} forEach TRA_AreaMarkersMilit;
};
Depending on how you're launching this code, it may need a spawn as well.
Also I'm just guessing what you're trying to do.
It should have a check for the current alpha value and only set when changing, because setMarkerXXX commands are network-spam.
even looked into client side animdone eventhandler... which would mean finding every vehicles get in anim... for every seat... which also fires 2-3 times during the action... doesn't seem efficient. .. someone slap me for missing the obvious here :D
think about 80 players... and all the vehicles that could be on the map... you would have to have an event handler on each vehicle for each player
doesnt seem right
the getout only fired on the client that runs the event handler.
if the server runs the event handler there is ping lag.... it needs to happen right on get out.. no lag... so client side
you can try running a per frame event handler on each client that checks if (vehicle player != player) then {inVeh = true;}; and then if (inVeh) then {call script};
i have not made any per frame event handlers.... and i stay as far away from loops as possible... is that an efficient way to so this? would this cause any noticeable client lag?
not sure, somebody more knowledgeable will have to chime in
as long as you keep the code in the event handler minimal i think it should be fine though
probably better than having 100 getout eventhandlers on each client
thanks for the reply at any rate,,.. gave me one more option to think about... i have come up with 3 and i dont like them
- event handler spam every veh. 2) server event handler every veh (ping lag) 3) client eventhandler animdone and getting every animm for every vehicle and seat(bleh!)
- from robthread: per frame eventhandler to check vehicle player != player.
thanks to all who reply!
In the zues module set costs you able to set the cost of objects such as humanitarian, and military, ect ,ect. Is there a way i can check to see if the OBJECTS nearby are military, or fall under HUMANITARIAN in say a script? Maybe something close to this list = player nearEntities ["Man", 1000]; Count list;?
I dont understand... MySimpleTask = player createSimpleTask ["simple task title"]; MySimpleTask setSimpleTaskDestination (position player); MySimpleTask setSimpleTaskDescription [ "simple task long description", "simple task title", "attack" // this should be the task label ]; MySimpleTask setTaskState "CREATED"; where do i find the waypoint label name? It only gives me the default label instead.
What do you mean by "default label"? MySimpleTask is the task you're changing. The "label" is the "attack" as you have in your script?
Ello, How to continuous check of if condition instead of continuous loop :D
@dusk gust Thanks for the reply i ended up finding another way.
trying to test, I will let ya know if I found stuff or not
Well depends what you are trying to do to check the codition constantly.
So let me tell you my plan,
I want something to check if the condition is true or not once in a while, if it is true and script under it is running then dont run the script again (if using while loop), if it is not running then run the script once (if conditions are met) and keep checking if the condition is right
can I unlocalize a value from config?
made no difference
Use getTextRaw instead of getText.
You can't unlocalize it once returned with getText, since it's just a string and the game no longer has any idea what loc key it belongs to.
What does the script do? In general what you said can be done like so:
while {true} do {
if (condition) then {
call someFunction;
};
sleep 1; // check the condition 1 second later
}
The other function can have loops, etc. (it should check the condition itself and exit if it's not met)
If the condition you're checking can be triggered by an event, you can use event handlers as Legion said. They don't use a loop and don't waste resources all the time
same script, yk
the mod I was working on lol
so what's the difference with call and without?
even if I wont use Function
What did you want to use instead of call?
I mean what does "without" mean? Putting the code directly in the "then" scope? If so no difference
So
The thing is, when I am using my script in multiplayer with playableUnit the script wouldnt work, script wont load. No bugs it's just script inits when server starts (as it should) and tries to find the player that is supposed to use the convoy. Now as it takes a while for player to join and occupy the "playable unit" the script checks if the specified unit is there or not and it cant find it (as Im not in there) and it will just close the thing and wont work, now what I want is that script should check if player exists (or player == playableslot(yk) and if it is then launch script once, if not then keep checking if the player is there and once player disconnects or leaves slot (aka check if player is alive if found and then scripts checks again and if no player is found then wait for the player to join and once player does join (after script finds out that player was not in but was before (im shit at explaning anything) the script will call function once).
while {!isNull curatorName} do {
if (player == curatorName) then {
// code
if (true) then {
// script
};
};
};
also script = mod
Okay I tested this way of initialising and it works in multiplayer but now I have to see what happens when I leave the slot and get back in it.
getTextRaw returns the key, not the english text
Yes, that is the unlocalized content of the config property
If you wanted "localized to English" you should have said that, not "unlocalized" :U
Someone might correct me, but there doesn't seem to be any way to force localisation in a given language. It will always localise to the player's selected language.
That is sorta the whole point. If you wanna force localization, dont localize at all, just write the text.
does anyone have any bright ideas for adding acceleration into a setvelocitytransformation? in my head modifying how quickly the interval passes is the best approach however i'm not quite sure how to manage that
nvm, interval = interval + (diag_deltaTime/3)*(time-6); works (just obviously dont do it like that). wasnt working before so guess i made a typo
Learned it the hard way years ago that just extrapolating current movement is quite a bad acceleration implementation (unless you want flying tanks) 😄
it's just for a couple destruction effects in a mission for static objects so not overly fussed 😅
Yeah, didn't mean your implementation, just happened to remember my script and thought I'd add my warning in case of someone else has the same idea than me back in the day 😄
Yeah I gave up using SVT a while ago for my capital ships mod and just resorted to setposasl + setvectordirandup on each frame 😅
easier to use SVT here now though
are custom scriptedEventHandlers listened for every frame?
no
they are triggered by a call on event, apparently
systemChat "hello";
//whatever the command for triggering an event would be here to tell you that a "hello" systemchat has happened```
anyone know why nearestObject [(getPosASL _bob), typeOf _bob] is returning objNull when there's the same type of object right beneath bob? 
no errors or anything, just returns objnull
what should i be using? wiki just says position: Object or Array format Position2D or Position3D - position to start search at
i know right
Oh nearest obj I thought it's objs 
AGL pos or pos 2d
also is bob a simple object?
ah swapping to object finds a match
except its transforming to the wrong place
wait i think it may be finding itself??
It is
ffs
What are you trying to do? Why use nearestObj?
private _cell = nearestObject [this, typeOf this];
this setVariable ["KJW_Destructive_EndObject", _cell];
``` in object init so i dont manually have to do this crap
EndObject is where this ends up at the end of its destruction transformation
Use nearestObjs
does that exclude itself?
No but at least you can easily do it using -
wait that works for arrays?
nearestObjs [...] - [this]
oh array of just this
private _cell = nearestObjects [this, [typeOf this],20, true];
_cell = _cell - [this];
this setVariable ["KJW_Destructive_EndObject", _cell];
``` so that should work right
im so confused
_obj = _cell - [this] param [0, objNull]
The fact you didnt group that together gives me eye aids
roger i'll give that a punt ty
Just making sure you don't get nil if you do _cell#0
ah
i didnt even realise you can do that with arrays ive always been doing find and deleteAt
How can you access a trigger's name from within a spawn block in "On Activation"? In this simplified example I have a trigger with:
Condition:
(vehicle player) in thisList
On Activation:
h = [] spawn {
_playersInArea = count (allplayers select {_x inArea thisTrigger});
hint format ["Players: %1", _playersInArea];
};
thisTrigger comes back as an undefined variable. This example doesn't need to be in a spawn block, but the code I'm using does.
You can pass variables to spawn here is a simple Example:
["test"] spawn {
params ["_var"];
hint format ["%1",_var];
};
Thank you, that answers a few other questions as well.
h = [thisTrigger] spawn {
params ["_trigger"];
_playersInArea = count (allplayers select {_x inArea _trigger});
hint format ["Players: %1", _playersInArea];
};
i am trying to make a script for a weapons work bench and i need guided to some sort of command that will move the players weapon from their body to the table top of the workbench
not sure if setVehiclePosition is the right command for a weapon
What about isEqualTo ?
A weapon currently equipped by a unit is a proxy controlled by their animations, not a real object you can control
Options:
- create a fake weapon based on their current weapon, using createSimpleObject. Doing attachments may be a challenge; the placed weapon will be non-interactive.
- copy the player's current weapon and attachments to a groundWeaponHolder, using createVehicle and addWeaponWithAttachmentsCargoGlobal. You'll definitely be able to do attachments, but the placed weapon will be interactive.
In either case, the position of the placed weapon/the groundWeaponHolder containing it should be controlled with setPosASL or setPosATL.
awesome ill play with it and see what happens. Thxs
Q: about container objects, uniforms, vest, backpacks and such... trying to get a handle on which config they might reside in... one reference suggests unforms vest may be "CfgWeapons", whereas backpacks are "CfgVehicles"? or perhaps I have my wires crossed there?
Also, if they are "CfgVehicles", not sure I can verify the "type" it is, as given from its config, if that is even necessary, i.e. whether specifically uniform or vest.
Some sample code snippets doing my background on...
_y = player;
_u = uniformcontainer _y;
_v = vestcontainer _y;
_b = backpackcontainer _y;
[_u, _v, _b];
_b_cfg = configfile >> 'CfgVehicles' >> (typeof _b);
_v_cfg = configfile >> 'CfgWeapons' >> (typeof _v); // weapons? or vehicles?
_u_cfg = configfile >> 'CfgWeapons' >> (typeof _u); // weapons? or vehicles?
// [_b_cfg, true] call bis_fnc_returnparents;
// [_u_cfg, true] call bis_fnc_returnparents;
// [_v_cfg, true] call bis_fnc_returnparents;
getnumber (_u_cfg >> 'type');
// getnumber (_u_cfg >> 'iteminfo' >> 'type');
// getnumber (_v_cfg >> 'iteminfo' >> 'type');
Thanks...
The feedback I am getting is that they are more like "CfgVehicles", or maybe that is a confusion over the article being worn by the player object, player being the vehicle ... i.e.
_y = player;
_u = uniformcontainer _y;
_v = vestcontainer _y;
_b = backpackcontainer _y;
[_u, _v, _b];
_b_cfg = configfile >> 'CfgVehicles' >> (typeof _b);
_v_cfg = configfile >> 'CfgVehicles' >> (typeof _v);
_u_cfg = configfile >> 'CfgVehicles' >> (typeof _u);
// [_b_cfg, true] call bis_fnc_returnparents;
[_u_cfg, true] call bis_fnc_returnparents; // yields classes, whereas 'CfgWeapons': []
// [_v_cfg, true] call bis_fnc_returnparents_returnparents;
// getnumber (_u_cfg >> 'type');
// getnumber (_u_cfg >> 'iteminfo' >> 'type');
// getnumber (_v_cfg >> 'iteminfo' >> 'type');
For an Arsenal you usually need these
(CONDITION configClasses (configfile >> "CfgWeapons")) + (CONDITION configClasses (configFile >> "CfgMagazines")) +
(CONDITION configClasses (configFile >> "CfgGlasses")) + (CONDITION configClasses (configFile >> "CfgVehicles"));
right I understand the configs, broadly speaking... what I am trying to understand better is for uniforms vests in paritcular... at least acording to ACE virtual arsenal, their buckets suggest uniforms, in particular, may be weapons, but evidently they are not, or I cannot verify it as such, they are considered vehicles, according to this?
configOf _u; // bin\config.bin/CfgVehicles/Supply40
Similarly vests
configOf _v; // bin\config.bin/CfgVehicles/Supply140
maybe it does not matter as long as I can land on its config, inspect some class parents, etc. i.e. barking up the wrong tree there...
The uniform and vest class that you would assign to a player, or get as a return from uniform is a weapon (and a proxy, no unique instance of it exists as an object).
The container object is a dynamically-created vehicle, like a ground weapon holder, which is secretly connected to the unit.
uniforms/weapons in CfgVehicles are generally a weaponholder with said piece of gear inside 
ah okay starting to understand the difference there
class versus object instance
can you get to the original class name from the weapon holder? i.e. presumably "Supply40" "Supply140" those are weapon holder proxies. but I may have the class name in some cases, or need to bridge the gap.
so that's even funnier:
gettext (configof _v >> 'displayname'); // "Ground"
even though equipped on player
Supply40/Supply140 are general inventories with capacity of 40/140 units. And are likely used by multiple types of gear 
Config lookups get the base config, not the current result of any dynamic overrides it may have, so even if the displayed name was changed depending on what object it was connected to, that wouldn't show it
thanks for the insight...
I'm wondering if there's any reason as to why addMagazineGlobal and removeMagazineGlobal function differently when executed through server. I noticed that removing magazines through server does cause them to disappear from the inventory, but executing magazines player through server would still show the removed magazines as if they were still in the unit's inventory.
I'm confident I can fix the issue by just remoteExecuting the code instead, but it'd be nice if I knew as to why this happened and whether there's any point in using removeMagazineGlobal instead of removeMagazine if I have to remoteExec it globally anyway
I need some help, im trying to get an elvataion from a vehicle to a target, relative to the vehicle
AI Skill level keeps resetting to between 3 and 19%, pls help
Disable AI mods
not running any
I have narrowed it down to 4 mods tho, will let you know which one it is
found it, It's the Animated Recoil Coefficient Changer for some stupid reason
do you have it enabled for ai?
is there any way to change a player unit's name in MP?
@sullen sigil not really/fully
ah, rip -- guess i have to ask very nicely for people to change them properly then
If addMagazineGlobal and removeMagazineGlobal aren't having global effects regardless of where executed then that's a bug.
To which extent can I modify the damage handling without scripting something in the damage handle EVH?
To elaborate further, I only know the entry in the Server Profile reducedDamage , is there something else?
I found this, but how would I change the Damage Modeling?
https://community.bistudio.com/wiki/Arma_3:_Revive#Damage_Modeling
Arma 3 revive itself overrides the handleDamage EH, I'd guess.
Maybe it's engine-level but I doubt it.
So without modifications or scripts changing what happens when I get damage, I can't really change the damage behavior?
(That I only can change the damage behavior through scripts / EVHs is my understanding, I just want to know if there is some other way)
You can choose which of the BI damage model presets to apply. That's about it without the use of a mod to change config values or a handleDamage EH.
If you want to use a handleDamage EH on a player and don't want to completely turn off the BI Revive system, you'll need to first remove BI Revive's own handleDamage EH and then pass your handled damage back into the BI Revive system yourself.
Example:
waitUntil { !isNull player };
[] spawn {
// Look for and remove BI revive event handler, timeout after 15 seconds
for "_timeout" from 1 to 15 do {
if (!isNil {player getVariable "bis_revive_ehHandleDamage"}) exitWith {
player removeEventHandler ["HandleDamage",player getVariable "bis_revive_ehHandleDamage"];
player setVariable ["bis_revive_ehHandleDamage",nil];
};
sleep 1;
};
};```
Then in your EH, the last return would be:
```sqf
[_unit, _selection, _newDamage, _source, _projectile, _hitIndex, _instigator, _hitPoint] call BIS_fnc_reviveEhHandleDamage```
Otherwise, your damage results will be applied directly without going through Revive processing, and various parts of the Revive system will not work.
Thanks
What's up guys. I have a question regarding addAction. I copied an action which is supposed to call a script when triggered. I called this action "Show Generators". How can I create an action to cancel the "Show Generators" action? Thanks in advance for the answer!
There is a condition in action, have some boolean flag there and flip it when you need it
how do I tell if an object legit supports an inventory? programmatically I mean.
as if I am trying to consider things like an HQ building, for instance, but it is showing me some, what I would consider to be, potentially false positives.
or rather is it that 'any' object can potentially host an inventory?
_y = cursorobject; // the HQ building
load _y; // 0 (?)
itemcargo _y; // [] (?)
everycontainer _y; // [] (?)
So you were running AI mods after all 
Can someone help me there is an animation in 3den enhanced called HANDS_HELD_HIGH I want to know the name of that animation but cannot find it in the animation viewer
That anim. name is just an alias for an animation set.
https://community.bistudio.com/wiki/BIS_fnc_ambientAnimGetParams
This will get you the animations of you plug ib the animation set
maxLoad
Or check its config
How to bind a unit to an object? i.e. I set, for example, the radius of the bunker placement, but for the unit to appear together with the bunker in a certain radius.
i need some help doing some vector maths
trying to get the relative elevation from a vehicle to a target
_heliPos = getposasl _heli;
_targetASL = getposasl _target;
_vWorld = _heliPos vectorFromTo _targetASL;
_vector = _heli vectorModelToWorld _vWorld;
_vector call fza_fnc_vectorElevation params ["_magnitude", "_elevation"];
if (_elevation > 25 && _fcrMode == 1) exitwith {};
fza_fnc_vectorElevation
params ["_x", "_y", "_z"];
private _magnitude = vectorMagnitude _this;
private _elevation = 0;
if (_magnitude > 0) then {
_elevation = asin (_z / _magnitude);
};
[_magnitude, _elevation];
hmm
il have a look thanks
yh im not good with vectors, i cant convert it to my use case
im trying but i need a degrees output
Question. I am using extDB3 to retrive data from a database. The returned value is of a string datatype and looks like this
"[1,[[sdasd]]]"
When using parseSimpleArray it returns a format error... any ideas why?
parseSimpleArray can only handle arrays containing numbers, strings, bools, and arrays containing the previous 3 things. It cannot handle variable names, in your case sdasd.
You can get around this by storing the variable name as a string, and then using getVariable to translate the string into the actual variable once retrieved.
Does it have any disadvantages to put an if-Clause in an If-Clause? like: (_isGarage or if !(isNil "_typeOf") then {_objType iskindOF _typeOf} else {false})
yes*, you slow things down
_isGarage || { !isNil "_typeOf" && { _objType isKindOf _typeOf } }
Ok, i thank you! ❤️ the second part after "||" doesn't have to get "called" or something? I think i have to a bit more research regarding Data Types ^^
it's code, it is accepted as right argument by || and && since A2OA 1.62
see
https://community.bistudio.com/wiki/a_or_b
https://community.bistudio.com/wiki/a_%26%26_b
without code, everything would be executed, and _objType isKindOf _typeOf would trigger an error if _typeOf were not defined
Ahh ok. This will simplify things alot!
Thx again 😄
Woudn't this throw error as well ?
_isGarage || { !isNil "_typeOf" && { _objType isKindOf _typeOf } }
Should it be like ?:
_isGarage || { !isNil "_typeOf" && { _objType isKindOf _typeOf; true; } }
no…?
{ _objType isKindOf _typeOf } dosent return bool ?
oh shit nvm
It's not an AI mod, it SHOULD just change how recoil behaves in the game, but Arma is wierd like that
No
it is an AI mod because it alters AI's sway behaviour.
Interesting... I guess a recent update added that, because I have been playing with this mod for the past three months and the issue first started appearing last week
I've been playing with it since 2022 and following its development, and it is what I said. 
and I am not surprised something does not work as it should in it.
Thx, now I nöknow how to fix it
*know
is there a reliable way to get fighter jets/CAS classnames from config?
Having issues with the support requester module not showing up on a live server any idea?
so not so much, turns out more false positives... but I did a bit more verification...
_y = cursorobject; // HQ building
maxload _y; // 0, false positive
getcontainermaxload typeof _y; // -1, cooking with oil
https://community.bistudio.com/wiki/drawIcon3D
textSize: Number - (Optional, default: size of system) text size
Size of what system?
is there a way to to grab the display name of everything in this array? [[],[],[],["TLRP_PugsNotDrugs",[["CUP_20Rnd_556x45_Stanag",1,20]]],[],["B_Carryall_oli",[["ToolKit",1],["hlc_30rnd_556x45_EPR",1,30],[["CUP_hgun_Glock17","","","",[],[],""],1],[["CUP_arifle_M16A1","","","",[],[],""],1]]],"TLRP_StaffSergeant_Beret","",["Binocular","","","",[],[],""],["ItemMap","ItemGPS","tf_fadak_8","ItemCompass","Itemwatch","NVGoggles"]]
side note, I thought for sure that the NATO Arsenal box (bin\config.bin/CfgVehicles/B_supplyCrate_F) supported inventory load. is that not the case any longer, or is it something that folks added later on? is it possible to add inventory support into objects in game?
or copy all the class names into a separate array
@analog inlet It's not trivial code because some of them are CfgWeapons, some are CfgMagazines and one is CfgVehicles.
flatten -> BIS_fnc_itemType -> guess config -> BIS_fnc_displayName
Would be my first guess
Remove anything that's not string*
If you can't be bothered dealing with the format properly then I guess there's flatten + isClass.
flatten works a treat but i ned to now remove the numbers from the array
flatten _array select {_x isEqualType ""}
that removes the numbers but leaves "" behind
so make the obvious change?
I fixed that 😄
using the last bit of code is where it gives me ""
(flatten _array select {_x isEqualType ""}) - [""]
Still can't figure it out
Did you get as far as getting aircraft?
"configName _x isKindOf 'Plane'" configClasses (configFile >> "CfgVehicles") apply { configName _x}
probably scope = 2 for stuff that's supposed to be usable.
proper way would use simulation instead.
correction, rechecking it, yes, I see maxLoad now... container max load reporting -1 ubiquitously, which leads me to believe it is something else entirely. sorry for confusion...
although odd, I am not getting any Inventory in my action menu. when I enter a vehicle and disembark, then I start getting Inventory again...
I do have ACE loaded, so I wondering if that is an oddball ACE interaction going on?
Inventory is often a pain on vehicles. Only shows up in specific areas.
once I jump out, I get the action in proximity, then can see the object as its 'crate'. but not before I jump in and out.
also I thought there was an ACE interaction thingy for inventory, but I could be mistaken there.
although I do vaguely recall the Polaris models being a bit stubborn where inventory is concerned. but I can't be positive about that.
usually I am in a server that supports RHS, HUMVEE models, and tend to prefer those over the vanilla choices, so...
so just checking, is it me, maybe ACE vehicle locks behaving strangely, or it is what it is... leaning toward the latter...
but still odd even the NATO arsenal box not giving me any inventory actions...
You have to get quite close to that one.
for the NATO box? I am right up on it...
What is the exact name of the box you're using?
So I set the variable name in the Editor to a desk and then exported it into SQF to import in game. However, while exporting it does not export the variable name for this desk (but it does export the variable name for markers and units)
_object2 = createVehicle ["Land_PortableDesk_01_black_F", [0, 0, 0], [], 0, "CAN_COLLIDE"];
_object2 setVectorDirAndUp [[-0.000584831,1,-0.000731616],[0.000140539,0.000731699,1]];
_object2 setPosASL [14629.2,16743.4,17.9103];```
I want this Land_PortableDesk_01_black_F to have the variable name set as Audit_Desk_0
hmm I am thinking maybe it is an ACE thing...
I gave the name and config earlier
super weird... if I stand on the object I can see its inventory...
I did say you have to get close...
wonder is it a config range issue maybe?
What I'm trying to achieve here is to assign the desk the variable name of Audit_Desk_0 which is then referenced by another script to perform some operations.
Like uncomfortably close.
cuz in a 'virgin' editor scenario I get the inventory action just fine
I regularly use B_SupplyCrate_F in both ACE and non-ACE setups and I haven't noticed any difference.
or let me rephrase, is there a command or function that can effect that range?
It's not called "NATO Arsenal" in vanilla, and you can't search the editor objects list by classname :|
I just tested it in vanilla and am able to access it's inventory at a perfectly reasonable distance.
yeah I am comparing the mod I got in the works, and a separate test scenario... the test works fine for whatever reason. hence I am asking about commands or functions that could effect that. or maybe it is an obscure ACE thing, I don't know.
You can search it by class
How? That would be very useful for me
Type "class <classname>"
Outstanding, thanks
if you hover over the search icon it shows you that
The entity browser on the left has similar options
I have never hovered over or even clicked on the search icon in my life
😄
civilian setFriend [west, 1];
if this is executed will it work globally or does it have to be done via remoteexec?
if its remoteexec how
cant seem to figure it out
ohh thats handy to know in the future thank you
You're welcome
Q: when during vehicle lifetime are inventories populated with defaults?
...wait, icons are on the top right for you?
I think it's before createVehicle returns.
hmm... cuz moment of vehicle creation, it does not seem to be populated with anything... at least if BIS_fnc_inv is telling me the truth when my CBA EH sees the object...
most likely mod interference
probably... looking into one plausible scenario right now, thank you...
won't that include stuff like let's say C-130 if we were using RHS
Yes, it's a starting point.
i have a modding question. so, the game logic class has its simulation set to "invisible", where can i find the definition of it?
what i need is a class that is just like game logic but able to move (directly through walls and terrain)
Can i somehow set the Activation in a way that it only triggers if the player runs into it?
Is the Only way to let it trigger at ANYPLAYER and filter for the player in the TriggerStatement?
through walls and terrain
I assume you mean "naturally"? in that case afaik there's no such object in the game. you can make one yourself tho
also no object can move thru terrain (at least not by itself)
yeah im trying to figure out how to make such an object that would be:
1 invisible
2 invincible
3 teleport or move very quickly to where you order it to
if you make it a local trigger you won't even need to check for player
gameLogic is invisible and invincible and allows itself to be given orders just like any other unit, but it doesnt move.
can I ask for what purpose exactly?
teleport or move very quickly to where you order it to
if you want it to teleport you can usesetPosASL
there's no need for "ordering" it to go there
it's an utility intermediary object. what i tried so far was inherit from Civilian class, give it a custom movesCfg with extremely high animation speed, and hide its model
setPosASL requires knowing the position, is there a way to extract it from unit's given orders?
expectedDestination
god, i've spent 10 hours today trying to hack together something with that invisible civilian npc, thanks
btw that one takes AGL pos. you have to convert it to ASL using AGLtoASL before using setPosASL/setPosWorld
you can also use the pathCalculated event handler
it gives you the calculated path for an AI unit
still though, if i wanted to make like, spooky ghosts that move in a straight line to where you order them (noclip), would i have to code a custom simulation type?
like one that gameLogic uses ("invisible") but with movement
no. you can use any object you want and move it every frame using setVelocityTransformation
almost by definition such a check would be in scheduled meaning depending on circumstances it could not trigger instantly as the person gets out of the vehicle which seems to be a requirement for @sleek skiff
well if the object has collision it might collide when you use that command tho
you can attach them to a logic object
and move the logic instead
my sonic-like civilian died from hitting terrain when moving so fast btw
do allowDamage false
I did set makeGlobal to false, the trigger still triggers when any player is in range
And i guess this is a wanted behaviour, Triggered globally and executed localy
not with terrain. but if you attach it it should be able to move thru buildings
oh yeah it still does my bad. well change the condition to this && {player in thisList}
yes kk
[player, player, independent, ["LOP_NAPA_Infantry_Rifleman", "LOP_NAPA_Infantry_AT", "LOP_NAPA_Infantry_Rifleman_3", "LOP_NAPA_Infantry_Prizrak", "LOP_NAPA_Infantry_Rifleman_2", "LOP_NAPA_Infantry_TL", "LOP_NAPA_Infantry_GL", "LOP_NAPA_Infantry_Marksman", "LOP_NAPA_Infantry_GL_2", "LOP_NAPA_Infantry_MG_Asst", "LOP_NAPA_Infantry_Corpsman", "LOP_NAPA_Infantry_Engineer", "LOP_NAPA_Infantry_MG"]] spawn BIS_fnc_spawnEnemy;
AI wont stop spawning in even when the trigger isnt active
Could you disable collision with building with something like this ?:
private _allTerrainObjects = nearestTerrainObjects;
{player disableCollisionWith _x} foreach _allTerrainObjects;
not 100% sure because terrain objects get streamed. assuming that's irrelevant you could yes. but for 1 object at a time
That is becouse that function has a while {true} codition witch dosent have exit.
so it mean once you called it it will keep spawning until you close the mission.
so, the thing i needed this for was to allow player to command entire teams of units, without micromanaging. e.g you command just 3 of these invisible units. and each of them in turn forwards the commands to larger teams of 20 units
although saying that you could do that check on a per frame handler and skip an arbitrary amount of frames with some sort of counter. although i have no idea if thats a good idea :)
Is there a way to make civilians have IEDS strapped to them with deadman’s switches?
Like in a case of truly check your fire, and if they kill a civilian they get like points deducted
Sorry for the ping
"(configName _x isKindOf 'Plane') && (getText (_x >> 'simulation' ) == 'airplanex') && (getNumber (_x >> 'transportSoldier') == 0)" configClasses (configFile >> "CfgVehicles") apply { configName _x}
I thought of trying to find vehicles which can host 1 pilot only, but 'transportSoldier' is only for cargo infantry right? how can I check how many crew can sit in a vehicle?
Tricky from a classname. See BIS_fnc_crewCount
What would be the best way to register players Left click + hold action. While player is holding mouse do something every x amount of seconds ?
maybe he wants to attach a cow to the player as soon as he exits the vehicle and it would look weird if the cow was suddenly attached a noticible time after the player exits the vehicle
it doesn't necessarly have to happen the exact next frame, but if you are in sheduled it could take several seconds if there is a lot of scripts running + load etc
but in many cases he probably doesn't need it to be that precise
why am i getting generic error in expression with this code? _side = civilian; if (side player != _side) exitWith {hint "You cannot use this loadout at this time!";};
there's nothing wrong with that code on its own as far as I see
i diag_logged both vars, side player and _side, they both return the same value but if you are on as west or civilian then it still doesnt let you use the script
I tested that code on its own and there is no error. So the error is being caused by something else.
You say the error happens if the player is west or civilian. This code exits if the player is not west or civilian, so that indicates that the error is in whatever code comes after this, because that code is only run when the player is west or civ.
@minor grotto @analog inlet same person?
Okay thank you!
can I terminate a FSM outside of the FSM itself?
I haven't had any luck finding an answer on google, but I thought id check here if anyone knew. Is there a way to get texture position? Specifically a vector position in the 3d world
what's the difference between functions like getMagazineCargo and magazineCargo, other than one looks like possibly one yields a less verbose, more compact version of the same?
https://community.bistudio.com/wiki/getMagazineCargo
https://community.bistudio.com/wiki/magazineCargo
oh cargo space, nvm...
Any good way to randomize if a given person has a map marker or not
i.e. some people should and some people shouldn't
selectionPosition and modelToWorld/modelToWorldWorld is probably the best you can get
so im relatively new to scripting in arma. the issue is in my description.ext, i have my respawn loadouts set up but when i add a money script it then says that the loadouts cannot be found
we'd need to sure your code and the actual error message though
you can share it here for example
Sorry yea I use discord web and discord app with different accounts
If the client is the same side the check should return false enabling the script to go through but even when on the same side it passes and exits
for info dual account is forbidden, please keep one and eject the other
Fairs. Tbh I wasn’t paying attention to which account I was on, usually use it to live test permissions. I don’t suppose you know my issue? I can upload the full file soon
i have a question, whenever i do a scenario about exploding a vehicle which there is a soldier or character inside,
when the vehicle exploded the soldier didn't died inside the car, but they get out of the car,
so how can i make a scenario about that i mean when the car exploded the soldier inside is dead too
how to solve this
Don't use mods 
Or remove the soldier's event handlers
soldier removeAllEventHandlers "killed";
soldier removeAllEventHandlers "handleDamage";
wait
just paste this sccript in init soldier ?
You can try it there. Just replace soldier with this
I doubt it would work there tho
thanks
how to make 2 car explode on trigger , i try this script at trigger - call{car1 setDammage 1;} call{car2 setDammage 1;} - but only car1 explode, why
Remove the call {}s
The actual problem is missing ; after the first }
But those calls and {} are useless
it works, thanks
Hi sorry for asking this question again. I asked this yesterday late then went to bed.
What would be the best way for me to register left click + hold. And then while player is holding left mouse button call a fnc every x amount of seconds ?
Pro tip: you can use Ctrl+F to retrive your old post
Thank you didn't know.
So this is the code i have so far. Counter increses but increses everyFrame and not every second. And its just a ugly way of doing if there is any other way to do this ?
counter = 0;
EH_EF = addMissionEventHandler ["EachFrame",{
if(inputMouse "65536") then {
0 spawn {
while {inputMouse "65536"} do {
hint format ["%1",counter];
counter = counter + 1;
sleep 1;
};
};
};
}];
Ugly? Not even ugly, this is a game breaker
"if the button is pressed, spawn a script every frame checking if the button is pressed - for each script, increment a variable"
so I wrote a function that converts decimal numbers to base16 (hexadecimal) numbers based on a javascript function. It produces correct results, until we reach numbers with 6 zeros or more. For example, when I pass 999999001, it returns 55D4A80 and not 55D4A81 on Arma. The javascript function on the other hand produces the correct result.
["fnc_base10num_to_base16hex", {
// Self-explanatory, turns decimal values into hexadecimal values
params ["_num"];
_chars = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F"];
_hexa = "";
while { _num != 0 } do {
private _temp = 0;
_temp = _num % 16;
_hexa = _hexa + (_chars select _temp);
_num = floor (_num / 16);
};
if (_hexa == "") then {
"0"
} else {
reverse _hexa
};
}],
this most likely comes from float precision
also private your vars
does Arma use doubles?
nope
may I interest you in some Roman numerals instead?
https://community.bistudio.com/wiki/BIS_fnc_romanNumeral
range 1..3999 😄
Privating a var makes it exclusive to the current scope, doesn't it?
I stumbled across an issue with this with a for loop
where a var annoted with "private" couldn't be reached from the loop
you seem passionate about this lol
I wonder if anyone ever used this function in arma history
well yeah that's the point
🤨
but a loop is another scope
i'm accessing _chars and _hexa from the while scope
the while is inside their scope so it's OK
(and the lovely, colourful graph below)
That's due to floating point limits. SQF uses single floats, which can only represent integers up to 2^24-1 ~= 16.7M
An alternative approach would be converting the string representation of the decimal number. But if you received it by just string the number it wouldn't be any different
What are the main differences between private _test = "test variable" and _test = "test variable"?
private makes the variable local to the current scope
and the first one is missing a closing "
fake news
so does having a variable starting with "_" without private behind it, no?
I don't understand the difference
oh, that's when we want to edit the variable inside without actually editing in the "outer" scopes
yesss
basically creating a new variable with the same name
yep
making sure it doesn't use the above one
I don't do that in my code so I can add private to every local variables i have without fearing it would break
if your code was thought well, yes
didn't quite udnerstand the alternative approach 
Can someone point me the way to remoteExec inline functions?
ideally, don't remote exec code like that
I'm trying to execute this script ingame (assume public zeus servers). How'd I go about it? My initial idea was to make them into a function and then remote execute them.
Now obviously running the code in the object init field of the table has worked fine but does not work on JIP players.
[[arguments], { code }] remoteExec ["call"];
```but that's ***awful*** and dirty - just sending a huge payload in network traffic
what would you suggest for the scenario above?
not to do it 😄
Hello, i am currently looking into the cba scripting macros, because its a quality standard i finally want to use/reach.
in the ACE3 repo, the cba scripting macros.hpp file is "hardcoded"/copied in the repo and then included in the ace's own hpp files:
#include "\x\cba\addons\main\script_macros_common.hpp" in ace/main/script_macros.hpp
is that the preferred way to use the cba macros?
I kind a thought that the macros are somehow globally available, as cba is a dependency mod to ace 3?
so why hardcode them and include them manually?
(couldnt find any CBA contacts so im asking here)
You have to always #include to get access to the macros. What ACE does is take the macros, then modify them to their needs after the #include. But you'll see they always #include their main macro file in every single one of their files.
All macros/preprocessor is per-file
So they can't be globally available (besides the hardcoded engine macros), you have to include it into every file
But i can use the cba mod provided files instead of having to hardcode them in my own peroject right?
Yeah, you can include them directly in your sqf
What do you mean by "use"?
You're supposed to #include them just like ACE Does
Well I didn't really explain it. For that you basically need to implement math 
For what you need you have to implement division, like you (probably) did in elementary school 😅
i.e you start from the most significant digit, and start dividing by 16, in baby steps... 
Let's use an easy string as example: "2340"
e.g. 2340/16 would be
- 23/16 = (1)x16 + 7
- 740/16
- 74/16 = (4)x16 + 10
- 100/16 = (6) x 16 + 4 => 4 is the remainder and thus the last hex number "....4"
- Now you'll be dividing 146 by 16, which gives you the next hex number, and so on
An easier way would be just passing the string to an extension, parse it and let it do native math for you 
couldn't the extension could use double 😄
Well that's what I mean yeah (in this case uint64 is needed tho)
Alright thanks 
not sure how smoothly it would run 300 times every frame tho 
or even just once each frame, I think it would still be slow
I want to ask "why"
dun-dun-dunnn
It is. I also fail to see where it comes in handy for per frame application
The other one you posted is slowish too
it can run 85k times a frame, I doubt that I will have to run it for more than 300 or 500 in extreme scenarios
dunno what else I can do to make it run faster
simple solution:
while{vehicle player == player} do
{
sleep 1;
};
vehicle player addEventHandler ["GetOut", {
<yourCodeGoesHere>;
<DontForgetToRemoveTheEHAgain>;
[] spawn foo;
}];
}```
But why exactly do you need such high precision?
I am not even feeling suspenseful, just ready to be disappointed by the answer tbh 😂
why do you need that @wary sandal , whyyy 😄
to publicly show my debt (the engine can't even process the number)
use power of 10 😄
ok, removed the unnecessary check
params ["_num"];
private _hexadecimalChars = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F"];
private _hexa = "0";
while { _num != 0 } do {
private _temp = 0;
_temp = _num % 16;
_hexa = _hexa + (_hexadecimalChars select _temp);
_num = floor (_num / 16);
};
reverse _hexa
it should now run 0.1 nanosecond faster
minor performance thing
params ["_num"];
private _hexadecimalChars = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F"];
private _hexa = "0";
private _temp = 0;
while { _num != 0 } do {
_temp = _num % 16;
_hexa = _hexa + (_hexadecimalChars select _temp);
_num = floor (_num / 16);
};
reverse _hexa;
```the `_hexadecimalChars` might be faster were it an argument instead of a constant creation, perhaps
That's not 85k per frame. It's 85k per second
300x0.011 is slow
Over 3ms
It'll most likely cause an FPS drop
S P E A K
so we don't help you in a terrible dead end / can focus on a better solution
there's no XY Problem
i'm generating a file in a format used by an external program
@little raptor can ADT show included defines while in the function viewer at all?
this is why I need hexadecimal numbers, instead of decimal numbers
ok, at least we know 🙂
you were really curious lol 
if we spend brain cells and in the end you are all "yeah I convert all positions to hexadecimals cuz I think it's cuter lol" there will be blood
I found a way to run this function only a couple times every second, dw
lmao
No. You can open them using ctrl+o
Tho you need the abs path 
I might make a vscode / vs feature where you ctrl+lclick to see the file
Tho the function viewer might not support it (it's very basic, unlike the editor)
there will be no bloodshed yet, till i start posting about computing players' money every frame on server
that would be nice since the current sqf extensions won't detect my included files from mods so they always show up as warnings/errors
but mainly so that I don't have to search through all the BI files to find the included file
Hmm why not give raw data to external file and let it crunch numbers instead?
didn't know numbers were crunchy
They are, and every time it crunches fps goes down
Also why would you compute players money per frame? You making arma3 stock market simulation?
Calculate money once per change and then just display variable on each frame
this was a joke lol
tried to think of a very bad practice
Ah
he, too, likes to live dangerously
is the immediate format mandatory? because yes, you could have a converter working only when data needs to be read
yes, I could change all numbers to hexadecimal when saving to the file (via a dll I will code soon) but honestly it doesn't make that much of a difference, now that I optimised it
if my Intel I3 can run this with ease, every computers can
watch me with my i7 930 from 2010
It adds up with other stuff too
are you sure it's 3 digits not 4
bruh
somehow you have... more cores
people still buy i3s 💀
true
lou is ancient
params ["_trigger"]
{
private _pos = getPos _trigger;
private _marker = _x inAreaArray _pos;
if (!(isNull _marker)) then {
if (_marker in TRA_AreaMarkerName) then {
deleteMarker _x;
TRA_AreaMarkerName deleteAt _forEachIndex;
};
};
} forEach TRA_AreaMarkerName;
why, edit: how?
@still forum possibility to replace Error Missing ; by Error: missing semicolon ';'?
devs have a tendency to read "Error Missing " 😄
Translations big chore
these are not translated
🤔 They should be
ah
oh
perhaps 🐮
I keep my game in English since A2, I didn't know 😄
maybe just quoting the semicolon would be enough then
anyone know why the particles here are turning to a slight blue before disappearing?
//groundwave
private _groundwave = "#particlesource" createVehicleLocal _pos;
_groundwave setPosASL _pos;
_groundwave setParticleCircle [1, [-50, -50, 0]];
_groundwave setParticleRandom [0, [0, 0, 0], [5, 5, 0], 0, 0, [0, 0, 0, 0], 0, 0];
_groundwave setParticleParams [["\A3\data_f\cl_basic",1,0,1],"","Billboard",1,10,[0,0,0],[0,0,0],13,1.5,1,0,[300,300,300,250,200,150,100,50,25],[[0.7,0.7,0.7,0.5],[1,1,1,0]],[1,0.5],0.1,1,"","",_logic];
_groundwave setDropInterval 0.01;```
they shouldn't be 
environmental lighting?
uhhh, good point. will look on altis + modded map
currently only been testing on vr
it's not a huge issue as its mostly in the ground by the time it turns blue and anyone in the area will be dead
but i still think it looks shit
btw, you provide _logic here
ya thats just a logic thing created for the particles to b at
was happening when i had it on a different obj too
ah, you were correct; hadn't thought of that, thanks 😄
environment?
ya
yey ^^
works fine on altis 😅
nearly finished the capital ships mod now, just got to do a couple things with variables being checked for piloting/throttle then its complete 🙂
CBA_fnc_addPerFrameHandler takes delay as parameter. so you could enter that the code should only run every second
ye
or you could directly throw your framerate away
lol
any way to allow windows on a structure to break but not allow it to enter a Destroyed state
yes, HandleDamage EH
if they support it ofc
@hallow mortar i cannot see any reason why this script does not work.
_side =_loadout select 5; // returns CIV
side player would return CIV also, it still does not let me complete the script
Does _side contain civilian or "CIV"?
The command civilian does not actually return a string, it returns a data type Side, which is represented as CIV in text output but will not be treated as a string by the game.
If your stored _side value is a string, the comparison will fail because you're trying to compare a data type String and a data type Side.
when i diag logged it, it printed CIV i have it calling from a database which works fine. i have tried with CIV and civilian but no luck
dangerous code too, should use params or at least private vars.
oh, I guess it's not actually taking this stuff as direct inputs at least...
Storing code as text in UI :D
Let me phrase it another way.
"CIV" isEqualTo civilian; // FALSE
"CIV" isEqualTo (str civilian); // TRUE
"civilian" isEqualTo civilian; // FALSE
(str side player) isEqualTo civilian; // FALSE
(side player) isEqualTo civilian; // TRUE```
There are a lot of data types which the game will happily display as text in the returns it presents to you, but are not strings. Side is one of them. It is its own thing, like an Object, and cannot be directly compared to a String.
If the player's side is stored in your database as the string "CIV" or even the string "CIVILIAN", you cannot compare it to the return from side or any of the side reference commands, because they are different data types.
That is how it’s stored
you're missing a layer or two there...
diag_log the _loadout value before the call compile line and you'll find out.
I don't know how the database insertion handles it. I suspect it is storing it as a string and not as a data type Side.
Somehow these rows are ending up as a piece of SQF code stored in a listbox UI anyway.
So there is certainly some... translation going on.
https://joshlisher.co.uk/ss/images/NVIDIA_Share_H9dWBbmkih.png _side = side player
Yes, that is the variable you are passing, but it then gets passed into whatever encodes it into the external database, and it's impossible to tell what that does to it (from here)
That's the storage not the retrieval.
see this, please
https://community.bistudio.com/wiki/Side
basically used playerSide isEqualTo playerSide and it dont work 🤦♂️
like, how?
I feel like "basically" is concealing a lot of things that would be enlightening to know
TA-DAAA
exactly what we tell you
format, when fed with a side, returns a string value of this side
civilian (a Side type) is different from "CIV" (a String type)
Something in the process of encoding into and retrieving from the DB is changing it from a Side into a String containing the text representation of the side
Compare the return from your database to (str side player) instead of (side player) and I think you'll see a different result
i used the vehicleCreate script as reference from altis life
not pertinent
Want to save player information in ProfileNameSpace, on server side. Is it better to have multiple variables, in that namespace, for each player (like: My_Garage_UID, My_Inv_UID) , or should i use one hashMap where "My_Garage" for Example is a key or even an Array? Does it make any Difference? I imagine, the bigger the hashmap, the slower code. And the more Variables, the slower everything?
the size will be more or less the same, but the way you access that data may be a thing to consider
I'd say basically, go for the (tag-prefixed) hashmap
I've done that before and used hashmap, much easier
Ah ok, thanks alot 😄
I just logged everywhere _side is set and being called, they all return CIV this also matches what is in the db, i must be fully dim or something just aint working
just did this and they return the exact same
side player - does - not - return - a - string
im not looking for a string anywhere
hint blufor; // error
hint str blufor; // ok - displays "WEST"
you are
format ["%1", west] = "WEST"
side player = west, and west != "WEST"
atm i have _side = civ i have also tried _side = civilian both do not pass playerSide isEqualTo _side
"CIV" is the string representation of civilian
nowhere am i saving or returning "CIV"
oh, how are you saving in your db again?
ik it uses format but in the db it doesnt have "CIV", neither does it when i pull it and log it
what does the db store then?
because format will turn civilian into "CIV"
if i log playerSide it returns CIV
I don't care
↑ this I care
nyoom
th db stores playerSide
^
the db USES format WHICH RETURNS A STRING
this is what we all try to tell you here
so you have "CIV" in your db
and if you want to compare sides, try str side player == _side
this is like trying to get my gran to write an email
if its "CIV" in the db then why does it show CIV and return CIV when i pull it from db
because it's a pure string
because its a string 
ok, hold it a second.
ive always seen strings in the db with " around
im self taught, youre talking to me and im not understanding, then you take the piss
the db does not know what a "side" is; it stores numbers, characters, etc
you use format on a side, the game converts the side (civilian) to a string, "CIV".
the db receives "CIV", the db stores "CIV".
in-game, if you do hint str side player, you will also get "CIV" - it is a stringified side
now when you receive the value from the db, it's a string, "CIV"
now to compare if you have the same "value", you cannot compare a side and a string, they are two different things
so you get the string version of the player's side (str side player = "CIV") and compare that
now to compare if you have the same "value", you cannot compare a side and a string, they are two different things i understand that
i did not know this was the case the db does not know what a "side" is; it stores numbers, characters, etc you use format on a side, the game converts the side (civilian) to a string, "CIV". the db receives "CIV", the db stores "CIV".
i appreciate the help, but when someone is trying to understand something, this isnt necessary
maybe stop arguing with lou then when hes telling you what is happening
dunno what arguments youve had, i was merely sharing what i knew and telling you guys what was happening
no problem, at least we identified where the misunderstanding was 😉
can someone confirm or deny that moveToCompleted does not work for doMove?
At least it does not for me (opposed to what the docu says)
"DreadedEntity
Posted on Apr 02, 2022 - 20:31 (UTC)
This command can also check the status of doMove and commandMove (A3 2.08.149102) This is handy to make your script wait until a unit has moved to some position:
waitUntil {moveToCompleted _unit};"
try the following (without mods) :
AIJoe doMove getPosATL player;
sleep 0.5;
systemChat "starting";
waitUntil { moveToCompleted AIJoe };
systemChat "stopping";
```if this comment is wrong, I will remove it
there also is unitReady for this 🙂
you answered your own question 😄
aaaaah haha i think i know why it didnt work
my waituntil has a sleep 1 in it.
but the "moveToCompleted" is set to true and then to false all in under 1 second. so it misses it
this script here confirms it. "completed sleep" is never triggered
[] spawn {AIJoe doMove getPosATL player;
sleep 0.5;
systemChat "starting";
[] spawn {
waitUntil { moveToCompleted AIJoe };
systemChat "COMPLETE no sleep";
}
waitUntil { sleep 1; moveToCompleted AIJoe };
systemChat "COMPLETE many sleps";
}
(2× "no sleep" btw)
so im trying to make a vehicle spawner attached to a sign, i followed this: https://steamcommunity.com/app/107410/discussions/17/1640915206459714638, however this only results in a single vehicle being able to spawn, any ideas or anyone willing to give me the script?
share script
huh
in the veh.sqf i have _veh = "rhsusf_M978A4_BKIT_usarmy_d," createVehicle getMarkerPos "groundspawn";
in init for the board is board1 addAction ["Spawn Vehicle","scripts\veh.sqf"]
Marker is named "groundspawn"
onEachFrame { while { true } do {}; };
why not!
it'll only loop what 10000 times each frame? ;)
doesn't it mizzle? doesn't it?
lmao
I decided to switch up to https://github.com/gruppe-adler/grad-vehicleSpawner
class CfgFunctions {
#include "modules\grad-vehicleSpawner\cfgFunctions.hpp"
};
_spawnLand = [20054.7,18756.9,0];
_spawnTracked = [[20054.7,18756.9,0],[20040.8,18756.9,0]]; // tracked vehicles will spawn max 5m from the first position - if first position is full, second position will be used
_spawnAir = [20052.6,18840.5,270]; // spawndirection is 128 >> in direction of my imaginary runway
[
_board1,
"GRAD Vehicle Spawner",
{true},
[],
[_spawnLand,_spawnLand,helipad_1,_spawnAir,"spawnmarker_water_1"],
{diag_log ["Vehiclespawner opened. Display:",_this select 0]},
{diag_log format ["Vehiclespawner closed. Was open for %1s seconds.",CBA_missionTime - (_this select 1 select 0)]},
[CBA_missionTime],
{(_this select 0) disableTIEquipment true}
] call grad_vehicleSpawner_fnc_addInteraction;```
any ideas?
line 10 is this
if anything i think the while will slow it down
@ me if you know tf is goin on
That is SQF script
thats not config
scripts go into script files.
Config into config files
can't mix both
will*
Nop
wait yeah while will
it only says that about specifically these parts
It then assumes that you know where scripts go
you could put it into init.sqf
_board1 is undefined variable also
so what would I name the variable. vehiclespawnerboard work?
whatever you set in game, the variable on the object
yes
yes
its gonna do oneachframe and then check if its true and then run the script in a loop
instead of just using oneachframe so it just loops on eachframe
would slow it down i think
Removed the _ since it’s a global variable you set in the init
are you sure though.. you should test it in game
haha, my thoughts exactly :)
works cleanly
where is grim in here he would call us all muppets
is your icon an eve character
no
leshrack
he is probably talking to me :) yeah it is
ah
yup, i stopped playing like 3 years ago but it sort of became my identity during the 6 years i played eve so i use this avatar everywhere now. anyhoo /offtopic
i see
need some vector help,
_vehiclepos = getposasl _heli;
_targetpos = getposasl _target;
_distance = _vehiclepos distance _targetpos;
_vector = _heli vectorModelToWorld [0,1,0];
_direction = _vehiclepos vectorFromTo _targetpos;
_angle = (_vector vectorDiff _direction) # 2;
_relativeElevation = _distance * sin(_angle);
hint str _relativeElevation;
trying to get relative elevation, which this does but it dosent take into account bank angle which i need it to
You'd need to define "relative elevation".
I'm not sure why bank angle would be relevant.
im trying to script variable elevation into a radar output, so if im in a 20degree bank i want the elevation relative to the aircraft centerline
hmm, you just want the actual distance above the plane of the aircraft? You don't need the angle?
no i want the relative angle from the nose center line respective of bank angle to the target
