#arma3_scripting

1 messages Β· Page 103 of 1

polar belfry
#

so it deleted the unit

#

but now I'm stuck watching the wreck

#

no scroll wheel commands

winter rose
polar belfry
#

found it

#

deletes unit, gives control to player and goes back to first person

winter rose
#

hmmmyeah it will make the player go to internal camera even if a UAV enters that trigger

polar belfry
#

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?

winter rose
#

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)

polar belfry
#

so how do I make it so only the UAV 1 driver gets his camera switched

#

_x player switch camera "internal" ?

winter rose
#

stop asking ChatGPT

polar belfry
#

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

next falcon
#

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.

little raptor
#

are you sure they're correct?

next falcon
#

Looking at these names I reckon you can only hide the glass...

little raptor
#

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 blobdoggoshruggoogly

little raptor
#

well yeah but when I tried to do it on the doors it still didn't work

simple trout
#

Yeah, there seems to be no hide source for the doors

#

in the model.cfg

polar belfry
#

the jammer script stops working when I put as a condition if something is alive or not

sullen sigil
#

what is jammer2

hallow mortar
#

An antenna object. It's in the second picture.

polar belfry
#

with just "this" it works

#

I want to make it so in case the jammer object is destroyed the players can call drones

wicked sparrow
#

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}.

winter rose
polar belfry
#

is there a way for both to work both the " present anybody" and the "alive jammer2"

winter rose
winter rose
polar belfry
#

I used &&

winter rose
#

yep, that's good too

polar belfry
#

give me a sec cause it didn't work with the &&

winter rose
#

that's not what is on the screenshot you sent though

polar belfry
#

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

winter rose
#

nope, because player is involved

polar belfry
#

roger that

drowsy geyser
tulip ridge
#

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

https://sqfbin.com/riqupekiqazohafuxage

https://sqfbin.com/ipiqeguyotahecogelaf

sullen sigil
#

just use cba events

winter rose
tulip ridge
tulip ridge
sullen sigil
#

global event

winter rose
tulip ridge
sullen sigil
#

sure

sullen sigil
#

hey lou can you add emojis

winter rose
#

mine only

#

hue hue hue

sullen sigil
#

add :mmyes: for when people do not use sqfbin

#

it reflects the emotion perfectly

winter rose
sullen sigil
#

hell yeah

#

thank you lou

simple trout
#

that's beautiful

winter rose
#

hmmyes is ok?

sullen sigil
#

it is perfect

simple trout
#

single-handedly made the server better

sullen sigil
#

i do that merely with my presence

winter rose
#

thanks btw πŸ˜„

#

also added it to BI's internal chat 😁

sullen sigil
#

that is perfect

dusk geyser
#

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

winter rose
#

note that it may "heal" people's legs too πŸ™ƒ

sullen sigil
#

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)

dusk geyser
sullen sigil
#

I feel like an idiot
youll be a brilliant arma modder then

spring hinge
#

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

warm hedge
#

You're in 2.12 I assume

spring hinge
#

Latest profiling, yeah

warm hedge
#

Then you are

spring hinge
#

Yep

#

But it seems odd that official A3 syntax does not work

warm hedge
spring hinge
#

?

warm hedge
#

You see 2.14 there?

spring hinge
#

Yep

warm hedge
#

Which means not available in 2.12

spring hinge
#

The page linked is 0.50

#

Which is where I get the code from

warm hedge
#

Urm

#

0.50 is the introduced version

#

2.14 introduced the alternative syntax

spring hinge
#

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?

warm hedge
#

Next stable yes

spring hinge
#

Also, how did you find out when it's introduced, so I can check myself next time?

warm hedge
#

Most likely the article says

#

In this case, it does

spring hinge
#

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

warm hedge
#

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

spring hinge
#

I take it the alternative syntax is there exactly for this problem, as it forces the helo to do this exact thing?

warm hedge
#

AFAIK yes

spring hinge
#

So aside from recording the flights, no way to do it, right?

warm hedge
#

In 2.12, I guess yes

spring hinge
#

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?

crude needle
spring hinge
#

How would that happen? Besides, I can get it to stop, just not maintain say, 15 meters attitude, the damn thing goes up

queen cargo
#

@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

spring hinge
#

Then I fastrope, and it starts going up, so lots of broken legs and shit

crude needle
#

Velocity is three dimensional.

vehicle setVelocityModelSpace [0,0,0];
spring hinge
#

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

crude needle
#

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.

spring hinge
#

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

crude needle
#

