#arma3_scripting
1 messages ยท Page 506 of 1
thanks.
top 6 with CBA loaded
48978 A3\functions_f\initFunctions.sqf:458
217320 A3\functions_f\initFunctions.sqf:394
510840 x\cba\addons\xeh\fnc_compileFunction.sqf:30
1346355 a3\functions_f\GUI\fn_initDisplay.sqf:55
4868001 A3\functions_f\initFunctions.sqf:487
4875300 A3\functions_f\initFunctions.sqf:130
Size in bytes. To be expected.
For anyone who wants to try. Intercept based. No Battleye. Requires CBA.
Starts collecting stats from game start on. You can dump using the script command ade_dumpCompileStats which returns a string
Do you know how it checks if the code is already in cache? function name, size?
Well its only a problem if you have big strings you want to compile and they are different all the time.
Where there is one big security problem with this so i guess BI need to think of a way to fix it anyway
security problem?
If its cached it will not compile again
so if you compile it before some one...
I talked about a way to do this with Dedmen, thats how he found the caching
who is dedman
you already have the security ticket.
Or are you writing a fix for them your self XD
Yes oke then i will update it with the new info we have
Any fix to my problem will fix your security problem too
I reported this a month ago, didn't hear a thing so far
so if you compile it before some one... then waht?
then it will not recompile until you restart the game. But its a big security problem so wont go into more detail
Does it really need a cache? is compile so slow that it would benefit from it?
Don't remember being it as slow.. But all the latest profilings were skewed by the cache. so dunno.. Maybe they made it slower?
hey is there a way of vertically centering the structured text, the valign = "middle" isnt working
hey could someone please help me, i get this error config: some input after EndOfFile
and it only happens when i #include this file https://pastebin.com/pQbeSSMU
use onbuttonClick = "";
Is there a way to host a local arma 3 server with a server.cfg
cars dont save to garage in altis life :/
Queue life containme- discord server link in 5...
Hello there. Have anyone got an idea how can i get displayeventhandlers returned id inside its code?
the best i can imagine is to create a dummy handler, remove it instantly and plus one to its id
Just set and get the ID with setVariable and getVariable. You could use the display as the variable space.
Just do something like
private _id = _display displayAddEventHandler [_eventName, {params ["_display"]; private _id = _display getVariable ["myEhId", -1]}];
_display setVariable ["myEhId", _id];
thank you, got it
You probably also need disableSerialization
hey i posted this on general before hey does anyone know why you cant switch seats if you have an ai in your helicopter?
im just adding an ai to my heli through a script i did _moved = player moveInAny _veh; and then _unit moveInDriver _veh; [_unit] orderGetIn true; [_unit] allowGetIn true; it only happens when i run this script from the pilot seat if im in the co-pilot or even the gunner seat then its fine but this also happens with just using the editor, if you place in the Blackfish VTOL and place a pilot in there and then place the player as a gunner, then it won't let you switch to any of the other seats welp, it's happening with all the helicopters. without any ai you can just swap between all the seats. but if you add an ai to the pilot seat then it wont let you
does anyone know why this is happening?
who is the group leader when it doesnt work?
tried as group leader as well
it never lets me switch seats when i add in an ai to the pilot seat
Is it possible to detect overlaps of area arrays? I am generating area arrays for checking if players are in them, but I want to detect if area arrays are connected in which case I can add them to a group array.
arrayIntersect
On the wiki page it says that command Intersects array1 with array2 returning array of unique common elements which if I am not mistaken would return equal/alike elements, but not an inclusive check in 2D position
triggerArea style array
I want to check if a player is in a least one of those connected area arrays through a count or select on an array comprised of those triggerArea style arrays as elements
(({(vehicle player) inArea _x} count (missionNamespace getvariable [_arrayname,nil])) > 0)
_arrayname is being defined as an array comprised of triggerArea array elements, like this:
private _AOLimitArray = _x;
if (({_logic inArea _x} count _AOLimitArray) > 0) exitwith {
_AOLimitArray pushBackUnique _area;
_run = false;
breakOut "AOLimitMainSpawn";
};
} foreach UO_FW_AOLimit_Arrays;```
{_logic inArea _x} can only return true if that logic object is actually within that area array, not if the radius of that logic's generated array area overlaps with another
What's the problem with the line you already have except that you should use findIf instead of count?
getvariable [_arrayname,nil] nil as default value is nonsense
Oh, yeah ๐ค
Is there a function for comparing 2d/3d areas with one another and seeing if there is overlap?
Don't know of a command/function. What's the shape of the areas?
Either ellipses or rectangles, can be set by the mission maker
That's gonna be fun to determine^^
defined in the area array just like a triggerArea
For what purpose do you need to know whether they overlap?
inArea can do 3D.
area limiter that can keep players in mission maker defined areas, if the markers overlap I want those areas to be grouped in an array so I can run the player inArea checks on all those areas
For example two rectangular shapes that are offset or perpendicular.
You can just create a giant marker the size of allowed area, then run inArea on that, or do you want more complex areas?
It sounds like he wants to have any shape a user could want to. Can thus be quite complicated shapes.
If only you could place polygons ๐
worst case I can tell mission makers they are asking for too much, but this seems like something that should be entirely possible, I am probably just missing something obvious
I believe the best way is something like this:
define borders with thin rectangles which represent lines
then there was a method in algebra to determine if a point is on one side of a line or another... something like this: https://math.stackexchange.com/questions/274712/calculate-on-which-side-of-a-straight-line-is-a-given-point-located
If your point is on allowed side of all defined lines, then its inside that complex area
Hmm no scratch that, it will not work for some complex situations
Or sync the triggers that you want to group to a logic.
I have the feeling that with a few changes in your specification, you could avoid math.
Btw. is it a mod you are working on?
yes, 3den editor extension that acts as a mission framework with some basic functionality
Good, then why not create a module that a player has to sync triggers to specify the area that belongs to it?
BI also does this approach with the with their modules.
I've got them as modules with setting attributes for the AO limitations, and just using size/position/direction from the actual logic object to generate the area. Syncing with trigger areas is a lot less intuitive for novices i think, and it doesn't confirm whether there is a contact point between those areas, I would be relying on the mission maker to connect those markers and sync them which is questionable.
Why do they have to be connected? Could be a town with an island like Lijnhaven.
I mean if you want to do the math, just go for it. I just proposed an alternative approach that has been done by others.
If it was a module for capture zones or sectors I would agree, but for a module with a function of limiting players to that defined area it makes much more sense to have them connected, with additional modules/markers/trigger areas being extensions of that zone rather than instances
I think I am going to go with a really rudimentary distance check based off of the logic size and azimuth. I don't expect mission makers to put area limitation markers within their radius distance if they don't mean to have them connected so hopefully that will suffice. Thank you for your suggestions
Well, that would mean if a user fails to do that, parts of his limited AO are not accessible. Well, you can decide between making the check or let the user figure it out. Why do a check that is not reliable instead of no check at all? The behaviour would be more consistent.
Why is this waitUntil only firing on the !alive and not the distance2D
waitUntil {((!alive ParaJumpVic) || (!isNull ParaJumpVic) || ((ParaJumpVic distance2D End01) <= 100))};
Okay so I'll pull that out
the distance thing.. Dunno.. looks good? unless there's something wrong with End01
Can waitUntil not handle multiple conditions?
Because I just noticed I had !isNull
which means it should have been firing instantly
waitUntil only handles a single condition
And you also only have a single one in your code
waitUntil just checks the value that you return
Yeah looks like the only condition being evaluated is the !alive
Nope, what Dedmen just told you is that whatever ((!alive ParaJumpVic) || (!isNull ParaJumpVic) || ((ParaJumpVic distance2D End01) <= 100)) returns is checked by waitUnil.
I cut out the isNull and just have this
waitUntil {((!alive ParaJumpVic) || ((ParaJumpVic distance2D End01) <= 100))};
So code proceeds if I delete the vic
but if vic reaches 100m of End01 code does not proceed
How about logging?
waitUntil
{
sleep 0.5;
systemChat str [!alive ParaJumpVic, (ParaJumpVic distance2D End01) <= 100];
((!alive ParaJumpVic) || ((ParaJumpVic distance2D End01) <= 100))
};
nothing until I delete the vic, and then it gives [true,false]
So the distance thing definitely seems to be the problem
Because I tried just getting rid of the alive and just have
waitUntil{(ParaJumpVic distance2D End01) <= 100};
SystemChat "DistanceMet";
just log the distance and see what's going on
So it's getting down to 11
๐ค wat
nothing until I delete the vic, and then it gives [true,false]
That still sounds strange to me... He should have seen the logging until it gets deleted.
I ended up just having a loop prior to the waitUntil that fed out the distance every .25 seconds
and it was definitely getting below 100
any errors in RPT maybe?
Huh so that's weird
for "_i" from 0 to 120 step 1 do {
systemChat str(ParaJumpVic distance2D End01);
Sleep 0.25;
};
waitUntil{(((ParaJumpVic distance2D End01) <= 100) OR (!alive ParaJumpVic))};
systemChat "Test";
So this is what I had to debug
but for some reason I'm not getting the systemChat distance until after the plane is deleted
And then it's just printing 1e+010
How about
[] spawn
{
waitUntil
{
sleep 0.5;
systemChat str [!alive ParaJumpVic, ParaJumpVic distance2D End01];
((!alive ParaJumpVic) || ((ParaJumpVic distance2D End01) <= 100))
};
};
I deleted the plane and ran the same script again and now it works
I wonder if there is something weird with the public variable
Unlikely, it's way more likely you are doing something strange^^
Is there a way to delete a variable?
set it to nil
Like just Var = nil or setVariable
both are the same
So Kex I tried your thing, and it is printing out [false,distance]
but when it's below 100 it's not doing anything
When I delete the aircraft though it will continue
So even if it's <100, you still get the values printed?
yes
Hello, I'm trying to get a gate to open only when a pilot enters a trigger, in order to allow vehicular access to the flightline on our FOB. I've got the gate opening actions in the "On Act/Deact" fields, I just am stuck on the Condition. All the pilots are "B_Pilot_F" classnames since I thought it might be easier, unless it makes more sense to give them variable names. Would appreciate any help, thank you.
try this && { thisList findIf {typeOf _x == "B_Pilot_F" } > -1}
@tough abyss yes it works, thank you!
Now is there a way to remove the actions associated with the gate? Because now I'm realizing that the trigger may not open the gate but they could just walk up to the gate and open it via scroll wheel
So I'm trying to implement the Dynamic Groups function which works fine in the mission, but it always give the groups random insignia and I'd like to be able to assign each group its own insignia. I was referring to the BIKI Dynamics Group page and it said you can register your own groups. This is what I have in my "initPlayerLocal.sqf"
if (isServer) then
{
private ["_group", "_leader", "_data"];
_group = reaper_1;
_leader = reaper_1_sl;
_data = ["TFAegis", "Reaper 1", true]; // [<Insignia>, <Group Name>, <Private>]
["RegisterGroup", [_group, _leader, _data]] call BIS_fnc_dynamicGroups;
};```
Is this what it's supposed to look like?
Looks right, assuming reaper_1 and reaper_1_sl refers to the group and the groups' leader. You could skip a few steps there and just use ```sqf
["RegisterGroup", [reaper_1, reaper_1_sl, _data]] call BIS_fnc_dynamicGroups;
Ah okay. So would this replace the ["InitializePlayer" portion?
I'm just curious if shorten it like you're saying, where do I specify the _data to tell it what Insignia and Name to use?
["InitializePlayer", [true]] call BIS_fnc_dynamicGroups;
if (isServer) then {
private _data = ["TFAegis", "Reaper 1", true]; // [<Insignia>, <Group Name>, <Private>]
["RegisterGroup", [reaper_1, reaper_1_sl, _data]] call BIS_fnc_dynamicGroups;
};
``` Like that
Oooh okay. And then I just do that for each group and group leader?
If you already have global variables for each of them, yes
I do. And formatting that would look like this?
if (isServer) then {
private _data = ["TFAegis", "Reaper 1", true]; // [<Insignia>, <Group Name>, <Private>]
["RegisterGroup", [reaper_1, reaper_1_sl, _data]] call BIS_fnc_dynamicGroups;
private _data = ["NextInsignia", "Other Squad", true]; //[<Insignia>, <Group Name>, <Private>]
["RegisterGroup", [_group, _leader , _data]] call BIS_fnc_dynamicGroups;
};```
And so on?
Hey, if the BIKI does not state whether a function is global or local, so no locality given, is it then always local? Or is there no simple rule and I would need to ask / do experiments to find it out?
No there is no rule
Are we able to change the main menu load screen like in exile ?
If (Exile did it) then {we are able}
you need to look in #arma3_config it will require modding
allright thanks
@tough abyss well thats kinda bad. Considering there are functions like addGroupIcon with no given locality...
That would be UI, UI functionality is local
However with Arma it is dangerous to assume things
The rule of thumb, if in doubt - test it
Most things you can infer by just thinking logically.
hey please could someone tell me why my picture is transparent in the dialog
class rsc_Background: RscPicture { idc = 1200; //text = "#(argb,8,8,3)color(1,1,1,1)"; text = "custom\images\tablet.paa"; x = 0 * safezoneW + safezoneX; y = 0 * safezoneH + safezoneY; w = 1 * safezoneW; h = 1 * safezoneH; colorText[] = {1,1,1,1}; colorBackground[] = {1,1,1,1}; colorActive[] = {1,1,1,1}; };
width and height both multiples of two?
yeah
you are missing the _co suffix
in the file name?
So I have this in a trigger's condition field to detect whether the player is a pilot or not and if they are, the gate will open. But it appears it doesn't work if the pilot is in a vehicle. this && { thisList findIf {typeOf _x == "B_Pilot_F" } > -1};
Any way to get it to look at the player when they're in a vehicle?
Tbh I'm very new to scripting so I'm sure there is a way, I just need to find it and then figure out how it works
yeah me too lol, but you can do
_veh = vehicle player; if (driver _veh isEqualTo player) then { //whatever here};
don't know about triggers and stuff but thats how i check if my player is the pilot
The problem with the above example is that the target check will always be the player and not MP compatible, plus the initial question included magic variables like thisList to include the pilots in the trigger area.
Does the pilot have to be the driver, or do you want the trigger to fire if they're in any seat?
Any seat would be fine
Basically it's a gate that pilots can drive quad bikes or MRZRs through to drive out onto the flight line and keep non pilots from messing around too much on the flight line
So more than likely, they'll be the driver anyways but if it just checks any seat, that works too
So you'll need to loop through every unit if it's not a vehicle, and through the crew if it is
anyone know what moveOnEdges is for the RscMap?
When you put your mouse at the edges of the map, it moves? Just a guess tho.
oh wow lol, i trying all sort of stuff but didnt try that
do you know a way to make it so you can move the map into the black areas
can't*
Idk, didn't really played with the map yet ^^
anyone know what moveOnEdges is for the RscMap? not used in Arma 3
would anyone be willing to help me test out a script?
a = b doesn't return nil but... nothing?
Credit goes to this guy again: @unreal leaf
_a = call {_c=1;};
isNil "a"
// Result: generic error at expression (points at _a = call ...)
_a = call {};
isNil "a"
// Result: returns true, gives no errors
Aside from the fact that isNil "a" isn't the same as isNil "_a", that behavior is pretty much what I would expect
Is there an easy way to remove the AA turrets etc from the list of UAV's?
I still want the missile launchers to be autonomous, I just don't want them player controller or to appear on the list
anyone familiar with getting making custom main menu backgrounds. (playing a mission etc)
@ruby breach Yes I meant isNil "_a".
It says on wiki: a = b : Return value: Nothing. Later at the page for 'Nothing' it says that it can be checked with isNil command. Which turns out to be not the case here, because it returns not nil but something different ๐
@leaden summit Yes, it involves listing the UAV that the player isn't allowed to connect to in the player's init.
I don't remember the specific command though.
oooooo now that would be good, off to find this mysterious command
@astral dawn This is known though
Posted on November 9, 2016 - 00:29 (UTC)
Dedmen
This operator actually does not return a Nil. It really returns pure Nothing. Not Nil Nothing.
This can cause problems. For example:
_var1 = call {
_var2 = "";
};
The return value of the "call" is the return value of the "=" operator.
If it were a nil then of cause "_var = nil;" would work just fine.
But in reality this causes a "Generic Error in expression" because you can't assign pure Nothing to anything.
``` <https://community.bistudio.com/wiki/a_%3D_b>
Ok so by searching for the exact same thing I searched for last time I got much better results
Bang this in the ol' init.sqf and change sam_1, sam_2... to whatever you named your sam sites and you're good to go
[] spawn {
if (!hasInterface) exitWith {};
while {true} do {
// Check if the player has an AV terminal
if ("B_UavTerminal" in assignedItems player) then {
// This code must be run each time the player gets a new AV terminal
{player disableUAVConnectability [_x,true];} forEach [sam_1,sam_2,sam_3,sam_4,sam_5,sam_6,sam_7,sam_8];
while {("B_UavTerminal" in assignedItems player)} do {sleep 3;};
};
sleep 3;
};
};```
Any particular reason for using a second while-do loop and not just using waitUntil with a sleep in it?
@ruby breach What's the differents?
Nil does not equal Nothing (Someone who does actual programming feel free to explain this one in a manner that makes sense)
I mean to use waitUntil
Functionally? They'll do the same thing. I've just never seen someone use while (bool) do {sleep} instead of waitUntil {sleep; bool};
Well it indeed looks better
[] spawn {
while {true} do {
waitUntil{sleep 1; ("B_UavTerminal" in assignedItems player)};
{player disableUAVConnectability [_x,true];} forEach [sam_1,sam_2,sam_3,sam_4,sam_5,sam_6,sam_7,sam_8];
waitUntil{sleep 1; !("B_UavTerminal" in assignedItems player)};
};
};```
Still silly that you cant disable it on the object it self or not
@ruby breach do you know what command I could look up for it to loop through the crew in the vehicle?
crew will get you an array of a vehicle's occupants, and according to a note on the wiki If used on a unit (man, module, etc.) it will return an array containing that unit.
So something like player in (crew _car) && { thisList findIf {typeOf _x == "B_Pilot_F" } > -1};
?
I'm half asleep, so the following could be complete potato (and I've never tried a findIf in a findIf before), but ```sqf
(thisList findIf {crew _x findIf {alive _x && typeOf _x isEqualTo "B_Pilot_F"} > -1} > -1); //search the crew of each vehicle/man object within trigger for an alive pilot and return true if any pilot exists
Even if that doesn't work, you get the idea. Scan the crew of each vehicle within the trigger for a pilot.
Okay thank you I'll try that. Worst case, I'll just put the vehicles outside the gate and they have to just walk out the gate
Hi. Maybe someone has a link for gui tree list tutorial? Would you kindly share it to me? =)
Dumb question, but an UAV Terminal can be connected to more than one UAV, right?
Then why would getConnectedUAV only return a single value?
Or am I just confused and the terminal can connect to only one UAV?
@delicate lotus probably overlooked in implementation
Yeah they could have overlooked it...
I see that we have this
https://community.bistudio.com/wiki/currentCommand
But how to order a unit to heal another?
does anyone knows a really simple snow script (light snow no blizzards or something) Alias script is way to overloaded for my intensions and the tf weather script is to laggy. I just want a really simple light snow falling for a post christmas mission ^^
anyone know why the ai only uses flares once when they get fired on by rockets?
is there any way i can make them continue to use flares?
i got
_group setBehaviour "AWARE"; _group setCombatMode "BLUE";
Use a "fired" EVH and then https://community.bistudio.com/wiki/fire maybe
is it better to use fired or IncomingMissile?
fired if you want to detect a flare launch
incomingMissile if you want to check if some god damn boi shot some missile at it
incomingMissile also triggers for unguided missiles...
atleast thats what its description says
well i want the ai to keep firing flares for a few seconds after a rocket gets launched, is there a performance impact?
like if i check everytime if the "fired" weapon is a flare or something
I think you are going to maybe create an endless loop with that
since you fire the event basically again
not sure if it is triggered by fire though
this is going to be a pain to figure out
not really
use fired, detect flare launch, setvariable to "avoid" additional flare launches until your way of launching them is done.
like:
If Flare Launch then:
Lock;
Launch Flares;
Sleep;
Launch Flares;
Sleep;
Launch Flares;
Sleep;
Unlock;
I hope you understand that
yeah
thanks
btw do event handlers run in scheduled or unscheduled ?
nvm
it says here https://ace3mod.com/wiki/development/arma-3-scheduler-and-our-practices.html evh run in unscheduled
so you gotta spawn your code
@astral dawn https://discordapp.com/channels/105462288051380224/105462984087728128/526919931577761842 yes. Known for years.
The only known SQF bug.
@astral dawn It says on wiki: a = b : Return value: Nothing It REALLY helps if you actually read.
https://s.sqf.ovh/firefox_2018-12-25_14-30-27.png
Is that not big enough for you? Do I need to make it bigger? I know reading can be REALLY hard some times.
So yeah. All credit to @unreal leaf for being able to read the wiki. A skill that obviously few people here possess
call from a function running in scheduled environment runs in a scheduled environment right?
so if i have something like _myretvalue = [] call chaos_fnc_getmyretvalue;
does my original function wait for chaos_fnc_getmyretvalue to return the value?
you can use ASLtoAGL to just convert
@still forum think you are a lil bit salty today
Yes i agree that programming at night doesnt contrbute to my attention :/
Was funny to discover it on our own though
Just repeating the question:
I see that we have this
https://community.bistudio.com/wiki/currentCommand
But how to order a unit to heal another?
Like in game we can order a unit to heal another.
Well, nothing about it tough
Were can I find the default files for those command in the game folder?
Or atleat make the unit call for medic?
@still forum Did you get coal today?
no
Because there is one particular problem with AI not asking for healing or the leader not ordering to heal
What would I use as a condition for both configProperties and configClasses if the condition is that the config class needs to start with 3 specific characters U_B (BLUFOR Uniforms)?
oh
I did not know there is something like configName...
well that certainly helps I guess
On the BIKI I can find Item Entries for CfgWeapons. Can I just do configFile >> CfgWeapons >> Items or do I need to iterate through all items and check if they inherit from the Item class or something?
ItemMap, ItemGPS, LaserDesignator, FirstAidKit
And then all things like that would be the result?
And values that ItemMap inherits. You will see in there
oh nice
Don't know what you mean? what are you trying to do?
oof
Which I guess is quite complicated XD
need to check the itemType
https://github.com/acemod/ACE3/blob/master/addons/arsenal/functions/fnc_scanConfig.sqf here is the ace arsenal function to get all items
I can work with that. Thanks ^^
@still forum was literally added this morning https://community.bistudio.com/wiki?title=a_%3D_b&diff=114505&oldid=112748
Posted on November 9, 2016
Huh?
The note saying that the returned value doesn't equal nil has existed for over 2 years
I added the giant exclamation mark last night to tl;dr proof it
Oh so you made it ๐ I thought, did I really want to sleep so much that didn't notice it
It's also VERY easy to fix. Fixing that bug is literally a one liner
But BI like: ยฏ_(ใ)_/ยฏ
Not like fixing the only SQF language bug in existence would cause any problems... Everything that does that stuff will break. So not like anyone is depending on it
I spent an hour trying to find why my framework for executing functions failed. Turned out it was because I had a _nul = isNil {..code..}; in the whole function...
In C or almost all other languages the = operator also returns the the value that was assigned. So you can do things like A = B = 3
But SQF? Noo! We can't be normal ๐
So how to make a AI ask for medic when hut? every time a unit gets hurt twice it does not call for medic and also the leader does not order to heal again
Probably the Heal - kind of actions need to be used:
https://community.bistudio.com/wiki/action/Arma_3_Actions_List#Heal
Turned out it was because I had a _nul = isNil {..code..}; what is wrong with it?
this is legit use
isNil returns boolean
those actions either telerport the unit next to the other or it does some long range healing.
@astral tendon Don't know, sorry, hopefully someone can clarify.
@tough abyss Whole function was like:
myFnc = {
_nul = isNil {
};
};
So it was returning the result of assignment _nul=bool; which is nothing but not nil
well nothing is wrong with it either, until you try to assign function return to something
yes my framework was supposed to store the function's returned value somewhere to be later retrieved by something else, forgot to say that... if you are still interested
@rain mulch Did the bit I gave you last night work by the way? Actually tested nested findIfs this morning and it seemed like it should work
What does this mean? ["aaa", bbb] call (missionNamespace getVariable ["BARN_fnc_camera",{}]);
where, BARN_fnc_camera is a sqf file defined in cfgFunctions.
Any difference from ["aaa", bbb] call BARN_fnc_camera; ?
No difference
The first would just prevent errors assuming the function isn't defined for whatever reason
@quasi rover thereisa difference, one will work executed from any namespace, the other one will only work executed from mission namespace
thx guys.
hey
just wanted to post this on here https://github.com/dulanw/A3AutoPilotScript
finally managed to get my autopilot script to work the way i wanted
How to give choper pilot targeting camera pod ?
um... what?
AFAIK you can not just give vehicles or their drives a "targeting camera pod"
Thats more of an addon thing
@teal valley Google is your friend. Your exact question had https://forums.bohemia.net/forums/topic/169324-release-script-tgp-targeting-pod-for-air-vehicles/ in the first 5 results
@astral tendon
As Sparker proposed, you can use one of the heal actions. You will have to make the medic walk to the injured unit yourself. There is no command that will do everything automatically for you.
@ruby breach Ah yes, sorry I forgot to get back to you. Yes that bit worked perfectly, thank you!
@ruby breach nice , but wasnt looking for a darter sticking to the choper to Achieve this funtion.
In which case, specificity is also your friend
some sort of draw3d?
@peak plover more likely images
so basically an image for every direction_
?
but I'm laaaazy
Are there any ways around?
@peak plover
You could try using https://community.bistudio.com/wiki/ctrlSetAngle to set the angle of a picture rather then a different picture for each angle.
It also allows you to set the centre of rotation
ooh, didn't know about this thanks
Any ideas if you can grab your current unit camera object, if its an object at all?
Not sure what youโre asking
Well when you select/play a unit you watch through some camera, right? It also switches to INTERNAL, GUNNER, etc. That camera might be/should be an object.
How to grab it, is it an object?
Donโt think there is an object you can grab, but you can get position and direction
pity.
Why?
You would probably end up getting pos and dir anyway from the object if you had one
Not the purpose. I was thinking about camera commands application.
Cam commands are for the cameras created with them
Should onMouseEnter work with RscText ?
How do you add Event Handler?
@tough abyss https://community.bistudio.com/wiki/addEventHandler ?
Thanks but I was replying to the question above
my bad x) I plead post-Christmas dizziness!
why short .ogg files playing twice when i use say; say3d?
one for say one for say3d?
But jokes aside, if you double execute, these commands will play second sample when first stopped playing
so if you for "_i" from 1 to 10 do {dasdasd say "asdsadas"}; this will execute instantly but queue sound and keep on playing until all 10 instances are played
... So I unpacked that Tarkov based mission to poke around and maybe get some work done on it.
Oh boy.
deleteVehicle crate1; deleteVehicle crate2; deleteVehicle crate3; deleteVehicle crate4; deleteVehicle crate5;
deleteVehicle crate6; deleteVehicle crate7; deleteVehicle crate8; deleteVehicle crate9; deleteVehicle crate10;
deleteVehicle crate11; deleteVehicle crate12; deleteVehicle crate13; deleteVehicle crate14; deleteVehicle crate15;
deleteVehicle crate16; deleteVehicle crate17; deleteVehicle crate18; deleteVehicle crate19; deleteVehicle crate20;
deleteVehicle crate21; deleteVehicle crate22; deleteVehicle crate23; deleteVehicle crate24; deleteVehicle crate25;
deleteVehicle crate26; deleteVehicle crate27; deleteVehicle crate28; deleteVehicle crate29; deleteVehicle crate30;
deleteVehicle crate31; deleteVehicle crate32; deleteVehicle crate33; deleteVehicle crate34; deleteVehicle crate35;
deleteVehicle crate36; deleteVehicle crate37; deleteVehicle crate38; deleteVehicle crate39; deleteVehicle crate40;
deleteVehicle crate41; deleteVehicle crate42; deleteVehicle crate43; deleteVehicle crate44; deleteVehicle crate45;
deleteVehicle crate46; deleteVehicle crate47; deleteVehicle crate48; deleteVehicle crate49; deleteVehicle crate50;
deleteVehicle crate51; deleteVehicle crate52; deleteVehicle crate53; deleteVehicle crate54; deleteVehicle crate55;
deleteVehicle crate56; deleteVehicle crate57; deleteVehicle crate58; deleteVehicle crate95; deleteVehicle crate60;
deleteVehicle crate61; deleteVehicle crate62; deleteVehicle crate63; deleteVehicle crate64; deleteVehicle crate65;
deleteVehicle crate66; deleteVehicle crate67; deleteVehicle crate68; deleteVehicle crate69; deleteVehicle crate70;
deleteVehicle crate71; deleteVehicle crate72; deleteVehicle crate73; deleteVehicle crate74; deleteVehicle crate75;
deleteVehicle crate76; deleteVehicle crate77; deleteVehicle crate78; deleteVehicle crate79; deleteVehicle crate80;
deleteVehicle crate81; deleteVehicle crate82; deleteVehicle...```
When you get paid by the line of code ๐
The random item generator for the crates is a switch using the variable that does the math, rather than accessing an array with select...
@tough abyss nope, just one execute but playing twice. i render this ogg file little bit longer in 1 sec and profit ๐ค . this file was less then 1 sec (~0.80) and it playing twise some kind of restriction maybe?
maybe it fixing at description.ext or idk
@earnest ore These are the people that either don't come here. or get offended when you tell them their code is shit ๐
I can only imagine if it was produced by some misused code generator.
@cedar heart do you make a Logic say it? Or a soldier / human?
๐ญ
... We still don't have a simple and easy addWeaponCargo alt syntax that accepts the format output by weaponsItems?
@winter rose soldier
in my script.sqf which i run:
myUnit say "mysound";
myUnit - just a soldier. as i said .ogg files longer 1 sec playing well. but sound what less 1 sec unit saying twice
with playSound "mysound" sound playing once
Huh, funnyโฆ would have to try.
In the meantime, maybe use .wss for this one?
@earnest ore correct. We have something like that coming. But it doesn't use the same syntax. Different ordering of that array. I think same as in getUnitLoadout syntax
i using 2 mods, could it be for their reason?
@cedar heart usually, try vanilla before reporting a bug ๐
But it may not be due to them.
@winter rose just tried vanilla now same thing
Add little silence after the sound so it's longer than 1sec
Hey guys. i am working on a script which will provide a parachute to a tank and slow it down once teleported behind a plane.
_dropVic = _this select 0;
_para = "B_Parachute_02_O";
_DropPos1 = getpos _dropVic;
_Chute1 = createVehicle [_para, _DropPos1, [], 0, "NONE"];
_chute1 attachTo [_dropVic, [0, 0, 1]];
playSound3D [
"a3\sounds_f\weapons\Flare_Gun\flaregun_1_shoot.wss", _dropVic ];
_dropVic setvelocity [0,0,3];
_dropVicpos = getpos _dropVic;
_attitude1 = _dropVicpos select 3;
while {(alive _dropVic) && (_attitude1 > 2)} do
_dropVicpos = getpos _dropVic;
_attitude1 = _dropVicpos select 3;
sleep 1;
If (_attitude1 > 2) Then {_dropVic setvelocity [0,0,0];};
this is what i have.
@proud carbon you can do it quiet more easy
yeah I know. its the not know how though
params ["_plane", "_tank"];
_tank setPos (getPos _plane);
if you experience some explosions you have to either stop allowing damage for these objects or add a space between tank and plane
i already have the drop system working. it just the parachuting
if (isServer) then {
Sleep 1.3;
tankPos1 = getpos TankThrower;
Sleep 0.2;
tank1 hideObjectGlobal false;
tank1 setPos [(tankPos1 select 0),(tankPos1 select 1),145];
[tank1] execvm "Killchute.sqf";
Sleep 3;
tankPos2 = getpos TankThrower;
Sleep 0.2;
tank2 hideObjectGlobal false;
tank2 setPos [(tankPos2 select 0),(tankPos2 select 1),145];
[tank2] execvm "Killchute.sqf";
Sleep 4.2;
tankPos3 = getpos TankThrower;
Sleep 0.2;
tank3 hideObjectGlobal false;
tank3 setPos [(tankPos3 select 0),(tankPos3 select 1),145];
[tank3] execvm "Killchute.sqf";
};
```sqf
<code>
```
for proper highlight
this works fine its the Killchute.sqf aka the code i posted earlier that I'm having an issue.
What is the issue you have with that. you didn't tell us that yet
Can't fix something when we don't know what's wrong
oh yeah that would help lol.
well the problem is it keeps telling me _attitude1 |*|= (getpos _dropVic) select 3;
Got this time haha
Also you didn't give us the error message
that's the position of the error. But not the error
so like sqf kAJFNBkjasnbh = what ?
No. Exactly like I posted
https://discordapp.com/channels/105462288051380224/105462984087728128/527856768747831307 here is the link to that message again
๐
so the code goes into the <>?
No
so confused right now.
_attitude1 |*|= (getpos _dropVic) select 2;
if (isServer) then {
Sleep 1.3;
tankPos1 = getpos TankThrower;
Sleep 0.2;
tank1 hideObjectGlobal false;
tank1 setPos [(tankPos1 select 0),(tankPos1 select 1),145];
[tank1] execvm "Killchute.sqf";
Sleep 3;
tankPos2 = getpos TankThrower;
Sleep 0.2;
tank2 hideObjectGlobal false;
tank2 setPos [(tankPos2 select 0),(tankPos2 select 1),145];
[tank2] execvm "Killchute.sqf";
Sleep 4.2;
tankPos3 = getpos TankThrower;
Sleep 0.2;
tank3 hideObjectGlobal false;
tank3 setPos [(tankPos3 select 0),(tankPos3 select 1),145];
[tank3] execvm "Killchute.sqf";
};
๐คฆ
Im new to this lol
It's not really that hard
it is not that heavy
Just literally do it exactly as I did ๐
I told you to do
```sqf
<code>
```
And you did
```
sqf
<code>
```
See the difference?
now you can ask again and tell us your problem and write the full error
if (isServer) then {
Sleep 1.3;
tankPos1 = getpos TankThrower;
Sleep 0.2;
tank1 hideObjectGlobal false;
tank1 setPos [(tankPos1 select 0),(tankPos1 select 1),145];
[tank1] execvm "Killchute.sqf";
Sleep 3;
tankPos2 = getpos TankThrower;
Sleep 0.2;
tank2 hideObjectGlobal false;
tank2 setPos [(tankPos2 select 0),(tankPos2 select 1),145];
[tank2] execvm "Killchute.sqf";
Sleep 4.2;
tankPos3 = getpos TankThrower;
Sleep 0.2;
tank3 hideObjectGlobal false;
tank3 setPos [(tankPos3 select 0),(tankPos3 select 1),145];
[tank3] execvm "Killchute.sqf";
};
``` This works
```sqf
_dropVic = _this select 0;
_para = "B_Parachute_02_O";
_DropPos1 = getpos _dropVic;
_Chute1 = createVehicle [_para, _DropPos1, [], 0, "NONE"];
_chute1 attachTo [_dropVic, [0, 0, 1]];
playSound3D [
"a3\sounds_f\weapons\Flare_Gun\flaregun_1_shoot.wss", _dropVic ];
_dropVic setvelocity [0,0,3];
while {(alive _dropVic) && (getpos _dropVic select 2 > 2)} do
_dropVicpos = getpos _dropVic;
_attitude1 = _dropVicpos select 2;
hint format ["%1", _attitude1];
sleep 1;
If (_attitude1 > 2) Then {_dropVic setvelocity [0,0,0];};
``` this isn't.
it says line 13 is the issue. now
what issue
what's the error message?
while {(alive _dropVic) && (getpos _dropVic select 2 > 2)} do
uh
okey there is the problem
what are you trying to do with that
you are trying to do nothing while condition?
_dropVic = _this select 0;
_para = "B_Parachute_02_O";
_DropPos1 = getpos _dropVic;
_Chute1 = createVehicle [_para, _DropPos1, [], 0, "NONE"];
_chute1 attachTo [_dropVic, [0, 0, 1]];
playSound3D [
"a3\sounds_f\weapons\Flare_Gun\flaregun_1_shoot.wss", _dropVic ];
_dropVic setvelocity [0,0,3];
while {(alive _dropVic) && (getpos _dropVic select 2 > 2)} do
_dropVicpos |*|= getpos _dropVic;
_attitude1 = _dropVicpos select 2;
hint format ["%1", _attitude1];
sleep 1;
If (_attitude1 > 2) Then {_dropVic setvelocity [0,0,0];};
๐
Don't need to repost that
I told you what the error is
Hint: It's not where the error message says it is
https://community.bistudio.com/wiki/while that's your mistake. You have to give do some code that it should "do"
oh didn't see the part while typing.
while {(alive _dropVic) && (getpos _dropVic select 2 > 2)} do {
_dropVicpos |*|= getpos _dropVic;
_attitude1 = _dropVicpos select 2;
hint format ["%1", _attitude1];
sleep 1;
};
Would be right
but would fix his issue
And he only added the logging after he got the problem
That would make the error go away
not fix the issue properly
Also your code will still error out
syntax error
The question is. What @proud carbon wants to do with that while loop there
i just want it to check if the _dropVIc is above 2 metres in air and kill the parachutes when it's below that
and setvelocity [0,0,0]
So you want to do nothing while that condition
can one of you fellas explain what setvelocity does?
If (_attitude1 > 2) Then {_dropVic setvelocity [0,0,0];}; That code doesn't make sense then. If you wait till it's below 2 then the check if it's above 2 will never be true
setVelocity set's the velocity of the object...
params ["_dropVic"];
_DropPos1 = getpos _dropVic;
_Chute1 = createVehicle ["B_Parachute_02_O", _DropPos1, [], 0, "NONE"];
_Chute1 attachTo [_dropVic, [0, 0, 1]];
playSound3D [ "a3\sounds_f\weapons\Flare_Gun\flaregun_1_shoot.wss", _dropVic ];
_dropVic setvelocity [0,0,3];
waitUntil {!(alive _dropVic) || (getpos _dropVic select 2 < 2)};
_dropVic setvelocity [0,0,0];
Btw you should choose whether to start variables with uppercase or lowercase letter or whether you write the command names correctly or all lowercase..
Don't mix and match
ok that works but doesn't slow the vic's downward speed.
Once it's below 2 meters it stops it.
Yeah that's a bad habit on my part.
but that's scheduled code
if the waitUntil exit with the event that _dropVic isn't alive anymore, is setting the velocity of a "dead" object a error too?
the waitUntil might only be evaluated every couple seconds or even minutes
So if you find out "hey! it's below 2 meters" 20 seconds after it happened... It has already slammed into the ground
No. setVelocity on a dead object is valid
moves the wreck then
ah ok
it mostly works. It just doesn't spawn in a parachute though.
No error message is great though. ๐
Well the createVehicle code is there
ยฏ_(ใ)_/ยฏ
Also you attach the parachute to the vehicle
You probably want to attach the vehicle to the parachute instead
so that would be swapping Chute1 into _dropVic position?
swapping the attachTo around
so this _dropVic attachTo [_Chute1, [0, 0, 1]];
while i was googling my problem i had found this. http://killzonekid.com/arma-scripting-tutorials-epic-armour-drop/
every time i call it on my tank but it doesn't work.
does it have to be a newly spawned vic?
does it have to be a newly spawned vic?
no
that code is almost 5 years old now.. And quite crusty compared to todays standards
oh ok
But
its a cool looking effect though.
you have B_Parachute_02_O And the code on that page says B_Parachute_02_F
Where did you get that B_Parachute_02_O from? 0 results on google
friend sent me it.
So I am overriding some escape menu buttons, and on of them I want it to open a link but I can find any command to do it, I am pretty sure its possible in the dialog class. Any ideas?
you can make a structured text with a link that will be opened when clicked on
Oh yeah! Thanks
I am getting this, but I am not sure why? I have seen this code work a few times on other stuff.
2:34:09 Suspending not allowed in this context
2:34:09 Error in expression <vpknlmstpsnonwnondnon";
};
waitUntil {!isNil "Test_result"};
private >
2:34:09 Error position: <!isNil "Test_result"};
private >
2:34:09 Error Generic error in expression
2:34:09 File core\utility\fn_test.sqf [Test_fnc_test], line 40
Suspending not allowed in this context
you cannot suspend in unscheduled
unscheduled scripts freeze the game and everything else until they are done
so sleeping or waiting on there doesn't make sense.
Not sure how to fix this... Should I do spawn instead of call?
ye
Does anyone here know how to create tables? Possibly also work on framework?
@silent pewter re-read #rules please. And then you might wanna fix that violation. Maybe.
_counter = 10;
_randomSerialSelect = selectrandom["A","B","C","D",1,2,3];
_CountedSerial = _randomSerialSelect;
while {_counter > 1} do {
_counter = _counter - 1;
sleep 1;
};
hint format ["Counter: %1",_counter];
Why does this not like the sleep command
Nevermind, I know now.
I didn't spawn it
Maybe same as the last issue we talked about in here ๐
also use private keyword instead of the array variant
Yeah i'm trying to get it so that it selects 7 random letters/integers and then hints them as a serial number e.g. 123AS21
Just uh, clueless ๐ค
["","","","","","",""] apply {selectRandom ["A","B","C","D","1","2","3"]} joinString ""
no need for spawning or sleeping, why on earth you want to use sleep?
I was trying to make a countdown timer, i'm new..
Lol
Thanks for that by the way. I wish I knew how to do it that fast ๐
Countdown to 7 letter serial number?
I'm retarded..
In all seriousness, I'm copy and pasting into the debug console.
Not actually running it as a script (whole)
How do you make an ai shoot a civ/captive that is standing still? I dont want to use setcaptive false or addrating -999, because that would break the rest of the mission.
ai doTarget player;
ai dofire player;
With the code above the ai is aiming in the right direction but not exactly(after a few secs they start rotation in circles non stop). The ai only shoot if you start moving a little bit(might be because ai doesn't care about you because you are on a friendly side). I also tried forceFire but for that i need to make some more complicated checks so it wont spree all over the place. I want to use this in some undercover script.
i just need some simple code which is reliable to work(I know that might be impossible).
JoinSilent?
what about ai reveal [player,4]; ai lookAt unitAimPosition player; ai doTarget player;
hey all, I'm trying to setup something to create the unit of the same type that just died in a different location using a trigger, though I'm incredibly new at this to the point that I'm still going through most of the wiki for information.
and is repeatable
any ideas?
I don't understand
i mean, 4 example
class textolistavehiculos: RscText
{
idc = -1;
text = "Lista de Vehiculos:";
x = 0.324687 * safezoneW + safezoneX;
y = 0.291 * safezoneH + safezoneY;
w = 0.226875 * safezoneW;
h = 0.033 * safezoneH;
};
where should i set it
style = 2;
thank you so much dude!
@rigid idol you dont need trigger for that. Use event handler "EntityKilled"
addMissionEventHandler ["EntityKilled", {group (_this select 0) createUnit [typeOf (_this select 0), NEWPOSITION, [], 0, "NONE"]}];
okay, I'll give that a quick try once I get back in a few.
@tough abyss sorry to ask, but like I said I'm fairly new and I'm not sure how to even add an eventhandler
Hi all, Im trying to use the BIS_fnc_EXP_camp_IFF function in a multiplayer scenario. Problem is, I call the function in the init.sqf but it doesn't work for players that JIP, or when the unit respawns. Im pretty new to scripting, so I dont know what to do to get it to work past the init.sqf. Any help would be appreciated!
hey
can y'all help me figure out how to change a player's score and side (-2000 and opfor respectively) when they pull a weapon out? best would be if i could make it work if players pull a handgun from being hidden with the ACE 3 holster function. tryna make some responsive cop units in a round-robin assassination game
@ me please
CBA has a weapon changed eventhandler
@trail hinge
anyone aware of changes in the support provider/requester framework? The code in Unsung stopped working, it's basically this:
center = createCenter sideLogic;
logicGroup = createGroup center;
requester = logicGroup createUnit ['SupportRequester', getpos player, [], 0, 'FORM'];
systemChat str requester;
pos = player getPos [2000, floor (random 360)];
provider = logicGroup createUnit ["SupportProvider_Virtual_Transport", pos, [], 0, 'FORM'];
systemChat str provider;
[requester, 'Drop', 1] call BIS_fnc_limitSupport;
[requester, 'CAS_Bombing', 1] call BIS_fnc_limitSupport;
[requester, 'CAS_Heli', 1] call BIS_fnc_limitSupport;
[requester, 'Transport', 1] call BIS_fnc_limitSupport;
[player, requester, provider] call BIS_fnc_addSupportLink;
somehow requester does not seem to work
@round scroll Out of curiosity, why are you creating a center for sideLogic? It already exists in Arma 3, there's no need to try creating one. https://community.bistudio.com/wiki/createCenter
Also, untagged global variables are a bad practice.
it's for the debugger, the code, the real code uses private variables
Ok, new question... is it possible to spawn in a hide terrain module and have the same effect as placing one down in the editor?
@vapid drift hideObjectGlobal cursorObject; ??
So you mean hiding objects at mission run time, right? Then use the above code ^ but you will also have to find objects close to a certain point with commands like nearObjects, not sure which one you need exactly
Yeah I guess I'm trying to cheat a little
I have random mission start points that center around a crashed blackhawk
I load in a custom composition at the spawn points... when I can place down the hide terrain objects module, I can easily make a nice "flight path" for the blackhawk
I was hoping there was an easy way to replicate that
What do you mean 'flight path'?
There is https://community.bistudio.com/wiki/BIS_fnc_moduleHideTerrainObjects, although I've got no clue what the parameters are for it (a quick google search shows https://pastebin.com/UugKSgya, but I have no clue if that's the exported function or not)
where the blackhawk would have crashed through trees and what not
@ruby breach oh ok, thanks. With the function name I should be able to figure out if it has any parameters or not
I suppose for that matter, if I have to, I can just reverse engineer the module itself
Wouldnโt a helicopter just spin down rather that create a โfly pathโ?
I would setDammage on trees to 1 to make them fall down TBH and hide all stones and other indestructable things
I think a heli would autorotate, and when you autorotate you have some horizontal velocity until the end when you 'pull up' the collective and lose your horizontal V to 'hover' a bit
@tough abyss when a helo goes down it doesn't lose all forward momentum
Therefore if you crashland a heli and everyone survives, it must have had some horizontal velocity ๐
@unreal leaf
private _pad = _unit getVariable ['unit_suppress_pad',objNull];
if (isNull _pad) then {
_pad = 'Land_HelipadEmpty_F' createVehicleLocal [0,0,0];
_unit setVariable ['unit_suppress_pad',_pad];
};
_pad setposATL _pos;
_unit doTarget _pad;
and then a per frame handler with
private _weaponState = weaponState _unit;
_unit forceWeaponFire [_weaponState # 1, _weaponState # 2];
_unit is the unit that shoots the gun
_pos is the position of the unit
So I've spent some time writing a reentrant(recursive) mutex for SQF. Is it a valid one or it still has a chance to fail?
// Creates a new mutex
#define MUTEX_NEW() [scriptNull, 0]
// Locks the mutex
#define MUTEX_LOCK(mutex) waitUntil { \
isNil { \
private _s = (mutex select 0); \
if( (_s isEqualTo _thisScript) || (_s isEqualTo scriptNull) ) then { \
mutex set [0, _thisScript]; \
mutex set [1, (mutex select 1) + 1]; \
nil \
} else { \
0 \
}; \
}; \
};
// Unlocks the mutex
#define MUTEX_UNLOCK(mutex) isNil { \
mutex params ["_hScript", "_lockCount"]; \
if (_hScript isEqualTo _thisScript) then { \
if (_lockCount == 1) then { \
mutex set [0, scriptNull]; \
mutex set [1, 0]; \
} else { \
mutex set [1, (mutex select 1) - 1]; \
}; \
} else { \
diag_log format ["ERROR: error unlocking mutex %1", mutex]; \
}; \
};
hi guys. are there functions for getting the rpm on a landvehicle?
I can only find them for aircraft
Id like to avoid animating something using rpm animationSource and extracting its anim value if possible
Well it doesn't look wrong
but cannot say if it's correct without the rest of the code
@peak plover Yes, it would make one scheduled script wait until the other one unlocks mutex for some common shared resource. Then recursive mutex, unlike a simple mutex, allows a thread to lock it multiple times to avoid deadlocks.
Should be working, i've tested it. Just wanted to make sure i didn't screw up somewhere.
thanks you all
No problem
can one do bitwise shift operations in arma by some custom functions setup?
numbers are floats
so that wouldn't make much sense
There are shift functions from BI.. No idea what they really do though
Maybe convert to array of numbers as "binary" and then use deleteAt to shift around or smth
BI only has:
p:\a3\functions_f\bitwise\fn_bitwiseand.sqf
p:\a3\functions_f\bitwise\fn_bitwisenot.sqf
p:\a3\functions_f\bitwise\fn_bitwiseor.sqf
p:\a3\functions_f\bitwise\fn_bitwisexor.sqf
trying to re-implement BI randomGen used for clutter..
what shifts do you need?
left is easier than right
Split the number into array of 32 elements. Each one is either 0 or 1. might use booleans for that.
Then for shiftL just deleteAt index 0 as many bits as you wanna shift.
Then when converting back use for index loop with param on the array. And use false as default value for param.
And put the number back together using that
Though not sure if you can replicate it accurately. BI probably uses 32bit integers. You only have floats
Do the random sqf commands not work?
They use the same backend
Don't you use a extension for that mod yet?
yeah i am considering it but lets see
@nocturne basalt try sound controllers
BI probably uses 32bit integers Or even 24bit
@tough abyss wow thanks. Would never have thought a method called soundController could give me rpm ๐
@still forum should be possible to replicate even with using floats
though ... not recommended as getting whatever number into binary format in SQF is potentially horrible extremly damn fucking slow
2 = 2 %/ 2 => (0, 1)
1 = 1 %/ 1 => (1, 0)
1 0 1```
is the basic math
params ["_value"];
private _arr = [];
while { _value != 0 } do {
private _tmp = _value mod 2;
_arr pushBack _tmp;
_value = floor (_value / 2);
};
reverse _arr;
_arr
method works
tested using SQF-VM ๐
@SQF [10] call fnc_getBits
SQFBOTToday at 7:53 PM
[WORK] <ARRAY> [1,0,1,0]
[WORK] <NOTHING> nil```
the rest should be simple ๐คท
You just said what I already said before. Still. We only have floats
You cannot get full int32 range represented in a float
@tough abyss it worked but I cant use it it seems. Im trying to detect if my vehicle is giving full throttle but standing still (like when you are driving into some obstacle that blocks your path while standing on the pedal). its only showing me the rpm once I gain some speed
A signed 32-bit integer variable has a maximum value of 231 โ 1 = 2,147,483,647, whereas an IEEE 754 32-bit base-2 floating-point variable has a maximum value of (2 โ 2โ23) ร 2127 โ 3.402823 ร 1038. https://en.wikipedia.org/wiki/Single-precision_floating-point_format
@tough abyss any suggestion how I can detect that?
@queen cargo so what? 2147483647 cannot be stored in a float
should have read the part fully ๐ anyways, thing is: bigint would still be an option
((the actual info i wanted to communicate with that is: there ya go with maximum value of float, not compare it to int32 directly ... but did not read that it states the 32bit int size too there))
does anyone know how to get the flare count in planes and helicopters?
@nocturne basalt probably a bug, same happens with RPM gauge on the Prowler, it doesn't move if you are not moving. You can try "thrust" that changes from 0 to 1 when you rev the engine even if you are not moving
flares per magazine x number of magazines @tropic dawn
i mean i can get the total amount from here magazinesAllTurrets but is it possible to check if the vehicle has flares first
otherwise i need to compare the magazine class name to all the flare classes
Check if it has"CMFlareLauncher"
doesn't it change if you switch the mode though?
like single, burst and whatever the other one is
what change?
the class
it is a weapon it doesnt change unless you remove it
@tough abyss thanks^^ thrust gives me exactly what Im looking for
@tough abyss one thing. when Im standing still its gives me values like these:
3.11409e-038
shouldnt it be lower than 1 when engine is idle?
thats basically 0
it is something like 0.00000000000000000000000000000000311409
but when testing on that value, I need to format it first right?
testing ?
I have a script that will check if the speed is 0 and thrust is more than zero
so in order to have an if test on the thrust value, will it understand 3.11409e-038 to be lower than 0?
no it is > 0 but by very little, it is extremely small value just above 0
you can round to your desired precision or compare it against threshold like 0.00001
if it is >= it is not zero
otherwise could well be zero
Is it possible to use doSuppressiveFire to make the AI just aim at a specific pos?
Possible with Combat Mode BLUE since that forces hold fire?
Hey Buds,
I am using https://cbateam.github.io/CBA_A3/docs/files/xeh/fnc_addClassEventHandler-sqf.html to listen to an event when a Man NPC is killed.
["CAManBase", "killed", {
call coopr_fnc_onKilled;
}] call CBA_fnc_addClassEventHandler;
This event is registered on my server side. When I am on my dedicated server and spawn an enemy via zeus and eliminate it this event is not triggered. I kind of thought the death of an npcs will be broadcasted globally? Is the problem here maybe that the NPC unit was not spawned by the server but by me through zeus?
If yes - can anybody tell me how to actually get this to work also with spawned hostiles from the clientside? Because I have to test stuff out adhoc and zeus is kinda perfect for that.
PS: All worked in preview
unit spawned with zeus is local to the player which spawned him @frigid raven
maybe killed EH only runs where the unit is local
Yea ur right
@tough abyss i tried what you said about the flares
but different vehicles have the different flare launchers
@astral tendon it calls BIS_fnc_setTask which is global by default
For example? @tropic dawn
dw, i just did _flares = ("CMFlareLauncher" in _PilotWeapons) || ("CMFlareLauncher_Singles" in _PilotWeapons) || ("CMFlareLauncher_Triples" in _PilotWeapons);
can't be bothered to find anything better
@tropic dawn those are still the same flare launcher class CMFlareLauncher_Singles: CMFlareLauncher {...
use isKindOf "CMFlareLauncher"
yeah but im going have to go through the array returned by _PilotWeapons = vehicle player weaponsTurret [-1];
don't know which one is better for performance since im doing this inside a loop
I'd do it like this _hasFlareLauncher = _PilotWeapons findIf {_x isKindOf ["CMFlareLauncher", configFile >> "CfgWeapons"]} > -1; but if you have all known vehicles you can just hardcode it
wow thanks, didnt know there was a findIf
I can't find it, but I could swear there is a command to add items to a unit that doesn't respect weight limits, any ideas? addItem will fail when the unit doesn't have space for an item. I'm looking to guarantee the unit gets the item even if they're already at capacity.
try the cargo commands on the container directly
Legend, (backpackContainer player) addItemCargoGlobal ["ACE_bloodIV", 30]; worked great. Thanks.
I'm having problems getting an agent to look in the right direction. When I try it in simulator and test with local execute or server execute, everything is fine. However when i run the server, the agent is always looking the wrong way. The only difference on the server is that I'm passing the agent to a headless client after spawning him. Anyone have experience with this?
@drowsy oak try remoteExec with the agent as locality parametre, this should do
anyone know what the base class for 60Rnd_CMFlareMagazine and 60Rnd_CMFlare_Chaff_Magazine
?
What am I doing wrong? East soldiers can do the code below with civilians but nor with WEST which are captive? It doesn't even work with captive civilians.
The unit doesn't target at the unit and doesn't fire at him.
_unit = sol1;
_unit reveal [player, 4];
_unit doTarget player;
_unit doFire player;
@tropic dawn type utils 2 in debug console, exec. Type magazine type, uncheck classes only, it should show what class it is derived from
ok thank you
@winter rose remotexecute from server to HC on setdir?
@winter rose As I thought about why that would work, I came up with another solution. I put in a 5 seconds pause before moving the agent to the HC. Apparently that gives it enough time for setDir and everything on the server to take effect before the agent is moved to the HC.
I saw this in the ip channel
if (isClass(configFile>>"CfgPatches">>"mod i want to block"))then{
endMission "END2";}; ```
could i block multiple mods using this
if (isClass(configFile>>"CfgPatches">>"mod1","mod2","mod3"))then{
endMission "END2";};```
so basically in if statement per mod correct?
ok that's easy so "mod1"&&"mod2" ect
I understand how to use booleans to create a loop that count and exit, but in this context im lost. is this the right concept ?sqf if ((isClass(configFile>>"CfgPatches">>"mod i want to block") &&(isClass(configFile>>"CfgPatches">>"mod i want to block2"))then{ endMission "END2";};
yep
whats the or operator again
thanks thats what i was looking for
@round scroll
BI made changes to the module activation in 1.86. Check out my comment on https://community.bistudio.com/wiki/createUnit.
(["mod1",",mod2","mod3"] apply {isClass(configFile>>"CfgPatches">>_x)} findIf {_x} > -1) // returns true if any mods listed in array are found
``` @spring vigil
making an array was going to be a later question thanks .
is there a way to see what mods the clients have loaded ?
Can anyone give me a hand, I'm trying to make a custom warlords mission, I'm building the description.ext file but when I push into test, I get this error.
`
ยด...tFinal = 0;
_cnt = 0;
while {_funds >= I#I_cost && _cnt < (4 - count units _this)]...ยด
Error Not identified Variable in Expression: _cost
`
Anyone able to help?
Is it possible to have objects match the terrain slope when using setPosATL?
is there a way to see what mods the clients have loaded configClasses command. Combined with the knowledge where all mods have to make a config entry. Which you already have
@vapid drift you can use setVectorDirAndUp after you setPosATL
and surfaceNormal
@frozen knoll Ok, that'll get me started
yeh certainly many ways to go about it just depends what information you have first to work with
@languid tundra thanks, that was it
@frozen knoll is there a way to get the vector of the terrain at a given location or are we talking about more work than it's really worth
well I see BIS_fnc_terrainGradAngle... I guess that would do it
@vapid drift
surfaceNormal was meant for you ๐
seems to be ctrlTextHeight handles numbers / letters differently.
any idea if this is the case ? through some testing, i came up with some sort of work around, but not ideal
https://images-ext-1.discordapp.net/external/62a5nBREaCTwoCIcbmy6NUoB_G5e3RJCxViWIu0Zczk/https/i.gyazo.com/thumb/1200/6d2c1298e94702dd732fe5251754fc40-png.jpg this was what i was getting when using ctrlTextHeight, for all 4 sections of text
_ctrl ctrlSetPosition [REL_X(_x_pos), _bg_y + ((_bg_h / 2) - ((ctrlTextHeight _ctrl) / 2)), REL_W(_w), (ctrlTextHeight _ctrl)];
_ctrl ctrlCommit 0;
``` the text sections with numbers in are fine. but the one with just text, was off.
https://gyazo.com/dd22038842bb3242c1f8f55f1e7b0420 when using setting a var to use as y and height using one of the text sections with numbers, it seems to work fine.
@ruby breach you can do without apply tbh
how do you give all AI unit unlimited magzines or ammo? in a particular zone m trying to create a trigger so if any AI group is in that trigger zone they will have unlimited ammo or magazine
m playing some ai vs ai battle siege and defenders loose all ammos and they cant go re arm and they are garrisoned
so i created a trigger but i dont know what script should i use to trigger this change
Try https://community.bistudio.com/wiki/setVehicleAmmoDef @nimble echo
@spring vigil I don't think there is a way to see what mods the clients have loaded but generally we use the keys or we can whitelist things server side that are allowed.
@astral dawn 2 things I have learned in here that will get you helped quicker than anything else:
- What is the entire code you are using?
- What is the context of what you are attempting to achieve with your question?
With that said I am going to add a third question in; what game mode are you doing this in?
@tough abyss Shhh, itโs no fun if you give away all the answers. Besides, findIf {_x} looks hilarious (and should be its own hint that thereโs a slightly better way to write whatever itโs in)
i want to specify the target of a seek and destroy wp by command
i could not find any setWaypoint... command for it, how do i do it?
seek and destroy means the AI just goes hunting around
unless the target can be synced to it for example
If anyone here is familiar with ACRE here I am in need to some assistance.
11:31:31 [ACRE] (api) WARNING: Vehicle accVic is not initialised. Rack is not being added. idi\acre\addons\api\fnc_addRackToVehicle.sqf:56
11:31:31 [ACRE] (api) WARNING: Vehicle accVic is not initialised. Rack is not being added. idi\acre\addons\api\fnc_addRackToVehicle.sqf:56
Sample mission is the acre_addrack code implemented into an actual mission
I'm not sure how to solve this issue as the vehicle should have the radio's initialized by the fnc_AddRackToVehicle command according to the ACRE documentation
//acre2/addons/api/fnc_addRackToVehicle.sqf
#include "script_component.hpp"
/*
* Author: ACRE2Team
* Initialises all racks in the vehicle. Must be executed in the server. If no condition is specified,
* the radio will be configured to match the vehicle preset defined using acre_api_fnc_setVehicleRacksPreset
* or the preset of the first player that matches the given condition if the vehicle preset is not defined.
*
* Continued...
But if I set my calls to force initialization, ```SQF
//...
- ...
- 2: Force initialisation <BOOL> (default: false)
//...
I get these errors:
11:43:03 [ACRE] (api) WARNING: No unit found for condition {} defaulting to first player idi\acre\addons\api\fnc_initVehicleRacks.sqf:56
11:43:03 [ACRE] (api) WARNING: Vehicle accVic is already initialised but function forces it to initialise again idi\acre\addons\api\fnc_addRackToVehicle.sqf:64
11:43:03 [ACRE] (api) WARNING: Vehicle accVic is already initialised but function forces it to initialise again idi\acre\addons\api\fnc_addRackToVehicle.sqf:64
11:43:03 [ACRE] (api) WARNING: Vehicle accVic is already initialised but function forces it to initialise again idi\acre\addons\api\fnc_addRackToVehicle.sqf:64
11:43:03 [ACRE] (api) WARNING: Vehicle accVic is already initialised but function forces it to initialise again idi\acre\addons\api\fnc_addRackToVehicle.sqf:64
11:43:03 [ACRE] (api) WARNING: Vehicle accVic is already initialised but function forces it to initialise again idi\acre\addons\api\fnc_addRackToVehicle.sqf:64
11:43:03 [ACRE] (api) WARNING: Vehicle accVic is already initialised but function forces it to initialise again idi\acre\addons\api\fnc_addRackToVehicle.sqf:64
11:43:03 [ACRE] (api) WARNING: No unit found for condition {} defaulting to first player idi\acre\addons\api\fnc_addRackToVehicle.sqf:124
possible to create clutter models with createSimpleObject?
say a3\plants_f\clutter\c_grass_brushhigh_green.p3d
Directly from a raw model to a simple object?
I believe it should be possible
(With textures of course)
yep. it seems to create it but its not visible
Locality issue?
depends on what position format, with posWorld you only need +0.5
quite nice piece of grass actually
_clutter attachto [player, [0,0,0], "head"] lol
I have a hard time to get extDB3 to run. The extension is loaded fine but my mysql connection does not work.
This is my MySQL setup via XAMPP (phpMyAdmin):
Username: coopr
Password: coopr
Host: 127.0.0.1
All Privileges
GRANT: yes
And this here is the content of extdb3-conf.ini:
[Database]
IP = 127.0.0.1
Port = 3306
Username = coopr
Password = coopr
Database = coopr_local
I am executing the following SQL snippet to test the db-connection (source: https://bitbucket.org/torndeco/extdb3/src/f1a08ecf20c7de0d1b043b600da9eb3c3d0b0f9a/sqf_examples/sqf/init_sql_example.sqf?at=default&fileviewer=file-view-default):
// extDB3 Version Check
private _result = "extDB3" callExtension "9:VERSION";
diag_log format ["extDB3: Version: %1", _result];
if (_result == "") exitWith {diag_log "extDB3: Failed to Load Extension"; false};
if ((parseNumber _result) < 1.026) exitWith {diag_log "Error: extDB3 version 1.026 or Higher Required";};
// extDB3 Load Protocol
private _database = "coopr_local"; // This is case sensitive
// extDB3 Connect to Database
_result = call compile ("extDB3" callExtension format["9:ADD_DATABASE:%1", _database]);
if (_result select 0 isEqualTo 0) exitWith {diag_log format ["extDB3: Error Failed to Connect to Database: %1", _result]; false};
diag_log "extDB3: Connected to Database";
RPT Log tells me gently to get lost:
22:48:42 "extDB3: Version: 1.031"
22:48:42 "extDB3: Error Failed to Connect to Database: [0,""Database Config Error""]"
And the extDB3 Logfiles tell me the following:
extDB3: Found extdb3-conf.ini
extDB3: Detected 20 Cores, Setting up 6 Worker Threads
extDB3: ...
extDB3: ...
extDB3: ...
extDB3: ...
extDB3: ...
extDB3: ...
[22:48:42:546584 +01:00] [Thread 2504] extDB3: Config Error: coopr_local: No such node (coopr_local.IP)
@upbeat island and wtf to your statement
Where exactly can you read Database->IP
@frigid raven extdb3-config.ini should be:
IP = 127.0.0.1```
Instead of:
```[Database]
IP = 127.0.0.1```
#info_help_tips @shy wharf
19. how-to-formatting in Discord chat https://support.discordapp.com/hc/en-us/articles/210298617-Markdown-Text-101-Chat-Formatting-Bold-Italic-Underline-
@shy wharf
what really? That's odd.. what is the Database = coopr_local field there for then ?
thats the name of your actual database
the [Database] section in the ini tells extdb3 where to look for your ip, port, u/p and the database on your sql server.
but since you have extdb3 looking for a section named coopr_local for your sql details its unhappy
ahhhh
// extDB3 Load Protocol
private _database = "coopr_local"; // This is case sensitive
this is the name for the [Database] thing
right?
I thought this [Database] config key (or whatever) is hardcoded in extDB3's source code
and not configurable
I always thought this variable is referred to the Database = coopr_local field
yea if I remember correctly the only place you define the database name is in the ini file
weird that it's called database as well
and the system command is ADD_DATABASE
I kinda assumed it's called config or something like that
yea it would be awesome if extdb3 was documented a little better
This may be helpful: https://steemit.com/arma3/@disassembler/introduction-to-the-arma-3-extdb3
ah!
cool nice thank u
thought there is no other doc
it works @shy wharf thanks a heap!
np, have fun!
impossible but thx!
anyone have a script for ingame voice that plays a radio click/static thing after you transmit?
Is there a way i can spawn this https://prnt.sc/m15rz1 and edit the text like Insert marker ? createDialog "RscDisplayChat"; maybe a code like this ?
@ember verge RscEdit
@high marsh thanks but i get an bin error when i create it
No entry "Bin\config.bin/RscEdit.idd".
because it's a control, not a display
im so dumb ๐ฆ thanks
@ember verge createDialog "RscDisplayInsertMarker";
@tough abyss that could work too ๐
What's the easiest way to square a vector?
does anyone know how to get the current target of the AI?
like which player or object the ai is aiming at right now? instead of using https://community.bistudio.com/wiki/lineIntersectsObjs and using eyepos and eyedirection
@tropic dawn I don't know the answer but in the neighbour #arma3_ai thread @tough abyss said this:
we still are not able to return what an AI unit is shooting at
๐คท
so I guess, if you are looking at any ai-related function in arma, there is 50% chance that you are going to have a bad luck
damn
@solemn aspen
Thanks.
- What is the entire code you are using?
This is the entire code:
sol1 is a CSAT guy. Player is either civilian or WEST soldier set as captive, standing 10 meters away from each other.
_unit = sol1;
_unit reveal [player, 4];
_unit doTarget player;
_unit doFire player;
-
What is the context of what you are attempting to achieve with your question?
I am attempting to make a military soldier doTarget a player. He doesn't target captives, but can target civilians, although(side player) isEqualTo civilianreturns true for a captive WEST player. -
With that said I am going to add a third question in; what game mode are you doing this in?
This is just a test scenario where there is only player andsol1, a CSAT rifleman.
Hope this helps.
So far we've solved it by a code similar to what @peak plover suggested , that is, by attaching a helipad to a player and making the AI target the helipad, but instead of a helipad I use another object which actually has a physical shape, then I hide it with hideObject. The problem with helipad is that AI looks at it once but can't track it if it moves (while attached to player), probably because the helipad has no model.
If I have [x1,y1,z1] I want to square it to be [x1^2,y1^2,z1^2]
Or just multiply in general
DotProduct multiplies but then adds each indice together
I think the easiest way to square each element of vector is _array apply {_x*_x};
AI can also target game logics, you don't necessarily need objects with a physical shape.
Are you totally sure of that? I think I've tried it with a game logic and it still didn't work properly.
Target logics for the suppressive fire module in Achilles is an example.
I do have to use a couple of lookAt, doWatch and doTarget before...
That's interesting. Probably I didn't create the logic properly. I will try it with the logic soon.
Do I create the logic like this? (from Larrow's script at arma forum):
_logicCenter = createCenter sideLogic;
_logicGroup = createGroup _logicCenter;
_myLogicObject = _logicGroup createUnit ["Logic", [0,0,0], [], 0, "NONE"];
Nope, the logic is created by Zeus. I think it's a child of Module_f though.
I think we used createUnit to spawn Module_f in earlier version and attached it to the actual target module to prevent locality issues.
As a client side mod, other clients without Achilles have no idea about the actual target module, since the config is missing.
Do you mean that you used a custom logic module added through addon? I don't get it, why would clients have this module missing if it's in the base game otherwise.
Exactly, it's a custom one.
Let me check the history. I'm pretty sure I used Module_f as a target.
Allright, thanks!
Yeah, I remembered right:
Also you might have to place the logic a bit in front of your victim such that it is visible for the gunner. Not sure if it's really needed though.
https://github.com/ArmaAchilles/Achilles/blob/78d68b0a6dc90f97ff7a9322910192eae895ae27/%40AresModAchillesExpansion/addons/modules_f_ares/cfgVehiclesModuleBase.hpp
So... it's just logic with a different description? So a simple logic will also work fine?
I dunno really the differences between logic and Module_f. I just know that Module_f worked back then.
well it looks like that Module_f inherits from Logic ๐คท
Yeah, it does
looks like you are updating every time with doTarget and use forceWeaponFire
The way we do it now it also works with doFire
Im working together with Sparker btw
No it doesn't say in the code that he is constantly making them doTarget in a loop, or am I missing it?
Apparently, we did back then. But you have to consider that we made a lot of changes. The doTarget is no longer in the loop in the latest code.
Well I still have the same problem with Logic. He looks at it once but fails to track it when it's moving around. This is probably allright for a suppressive fire module.
Yes if you update it now and then like he does.
But for close range you need many updates or it looks strange, but i think the other object we used did the trick. Or was there some problems with this sparker?
No we don't.
We try to use "FireSectorTarget" createVehicle (getpos player); as fake target.
Also if I do it with logic and doTarget the logic in each frame, the AI still fails to track it if I move
wanna see something funny? l = createGroup east createUnit ["Logic", position bob vectoradd [0,0,2], [], 0, "can_collide"]; bob dotarget l;
Creating logic in a west group changes nothing ๐ฆ
If anyone know how to make an enemy walk back while still aiming at a target I would like to know. Currently i tried playActionNow "Walkb" Ai walks back but cant track player, after animation is done he snaps back to aiming at target. :p AI doClickButton "Key_S"
how can i set a server to 24/7 day?
If it's a simple getter function, should be easy, I think
Yeah, you are right. The unit fails to follow the logic. It only works when you unset the target and give it gain, which is undesired.
Alternative question. Is it necessary for the player to be captive?
I mean the captive mode.
Yeah we are making an undercover script, so it's critical
There are alternative ways for undercover like make AI blind or change side relations or their group's side.
Both are messy ways TBH.
change side relations or their group's side
do you meanside setFriend [side2, 1];?
setCaptive is great, apart from the doTarget problem, which seems to be solved hacked around as usual ๐
Nvm, you get the same problems with all the suggestions, except the make them blind one I guess.
Well we tried target camo value, its even worse
I remember now why I do not like working with AI. It takes tons of tests and tweaks to get them do what you want them to do ๐
Yeah it's annoying that there are no proper commands for low level AI access.
At least you can get rid of the combat part when you disable auto-combat.
I guess the danger part is what makes it so impossible to force them to run to a position ๐
How so?
I meant you can address this with some disableAI options, but those arent suitable for dynamic use
Yeah, animations would probably the only way to make them run once they were engaged. Even if you disable targeting, auto-combat and whatever else, they are reluctant.
Funny thing is that AI is a bit less reluctant when each unit is in a separate group. I guess there are group related handlings that make tweaking AI behaviour even more complicated.
I have script:
life_fnc_test = {
_return = profileNamespace getVariable "contacts";
_return;
};
I run this script:
_contactsArray = [] remoteExecCall ["life_fnc_test",_player];
And it doesn't work for another player.
I'm trying to get another player's array through a remote call.
remoteExecCall doesn't return the value which was returned by the other function on the remote machine.
@astral dawn And how do I get the result back from the player.
It's not straightforward. You would have to suspend your script until the other machine remoteExec's something on your machine and sends the value to your machine.
Or you could split your original script in two parts. Call the second part from the remote machine while passing it needed values.
@astral dawn Understood. I'll try to do that.
@fleet hazel you can create "contact" variable in player Namespace and write this value from profile to player nameSpace with life_fnc_test. After them you can get it.
player nameSpace setVariable ["contact", (profileNameSpace getVariable "contact"), true];
@lost copper Thanks. I hope everything works out for me.
@lost copper the element distribution across the network isn't working?
at the very end true
as far as I know playernameSpace dont work 3d param
you can make both machines agree on the variable which will be set on the original machine by another machine. The first machine executes code on the second one and waits until the agreed variable is not nil any more.
of course then there are all kinds of problems, like what happens if the other machine disconnects at this moment, your whole scheduled script will freeze, so it's generally good to add a timeout in this case
In missionNamespace for example?
yes, I meant missionNamespace, this is where you generally store variables
Splitting code in two pieces might be easier if you need to do this exchange with many other machines at the same time, because otherwise you will have to somehow generate a new agreed variable name
@queen cargo shared a similar kind of system some time ago here:
https://gist.github.com/X39/709ecbf88c5fda594586c9b995c8c6a0
I mean, well, it all depends on what exactly you need to do and for how many other machines at the same time
Ok
@fleet hazel about restrictions of making public variable in player nameSpace. I didn't find info about that.
getting no all clutter models to show up with createSimpleObject using model path (and have to use +5/5.5 offset for height)
is createSimpleObject ignoring model center or why is the offset needed?
@tough abyss would disabling the AI's "FSM" help with that?
With making them move more rapidly from cover to cover I mean.
@fleet hazel you can setVariable with public flag on an object like player
Just got a random idea: would it be possible to script AI copilot taking the controls if the main pilot gets killed? It would make copilots not completely useless. I know player as a gunner/copilot can take the controls, but can AI use something like that?
You could potentially use a event listener for death to check the vehicle for a copilot and if there is one move them to the main seat. It would be pretty funny as the main pilot would probably drop out but potentially you could swap him too if there was a third place to go or perhaps you just remove the body completely. Should be doable.
I am wondering if there is a way to tell how well a unit is current lit up. I am looking through the scripting commands and while I see a bunch of setup of lights I don't see an obvious way to determine if a unit is hit by lights and to what extent. Right now I am thinking street lights (which I could proxy with distance to the object) but there is a wider question of just lit up or not.
ACE has that to determine the light on map screen
That it does, I'll see how they do it.
Basically find nearby lights using nearestObjects, Then find in their config what color and how bright they are and then interpolate with distance
@velvet merlin createSimpleObject work in ATL or ASL?
0,0,0 would the drop it on sea-level?
ye
what was again a way to scale models (as hack/not as gameplay objects)?
via 3d dialog is the only way, or is there another?
Getting a script not found error, but only when I pack using addon builder and not when using pbo manager
Seems like something is not configured right in addon builder...
sounds like pbo prefix
Though I'm not aware of pbo manager supporting that
I'm not aware of pbo manager supporting anything really ๐
Lol, well apparently I found a case it does!
or addon builder has a prefix defined but you actually don't want one
no
Don't know right now how many r2t's were supported. But I think atleast 2, so that should be fine
you move into the first cam?
what is the purpose of the set up?
that probably should work
do those cameras of yours work separately?
Can you see dialog over bg camera if you only have 1 camera? @hard kelp
Anyone available to lend a hand?
๐ here take this one
lol. For real though can you help?
Can you just tell us the question you got? @static ore
So I'm in the middle of following a simple guide to getting a basic exile server setup.
I need to open my config.cpp file and include a line of code.
Trouble being I can't find my config.cpp file. I'm renting a box from GtxGaming
a config.cpp is inside a mod's pbo
What Dedmen said
Okay I'll try find something like htat.
I'm lost.
I'm willing to pay anyone who can help setup and run an exile server.
Unsure if this is the right place to be posting it.
not it's not: look into #creators_recruiting or think a second time about: Am I able to host and setup and run a exile server. If you have no idea about mods or missions then how you wanna be able to host a server there you need both?
Best place to ask would be the Exile Discord.
That's the issue Katalam I want a server of my own but without the troubles of coding. I deemed paying somebody is the most reasonable outcome.
Thanks.
need help with plane event handlers so i can use it script what should happen to a plane once its landed and stops on the taxi way, like teleport it to a proper parking spot
It's better to speed <vehicle> < 0.01 instead of speed <vehicle> == 0
@nimble echo you could try LandedTouchDown and LandedStopped https://community.bistudio.com/wiki/Arma_3:_Event_Handlers
Hello guys! Can you help me? I dont get why this is not blocking the middle mouse button
["KKA3fix", format['noreloadingactiontest'], ["No reloading action test", "Prevent reloading action with transmit test"], {true},{false}, [242,[false,false,false]],false,0,true] call CBA_fnc_addKeybind;
What is the best way to convert a string into an condition that is going to be checked in a while - loop?
Like addAction does
just compile the string and call it each check and check if it evaluates true / false?
So I am trying to use currentWeapon _source isKindOf ["Handgun", configFile >> "CfgWeapons"]} in handle damage event with a if statement and it doesnt seem to work...
my source variable = private _source = _this select 3;