#arma3_scripting

1 messages · Page 606 of 1

waxen tendon
#
{    if ((side _x) == opfor) then {
        _x setDamage 1;
    };
} forEach (allUnits inAreaArray triggerTherisa);

this kills all opfor units. even the ones outside the area
how can i check if a unit is in the trigger area?

spark turret
#

if(_unit inArea _trigger) then {hint "wew";};

waxen tendon
#

wew

#

thanks

spark turret
#

iirc. at least. it does work for markers too. check out the biki docu for inArea, its very versatile

waxen tendon
#

nah mine shoulda worked as well, same thing after all

spark turret
#

yeah inAreaArray grabs all units, inArea tests a single unit.

#

you could filter your inAreaArray with select {_side _x == opfor} too

#

thats problematic. the discord rules clearly state that unnecessary violence isnt liked here.

#

clearly a war crime

broken snow
#

Working on packing a mod and need help with the code

My question is when I pack the mod does the directory for pulling images stay the same?

#

Pretty much in that PBO is the image its suppose to use
drawIcon3D ["addons\SeenIcon_ca.paa",

#

or would it need to be
drawIcon3D ["addons\pboname\SeenIcon_ca.paa",

waxen tendon
#

you have to specify a pbo prefix

#

that becomes your root

queen cargo
#

think now i have something fancy with which i am not even sure about how to test:

// Scope without any _this
params ["_foo"];
waxen tendon
#

lets say you have examplePboPrefix set as your pbo prefix, then you would address those as examplePboPrefix\SeenIcon_ca.paa

broken snow
#

So if the pbo name is ZeusFOW it would then be
drawIcon3D ["addons\ZeusFOW\SeenIcon_ca.paa",

waxen tendon
#

no, just drawIcon3D ["\ZeusFOW\SeenIcon_ca.paa",

broken snow
#

ok thanks

waxen tendon
#

you need the first \ too, dont forget that

broken snow
#

ok thank you when you said I needed the prefix I thought I needed $name

waxen tendon
#

in addon builder under advanced settings or something like that you should have an "addon prefix" or sth like that

#

you have to put the ZeusFOW there

broken snow
#

ok thanks

exotic flax
#

And good advice on making mods; don't use Addon Builder, but Mikero's Tools. It will make your life so much easier.

waxen tendon
#

or armake2 if you feel confident using the command line

astral dawn
#

IMO addon builder is fine for super easy things

#

Up to the point when you have wasted half an hour trying to understand why arma can't resolve path xD

winter rose
#

@queen cargo params*, no? param takes a number as first argument

queen cargo
#

*fixed
but applies to both

#

just with (obviously) different args 😅

winter rose
#

I believe variables are nil in that case

#

(without _this)

queen cargo
#

believe is sadly not enough for me as you know 🙈

winter rose
#

perhaps, but I am still going to bed 😛

queen cargo
#

need everything from potential errors down to error messages applied 😄

#

never wanted to stop you 😉

#

i will continue integrating old SQF-VM into new SQF-VM

waxen tendon
#

armawork over smb?

#

can sqfvm do more than linting/syntax checking? thats the extent i know how to use it @queen cargo

queen cargo
#

Sqf-vm is a full implementation of the sqf Script language with limited Support for operators available
Aka: it is able to execute Code without arma even installed @waxen tendon

ashen warren
#

hi everyone, I am kinda confused on something. I need to have action menu come back after a player spawns in or respawns. it works on single player but I am not certain how to make this work.

#
if (isMultiplayer) then
{

    if(isMusicActive == 1) then
    {
        isMusicActive = 0;
        player removeAction musicAction;
        musicAction = player addAction ["music on", "bf_Adapt\musicController.sqf"];
        1 fadeMusic 0;
        hint "Music disabled. 1";
    }

    else
    {
        if(isMusicActive == 0) then
        {
            isMusicActive = 1;
            player removeAction musicAction;
            musicAction = player addAction ["music off", "bf_Adapt\musicController.sqf"];
            1 fadeMusic Volume;
            hint "Music Enabled. 2";
        };
    };
}
else
{
    if(isMusicActive == 1) then
    {
        isMusicActive = 0;
        player removeAction musicAction;
        musicAction = player addAction ["music on", "bf_Adapt\musicController.sqf"];
        1 fadeMusic 0;
        hint "Music disabled. 1";
    }

    else
    {
        if(isMusicActive == 0) then
        {
            isMusicActive = 1;
            player removeAction musicAction;
            musicAction = player addAction ["music off", "bf_Adapt\musicController.sqf"];
            1 fadeMusic Volume;
            hint "Music Enabled. 2";
        };
    };
};```
#

i remember something about using a onplayerrespawn.sqf but this is in a mod

#

@ me if someone knows a possible solution

crystal rune
#

On the wiki: https://community.bistudio.com/wiki/UAVControl

It mentions:

A) Since Arma 3 v1.95.146028 this command returns both driver and gunner units if the UAV is controlled by 2 players. Here is the list of all expected outputs: 
B) [player1, "DRIVER", player2, "GUNNER"] - player1 is controlling the UAV and is the pilot, player2 is controlling UAV and is the gunner

But for the life of me i can't figure out how to even get 2 players connected without one failing or booting the other off.

thorny ferry
#

Will the "EntityRespawned" mission event handler only ever get fired for players? Or can other entities (ai people and vehicles) be respawned?

#

I found the respawnVehicle function so presumably vehicles can also fire the "EntityRespawned" MEH. Are players and vehicles the only two cases I need to consider here?

orchid stone
#

@robust hollow @warm hedge - Just wanted to thank you guys for the discussion a few nights ago. I successfully got the development environment setup. There is an extension for visual studio code that was really beneficial (i thought it was super broken at first - turns out I needed our conco to connect the dots). Plan on doing a youtube video on it eventually or some sort of writeup since I couldnt find anything along those lines. If you guys are ever interested in seeing how the (read my) live dev environment works, let me know. Thanks again!

cosmic lichen
#

@orchid stone What extension do you use?

winter rose
#

@thorny ferry I believe respawned AI will trigger it too - test it to be sure

wet shadow
#

A quick question about multiplayer optimisation, how does missionNamespace setVariable ["something", "value", true]; compare to using publicVariable "something". Is the network load comparable or is one better than the other?

winter rose
#

(additionally, I don't know if setVariable would trigger a pV EH)

#

@wet shadow publicVariable usage can trigger a publicVariableEventHandler on other machines

But usually, publicVariable is considered obsolete in the spirit

orchid stone
#

@cosmic lichen - Arma Dev. Judging by your name, it might be yours lol

cosmic lichen
#

Not mine 😄

still forum
#

🤔

orchid stone
winter rose
#

1* letter no?
ole1986
R3vo

orchid stone
#

Email*

winter rose
#

can't find it

orchid stone
#

Maybe I'm misremembering his email. At work now, just in between the part where I do my bit. Either way, super cool extension

#

Works very well 👌

winter rose
#

true dat - I think I have an issue where variable names are not suggested, only commands/functions

cosmic lichen
#

yes

#

I need an extension which can finally suggestion previously created variables

#

also it's missing tons of commands =/

winter rose
#

let's make our own VS extension!

cosmic lichen
#

YAA

winter rose
#

(…just for autocomplete)

cosmic lichen
#

I am fine with it

winter rose
#

ah well, we can do that - combined with Grez' wiki, we would be unstoppable!!1!

cosmic lichen
winter rose
#

M-M-M-MOOONSTER KILLLL intensifies

cosmic lichen
#

good old days

#

when playing a game was actually playing, not scripting, modding...

winter rose
#

(because we didn't know how to at the time, that's the only reason and you know it)

hybrid pier
#

hello everyone, want to ask if there is a command. That the AI ​​at VCOM AI stops no matter what happens. The reason is to build a shooting range but not with falling targets but with the AI. But it should stop and show no reaction.

cosmic lichen
#

Maybe

#

Btw @winter rose Where is our custom command for discord.

!biki <command>
!biki <function>

winter rose
#

ask this Discord's Boss - I would gladly do it

cosmic lichen
#

I am not allowed to ping him. I have to forward it to a moderator

orchid stone
#

I use that extension too. Its beautiful

cosmic lichen
#

Yeah, but suffers the same issues. No auto complete and not a complete command/function library

orchid stone
#

Ya :/

hybrid pier
#

@cosmic lichen have entered that and unfortunately the ki still moves and opens the fire.

cosmic lichen
#

What have you entered?

#

Post the code

hybrid pier
#

this disableAI "MOVE","TARGET","AUTOTARGET","ANIM","TEAMSWITCH","FSM","WEAPONAIM","AIMINGERROR","SUPPRESSION","CHECKVISIBLE","COVER","AUTOCOMBAT","PATH","MINEDETECTION","LIGHTS","RADIOPROTOCOL";

#

this disableAI "all";

winter rose
#

#

target disableAI oneString

hybrid pier
#

the problem is Vcom AI since it is an extra script and works extra

winter rose
#

I mean "string1, "string2" syntax won't work

#

@hybrid pier check the page for examples

hybrid pier
#

okay, have to look anyway after the AI ​​is killed, it should be deleted and a new one come on the same place.

#

@winter rose can you help me?

winter rose
#

sure, what is your problem?

hybrid pier
#

I have the problem of implementing a script. following goal. I build a shooting range from AI targets, these should disappear at TOT after about 5 seconds and reappear in the same position.

winter rose
#

TOT?

hybrid pier
#

I have the same thing with the vehicles. here the command.

#

tot=dead

winter rose
#

@hybrid pier ```sqf please

#

(see pinned message)

warm hedge
#

^ Check the pinned message

#

Why you French can do a Ninja more than a Japanese here?!

winter rose
#

all countries have ninjas, only yours are bad enough to be known about 😄

hybrid pier
#

i can not send a sqf

winter rose
#

```sqf
your code
```

// gets formatted
#

@hybrid pier anyway: when you create a new unit, re-apply disableAI.

hybrid pier
#

yes, of course, can you rewrite the script instead of vehicles, enter inf and adjust something?

winter rose
#

no?

warm hedge
#

You meant get in then disableAI?

winter rose
#

@hybrid pier if you want a "stupid AI" unit that doesn't move, create a unit with createVehicle

#

won't move at all

warm hedge
#

Or createAgent

winter rose
#

(they move a bit more)

warm hedge
#

But agent is stupid enough?

winter rose
#

they can lie down if shot at, IIRC

hybrid pier
#

@winter rose I place the ki on the shooting range and give her the command "this disableAI" ALL ";". then nothing happens. now the dead should be respawned via a script at the same position. automatically.

So it is with the SQF file that I have sent you, for vehicles.

winter rose
#

well do the same, but with the unit class

#

(and I guess by ki you mean AI)

hybrid pier
#

yes

#

can you help me with that? to write and implement something like that? I'm not that good in there.

winter rose
#

use the same script, it should work

spark turret
#

what ai skills are different in an agent?

#

in my understanding agent = AI that works towards its goaol

winter rose
#

FSMs are waaay simpler iirc

"agents" are "dumb AI" (e.g snakes, rabbits, etc)

spark turret
#

what is the agents goal? (and its dreams and hopes?)

#

ah so very passive AI

#

are they local as well then if i create a civ agent?

winter rose
#

created globally, but maybe locally computed

#

@hybrid pier have you tried your script? you don't need to change anything as that would use createVehicle

spark turret
#

i have a radical question? can i redefine the conversation system words by creating them as normal sounds with their paths in the description.ext and then use them with the playSound?

hybrid pier
#

no I have not since the AI ​​is not a vehicle or not?

winter rose
#

if you mean "declaring the ogg file path in CfgSounds", then yes it would work @spark turret

spark turret
#

you can create the AI as a vehicle to make it more stupid.

#

yeah thats what i meant

#

hmmmmmmmmmmmmmmmmmmmmm

winter rose
#

@hybrid pier if you want a "stupid AI" unit that doesn't move, create a unit with createVehicle

spark turret
#

or just do _unti disableAI "all"; that also does the trick

#

it wont even be able to turn or target anything.

#

basically it just stands there

#

i feel like its a ton of work to declare all the paths for the existing words but i wouldnt have to use the absolutely ******** conversationsystem which has got to be the most********* thing ive seen so far

winter rose
#

because playSound is sooo easier to use

spark turret
#

yeah bc i dont have to create like 3 files for one sound

hybrid pier
#

@spark turret yes the AI ​​doesn't move anymore and is a stupid AI. only we want the AI ​​to respawn after the TOT and to be in the same position again. The goal is a shooting range

spark turret
#

thats pretty cruel

#

there are acutal shooting targets as objetcs

#

they fall over when hit and stand back up

hybrid pier
#

it works * - * many many thanks 🙂

spark turret
#

i remeber i made a shooting range script for CQB like 2 years ago

#

it was awful and i didnt know anything about MP scripting

#

but it kinda worked and was far more advanced than anything vanilla has.

slate cypress
#

What is the alternative method to say3D which doesn't play from any object but is just there wherever you are?

winter rose
#

playSound3D

#

note that it takes an absolute filepath that requires getMissionPath usage

slate cypress
#

The wiki says it is positional audio.

winter rose
#

or just use playSound if you only want the sound to play, without any 3D source positioning
@slate cypress

slate cypress
#

Yeah I don't want 3d source

#

I'll use playSound thanks

winter rose
#

playSound it is!

slate cypress
#

Is it possible to make the sound fade out after a trigger?

winter rose
#

nope; make it a CfgMusic and play it with playMusic maybe?

slate cypress
#

What's the difference between Music and Sound?

winter rose
#

the "channel"
you could e.g fadeMusic without impacting game sounds

warm hedge
#

Also there's only one Music in a moment

slate cypress
#

Ah I see. I'll give playMusic a try actually.

#

Does name in CfgMusic get shown when playMusic is used?

#

Similarly to how say3D has a subtitle displaying text

#

due to it being defined in CfgSounds

winter rose
#

nope, just display name for e.g trigger activation, in the editor

slate cypress
#

Isn't it called through the class name though?

winter rose
#

it is

#

I mean, name = "my super music" will be displayed in the trigger options, in the interface's combobox
@slate cypress

spark turret
#

Not all sounds from cfg sounds ha e subtitles

#

Actually the majority doesnt

exotic flax
#

but sounds don't always have spoken text, so no need for subtitles 🤷‍♂️

winter rose
agile pumice
#

Are units spawned with createUnit given dynamic simulation by default?

torpid quartz
#

[<target>, "H_HelmetO_ViperSP_ghex_F", "fasle"] call BIS_fnc_removeVirtualItemCargo;
Is there a way to make <target> just refer to the object the code is in instead of having to set up variables all the time?

spark turret
#

if you spawn the code from theunits init then yes

#

this execVM "yourDopeScript.sqf"; will give the script your unit as the "_this" variable

#

-> _unit = _this

winter rose
#

@agile pumice I don't think so, but don't know for sure

agile pumice
#

I'm about to do some testing to find out

winter rose
#

please tell back so I can update the wiki

exotic flax
#

it just needs to be the object on where the virtual item(s) need to be removed from, so it can be this in a init field, it can be variable_name_of_container or even _somethingFancy when using in a script

spark turret
#

if you hover over the init field, it will display a tooltip that actually says that

exotic flax
#

oh... and the 3rd parameter needs to be a boolean, so true or false, not a string (which is spelled wrong too)

torpid quartz
#

oh yeah oops lol

#

thanks for pointing that out haha

agile pumice
#

well thats kind of weird. I ran this code

bob = group player createUnit ["B_RangeMaster_F", position player, [], 0, "FORM"]; 
bob enableDynamicSimulation true;```
and then watched ``dynamicSimulationEnabled bob`` and its false?
#

dynamicSimulationSystemEnabled is true

spark turret
#

Description:Enables or disables Arma_3_Dynamic_Simulation for given non AI object

Syntax

ebon citrus
#

does "enablesimulation = false" stop targets from animating with animate if the command is executed on a remote client?

#

no, that cant be it

#

some targets are behaving in a really weird manner

exotic flax
#

Limitations

  • No line of sight detection; designer needs to make sure player cannot see transition between enabled/disabled states.
  • No support for moving entities; entities will stop moving when disabled.
  • No backward compatibility with other older systems like are the scripted Sites or FPS Manager
spark turret
#
Enables / disables simulation for the given entity. This command will affect entity simulation only locally. For a global and JIP enabled alternative see enableSimulationGlobalMultiplayer:This command only works locally and must be run on all machines to have global affect
exotic flax
#

enableSimulation will "freeze" the unit, including animations, eye blinking, etc ; you cannot switchMove or playMove.

agile pumice
#

@spark turret
From the https://community.bistudio.com/wiki/Arma_3_Dynamic_Simulation page:
Characters Infantry units (default: 500m). Set to a reasonable distance, player should not see disabled infantry units.
If AI units weren't dynamically simulated, what does this refer to? Though it is true that AI units don't have an Enable Dynamic Simulation attribute box to check.

ebon citrus
#

the problem is that the targets animate when running the command in singleplayer

#

but NOT when running the command in multiplayer locally

#

in both cases simulation is disabled

exotic flax
#

Dynamic Simulations is to "disable" AI completely (aka freeze them) until activated again. Which is perfect for larger missions with a lot of AI which don't need to run on their own, but will simulate movement and stuff in the background.

spark turret
#

Hm interesting nica. So you disable the simulation on a unit in SP and it still animates?

#

And in mp it doesnt?

exotic flax
#

@ebon citrus enableSimulation is local and only useful for SP, use enableSimulationGlobal (and run from server!) for MP

#

and in the end; animations are sometimes borked in Arma, especially when it comes to local vs global

ebon citrus
#

@exotic flax is local but useful in MP

#

No?

#

Anyways, inconsistent behaviour. I'll figure something else out

exotic flax
#

as the wiki says:

This command only works locally and must be run on all machines to have global affect.
so either use remoteExec for everything, or use enableSimulationGlobal

frigid geyser
#

Hey, I am looking for a script that automaticly delets some Items every so second. Any idea

exotic flax
#

For general garbage collection you can simply enable that in the mission settings

ebon citrus
#

@exotic flax or run it in local init

exotic flax
#

Well, scripts, especially when running every second, will slow down your mission massively.

frigid geyser
#

yeah i know, timing i will test but i need a script that allows me this?

exotic flax
#

well, get the items you want to remove, loop over them and use deleteVehicle to remove them

spark turret
#

Dieter what do you want to do?

winter rose
#

@frigid geyser ^

frigid geyser
#

a way to delete Items like GPS or Radio thats beeing dropped by the AI so the players cant pick that up

exotic flax
#

It's probably easier to remove those items from the AI before they die than afterwards, since they will be in a container instead of actually being dropped

frigid geyser
#

Yeah, but with probably over 200 Units placed in Editor and Zeus thats not possible, you know..

stone totem
#

Hey Folks,
Hans is actually asking for me 😉. We are working on the same mission .... he already investigated and someone gave him this thing. But we dont get it to work.

We placed it in the initPlayerLocal.sqf
The sleep-time will be extended to something like 60 seconds

player setVariable ["glKO2PreJxe3J1FzbJPaKhg8zeCYugFt",str getUnitLoadout player];

while {true} do {
    if!((player getVariable["glKO2PreJxe3J1FzbJPaKhg8zeCYugFt",[]]) isEqualTo (str getUnitLoadout player)) then {
        private _itemArray = ["itemAndroid","itemGPS","itemMicroDAGR","itemcTab","B_UavTerminal","TFAR_anprc148jem","TFAR_anprc152","TFAR_anprc154","TFAR_fadak","TFAR_pnr1000a","itemRadio","TFAR_rf7800str","VQI_Sentinel"]; 
        {
            if(_x in items player) then {
                player removeItem _x;
            };
        } forEach _itemArray;
        player setVariable ["glKO2PreJxe3J1FzbJPaKhg8zeCYugFt",str getUnitLoadout player];
       diag_log "UPDATED";
    };
    sleep 0.5;
};
#

ah did not work. 1 sec. gonna edit.
edit done 🙂

exotic flax
#

@frigid geyser On mission init, loop over all AI and remove their stuff 🤷‍♂️

#

That script will remove it from players only, not AI 😉

stone totem
#

that totaly fine

#

when they pick something up it will be deleted. that's ok for us

#

but it does not work ^^

#

and we cant find out why (well .... we are new to scripting ....)

exotic flax
#

It will only work once since it will check for that variable, which is set after first time

stone totem
#

so the first line must be integrated into the loop?

exotic flax
#

no, just remove the setVariable and getVariable stuff

stone totem
#

heheh ok. thats funny, because that was exactly the part that i never understood 😄

#

thanks ❤️ . I will give it a try.

thorny ferry
#

@winter rose Can AI be respawned though? I only saw stuff for configuring player and vehicle respawns on the respawning wiki page. I'll assume they can but it'd be nice to know for sure.

winter rose
#

yes

thorny ferry
#

Ok thanks!

stone totem
#

hmmm .... does still not do anything. Looks like this now

while {true} do {  
        private _itemArray = ["itemAndroid","itemGPS","itemMicroDAGR","itemcTab","B_UavTerminal","TFAR_anprc148jem","TFAR_anprc152","TFAR_anprc154","TFAR_fadak","TFAR_pnr1000a","itemRadio","TFAR_rf7800str","VQI_Sentinel"];      
        {
            if(_x in items player) then {
                player removeItem _x;
            };
        } forEach _itemArray;
       diag_log "UPDATED";
       sleep 0.5;
};

#

If line 2-3 looks strange ... thats discord

still forum
#

your tfar classnames won't work

#

TFAR will replace the radio, with a different classname

exotic flax
#

do note that some items are slotted and not in the inventory, in which case unassignItem should be used (will remove it when it doesn't fit in the inventory)

stone totem
#

hmm ok.
tbh I just quit trying for today. But nevertheless thanks for the hints. I will try this tomorrow. Thanks Dedmen for the TFAR hint and Grezvany for everything else. You already helped a lot!

spark turret
#

Are the radios a certain class type, maybe that could be used

exotic flax
#

they do inherit from a default class, but other mods might add custom radios which still work with TFAR

orchid stone
#

I recall seeing something similar but can't recall the function name.... does anyone know if there is a function to attachTo or find closest attachment point from location?

stone totem
#

Tbh I wonder if there is no command/script that just flushes the radio and the uav slot.... For me that would have the same effect.

quartz pebble
#

How can I make AIs attack empty vehicles?

winter rose
#

you could maybe set a unit inside and hide it, or set an invisible AI of an enemy side as driver

winter rose
#

@quartz pebble

quartz pebble
#

Thought on this. But such a vehicle would implicitly reveal to players something is wrong with it. I.e. if a player can't take a specific seat because an invisible AI is there.

winter rose
#

well, you said an empty vehicle 🙃
what do you want to do?

quartz pebble
#

Long story short: we have a PvE mission. Sometimes we get players, who manage to drive service trucks to AO, leave them there and start a tank rally at AO, getting repaired whenever needed.
I thought on making AIs at AO attack those empty repair trucks.

winter rose
#

you can make it so that an invisible AI is set as driver/passenger, until there is another player/unit nearby

quartz pebble
#

"nearby" is a key word here. "In russian" that means "keep a dedicated mechanism which would track any of the players near any of the trucks" 🙂

winter rose
#

yes

or perhaps use commands like doSuppressiveFire or fireAtTarget

#

but you cannot do a vehicle addRating -10e10 iirc

quartz pebble
#

Yeah, I know 🙂 Was thinking either on attaching a laser target, but that would anger only enemy aircrafts.

#

Or attaching an invisible AI. But that also requires tricks as the attached AI has to be "outside" enough so enemies see it, and "inside" enough so enemies shoot vehicle and not "air" near the vehicle.

winter rose
#

or just spawn a bomb on the truck if alone for more than 1 min 😄

spark turret
#

DoSuppresiveFire is a pretty useless command

#

Its been 2 years since i last fiddeled with it but i found zero working ai commands that actually force decenz suppresivr fire.
I recommend using Lambs danger ai, they do a very decent job on it

#

But i do believe that fireAtTarget makes ai shoot things it wouldnt normally shoot

#

If you want to destroy lefz behind trucks, how about giving them dynamic simulation. Once their sim gets disabled, thats the sign they were left behind. Just delete them or destroy them now

#

@quartz pebble

crystal rune
#

On the wiki: https://community.bistudio.com/wiki/UAVControl

It mentions:

A) Since Arma 3 v1.95.146028 this command returns both driver and gunner units if the UAV is controlled by 2 players.
B) [player1, "DRIVER", player2, "GUNNER"] - player1 is controlling the UAV and is the pilot, player2 is controlling UAV and is the gunner```

Does anyone have any idea how this is even accomplished? (2 player manned UAV's)
winter rose
#

no can do from UAV controllers afaik

#

maybe by scripting using remoteControl

autumn swift
#

Is it possible to disable createVehicleLocal via CfgDisabledCommands, but still whitelist certain parameters? I need to disable it to help counter the script kids but I also need it for some of my own scripts...

winter rose
#

nope, afaik

autumn swift
#

rip

winter rose
#

BattlEye doesn't help?

autumn swift
#

I mean I can use scripts.txt but that can be bypassed since its client sided

spark turret
#

Ip ban + publicly humiliate anyone doing it?

#

Have it write to the console and if you didnt call it, have the police move out

exotic flax
#

I mean I can use scripts.txt but that can be bypassed since its client sided
@autumn swift scripts.txt is server side... so no client can access that.
And you can give targets to who can execute a script in CfgDisabledCommands (server, client and/or HC), so it is possible to allow it to be called by the server and not the client.

autumn swift
#

@autumn swift scripts.txt is server side... so no client can access that.
And you can give targets to who can execute a script in CfgDisabledCommands (server, client and/or HC), so it is possible to allow it to be called by the server and not the client.
@exotic flax I was under the impression that is it possible for sophisticated cheats to bypass scripts.txt since IIRC it is ultimately the client that monitors the script filters and reports it to the server. Also I know about the target, but the problem is that I want to disable it for the client, but I still want the ability to execute certain whitelisted createVehicleLocal parameters on the client itself.

exotic flax
#

Whitelists only work for commands, not for parameters (except for parameter types).
Depending on the use-case you could also try createSimpleObject (does almost the same as createVehicleLocal, just without simulation)

stone totem
#

am I blind or does it not exist? ^^

exotic flax
#

do note that some items are slotted and not in the inventory, in which case unassignItem should be used (will remove it when it doesn't fit in the inventory)

stone totem
#

AHHHHHHH NOW I (think) I UNDERSTOOD what you where pointing at

#

aaahhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh

#

thanks

wispy cave
#

Is there a way in ace that I can disable the joining of groups through the interaction menu when there's more than x people in the target group already?

winter rose
#

@stone totem unlinkItem to delete it immediately

exotic flax
#

afaik not, at least I can't find any variable which sets a limit

stone totem
#

😮 it works!

#

(i hope

#

need to test a bit

#

ok ... so it takes the UAVs and CTABs out. But of cause Dedmen was right and the does kill the TFAR Radios (only on gamestart)

#

@still forum so i think i understood the problem you described yesterday (i think ...) but I have no clue how to get around that.
Is there an easy way to just delete the tfar-radio from the radio slot?

(sidenode: Some of the players will have LR-Radios which should stay)

#
while {true} do {  
        private _itemArray = ["itemAndroid","itemGPS","itemMicroDAGR","itemcTab","B_UavTerminal","TFAR_anprc148jem","TFAR_anprc152","TFAR_anprc154","TFAR_fadak","TFAR_pnr1000a","itemRadio","TFAR_rf7800str","VQI_Sentinel"];      
           {
            player unlinkItem _x;
            if(_x in items player) then {
                player removeItem _x;
            };
        } forEach _itemArray;
       diag_log "UPDATED";
       sleep 0.5;
};
#

this is where i am atm

still forum
#

get the tfar radios out of that list

#

and do them seperately

stone totem
#

brb

still forum
#
_items = [player] call CBA_fnc_uniqueUnitItems; // If player has lots of items, this is faster and more efficient than simple items player;

{
  if (_x call TFAR_fnc_isRadio || {_x call TFAR_fnc_isPrototypeRadio}) then {
    player removeItem _x;
  }
} forEach _items;
#

removes all TFAR radios

#

maybe needs unlinkItem too

stone totem
#

wont that also delete the LR-Radios?

still forum
#

no

#

they are not items

#

they are vehicles/backpacks

stone totem
#

cool. I think that will do it

#

great! Thanks man!

#

(men)

wary dome
#

nvm

#

asked in the wrong forum

#
_wp = setWaypointType "SAD";
_wp2 = terrorist2 addWaypoint [position player, 0];
_wp2 = setWaypointType "SAD";
_wp3 = terrorist3 addWaypoint [position player, 0];
_wp3 = setWaypointType "SAD";``` 
I get "missing ; " when its executed
warm hedge
#

When and how did you execute this?

#

Ah well

wary dome
#

aah yes, let me put it up again

#
_handle = execVM "find.sqf"; 
}];```
warm hedge
#
_wp = setWaypointType "SAD";```This is illegal. Instead:
```sqf
_wp setWaypointType "SAD";```
wary dome
#

oh

#

yeah figures

#

@warm hedge Thank you !

amber lantern
#

Hi

Is eject _x; not a valid command anymore?

timid niche
#

Anyone have a method of finding a number anywhere in a string?

#

Since parseNumber only returns the number if it is at the start of the string.

exotic flax
#

Is eject _x; not a valid command anymore?
what is _x ?

amber lantern
#

crew dropship1;

#

the error is "missing ;"

exotic flax
#

so _x is a unit

amber lantern
#

yes

exotic flax
#

and eject does not exist

amber lantern
#

so what's the correct one if not eject?

exotic flax
#
_soldier action ["Eject", vehicle _soldier];
amber lantern
#

so _x action ["Eject", vehicle _x]; ?

exotic flax
#

yup

amber lantern
#

letsee

amber lantern
#

Hmm can't seem to get it working, vehicle is just a generic name, right?

#

ie it's not supposed to be dropship1?

amber lantern
#

Okay it works ":D"

#

Okay it seems to be that the dropship doesn't follow the waypoints, they never trigger

#

I managed to make it trigger once

#

and apparently setVelocity is never overriden by the ai pilot?

hallow mortar
#

Don't forget to set the aircraft AI to Careless so it doesn't get distracted

#

Also, action doesn't...always work on AI

amber lantern
#

Yeah I've set it careless

stone totem
#

@still forum again thanks for your help but I think I need you again 😦

this is what I got now and it unlinks the radios and the GPS-Stuff which is exactly what i need .... but unfortunatelly it also breaks the LR-Radio functionality. Ingame it feels as if he would constantly delete and reassign a LR-Radio.

        private _itemArray = ["itemAndroid","itemGPS","itemMicroDAGR","itemcTab","B_UavTerminal","itemRadio","VQI_Sentinel"];      
           {
            player unlinkItem _x;
        } forEach _itemArray;
        
        _items = [player] call CBA_fnc_uniqueUnitItems; // If player has lots of items, this is faster and more efficient than simple items player;

        {    
            if (_x call TFAR_fnc_isRadio || {_x call TFAR_fnc_isPrototypeRadio}) then {
            player unlinkItem _x;
            }
        } forEach _items;
        sleep 0.5;
};```

Tbh I could not completaly figure out what this line does. 
`if (_x call TFAR_fnc_isRadio || {_x call TFAR_fnc_isPrototypeRadio}) then {`

In special (think thats propably a basic) I could not find what the pipes do. Is it like && ?
still forum
#

_items shouldn't contain the backpack itself I think, and also shouldn't remove it

#

Is it like && ?
yes, its "or"

stone totem
#

ah ok. could not find it in the wiki. thanks 🙂

#

do .... now I clicked at "or" and there it is. doh!

still forum
#

oh lol, its not listed on wiki

#

&& is

#

its probably because || chars aren't allowed on wiki page titles

stone totem
#

yes probably.^^

timid niche
#

@still forum do you have a method of finding a number anywhere in a string?
Since parseNumber only returns the number if it is at the start of the string.

still forum
#

not a trivial way

#

findIf until you find the first number char, and then try parseNumber from that offset

timid niche
#

Hmm alright

#

ty

astral dawn
#

you can convert string to array with toarray then select characters which correspond to 0..9 characters

#

then back toString and parse it

#

but it depends on what your strings are, if they have many numbers then it won't work

#

are they formatted in any specific way or not?

#

maybe you could give examples of strings

timid niche
#

It's used for a universal door opening script, so mostly it's something like door_1

#

And simply need to get the number from the string

astral dawn
#

does it always have _ before number?

timid niche
#

Indeed

#

Well almost

astral dawn
#

hmm

#

do you need this specific number or you just need to map door name -> any unique number? 😄

timid niche
#

Currently doing it like so

        params [["_door","",[""]]];
        private _doorNumb = 0;
        private _doors = getNumber(configFile >> "CfgVehicles" >> (typeOf _building) >> "numberOfDoors");
        for "_i" from 1 to _doors do {
            if (_door find (str _i) > 0) exitWith {_doorNumb = _i};
        };
astral dawn
#

if second way suits you then you can implement a super fast lookup with namespace/hashmap

#

but why do you need this number? what for exactly?

#

like... how is this number being used later?

timid niche
#

Using it in a findIf where I search for a UserActions config name

#

My method works fine, just wondered if there was a faster way of doing it

astral dawn
#

🤔

#

so... house has UserActions for doors, and door index matches to class index?

grim coyote
#

tehre isnt "easy" way to get the current door you want to open

astral dawn
#

anyway, you can calculate whatever you need to calculate, then cache it with a namespace

grim coyote
#

however, there are some other methods you can try like cursorobjectparams or just get the "nearest building" and "nearest" door

astral dawn
#

since you have a string, that string is the key, the result is whatever you needed to calculate

#

so...
check cache: if entry is missing, calculate it, add to cache
if entry is there, return value from cache

#

your cache key can be (typeof _building) + _door meowcamera

#
//somewhere in init:
gDoorIdCache = [false] call CBA_fnc_createNamespace;

// function code:
params [["_door","",[""]]];
        private _key = (typeof _building) + _door;
        private _valueFromCache = gDoorIdCache getVariable _key;

        if (!isNil "_valueFromCache") exitWith {
                  _valueFromCache;
        };

        private _doorNumb = 0;
        private _doors = getNumber(configFile >> "CfgVehicles" >> (typeOf _building) >> "numberOfDoors");
        for "_i" from 1 to _doors do {
            if (_door find (str _i) > 0) exitWith {_doorNumb = _i};
        };

        gDoorIdCache setVariable [_key, _doorNumb];

        _doorNumb;
#

Since SQF is so damn slow with anything beyond 1+2+3, it's always good to cache anything where you want performance gain meowtrash (if you really think that you want it of course)

candid cape
#

Hi , anyone know how to add whitelist to a Arma3 server ?

astral dawn
#

What whitelist?

#

What do you want to white list?

candid cape
#

I want only people who have passed an exam to enter my server

astral dawn
#

so... you want to kick them by UID?

candid cape
#

yes

astral dawn
#

And password does not suit you?

candid cape
#

I want to make that if you enter without the Whitelist it kick you off the server and you get a message like this "You are not Whitlisted . Please contact to an Administrator "

#

This is the message

fleet sand
candid cape
#

It could help me but , there is an other method to kick people before accessing to the server

#

anyone know this method ?

gentle plaza
#

Hi! I am using setFace in a MP mission. It DOES work (specific faces load in MP), but I still get an error message, "Error Undefined variable in expression: _unit"

#
if (isServer) then {[_unit, "AsianHead_A3_02"] remoteExec ["setFace", 0, _unit]};
#

above is my .SQF and I have setFace in units init... just not sure what is causing that error message

winter rose
#

what is _unit? where is it defined?

#

@gentle plaza

fleet sand
#

Hi guys i have a question. So basicly i have applied lodaout of a plane with setPylonLoadout but i have a problem. So basicly when i applied a lodaout to a plane everything is fine exept the contorl of the bombs has the pilot and not the gunner is there anyway to change that or how would i aproach that ?

gentle plaza
#

_unit is not defined. I incorrectly thought that it represented the players.

winter rose
#

nope
if it is in an init field, use this to refer to the unit itself

gentle plaza
#

@winter rose thank you very much

candid cape
#

Hi I want to make a script that select ramdom 3 variables

#

The script is this :
selectrandom {_var1 , _var2, _var3};

_var1 = hint "hello";
_var2 = hint "Bye";
_var3 = hint "good afternoon";

#

Anyone can help me pls

winter rose
#

@candid cape you should define vars before putting them in an array.

also, an array is defined with [], not {}

#

and hint returns Nothing, so you should randomise the string of text only

#

e.g```sqf
hint selectRandom ["hello", "bye", "good afternoon"];

quartz pebble
#

If you need to support in your mission multiple factions (e.g. players can play east/west/indep) and multiple worlds, what would be your approach to organize the codebase?

warm hedge
#

Multiple worlds?

jaunty zephyr
#

@quartz pebble multiple worlds: create the mission for VR , have a config file with all the parameters for the different terrains (like... spawn locations, loadout presets) . let whatever CI system you're using build the PBO & copy with different file names according to the supported terrains. idk.

#

also depends on what you want. pre-fabricated PBOs each with a fixed setting, or everything dynamic with players selecting their faction when they've already joined the game

quartz pebble
#

Multiple worlds?
Read: multiple maps/islands

#

@jaunty zephyr so it all comes to build scripts which do the magic? 🙂

jaunty zephyr
#

yes. if you want magic things, you've gotta do magic.

#

i'd probably build the scenario for one island and one faction first, then look into which things need to get parametrized to make it dynamic.

thorny ferry
#

Is there a way to detect bullet impact using event handlers? Specifically bullets hitting anything (other entites, the ground, buildings, etc.). I only care about the first impact. I am currently doing it by spawning a tracking script when units shoot but I really wanna stay away from the scheduler if I can.

#

What I ultimately want to get is the firing time and position and the impact time and position. Getting the firing info is simple using a "Fired" event handler, but getting the impact info seems to not be possible without spawning a tracking script for the projectile.

torpid quartz
#

is there a local version of bis_fnc_arsenal_data ?

#

trying to make multiple arsenals that only have specific item types in them

torpid quartz
#

also i'm trying to get this to work

this addAction 
["Full Heal",{[this, player,1,call ace_medical_treatment_fnc_fullHeal];}];```
it's just a VR selector in a spawn room that will heal you if you somehow hurt yourself
thorny ferry
#

@torpid quartz Try:

this addAction ["Full Heal", { [player, player] call ace_medical_treatment_fnc_fullHeal; }];
stone totem
#

Hey guys,
Could you do me a favor and look at this?

Somehow it tells me that the logic in the if-clause expacts a bool and tells me that it is no bool.
Can't see the failure o_o

if (({_x call TFAR_fnc_isRadio} || {_x call TFAR_fnc_isPrototypeRadio}) && (_x != unitBackpack player) ) then {
  player unlinkItem _x;
}
slim oyster
#

Your first {} needs to be a ()

#

The first condition must always be a normal condition/bool with additional conditions being in the {} and resulting in booleans

stone totem
#

o_O

#

ok ^^

#

like this?

slim oyster
#

Yes you can also put the unitbackpack check in { } for lazy evaluation

stone totem
#

ok. now just cause I try to understand:
Where is the difference between () {} and [] in this language?

stone totem
#

oh wow. thanks

#

🙂

autumn swift
#

Hi, for the Balaclava (Low Profile Goggles) when you retrieve it's modlist using configSourceModList it will return the classname of the Contact DLC even though this goggle is part of the base game?
Example: configSourceModList (configFile >> "CfgGlasses" >> "G_Balaclava_lowprofile") RETURNS -> ["enoch"]

winter rose
#

"enoch" is the "base game extension",
"contact" would have been the DLC @autumn swift 🙂

autumn swift
#

Hmm, I was expecting it to return "A3"

#

Thanks for the quick reply though 🙂

cunning crown
#

Yeah, some config entries have this issue (if you look in the Virtual Garage, some vehicles have the wrong icon too), that's what I'm using to get the correct mod:

private _config = configFile >> "CfgGlasses" >> "G_Balaclava_lowprofile";
private _addons = configSourceAddonList _config;   // Get all addons that modify this class 
private _addon = if (_addons isEqualTo []) then { "" } else { _addons#0 };     // Select the addon that initiated the class 
private _mod = configSourceMod (configFile >> "CfgPatches" >> _addon);       // Get where the addon is from
_mod

Should work but I haven't really tested it so ¯_(ツ)_/¯

stone totem
#

it works .... juuhuuuu. "my" first script :D

thanks to everyone that helped the last days :)
It still has a bug but i can live with that.


// 24-07-2020 - Malcolm Heidenbrandt
// --------------------
// This Script deletes Androids, CTABs, UAV-Remotes and TFAR-Radios as soon as players try to use them.
// Script is planned for a 1985 Mission where all these items are not available.
//
// Thanks to Dedmen, PIZZADOX, Grezvany13 and Lou Montana from the ArmA3 Discord for their help!

// Bugs: Does not remove CTAB and stuff from the Backpack. Only when things are mounted.



while {true} do {  
        private _itemArray = ["itemAndroid","itemGPS","itemMicroDAGR","itemcTab","B_UavTerminal","itemRadio","VQI_Sentinel"];      
           {
            player unlinkItem _x;
            if(_x in items player) then {
            player removeItem _x;
            };
        } forEach _itemArray;
        
        _items = [player] call CBA_fnc_uniqueUnitItems;

        {    
            if (_x call TFAR_fnc_isRadio || {_x call TFAR_fnc_isPrototypeRadio}) then {
            player unlinkItem _x;
            }
        } forEach _items;
        sleep 5;
};

autumn swift
#

@cunning crown seems to work so far, thanks for the solution

slim oyster
#

@stone totem instead of using a loop you can use a cba player event for loadout (which is triggered when the player's inventory is changed) and search through the unique items then

stone totem
#

uff

#

and i was so happy that it is working ^^

slim oyster
stone totem
#

so thats basically just a functioncall that I put in the ini?

#

and for that i ignore the whole "while" thing?

slim oyster
#

Yes you would call your function from within the loadout eventhandler and you would get rid of the while loop

astral dawn
#

If you need to support in your mission multiple factions (e.g. players can play east/west/indep) and multiple worlds, what would be your approach to organize the codebase?
@quartz pebble
Check our setup
https://github.com/Sparker95/Vindicta?files=1
Devsetup.ps1 and scripts in tools/builder do the automation
Mission code is in src directory which is symlinked to missionname.mapname folders

quartz pebble
#

@astral dawn Much reminds the approach we use 👍

#

I'm curious how do you use SQF-VM? Do you check with it how your scripts work?

astral dawn
#

Yes lots of code has automated tests

#

Even if it's not tested, it's compiled, which can catch lots of things before arma is started

jolly bone
#

Does allowDamage false on a vehicle also shield its crew from damage?

winter rose
#

Only within armor protection ; crew still gets damaged @jolly bone

jolly bone
#

Great, thank you 👍

spark turret
#

Isnt that mentionied in the biki?

#

Maybe im confusing it with a 3den enhanced tooltip

hallow mortar
#

It's in the vanilla tooltip for the "allow damage" checkbox in the editor. But not on the wiki.

exotic flax
#

Allow or prevent an object being damaged (or injured, or killed).
It doesn't say anything about crew/cargo, since it only applies to the object itself.
And if it's possible to shoot through the object (like windows), it won't get damaged but still go through it and therefor damage anything inside/behind it.

IMHO no need to mention that on the wiki (perhaps as a note though)

timid niche
#

Does anyone know if the addonFiles command work on the dev branch?

winter rose
#

well yeah, it's there

timid niche
#

Alright

winter rose
timid niche
#

Yeah but same with the connectToServer and that doesnt work

winter rose
timid niche
#

Might have tested it before the 17th then

winter rose
#

ah yep, sometimes we have insiders' information to fill the #community_wiki before command's actual release yes

timid niche
#

Alright ty

winter rose
#

"sorry" for the confusion! 🙃

timid niche
#

haha nw

astral dawn
#

pathExists would be nice to have too... although...... it's already in Intercept

winter rose
#

"paaPath" in addonFiles ["a3\3den", ".paa"]?

#

🎁

astral dawn
#

yeah that might be even better for debug 👍

timid niche
#

@astral dawn is there some wiki or something for the intercept functions?

astral dawn
#

I am not entirely sure if pathExists is added by Intercept or by Arma Debug Engine...

#

Intercept is not about specific new SQF functions anyway

still forum
#

ahh I forgot fileExists

#

pathExists is from SQF-Assembly

fast wave
#

To somone who is really new to scripting and have only figured out how to make a simple teleport script. how can I make a teleport script work for only east?

winter rose
#

how do you make this code?

tough abyss
#

Is it possible to make unit play and capture work on dedi?

winter rose
#

I think so

tough abyss
#

How

hallow mortar
#

unitPlay definitely works on a server. You'd simply spawn it in the same way as in any other circumstance, although for safety probably best to make sure it only runs on the server

#

not sure if unitCapture works on a server. If it does, it'll most likely work the same as usual for whichever client it's local to. But...why would you need to run it on a server?

tough abyss
#

soo.. does anyone know if sqf has a line length limit?

fair drum
#

not sure.

slim oyster
#

fileExists

#

pls

#

getAttackTarget is fantastic btw

tough abyss
#

getAttackTarget is fantastic btw
@slim oyster how so

slim oyster
#

You can have state machines based on a unit's enemy target

#

switching to another weapon

#

adjusting stance based on getting enemy target pos and calc'ing from there

#

it's just a way of getting the unit's target directly instead of the older more intensive and less reliable methods we used before

spark turret
#

@fast wave you add a check for the units side. If the side is east => opfor, you teleport

wispy cave
#
[ missionNamespace, "arsenalClosed", {
   //code
}] call BIS_fnc_addScriptedEventHandler;```
If I want that to run on every player do I have to put that in initplayerlocal or is initserver enough?
winter rose
#

soo.. does anyone know if sqf has a line length limit?
Yes, and the length depends on "where" @tough abyss

gilded rover
#

does anyone know of a way to create a timer , that is non reliant on FPS? or is sleep the only way to do that?

warm hedge
#

What exactly is your goal?

gilded rover
#

the goal is i want to display a count down , before recording the time it takes to complete the objective. Also i want to accurately record the time

spark turret
#

hm is sleep reliant on fps? never benchmarked it

#

and why is that important?

gilded rover
#

yeah i have found that if you are running at less than 20 , it starts to bugout (but i might be wrong)

#

I have just always been curious

spark turret
#

its not like you can actually do much that would need uber accuracy like physix stuff

winter rose
#

diag_tickTime - _previousDiagTickTime @gilded rover

Otherwise there is a countdown function I wrote somewhere on the wiki, under a training chronometer BIS function

gilded rover
#

thanks bud , i will go have a look salute

wispy cave
#

Is it possible to disable the command from the command menu to get out?

winter rose
#

@gilded rover BIS_fnc_VRTimer

#

@wispy cave yes, lock the vehicle

wispy cave
#

Well, the problem I'm having is that on a public server the SL of a group is giving that command to another player to try and steal said players vehicle. And I can't exactly lock the vehicle because it's a transport heli

winter rose
#

you can lock it when he is inside?

wispy cave
#

but then no player can get in the back of the heli

winter rose
#

wait, what are you trying to do thonk

wispy cave
#

There's a group of pilots, they fly a heli each. Sometimes the squadleader wants to fly a heli one of the other pilots is flying. He then orders them, through the command menu, to get out, allowing him to steal the vehicle. These pilots are flying other people around from base to the objective

#

I want to disable the ability for group leaders to use the command menu to order other people out

winter rose
#

nope, no can do.
make them AI that are not in his group and script their behaviour

wispy cave
#

Mmh, I guess I'll just tell them to make their own group if they don't want that to happen

winter rose
#

or make a script that kills the SL if he drives these choppahs 😄

spark turret
#

if (vehicle _leader == _forbiddenChopper) then {Hint "get out of me cah!"; pseudoCode kick leader from vehicle; pseudocode order _pilot getInThatCopper;};

#

@wispy cave

wispy cave
#

I don't know which pilot is flying which chopper when, they can all fly all of them, they just can steal them from eachother

spark turret
#

so the pilots are AI or players?

wispy cave
#

players

spark turret
#

are the pilots designated slots?

wispy cave
#

yes

spark turret
#

and the leader is not a pilot?

wispy cave
#

no he's a pilot as well

spark turret
#

oh

#

hm you could set up an uber complicated sign in/sign out system

#

where if you want to fly a helo, you have to apply at a flight control guy and if the helo is taken, you cant get in/get kicked out as soon as you enter it

#

but its probably not worth the hassle

wispy cave
#

nah, they can create their own group already so they'll just have to do that then

spark turret
#

you could make them have their own group each in the editor

high marsh
#

much pseudo

spark turret
#

Yeah i was to lazy to look up the functions

#

But its easy stuff

winter rose
#

have a non-thief player be the leader

high marsh
#

getInMan EH?

spark turret
#

Make a complain addaction for the pilots and have a max counter until the leader is kicked :)

brave jungle
#

can I use or in a case? case ((a) || (b)): { for example

still forum
#

or and || are the same thing
yes

brave jungle
#

Yeah Ik

still forum
#

Based on the information you provided, yes you can

brave jungle
#

thanks 😄

west grove
#

but when i run it via execVM in a script, it throws an error message because of the " "

#

anyone smarter than me knows a workaround for this?

#

i want to remove the " " from the actionKeysNames string

winter rose
#

why would you…!!

west grove
#

want to show it in text not with "x" but [x]

winter rose
#

nvm, my mistake - I mistook actionKeyNames for actionKeysNamesArray, which you should use

west grove
#

yeh, but i took this directly from BI scripts :p

winter rose
#

evolve out of this shell!

west grove
#

well then i want to show it as [x,y,z] :p

#

still same problem

winter rose
#

I used it not later than a week ago

private _keys = actionKeysNamesArray ["ShowMap", 1];
if (_keys isEqualTo []) exitWith { /* no key to open the map */ };

private _key = _keys select 0;
hint format ["Press %1 to open the map", _key];
#

@west grove ↑ this should work

west grove
#

yeah, it does indeed.

#

weird, i used actionKeysNamesArray before in an old script and couldnt get it to work there either

#

guess i'm just a dum-dum

winter rose
#

you may have overlooked something, happens

#

don't beat yourself over it 😉

exotic flax
#

btw... prolly not the best solution, but

_key = str compile _keyWithQuotes;

should also work(?)

winter rose
#

Oo

#

…please don't 😅

west grove
#

that even adds {} around it :p

#

also still some """" but doesn't matter. let's not waste more time with it :>

exotic flax
#

if you use CBA you can also use CBA_fnc_replace or CBA_fnc_trim

_str = [_strWithQuotes, '"', ''] call CBA_fnc_replace;
_str = [_strWithQuotes, '"'] call CBA_fnc_trim;
winter rose
#

@west grove

// (...)
private _key = _keys select 0;
private _keyNoQuote = _key select [1, count _key - 2];
#

and no CBA dependency :p

exotic flax
#

if you don't use CBA as a dependency you're doing something wrong...

winter rose
#

I never used it 😄

#

oh wait

#

it means…

west grove
#

i hate how everything has CBA dependency :p

exotic flax
#

for missions it's usually overkill, but for modding it's a must IMHO

#

on the other hand... most of it should be in vanilla 🤷‍♂️

winter rose
#

yyyup

west grove
#

ok, now i realize that i have another issue. the idea was to open the map screen and focus in a specific task / have the interface with that task open (not necessarily as assigned)

#

i could swear i did something like this already before

#

.. years ago

#

ugh, working with findDisplay is a pain

warm hedge
#

Is this something we can expect for the future update?

winter rose
#

"#lightspot" createVehicleLocal getPosATL player :3

smoky verge
#

what would you use it for?
color picker?

warm hedge
#

Stealth! 😄

winter rose
#

Surveillance spotlights - "a Hind D? Colonel, what's a Russian gunship doing here?"

#

is the daylight flare…? :3

still forum
#

No, I pushed that to next update, because these F'ing annoying people make me just hate that garbage. I know why the other programmers stay away from discord...

grim coyote
#

Would it be possible to get the light "amount" for the player also? 🙂

still forum
#

That is what the video shows @grim coyote

grim coyote
#

I only saw the colored text

#

But thats cool

smoky verge
#

annoying people?

spark turret
#

Yeah some people dont like that dedmen is hiding the arma 4 release date from us

#

I watched a yt video on how arma 4 will drop 2020 and the creator provided zero proof lol

winter rose
#

aaah no, my bad
I thought the video showed new lightpoints, not "getAmbientLight"

Sorry Ded, didn't want to be one of those 🙃

still forum
#

They are reflector objects that we apparently have in internal.. We should really release that

winter rose
#

I think they exist already? Floodlight, right ?

spark turret
#

How performance intensitve is adding scripted lights?

warm hedge
#

Or in Contact?

spark turret
#

Actually does arma do baked lights?

winter rose
#

@spark turret it does lightpoints

spark turret
#

?

winter rose
#

A "glowing orb"
No directional light

spark turret
#

Ah i thought its a rendering technique

#

Whats the maximum brightness and range

#

A nuclear bomb orb 👀

winter rose
#

Been there done that 😄

gilded rover
#

does anyone have an idea on how to disable thirdperson regardless of how the players difficulty level is set (Singleplayer)

slim oyster
cosmic lichen
#

This is so hacky😄 we should have disableThirdPersonView [onFoot,inVehicle] similar to ```
disableUserInput

gilded rover
#

This is so hacky😄 we should have disableThirdPersonView [onFoot,inVehicle] similar to ```
disableUserInput

@cosmic lichen
i second this xD
@slim oyster thanks , I will have a look

cosmic lichen
#

I may open a ticket for it. Who knows.

slate cypress
#

Difference between using playMusic on global and server?

#

won't it end up with the same result?

#

global will mean all clients play it, server will mean server will play it which essentially means all clients will play it too

unique sundial
#

server won’t play it at all

#

unless the server is client then only that client will play it

spark turret
#

i support to a"disableUserInput" alike.

west grove
#

yeh

#

the loop-thing works, but it looks horrid

hallow mortar
#

global will mean all clients play it, server will mean server will play it which essentially means all clients will play it too
That's not how local commands work. Only some things apply to all clients if run on the server. playMusic is not one of them - the music will only play on the machine where the command was executed.

#

If you were to remoteExec playMusic on the server (using default parameters) then it would play on all clients. That's because the remoteExec is being executed on the server, and what remoteExec does is tell other machines to execute the command locally to themselves.

autumn swift
#

Is there a way to eject the player from the ladder he/she is climbing on? player action ["Eject",vehicle player]; applies to vehicles only

winter rose
#

It should be something like dropladder (if it exists), check the biki action page? @autumn swift

autumn swift
#

@winter rose actually yeah I just noticed it as well in the wiki unit action ["ladderOff", targetObject]
However according to wiki targetObject must be a reference to the ladder which im not sure how to obtain ( targetObject is an object with a ladder)

#

objectParent player returns null when player is on a ladder. EDIT: so targetObject is the building that contains the ladder, for now I have the crude workaround of selecting the nearest building objects (which should contain thet arget building) and peform the ladderOff action on each of them

west grove
#

i just remember another issue i had a while ago --- i have a keyframe timeline in a mission file which i export as sqf. that sqf i am then loading in another mission file... but now i can't start the timeline anymore... anyone got any ideas?

#

as far as i can tell the objects are correctly created. it's just that nothing happens when running [x] call BIS_fnc_timeline_play

sly mortar
#

Is there a script command to cycle/select throwables? Or do I have to ensure that the first throwable I add to a unit is the one I want them to have selected?

ebon citrus
#

@sly mortar what are you trying to achieve?

#

Throw a specific nade or select a specific nade?

hallow mortar
#

I think selectWeapon can select throwables

sly mortar
#

Just to select the throwable type. I tried selectWeapon with "HandGrenade" and "HandGrenadeMuzzle" and it didn't seem to work.

spark turret
#

remoteexec doesnt have to be called from the server

#

it can be called from anywhere, targeting anything

hallow mortar
#

I know it doesn't have to be and I didn't say it did

#

I was making an example of how a local command could be made to apply to all clients when run on the server

still forum
#

could be made to apply to all clients when run on the server
local commands being executed on server doesn't mean they apply to all clients

#

they'll still be local. local to the server

hallow mortar
#

yes, that was exactly what I said in the initial conversation, and the point I was originally making

slate cypress
#

I used playMusic in a mission today. Everyone could here it apart from me. I was Zeus however the server was a dedicated server. playMusic was executed only on the server. Can anyone explain why I couldn’t hear it as the Zeus if I am still a client?

hallow mortar
#
  • what was the exact command you used?
  • are you sure other players could hear it?
slate cypress
#

playMusic “Intro”;

#

And yes, they all told me they could hear it

hallow mortar
#

By what means did you execute it? through the debug console?

slate cypress
#

It was through a trigger.

#

The attribute “server only” was checked.

hallow mortar
#

Was there any other code in the trigger?

slate cypress
#

The trigger was activated whenever any player stepped into it.

#

No

hallow mortar
#

It might be worth checking if that attribute really was checked, because playMusic is a local command that does nothing if you run it only on the server, and the behaviour you described lines up, mostly, with the trigger running everywhere.

slate cypress
#

The attribute was 100% checked.

winter rose
#

The attribute “server only” was checked.
@slate cypress this is your issue.

hallow mortar
#

that doesn't sound right if other players could hear it. server only being checked would certainly be the issue if no one could hear it

slate cypress
#

How come I couldn’t hear it then but others could?

#

Surely if it is evaluated on the server, it is replicated to all clients.

#

It seemed to have replicated to all the players but not the Zeus.

hallow mortar
#

Surely if it is evaluated on the server, it is replicated to all clients.
No, this isn't how locality works in Arma. Evaluated only on the server means only the server will execute the code. If something only happens on the server.......it only happens on the server.

slate cypress
#

Oh...

#

Could it be because I didn’t actually go through the trigger?

hallow mortar
#

but clearly the code is somehow being propagated to other clients. Which is not the documented, or previously observed, behaviour for this command.

#

Could it be because I didn’t actually go through the trigger?
No. The server simply detects "a player has entered the trigger" and consequently executes the on-activation code. It doesn't (/isn't supposed to) automatically send it to the specific people who entered the trigger.

#

Did you use any mods while creating the mission? (other than purely content mods like CUP or RHS)

slate cypress
#

Yeah that is what I thought but it didn’t actually work that way in-game

#

3den Enhanced?

#

Zeus Enhanced

#

Pretty much just those if you ignore the content mods

hallow mortar
#

I don't know what 3den Enhanced might do in this context. It could be trying to be clever and automatically send the command to everyone.

slate cypress
#

ace too but I don’t think it has anything to do with that

hallow mortar
#

In any case, the solution to your original problem (not everyone hearing music) is as Lou said to make the trigger not server-only, or to leave it server-only and convert the command into a remoteExec.

slate cypress
#

Ok thanks

slate cypress
#

What about connecting a trigger to a respawn point?

#

Should it be global or server only?

winter rose
#

dunno lol

#

what is the condition?

slate cypress
#

There’s no condition - it is just when any player steps inside the trigger.

#

A respawn point should be made as a “checkpoint” whenever any player steps into the trigger so that if they die, they can respawn close to the action.

#

So if Player1 steps into the trigger, it will activate the respawn point for all players

winter rose
#

There’s no condition - it is just when any player steps inside the trigger.
that is what I wanted to know 🙂

slate cypress
#

Ohh

winter rose
#

make it server-side

slate cypress
#

I thought you meant inside the condition box sorry

#

If I make it global, will it break?

#

Or will it just spam respawn points for everyone

winter rose
#

Modules (and respawn points) are managed server-side if I am not mistaken. So make the trigger server-side only

slate cypress
#

Thanks

hallow mortar
#

@slate cypress something just occurred to me. Do check your game sound settings. playMusic respects the volume of the Music channel. If you have music turned down...that would be why you were the only one who couldn't hear it.

west grove
#

nobody can say anything about the keyframe animation stuff? :x

#

old man is doing something before starting them, but i have no idea what

#

maybe recalculate the curve?

#

it seems none of the timeline related functions are working with keyframes spawned in this way

#

maybe something needs to be defined which doesn't happen when importing from .sqf

west grove
#

play repro_timeline, then run [BIS_Rautake_Timeline02] call BIS_fnc_timeline_play; to see that nothing is happening

ebon citrus
#

I gave up on keyframes a while ago

#

They just dont work

cosmic lichen
ebon citrus
#

Or are extremely iffy to get working even remotely

#

Revo, isnt that coming in next patch?

#

As a parameter or difficulty profile or something?

west grove
#

keyframes work pretty well.

#

nowadays i'm using them with pretty much anything that flies

#

much better than trying for hours to get a good flightpath recording done.

#

also you can edit it easily at any time while a recorded path must be redone completely

ebon citrus
#

@cosmic lichen

stopgap measure until next patch:

["1stPerLimit", "onEachFrame", {
   if (cameraOn == player && cameraView ==  "External") then 
    { 
      player switchCamera "Internal"; 
    };
}] call BIS_fnc_addStackedEventHandler;```
#

only thing that remotely shows is the blink when you try to switch between viewpoints/cameramodes

#

performance impact is minimal, as far as i see.

reported 0.0015ms

#

but i guess that's as low as the engine can run the command with its profiler

#

also not tied to framerate, as it is run on each frame, so low framerates dont impact function

cosmic lichen
#

what about using ```sqf
condition1 && {condition2}

ebon citrus
#

elaborate

cosmic lichen
#

just another way to make it quicker if cameraOn is not equal to player

ebon citrus
#

ah, yeah

#

but it pretty much already runs as fast as the engine can run it

#

but true

#

actually no

#

condition1 && {condition2} takes exactly 0.0004ms longer

#

according to the profiler

cosmic lichen
#

ok

ebon citrus
#

the logic is already so simple that i don't see much room in improvement without making it more complex, but that's just me

#

all in all, i doubt 0.0015ms will impact your performance much at all

cosmic lichen
#

ok, I just tested it and the blinking is annoying. That's the main reason I would like to see a better way of doing it

#

Just feels like the game is broken.

ebon citrus
#

add a hint that says 3rd person is disabled in infantry-mode

#

🤷‍♂️

#

the blinking is aprt of arma 3

slim oyster
#

how about trying to disable the key input(s) for camera change

ebon citrus
#

but infact, the system is NEVER switching to 3rd person

cosmic lichen
#

how about trying to disable the key input(s) for camera change
Is that possible?

ebon citrus
#

you would have to run it every frame

#

since you want it to work in vehicles

#

or add an EH for getting in vehicle

#

and or you need a displayEH

#

'

#

and if youre not spamming the enter key 24/7, you wont mind the blinking

#

infact, i personally like the blink

slim oyster
#

why every frame? You just have a display EH for the key handle

ebon citrus
#

it shows the user that something is happening

slim oyster
#

check status of vehicle

ebon citrus
#

and not jsut their keybinds being wrong

slim oyster
#

have an EH for exiting vehicle to force back into internal camera

ebon citrus
#

true

#

sec

#

@cosmic lichen

(findDisplay 46) displayAddEventHandler ["KeyDown", {
    if ((_this select 1) in actionKeys "personView") then {
        if (cameraOn == player) then 
        { 
              true
        };
    };
}];```
#

something like this

#

remember that it may be overridden by other displayEHs

#

not the most elegant solution, but ignoring keybinds never is

#

pick your poison 🤷‍♂️

#

if someone comes up with another solution, feel free to share

#

takes considerably longer to run, although not run every frame

#
Result:
0.108263 ms

Cycles:
9246/10000

Code:
if ((_this select 1) in actionKeys "personView") then { 
        if (cameraOn == player) then  
        {  
              true 
        }; 
    };```
#

_this is not defined

#
Result:
0.0024 ms

Cycles:
10000/10000

Code:
if ((156) in actionKeys "personView") then { 
        if (cameraOn == player) then  
        {  
              true 
        }; 
    };```
#

there

#

more reasonable result

#

so in the hands of those who know it's running on the background, yeah, it works

#

but if something else is using the displayEH attached to that action, it might override this

#

in conclusion, use the first solution to stay on the safer side and the second solution to remove the blink

#

use both solutions to be secure and remove the blink

#

both CAN be used at the same time

#

the first solution will just catch what is left through by the second

scenic onyx
#

Hey guys, quick question (bit of a newbie when it comes to anything scripting or modding)
so i have created a script, that i normally use through the debug consoles local exec function
however recently it's gotten to be to much a chore and i have tried to compile it all into a better
version of the same script so it runs at the start of every mission, regardless of if its workshop/BI
i have packed .pbo file and im 100% sure im doing everything right, then again, im a huge noob with this stuff.

Is there any chance i can get someone to look over the file and see where/if i am going wrong?

i am willing to pay for your time, i dont expect the service of an experienced modder for nothing
if intersted PM me please.

Thanks in advance guys,

Spartan.

ebon citrus
#

no payment taken, i can look at it ONLY for free

scenic onyx
#

haha

#

if you wish

ebon citrus
#

i dont wish, i demand

scenic onyx
#

ill send you a link 1 sec 🙂

ebon citrus
#

👌

spark turret
#

@scenic onyx are you aware of the different init.sqf files and that you can call custom scripts with param execVM "yourscript.sqf"?

scenic onyx
#

@spark turret hey dude

#

i believe i have done the init files correctly

spark turret
#

What does the script do and how is it executed?

ebon citrus
#

@spark turret dont even ask

spark turret
#

Yeah we pmd

ebon citrus
#

He wants the script to execute post init which he has done correctly

#

Oh, youre the one who advised him on the init

spark turret
#

I cant really help bc idk how to do addons

ebon citrus
#

For the record, you dont use it for what he wants

spark turret
#

Yeah i thought he just wanted to do a mission

ebon citrus
#

I wish

spark turret
#

I feel like it would be easier to make in a mission script and just add a line into the init.sqf if you make a new mission

ebon citrus
#

Yeah, 100 times

#

He is jumping off the deep end here

spark turret
#

Do you have experience with creating addons?

ebon citrus
#

Barely any grasp on scriptibg and already doing mods

#

Somw

#

Some*

spark turret
#

Was wondering if thats the way to go

ebon citrus
#

I dont need a tutorial

#

I need a tutorial on how to get someone to use mikero's tools

#

When they refuse to

spark turret
#

Oh lol

#

Well i need a tutorial and was wondering if yiu can confirm what my link says

stone totem
#

Does anyone know a good and easy way to create a "loadout selector"? Something like an arsenal where people can select "rifleman, eod, ftl, etc".
And if possible something that even non-scripters can place?

#

Tbh I am searching quite a while for something like this, but never found anything that made me completely happy.

spark turret
#

Well the respawn allows you to select from a list of loadouts

#

Ace features default loadouts you can create which the players can then choose

stone totem
#

W000t? I wasn't aware of this!

#

Ok. Than I will check out ace.

spark turret
#

Or you could do some custom stuff with getUnitLoadout and setUnitloadout. Basically create a puppet Ai where yiu adjust the loadout and clone it onto a player

#

Its the ace arsenal Malcolm and does not require any Scripting

stone totem
#

Think I will have a look at ace first 😆 thanks

#

Ah you are talking about the default loadouts in ace?

spark turret
#

Yes

stone totem
#

Hmmm. And there is a way to configure the game so that people will get into the arsenal automatically in respawn?

#

... On respawn

spark turret
#

Im quite sure you can have the player open the arsenal by script

#

if you wish to open a full ACE Arsenal on yourself or open ACE Arsenal via a custom action you can use ace_arsenal_fnc_openBox.
ace_arsenal_fnc_openBox

* 0: Box <OBJECT> * 1: Unit to open ACE Arsenal on <OBJECT> * 2: Ignore virtual items and fill ACE Arsenal <BOOL> (optional) 

Examples:

[_box, player] call ace_arsenal_fnc_openBox

[player, player, true] call ace_arsenal_fnc_openBox
stone totem
#

Ok. Thanks for the push into that direction. From here I gonna experiment myself.

#

That's the best way to learn things 👍

spark turret
#

Is it a SP mission?

stone totem
#

Mp

spark turret
#

Then you will have to execute the ace command on the players machine.

#

Maybe initPlayerLocal is a good place for that

stone totem
#

Ok. Thanks again. Will have breakfast now and will experiment later. 🙂

spark turret
#

Sure thing

slate cypress
#

@hallow mortar I don’t think I have ever touched sound... but I’ll double check.

winter rose
barren spire
#

lets hope that works. it says For waypoints attached to a house, and you cannot attach them anymore. unless attachTo or waypointAttachVehicle works between waypoints and terrain objects?
I'll give it a try

#

ah, waypointAttachObject takes an id :)

spark turret
#

can arma do addition of arrays? vector3 mainly

#

im to lazy to add every entry and recreate the array.

winter rose
#

yes

spark turret
#

and a function for random vector3?

warm hedge
#
[random [-1,0,1],random [-1,0,1],random [-1,0,1]]```?
spark turret
#

hm yeah that will do

winter rose
#

doesn't exist, I did [-1 + random 2, -1 + random 2, -1 + random 2]

#

not ideal, but "close enough"

spark turret
#

why -1 + random

warm hedge
#

Will -1 ~ +1

spark turret
#

ah so to get a vector between -1 and 1

#

kk

#

random[-1,0,1] would do the same tho

oblique arrow
#

heh BI puts multiple things into one line too

"4" objstatus "done"; 0 = [] execVM "task4donecomms.sqf"

winter rose
#

yes - POLPOX is correct, my solution is more "old school/quick & dirty" @spark turret

barren spire
#
_hotelBuilding = [0,0,0] nearestObject 577391;
_bpos202 = AGLToASL(_hotelBuilding buildingPos 202);
[group tat2, 1] setWaypointPosition [_bpos202, -1];

but it doesn't work. he just goes to the ground level, center of the building.

winter rose
#

AGLtoATL no?

barren spire
winter rose
#

and AGLtoATL doesn't exist 😄

oblique arrow
#

does this only need to work for one building or multiple? @barren spire

barren spire
#

it's just one building.
I mean I guess I could set the waypoints manually...

oblique arrow
#

maybe I'm going to be talking heretic speak but if its only one you could just hardcore the coordinate, no?

barren spire
#

yeah, gonna try that

winter rose
#

maybe I'm going to be talking heretic speak but if its only one you could just hardcore the coordinate, no?
hisssssssss 🐍

oblique arrow
#

if Bi can 0 = [] execVM he can hardcore a coordinate heh

spark turret
#

its a building pos. buildings usually dont move

oblique arrow
#

👀 You say that

#

you havent experienced the powers of attachTo

winter rose
#

nor setDir in MP 😄

oblique arrow
#

I wonder if you can attachTo a building that comes with the map to a vehicle spawned in the editor

winter rose
#

nope, technically you cannot setPos/setDir/attach terrain buildings

oblique arrow
#

I was gonna try to attach every object on the map to a vehicle if you said yes

winter rose
#

…this is why we can't have nice things!

#

in OFP you could setFuelCargo 0 all fuel stations… but then had to unload/reload the terrain to get them back to full (or script it back)

oblique arrow
barren spire
#

building pos seems to be relative to the building!
I hardcoded the waypoints and now they're in the ocean xD

also the 0 = [] execVM was done by me, BI only had [] execVM, but 3DEN didn't agree with that. "Returned Script Handle, expected Nothing"

oblique arrow
winter rose
#

weee 😄

spark turret
#

i got a mission where you have to overwatch and defend a convoi from the air

#

but i have to much enemy AI and set it to dynamic sim, but the plane as the dymanci sim activator is less than ideal. could i make the convoi truck an activator?

#

that way only enemies near the convoi are active which is exactly what i want

barren spire
#

deleted and re-created the waypoints... I don't think the AI likes those balconies... but I've seen it work before :/

#

it's also weird that the z-coordinate of the waypoints is like 7404... since when do we measure in centimeters, or wth is going on?

winter rose
#

yeah, even in ASL it seems clearly wrong!

spark turret
#

If the ai doesnt want to move just teleport him

#

Or attach him to an object there

barren spire
#

if I selectPlayer the waypoint is in the right spot, just the AI doesn't like it
works now

slate cypress
#

Do variables get discarded once an .sqf has run?

winter rose
#

not the global ones

slate cypress
#

I need to make a dictionary which doesn't get discarded until the mission ends for the purpose of loadout saving.

still forum
#

only thing that remotely shows is the blink when you try to switch between viewpoints/cameramodes
@ebon citrus
onDraw eventhandler might be better there, might be able to get rid of the blink.
Also prefer to directly use the engine handler, instead of the scripted stacked handler, that would just add overhead.

short sparrow
still forum
#

Thats a clan insignia.
squad.xml or Arma 3 units

short sparrow
#

that file can be placed in the mission directory?

winter rose
tough abyss
#

Not trying to bother anyone but where do you guys reckon I should start about making a vehicle spawn/customisation garage in the editor

spark turret
#

an ingame garage?

winter rose
tough abyss
#

Alright, thanks a lot

ebon citrus
#

@still forum do you mean onEachFrame?

still forum
#

no

#

with EachFrame or Draw3D

ebon citrus
#

I see

#

What's the tangible benefit? And what are the common use-cases?

still forum
#

Same as the stackedEH scripted stuff you posted.
But it doesn't have a script wrapper around it, thus less overhead

ebon citrus
#

Fair enough

#

So what would be the place to use stackedEH over this?

still forum
#

Can't see any

winter rose
#

it was before missionEH introduction

ebon citrus
#

So pretty much superseded?

still forum
#

stackedEH scripted stuff is old backwards compat leftovers, from before we had addMissionEH

slate cypress
#

Is there a teleport method you can use which teleports a given group into a given vehicle?

winter rose
#

moveInAny

still forum
winter rose
#

gib that command I just saw 👀

slate cypress
#

Thanks 😄

#

I run this for each unit, right?

still forum
#

yeah

#

I think driver/gunner might be seated first

slate cypress
#

Yeah. In my case, I have only have passenger seats available in the vehicle which the players can fill. 😄

slate cypress
#

getMarkerPos transportTo errors saying undefined variable transportto

#

transportTo is the variable name for an empty marker I have placed in Editor.

still forum
#

markers have no variables

#

they have names

#

the name is a string, in quotes

#

getMarkerPos "transportTo"

slate cypress
#

Ohh I see

#

cheers

spark turret
#

someone got a classname for spawning in flares?

ebon citrus
spark turret
#

okay so it seems the flares do work but not
"Flare_82mm_AMOS_White"

#

which is the mortar flare

#

maybe someone smarter than me can check that

ebon citrus
#

@spark turret how are you trying to use it?

#

createVehicle?

spark turret
#

yeah

slate cypress
#

Any way to force enemy AI to spot players?

winter rose
#

reveal indeed…?

jaunty zephyr
#

is there an object that's always local to the server? 🤔

still forum
#

BIS_fnc_mainscope thing might be

#

what for?

jaunty zephyr
#

trying to use CBA_fnc_targetEvent on a bunch of clients and sometimes I want to throw the server into the mix

#

yes there is CBA_fnc_serverEvent

still forum
#

can't targetEvent also take the ownerID?

#

server is 2

jaunty zephyr
#

no it cant, it wants object(s) :(

still forum
#

┬─┬ ノ( ゜-゜ノ)

jaunty zephyr
#

quoth CBA:

["_targets", objNull, [objNull, grpNull, []]]

#

it seems modules / game logic are server-local, but dont want to create these just for me saving three lines of not-very-elegant code. CBA_fnc_serverEvent it is -.-

still forum
#

all editor placed objects are server local, unless they get moved over.
Like players get moved, AI's might with HC

jaunty zephyr
#

yes. - different question: is there a game command for "player is in the esc menu", or do I need to find the respective control and check for that

still forum
#

there is one......

#

Well there is one for isPaused, but you can also check the display

jaunty zephyr
#

isPaused doesnt work in MP :/

still forum
#

then check for the display

amber lantern
#

Hmm

#

I'm trying to make a flash drive intel

#

I've tried this/intel1 addAction["Take flash drive", {hint "Intel extracted";}]; but nothing pops up

spark turret
#

actions are local. therefor the above code has to be executed on every client

amber lantern
#

So how should I go about it?

spark turret
#

put it in the init of your flashdrive or any other editor placed object

amber lantern
#

How should I create an extractable intel?

#

yes it's in the init of the flash drive

spark turret
#

okay. then thats likely not the problem. iirc there is also a condition parameter, and i dont see taht in you code

amber lantern
#

It defaults to true

spark turret
#

yeah i just noticed that

#

so far your code is fine

#

does it give any errors?

amber lantern
#

Nope

#

intel1 addAction["Take flash drive", {hint "Intel extracted";}];

spark turret
#

and "intel1" is the correct variable name?

amber lantern
#

That's exactly what I have in the init

#

and yeah it's named intel1

#

I tried it with "this", too

still forum
#

maybe cuz its an item and it will be placed into a weapon holder

amber lantern
#

The object itself is Land_USB_Dongle_01_F

still forum
#

Ah no, that sounds like a vehicle, should be fine

#

problem with addAction is that you need to aim onto it, maybe it has no collision then you can't aim on it

amber lantern
#

There's no option to play with that

#

I tried aiming directly at it, too

#

Any ideas? 😄