Could use setVelocityTransformation to achieve that.

spring hinge
#

Aha

hallow mortar
#

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.

little raptor
#

Well if you don't want to play multiplayer there's no harm in switching to dev branch right now

manic flame
#

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

little raptor
#

it kept updating

manic flame
#

so it has to be scripting

#

there's so much contact scripting content that's undocumented 😦

little raptor
little raptor
still forum
spring hinge
#

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

still forum
#

No, its in engine code, and the game isn't open source

calm charm
#

how do I check if a vest has a proxy? e.g. for the pistol holster?

sullen sigil
#

selectionnames

calm charm
little raptor
tranquil nymph
#

@tough abyss Sounds like the unit I play with :P

#

We make all out scenarios in house though

gleaming rivet
#

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.

calm charm
#

we're should I call CBA_fnc_addPlayerEventHandler? On each player or on the server?

sullen sigil
#

each player

tulip ridge
#

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

proven charm
tulip ridge
#

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

proven charm
#

if default is 0 that should mean no max dist

tulip ridge
#

Yeah but the sound still gets quieter as you get farther away

#

Looks to be around volume * ~450-500 meters

proven charm
#

yeah that's another thing

tulip ridge
#

Yeah, wasn't really sure how to word it

proven charm
#

I thought max dist means clip distance... like if 10m then people at 15m cant hear a thing

hallow mortar
#

It does

tulip ridge
#

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

