#arma3_scripting
1 messages Β· Page 103 of 1
hmmmyeah it will make the player go to internal camera even if a UAV enters that trigger
I tested that and my uav entered the trigger then the controls were given back to me in first person
wait you mean no matter what people do it will take them to first person?
I mean with this code if any UAV enters that trigger, you will enter first person
if the player is controlling UAV 1, if UAV 2 enters the trigger the player will be disconnected from his drone (the crew will still remain though)
so how do I make it so only the UAV 1 driver gets his camera switched
_x player switch camera "internal" ?
stop asking ChatGPT
I took this
vehicle player switchCamera "External";
and instead of vehicle I used _x
chatgpt doesn't help it tells broad instructions
instead of just player switchcamera I wrote vehicle player switchcamera
How come hideSelection won't work for doors? Am I doing this wrong somehow?
private _house = createSimpleObject ["Land_Radar_01_HQ_F", AGLToASL _pos];
_house hideSelection ["door_1", true];
_house hideSelection ["door_2", true];
_house hideSelection ["door_3", true];
_house hideSelection ["door_4", true];
_house hideSelection ["door_5", true];
Works just fine hiding the glass of the windows and other details of the building but the doors remain.
where did you get the selection names?
are you sure they're correct?
With the help of "selectionNames cursortarget" which gives me these names :
Looking at these names I reckon you can only hide the glass...
try creating a super simple object
private _pos = player getRelPos [20, 0];
private _house = createSimpleObject [getText(configFile >> "CfgVehicles" >> "Land_Radar_01_HQ_F" >> "model"), AGLToASL _pos];
selectionNames _house apply {_house hideSelection [_x, true];};
see if that works for example
looks like no 
I mean it deleted something
well yeah but when I tried to do it on the doors it still didn't work
the jammer script stops working when I put as a condition if something is alive or not
what is jammer2
An antenna object. It's in the second picture.
with just "this" it works
I want to make it so in case the jammer object is destroyed the players can call drones
Hey, so I was wondering which case would give the script the most performance ingame. So I got a script that grabs the ammo count of a specific mag type in the players inventory now the script should return a Boolean. And due to the ammo count of the mag it returns either true or false. Meaning if the ammo count is 1 then false but when it's above 5 it's true. My question now, which case is more performance friendly if I use a switch statement that has 260 entries or if I narrow it down with if statements before that. Like If (_ammoCount >= 130 && _ammoCount <= 260) then {here new switch statment}.
well, you removed the previous condition
is there a way for both to work both the " present anybody" and the "alive jammer2"
it all boils down to the rule you set for true or false
*drumroll*```sqf
this and alive jammer2
I used &&
yep, that's good too
give me a sec cause it didn't work with the &&
that's not what is on the screenshot you sent though
I tried to use it after the just alive jammer2
works
thanks
should I put it on server only or not
?
it's to be used on a multiplayer op
nope, because player is involved
roger that
Working on updating some scripts that create/delete effects (particle/light source objects) to only exist on the players' end (i.e. not the dedicated server).
Currently, I just create the effects, put them in an array, and _unit setVariable [..., _effects, true]; to be later deleted.
I originally had the particles implemented locally, but due to some issues with the effects staying for some players and being deleted for others, I opted for just having them synchronized across the server as well until I had built out the rest of it.
TL;DR, I want to synchronize the creation/deletion of particles across only the players, so that the server doesn't have to process them.
https://sqfbin.com/ipucehatikakejabufac
just use cba events
and sqfbin.com
Rather than just code blocks?
Is there a player equivalent of CBA_fnc_serverEvent?
global event
yes please, to avoid walls of code
small excerpts are ok, just not big functions π
And then just check for hasInterface?
sure
Fair enough, will do that rq
hey lou can you add emojis

that's beautiful
hmmyes is ok?
it is perfect
single-handedly made the server better
i do that merely with my presence
that is perfect
Anyone know what function I could use to add or remove damage to an object? My understanding is setDamage allows me to set the damage of an object to a specific amount, but I want to add or remove 0.05 damage every time I run a script
_obj setDamage (damage _obj + 0.05);
note that it may "heal" people's legs too π
note you cannot make things be resurrected if they are dead (damage = 1)
(i thought you could and spent like 5 hours trying to debug why my code wasnt working)
That is so obvious... I feel like an idiot. Thank you so much!
I feel like an idiot
youll be a brilliant arma modder then
Curious bug or idiocy on my end, but does the syntax for flyInHeight not work correctly anymore?
this flyInHeight 25 is accepted as a syntax, but this flyInHeight [25, true];. with or without the semicolon, does not work, despite being official documentation
You're in 2.12 I assume
Latest profiling, yeah
Then you are
?
You see 2.14 there?
Yep
Which means not available in 2.12
So the page is last edited on the 20th of July 2023, meaning a month ago. So this could have been done to introduce syntax that may come a few patches from now?
Next stable yes
Also, how did you find out when it's introduced, so I can check myself next time?
Okay, then relatied question: Assuming we don't have access to the alternative syntax, how do you hard force an airframe to hold an attitude?
flyInHeight works until the helo reaches a waypoint (where it has to stop, and hover, to allow fastroping). It stops, it hovers, but it rapidly gains attitude and ignores the set argument of 25 (with the base syntax)
At the waypoint, the airframe ends up hovering around 20-30 meters high
We have the access... use Dev-Branch. But I don't think that answers your question. I would say the answer is no way in 2.12
I take it the alternative syntax is there exactly for this problem, as it forces the helo to do this exact thing?
AFAIK yes
So aside from recording the flights, no way to do it, right?
In 2.12, I guess yes
Thanks for the quick help. Disappointing, but can't be helped
I'll check out dev branch
Is there any way to see what the dev branch changes underwater, to allow for this forcing?
Could set the velocity of the helicopter in a loop to keep it still.
How would that happen? Besides, I can get it to stop, just not maintain say, 15 meters attitude, the damn thing goes up
@jaunty zephyr:
@grizzled cliff wants to compeete against OOS
and he is doing that by just extending SQF with a quite minimum overhead (check the backlog of this chat to see how it works) whilst i put a lang. with typesafety ontop of SQF to get around doing what he is doing to archive max. performance
Then I fastrope, and it starts going up, so lots of broken legs and shit
Velocity is three dimensional.
vehicle setVelocityModelSpace [0,0,0];
Aaaa, so x y z coordinates
Trigger on that waypoint
Seems the helo ignores me using [0,0,15]
It briefly changes attitudes and then bounces back to its regular attitude
You would be pushing it up at that point. You don't want it to move, so you need to set its (vertical) velocity to 0, and you need to continuously do it in a loop, probably every frame for it to look still.
Thing is, the helo won't go to that attitude by itself so I can lock it there
And changing from its current 30 ish to 15 or less, will soo very janky
Could use setVelocityTransformation to achieve that.
Aha
Keep in mind that 2.14 is expected to release in the next couple of weeks (maybe even as early as next week). So unless you need this done right now, you always have the option of waiting a little bit for the improved flyInHeight command.
Well if you don't want to play multiplayer there's no harm in switching to dev branch right now
Hey I was checking #contact_discussion and I saw this cool map, is there any way to replicate the heatmaps? is it an undocumented contact dlc scripting function? I'd love to know.
Is it an image? it looks like it tbh
so it has to be scripting
there's so much contact scripting content that's undocumented π¦
well I'm not 100% sure tbh. but if it did then yes.
there's this group of fncs but idk what they do:
https://community.bistudio.com/wiki/Category:Function_Group:_IDWMap
maybe they're related to this
it is possible to create something like this using markers and icons for example
underwater?
You can just wait a couple days. 2.14 releases next week
Basically, is there a way to see what changed in the internal arma logic to allow the new flyInHeight to work? I didn't find any official A3 GitHub
No, its in engine code, and the game isn't open source
how do I check if a vest has a proxy? e.g. for the pistol holster?
selectionnames
is only compatible with objects, but for vest you only can get the classname
you can create a super simple object using the vest's model
thanks
@tough abyss Sounds like the unit I play with :P
We make all out scenarios in house though
Most groups do. We make all our stuff in-house too.
I am tempted to trim a few missions and release them though, but people would complain about my bad habits.
we're should I call CBA_fnc_addPlayerEventHandler? On each player or on the server?
each player
What's the default max distance for a playSound3D, I remember reading it was the volume * 100 meters or something like that, but don't remember where
from the wiki: distance: Number - (Optional, default 0) How far the sound is audible, in meters. 0 means no maximum distance
Yeah I checked the wiki for it to see if that's where I read it from, but I remember there being an actual number used for the distance
if default is 0 that should mean no max dist
Yeah but the sound still gets quieter as you get farther away
Looks to be around volume * ~450-500 meters
yeah that's another thing
Yeah, wasn't really sure how to word it
I thought max dist means clip distance... like if 10m then people at 15m cant hear a thing
It does
Was just reporting a bug to another mod, a sound could be heard from a lot farther than it should since they didn't set a max distance for it.
Was just going to math the maximum distance rather than just moving farther and farther away
how to hide the muzzle flash when I spawn a pistol as a simple object? Is there anything in common between the models? Because this didn't worked:
{
if(!((_x find "proxy") isEqualTo -1)) then {
_holder hideSelection [_x, true];
};
} forEach selectionNames _holder;```
I believe it's an animation, usually called zasleh
Anyone use xcam?
Looking to rebuild my object library, I know it happens automaticallyt he first time, but I can't get it to remove the objects from mods we used to use but don't anymore.
im hosting a scenario and running the code below inside init.sqf:
(allPlayers select (floor(random (count allPlayers)))) setVariable ["para_isKiller", true, true];
if (player getVariable ["para_isKiller", true]) then
{
//code
}
else
{
//code
};
It happens sometimes that more than one player is chosen as the killer, what could be the issue?
You are doing that from all clients for all clients.
So your code multiples.
Run it without allPlayers or run it in initServer.sqf
_players = [];
_players pushBack allPlayers;
if (count _players > 0) then
{
_randomIndex = floor(random (count _players));
_killer = _players select _randomIndex;
_killer setVariable ["para_isKiller", true, true];
_players = _players - [_killer];
};
Like this?
Would be helpful if what exactly is your intention after the code
Select random player set a variable on that player and execute some code
What prisoner said
- init.sqf runs on EVERY computer (I guess headless too)
- So you want to limit this script into the server so it ensures it runs only once
- initServer.sqf is a way indeed
- to select a thing from an array,
selectRandomis the best way
_players pushBack allPlayers;would result in array-in-array._players = [[alice, bob, headless1,...]];. So eitherselectRandomor anything else would just select the internal array as it's the only content of the_players
So just do _players = allPlayers; ?
that. Or _players insert [0, allPlayers]; to actually merge the arrays. Or maybe _players = playableUnits + switchableUnits; like mentioned by NikkoJT to prevent headless clients from being in the list.
Is anyone else using missionProfileNamespace and seen that the saveMissionProfileNamespace has stopped storing to the vars file? saveProfileNamespace still seems to work fine.
seems to work for me on the current dev build
<missionName>.vars gets created in the profile folder and contents are there
Hmm I'm on Vanilla and this isn't working. But the saveProfileNamespace version is
[3, format ["Saving missionProfileNamespace: %1, %2", _variableName, _array], _filename] call spp_fnc_log;
// Set default empty array for Variable.
missionProfileNamespace setVariable [_variableName, _array];
saveMissionProfileNamespace;
[3, (missionProfileNamespace getVariable [_variableName, "Data not found"]), _filename] call spp_fnc_log;
literally your code (prepended with _variable definitions) works for me on release build as well π€·ββοΈ
this is weird... alright
Is there a way to retrieve the sensor targets from an ammo class that has sensors defined? getSensorTargets doesn't work for ammo it appears
like this code fires on event,
"729.396: [SPP] | DEBUG | fn_MPNamespaceSet | Saving missionProfileNamespace: SP_P_76561197991835568, [""76561197991835568"",[[],[],[],[""U_B_HeliPilotCoveralls"",[[""ACE_fieldDressing"",1],[""ACE_packingBandage"",1],[""ACE_morphine"",1],[""ACE_tourniquet"",1],[""ACRE_PRC343_ID_1"",1]]],[""V_DeckCrew_yellow_F"",[]],[],""H_HelmetCrew_B"","""",[],[""ItemMap"",""ItemGPS"","""",""ItemCompass"",""ItemWatch"",""""]],[10796.6,10597,0.00152588],[[""hitface"",""hitneck"",""hithead"",""hitpelvis"",""hitabdomen"",""hitdiaphragm"",""hitchest"",""hitbody"",""hitarms"",""hithands"",""hitlegs"",""incapacitated"",""hitleftarm"",""hitrightarm"",""hitleftleg"",""hitrightleg"",""ace_hdbracket""],[""face_hub"",""neck"",""head"",""pelvis"",""spine1"",""spine2"",""spine3"",""body"",""arms"",""hands"",""legs"",""body"",""hand_l"",""hand_r"",""leg_l"",""leg_r"",""head""],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]],[1.05556,1.05556]]"
"729.398: [SPP] | DEBUG | fn_MPNamespaceSet | [""76561197991835568"",[[],[],[],[""U_B_HeliPilotCoveralls"",[[""ACE_fieldDressing"",1],[""ACE_packingBandage"",1],[""ACE_morphine"",1],[""ACE_tourniquet"",1],[""ACRE_PRC343_ID_1"",1]]],[""V_DeckCrew_yellow_F"",[]],[],""H_HelmetCrew_B"","""",[],[""ItemMap"",""ItemGPS"","""",""ItemCompass"",""ItemWatch"",""""]],[10796.6,10597,0.00152588],[[""hitface"",""hitneck"",""hithead"",""hitpelvis"",""hitabdomen"",""hitdiaphragm"",""hitchest"",""hitbody"",""hitarms"",""hithands"",""hitlegs"",""incapacitated"",""hitleftarm"",""hitrightarm"",""hitleftleg"",""hitrightleg"",""ace_hdbracket""],[""face_hub"",""neck"",""head"",""pelvis"",""spine1"",""spine2"",""spine3"",""body"",""arms"",""hands"",""legs"",""body"",""hand_l"",""hand_r"",""leg_l"",""leg_r"",""head""],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]],[1.05556,1.05556]]"
But when it recons, this data is not in teh vars file
I havent used missionProfileNamespace my self but since its for mission maybe the timing is crucial
timing for this is called unscheduled, so it will happen when it happens.
Can you check if the file on disk is being updated when you call save?
maybe its corrupted?
yeah I mean if you call it at mission end that could be one problem
or too early at start...
I used missionProfileNamespace recently for some stuff (client & server), no problems so far.
Loading data directly on server start and saving shortly before shutdown/restart. (saveMissionProfileNamespace executed ~30 seconds before restarting/shutdown)
I think we had an common issue on Linux where the mission profile namespace wasn't updating without a server restart. After a mission restart you'd get the old data instead. Don't have any devs running Linux though, so not replicated.
Windows works fine.
Im on linux funnily enough.. I'm trying to figure out where the profile vars is being stored now
probably should've led with that π
Β―_(γ)_/Β―
Ok completely new servername, you can see this does store data and create the file
New file, it gets created / updated when the save is called however it's not actively reading it for some reason. I can getvariable immediately after the save, and it shows correctly. Restarting the server and it reverts back to previous data
But as I say, this same system works fine for ProfileNamespace in linux. It's just MissionProfileNamespace i'm getting the issue with
Profiling branch & Retail
isn't that the profile namespace one? 
Q: I am using itemCargo, which includes uniforms and vests, as well as everyContainer in order to recursively acquire the same for each of the containers, which also includes presumably, the same uniforms and vests reported by itemCargo.
my question is this, does it matter the order, per se, reported by itemCargo, take in the same order, perhaps, reported by everyContainer?
for purposes of removing cargo, in this case, or adding.
thanks...
addMagazineCargoGlobal ["mag", -1] arrives soonβ’ in v2.14
is there anywhere we can see new/modified functions/commands listed in a page or something? had an old error that someone said should be streamlined with 2.14
changed/added commands, inaccurately at https://community.bistudio.com/wiki?title=Special:WhatLinksHere/Category:Introduced_with_Arma_3_version_2.14&limit=100
while good to know, not sure how that's relevant. here asking specifically in terms of itemCargo, re: uniforms and vests. which we also roll up via everyContainer.
question at hand, is the Nth uniform, let's say, enumerated by itemCargo, also the Nth uniform identified by everyContainer?
or does it matter, i.e. if we are removing a specific everyContainer from our serialized cargo, we can drop any of those enumerated by itemCargo and would be fine.
Maybe try naming it lowercase. so "testserver"
also it being same as the profile name might be bad
let me know if I can clarify at all, does not seem like that difficult a question. maybe I can dub a qnd video demonstrating if it would help? thanks...
@winter rose for now assuming order matters, in terms of aligning everyContainer indexes with a corresponding itemCargo class element. which matters, i.e. if the pending 2.14 command is order agnostic, or reduces on a first come first serve basis. would not want to inadvertently drop a uniform or vest container, for instance, that the player intentionally wanted to leave alone. this would not be very kosher.
idk
q. can someone help me figure out how to set this up? it allows players to change the inventory of a crate at the spawn point in order to provide what is needed at any given point in the mission. but once the crate leave the location the inventory is set.
from in game, order "does" appear to matter. may quote me on that between the commands, if it helps.
// looking at a HEMTT transport for reference, couple of unis dropped into inventory
_y = cursorObject;
_items = itemCargo _y;
_containers = everyContainer _y;
[_y, _items, _containers];
With the result being:
[
15e19604080# 1780502: truck_01_transport_f.p3d
,["ACE_rope12","rhs_uniform_FROG01_d","rhs_uniform_FROG01_wd"]
,[
["rhs_uniform_FROG01_d",15c1366b580# 1780564: dummyweapon.p3d]
,["rhs_uniform_FROG01_wd",15dd0015600# 1780731: dummyweapon.p3d]
]
]
set as in cannot change whats in it but can withdraw from it i mean
whether there are other kerfuffles in the internal command workings, could not tell you; anecdotally, this is my log, seems like maybe order is important.
Is it possible to get info about a projectile with some command?
what kind of info?
ammo type
projectile is already an ammo tho
typeOf?
I have a mod working fine with the default A3 HandleDamage eventhandler. However it's not accurate enough for my needs so I want to tap into ACE. I've never done anything requiring another mod before and I am at my wits end on how I'm supposed to pull the "ace_medical_woundReceived" data out. None of the wikis have been any help to me and I've just been spinning my wheels for hours now. I was hoping this was going to be a quick init tweak and it'd work same as before but everything I can think of is going nowhere.
I would recommend going to the ACE discord and asking for help there.
Is customChat command broken? I tried the example from the biki
player customChat [2, "Hi, I am a custom chat message"];
I already created a custom radio channel the channel number is 2 but I tried it around with numbers up to 10 to make sure it isn't overlapping with default radio channels but I don't get a message at all.
[
"[Test]",
"- Recruit (Successful)",
{
params [["_position", [0,0,0], [[]], 3], ["_attachedObject", objNull, [objNull]]];
_action = ["RecruitCivTrue","Recruit","",{
_text = [
"Sure, I'll join you.",
"You know what, why not.",
"Absolutely!",
"Of course!"
];
[[name this, selectRandom _text]] remoteExec ["BIS_fnc_EXP_camp_playSubtitles"];
[this,0,["ACE_MainActions","RecruitCivTrue"]] call ace_interact_menu_fnc_removeActionFromObject;
},{true},{},[parameters], [0,0,0], 100] remoteExec ["ace_interact_menu_fnc_createAction"];
[_attachedObject, 0, ["ACE_MainActions"], _action] remoteExec ["ace_interact_menu_fnc_addActionToObject"];
}
] call zen_custom_modules_fnc_register;
getting an error message saying
'...f (!hasInterface) exitWith { [] };
if (!|#|params [["_object", objNull, [objNull]],...'
Error Params: Type String, expected Array
File /z/ace/addons/interact_menu/functions/fnc_addActionToObject.sqf, line 23
remoteExec ["ace_interact_menu_fnc_createAction"] is wrong, the function needs to be called π€·ββοΈ
oh
how would i do that globally?
tried remoteexeccall but got a similar error popup
@kindred lichen Go to settings, library settings, then ROL at the bottom.
probably replace this with _attachedObject
if i do this then players in mp wont see it
and i guess this is last resort
i found that if i use _attachedObject inside of the ace_interact_menu_fnc_createAction it doesnt register the unit
so i have to use this
why wouldn't they? createAction returns valid array that can be passed as a parameter to the second remoteExec 
sorry wdym with why wouldnt they?
i mean literally
createAction returns valid array that can be passed as a parameter to the second remoteExec
so u mean i should use the vanilla createAction instead of ace yes?
i mean sqf private _action = ["VulcanPinch","Vulcan Pinch","",{hint str ["kek", _target];},{true},{},[parameters], [0,0,0], 100] call ace_interact_menu_fnc_createAction; // only create _action locally [cursorTarget, 0, ["ACE_MainActions"], _action] remoteExec ["ace_interact_menu_fnc_addActionToObject"]; // and then add it everywhere
also, you've skipped the third parameter of sorry, misread on my endace_interact_menu_fnc_createAction
and this still isn't accessible inside the statement body
and ace sets _this for statement as: params ["_target", "_player", "_params"];. So if your [parameters] array needs to be parsed inside the statement - it should be done as _this#2 params [["_position",... 
hahaha was tripple checking for a while
but seems to be working now
gonna test later with a few friends
thx a lot for your help
just a friendly reminder: you can always disable BattlEye, start multiple copies of A3 (maybe windowed for convenience), host in one, connect from other(s) and check network stuff locally
@shut flower You need to have player added to channel's units list with radioChannelAdd command
Lol I already did. I didn't see a response in there at the time so I asked in here as well.
Would be great if you can tell what are
- intention
- what you've done so far
- or any available options
Be able to fire my rocket launcher as fast as my mouse can click. For armor testing.
I have looked at basically every link there is on the matter
Which isn't a lot :/
oh, cool. I will definitely check this out later.
But for now, do you have a snippet that can fulfill my requirements?
@warm hedge Mod is awesome. Thank you so much.
index = radioChannelCreate [[0.96, 0.34, 0.13, 0.8], "Q-dance Radio", "%UNIT_NAME", [player]];
player customChat [index, "Hi, I am a custom chat message"];
works for me ^
invincibility does not work with ace, for some reason :p. It's just player allowDamage false
No, it uses other way IIRC. But ACE is never considered, and will never
@warm hedge My only other complaint would be that you have to enable all the cheats again after a restart. Very tedious.
(no idea how to post code here like you did)
I did
PG_radio_server = radioChannelCreate [[0.9, 0.9, 0, 0.8], "Server", "%UNIT_NAME", []];
publicVariable "PG_radio_server";
PG_radio_server radioChannelAdd [_player]; //_player is the player unit
player customChat [PG_radio_server, "Hi, I am a custom chat message"];
I can write in this channel without any problems, just the customChat doesn't works. Have to test in an empty mission.
Code can be posted this way: http://hastebin.com/otosamuxis.mel
Hello fellow ArmA enthusiasts,
I am currently working on a framework for reinserting respawnees via paradrop from a C47 in the IFA3 mod. A problem I've run into, is that I would like to check if a unit-or member of a certain group, variable name sqd1, Is present inside a trigger zone, or marker. And then move only the units present in aforementioned trigger zone or marker, into the aircraft which they are going to be paradropping from. To prevent any player or units who is not located inside the aforementioned trigger zone or marker, from being teleported into the aircraft. So that the guys who have not been killed in the combat zone. Will not experience any interference, while their squad mates are being flown back into combat.
So far I've been trying this:
{_x moveincargo birdLeader;} forEach (({alive _x} count units sqd1) == ({units inAreaArray [[9849.39,4380.98,0]20,35,200,true]} count units sqd1));
Among other things. And I'm afraid my limited abilities is starting to run out of options.
If anyone wants to pitch in, it would be greatly appreciated,
Cheers!
Discord highliting is almost the same like markdown
Why do you public variable the index? Are custom channels even global?
They have to be crated on server afaik
They are not public, I add the clients to the channel when they log in
And your problem is that radioChannelAdd accepts array as right operand
PG_radio_server radioChannelAdd [_player];
My mistake, in the script I did it this way
Well it works for me
Strange, have to figure it out
Also apparently yes, custom channels are global
Are you sure _player is really player?
yeah, otherwise he couldn't log in (would be lost in loading screen)
double check it
it's the valid player object, that is verified
Is there a "fisheye" effect in arma 3?
nope
the closest you can get is use a cinematic camera and set a high FOV value I suppose
Code works for me, problem should be something minor, double check everything
Will do this, thanks
I've found a solution in select, with the help of TestTubetheUnicorn on reddit.
{_x moveInCargo birdLeader} forEach (units sqd1 select {alive _x && _x inArea "marker_respawnArea"});
I'm aware that setdir removes all velocity, but what about setVectorDir?
iirc it keeps it
Interesting, any reason setdir removes it? Is just an engine limitation?
here's a ticket I made a long time ago: https://feedback.bistudio.com/T157653
so I think it means it keeps the velocity
I just tried it whit this and it stops the vehicle
0 spawn {
_vehicle = vehicle player;
_vel = velocity _vehicle;
_dir = direction _vehicle;
_speed = 300; comment "Added speed";
_vehicle setVelocity [
(_vel select 0) + (sin _dir * _speed),
(_vel select 1) + (cos _dir * _speed),
(_vel select 2)
];
sleep 2;
_vehicle setVectorDir [5,6,1];
};```
Might have different effects with different simulations.
Is there any way to force a player to lose target lock / force them to lock onto something else ?
Like on a uav or vehicle turret?
On a vehicle turret. IΒ΄m trying to put together a jamming script, and i want to force the player vehicle to either switch its marked target ( and by extension its target lock) or force it to unmark currently marked target
player allowdammage false;
for "_i" from 0 to 3 do {
_bumper = "B_Quadbike_01_F" createVehicle position player;
_bumper allowdammage false;
_bumper setposatl getposatl player;
} ;
_bike = "B_Quadbike_01_F" createVehicle position player;
_bike allowdammage false;
player moveindriver _bike;
Instant 'Get Arma'd' achievement.
even easier sqf vehicle player setvelocity [0,0,1000];
Okay, fair, I wasn't sure if it would be that easy π
I don't think there's a way to set target for the vehicle.
You could try disabling the sensors it's using to acquire the target, using enableVehicleSensor. Or you could use a Fired event handler to detect if it launches while jammed, and then setMissileTarget on the missile. (That one doesn't help with a lead prediction lock for guns, though)
_item in _itemArray
But the problem is that the item is written with lowercase letters, and in the array they are all uppercase, so the question is, is there a command that would allow to perform such a check ignoring registers?
You can set the vehicles turret camera position though. Just not seeing anything for locking yet. Might go through ace files to see what they did for their custom lock system.
Hi, I have never scripted before - how do I write a script which automatically reloads my weapon when the magazine has 0 bullets?
doesn't work π Would be too easy
What do you mean i got it that way
Then you also did something else
its not just velocity. Also don't cheat it :U Get it properly 
Ah, gotcha. Primary target for jamming is supposed to be aircraft, so gun lead still working wouldnΒ΄t be too much of a issue. Thank you for your help
If you put this in InitPlayerLocal.sqf it should work myb there is better way with EH but dont know:
0 spawn {
while {true} do {
if (needReload player == 1) then { reload player };
sleep 0.1;
};
};```
Ok, ill try to see if i can do something with that as well. Also if you decide to take a look at the ace lock system and find something, iΒ΄d appreciate if you could send it my way, it could be helpfull as well. Regardless, thx for the help.
Thank you so much! Where is InjtPlayerLocal.sqf? And this would only work for me right? Not anyone else in my server?
No that would work for everybody on the server.
initPlayerLocal.sqf is a file you'd create and put in your mission folder
Ok is there a version of this where only I will auto reload? If not that's ok thanks for your help π
params ["_player", "_didJIP"];
[_player] spawn {
params ["_myUnit"];
if(name _myUnit isNotEqualTo "myPlayerName") exitwith {};
while {true} do {
if (needReload _myUnit == 1) then { reload _myUnit };
sleep 0.1;
};
};
``` If you put this in initPlayerLocal.sqf i think it should work only for you. make soure you put the name corretly its caseSensetive.
Awesome thanks! So my profile name is just User hence I would put User instead of "myPlayerName" right?
Or do I change "_player" to User?
the first one.
Thanks!
so question with 2.4 we now have the drowned eh is there anyway to repair / dry out the engine via code? setdamage 0 doesnt seem to work on drowned vics
Fixed: Drowned cars could not start their engines even when fully repaired - FT-T169734
Do attachTo commands work on Terrain Buildings correctly?
private _nObject = getPos player nearestObject "Land_Building350_C";
_helperObject_M_1 = createVehicle ["Sign_Arrow_F",[0,0,0],[], 0, "can_collide"];
_helperObject_M_1 attachTo [_nObject, [0,0,0],"M_Wall_1"];
The Arrow is created but isn't getting attached to the building, however the building itself is being selected, Also tried the blow with the Building ID
private _nObject = [0,0,0] nearestObject 161734;
_helperObject_M_1 = createVehicle ["Sign_Arrow_F",[0,0,0],[], 0, "can_collide"];
_helperObject_M_1 attachTo [_nObject, [0,0,0],"M_Wall_1"];
Isnt the building the part of terrain and not object so you would need
https://community.bistudio.com/wiki/nearestTerrainObjects
nearestObject can detect terrain objects
(otherwise the Visitor ID syntax would be useless)
It does detect the terrain object, that is what I am saying
But it doesn'tappear to be able to attach the vehicle to a Memory point on said building
I believe you, I was responding to Legion
has attachTo ever been able to attach to arbitrary memory point?
Yes, Works on editor placed objects, not sure about Terrain objects hence the reason I am asking about it π
Anyone got any ideas?
Also tried SelectionPosition and nothing
Hi so Im having trouble with this script "sniper reveal target"
The sniper will only take out his range finder but he wont take out his rifle and shoot the target
I have the target placed about 1200 meters away, is that too long for the AI to locate?
Try this:
yourSniper reveal [yourGuy,4];
{ yourSniper setSkill [_x,1] } forEach ["aimingSpeed","spotDistance","spotTime"];
Where in that script would i put the target at?
Where did you put the sniper Reveal target ?
hold on one sec
im pretty sure i put it in the on activation in a trigger
let me check real quick that it was in that box
yeah i put it in the on activation box in the trigger
Are you shure that trigger activates ?
yes
whenever i activate the sniper he immediately pulls out his range finder but never pulls out his rifle
1200 metres is pretty far, the AI may just not feel it can make the shot
Has it got a good enough optic?
yea
yeah i think so
- Make sure sniper has good enough equipment to make that shot.
- Make sure there is nothing in between sniper and target. no objects/terrain objects
3.Make sure that trigger activates. Try putting systemChat "it triggerd" in activation just to double check.
4.Make sure your variables are correct and that there are no spelling mistakes.
Alr ill try that
i mean yeah its activating
but in this script, where do i put the word "target"
yourguy is the target
does the game know that
well actually i dont have the guy i want killed named target
i have him named "sniper"
but the guy named "sniper" is still the target that is supposed to be killed by another sniper named "sniper2"
well then in the code instead yourSniper put sniper2 and instead yourGuy put sniper.
https://community.bistudio.com/wiki/reveal
reveal is the command you are using.
sniper and target are (placeholder) variable names. Either name your relevant units sniper and target, or replace those names with what the units are actually called.
sniper2 reveal [sniper,4];
{ yourSniper setSkill [_x,1] } forEach ["aimingSpeed","spotDistance","spotTime"];
thanks
thanks
yourSniper is another placeholder that needs to be replaced with a reference to an actual unit
Yea what NikkoJT said you still have yourSniper in foreach loop replace that with sniper2.
alr so i tried it
this time he just kinda doesnt really do anything
he doesnt pull out his range finder he just still lays there
i dont know ill try it a few more times and give him more time to locate the other sniper
try myb puting target a bit closer to sniper and see will it take a shot but here is a video on how to do it:
https://www.youtube.com/watch?v=WXNL77_syf8&ab_channel=Ccrasus
any way to make the contact compass
true call BIN_fnc_showHorizontalCompass;
work in vanilla a3?
As far as I know, BIN_ functions are exclusive to the Contact Optional Component and don't exist in the vanilla game
I'd definitely consider that to be one of the ones that should be brought over to the main platform, but BI hasn't done it yet
Hey! So, I used a script Leo offered (in response to someone else's question) to replace a bunch of props with simple local objects, and placed it on initiserver.sqf.
But then, when my players joined the dediserver, objects weren't there. Cuz I guess they were created local on server, and I didn't think ahead haha. (For what it's worth, Leo's script originally didn't mean to create the simple objects as local, so not on him)
Would it be better to put that script that replaces objects with simple+local objects on initplayerlocal.sqf, so everyone gets a local copy of the simpleObject?
depends how the script works but the init local player file should work
Leo's script was this:
{
_pos = getPosWorld _x;
_o = createSimpleObject [getModelInfo _x#1, _pos];
_o setVectorDirAndUp [vectorDir _x, vectorUp _x];
_o setObjectScale getObjectScale _x;
_o setPosWorld _pos;
deleteVehicle _x;
} forEach getMissionLayerEntities "myLayer"#0;
I didn't think of it when I was making my op for my group, so I had to scramble a bit, re-make as Zeus a bunch of enemy fortifications. Bit of a whoopsy!
you should use init.sqf
the server must get the objects too
but 
that script also deletes the object
so JIP won't have the obj anymore
Got it.
Thought question: if the script deletes the objects as soon as script runs, wouldn't that preclude new players getting it?
Okay cool, I was thinking along right lines π
just a question guys did you increased the remote control distance with the latest update??? it was limited to 100 meters before but now it goes way beyond 100m
all the mentions of remote i can see in the changelog (that arent related to scripting commands)
Anyways, thanks Leo. I'll play around with seeing how to make it so JIP have the object too.
would it work if I put in that script in initserver.sqf, but add all the newly-created objects into an array with [position, type] for each object, then have a script in initplayerlocal.sqf that creates those objects?
Or am I over-thinking it?
you can remote exec that array yes. but I think there's a better solution
not 100% sure but mission.sqm should be accessible to everyone (or it's server only if I'm wrong)
so you still have access to object data without needing to remoteExec things
that's a bit more complicated tho
but if I'm right it's more efficient
Ohhh bc I wouldn't have network traffic if everyone can just access it, right.
anyway, for now let's do it the simple way:
_objData = [];
{
_pos = getPosWorld _x;
_du = [vectorDir _x, vectorUp _x];
_objData pushBack [getModelInfo _x#1, _pos, _du, getObjectScale _x];
deleteVehicle _x;
} forEach getMissionLayerEntities "myLayer"#0;
[[_objData], {
params ["_objData"];
{
_x params ["_m", "_pos", "_du", "_s"];
_o = createSimpleObject [_m, _pos, true];
_o setVectorDirAndUp _du;
_o setObjectScale _s;
_o setPosWorld _pos;
} forEach _objData;
}] remoteExec ["call", 0, true];
Nice yeah, that should work.
Thanks!
I've never messed around with mission.sqm at all so I have no idea.
But if there's a bit of network traffic when players join the server, shouldn't be too big of a deal, and it'll save network traffic later on with synchronizing all those objects.
well you can read its data using loadConfig command. it's a config and it looks like this:
class Entities
{
items=1;
class Item0
{
dataType="Layer";
name="Layer 1";
class Entities
{
items=3;
class Item0
{
dataType="Object";
class PositionInfo
{
position[]={6191.1216,5.8599319,4282.7065};
};
side="Empty";
flags=5;
class Attributes
{
};
id=2;
type="Land_PipeFence_04_m_gate_l_F";
};
...
Gotcha, cool. Will have to play with loadconfig then. Thanks, as always, Leo!
yeah I don't think it matters. the current solution is good enough (if I didn't mess up somewhere)
Can a hashmap has more than one indexes like x and y for one z output. index1: "STAND" + index2: "WALK" => noiseLevel: 5?
if they're strings you can just combine them and use them as key
another option is using arrays as key: _hashmap get [1,2,3] _hashmap get ["STAND", "WALK"], etc.
Now I get it [ [["STAND", "WALK"], 5], .. ] like this probably
yes
I've noticed when giving other vehicles the railgun with the addWeaponTurret command, the railgun charge does not appear. Does the railgun just have to be added through config or is there an extra step?
The T-100X has a unique weapon infopanel for the gunner's HUD which has the charge meter. You might be able to do some cutRsc / display / ctrl type stuff to manually spawn that and get rid of the normal one, but it'd be complex. Changing it "natively" can only be done through the vehicle's config.
The weapon itself will work, just without visually displaying the charge, as long as you remember to also add the fake version of the weapon and dummy version of the magazine.
@warm hedge Apologies for the ping, why can't I open the cheat menu in a server that I'm hosting? Not dedicated. Just over lan.
Potentially you could also find the function that handles the charge mechanic and figure out how to make your own meter. I haven't looked at it though so no guarantees it's possible
Already explained in the description
I don't see how this is helpful
I do have permission to open debug console
Then dunno. I've some reports especially in Antistasi Plus can't open/use it but haven't got a clue/fix
I am using antistasi plus
Doesn't work with Ultimate either
Antistasi community does not work either
@warm hedge Damn, is there any bypass to force the cheat menu to appear?
he just said he does not know
...any way of fixing the issue
but really, it's just a menu. So even if there is no graphics, maybe there's a way to enable the cheats regardless?
Β―_(γ)_/Β―
Ok it's not an Antistasi issue. I can't open the cheat menu in any multiplayer scenario at ALL
Tried it with 3 vanilla ones
Yet I have the debug console
Maybe I had some other limitation I don't remember. But anyways this is a scripting channel not my Mod's issue report channel
Is the mod actively worked on? This is pretty disappointing as it's such a nice mod and there is no real alternative
If I do I do
Anyone got any ideas?
I TBH don't think you simply shouldn't attach a helipad. Also a "slow" simulation objects like houses are not good to have an attached object
Does flyInHeightASL just not work? In the past it has frequently been bugged and broken. I find it mentioned on the bug tracker as recently as 2020.
Let's say I want an aircraft to fly at 300 meters above sea level, and only 300 meters above sea level. The wiki indicates that my script should be this flyInHeightASL [300, 300, 300]; on the init of the vehicle being flown. But this doesn't work at all.
Then how would you suggest adding an ace interaction to said house
What, that was the intention there?
Yes. Unfortunately ace interactions donβt work on the building due to its size
Then use other dummy object like Sphere Geometry
For sure. I wasnβt intending on using the arrows, I just wanted to use that to her a visual representation of the attach command
Hello guys, im trying to figure out how i would make a box spawner, like on a laptop scroll wheel to select a crate or something that is customised ammo
Yeah for ace crates
Certain crates, ammo for guns, vehicle spawner etc
- Use an addaction command on the object in question
- Use createVehicle with the classname and a position near the object. "NONE" parameter could help
- Clear out the contents of the box if desired (global commands needed)
So, I've checked some after some testing. In Antistasi and in a very certain context BIS_fnc_isDebugConsoleAllowed fails to detect that the player is allowed to open Debug Console. Very very strange and can't figure out why isUIContext returns false only in Antistasi
0 spawn {
isNil {
diag_log "let's try" ;
diag_log isUIContext ;
diag_log call BIS_fnc_isDebugConsoleAllowed ;
diag_log "am I doing good?" ;
} ;
} ;```
Returns:
```17:27:03 "let's try"
17:27:03 false
17:27:03 true
17:27:03 "am I doing good?"``` in Escape 10 Altis
```17:26:30 "let's try"
17:26:30 false
17:26:30 false
17:26:30 "am I doing good?"```in Antistasi
The code is ran on Debug Console
by wording of it isUIContext should return false when it's inside spawn, though 
Actually I only found out isUIContext a few minutes ago, and still no clue what and how is its job
i suppose some shenanigans with the same function being used both directly and as event handler for some UI control 
Oh wait a minute I was blind 
Okay... I get the idea why it doesn't work
Faulty is enableDebugConsole = 1; on Description.ext
And this very special context of calling it. Since I've spawn'd it, it fails to think I'm on a proper context
Okay fixed in a very stupid way π©
well, missionConfigFile >> "enableDebugConsole" can be overridden by "DebugConsole" mission parameter 
both https://community.bistudio.com/wiki/Arma_3:_Debug_Console#Order_of_Precedence and BIS_fnc_isDebugConsoleAllowed code seems to match at that
I don't really know why isUIContext has involved to check it is
for example, for it to be shown as a result of UI button being pressed and not some other random piece of code, i assume?
But it does not explain why BIS_fnc_isDebugConsoleAllowed has that
(IMO)
If it is allowed, it should be allowed in every context, no?
BIS_fnc_isDebugConsoleAllowed is involved to check if it is going to show the Debug Console in RscDebugConsole.sqf (for obvious reason) but it probably is really designed for only this purpose?
probably
class RscTitles
{
class PLP_ACM_DebugConsoleTest
{
idd = -1;
movingEnable = 0;
duration = 0;
fadein = 0;
fadeout = 0;
onLoad = "localNamespace setVariable ['DebugConsoleAllowed',call BIS_fnc_isDebugConsoleAllowed];";
class controls {};
};
};```Workaround 
I noticed there are two variants of the railgun cannon, one called "fake", and that's the one the T-100X is actually using (Eg; Config - https://i.imgur.com/GYswBXs.jpg ...hint (vehicle player currentWeaponTurret [0]) on T100X - https://i.imgur.com/pQr94VO.jpg
Comparing them in the config, the "fake" variant has way different values, and is missing some entries the "non fake" variant has.
Naturally I'd think to use the one not called fake, but since it's the one being used on the actual T-100X, I'm not sure which one I should use / what to expect here lol. Can anybody give a rough explanation?
"fake" is the one player sees. "Non-fake" is the one that actually fires 
i guess the reasoning is something like "fire the stuff on mouse button up without changing engine internals that fire selected weapon on mouse button down"
I was just messing around, tried adding both to a T-100 (non X), the fake one shows up but won't fire, "non-fake" just doesn't even show up. Will try adding both to see if it will fire, but it doesn't show the charge (bottom left of the weapon info HUD/UI panel 0%-110% thing) when you add cannon_railgun_fake + its ammo o.O probably why it's not firing lol.
have you added both mags?
just tried that (both turrets + both magazines) and it fires, still doesn't show the charge % though
I'm guessing that's in the vehicle's config
turretInfoType = "RscOptics_MBT_02_Railgun_gunner"; in turret's config, most likely
Also its a fnc and as far as i know the AI is not using it (the charging)
I let the AI play with it a bit and they were at least making the charging noise before firing
still, though. cpp class player: Mode_SemiAuto { showToPlayer=0; 
the AI does charge it just works a bit differently
the real ones firemodes have been set up so the AI will not use it (it was like 1m range)
the way the system works having looked at it when it was on RC is the 'fake' weapon is used to trigger the charge action, so when the fake gun is 'fired' the charging starts and continues as long as you hold the button down, once you let go the script then fires the (hidden) real gun
modifying the speed of the projectile depending on how long you held it down for
config for AI looks like "Hold Fire on the fake weapon for 2 seconds" 
yeah something like that
As far as I've come to understand, either yes, it's just being completely ignored and the command is bugged again (it has been many times in the past) or somehow I'm doing something very specific wrong.
Seems like it should be simple. Put in the init field of a vehicle this flyInHeightASL [300, 300, 300]; and the aircraft will fly at 300 meters above sea level. But then it just doesn't. There is no change in behavior compared to flying without the command present. It flies at whatever altitude it spawns at over ground level, so it bobs up and down over terrain.
Is this command supposed to be given to the init of the pilot? If that's the case, the wiki is wrong.
If it works for you, I'd like to know what you did differently.
or maybe "hold fake Fire on target" from config and "randomly fire after 4 to 10 seconds if target is still present" in per-frame handler 
[
"[- PULAU CORE -]",
"- Hallucinate",
{
params [["_position", [0,0,0], [[]], 3], ["_attachedObject", objNull, [objNull]]];
["hallucinate.sqf"] remoteExec ["execVM",_attachedObject];
}
] call zen_custom_modules_fnc_register;
this is supposed to execute the script only for _attachedObject, right?
or am i doing something wrong
because for some reason if i execute this on lets say a random ai unit
for some reason i as the server host get to see the effects too
it runs on the machine where _attachedObject is
That executes the script where it is local. AI are usually local to the server, so...
also inside the sqf, how would i best reference the player who is experiencing the hallucination.sqf?
right now its just player which im guessing isnt optimal
Hello,
If I have simple object attached to another object.
And I change the vector dir and up,
Is there any way to make it react on clients at the same time? is the only way to make the objects as local objects and change the vector up and the direction locally?
What's the issue at the moment? Long delay before update?
Yes.
About 1-2 sec
I will try it out. Thanks
I would like to use a RuggedTerminal_01_communications_F and spawn it per createVehicle, ive noticed that it says in the mission.sqm "property="OpenTerminal";" I've tried it with _terminal setAttributes ["property", "OpenTerminal"]; but that doesn't work, any idea?
That's not what setAttributes is for. https://community.bistudio.com/wiki/setAttributes
i've noticed that, but what command should be used for opening the terminal by script!?
animate or animateSource, probably. You could also look for a function like https://community.bistudio.com/wiki/BIS_fnc_dataTerminalAnimate (probably not that one exactly, that's for the terminal that was already in the game)
just tried those 3 commands, doesn't work (works on the old terminal but not the new ones)
animateSource ["Terminal_source", 100, true]
it seems to have a really really big phase range (so 100) and no anim duration (so true is needed)
So this in a trigger activation... it should wake up all the AI without starting simulation on like, placed fortifications and such, right?
{ _x enableSimulationGlobal true; } forEacheach units thisList;```
thisList is the units that activitated the trigger, which doesn't sound like it's going to be the units you wanted to activate.
also forEacheach
forEachAndEvery
oh hm
yeah
I realized my typo earlier but do I want { _x enableSimulationGlobal true; } forEach unit InArea thisTrigger ?
I just don't want a bunch of sandbags to suddenly kill my frames
units is a command that works in a specific way, which is...not like that.
https://community.bistudio.com/wiki/units
Try something like this:
allUnits inAreaArray thisTrigger;```
If you're only concerned with AI from a specific side, then you could use `(units west)` [or `east` / `resistance` / `civilian`] instead of `allUnits`.
Okay, thanks.
How i can move a position of scroll menu in Altis life to be like exile , Sorry if reading this is confusing, I'm not good at English.
not by scripting, but by modding
see #arma3_config
@winter rose can you reply the message and tag me plz
I do not know how to do what you ask
I know that config makers may help you
@winter rose Thank You very much
is there any way to remove the yellow smoke and whistle effect on the "BombDemine_01_Ammo_F"?
doubt it since that is part of the weapon config
Could it be created as simpleObject? 
yep that works
Helllo guys,
question how to add railgun to other vehicles?
i tried to add it and ofc being this game bohemia
this names
["60Rnd_75mm_RailGun_APFSDS_mag",[0]
["cannon_railgun"]
for ammo and weapon are not correct but the Dummy mag and Fake railgun are correct
but thats not an issue.
the issue is that it wont start the Charge sequence and only act as normal cannon shot
how can i add it so it work correctly with other vehicles , i wanna make railgun AA, you know just for ""FUN"" π
this addMagazineTurret ["60Rnd_75mm_RailGun_APFSDS_mag", [0]];
this addMagazineTurret ["RailGun_01_DummyMagazine", [0]];
this addWeaponTurret ["cannon_railgun", [0]];
this addWeaponTurret ["cannon_railgun_fake", [0]];```
you need both "real" and "fake" railguns and their mags. And you wouldn't get a charge meter without a config mod 
yay π π thx i will try
why to do it simply if you can make it difficult π
my guess: to make the fire-on-release and charging possible 
sort of gui related, sort of scripting related -- i cannot seem to set the colour of a nested control, is this a mistake i have made or is it not possible
i.e cannot set colour of fracture configFile >> "ace_medical_gui_BodyImage" >> "controls" >> "ArmRight" >> "fracture"
How do you set it?
ctrlSetTextColor
Dunno what control type that is but you could also try https://community.bistudio.com/wiki/ctrlSetForegroundColor
it previously worked fine when not nested but will try ctrlSetForegroundColor, thx
I assume by "nested" you mean in a controlsGroup?
well you can't nest controls
why not
theyre showing fine at the moment
aside from one which is probably due to me being a goober
(iv)
another daft question, if i want to use call compile but want the user to be able to just specify a function as well, how would i do that?
ah so if isnil returns true then call compile, else get the function out of string format or something?
well you didn't say what fnc is
as in specify
"systemChat 'hi'" or "kjw_fnc_hello"
then you can use isNil yes
how do you get the function out of that string? 
if (isNil _text) then {
_fnc = compile _text;
} else {
_fnc = missionNamespace getVariable [_text, {}];
if !(_fnc isEqualType {}) then {_fnc = compile _text;};
};
probably a good idea to have a function for that too then π
though theres probably one in ace common or something, will look
ah ace just macro it
probably best to not be doing this on each frame isnt it
forgot im eachframing it
wait i can just compile the stuff when i put it all into a hashmap i be a goober
and i shouldve been doing that regardless of the original format lmao
Hey guys,
How can I have a script detect/get the nearest prop that is immediately up front of a vic?
I'm writing a script so an engineering vic can delete dragons' tooth props/simple objects directly in front of the vic.
I'm playing around with first getting nearestObjects, then checking in order if element X of array is within a certain bearing from vehicle, and then outputting that, but dunno if others have a quicker/easier solution I'm not thinking of.
(rest of script would just delete that object if within X meters from vehicle)
inb4 nearestObject with radius of 2.5 meters with center at vehicle's front
sigh. See? I knew I was just making it more complicated than I needed to.
I tell ya, man, nobody's ever surprised to hear, when they see me do shit like this, that I do philosophy for a living lmao.
does anyone know how to setFlagAnimationPhase for the new argo flag ?? 0 set it underground while 1 set it just at the base of the pole, whichin its saying 1 should set it to the top of the pole
this was because the idc of those existing elements was the same 
dear lord i am so stupid sometimes
though what happens if two things have the same idc
the game fetches the first one it finds
and i assume it will look through all classes in the scope before going deeper?
wasnt working because i had put call _conditionFnc and vscode extensions dont check for function being defined 
i feel like an american president the way i be forgetting everything
it took me nearly 2 hours to fix that
Intended features*
They're suffocating obviously
What ended up being the issue?
Duplicate idcs or what?
i had removed show = 0; from a bunch of base classes when i really shouldnt have done
and forgot that i had done that
they all inherited from the background dude
Debug purposes I assume?
no i thought it was useless
it was not useless
my iv icon isnt working for whatever reason still
i suspect that could be due to it finding the nested one first but makes no sense why it would find the right tq/fracture ones first too
dude im such a fucking goober
i had noted the iv guis out
Ah that's rough
Feel that
im like 90% sure theres a way better method of doing it than this but its the least obtrusive for ace function editing
tho this method means people can have conditions for each limb so you hide one icon if another is present or w/e
thats minecraft's font ?π
yes
Ha ha, that's pretty cool
don't encourage him!
Ha ha, that's pretty okay
hey so i am trying to make a light source form after players enter an area, i have managed to get a script to do so and attached it to a floating object of witch i made invisible (object variable name is PC_20)
issue is the light source is on the ground and not floating like i wished, any ideas/ tips
var = [] spawn {light = "#lightpoint"createvehicle position PC_20;light setlightbrightness 1;light setlightcolor [1,1,1];light setlightambient [1,1,1]}
you create the lightpoint on PC's position (aka getPos)
try getPosATL
private _light = "#lightpoint" createVehicle getPosATL PC_20;
_light setLightBrightness 1;
_light setLightColor [1,1,1];
_light setLightAmbient [1,1,1];
β€οΈ thank you so much, i will try this in the morning, thank you so much
Hey, is there a better way to do this?
I have a waypoint that I want to delete the group and its vehicle upon reaching a location. Right now I have to add a variable for every single vehicle and then meticulously change the referenced variable in the delete waypoint code.
deleteVehicle tu22_1;```
Now, this works.
But it's kind of a pain in the ass.
It also doesn't work with like, respawn scripts, since the new vehicle spawned can't have the same variables as what works with above. What I _want_ is something that just automatically grabs the vehicle in question.
```something something something
_delete_vehicle = the one this squad using this waypoint is currently in
{_delete_vehicle deleteVehicleCrew _x} forEach crew _delete_vehicle ;
deleteVehicle _delete_vehicle ;```
private _groupVehicles = units _group select { not isNull objectParent _x } apply { vehicle _x }; // grab an array of vehicles per unit
_groupVehicles = _groupVehicles arrayIntersect _groupVehicles; // make array of unique items
{
deleteVehicleCrew _x;
deleteVehicle _x;
} forEach _groupVehicles;
{ deleteVehicle _x } forEach units _group; // for the remaining on-foot soldiers
Ooohh, this looks promising. I'll try it. Thanks.
Why not just use objectParent _x in the first line?
I was about to say, this does not appear to have worked. The vehicle nor its crew were deleted upon reaching the waypoint. I double checked to make sure I did in fact add the script to the waypoint, so yeah it's not working.
It assumes that _group is defined.
Ah. It is not.
_group should be whatever group is using the waypoint, and I do not know how to get that information either.
_group = group this should work in waypoint statements.
Now I could just give it a variable, but now we're back to square one and I might as well just use my original code where I define the vehicle with a variable. I'm trying to basically
see their vehicle? delete its crew.
Now delete the vehicle, too.```
Really?
Huh.
In waypoints statements, this is the group leader and thisList is in theory the units in the group.
why it doesn't just give you the damned group I don't know.
this should be good enough for what I am doing since there's already commands to delete the vehicle crew and the vehicle.
IIRC the waypoint statements also run if everyone in the group gets killed, which can be problematic.
I mean I can't think of a situation where the group would reach the waypoint while dead.
no, it runs the statements even if they don't reach the waypoint.

well that's screwy
waypoints have... quite a lot of that.
Alright well, first things first, let's try this. Probably helps that I have waypoints physically placed in Eden already.
private _groupVehicles = units _group select { not isNull objectParent _x } apply { vehicle _x };
_groupVehicles = _groupVehicles arrayIntersect _groupVehicles;
{
deleteVehicleCrew _x;
deleteVehicle _x;
} forEach _groupVehicles;
{ deleteVehicle _x } forEach units _group;```
or is it better to just go and replace _group with this everywhere?
well, in this case you could replace units _group with thisList instead, but whatever
obligatory:
:)
Thanks guys. This simplifies the hell out of the mission I am trying to make.
So to give a little spoiler for what I'm doing, spoiler tags if some of the people from my unit are spying on me here:
||I want to create a mission where a group of bombers fly in from off-map, carpet bomb a couple of sites (hence me asking earlier for code to force fire weapons; I still think there's probably a better way to do it but this works for now). The bomber and bombadier are the group that fly in under 'careless' behavior so they don't deviate when shot at, while the tailgunner is set to a different group that is 'aware' and also that tail gunner is grouped to escort fighters who follow the tailgunner, and therefore the plane. After bombing and fleeing to the exit point, the bomber is deleted, while the tailgunner is also deleted, but the remaining fighters then stay behind and go to a waypoint I set for them earlier to hunt other players in the skies.||
And boy oh boy does it look cool when it works.
I can imagine how you felt once it all finally worked. π

Now I'm trying to figure out how to better calculate where the bombs will fall. Right now I'm still dealing with the obnoxious issue of aircraft just flying at whatever altitude they want, and I do not know how to make this not happen.
@tulip ridge Please post the URL as a plain text not as a hyperlink, this is to prevent spam/scam. Thanks
Yeah I figured that's what it might have been
It it just any masked links or specifically links with the embeds hidden like <link>?
Our bot doesn't know what is the thing behind there. So we decided to block it entirely, since... this is free to join and free to post server. So I do believe
Fair enough
There are ways to blocked masked links but allow certain sites, been a bit since I set it up though
I think was recently introduced
Yeah, I've sent masked links without issues before
ay yo check this shit out
Skip to 4:14 if you just wanna see the carpet bombing at work.
@winter rose and @granite sky might be interested in seeing what I've been up to.
hi guys, I wanted to ask about the Warlords modules on Arma 3. The ones in vanilla not the mod on workshop(same author i think). I have a warlords mission and placed a few scripts I made to put a shop. The warlords modules add the request menu. The thing is my shops kinda cover the same things and I just dont wanna remove my shop but it just feels weird to have a shop and the request menu. They use the same currency, "bis_wl_funds". So I was hoping to either remove the request menu entirely, or just have it show Infantry. Any help is appreciated!
addMissionEventHandler ["Draw3D",{BIS_gearKeyPressed = true}] ;```Not a cozy way, but this bypasses the hold the inventory key detection
Wow that sounds like exactly what I need, but what part of that is the hold I part?
(findDisplay 46) displayAddEventHandler ["KeyDown", {
_key = _this # 1;
if (_key in actionKeys "Gear" && !(missionNamespace getVariable ["BIS_gearKeyPressed", FALSE]) && !(player getVariable ["BIS_WL_toSwitchSides", FALSE]) && (player getVariable ["BIS_WL_friendlyFirePunishmentEnd", 0]) == 0) then {
/*cutout*/
};
}];```This part of fn_WLClientInit.sqf does. The abovementioned my code will make it the `if` failed
Ohhhhh! Thank you so much!!!
Sorry, just another question. Where did you get that? I have no idea where to find fn_WLClientInit.sqf
addons\functions_f_warlords
noice indeed! may the Great Warthog bless your enemies with its Holy GAU-8 and all it carries!
Hi sorry just a follow up question... does this apply to AI aswell? I kinda want them to still buy assets
Never. Only player can access the menu, on the other words, this only prevents player to open menu, that's it
Thank you! This is perfect then!
the statements also run on every connected machine IIRC, so be careful with things that have global effect
anyone know of a way to make a Boat/landing craft go in a 100% straight line?
setVelocityTransformation π
boat setDir 90;
for "_i" from 0 to 1e10 do {
boat setPos (getPos boat vectorAdd [1,0,0]);
sleep 0.1;
};
I like how you threw setPos getPos in there
angry Leo in 3, 2, 1β¦
also slightly curious what 0 to 1e10 actually does
given that Arma can't count beyond 2^24
Maybe it works for infinite-looping in unscheduled code :P
stahp it!
I think a for-loop would still stop after 10k iterations, even if you type "from 1 to 1 million"
IIRC they don't, because they're considered finite.
ah yes, step 0 is a thing
It shouldn't
{} doesn't return bool for condition check
[{}, { true }, {}] then
oddly enough I cannot convince that for syntax to work at all.
Are you sure it's actually supported in A3 :P
for "_i" from 0 to 0 do {}; // will do once, with _i = 0
for "_i" from 0 to -1 do {}; // will not do
```from https://community.bistudio.com/wiki/for#Notes
(ah wait, step is not involved -_-)
0 to 1 step 0 never completes.
even in unsched?
slightly oddly, neither does 0 to 0 step 0
It's like they actually put an "optimization" in for step 0? :P
nope
this works: for [{1}, {true}, {1}] 
Hello everyone!
I would like to kindly ask you for a help with a script. The script is serverTime
https://community.bistudio.com/wiki/serverTime
And i am curious, what kind of number does that return. I expected something like hour:minute:second format but i was wrong. The script return a single number that keeps on increasing. Is the whole server time returned as number of seconds since server start? If so, after 2 hours of server being online that number will be more than 7200 ?
Yes. It's basically the same as time except server-synced.
is there any way to get how much skin a unit is showing that is ideally not performance heavy
trying again for my hypothermia shit
so the whole time thing is just a total number of seconds that can go all the way up to thousands if server is running long enough?
yes which is why servers need regular restarts
else things like cba and ace begin to break
that's not an issue in my case
under these circuimstances, is there a way to get server time in seconds only? without those decimals like miliseconds, etc.
wonderful! thank you very much!
Hello π everyone
I play a mode in Arma where 2 Zeus play against each other with the Zeus resource points (image 1.). I wanted to ask if someone could write a script/module so that by capturing or holding a point/sector the Zeus that has captured the sector gets Zeus resources every second/minute.
I want that when you take a sector, the side (Blueforce, Redforce, etc.) that holds the sector gets Zeus resource points every second or minute.
I would appreciate it if someone is willing to help on this
I have my Dm open. And am willing to pay if that's what it requires
Is there even a function to add resources to a specific zeus/side?
@coarse dragon - I wrote some scripts that guarantees boats will thread the needle wherever you want them to go. It heavily relies on setVelocityModelSpace IIRC. The good thing is that the complexity is hidden from mission maker who just places a boat and waypoints with a script call in them. Here's a demo video. There's a link there to BI forums and where to get demo mission for Cam Lao Nam. This script should be useful for DDAY landings I reckon. https://youtu.be/7NhTPoq3rJs
ARMA 3 Script that forces AI boats to follow their waypoints exactly. Using this script, AI can navigate any river that player can. We can now populate all those beautiful rivers in Cam Lao Nam busy AI civilian traffic, and combat boat patrols.
You can download the sample mission via link in this forum post:
https://forums.bohemia.net/forums/...
I made a script, but it doesn't work, i guess i made some syntax error but i'm not sure where. Can someone help me please? ```sqf
this setPlateNumber format["1PV %1", round [serverTime]];
serverTime shouldn't be inside an array
Trenches in Prairie Fire, Normandy, and Omaha Beach are building objects with path LODs for AI to navigate in the trenches. Is there some command I can use to determine path lod positions? I know I can find building positions, but I want to know if a unit is on a Path LOD between positions. Example, if a building path has right angle corner, and there is no building position at the corner, how can I find that path corner? For a given building object, is it possible to write a script that would create a series of helper objects one meter apart that maps out all Paths in the building object?
ok so how do i get that into the licence plate?
Just.......don't have it in an array.
At the moment, you are giving round an array containing one element (the value of serverTime). But round doesn't accept arrays, it only accepts numbers. So instead of giving it an array containing serverTime, just give it serverTime.
oh so you think i should remove those brackets [] ?
No, I know you should remove those [], because they denote an array, and round does not accept arrays
yeah sorry, i didn't realise that, just tested it it actually works, thank you! β€οΈ At first i wrote it without that but then i thought it's definitely wrong just to put command after command so i put that in there π€·ββοΈ
its not wrong to put command after command at all
You can use commands as arguments for other commands as long as you respect the order of operations: https://community.bistudio.com/wiki/Order_of_Precedence
If you want to override the order of operations and force a given command to be evaluated first, use (), not []. In this case, serverTime is a nular command, so it will automatically be evaluated before the unary round, so no override is needed.
oh wow theres a wiki article for that ive just been making it up as i go along
π thanks for tips
nope
i don't get why infantry class is left empty when trying to use inheritance: https://sqfbin.com/ridilakifalegacakena when I do count command on Infantry class it returns zero. any ideas?
that gives error message
Don't forget to try #arma3_config for config problems
I think you might for the inherits. For the definition you don't.
yea that's config in description.ext
inheriting something without changes is:
a new class that is useless
the exact same properties
I have an unusual problem caused by ACE which I'm trying to do a work-around for.
When a vehicle is destroyed, somehow the crew isn't affected. Sometimes, but not always, when this happens, you can't escape the vehicle but you're not dead. It happens to AI too. You're just stuck there. You can't even eject. I was wondering if there was a way to force all dead vehicles in my mission, including Zeus spawned ones, to exit all of its occupants when it becomes a wreck.
Alternatively, if anyone else knows how to just fix this problem, that would be nice too.
I noticed I can make AI get out of a dead vehicle by pressing G in Zeus. It even spits out dead occupants. So I assume it's possible.
you'd propably just have to run a script that every now and then adds event handler destroyed and use moveout on the occupants of the vehicle given ace propably has some issues with that
That sounds like the solution I would have to use; I just don't know what to write for that. I have a dreadful feeling I will have to finally get off my ass and start using external scripts also to make this happen.
Using this script I can choose to eject or maybe even use ACE commands to also severely wound the ejected units.
how would i hide a control (ctrlCreate) while the map is open?
one sec i can make a little script that may do what you're after given it might have issues with the wreck not being a vehicle anymore
I would hugely appreciate if you did that for me. Bonus points if it also uses ACE to severely wound any occupants being spat out of the dead vehicle.
(_layer call BIS_fnc_RscLayer) cutRsc
[
"YourDisplay", // Display
"PLAIN", // Normal, no extra effects
1, // Seconds to fade in resource
false // Show while in map
];
That'll hide the whole display
The intuitive solution (of mine) would be:
- You have the impact point
bombSitePos = getPosASL markBombSite;
- Then you have a while or onEachFrame cycle:
while (true) do {
private _bomberPosition = getPosASL bomber;
private _bomberHeight = _bomberPostition select 3 //Z value - height
private _bomberSpeed = (speed bomber) * (1000/3600); // In m/s
private _bomberToSiteDistance = _bomberPosition distance2d bombSitePos;
private _timeToHitGround = (_bomberHeight - (bombSitePos select 3)) /bombFallSpeed; //Speed in m/s - needs to be predefined
private _timeToReachBombSite = _bomberToSiteDistance/_bomberSpeed;
if (_timeToHitGround > (_timeToReachBombSite - 0.2) && _timeToHitGround < (_timeToReachBombSite + 0.2)) exitWith {};
sleep 0.05; // The sleep interval needs to be small enough (or the time range in if condittion big enough), so that the plane does not miss the drop point
};
//Dropping the bombs here!
- You need to make sure he is aligned with the bombing path. And you could probably improve this even more. Also you need to know the speed at which the bomb falls beforehand. It would be best to start this cycle one waypoint before the bomb dropping waypoint.
Well I assume ArmA uses real world physics to the best of its ability so gravity is probably the same.
Arma*
_para_grid = findDisplay 46 ctrlCreate ["RscStructuredText", -1];
_para_grid ctrlSetPosition [safezoneX+0.12*safezoneW,safezoneY+0.8*safezoneH,0.3*safezoneW,0.1*safezoneH];
_para_grid ctrlSetTextColor [1,1,1,1];
_para_grid ctrlSetFont "PuristaMedium";
_para_grid ctrlShow true;
_para_grid ctrlCommit 0;
_para_drone = player getVariable ['para_Drone', objNull];
while {remoteControlled player == driver _para_drone} do
{
_gridPos = mapGridPosition getPosATL _para_drone;
_para_grid ctrlSetStructuredText parseText format ["<t align='left' size='1' shadow='2'>%1 %2</t>", "GRID:", _gridPos];
sleep 0.01;
};
i mean how would i hide this if map is open?
also I'm being somewhat lenient when I say "r e a l w o r l d p h y s i c s"
in the game where if I crash into a tank with another tank I either fling into space or explode
game with random scripting errors*
oh sorry that is mainly arma 3
also guessing this command https://community.bistudio.com/wiki/fullCrew just returns everyone in the vehicle?
The alternate syntax lets you pick a specific role
yeah looking at the main syntax as i want to get passengers too
Then yes
Thank you kind sir
Might be true, but still, the bomb (projectile) is an object that has some sort of air friction and initial velocity. So you have to either look it up in the config file or measure it manually with a stop watch, or with some events using SQF code.
Although it's an array of a few different values, the first element (0th index) of each array is the unit.
If you just want the units you can do:
_unitsInVehicle = fullCrew _vehicle select
{
_x select 0;
};
That should be good, don't currently have arma open to test it
oh riiiight drag bombs are a thing 
Although you might just use the gravitational acceleration and try how precise it is. π Hopefully, it will be precise and reliable enough, so that you don't commit any war crimes. π
Now, I am not nearly clever enough to use well written scripts but if someone could make a carpet bomb waypoint/module addon that would be pretty heckin neato.
Although I think there's already a script waypoint that executes an outside SQL if you want.
I did imagine my janky solution would be probably better if I could calculate things like point of impact.
But alas, there is a reason I went to school for programming yet did not become a programmer. My brain is not wired well for it.
what i said originally is slightly wrong there is no destroyed eh but this should work (to the bi hit team about to hit me for the shitty formatting / system this was made in discord code box also have a feeling i overcomplicated it```sqf
ncl_var = 1;
private ncl_vehicles = [''];
private ncl_blacklist = [''];
while {ncl_var isequalto 1;} then {
sleep 30;
if !(ncl_vehicles in ncl_blacklist)
{
if !(_x == alive) then {
private _passengers = _x fullcrew;
({moveout _x;}foreach _passengers;}
ncl_blacklist pushback _x;
);
}foreach ncl_vehicles;
};
there is no destroyed eh
https://community.bistudio.com/wiki/Arma_3:_Event_Handlers#Killed works
lou's typing 
also if !(_x == alive) and _x fullcrew, no
typo should work now
if (!alive _x) / fullCrew _x
hello, I tried to place this in my initServer.sqf and now my game wont load haha. is initServer the right place?
does alive not works for vehicles?
vehicles arnt alive tho
for that you have canMove and canFire
from what he said here he is referencing a bug when vehicles are fully destroyed where you can't leave
For that you would just need the bomb fall speed, bomber height abose sea level and plane direction. You baiscally can then create a vector that points in the direction where the bomb would land. Assuming that the plane is not turning, rotating etc. - centrifugal force is not a factor.
That has actually been the most obnoxious problem for me. I can't make the planes fly level. flyinHeightASL just doesn't seem to work.
hi do u use no more aircraft bouncing? I was surviving plane crashes with ace while this was on. also the stuck thing
not me having the issue ace is asking im helping him
@raw vapor woops
It has nothing to do with that mod, though that mod does cause other problems. I removed it from my list. I still experience the problem with only ACE loaded. It has something to do with vehicle damage in ACE.
I changed settings and one of those settings is causing this.
oh okay! I removed the mod yesterday cuz I noticed this same problem, but it went away after removing it. I havent experienced it yet again, might happen tho
It did mitigate the problem by removing it, but I haven't had it stop happening entirely.
wait
-squint-
aircraft... bouncing
yeah i think it makes ur speed 0
my brain thought it was aircraft crashing
well I have this happen in ground vehicles also
Setting velocity to zero will only work on non physx aircrafts
It's rarer in ground vehicles because usually what kills ground vehicles has more than enough force to pen and murder everyone inside with how ACE damage works.
But it still happens.
yeah sry idk what happens really xD
Lol no worries
Im kinda new to mission editing and stuff, but am I to udnerstand that addMIssionEventHandler should be in initServer?
Nah
doesnt need to be?
It can be placed there if you want
Depends what you need it to do
Yeah depends on the context and what you are trying to achieve
addMissionEventHandler ["Draw3D",{BIS_gearKeyPressed = true}] ;
this supposedly
but I know its for players
initPlayerLocal?
or init is fine?
i placed it in initServer and im stuck on loading screen, so that probs not right
haha
That will only work on the server
A Draw3D should be clientside since the server doesn't draw anything.
However, I don't think that's right. It just means you're setting BIS_gearKeyPressed to true every frame.
Because initServer is only ran on the server
yes its to remove the request menu in warlords
yeah thats why I was kinda confused idk but I always thought eventhandlers go into initServer
xD
makes sense now
You should look at capturing the key so the menu doesn't open
if i understand it write can I just put it in init.sqf and write if(!isServer)?
so sorry im kinda new. I was given this snippet here and I just woke up so I went to test it
my original question was how to disable request menu
or at least everything except the infantry
but Im okay with this solution xD
thanks btw! ill try to make this work
is there any list of files that are triggered by event (onrespawn initplayerlocal) type events?
#include "\a3\ui_f\hpp\definedikcodes.inc"
findDisplay 46 displayAddEventHandler ["KeyDown",
{
params ["", "_key"];
// change DIK_ESC to what every key warlords is using
_key == DIK_ESC;
true
}];
@wooden dove
you can use this to capture the key so that key press does happen later
tho that can be "dangerous" depending on the context
Hi just wanna clarify, warlords uses hold I down. Is KeyDown the same?
the script POLPOX gave me earlier works. There's no request menu, but warlords will display a text "Hold I to open request menu" and this only goes away after you hold I the first time, but it just stays on screen now that I cant open the request menu xD.
How to activate the parachute of the new space ship object via script?
space ship object?
Added: Space Capsule props (Project Argo)
from the last update
wow that's cool
sry idk how to help, was just curious
found it out myself
if(_value isEqualTo true)then{[_this] spawn BIS_fnc_Spaceship_attachParachute;}else{_this call BIS_fnc_Spaceship_removeParachute};
sorry, @simple trout IDK WHAT TO DO HAHA. I changed DIK_ESC to DIK_I and it worked but now I cant press anything except I haha. also when I tried "i" I get an error.
https://community.bistudio.com/wiki/DIK_KeyCodes muhahaha "first!" @simple trout
ohhh its a thing
(sorry for the filter @simple trout , I removed your Discord temp mute βοΈ)
not sure if im understanding it right
I use ur script instead of the one POLPOX gave me? or together with it?
it does but the text to open the request menu kinda spams until u press I
and your seems to avoid that?
i think
well yeah, it will capture the key event, so nothing else will happen if that is pressed
so I placed this in my init.sqf and I can mvoe around now but I can still open the request menu and press I for inventory. No errors though.
did I do something wrong?
this is on dedicated server btw. Do i need to run it on server as well?
No it should be on the clients
So what is the key for the request menu?
Is it really I?
Hold down I
now that I look though, POLPOX also used KeyDown. Is there a difference with hold down I and I?
this is what he was looking at though in the Warlords files
maybe warlords is overwriting it? idk how it works
hahha
ok if I'm understanding this correctly you just want to remove all non-infantry items from a default warlords missions in the request menu.
directions for default warlords:
- undo everything you have done do far.
- Open up the "fn_WLclientInit.sqf" file
- Comment out lines 84 - 87 they look like this:
if (count (JEZ_WL_purchasable select 3) > 0) then {player createDiaryRecord ["JEZ_WL_purchase", ["Defences", _purchaseMenu select 5]]};
if (count (JEZ_WL_purchasable select 5) > 0) then {player createDiaryRecord ["JEZ_WL_purchase", ["Naval", _purchaseMenu select 8]]};
if (count (JEZ_WL_purchasable select 4) > 0) then {player createDiaryRecord ["JEZ_WL_purchase", ["Aircraft", _purchaseMenu select 7]]};
if (count (JEZ_WL_purchasable select 1) > 0) then {player createDiaryRecord ["JEZ_WL_purchase", ["Vehicles", _purchaseMenu select 2]]};
I haven't tested this, but it should make it so clients can't see any non infantry items in the request menu.
@_@
wait sorry I just wanna understand this right...
if I edit that file
wont it stop the a3 key from working?
a3.bikey i mean
sorry imm kinda new to coding in general not sure if its obvious
you need to open the request menu to play warlords
oh sorry i mean like...i thought we werent suppposed to edit the arma 3 files
i just really play around with the files in the mission folder
ill try this tho right now
just wanna confirm tho, you want me to open the functions_f_warlords.pbo then edit the fn_WLclientInit.sqf then repack into the functions_f_warlords.pbo?
yes, you aren't going to be able to get warlords to do what you want through just the eden editior.
ohh okay makes sense now
how does this work for other players though?
do I need to tell ppl in my server to do the same?
no. it will work for everyone when they join the server.
thanks so much! sorry for all the questions! I learned alot today haha
also does this disable the vehicles for AI also?
or just players
actually nvm
ill go test it
thanks again!
I'm learning stuff too, this is only the second time ever I've looked at the default warlords code π
sorry I cant find the lines you're tlaking about
also nothing with the JEZ_WL tag
not sure if its the same file
this is from the addons folder in arma 3
what Warlords mission are you running?, thats not the original warlords file.
oh im not running a warlords mission actually. I just made a mission from scratch and placed the warlords modules
since it doesnt require the addons
should I be using the mod on workshop instead?
isnt Josef Z, Jezuro?
if you look for a request or purchase list, they look for the items I listed above in my comment you'll find the code section
thanks! ill keep looking
is the mod better than the arma 3 modules?
i assumed the arma 3 modules were more current
I don't know to be honest, I've never played with the modules in the editor and I've never played the default warlords addon.
the code you need to comment out will be there somewhere though, just need to search a bit.
alright! thank you! this has been very helpful
Im being real dumb right now, but what can I set as the condition of an addAction so its only accessible to the vehicle's driver? Addaction would go in vehicle's init.
driver this isEqualTo player
oh, Im definitely dumb haha
replace this with _target for an action condition
oh yea
yeah, did that already.
I was trying some variation of "driver _target == _caller" but that did the trick
That would work except that the default name for the caller is _this, not _caller
ah gotcha.
_caller is the one for holdActions
shhhhh. I know that biki page well. Just apparently forgot what variables are accessible for condition...
π
Cool!
I'm just playing around with turning it from addAc to holdAct, but wanna add a further condition for holdaction to show.
namely, I want the vehicle to be within 2m of some type of object.
Would it work if I did, as condition,
"driver _target isEqualTo player && _target distance nearestObject [_target, 'someclassname'] < 4"?
basically, condition is that you have to be the driver and you gotta be close to an object of some type?
NEVERMIND, worked around it
no its not. That file is more recent. if you search all the files for something like Defense. you'll find a section of code that is parse items for the request/purchase/gear menu that has vehicles, defense, aircraft, etc listed.
you need to comment that section out. Unfortunately I don't have access to a Warlords mission made via the eden editor right now to search for you. π’
no worries! i dont really want to hassle you for this haha
this makes more sense
thank you!
im sure i can find it in these files
whatever editor you are using should have a "search all files" function somewhere to make it easy.
yea that might work, just comment out those 4 lines under funds
π€ I hope I didn't just totally break your mission. this weekend I'll build a warlords mission in the editior so I have some matching code to help the next person π
hahaha
im hoping it doesnt break arma3
cuz im changing a file in the base game
hahaha
sorry this is really sketching me out
isnt the bisign there to check if the functions_f_warlords.pbo was changed?
and siince i changed it
wont it not work?
this is in the addons folder of arma 3
I'll deffer to someone smarter than me on this topic. I've never touched a pbo in arma 3.
hahahah i mean I feel like this will fix it, but something in the back of my head keeps telling me not to touch the vanilla arma 3 files
You shouldn't modify base game files.
Aside from the possibility of breaking your own game, such changes don't work properly in multiplayer - changes to your local files are not synchronised to other clients or the server, signature checks may fail, and other interesting problems.
If you need to change functions from the base game, you should make a mod that overwrites them, not manually change the existing game files.
If you don't pbo your files, you shouldn't have any problems to be honest. I host 30 warlords missions without pbos, just upload the files on the server.
i dont actually haha its just all in my mission folder as well
so editing pbo's is very unfamiliar to me
i only know how to pack them
for the sever
the mission files i mean
That's not the issue. They were going down the path of modifying the actual Arma 3 game PBOs. Not PBO-packed missions, the PBOs comprising the main Arma 3 install. That causes problems.
Here is a better solution for you check out the warlords wiki it has a list of warlords missions hosted on github:
https://github.com/korbelz/WarlordsReduxMe.altis/wiki/Warlords-missions-on-github
