#arma3_scripting
1 messages ยท Page 494 of 1
@compact maple whats the difference between [] spawn {}; and 0 spawn {};
One passes an empty array as _this. The other passes a 0 as _this.
The 0 is technically more performant. But doesn't really matter
any documentation about all the quirks of the arma file system?
@tough abyss display created. I try'ed RscStructuredText - is works. Player model i used for example. I will use this for vehicles models.
i think better use pictures
@ TFAR, ACE and CBA ppl here (or other large mods)
is the .. a big concern? or barely if ever used?
never had problems with it if that's what you mean?
If you mean if that's even used. Every CBA based mods script files use it
hi guys, I'm looking for someone who could make me strong battleye filters on my life server, I can pay for that
#creators_recruiting <--
#rules post in the right forum. This is neither about recruiting people for work. Nor battleye. Nor server stuff.
And if you repost to the right channel. Make sure not to violate #rules number 9
good ty
@queen cargo you mean relative paths? It wasnโt a thing until a couple of years back afaik
Yeah, until maybe 2 years ago you couldnโt go up a dir with ..
Anyone know of a script that checks to see what tasks are available and adds respawn tickets if they are completed. I know this happens in BI MP missions, but didnt know if someone had encountered this. I've poured through BI forums and have had no luck.
probably gonna have to write it yourself
how to filter vehicles variable to get vehicles without ammoboxes, objects
_onlyActualVehicles = vehicles select { _x isKindOf "LandVehicle" || _x isKindOf "Air" || _x isKindOf "Tank" || _x isKindOf "Sea" } ...don't know if I catch all base classes or there is more elegant solution
vehicles select { _x isKindOf "Car" || _x isKindOf "Motorcycle" || _x isKindOf "Tank" || _x isKindOf "Air" || _x isKindOf "Ship" };
included parachute, ... don't know why is it under "Helicopter" class :/
Is it possible to have a compiled function with sleep in it and call it (instead of spawning) if the call origins from scheduled environment?
(In Arma 2 OA)
Why wouldnโt this be possible? It is going to be in scheduled if you call it from scheduled
It is just that anything after the call statement will have to wait until the function returns
@tender fossil yes.. you can sleep in scheduled. I don't really understand your question
My point is that is calling a precompiled function from scheduled environment still scheduled environment
call doesn't change scheduled-ness
Ok
it keeps whatever you had before
So you can call a function and sleep in it, if the call origins from scheduled environment
yes
I have some functionality not working on my server. This message is overwritten by the server.
What should I do
It is a submarine mod that I down.
Is there any way to discard mouse scroll events like it is possible with keys in "keyDown" EH?
I'm using CamCurator camera type as it has nice in built keys handling, I wanted to block camera movement caused by scrolling listbox elements but the only way that I could achieve this so far was doing "manual off camCommand MyCam; when cursor is over listbox.
This however blocks whole camera movement when cursor is over said listbox and the UX is not so nice.
BI somehow blocks scrolling camera movement in zeus when cursor is over side panels but I fear it might be baked into engine ๐
I would rather not implement whole camera movement handling by myself.
Is there an event for save game?
I think there is no event for that.
But when you're saving there is this "saving game please wait" screen. There might be a way to detect saving via hooking into this display with CBA or smth.
There is load from save event but not save? Why BI, why???
private _tempPlayer = player
ref or copy ?
ref
everything in SQF is by ref
Or better... Can you specify your question? as to which level you mean?
player returns a object ref encapsuled inside a game value. _tempPlayer copies the game_value but still has the same ref to the object
Example
private _num = 5;
private _num2 = _num;
_num2 = 6;
5 -> GameValue (unique ID 55) that contains ref to GameData(type: number, uniqueID: 1)
_num -> GameValue (unique ID 12) that contains ref to GameData(type: number, uniqueID: 1)
_num2 -> GameValue (unique ID 77) that contains ref to GameData(type: number, uniqueID: 1)
6 -> GameValue (unique ID 15) that contains ref to GameData(type: number, uniqueID: 2)
_num2 -> GameValue (unique ID 77) that contains ref to GameData(type: number, uniqueID: 2)
They all refer to the same entity. The GameValue is always created a-new and initialized with the reference. The reference is reused.
(Unique ID's are made up. They don't really exist. Just serve for illustration)
Same happens for every variable type.
Well my player dies - As he dies I want to save his loadout on the server profile. When my remote func logic is running the player is already the respawn placeholder (2035 char) and there his loadout is persisted. I can workaround that by having a respawn countdown so my old player state is still fetchable
But ye...
need to turn things around tho
soo.. nullObj problem?
nah there is a obj but it is the respawned character already which was the vanilla loadout
because my remote func is too slow
Ah. Okey.
But nvm that problem I gonna refactor that bullshit
private _tempPlayer = player is ref yes. Ref to the object that player returned at that point in time.
when player changes to return a different value. _tempPlayer doesn't
Just wanted to be sure I cannot have a copy of the player state somehow
wait
_tempPlayer wont change if player is changing? how is this a ref then?
it's a ref to the object that player returns
๐ค wtf
not to the script command player
player is just a command that returns ref to current player object.
ok i think I get ur point
If it would dynamically change when player changes. That would mean it would have to call the player command internally. everytime you retrieve the variable
jeez that means my friggin logic cant catch up the respawn at all
It's exactly the same as this
_number = 5;
_temp = _number;
_number = 6;
_temp doesn't change. It still references the 5
= copies a reference.
_temp is still a reference, to the value that _number stored at that time. But not a reference to _number itself.
Not a reference to a variable. Just a reference to a value.
Variable points to a Value. And internally inside the engine value points to the actual data.
god damn that i9 7900K Processor ๐
ok got you
you guys read about the ACRE events?
any ideas how to make a cool feature outta it ๐ค
what events? where?
Sooo.. ACRE finally got things that TFAR had for like 5 years now? ๐
I am an ACRE fan tho
@frigid raven Dedmen is TFAR developer if you did not know already ๐
I was once a ACRE fan too ๐
uh shit
rip.
no.
Oh you mean the UI interaction? yeah
Ok see? bullshit - I want to use that fucking stupid button setup as I did in my service time
๐ฎ
ok I am listening
fuck
now I want to see TFAR
Does... it have this teamspeak plugin stuff?
annnnd this babbel stuff?
bye
Discord no wanna embed ;U
arcade == bye
I dont care about mainstream
Yea the mass is casual and arcarde
pls dont talk to me
pls
I am something special - i only do fancy underground stuff
You can configure ACRE to have about the same radio simulation as TFAR. Like.. Ignore antenna orientation and these weird settings thingies
I hope nobody will play my mod - therefore it will be the most undergroundiest mod ever
Yea ok I still will checkout TFAR
just for a fair comparison
TFAR had vehicle radios also for 5 years. Which ACRE only got recently.
Does ACRE have "proper" underwater radio support?
Like.. Your radio signal doesn't travel the same through water as through air
if you are deep underwater you cannot just radio your base like you could if you were over water
there are uboats :U In vanilla. I think we even had them in alpha
gosh can I win an argument against you somehow?
Actually very easily yeah. But I don't wanna say that now
Stop bothering him :DD Dedmen can you consider taking a look at my question? ๐ช
I wonder if there might be some undocumented camcommand that disables that or smth.
https://community.bistudio.com/wiki/User_Interface_Event_Handlers#onMouseZChanged but I don't think you can use that to manipulate stuff
The Zeus zooming might very well be hardcoded into engine
They provide this awesome camera with inbuilt controls but you cant slap any usefull interface on top of this becouse of this issue.
Tried already with returning false or true, did not help.
Hi guys
I have an issue that's bugging the hell out of me I'm trying to create a mission with side chat story dialog and it works fine when in the heli but as soon as i get out it doesnt
ive tried 'Pilot sideChat "On my way";'
you mean when you execute that. While not inside the helicopter. It just doesn't show a message?
@hollow thistle nope. Not hidden cam commands
i have trigger to give message when in heli that works and when out another trigger that works (ive tested triger) but no side chat
ok, many thanks Dedmen. I will script the camera controls by myself then.
sorry guys can't remember how to show code in the balck box again?
```sqf
code
Also yeah. The cam control buttons are hardcoded in engine behind the manual check. So.. No way that I see.
its grave char not backtick.
Pilot sideChat "On my way";
i use this and it works fine
when out of heli ive tried the same and _null = [] spawn {Pilot sideChat "I've arrived"};
also tried .sqf and that didn't work either
I've also tried the chat in and out of vehicle in another/test mission and that works fine so i'm at a loss as to why it's happeneing
SP or MP?
Can you write in sideChat by yourself when outside of helicopter?
mp and i'll just check 1 sec
yes i can use side chat by my self
ive just tested it with global chat and it works
so no idea why side suddenly stops
Maybe for some reason the "Pilot" variable is no longer valid when you leave the helicopter?
ive tried using others on the ground and also the modules (all of which worked when i done a quick test/dummy mission
is there a way to put a script in to keep morter vics from shooting past 2k im tryingt o help my server out with a way to keep players from shooting over 2k
@still forum is there a way to keep vics from shooting over the 2k marker in the script or is there a way to be able to get me a script of it
@past idol yes
Fired EH
Or another EH
Just check start pos and current position distance
what im trying to do is keep all vics for everyone not to be able to shoot past the 2k range and keep all max range at 2k max
I dunno wtf is vics
the morter trucks
You have one solution. Fired EH with a distance check
is that in scripts area
Having a headache with this task system, can't get the tasks to switch state when I activate an action on a unit that calls a scripted function.
I create the tasks on the server without drama:
["beginTask", BLUFOR, ["...", ""], getMarkerPos "respawn_west", "ASSIGNED", 0, true, true, "whiteboard", false] call BIS_fnc_setTask;
[["indepTask", "beginTask"], BLUFOR, ["...", "1. Independently Screwed", "1. Independently Screwed"], position VIPIndep, "CREATED", 1, true, true, "meet", false] call BIS_fnc_setTask;
[["ruskieTask", "beginTask"], BLUFOR, ["Todo", "2. Russian Recollection", "2. Russian Recollection"], position VIPRuskie, "CREATED", 1, true, true, "meet", false] call BIS_fnc_setTask;
[["mericaTask", "beginTask"], BLUFOR, ["Todo", "3. American Freedom", "3. American Freedom"], position VIPMerica, "CREATED", 1, true, true, "meet", false] call BIS_fnc_setTask;```
The action is assigned to a unit in the editor as follows:
```sqf
this addAction ["Join Russia", { [EAST, _this#0, _this#2] remoteExec ["ZE_fnc_setSide", 2] }, nil, 1.5, true, true, "", "player distance VIPRuskie < 5", 5, false, ""];
... And the script itself performs:
publicVariable "zSideJIP";
switch(zSideJIP) do {
case independent: {
["indepTask", "SUCCEEDED", true] call BIS_fnc_taskSetState;
["ruskieTask", "CANCELED", false] call BIS_fnc_taskSetState;
["mericaTask", "CANCELED", false] call BIS_fnc_taskSetState;
};
case east: {
["indepTask", "CANCELED", false] call BIS_fnc_taskSetState;
["ruskieTask", "SUCCEEDED", true] call BIS_fnc_taskSetState;
["mericaTask", "CANCELED", false] call BIS_fnc_taskSetState;
};
case west: {
["indepTask", "CANCELED", false] call BIS_fnc_taskSetState;
["ruskieTask", "CANCELED", false] call BIS_fnc_taskSetState;
["mericaTask", "SUCCEEDED", true] call BIS_fnc_taskSetState;
};
};
["beginTask", "SUCCEEDED", true] call BIS_fnc_taskSetState;
Which does everything else that script is supposed to do, except change the states of the tasks.
I think there was a command to calculate a position based on a starting position, a distance and a direction. but i can't for the life of me remember.
or was it using sinus functions ?
too simple ๐ณ
BIS_fnc_findSafePos is not a command and it is not returning position based on distance and azimuth from original
Is there a faster method of updating a camera's orientation based on animated memory points of the gunner's turret view for purposes of streaming a real-time texture to the cockpit MFD screen than the following?
{
if (isNil "ST_cam") exitWith
{
removeMissionEventHandler ["Draw3D", _thisEventHandler];
};
_dir =
(ST_v selectionPosition "TGPPos")
vectorFromTo
(ST_v selectionPosition "TGPDir");
ST_cam setVectorDirAndUp [
_dir,
_dir vectorCrossProduct [-(_dir select 1), _dir select 0, 0]
];
}];```
This method works just fine, but there's a very slight delay which results in the cockpit screen's video not being as steady as the actual turret view.
wondered if anyone could help me out,im having trouble with people selling houses and cars but using autoclickers if someone could help me out and figure how to stop this happening would be much appreicated
you can also put stuff into the {} exitWith if you want to throw the people using autoclickers into the air or something
@mortal wigeon you mean camera shakes? If so this is a bug with the engine
@tough abyss could you check your pms bro
ive noticed with alot of servers now they are using a menu that kicks in when selling items/houses comes up in the right hand side saying please wait selling
a autoclicker cant be used with thesee
@tough abyss like i said im helping a freind untill he can find a paid scripter/coder for his server
where would i add that code say for houses
@tough abyss no worrys thanks for the help though im 50% there just need to know where to add now lol
if (typeof _vehicle == "I_APC_Wheeled_03_cannon_F") then {
_vehicle setObjectTextureGlobal [0, "A3\Armor_F_Gamma\APC_Wheeled_03\Data\apc_wheeled_03_ext_co.paa"];
_vehicle setObjectTextureGlobal [1, "A3\Armor_F_Gamma\APC_Wheeled_03\Data\apc_wheeled_03_ext2_co.paa"];
_vehicle setObjectTextureGlobal [2, "A3\Armor_F_Gamma\APC_Wheeled_03\Data\rcws30_co.paa"];
_vehicle setObjectTextureGlobal [3, "A3\Armor_F_Gamma\APC_Wheeled_03\Data\apc_wheeled_03_ext_alpha_co.paa"];
};
if (typeof _vehicle == "I_MRAP_03_F") then {
_vehicle setObjectTextureGlobal [0,'\A3\soft_f_beta\mrap_03\data\mrap_03_ext_co.paa'];
_vehicle setObjectTextureGlobal [1,'\A3\data_f\vehicles\turret_co.paa'];
};
if (typeof _vehicle == "I_MRAP_03_hmg_F") then {
_vehicle setObjectTextureGlobal [0,'\A3\soft_f_beta\mrap_03\data\mrap_03_ext_co.paa'];
_vehicle setObjectTextureGlobal [1,'\A3\data_f\vehicles\turret_co.paa'];
};
if (typeof _vehicle == "I_MRAP_03_gmg_F") then {
_vehicle setObjectTextureGlobal [0,'\A3\soft_f_beta\mrap_03\data\mrap_03_ext_co.paa'];
_vehicle setObjectTextureGlobal [1,'\A3\data_f\vehicles\turret_co.paa'];
};
};
player addEventHandler ["GetInMan", {_this call fnc_natoskin;}];```
I just made script that automatically change texture when player ride AFV-4 or Strider.
Do you have some optimization suggestion?
I couldn't think better option.
using a forEach here would be negative optimization. as you are running more code.
And it also wouldn't help readability much IMO
the last 3 can be optimized tho as they are all the same
if (typeof _vehicle in ["I_MRAP_03_F", "I_MRAP_03_hmg_F", "I_MRAP_03_gmg_F"]) then {
_vehicle setObjectTextureGlobal [0,'\A3\soft_f_beta\mrap_03\data\mrap_03_ext_co.paa'];
_vehicle setObjectTextureGlobal [1,'\A3\data_f\vehicles\turret_co.paa'];
};
And also fix the indentation for better readability
wow much better!
Also you are mixing " and ' which seems weird. Better stay with one style throughout the file
thanks for suggestions!
Anyone knows why the killed eventhandler return the same player that is being killed in unit and in killer paramยฟ?
MP
if you kill yourself. That's what happens
can you send the part of the code ?
mm yes
& how do you know it return the same player ?
player addEventHandler["Killed", {hint str _this}];
weird
just for testing purposes
whats hinting exactly
I have my killed function but as its not getting correct parameters its not working correctly
pistol bullet
it returns [player1, player1, <null-object>, true]
Im player1 and my friend is player2
unit: Object - Object the event handler is assigned to
killer: Object - Object that killed the unit. Contains the unit itself in case of collisions
instigator: Object - Person who pulled the trigger
useEffects: Boolean - same as useEffects in setDamage alt syntax
its not returning twice the same
I know that
its returning null-object
hm
killer: Object - Object that killed the unit. Contains the unit itself in case of collisions
Also instigator is null pointing to that you offed yourself
Collisons with bullets ยฟ?
With whatever, you didnโt provide enough information to answer that
I said: player addEventHandler["Killed", {hint str _this}]; On a vanilla mission does say thet the killer is the same as the person being killed. O a vanilla mission, and my friend is killing me with a piston. Server is dedicated
What els you need?
this is bloody good stuff:
#define TEST2( A , B , C ) A-B-C
TEST(1, "a,b)", 3)
TEST2(1, ([123,456]), 4)
TEST(([123,456]), "abc", F)
TEST([123,456], "abc", F)
TEST2(1, 2, 3, 4)```
gets to ```
1- "ab)"- 3
1- ([123456])- 4
([123456])- "abc"- F
)```
shit gets just more funny if one goes further
@scarlet spoke you got this covered in your tool?
lol
i broke the preprocessor
The error-handling of the preprocessor is pretty stupid to not existant. And no I haven't implemented error-handling in my preprocessor just yet (because of exactly this BS that I'd have to reproduce) ๐
PreProcessor is even more broken then i was ever expecting
how the fuck am i supposed to implement that ammount of bugs into sqf-vm !?
especially if THIS: TEST("a,b,c","a,b,c","a,b,c","a,b,c") breaks the whole macro
forever
Have you compared it with c preprocessor?
https://pastebin.com/8XRcLPef @tough abyss
it is not like i would consider that as a perfect result ... but literally everything is better then what arma is doing ๐คฆ
for some reason, they do count braces btw. and handle strings
but neither is done correctly
Xmacro works though, which is really surprising
aaaanyways ... all cases need to be catched with sqfvm so user will be warned ...
What cases
all cases that may come up in the preprocessor @tough abyss so that sqf-vm can emulate armas SQF proper
down to the very last bit
though ... i just throw errors when the user attempts such things ๐
Make sure you crash sqfvm on missing include as well, for authenticity
hah
what jokes you make
i will set your computer on fire instead
though ... i think about enhancing the output further by adding to each macro output a fancy line, file and col info ๐ค
nah ... not now
hello, could someone help me with a createCtrl of a controlGroup ?
I dont get how this work.
Are the position of the controls within controlGroup relative to the controlGroup's position?
Yes
I did
private _posX = 0.01 * safezoneW + safezoneX;
private _posY = 0.925 * safezoneH + safezoneY;
private _bgLength = 0.259;
_ctrlGroup = _display ctrlCreate ["RscControlsGroup_MarkersOnOff", 785000];
_ctrlGroup ctrlSetPosition [
_posX,
_posY,
_bgLength * safezoneW,
0.06 * safezoneH
];
_ctrlGroup ctrlCommit 0;
then
_img = _display ctrlCreate ["RscPictureKeepAspect", MarkersOnOff_idc, (findDisplay 12 displayCtrl 785000)];
_img ctrlSetText _icon;
_img ctrlSetPosition [
_posX,
0.92 * safezoneH + safezoneY,
_w,
_h
];
_img ctrlCommit 0;
but I dont see anything's coming. It only work if I put a lot of _btn, then I can see the 11 last created approx
god this is tilting me lmao
If I create the button without controlGroup, everything is at his place
@Jester you mean camera shakes? If so this is a bug with the engine
Not the turret view camera shake, but the R2T stream from a camera that is slaved to the turret's memory points. That shakes a lot more than the actual turret view does when the aircraft moves.
@tough abyss
Yes the r2t shake, it is a ๐
my pc's going outta the window
Create control at 0,0 Inside ctrlGroup @compact maple
Yes the r2t shake, it is a ๐
yeah, are there any plans to fix that
do we know?
@tough abyss uuuh ! Im going to try this, thank you so much
Afaik it was already attempted to no avail, so unless by some luck someone stumbles upon a solution I highly doubt it
@tough abyss thank you ! its perfect ๐
@still forum How is that possible that // character set (link for example) might fuck-up the whole environment without any exception if processed from a file? Just encountered that with that line in code:
private _link = _ctrl getVariable ['NFLink','https://yourweb.com'];
Since when / are escapes? Not \? Arma please?
Just to add, when I've manually preprocessed it to get the file text, I got some newline around that line.
Or did it try to count it as a fucking commented line? Why some strange newline then?
0 spawn {
disableSerialization;
private _link = findDisplay 46 createDisplay "RscDisplayEmpty" ctrlCreate ["RscHTML", -1];
_link ctrlSetBackgroundColor [0, 0, 0, 0.75];
_link ctrlSetPosition [safeZoneX, safeZoneY, safeZoneW, safeZoneH];
_link ctrlCommit 0;
_link htmlLoad "http://www.bistudio.com/newsfeed/arma3_news.php?build=main&language=English";
};
```get text from that control ^ and `hint` it ๐
afaik you can use anything there, even emojis (in strings)
@meager heart You can't ctrlText from HTML controls. It returns ""
Hi Lads, I am looking for a safe zone script which prevents enemy ai from entering?can you share a link plz ๐
You can place a trigger at that zone and whatever enters just teleport it to some other place. Or kill it.
Otherwise you'll need to update your waypoint planning procedure to take care about it
do u have any links for this trigger ?
like the idea on maybe destroying them
I also using this
0 = [] spawn {
while{true} do {
_justPlayers = (allPlayers - entities "HeadlessClient_F") select {alive _x};
{
if(_x distance (getMarkerPos "zone") < 350) then {_x allowDamage false} else {_x allowDamage true};
true
} forEach allUnits + vehicles;
sleep 1;
};
};
It's pretty easy, do you know how to use triggers in general? Setup the condition for side you want out of zone and I will give you a activation code when I get on PC
Hint, use thisList, iterate over and setDamage to 1
ta I will give it a go ๐
Have you tried using double quotes" @unborn ether
@tough abyss Nope, will try later.
Could really use some help with:
https://discordapp.com/channels/105462288051380224/105462984087728128/504459578130300939
Still utterly stumped as to why BIS_fnc_taskSetState isn't changing the state of my tasks with the way i've executed it.
I have the mission on github with relevant files at:
https://github.com/MIKUiqnw0/Quarantine-Yellow-Jack/blob/master/init/fn_initServer.sqf
https://github.com/MIKUiqnw0/Quarantine-Yellow-Jack/blob/master/server/fn_setSide.sqf
... In case I missed something stupid.
Is there a way to detect if an object is on the ground or under the sea?
@quasi rover if (isTouchingGround _unit || underwater _unit) then { doTheStuffs };
Oh.. Thanks @violet gull, if an object is located on the roof or 3rd floor of house, is it also True value of isTouchingGround ?
Yes
Thanks phronk, ๐
isTouchingGround is not reliable. For test, I put an ammo box on the ground but isTouchingGround player is true value , but the value of ammo box is false.
fnc_vehiclecheck = {
_currentskin = getObjectTextures vehicle player;
if (player isEqualTo driver vehicle player) then {
if (toggleskin isEqualTo 0) then {_this call fnc_skinchange;}; //fnc_skinchange makes 'toggleskin' to 1 when it finished.
if (toggleskin isEqualTo 1) then {_this call fnc_skinchangeback;}; //fnc_skinchange makes 'toggleskin' to 0 when it finished.
};
if !(player isEqualTo driver vehicle player) then {
hint "Only supports \nAFV-4 Gorgon \nAll variants of Strider \nTo change skin, you must be on driver seat.";
sleep 3;
hint "";
};
};```
I thought It is fine but when I run it, it excute both fnc_skinchange and fnc_skinchangeback at same time.
Why wouldnโt it? You check if skin was changed right after you changed it, obviously it will be true and it will change back
Logically that's what your code is doing isn't it? It evaluates the first if as true because you've defaulted toggleskin to 0, but once that's completed it sets it to 1. Then the next step is to check for toggleskin =1, which it is as a result of the previous step.
I think an else would resolve that rather than an additional if but I'm a nub so I'm probably wrong.
thank for explaining! ๐คฆ
fnc_vehiclecheck = {
_currentskin = getObjectTextures vehicle player;
if (player isEqualTo driver vehicle player) then {
if (toggleskin isEqualTo 0) exitwith {_this call fnc_skinchange;};
if (toggleskin isEqualTo 1) exitwith {_this call fnc_skinchangeback;};
};
if !(player isEqualTo driver vehicle player) then {
hint "Only supports \nAFV-4 Gorgon \nAll variants of Strider \nTo change skin, you must be on driver seat.";
sleep 3;
hint "";
};
};```
I used exitwith and it actually works!
Nice!
I was fool.. didn't think about flow...
@unborn ether what do you mean by "whole environment". I never heard of that issue
@quasi rover you could use getPos and check it's height value. Is it enough for you to check that an object is less than a meter above ground? then that would work
can someone please trell me where i can get / download a invade and annex script please
Guys is it possible to simulate an unconsious player in a heli?
Because when a player is unconsious the heli will still hover/not instantly crash into the ground
@covert willow https://community.bistudio.com/wiki/disableUserInput
that's probably a bad idea
And wouldn't change it. there's this magical thing in arma where if someone dies then throttle goes to -9001, whereas if you're not doing anything it'll just keep throttle on normal
@covert willow setUnconscious and disable heli engine with engineOn?
Probably your best bet would be replacing the player by something like a dead AI unit and using switchCamera or whatever the commands are called
Nah what i mean is that when a player dies, the player will die but the heli will act as if the player is only unconsious allowing a copilot, passengers to either take control or bail out without being in a 90 degree incline
setUnconscious, the heli carries on flying but you cannot control it
but the player died, so you're suggesting to revive him? If i do that the copilot won't be able to switch places with him (IIRC)
No, delay killing him
SetUnconcious for 10 seconds if no one takes over kill him anyway
Anyone happen to have a premade allMissionObjects filter that would give me all objects that arent engine bullshit? It's for object placement mod and pretty much wanna get rid of the ambient stuff, modules, players, etc etc etc
in a MP environment which would be less taxing, a trigger in an area to detect a player or a loop with a delay of like 10~15 seconds each time to detect a player entering. I don't need anything instant but in a more reasonable time
I was just unsure if a trigger was basically like a continuous instant loop checking for the conditions, if so then I would rather do a scripted loop
Triggers check every 0.5 seconds. If you want less often than that, use a scripted loop with inAreaArray
Well, triggers are engine based. I don't think it's any more performant in the longrun
so I don't want it to check that often, I could make something that just checks an area once every 15-20 seconds at the fastest and be good enough for me
thanks
To anyone interested about my last question, I was able to partially resolve my problem with "camcurator" camera type by disabling camera movement at the moment that user is scrolling.
https://github.com/KillahPotatoes/KP-Liberation/commit/22007221a0c05f202f1ddc0982bacd99c4898a07
Only issue is the small jitter that happens when user moves camera with keys and scrolls over listbox at the same time. It is still a lot better than disabling whole camera movement when cursor is just hovering over listbox.
https://www.youtube.com/watch?v=pe0NriWDTBE
Hello so i heared something about the Heartbeat function from the anti cheat infiSTAR i would like to ask for some help
@ember verge ask in Infistar discord https://discord.gg/37YMCsu
ยฏ_(ใ)_/ยฏ
Well if they don't know their own stuff. Why should we? ๐
i mean they know it but they dont tell it ๐
Similar to the forums, is there a channel here to seek full scripting help, like paid? I'm much more of an artist, and not even my config use is very good.
paid recruiting -> #creators_recruiting
thanks! I just have everything so compacted... I'll keep look for specifically that
Go with trigger @torn juniper you can make it local and attachvehicle player so it only monitors local player, if you donโt want 0.5 sec you can add timeout and make it check every 5 min if you want. Triggers are versatile
That isn't how the timeout attribute for triggers works. At all Timeout - The trigger's conditions must be satisfied for the specified duration for the trigger to be activated.
My brain doessn't fucking work today. How do I into making a script that allows me to select the next/previous element in a treeview ctrl, fully recursive
That isn't how the timeout attribute for triggers works Eh? I never said anything about how it works ๐ค All I said you could use it to make check less often. It is not straight forward but there are a few ways how to implement it. But Checking for attached player is cheap, no reason to slow it down
So just a quick one... I need to give some text some colour and an image in a scroll wheel action, but, it is part of a setTriggerStatements script >.< So too many quote marks to work i'm sure...
_trigger setTriggerStatements
[
"this",
"thisTrigger setVariable ['_actionVar', (objectParent player) addAction ['Name of action', 'file.sqf',objectParent player,1.5,false,true,'','Arguments']];",
"(objectParent player) removeAction (thisTrigger getVariable ['_actionVar', -1]);"
];
Basically structured text in the scroll wheel for the above action ๐
Based on the second arma example here: https://community.bistudio.com/wiki/String#Description , You can have doublequoted strings inside doublequoted strings by, confusingly enough, doubling the doublequotes. So from my understanding, this should work:
"<blah> setVariable [<blah>, <blah> addAction ["" Words <img image='image.paa'> More words <t color='#ff0000'>Red words</t> "", <other args...> ]];"
If not that, then you can try using format to build the string piece by piece:
"$1 $2 $3",
[
"thisTrigger setVariable ['_actionVar', (objectParent player) addAction [",
'Words <img image='image.paa'> More words <t color='#ff0000'>Red words</t>',
'"file.sqf',objectParent player,1.5,false,true,'','Arguments']];"
]
];```
I will have to test this, thank you.
No problem! Let me know how testing goes, I'm still fairly new to this stuff too and only hoping I have the right understanding here.
how to make AI get exact position ignoring all collision? like i did
doMove (getMarkerPos "pos");
but around this mark locate a truck, and AI keeping it distance. i need what it get to very close to truck
sorry if it wrong channel
Will arrays passed through call/spawn params always be a copy or will they be references? Can't remember... ๐ค
references.
thanks
arrays are always references in that context
Everything is passed by reference. Always
Just some commands create a copy and return that to you
Don't think there is a good list of commands that copy arrays?
Thanks god for that
and if you want to have a copy then you can use this https://community.bistudio.com/wiki/Array#Copying
I just couldn't remember whether references survived between function calls but thanks anyway ๐
why should they not @halcyon crypt ?
nope
only C/C++ would do so
and even them, only when you do not use arrays ๐คท
java and co. all arrays are implemented via reference
well I guess that makes sense since an array is basically a pointer on the lowest level
Hello!
is there a way to replace inventory opened actionยฟ?
I have an override in the eventhandler and I would like to replace default one when not able to open the inventory as the animation is playing until playyer moves
With Arma 3 Communication Menu, can I put submenu inside of submenu?
Heyo, is the "netId" from a object which placed in the editor the same on the server and is it the same after a server restart ?
Maybe someone knows it, ty.
No array is not a pointer
A pointer to array element is a pointer
netID is not guaranteed to be the same after server restart, it is created from id of the PC on which it is created and global object id. It doesnโt change after creation even if locality of the object changes
ty for the info
{
class myArtillery
{
text = "Artillery Strike"; // Text displayed in the menu and in a notification
submenu = ""; // Submenu opened upon activation (expression is ignored when submenu is not empty.)
expression = "player setVariable ['BIS_SUPP_request', ['Artillery', _pos]];"; // Code executed upon activation
icon = "\a3\Ui_f\data\GUI\Cfg\CommunicationMenu\artillery_ca.paa"; // Icon displayed permanently next to the command menu
cursor = "\a3\Ui_f\data\IGUI\Cfg\Cursors\iconCursorSupport_ca.paa"; // Custom cursor displayed when the item is selected
enable = "1"; // Simple expression condition for enabling the item
removeAfterExpressionCall = 1; // 1 to remove the item after calling
};
};```
How can I use 'enable' option? I just treated it like condition in trigger but it didn't work.
you mean how add it ? ๐ค
afaik that enable expression could be: bool 1 or 0 for yes or no, or argument string like "CursorOnGround/CursorOnEmptyVehicle"...
Anycoders/scripters looking to help out a community give e a pm please...
How would one stream audio from a website in sqf? for example, an external mp3 on youtube or live radio?
you don't
Simple.
you can write yourself a extension and make that do it
but that's not #arma3_scripting
You need client extension if you want to stream internet radio like on this video by KK https://youtu.be/IvmUmISRrPE
Quick question, will getting an HWID with extension break EULA or something and will battleye ever accept such extension? Just willing to make a tool to ban people from server by HWID, which is pretty common action to other games. Thanks.
no it won't break eula. Dunno if they would accept it but I don't see why not
So you will tell people you have to run my client extension so I can perm ban you by HWID?
And the only time you will know they are banned if they run your extension again?
If other games are using HWID check then it is probably built in the game and not a mod, no?
I can force them to use such extension with just calling it. If nothing is there, sorry. Also you can provide it with your mod by default. Was just curious about that.
Its not like much of script kiddos around, but would be a nice addition to SteamID bans.
Uhm... That will not hinder anybody dude
Just replacing your DLL with some other will be enough to get that "fixed"
you'd need to get that other one BE whitelisted tho
Anyone know if Ia without simulation and with a BIS_fnc_ambientAnim consume resources like a normal ia?
@queen cargo Yep, whitelisting some DLL to replace the previous one.
Or use a already whitelisted DLL like the TFAR one that just pipes messages outside of Arma into completely battleye unprotected area and pipe the answer back
ยฏ_(ใ)_/ยฏ
Never actually thought of that. But you can indeed use the TFAR dll to proxy any other extension. And it's battleye whitelisted
script kiddos ๐
pff ...
In b4 TFAR blacklisted due to nasty mods.
I feel like people actually cheating in ArmA are quite rare these days. Maybe i'm just not hanging out with enough kiddos on life servers tho.
it is more the bugged life missions rather then actual cheaters
missions? there is multiple now? ARE THEY GROWING IN NUMBERS? ๐ฑ
I'm cheating in practically every mission.. But being a dev and serveradmin.. people consider it normal.
@waxen tide tbh ... i would hope so
maybe at some point somebody could then create one that actually works without restarts ๐คฆ
hopefully at some point humanity reaches a more enlightend state of existance and we'll have the life people savely tugged away in re-education camps.
Or be permanently plugged into VR.
@queen cargo how much of the restarts is the mission scripts faults and how much is the arma engine's fault?
pretty much all of em
longest mission i had be running was 40 days
Now look at life servers restarting every 4 hours
i never quite got the restart part. i mean the mission is persistent. what does the restart actually do, if everything is saved anyways
the problem is not the actual restart
the problem is that it is needed at all for performance reasons
memory leaks and stuff. If you always pushBack and never deleteAt
thought about writing a life mission for once just to get that problem out of the way forever
and constantly spawn while true loops
@queen cargo well ofc
and releasing it with GPL license
would have been funny to sue those big life servers for their money :3
nah. Memory leaks are never easy
You can write tons of tooling to make it easier tho.
But you have to go to Intercept levels to really make something useful
A level most life servers can't mentally cope with
@queen cargo Just make a Life based game and cash in on that instead.
pff ... fairly impossible
would require literally arma just different
Didn't stop DayZ.
๐ค
wonders how to avoid memory leaks
Most of servers fall to 4 hours restarts not because lots of spawns with whiles (mainly) but JIP-related trash.
same game @unborn ether
You can kill vanilla mission server with just going around and destroying building one-by-one it will probably will go sloppy soon enough.
i call bullshit on that one
Well go try setting damage to every building in some Altis city for example.
should i do it on my personal server? running low-end hw where i had my insurgency mission running for 40 days with no performance loss in that time?
๐ wasn't talking about "good hardware" but how bad this gonna be for server uptime along with some other actions obviously happening in-game.
Lets count every random bush being run over.
the engine is fine
so perfectly fine actually as it never has been before
if your mission is shit, fix it
Well.. Just a couple months ago the engine was broke AF
Just killing AI's made the client go to shit
Oh yeah, fix me some JIP data from aircraft explosive that was set off in the middle of city, +-50 meters range damage values changes to everything on the way.
see no evil phrase is just another definition of -nologs
Hah! Larrow is backwards for Worral, and his name is Bruce ๐
So does adding datalink to every player, vech and AI on a map decrease performance? or is the jury still out on that? we run one of the most AI heavy servers in A3 and its important to know if this is dragging down performance in long games.
@tough abyss createVehicle and deleteVehicle cause a lot of issues, with my KoTH server, despite getting to 80/80 most of the time, it only requires a restart every 24 hours. Other mods which use those cmds for loot etc need rebooting after 4 hours. When using deleteVehicle, a shadow copy of the vehicle is found at 0,0,0
@earnest ore By using -noLogs it actually saves some server cpu cycles from not having to log all that ๐
@glass zinc haven't heard of anything like that so far. But it should be easy enough to test, I would suppose.
create some vehicles, then delete them, then run deleteVehicle at 0,0,0 using nearObjects with a counter
I run some code that does this every 5 minutes and on a full server it averages around 150 items deleted from there each time it's ran, which would tie in with the amount of LootWeaponHolder and groundWeaponHolder's that are deleted in that period
Even with a cleanup like that, servers that use cv/dv for high amounts of spawning such as loot, will need restarting regularly because the JIPqueue still gets flooded with the messages from creation/deletion, but removing the ghosts at 0,0,0 certainly improves performance during a session
Correct, it only seems to effect game modes that use loot systems such as Wasteland etc due to the high usage, but it's still worthwhile running some cleanup code at 0,0,0, as it won't be using heavy lifting to delete a few items
isn't it HQ that spawns at 0,0,0?
no, basically each side gets an HQ object
that's used for the datalink stuff
don't know/remember that much. But iirc it's automatically created when units are spawned (maybe just from editor?)
and if you place some units down, start the mission as zeus and add all units to the curator object list, you'll see some HQ entities at 0,0,0
one per side
Does anyone have a method spawn virtual garage on a particular vehicle?
For example, I would like to create a function which would allow for customization of an already existing vehicle
@random estuary Sounds like that's the same "object not found" bug as with deleting backpacks. Might be worth getting BI to push that, that might be one of the major last "egredation over time" things we have.
Yes ^^ backpacks are often found at 0,0,0
BI said they fixed the "lags caused by that" I guess they just commented out the logging code ๐
@still forum does pushBack itself really create mem leaks (even if the array goes out of scope/ clean up)?
Or is that more a about arrays getting bigger and bigger over time?
no
but it makes an array bigger
and people do that for hours. Creating hundreds of variables and arrays with thousands of elements, and then wonder about memory usage and call memory leaks on the Arma engine. Even though it's their fault
alright, thought you are referring to bugs or something
what you say is true ofc.. just bad script design so to speak
Tons of things in the engine are refcounted. If you have a reference somewhere, it won't be deleted
in that case its the users/script creators fault
creating ghosts at [0,0,0] however isn't
Now I'm using exitWith to reduce if condition check. Is it fine?
use findIf
I don't know what you are referring to. But I'd say yes. Exiting early is always better than not exiting early
Then I'm doing fine now.
We can't tell without seeing your script. You might be doing total crap now ๐
๐
deleteVehicle at 0,0,0 using nearObjects with a counter what would that script look like... im not a scripter
want to run that on my live server thru dev console right now
if i can
[0,0,0] nearObjects 50
[B Base:1 REMOTE,O Base:1 REMOTE,R Base:1 REMOTE,L Alpha 1-1:1 REMOTE,296c44cb580# 1377056: helper.p3d]
is what i get back local
[B Base:1,L Modules:1,O Base:1,R Base:1] is what i get back server
i may have to learn how to get the HC info though... as most of my AI are on the HC
anyone know what that means?
Hi im searching for a good anti cheat not infiSTAR cause that doesnt stop some of the cheats
dude my server is getting blowed up bypassing Battleye isnt that big a deal
my server gets blowed up all 2 3 weeks
Using filters? ๐ค
we have filters
we have pretty good filters somebody with an pbo cant join the server or with an hider
@ember verge infiSTAR will stop most, but not all. It is the best aftermarket anithack there is. Use it.
All antihacks will let through cheaters, you can't expect it to be 100% effective. That statistic would be silly. Considering the best Antivirus in the world doesn't stop all virus attacks.
We have infiSTAR too :/ i heard it has a heartbeat function is there a way to configure it ?
I can tell you that i know infiSTAR is updating his anit hack for the A3 version. Are you running the latest version of it?
yes we do
Well then I would suggest a trip into his discord and ask the staff about the problems you are having... they are very friendly and will be able to help.
allright thank you
No problem, you can say i advised you to visit, they may help you out more ๐
oki doki
Can also try altis life discord ๐ค
^ That won't help. Those people are mean to people asking questions and they can't help with anti-hack issues.
Where have you got that info from? ๐ค
A3 heartbeat function is currently in the works, just respond to ur ticket with the details an i'll look into it.
Oh and if you are running altis life, rest in peace terrible framework it's built for script kiddies.
@cold pebble there is a Life discord? Can you send that to dwarden to get it into #channel_invites_list ?
Will be easier to redirect people there rather than forum
from script kiddies for script kiddies ๐
Thanks. Forwarded it to master Dwarden

@still forum
https://discord.gg/ThyNaB
forward this one 2 please
I can never understand what this UNIT person says
Is there a command to end a mission without going via end screen? Like a hard end? I'm working on a custom outro, and I would prefer if it didn't do the mission end screen after the credits.
Why? @glass zinc I dunno what that is
Are local variables removed or set to nil if script finished?
When they go out of scope. They go out of scope and are gone
So, they don't stay on memory when they go out of scope, right?
not necessarily
they get deleted when no one has a reference to them anymore
So if someone is still using that variable. It won't delete it
Don't worry about it
@still forum its the CTI community discord
but global variables stay forever, don't they?
Then I shouldn't worry too much! Thanks! ๐
test = 0;
{_x = nil} forEach [test];
test; //still retuns 0
What is wrong?
your forEach doesn't make sense
you are setting the _x variable
Not anything in the array
apply?
show us the real code that you are trying to ask a question about and not this pile of useless nonsense
I just want to nil multiple variables
You are overcomplicating it too much
Just set your variables to nil and forget about the forEach
what if I had about 50 variables?
you can use setVariable in a loop
but if you have 50 variables that you need to nil, you might wanna think about your logic again
maybe you should just have one variable as an array
one variable as an array?
blah setVariable ["var",[0,1,2,3],true];
Ok, so I am a little curious as to why something is happening here:
i have two scripts in init that have suspension, and only the first one in init gets going. The other one decides it just isn't going to run the loop at all
why is this happening?
how do you call the two scripts
call mdm_fnc_zoneRestriction;
call mdm_fnc_revealPlayers;
initServer.sqf
I tried waiting until the first script was running and then call t he other one. No dice.
while{true} do
{
{
if !(_x inArea "zone") then
{
[
format["%1 You have left the play area!",name _x]
] remoteExec["hint",_x];
sleep 5;
if !(_x inArea "zone") then
{
1 remoteExec["setDamage",_x];
};
};
} forEach allPlayers;
sleep 3;
};
It's nasty, but that's whats in zoneRestriction.
private _interval = "mdm_revealInterval" call BIS_fnc_getParamValue;
while{true} do
{
["Revealing Random player!"] remoteExec["systemChat",0];
[selectRandom allPlayers] call mdm_fnc_reveal;
sleep _interval;
};
revealPlayers
Well...
Read what I said.
Don't really like repeating myself if I already gave you the answer 5 minutes ago
No need, I just don't understand. As the second script never runs, even after completing first.
"Well the second won't start till the first is done"
What is so hard to understand on that statement
the first is never done because it's a while true
it will never end
Alright.
you know how call works right?
In relation to how spawn works?
Yep.
So your problem is solved now?
Yep.
it would seem I didn't make the changes t hat I did locally,
and I did change it to
0 spawn mdm_fnc_zoneRestriction;
0 spawn mdm_fnc_revealPlayers;
Yesterday, woops.
Man, I wish we had the bells and whistles of step through debugging.
?
Anyone know if Ia without simulation and with a BIS_fnc_ambientAnim consume resources like a normal ia?
@earnest ore we do
no
Well. Yes.
But you can't really do it better. Currently only about 2 people have access to this
https://www.youtube.com/watch?v=pd-2WQzoG48
The backend works fine. There is no frontend currently. I asked Skace Kamen (the guy that made the VSCode Linter) to help with making a VSCode debugger. But he doesn't have enough time. And I don't know how to JS VSCode extensions stuff
Hell, that'd be sweet - but this works just as well.
Anything to get me to stop asking stupid questions on this channel and spend less on coffee.
... Who am I kidding.
uhm ... the "frontend" of arma.studio still works theoretically @still forum
just that it is not compatible with the current debugger ๐คท
and soonโข i will add sqf-vm to it
Does BIS_fnc_initVehicle has problem?
I tested it with AFV-4 Gorgon and it worked perfectly. So I just tested it with IFV-6c Panther, IFV-6a Cheetah, CRV-6e Bobcat, etc. But it doesn't work well.
Ex) With AFV-4 Gorgon, executing
[vehicle player,nil,["showCamonetHull",1],nil] call BIS_fnc_initVehicle;
and
[vehicle player,nil,["showSLATHull",1],nil] call BIS_fnc_initVehicle;
makes AFV-4 with camouflage net and slat armor at same time.
But with IFV-6a Cheetah, executing
[vehicle player,nil,["showCamonetHull",1],nil] call BIS_fnc_initVehicle;
makes IFV-6a with hull camouflage net. But if I excute
[vehicle player,nil,["showCamonetTurret",1],nil] call BIS_fnc_initVehicle;
then hull camoflage net is disabled and only turret camouflage net applied for IFV-6a.
IFV-6c, CRV-6e Bobcat, M2 Slammer (UP) are also have same problem.
I cannot apply two option separately.
It accepts an array of animations in the pattern of ["animation", int, ...], try stringing them together.
@earnest ore Thanks for advice. But I'm still confusing because it works with AFV-4!
//Tanoa Map
_locations = nearestLocations [(getmarkerpos "center"),["NameCityCapital","NameCity","NameVillage","NameLocal"], _mapsize*1.4];
...
profileNamespace setVariable ["SAVE_TOTAL_LOCATION", _locations];
saveProfileNamespace;
The return value of locations does not have setVariable and getVariable?
The getValue get like this after restart arma3: [No location,No location,No location,....,No location] .
You cannot save control or object in profileNamespace and expect it exist after mission restart. Same goes for location it seems
how to?
is there an easy way to shorten an array to a fixed number of elements?
resize @waxen tide
thx
trying to use the unitCapture and unitPlay scripts on a turret object. It doesn't seem to pick rotational movement (up down left right) and only picks up _movementdata and _firingdata any way to get it to pick up rotational movement?
i currently have it set to vehicle class casue i couldnt find any turret reference
https://i.imgur.com/mCnQShW.jpg
Must be like my 50th attempt to solve this, works without bugs but still incredibly slow.
trying to find points to place roadblocks at in a radius
without seeing the code we can't really help
it's not like i haven't asked here like 3 times showing all the code ๐
https://i.imgur.com/5lq7g8D.jpg meh, could be worse
nah way better
any point of the map, if you drive to the objective, you will encounter a roadblock.
i do pathfinding from a circle around the AO to the center
then de-duplicate
there is occasionally 2 roadblocks on an intersection still
i would know how to get rid of those, but the scripts are way too intense already
3:52:26 Overflow what the heck is that, first time I see that on .rpt
is there a simple way to add all objects in a mission to the list of editable objects for zeus ?
i've looked for "allobjects" ... my biwiki fu is weak today
thx
either allmissionobjects doesn't include waypoints, or it's a timing issue? editor-placed waypoint doesn't show up.
so is there a way to get the entire contents of a container including the contents of containers within it? ex: a supply box that has a backpack that is full of items?
you can start with this > https://community.bistudio.com/wiki/everyContainer ๐
also depends on how far you wanna go... maybe you can check this commands too >
https://community.bistudio.com/wiki/weaponCargo
https://community.bistudio.com/wiki/magazineCargo
https://community.bistudio.com/wiki/itemCargo
Executing [vehicle player] call BIS_fnc_getVehicleCustomization; on Pactific and CTRG Prowler gives me error. What should I do? Even executing on debug console gives me error. Message says 'Error Zero Divisor' on line 32 of fn_getVehicleCustomization.sqf in A3\function_f_mark\Vehicles.
what you're trying to get there ? @manic bane
Can i use knowsAbout as a variable? I want to decrease it, so reveal won't do
you can try forgetTarget and after that reveal with "desired value" ๐ค
Hey guys is it possible to find a Lingor (Exile) map with all the basic stuff installed trader, spwan zones just a question?
@meager heart It gives me array that contains vehicle customization data. And I use it for change vehicle customization with BIS_fnc_initVehicle.
so you need textures ?
nope I need it for component like slat armor
[["Indep_01",1],["showBags",0,"showBags2",0,"showCamonetHull",0,"showCamonetTurret",0,"showTools",0,"showSLATHull",0,"showSLATTurret",0]] This is result from Mora.
animation sources...
And some how it gives error with Pactific NATO and CTRG Prowler.
//--- Animation sources
copyToClipboard str ("true" configClasses (configFile >> "CfgVehicles" >> typeOf cursorObject >> "AnimationSources") apply {configName _x});
//--- Animation names
copyToClipboard str (animationNames cursorObject);
//--- Materials
copyToClipboard str (getObjectMaterials cursorObject);
//--- Textures
copyToClipboard str (getObjectTextures cursorObject);
```place your vehicle in editor and paste one of this into debug console ^
and for the animations you can just use `animateSource` or `animate` without BIS_fnc_initVehicle @manic bane
wow I didn't know about any alternative ways. Thank you very much!
@fringe yoke you are probably using some BIS module or something, this is just vehicleVarName you see set by some BIS functionality
So I'm thinking something like
soldier1knowledge = soldier1 knowsAbout player; soldier1 forgetTarget player; soldier1 reveal [player, soldier1knowledge - 1.5]
Not sure how to format equations
You never check what was the previous knowledge but subtract a very specific amount. While syntactically it could be correct, logically it is elusive
0 max (knowledge - 1.5)
PS: private _soldierKnowledge = (โฆ)
@fringe yoke because that's the name of these units.
So i gotta problem there is a bug in my altis life 5.0 server they open shop with the escape button at the same time then they set the clothes on them and after that they disconnect from the server after doing that they join back in and they have the clothes and armor for free
how can i fix this ?
Altis life specific question -> Altis life specific place https://discordapp.com/invite/ajGUDSH
Life is pain (tm)
can i use addVehicle with multiple vehicles for one group?
nevermind says that on the wiki
why doesn't biki show the code of BIS_fnc's right away ?
Because its easy enough to see them in-game?
Plus they've got their own section on the wiki?
i can search biki with search function. ingame viewer is way too clunky.
ยฏ_(ใ)_/ยฏ
in my experience i first look for a BIS_fnc, then read wiki article, then look at the code. half of the time end up not using it after looking at the code.
don't they like automatically fetch the commentary header of each fnc and copy them into wiki?
i would just extend it to the code aswell. maybe in an auto-hidden spoiler you can click on to see it. that would be nice.
Am i being weird?
Go to wikipedia and look at the page for Microsoft Office. Do you get source code?
Also it violates the EULA to share game-files publicly
well i think that comparison is a bit of a stretch
Quite often asked for BI to push all the BIS functions to their github. Would make it easy to look at them. And easy to fix the stupid bullsh*t in their crap piles of garbage that they tend to call functions
is it against EULA to unpack bohemia PBOs and then to look at their BIS fnc's ?
no
Well.. That might be considered reverse engineering
but why would you unpack their pbo's anyway? Just use the in-game function viewer that they gave to us to do exactly that
Search fuck that (that being using ingame viewer)
I unpacked functions and put them in a separate folder so i can easiliy search through them ezpz
wanna do ezpz fuzzy finder for function name, so thats the waay to do it imo
I just launch my DokanPbo P-drive and then use windows search
neat tool
If I'm using multiple headless clients, how do I specify a single one on which to run a script?
Like how prefacing a script with if (!hasInterface && !isDedicated) exitWith {}; will ensure it's only executed on headless clients, is there a version that picks a specific one, like: If (!HC1) exitwith {}; where HC1 is a named headless client.
@shadow sapphire You need to have a scripted gateway for that (basically a function). Grab all headless clients you have with entities and sort them there. If they are at the same script basis you can just simply sort them by order of how they are appearing in array. If not, well you might want to serialize them inside their own inits.
Then you can direct your remoteExec* to a specific HC, which is busy with that you defined them to be busy with.
How to do that if you ask, just return the HC object from a function:
_data remoteExec ['DT_fnc_saveMeToDB',0 call DT_fnc_HC]; // HC by order 0 is writing to my DB (DT_fnc_HC returns object)
Etc.
Very, very cool. Could an example like that one be found like it somewhere online where I could attempt to understand it further?
class rhs_saf
{
class building_extensions
{
class Land_i_Barracks_V1_F
{
#include "rhs_saf\building_extensions\Land_i_Barracks_V1_F.sqe"
};
};
};
rhs_saf and building_extensions are redundant, is there a way to de-duplicate them? (have the classname of the parent class automatically be the file path?)
Thanks a ton, @unborn ether, will try to report back when I've got it working.
@still forum Intersting if is there any way to set traps on executed commands besides what battleye is capable to fixate?
Is there a way to detect if the AFM is active?
Can't seem to find a way to get a list of weapon classnames where the weapon has no preset attachments.
Closest thing I found was the baseWeapon variable in their configs, but it looked unreliable when others didn't have it despite being a valid clean weapon (eg. srifle_DMR_04_F / srifle_DMR_04_MRCO_F).
https://community.bistudio.com/wiki/difficultyEnabledRTD @gilded garden
Hey guys, I have a question whenever I go into the arsenal via scroll wheel using the arsenal script "["AmmoboxInit",[this,true]] spawn BIS_fnc_arsenal;" whenever I try to load into it. it does a forever screen trying to load arsenal.
I dunno where to ask for this.
@tough abyss Thanks!
Is it possible to add an image to a mission in progress? If I have an extension that generates or downloads an image, can I get it into the image on a billboard for example?
Billboard maybe not but into html control maybe yes
Can someone give me a hand please. I am trying to get the state of an RTD feature so i can use it as a condition in a script. I want to check the state of the AFM wheel brakes. https://community.bistudio.com/wiki/setBrakesRTD this lets me turn the brakes on and off. But i'm struggling with the syntax to interrogate the status properly. I need something to return a "true" or "false" value. Can anyone help me out?
What would be the smartest way to pick the shortest subarray from an array?
the subarray with the least amount of elements
_all_arrays = [[1,2,3],[1,2,3,4,5],[1,2,3,4,5,6,7]];
_wanted_array = [1,2,3];
๐ค
oh. yes. thankyou
i-i'm not that dim witted it's just 4am.
significantly shortened the execution time of the roadblock stuff. I simply do multiple searches for startroads, and pick the least amount of startroads found. simply cuts down a lot on the path search which is by far the most intense task.
(also has the neat side effect on cutting down on redundant roadblocks at intersections)
well to do pathfinding between two roads, you need to start somewhere
so i just search roads in a circle around the center of the area i want to fill with roadblocks
green objective markers are "startroads"
There is no getter for setBrakesRTD @gilded garden however there is also setter for rotor brakes https://community.bistudio.com/wiki/setRotorBrakeRTD which has a getter getRotorBrakeRTD not sure though if it is the alternative wheel brake or something else
https://i.imgur.com/qnSEQ16.jpg really? ๐
@tough abyss Thanks but the rotorbrake doesn't help. Its specifically the wheel brake i was after. I've been talking to Uro about it. He couldnt see a way either. I'm just going to have to hit the problem from another direction. Thanks the the assist though.
yeah i know why it's just .. why?
Why what? Why you need scheduled env to use sleep?
Unscheduled runs everything without checking order and shit or something, runs things as fast it can run and doesnt check for sleeps ? @tough abyss
Are you asking or telling? If asking -> https://community.bistudio.com/wiki/Scheduler
random question is there a possibility to make someone dab on altis life
lol
it was a request i had from a player i know you can get one for exile but not sure if that would move the server into a mod
๐
Only the dead live here.
If you want to seek help for life, go to https://discordapp.com/invite/ajGUDSH
How could I return position of mempoint in the same space as OBject builder?
Slightly offtopic:
Using CUP Factions - do I still need CUP ACE Compability Addons? Didn't they implemented the compability already into the whole mod iteself already?
anyone got a script that exports styrings to a TXT file and fansy sharing?
wut?
twitter mod for arma 3 when
go ahead @inner swallow
twitter has some open API and all you need to do is to write some extension that polls it
you even could use sqf-vm to test that extension in a semi-realistic arma environment
if only i used twitter ๐
why would you want to export string out of arma 3 lol
@unborn ether https://discordapp.com/channels/105462288051380224/105462984087728128/506231809181351936 We have CfgRemoteExec and CfgDisabledCommands.
@waxen tide https://discordapp.com/channels/105462288051380224/105462984087728128/506220708691574787 No.
@grizzled rain https://discordapp.com/channels/105462288051380224/105462984087728128/506254164649836546 no idea what you are talking about. That script doesn't open arsenal. Do you mean you do that first and use the action that then appears to open it? Or like I understand it that you have a addAction with that script?
@fringe yoke Yes. If you enable filePatching and download the image on every client into the Arma directory then you can do that. You might need a pbo with same path as you'll download the file to with a dummy file though. Else Arma might think the file doesn't exist because it doesn't exist in a pbo.
@neon snow https://community.bistudio.com/wiki/selectionPosition
THANKS!
@still forum when i try to open the arsenal it loads up but doesn't go thru.
Did you check your RPT for errors?
error inside loading screen code can cause script to exit and never call the endLoadingScreen code
I don't know of any errors in Arsenal.. But I also don't know of any things they did correctly.
There are code examples for Twitter auth, or at least there were years ago, the hardest would be copy and paste all that
@runic seal scripts can't export to text files. But extensions can. What do you mean with "fansy sharing"? you mean fancy? The english word? or something else?
I did but nothing out of the ordinary about the arsenal.
i was wondering if somesone had something like it
that i could use as a template
but thx for the help x
doesn't answer any of my questions. But okey. Happy to have helped somehow ๐
lol
I am wondering what the header in this exactly looks like and what's it used for?
https://github.com/AmauryD/A3GPS/blob/master/A3GPS/gps/fn_compile.sqf
the fn_compile is called multiple times here:
https://github.com/AmauryD/A3GPS/blob/master/A3GPS/init.sqf
I guess you mean the header variable. Not the header of the file?
Well it add's format["private _thisFile = '%1';",_fileName] to the start of the script
so that inside the script you can use the _thisFile variable to check what script you are currently inside of
well i in general wonder what the fn_compile does and why he bothered to write it.
don't really see a use for that.. You usually know which script file you are in when you are writing a script
easiest way to find out why is: https://github.com/AmauryD/A3GPS/search?q=_thisFile&unscoped_q=_thisFile
I'm easily confused. I wondered if i simply didn't understand something clever and fancy.
You can see the only place that's used is the log function. I'd assume that the log function doesn't have that header
thus if anything calls the log function. The _thisFile variable will still be set to the file that called the log function
so the log func can write to the logfile which script wanted to print the log
but gps_fnc_log = ["gps","fn_log",true] call gps_fnc_compile; ?
you said you assume log doesn't have a header
but this would add one, no ?
yeah i just saw it in fn_compile
I'd consider that bad code. As you'd assume it's the opposite
these aren't actually functions, are they?
i mean they aren't functions registered inside arma
if ... that makes any sense.
nope. doesn't
what is your definition of a function?
to me it's anything that can be called
they aren't a subclass of cfgFunctions
So all ACE and some of CBA functions aren't functions?
Just because they use a different scripted system of initialization
well they aren't initialized via cfgFunctions
i would guess stuff like BIS_fnc_recompile will fail on them etc.
But that doesn't make them be less functions
i struggled to explain properly. SORRY.
so, why do people do that?
use or not use cfgfunctions ?
to add headers?
organization
CfgFunctions screws up line numbers beyond repair and might add other headers that you don't want. And is also not "safe" aka doesn't always use compileFinal.
CBA has line numbers fixed, can disable compileFinal completely with a optional pbo, can easily be modified to add any headers you need to debug/test things. And it's system also only compiles functions once at game start. I don't know how cfgFunctions handles that. I think it recompiles at mission start? Or just recompiles some functions? not sure
Another difference. CBA system is documented and the code is easily readable. Which both aren't a thing with cfgFunctions. The code is just terrible
Also as CBA is script based instead of config based. You can do fancy things when compiling functions. For example compile different script files into a function depending on loaded mods or the version of the game
which you just simply cannot do with cfgFunctions
TLDR; People make their own systems because they have special requirements that existing systems can't fulfill
_subname = localize "STR_1";
_subtest = localize "STR_2";
_menu =
[
[_subname,false],
[_subback, [2], "#USER:VAMsub", -5, [], "1", "1"],
[_subtest, [3], "", -5, [["expression", "selectcomp = 1;"]], "1", "1"]
];
showCommandingMenu "#USER:_menu";
waitUntil {select != 0};```
If I close commanding menu by pushing backspace, does this script keep running or cancel itself?
Your script will kill itself anyway because of that syntax error in the last line
and in the first line too
also you never change the value of select.. which you can't. Because that would be a syntax error too
@manic bane get an editor with syntax highlight. then you would see that select is a command? in sqf and thusly can't be a variable name.
_subname = localize "STR_VAM_SUB_COMPONENT";
_subback = localize "STR_VAM_SUB_BACK";
_subnone = localize "STR_VAM_NONE_COMP";
_subsel1 = localize "STR_VAM_CAMONET_HULL_COMP";
_subsel2 = localize "STR_VAM_EXTERNAL_BAG_1_COMP";
_subsel3 = localize "STR_VAM_AMMO_BOXES_COMP";
_subsel4 = localize "STR_VAM_EXTRA_WHEELS_COMP";
_subevery = localize "STR_VAM_EVERYTHING_COMP";
_VAM_Bobcat_comp =
[
[_subname,false],
[_subback, [2], "#USER:VAMsub", -5, [], "1", "1"],
[_subnone, [3], "", -5, [["expression", "selectcomp = 1;"]], "1", "1"],
[_subsel1, [4], "", -5, [["expression", "selectcomp = 2;"]], "1", "1"],
[_subsel2, [5], "", -5, [["expression", "selectcomp = 3;"]], "1", "1"],
[_subsel3, [6], "", -5, [["expression", "selectcomp = 4;"]], "1", "1"],
[_subsel4, [7], "", -5, [["expression", "selectcomp = 5;"]], "1", "1"],
[_subevery, [8], "", -5, [["expression", "selectcomp = 6;"]], "1", "1"]
];
showCommandingMenu "#USER:_VAM_Bobcat_Comp";
waitUntil {selectcomp != 0};```
this is actual application
Discord also has syntax highlight btw
```sqf
<code>
```
I have never seen anyone script the command menu
wonders how Dedmen does this
And I also don't know of anyone who has seen someone do it. So I'd say.. Try it out and report back to us
Discord is really slow with embeds lately
I really didn't expect that... No one use command menu?
HAX
atleast noone in here
@still forum thanks for the elaboration on functions. I'll look at the CBA system.
Last mention of showCommandingMenu was in august 2017. And before that april 2017. And there are no other mentions before that since this discord was created
wow thanks anyway
Dedmen, to define a function with CBA one simply uses https://cbateam.github.io/CBA_A3/docs/files/common/fnc_compileFinal-sqf.html ?
Yes
that's ... simple.
But ACE/TFAR/ACRE and many other mods usually have all that wrapped behind several layers of macros that can easily be swapped out for debug versions
Actually no. compileFinal is not the full thing.
Gimme a minute I'll find it
"CBA_fnc_compileFunction"
i wonder why it is under event handlers ?
Because functions get compiles at preStart/preInit eventhandlers
and because in Arma2/Arma1 CBA it was in SLX. Which is now XEH.
I tested and I think it keeps running..
I thinks use EH and make variable to -1 might solve this.
Let's assume a mission is tailored towards being used with a lot of mods, and vanilla is totally out of the scope of the whole endeavour. Then CBA is always available anyways. Given that simplification, what would be CBA features a mission should definately make strong use off?
Uhhh.. never really used CBA as mission specific. Depends on what you need. If you don't need something, there is no reason to use it
CBA has lots of misc stuff. For many generic BIS functions there are more optimized and better documented CBA variants
You can use CBA's eventhandler system (XEH and init/initPost handler) to easily add eventhandlers to literally everything. Instead of adding it to each object seperately.
You can automatically let it run a script when a certain vehicle spawns. Instead of for example having a scheduled while/true loop checking vehicles for any new things.
There is no single thing that you should always use. Use CBA features when you need them and would otherwise have to write your own implementation.
CBA's unscheduled code utilities like waitUntil/waitAndExecute are useful if you need something to happen exactly after a time interval or exactly when something happens. Instead of dealing with the uncertainty of unscheduled scripts that might only execute minutes or even hours after something happened. But you are also paying for that. By having your condition checked every frame, instead of every few frames, or once every minute, or every hour, or every day.. however the scheduler feels like at that moment
i mean if i want to set an AI patrol and CBA has a CBA_fnc_taskPatrol, that's obviously something i'll look at. i was wondering more about things that are unobvious to me at the moment, like for example CBAs fnc to register and compile a function.
Event system can be really usefull for bigger missions.
i guess cba event handlers are very performant?
CBA hashes/Namespaces can be useful if you have lots of variables to store in a organized manner
no
They are as performant as the scripts you write as handlers
Well they don't suffer the recompilation bug that normal engine eventhandlers have. But that's about it
The big thing about CBA XEH (Extended Eventhandlers) is that you can do things that you just simply cannot do with missions otherwise.
For example config.cpp only eventhandlers. Can be added with description.ext or even script if you use CBA's XEH.
Or you can very simply add eventhandlers to every vehicle. Whereas with a script you'd have to call addEventHandler on every vehicle manually
i'll keep that in mind.
(findDisplay 46) displayAddEventHandler ["KeyDown", {
params ["_control", "_dikCode", "_shift", "_ctrl", "_alt"];
switch (_dikCode) do {
// Key Backspace
case 14: {selectcamo = -1; selectcomp = -1; systemChat "beep";};
};
}];```
Run this makes me uncotrollable except Backspace. What should I do?
keyDown needs to return true/false
don't know which. But one of them blocks the keys. I guess it's false, which is also what it defaults to when you return nil
I will check. Thanks again!
so im looking to add a visual label to an object ingame that is only visible to the player that created it via client sided code
ive checked the wiki and cant find the required function
dope ty
Check out the examples and notes at the bottom of the page
If you donโt use default case switch returns true so you are overriding keydown EH @manic bane
(findDisplay 46) displayAddEventHandler ["KeyDown", {
params ["_control", "_dikCode", "_shift", "_ctrl", "_alt"];
switch (_dikCode) do {
// Key Backspace
case 14: {selectcamo = -1; selectcomp = -1; systemChat "beep";};
};
false;
}];```
Problem solved!
I have another question. When player respawn, should I add this again?
Mission display 46 is there for the whole mission
If you leave server and join you will be joining new mission
Then you need to run it again
Thanks for explaining ๐
Ight so i was able to get it to where i want it, but it only shows the text when looking right at it, i need it to show no matter where the current cursor is.
DrawIcon3D? Should show as long as it is on screen
๐ค sec
I asked about command menu and I found solution.
_Menu =
[
["Name",false],
["Back", [2], "#USER:sub", -5, [["expression", "select = -1;"]], "1", "1"],
["Selection 1", [3], "", -5, [["expression", "select = 1;"]], "1", "1"],
["Selection 2", [4], "", -5, [["expression", "select = 2;"]], "1", "1"]
];
showCommandingMenu "#USER:_Menu";
_test = 1;
while {select == 0} do {systemChat format ["LOOP %1", _test]; _test = _test + 1; sleep 1;};
waitUntil {sleep 0.1; select != 0};
if (select == -1) exitWith {};
if (select == 1) exitWith {Hint "1"};
if (select == 2) exitWith {Hint "2"};```
waitUntil will keep check condition even if I cancel menu by backspace or etc.
if (select == 0) then {
if (commandingMenu != "#USER:_ABC") then {
select = -1;
};
};
sleep 0.1;
};```
But with this, this script check command menu and cancel first script if #USER:_Menu is closed.
_intelAssistNpc setBehaviour "CARELESS";
[_intelAssistNpc,"LEAN_ON_TABLE","ASIS", dpl_snap_arrow_1] call BIS_fnc_ambientAnim;
Results in this on dedicated only: https://youtu.be/wOxYZW_1Erg
Any ideas? INFO: I have placed a invisible marker so the unit is snapped with the animation. Marker is called dpl_snap_arrow_1
Marker name should be between quotes
Hello guys question. in waitUntil {sleep 1; do this; do this;}; why does the sleep have to be at the top? For my code it will not work with sleep at the bottom.
the last bit of code in your waituntil must eventually equal true
waitUntil {code;code;code;code;code;condition};
this should work
waitUntil {code;condition;code};
this shouldn't
the thing you want to evaluate as your condition for the waituntil must be last, basically
(maybe i shouldn't be explaining things)
in other words, sleep must not be at the top, i can be anywhere, just not last ๐
because sleep 1; doesn't equal true, like ever?
goes hiding
omg @waxen tide thank you man. I have searched all over for that answer
I cannot thank you enough
np
Is there anyway I can detach when someone switches between their primary to secondary weapon and vice versa?
Well I was thinking more on the lines of like a EH, which afik there isn't one.
Like what im tryna do is when someone switches to their secondary it forces said player to be in walking only.
I want to know where it is.
https://cdn.discordapp.com/attachments/499890107650932767/506608360850849802/unknown.png
I tried to solve it.
load your addons one by one and test it... i guess problem is there > http://prntscr.com/lc2o40 ๐
@edgy dune If you're using CBA, they have a CBA event for it.
https://github.com/CBATeam/CBA_A3/wiki/Player-Events
class cfgWeapons {
class U_I_CombatUniform; // External class reference
class U_I_OfficerUniform; // External class reference
class UniformItem; // External class reference
class ItemInfo; // External class reference
class ItemCore; // External class reference
class H_HelmetIA; // External class reference
class HeadgearItem; // External class reference
class Vest_Camo_Base; // External class reference
class VestItem; // External class reference
class arifle_TRG21_F; // External class reference
class arifle_TRG21_GL_F; // External class reference
class RTAF_Rifle : arifle_TRG21_F {
class ItemInfo; // External class reference
};
class RTAF_Rifle_gl : arifle_TRG21_GL_F {
class ItemInfo; // External class reference
};
class B_RTA_Rifleman : U_I_CombatUniform {
scope = public;
displayName = "RTA Uniform 1";
picture = "\Cattac_RTA\data\UI\rta_uniform_1_ca.paa";
class ItemInfo : UniformItem {
uniformModel = "-";
uniformClass = "RTA_Soldier_F";
containerClass = "Supply50";
mass = 80;
};
};```
Need to enter Class Scope; ?
A file that has been spotted. cfgWeapons.hpp
@delicate totem ah thx yo, I didnt know CBA had their own EH's.
can i use addEventHandler for object on server?
_obj1 addEventHandler ["AnimDone", {
params ["_unit", "_anim"];
...
};
@edgy dune CBA has a weapon switched eventhandler.
@ebon sparrow explain? what are you trying to ask? Also that would be #arma3_config
@dusky pier you can see which commands can or cannot be added on the server or different clients based on the Icon here: https://community.bistudio.com/wiki/Arma_3:_Event_Handlers#AnimDone on the top left.
@winter rose having the marker in quotes makes the marker inactive or not usable - it seems without quotes the marker is actually recognized. Info: The marker is placed in 3DEN and the name defined in the "variable input"
Well forget about that marker - the animation bug exists in both ways
@frigid raven I'll take another look, meanwhile disregard my advice. Also, you could maybe disableAI the unit socit doesn't change animation at all
looks like _intelAssistNpc setBehaviour "CARELESS"; fails kinda
Ah ok disableAI sounds good
Is there a best practise to have animations and positions set - while the NPC still can react to enemy fire? And afterwards return to his former position and animation?
I kinda feel Arma will screw this up big time
@winter rose One info again. The NPCs are placed in the 3DEN Editor - therefore they are local to the server right? But I run the animations scripts on the client side... might this be the mistake here?
crap they should really add exception handling for that file not found bullshit when I have a wrong path to a *.hpp file. Crashing whole Arma is a bit dramatic
@winter rose that solved it - I needed to have the animations run on the server side not client
That's how C++ preprocessor works, try telling Stroustrup that he is wrong ๐
I heard weeks ago that someone made a lua interpretor for arma, do you guys have the link ?
got it https://github.com/intercept
I didn't make the lua interpreter. I just integrated a LUA Library with Intercept
Someone in here wanted a way to check how hard the engine of a car is revving.
Added: Sound controller 'acceleration'
Latest dev-branch. That could probably do it
@frigid raven good thing! And yes, server-side anim indeed ๐
oh okay
Do you by chance know if there is a max RPM config entry for helicopters?
Ref to: https://discordapp.com/channels/105462288051380224/105462984087728128/465571849284354059
only if the helo is RTD helo
crap they should really add exception handling for that file not found bullshit when I have a wrong path to a *.hpp file. Crashing whole Arma is a bit dramatic You cannot just ignore missing include and you will need to restart anyway since there is no dynamic config loading in retail, so curious what do you suggest?
@still forum thx yo , I saw that CBA weapon switch EH when Tommo pointed it, I shall have fun now.
I shall script total war Rome 2 into arm.
gosh this is embarrassing...
I have a Basic Ammo [NATO] ammobox and within init
[this, true] call ace_arsenal_fnc_initBox;
but it wont render the arsenal action for me - only normal inventory - what am I getting wrong here again
@tough abyss I do not suggest anything because I am a noob
Hey is there anyone active i this chat rn?
@signal pulsar someone wrote a message here 3 minutes ago.. What do you think?
@frigid raven you tying to open it with the vanilla action menu or the ace interaction menu?
The app on my phones not showing me the time stamps for some reason
So I didnโt know till I saw someone typing
@frigid raven "action" ? It's in ACE Interaction. Not mouse wheel menu
Can someone help me understand how I could attach an incoming missile event handler to a players vehicle so I can add like a text pop up saying incoming missile
vehicle player addEventHandler ["IncomingMissile", {hint "SHOT";}]
i just dont know how i would take that and apply it reading from: https://forums.bohemia.net/forums/topic/201325-incomingmissile-eventhandler-problem/
@still forum the fuck I missed I was opening "Arsenal" through the mousewheel and always thought that the ACE stuff too
wtf helluva new options with ACE
anyone have any ideas?
@signal pulsar
(vehicle player) addEventHandler ["IncomingMissile", {
hint format ["SHOT BY %1", _this select 3];
}];
https://community.bistudio.com/wiki/Arma_3:_Event_Handlers#IncomingMissile
@compact maple is @ people allowed? okay so what im trying to achieve is like " missile incoming" in big text when someone shoots rockets at u but i dont want to tell who shot you. will the "%1" tell who shot you?
and where / what file would i want to call this on?
Yes, why would it be forbidden ?
yes the %1 will tell who pulled the trigger
if you want a big text just use : (give me a sec)
this command https://community.bistudio.com/wiki/titleText
so :
(vehicle player) addEventHandler ["IncomingMissile", {
titleText ["SHOT", "PLAIN"];
}];
this isnt my code but was sent to me as a reference by someone who been tryying to point me in the right direction private ["_vehicleObject"]; _vehicleObject = _this select 0; playSound "warning"; [parseText format["<img size='0.52' image='exile_assets\texture\mod\icon.paa'/><t color='#e5e7ea' size='0.6' font ='PressStart2P' shadow = '1'> MISSILE INCOMING</t><br/>"],-1,-0.2,1,1] spawn bis_fnc_dynamictext;
something like that
but even with this i dont know how to call it or what file id want to put it in
idk
private _vehicleObject = _this select 0;
playSound "warning";
(vehicle player) addEventHandler ["IncomingMissile", {
[parseText format["<img size='0.52' image='exile_assets\texture\mod\icon.paa'/><t color='#e5e7ea' size='0.6' font ='PressStart2P' shadow = '1'> MISSILE INCOMING</t><br/>"],-1,-0.2,1,1] spawn bis_fnc_dynamictext;
}];
yessir
So it should work