calm charm
#

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;```
hallow mortar
#

I believe it's an animation, usually called zasleh

kindred lichen
#

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.

drowsy geyser
#

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?

stable dune
drowsy geyser
#
_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?

warm hedge
drowsy geyser
#

Select random player set a variable on that player and execute some code

warm hedge
#

What prisoner said

  1. init.sqf runs on EVERY computer (I guess headless too)
  2. So you want to limit this script into the server so it ensures it runs only once
  3. initServer.sqf is a way indeed
  4. to select a thing from an array, selectRandom is the best way
south swan
#
  1. _players pushBack allPlayers; would result in array-in-array. _players = [[alice, bob, headless1,...]];. So either selectRandom or anything else would just select the internal array as it's the only content of the _players blobdoggoshruggoogly
drowsy geyser
#

So just do _players = allPlayers; ?

south swan
#

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.

slow brook
#

Is anyone else using missionProfileNamespace and seen that the saveMissionProfileNamespace has stopped storing to the vars file? saveProfileNamespace still seems to work fine.

south swan
#

seems to work for me on the current dev build tanking <missionName>.vars gets created in the profile folder and contents are there

slow brook
#

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;
south swan
#

literally your code (prepended with _variable definitions) works for me on release build as well πŸ€·β€β™‚οΈ

slow brook
#

this is weird... alright

shell cipher
#

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

slow brook
#

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

proven charm
slow brook
#

timing for this is called unscheduled, so it will happen when it happens.

still forum
#

Can you check if the file on disk is being updated when you call save?

#

maybe its corrupted?

proven charm
#

or too early at start...

sharp grotto
#

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)

granite sky
#

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.

slow brook
#

Im on linux funnily enough.. I'm trying to figure out where the profile vars is being stored now

little raptor
#

probably should've led with that πŸ˜…

slow brook
#

Β―_(ツ)_/Β―

#

Ok completely new servername, you can see this does store data and create the file

slow brook
#

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

still forum
#

Interesting. Maybe something with filename

#

What's the filename of it?

slow brook
#

TestServer.vars

little raptor
#

isn't that the profile namespace one? think_turtle

slow brook
#

MissionProfileNamespace

#

Set through MissionGroup

dreamy kestrel
#

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...

winter rose
tough abyss
#

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

tough abyss
#

thanks lou (i wonder how many times that has been said)

dreamy kestrel
#

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.

still forum
# slow brook

Maybe try naming it lowercase. so "testserver"
also it being same as the profile name might be bad

dreamy kestrel
dreamy kestrel
# dreamy kestrel let me know if I can clarify at all, does not seem like that difficult a questio...

@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.

winter rose
#

idk

tardy remnant
#

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.

dreamy kestrel
# winter rose idk

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]
  ]
]
tardy remnant
dreamy kestrel
ornate whale
#

Is it possible to get info about a projectile with some command?

little raptor
#

what kind of info?

ornate whale
#

ammo type

little raptor
#

projectile is already an ammo tho

ornate whale
#

typeOf?

little raptor
#

if you mean its classname, typeOf

#

yes

robust sparrow
#

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.

split oxide
shut flower
#

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.

warm coral
#
[
  "[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
south swan
#

remoteExec ["ace_interact_menu_fnc_createAction"] is wrong, the function needs to be called πŸ€·β€β™‚οΈ

warm coral
#

oh

#

how would i do that globally?

#

tried remoteexeccall but got a similar error popup

blazing zodiac
#

@kindred lichen Go to settings, library settings, then ROL at the bottom.

south swan
#

just call

#

or put the entire create-and-add-action code into single remoteExec

golden cargo
#

probably replace this with _attachedObject

warm coral
warm coral
warm coral
#

so i have to use this

south swan
#

why wouldn't they? createAction returns valid array that can be passed as a parameter to the second remoteExec blobdoggoshruggoogly

warm coral
#

sorry wdym with why wouldnt they?

south swan
#

i mean literally

createAction returns valid array that can be passed as a parameter to the second remoteExec

warm coral
#

so u mean i should use the vanilla createAction instead of ace yes?

south swan
#

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 ace_interact_menu_fnc_createAction sorry, misread on my end

#

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",... blobdoggoshruggoogly

warm coral
#

but seems to be working now

#

gonna test later with a few friends

#

thx a lot for your help

south swan
#

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

meager granite
#

@shut flower You need to have player added to channel's units list with radioChannelAdd command

shut flower
#

I'm already in the channel

#

Did it the way you wrote here

robust sparrow
dry quiver
warm hedge
#

Would be great if you can tell what are

  1. intention
  2. what you've done so far
  3. or any available options
dry quiver
#

I have looked at basically every link there is on the matter

#

Which isn't a lot :/

dry quiver
#

oh, cool. I will definitely check this out later.

#

But for now, do you have a snippet that can fulfill my requirements?

warm hedge
#

No at the moment

#

But the Mod should have both infinite ammo and no recoil cheat

dry quiver
#

@warm hedge Mod is awesome. Thank you so much.

meager granite
#

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 ^

dry quiver
#

invincibility does not work with ace, for some reason :p. It's just player allowDamage false

warm hedge
#

No, it uses other way IIRC. But ACE is never considered, and will never

dry quiver
#

@warm hedge My only other complaint would be that you have to enable all the cheats again after a restart. Very tedious.

meager granite
#

(no idea how to post code here like you did)

shut flower
#

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

digital hinge
#

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!

shut flower
#

Discord highliting is almost the same like markdown

meager granite
#

Why do you public variable the index? Are custom channels even global?

shut flower
#

They have to be crated on server afaik
They are not public, I add the clients to the channel when they log in

meager granite
#

And your problem is that radioChannelAdd accepts array as right operand

#

PG_radio_server radioChannelAdd [_player];

shut flower
#

My mistake, in the script I did it this way

meager granite
#

Well it works for me

shut flower
#

Strange, have to figure it out

meager granite
#

Also apparently yes, custom channels are global

#

Are you sure _player is really player?

shut flower
#

yeah, otherwise he couldn't log in (would be lost in loading screen)

meager granite
#

double check it

shut flower
#

it's the valid player object, that is verified

drowsy geyser
#

Is there a "fisheye" effect in arma 3?

winter rose
meager granite
#

Code works for me, problem should be something minor, double check everything

shut flower
#

Will do this, thanks

digital hinge
formal stirrup
#

I'm aware that setdir removes all velocity, but what about setVectorDir?

little raptor
#

iirc it keeps it

formal stirrup
#

Interesting, any reason setdir removes it? Is just an engine limitation?

little raptor
#

so I think it means it keeps the velocity

fleet sand
granite sky
#

Might have different effects with different simulations.

timid swallow
#

Is there any way to force a player to lose target lock / force them to lock onto something else ?

timid swallow
# fair drum 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

manic sigil
#
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.

fleet sand
manic sigil
#

Okay, fair, I wasn't sure if it would be that easy πŸ˜›

hallow mortar
last rain
#
_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?

fair drum
#

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.

brazen cobalt
#

Hi, I have never scripted before - how do I write a script which automatically reloads my weapon when the magazine has 0 bullets?

still forum
fleet sand
still forum
#

Then you also did something else

#

its not just velocity. Also don't cheat it :U Get it properly angrycat

timid swallow
fleet sand
timid swallow
brazen cobalt
fleet sand
tulip ridge
brazen cobalt
fleet sand
brazen cobalt
brazen cobalt
#

Thanks!

tough abyss
#

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

south swan
#

Fixed: Drowned cars could not start their engines even when fully repaired - FT-T169734
tanking

tough abyss
#

i see why it wasnt working

#

my game didnt update lel

still forum
#

setHitpointDamage on engine also works

#

I think the FT ticket says that

wise frigate
#

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"];
hallow mortar
#

nearestObject can detect terrain objects

#

(otherwise the Visitor ID syntax would be useless)

wise frigate
#

But it doesn'tappear to be able to attach the vehicle to a Memory point on said building

hallow mortar
south swan
#

has attachTo ever been able to attach to arbitrary memory point?

wise frigate
#

Anyone got any ideas?
Also tried SelectionPosition and nothing

mystic hawk
#

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?

fleet sand
mystic hawk
fleet sand
mystic hawk
#

im pretty sure i put it in the on activation in a trigger

#

let me check real quick that it was in that box

mystic hawk
fleet sand
mystic hawk
#

whenever i activate the sniper he immediately pulls out his range finder but never pulls out his rifle

hallow mortar
#

1200 metres is pretty far, the AI may just not feel it can make the shot

#

Has it got a good enough optic?

mystic hawk
#

yea

mystic hawk
fleet sand
#
  1. Make sure sniper has good enough equipment to make that shot.
  2. 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.
mystic hawk
#

Alr ill try that

mystic hawk
fleet sand
mystic hawk
#

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"

fleet sand
hallow mortar
#

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.

mystic hawk
#

sniper2 reveal [sniper,4];
{ yourSniper setSkill [_x,1] } forEach ["aimingSpeed","spotDistance","spotTime"];

hallow mortar
fleet sand
mystic hawk
#

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

fleet sand
mystic hawk
#

ye thats the vid i was using

#

ill just put the target a bit closer

drowsy geyser
#

any way to make the contact compass
true call BIN_fnc_showHorizontalCompass;
work in vanilla a3?

hallow mortar
#

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

pulsar pewter
#

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?

tough abyss
pulsar pewter
#

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!

little raptor
#

but think_turtle
that script also deletes the object

#

so JIP won't have the obj anymore

pulsar pewter
#

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 πŸ˜„

drowsy geyser
#

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

little raptor
#

dunno. I think KK was working on those

tough abyss
#

all the mentions of remote i can see in the changelog (that arent related to scripting commands)

pulsar pewter
#

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?

little raptor
#

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

pulsar pewter
#

Ohhh bc I wouldn't have network traffic if everyone can just access it, right.

little raptor
#

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];
pulsar pewter
#

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.

little raptor
#

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";
                };
...
pulsar pewter
#

Gotcha, cool. Will have to play with loadconfig then. Thanks, as always, Leo!

little raptor
ornate whale
#

Can a hashmap has more than one indexes like x and y for one z output. index1: "STAND" + index2: "WALK" => noiseLevel: 5?

little raptor
#

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.

ornate whale
#

Now I get it [ [["STAND", "WALK"], 5], .. ] like this probably

little raptor
#

yes

formal stirrup
#

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?

hallow mortar
#

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.

dry quiver
#

@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.

hallow mortar
warm hedge
dry quiver
#

I do have permission to open debug console

warm hedge
#

Then dunno. I've some reports especially in Antistasi Plus can't open/use it but haven't got a clue/fix

dry quiver
#

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?

winter rose
#

he just said he does not know

dry quiver
#

but really, it's just a menu. So even if there is no graphics, maybe there's a way to enable the cheats regardless?

winter rose
#

Β―_(ツ)_/Β―

dry quiver
#

Tried it with 3 vanilla ones

#

Yet I have the debug console

warm hedge
#

Maybe I had some other limitation I don't remember. But anyways this is a scripting channel not my Mod's issue report channel

dry quiver
warm hedge
#

If I do I do

warm hedge
#

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

raw vapor
#

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.

warm hedge
#

Doesn't work how?

#

It just ignores it?

wise frigate
warm hedge
#

What, that was the intention there?

wise frigate
#

Yes. Unfortunately ace interactions don’t work on the building due to its size

warm hedge
#

Then use other dummy object like Sphere Geometry

wise frigate
#

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

fickle sigil
#

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

warm hedge
#

What is a box spawner?

#

Ammobox?

fickle sigil
#

Certain crates, ammo for guns, vehicle spawner etc

manic kettle
#
  1. Use an addaction command on the object in question
  2. Use createVehicle with the classname and a position near the object. "NONE" parameter could help
  3. Clear out the contents of the box if desired (global commands needed)
warm hedge
#

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

south swan
#

by wording of it isUIContext should return false when it's inside spawn, though tanking

warm hedge
#

Actually I only found out isUIContext a few minutes ago, and still no clue what and how is its job

south swan
#

i suppose some shenanigans with the same function being used both directly and as event handler for some UI control blobdoggoshruggoogly

warm hedge
#

Oh wait a minute I was blind meowfacepalm

#

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 😩

south swan
#

well, missionConfigFile >> "enableDebugConsole" can be overridden by "DebugConsole" mission parameter notlikemeow

warm hedge
#

I don't really know why isUIContext has involved to check it is

south swan
#

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?

warm hedge
#

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?

south swan
#

probably

warm hedge
#
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 ![notlikemeow](https://cdn.discordapp.com/emojis/700311897937018890.webp?size=128 "notlikemeow")
fierce marlin
#

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?

south swan
#

"fake" is the one player sees. "Non-fake" is the one that actually fires blobdoggoshruggoogly

#

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"

fierce marlin
#

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.

south swan
#

have you added both mags?

fierce marlin
#

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

south swan
#

turretInfoType = "RscOptics_MBT_02_Railgun_gunner"; in turret's config, most likely

carmine sand
#

Also its a fnc and as far as i know the AI is not using it (the charging)

hallow mortar
#

I let the AI play with it a bit and they were at least making the charging noise before firing

south swan
#

still, though. cpp class player: Mode_SemiAuto { showToPlayer=0; blobcloseenjoy

ivory lake
#

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

south swan
#

config for AI looks like "Hold Fire on the fake weapon for 2 seconds" tanking

ivory lake
#

yeah something like that

raw vapor
# warm hedge It just ignores it?

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.

south swan
#

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 notlikemeow

warm coral
#
[
  "[- 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

winter rose
hallow mortar
#

That executes the script where it is local. AI are usually local to the server, so...

warm coral
#

ohhhh

#

that makes sense

#

ill test it out in server

warm coral
#

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

stable dune
#

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?

granite sky
#

What's the issue at the moment? Long delay before update?

stable dune
winter rose
#

refresh rate is based on what it is attached to

#

force it by remoteExec otherwise

stable dune
#

I will try it out. Thanks

dry python
#

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?

hallow mortar
dry python
#

i've noticed that, but what command should be used for opening the terminal by script!?

hallow mortar
dry python
#

just tried those 3 commands, doesn't work (works on the old terminal but not the new ones)

south swan
#

animateSource ["Terminal_source", 100, true] blobdoggoshruggoogly it seems to have a really really big phase range (so 100) and no anim duration (so true is needed)

molten yacht
#

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;```
granite sky
#

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

little raptor
#

forEachAndEvery

molten yacht
#

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

hallow mortar
#

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`.
molten yacht
#

Okay, thanks.

pure sapphire
#

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.

pure sapphire
#

@winter rose can you reply the message and tag me plz

winter rose
#

I do not know how to do what you ask
I know that config makers may help you

pure sapphire
#

@winter rose Thank You very much

drowsy geyser
#

is there any way to remove the yellow smoke and whistle effect on the "BombDemine_01_Ammo_F"?

tough abyss
drowsy geyser
#

Could it be created as simpleObject? thonk

gleaming imp
#

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"" πŸ˜„

south swan
#
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 blobdoggoshruggoogly

gleaming imp
#

yay πŸ˜„ πŸ˜„ thx i will try

gleaming imp
south swan
#

my guess: to make the fire-on-release and charging possible blobdoggoshruggoogly

sullen sigil
#

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"

cosmic lichen
#

How do you set it?

sullen sigil
#

ctrlSetTextColor

cosmic lichen
sullen sigil
#

it previously worked fine when not nested but will try ctrlSetForegroundColor, thx

little raptor
#

I assume by "nested" you mean in a controlsGroup?

sullen sigil
#

just like that 🀷

#

tourniquet and fracture show fine

little raptor
#

well you can't nest controls

sullen sigil
#

oh hang on my function isnt being called

#

goobin

sullen sigil
#

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?

little raptor
#

isNil

#

if by fnc you mean a var name

sullen sigil
#

ah so if isnil returns true then call compile, else get the function out of string format or something?

little raptor
#

well you didn't say what fnc is

sullen sigil
#

as in specify
"systemChat 'hi'" or "kjw_fnc_hello"

little raptor
#

then you can use isNil yes

sullen sigil
#

how do you get the function out of that string? meowsweats

little raptor
#
if (isNil _text) then {
  _fnc = compile _text; 
} else {
  _fnc = missionNamespace getVariable [_text, {}];
  if !(_fnc isEqualType {}) then {_fnc = compile _text;};
};
sullen sigil
#

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

pulsar pewter
#

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)

south swan
#

inb4 nearestObject with radius of 2.5 meters with center at vehicle's front

sullen sigil
#

some of these bugs are truly quite odd

#

(i dont touch those gui elements)

pulsar pewter
harsh vine
#

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

sullen sigil
#

dear lord i am so stupid sometimes

#

though what happens if two things have the same idc

little raptor
sullen sigil
#

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 hmmyes

#

i feel like an american president the way i be forgetting everything

sullen sigil
#

it took me nearly 2 hours to fix that

tulip ridge
#

What ended up being the issue?
Duplicate idcs or what?

sullen sigil
#

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

sullen sigil
#

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

tulip ridge
#

Ah that's rough
Feel that

sullen sigil
#

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

glossy pine
#

thats minecraft's font ?πŸ’€

sullen sigil
#

yes

harsh sedge
#

Ha ha, that's pretty cool

winter rose
#

don't encourage him!

harsh sedge
#

Ha ha, that's pretty okay

green kettle
#

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]}

winter rose
#

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];
green kettle
#

❀️ thank you so much, i will try this in the morning, thank you so much

raw vapor
#

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 ;```
winter rose
raw vapor
#

Ooohh, this looks promising. I'll try it. Thanks.

tulip ridge
raw vapor
#

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.

granite sky
#

It assumes that _group is defined.

raw vapor
#

Ah. It is not.

#

_group should be whatever group is using the waypoint, and I do not know how to get that information either.

granite sky
#

_group = group this should work in waypoint statements.

raw vapor
#

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.

granite sky
#

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.

raw vapor
#

this should be good enough for what I am doing since there's already commands to delete the vehicle crew and the vehicle.

granite sky
#

IIRC the waypoint statements also run if everyone in the group gets killed, which can be problematic.

raw vapor
#

I mean I can't think of a situation where the group would reach the waypoint while dead.

granite sky
#

no, it runs the statements even if they don't reach the waypoint.

raw vapor
granite sky
#

we had some funny bugs in Antistasi from that.

#

I think it's undocumented behaviour.

raw vapor
#

well that's screwy

granite sky
#

waypoints have... quite a lot of that.

raw vapor
#

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?

granite sky
#

well, in this case you could replace units _group with thisList instead, but whatever

raw vapor
#

:)

#

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.

ornate whale
raw vapor
#

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.

warm hedge
#

@tulip ridge Please post the URL as a plain text not as a hyperlink, this is to prevent spam/scam. Thanks

tulip ridge
#

Yeah I figured that's what it might have been

tulip ridge
warm hedge
#

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

tulip ridge
#

Fair enough

#

There are ways to blocked masked links but allow certain sites, been a bit since I set it up though

warm hedge
#

I think was recently introduced

tulip ridge
#

Yeah, I've sent masked links without issues before

raw vapor
#

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.

wooden dove
#

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!

warm hedge
#
addMissionEventHandler ["Draw3D",{BIS_gearKeyPressed = true}] ;```Not a cozy way, but this bypasses the hold the inventory key detection
wooden dove
#

Wow that sounds like exactly what I need, but what part of that is the hold I part?

warm hedge
#
(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
wooden dove
#

Sorry, just another question. Where did you get that? I have no idea where to find fn_WLClientInit.sqf

warm hedge
#

addons\functions_f_warlords

wooden dove
#

I feel so stupid haha never thought to check there

#

Thank you tho!

winter rose
wooden dove
warm hedge
#

Never. Only player can access the menu, on the other words, this only prevents player to open menu, that's it

wooden dove
#

Thank you! This is perfect then!

hollow thistle
coarse dragon
#

anyone know of a way to make a Boat/landing craft go in a 100% straight line?

little raptor
winter rose
#
boat setDir 90;
for "_i" from 0 to 1e10 do {
  boat setPos (getPos boat vectorAdd [1,0,0]);
  sleep 0.1;
};
granite sky
#

I like how you threw setPos getPos in there

winter rose
#

angry Leo in 3, 2, 1…

granite sky
#

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

winter rose
#

stahp it!

#

I think a for-loop would still stop after 10k iterations, even if you type "from 1 to 1 million"

granite sky
#

IIRC they don't, because they're considered finite.

winter rose
#

theeen step -1 and you're good to go πŸ˜›

#

(step 0 even better)

granite sky
#

ah yes, step 0 is a thing

little raptor
#

does for [{}, {}, {}] work? think_turtle

#

iirc not think_turtle

simple trout
#

{} doesn't return bool for condition check

winter rose
#

[{}, { true }, {}] then

granite sky
#

oddly enough I cannot convince that for syntax to work at all.

#

Are you sure it's actually supported in A3 :P

winter rose
#

(ah wait, step is not involved -_-)

granite sky
#

0 to 1 step 0 never completes.

winter rose
#

even in unsched?

granite sky
#

slightly oddly, neither does 0 to 0 step 0

#

It's like they actually put an "optimization" in for step 0? :P

little raptor
limber panther
#

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 ?

granite sky
#

Yes. It's basically the same as time except server-synced.

sullen sigil
#

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

limber panther
sullen sigil
#

yes which is why servers need regular restarts

#

else things like cba and ace begin to break

limber panther
#

under these circuimstances, is there a way to get server time in seconds only? without those decimals like miliseconds, etc.

sullen sigil
#

round

#

alternatively toFixed & parseNumber

limber panther
shrewd yew
#

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

formal stirrup
#

Is there even a function to add resources to a specific zeus/side?

little raptor
foggy stratus
# winter rose ```sqf boat setDir 90; for "_i" from 0 to 1e10 do { boat setPos (getPos boat v...

@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/...

β–Ά Play video
limber panther
#

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]];

hallow mortar
#

serverTime shouldn't be inside an array

foggy stratus
#

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?

limber panther
hallow mortar
# limber panther 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.

limber panther
hallow mortar
#

No, I know you should remove those [], because they denote an array, and round does not accept arrays

limber panther
sullen sigil
#

its not wrong to put command after command at all

hallow mortar
#

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.

sullen sigil
#

oh wow theres a wiki article for that ive just been making it up as i go along

limber panther
#

πŸ‘ thanks for tips

proven charm
fair drum
#

Don't use the squiggle brackets

#

class MyClass: InheritClass;

proven charm
hallow mortar
sullen sigil
#

never do {};

#

you dont need to and shouldnt do

fair drum
#

I think you might for the inherits. For the definition you don't.

sullen sigil
#

no

#

never

proven charm
sullen sigil
#

inheriting something without changes is:
a new class that is useless
the exact same properties

raw vapor
#

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.

tough abyss
raw vapor
drowsy geyser
#

how would i hide a control (ctrlCreate) while the map is open?

tough abyss
raw vapor
tulip ridge
ornate whale
# raw vapor Now I'm trying to figure out how to better calculate where the bombs will fall. ...

The intuitive solution (of mine) would be:

  1. You have the impact point
bombSitePos = getPosASL markBombSite;
  1. 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!
  1. 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.
raw vapor
#

Well I assume ArmA uses real world physics to the best of its ability so gravity is probably the same.

still forum
#

Arma*

drowsy geyser
# tulip ridge ```sqf (_layer call BIS_fnc_RscLayer) cutRsc [ "YourDisplay", // Display ...
_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?

raw vapor
#

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

tough abyss
#

oh sorry that is mainly arma 3

tulip ridge
tough abyss
tulip ridge
#

Then yes

ornate whale
tulip ridge
#

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

raw vapor
ornate whale
raw vapor
#

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.

tough abyss
# raw vapor I have an unusual problem caused by ACE which I'm trying to do a work-around for...

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;
};

tough abyss
#

lou's typing meowsweats

winter rose
#

also if !(_x == alive) and _x fullcrew, no

tough abyss
winter rose
wooden dove
tough abyss
winter rose
#

it does

#

not alive means entirely destroyed
not deactivated

coarse dragon
#

vehicles arnt alive tho

winter rose
tough abyss
ornate whale
raw vapor
#

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.

wooden dove
tough abyss
wooden dove
#

@raw vapor woops

raw vapor
#

I changed settings and one of those settings is causing this.

wooden dove
raw vapor
#

It did mitigate the problem by removing it, but I haven't had it stop happening entirely.

#

wait

#

-squint-

#

aircraft... bouncing

wooden dove
#

yeah i think it makes ur speed 0

raw vapor
#

my brain thought it was aircraft crashing

#

well I have this happen in ground vehicles also

wooden dove
#

so u survive

#

ohhh

simple trout
#

Setting velocity to zero will only work on non physx aircrafts

raw vapor
#

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.

wooden dove
simple trout
#

Lol no worries

wooden dove
#

Im kinda new to mission editing and stuff, but am I to udnerstand that addMIssionEventHandler should be in initServer?

simple trout
#

Nah

wooden dove
#

doesnt need to be?

simple trout
#

It can be placed there if you want

hallow mortar
#

Depends what you need it to do

simple trout
#

Yeah depends on the context and what you are trying to achieve

wooden dove
#

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

simple trout
#

That will only work on the server

hallow mortar
#

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.

simple trout
#

Because initServer is only ran on the server

wooden dove
#

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

simple trout
#

You should look at capturing the key so the menu doesn't open

wooden dove
#

if i understand it write can I just put it in init.sqf and write if(!isServer)?

wooden dove
#

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

tough abyss
#

is there any list of files that are triggered by event (onrespawn initplayerlocal) type events?

simple trout
simple trout
#

tho that can be "dangerous" depending on the context

wooden dove
#

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.

calm charm
#

How to activate the parachute of the new space ship object via script?

calm charm
wooden dove
#

sry idk how to help, was just curious

calm charm
wooden dove
winter rose
wooden dove
#

ohhh its a thing

winter rose
#

(sorry for the filter @simple trout , I removed your Discord temp mute ✌️)

wooden dove
#

hi sorry

#

is there a diff

#

between hold I?

simple trout
#

lol

#

That was funny

wooden dove
#

not sure if im understanding it right

#

I use ur script instead of the one POLPOX gave me? or together with it?

simple trout
#

If the POLPOX one works, use it

#

the one I gave you is a different way of doing it

wooden dove
#

it does but the text to open the request menu kinda spams until u press I

#

and your seems to avoid that?

#

i think

simple trout
#

well yeah, it will capture the key event, so nothing else will happen if that is pressed

wooden dove
#

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?

simple trout
#

No it should be on the clients

#

So what is the key for the request menu?

#

Is it really I?

wooden dove
#

Hold down I

#

now that I look though, POLPOX also used KeyDown. Is there a difference with hold down I and I?

wooden dove
#

maybe warlords is overwriting it? idk how it works

#

hahha

cold depot
# wooden dove this is what he was looking at though in the Warlords files

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:

  1. undo everything you have done do far.
  2. Open up the "fn_WLclientInit.sqf" file
  3. 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.

wooden dove
#

@_@

#

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

cold depot
#

you need to open the request menu to play warlords

wooden dove
#

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

wooden dove
cold depot
#

yes, you aren't going to be able to get warlords to do what you want through just the eden editior.

wooden dove
#

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?

cold depot
#

no. it will work for everyone when they join the server.

wooden dove
#

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!

cold depot
#

I'm learning stuff too, this is only the second time ever I've looked at the default warlords code πŸ˜ƒ

wooden dove
#

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

cold depot
#

what Warlords mission are you running?, thats not the original warlords file.

wooden dove
#

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?

cold depot
#

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

wooden dove
#

thanks! ill keep looking

#

is the mod better than the arma 3 modules?

#

i assumed the arma 3 modules were more current

cold depot
#

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.

wooden dove
#

alright! thank you! this has been very helpful

pulsar pewter
#

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.

sullen sigil
#

driver this isEqualTo player

pulsar pewter
#

oh, Im definitely dumb haha

hallow mortar
sullen sigil
#

oh yea

pulsar pewter
#

yeah, did that already.

#

I was trying some variation of "driver _target == _caller" but that did the trick

hallow mortar
pulsar pewter
#

ah gotcha.

hallow mortar
#

_caller is the one for holdActions

winter rose
#

we have doc πŸ˜„

pulsar pewter
#

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

wooden dove
#

im not sure its in here?

cold depot
#

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. 😒

wooden dove
#

no worries! i dont really want to hassle you for this haha

wooden dove
#

thank you!

#

im sure i can find it in these files

cold depot
#

whatever editor you are using should have a "search all files" function somewhere to make it easy.

wooden dove
#

is it this?

#

looks abit diff

cold depot
#

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 πŸ™‚

wooden dove
#

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

cold depot
#

I'll deffer to someone smarter than me on this topic. I've never touched a pbo in arma 3.

wooden dove
#

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

hallow mortar
#

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.

wooden dove
#

oh wow

#

you saved me there

#

@cold depot sorry! you did all that for me xD

cold depot
#

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.

wooden dove
#

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

hallow mortar
cold depot