#arma3_scripting

1 messages · Page 681 of 1

dreamy kestrel
#

simplest way forward; also don't know what I don't know, i.e. "AnimStateChanged" event handlers...

#

why complicate things?

#

triggers working out great connecting with ieds.

#

Q: it is safe to GC the trigger inside the condition callback, i.e. detects the ied 'went away' for whatever reason, was blown up, disarmed, etc

tiny wadi
#

Is it possible through scripts to tell the third person camera to ignore a specific objects geometry?

dreamy kestrel
#

nice effect, true to form, when I depress the IED a little in the ground, -0.0125 something like that, when it blows, it includes debris.

wanton forge
#

how do I make a enemy shoot at the player when the player walks through a trigger?

fair drum
wanton forge
#

not 100% but basically I am making a Vietnam mission with the new dlc and I have a sniper in a tree waiting for the player to get into a trigger where he will begin shooting at him.

#

I want the player to have a chance to fight back if they are lucky and spot the sneaky sniper

wanton forge
#

multiplayer, but I am testing in single player with one character

little raptor
tiny wadi
#

I just wanted it so that the camera didn't get pushed around by an objects geometry but still rendered normally. Like when you are close to a wall the camera will come in closer, I wanted to disable that for a specific object

little raptor
#

Afaik no

wanton forge
#

Yea I tried setUnitCombatMode and it doesn't work

#

Because the ai doesn't know who the target is I guess

fair drum
wanton forge
#

idk how to do that?

#

SniperAmbush1 setUnitCombatMode "RED"; I have this

#

what do I need to add though so the ai targets man1?

#

man1 being the player

#

Oh I figured it out @fair drum

#

sorry about that

#

SniperAmbush1 setUnitCombatMode "RED"; SniperAmbush1 reveal man1; This is what I did and it is all good

fair drum
#

doesn't help you for multiplayer

#

this is what I had so far.

// Put the following in the sniper's init box
if !(isServer) exitWith {};
this setUnitCombatMode "GREEN";
this disableAI "RADIOPROTOCOL";

// Everything below goes in a trigger
// Trigger Activation: AnyPlayer
// Trigger Server Only: ON

//Condition Box
this;

//OnActivation Box
thisList apply {
    if (_x isKindOf "CAManBase") then {
        SniperAmbush1 reveal _x;
    };
};
SniperAmbush1 setUnitCombatMode "RED";
wanton forge
#

Hey thanks so much! Why is it different for multiplayer though and does this script need to run in a separate file in the map folder?

fair drum
#

it tells you where to put things...

wanton forge
#

Okay cool

#

do I have to add if !(isServer) exitWith {}; to all my init boxes now?

#

And thanks so much for the help

fair drum
#

understand that those init boxes are run on every machine, everytime someone loads the mission. lets say you had a additem command in there and you had 60 players. you just created 60 items. so the server check makes it so that it just runs once, on the server

wanton forge
#

What is a simple script I can write where you go to a body and text appears saying *search body for intel* and then it will say *no intel found* and the player will be sent to another location?

wanton forge
#

Is there a way to make a simple dialogue script so a character can talk to me and then I get an order to go to a certain point?

undone dew
#

strange issue, I'm making a medical task for a mission with some AI set in one of the prone animations but they keep auto-healing so you can't heal them.

this disableAI "ANIM"; this disableAI "MOVE"; if (isServer) then { [[this,"PRONE_INJURED_U2"],BIS_fnc_ambientAnim ] remoteExec ["call"] }; this setDammage 0.5;
finite jackal
undone dew
#

oh maybe

#

hahaha thats what it was, good call

warm hedge
#

The following information is obsolete as of Arma 2 v1.00. Reason: For later titles (Arma 2, Arma 3), see Particles Tutorial - Full examples.

plucky trail
#

Hey Y’all!

I have a custom static object that I wish to omit a specific type of light, similar to the continuous fire light omitted by the BI campfire, but I am unsure how to proceed.

As of right now, I have the object inheriting from the CampingLamp so it gives off a continuous Light but it’s a white/LCD light color.

Is it possible to use config Event handler to change the light’s color, I’m not familiar with Scripts but i believe it would be Setlightcolor & setlightambient. Is this doable?

OR Would it be more convenient to Script a Light point to the model’s location and find a good color match to what I seek?

This is my first project with lights and don’t know what the best practices are so I’m unsure how to approach this situation.

Thank You!

winter rose
#

emit* ^^
Seek Lightpoint tutorial on the BI wiki @Lantern#2301 :slight_smile:

plucky trail
# winter rose Ping

5 AM messaging is bad for my grammar, Thank you for pointing it out though 😂

I had the BI wiki pulled up while I was asking, I’ll start on my light point and learn about event handlers as I go. I appreciate it!

copper narwhal
#

is it possible to use intro cams/intro scripts on dedicated servers or do they only work on sp/mp missions?

cosmic lichen
#

They work if executed for every player

copper narwhal
#

i was planning for it to execute for each individual player whenever they join the server

cosmic lichen
#

that works

fair drum
brazen lagoon
#

crazy idea, has anyone ever tried procedural map gen?

#

something like. you have a specific heightmap painted a certain way and then you use random generation to create cities, roads between them, place trees, etc. is there an inherent limit to the count of mission objects?

grizzled lagoon
#

Hi, I have problem with my remoteexecs if I do sqf [getPlayerUID player, (name player)] remoteExecCall ["JS_fnc_teste", 2]; the function of server sqf diag_log "Reception coté serveur"; but in the log i dont see that, my config.cpp of the server ```sqf
class CfgPatches
{
class John_serveur
{
units[]={"C_man_1"};
weapons[]={};
requiredAddons[]={};
fileName="John_serveur.pbo";
author ="John";
};
};

class CfgFunctions {
class john_fonction {
tag = "JS";

    class base {
        file = "\John_server\core\extdb";
        class server_init {};
        class request {};
        class teste {};
    };
};

};and the cfgremoteexecsqf
class CfgRemoteExec {

class Functions {
    mode = 1;
    jip = 0;

    class JS_fnc_teste {allowedTargets = 2;}; // example envois serveur
    class john_fnc_envois {allowedTargets = 1;}; // example reception coté client
};

class Commands {
    mode = 1;
    jip = 0;
};

};``` The logs do not say that the function cannot be found or that it is not allowed to be executed. Do you have an idea to solve the problem?

brazen lagoon
#

how so

#

are all missionobjects always loaded?

little raptor
brazen lagoon
#

or do you mean that maps have special optimizations that you can't do at a mission level

#

right. and the maps can run higher object counts because they do even less simulation?

little raptor
#

or maybe simulates them when needed? thonk
all I know is that not all objects are fully loaded in a map

brazen lagoon
#

but if you create mission objects, they will always be fully loaded?

little raptor
#

afaik yes

#

you can test

brazen lagoon
#

I see

#

that's a shame but makes sense

little raptor
brazen lagoon
#

hmmm

#

so you could script this then? making 40k trees as simple objects?

#

I guess no way to know without trying

hollow lantern
#

short question about attachTo. I have attached two weapons to a helicopter, however the weapons can't shoot and can't rotate around. Is there something better to work with? I guess it is a limitation of attachTo? https://i.imgur.com/f0zoltH.jpeg
Code used is:

US_SupHelo01_Gun01 attachTo [US_SupHelo01,[-0.145699,5.89916,-5.23]]; 
US_SupHelo01_Gun01 setVectorDirAndUp [[0.00106458,0.999999,-6.36484e-005],[0.0003609,-6.40327e-005,-1]];

US_SupHelo01_Gun02 attachTo [US_SupHelo01,[0.0606022,-0.203697,-5.23]]; 
US_SupHelo01_Gun02 setVectorDirAndUp [[-0.000406593,-1,9.80905e-005],[0.000448534,-9.82729e-005,-1]];```
little raptor
#

they're just turrets

#

if you're using AI to control them it won't work tho

#

because they're upside down

hollow lantern
#

tried a UAV terminal. Turret is stuck. They are B_Uav_AI at best

#

because well, turrets

little raptor
#

did you try an upright one?

#

it should work

hollow lantern
#

I did not, the point of my attachTo was to have them upside down. But I will remove the setVectorDirAndUp of one turret and see if it makes a difference

#

yeah that works then @little raptor

#

but it is not exactly what I'm looking for. Is this a engine limitation that upside down turrets can't shoot?

little raptor
#

¯_(ツ)_/¯

hollow lantern
#

Thanks for your help

tiny wadi
#

Hi, I saw in the 2.04 update there is a Added Support for precompiled SQF bytecode
What is that?

pulsar bluff
#

@brazen lagoon why would we want procedural gen arma maps? proc gen looks terrible

#

more important would be removing paywall from terrains so they can hold a full server

#

maybe a gofundme, ask BIS what $$$ they want to remove the terrain paywalls

little raptor
#

allows faster compilation and in some cases better performance

wanton forge
#

how do you delete a vehicle a few seconds after it goes through a waypoint?

fair drum
wanton forge
#

Waypoint Expression?

fair drum
#

the tooltip should say something like, executes code when waypoint is completed

#

im not in game atm

wanton forge
#

There is On Activation

fair drum
#

yeah that box.

brazen lagoon
#

@pulsar bluff proc gen does not inherently look terrible

#

and besides the idea wasn't even necessarily totally 100% random. maybe something like some scripts that take in some user input and then simplify the map creation pipeline

wanton forge
#

{deleteVehicle _x} forEach units group this; I know this deletes smthn, but I do now want it to delete right away as my cutscene camera needs to see it for a bit

#

So I want it to delete after 10 seconds or so

brazen lagoon
#

sleep 10; first

#

the script you posted will delete all units in the group of whatever unit this refers to

fair drum
#

you gave him a partial answer

#
this spawn {
  sleep 10;
  {deleteVehicle _x} forEach units group _this;
};
wanton forge
#

awesome!

#

Thanks

#

I have a few questions though.

#

So instead of this can I put many units down? Like unit1 unit2 and so on...

unit1, unit2 spawn { sleep 10; {deleteVehicle _x} forEach units group _this; };

fair drum
#
[] spawn {
  sleep 10;
  [unit1, unit2, unit3] apply {
    deleteVehicle _x;
  };
};

simple answer with what you have

wanton forge
#

Oh lol yea that is way easier!

#

Thanks mate!

karmic flax
#

Does anyone know how to make something an ace medical building via scripting?

wanton forge
#

Hey does anyone know how to get an AI to shoot an RPG at a helicopter with 100% accuracy, but no damage when the helicopter passes through a trigger?

wanton forge
#

okay thanks I will check this out

#

[[10005.3,16813,0], "ammo_Missile_Cruise_01", h1, 180, false, [0,0,0.25]] spawn BIS_fnc_exp_camp_guidedProjectile; Here is what I got so far...

[[10005.3,16813,0] This is the start location for the missile, but I am unsure why it is not working. I put this code into a trigger On Activation.

fair drum
#

use a AA missile

wanton forge
#

what is the code for that, and where do I find the list of available weaponry?

fair drum
#

"M_Air_AA"

wanton forge
#

Thanks man for all the help!

fair drum
#

i think you can even use that function to launch cars

wanton forge
#

My code is still shit. lmao

I am so new to this it is not even funny so sorry about all the questions bro

fair drum
#

also, notice your missile start position

#

its in the ground

wanton forge
#

lol kk

lean anchor
#

@still forum hi sorry for tagging you but i cant find much documentation on the EH "GroupCreated"
Im trying to get the leader of the group once it is created and this is my script

_id5 = addMissionEventHandler ["GroupCreated", {
_group = _this;
_groupldr = leader _group;
_groupveh = Vehicle _groupldr;
diag_log _group;
diag_log _groupldr;
diag_log _groupveh;
}];

when running this i get this in my RPT

19:01:42 B Alpha 2-1
19:01:42 <NULL-object>
19:01:42 <NULL-object>

just after spawning in a group with zeus

I then thought it could be todo with delays but im not sure how to add a delay to let the group spawn

crystal flame
#

How do I get the object that called a script from an action? I have this addAction ["<t color='#0000FF'>Garage</t>", "openGarage.sqf"]; in my object init, and inside of openGarage.sqf I'm trying to access what I thought should be _target however that is giving me undefined

#

For clarification, I'm trying to get the object the action is on, not the player that did the action

fair drum
fair drum
#

you need params

crystal flame
#

Is that not a default?

fair drum
#

so params ["_target", "_caller", "_actionID", "_arguments"]

warm hedge
#

GroupCreated / GroupDeleted are added very recently, 2.04?

crystal flame
#

That goes in openGarage.sqf?

#

ahhh I think I figured out the problem

#

I was trying to use _target inside an inline function

fair drum
#

that not your only problem then

#

post your garage.sqf

crystal flame
#

Line 18 is where I'm trying to access _target

fair drum
#

then you have to give all the params to the sqf file

#

_this execVM "openGarage.sqf"

#

now params in your script will be filled

lean anchor
#

v useful EH but im just discovering stuff about it

#

its best to call it and send the group to a script and then edit the group there

fair drum
crystal flame
# fair drum now params in your script will be filled

The params are being filled, I can access _target on line 13. But within my function I can't. I'm assuming it's because line 49 where I call fnc_spawn_vehicle does _spawnbtn buttonSetAction "call fnc_spawn_vehicle";

#

I'm guessing the way it handles calling a string doesn't keep access to the same scope

fair drum
#

that's probably it

lean anchor
#

tada

crystal flame
#

Came kinda close to a solution. _spawnbtn buttonSetAction format [ "['%1'] call fnc_spawn_vehicle", _target ];

#

Except I'm guessing I can't pass objects this way, it jsut turns it into a string unfortunately

fair drum
lean anchor
#

yup

#

just about the only one

#

other than the spotrep

fair drum
#

thats what I need to see. the spotrep

lean anchor
#

rgr

#

1 sec

#

then ctrl + f "group"

fair drum
#

hmm yeah i see that. what have you tried so far? creating a new group with a single unit in zeus?

scenic kestrel
#

Is there anyway to remove the turrets from the military speedboats?

fair drum
scenic kestrel
#

ok cool. you looked for a hiding animation eh? good to know

fair drum
#

they look pretty cool

scenic kestrel
#

sweet, ima go play with that then 🙂 thanks as always.

fair drum
#

@lean anchor figured it out

#

you can't call leader/units/etc from within that event handler

#

store the group in a namespace, then use it from there

#
//Test Handler
addMissionEventHandler [
    "GroupCreated",
    {
        missionNamespace setvariable ["EHThis", _this];
    }
];

//Test in Debug
private _testGroup = missionNamespace getVariable "EHThis";
private _testLeader = leader (missionNamespace getVariable "EHThis");
private _testUnits = units (missionNamespace getVariable "EHThis");

private _return = format ["Group - '%1' | Leader - '%2' | Units - '%3'", _testGroup, _testLeader, _testUnits];
_return;

@lean anchor

#

gives me everything

#

@lean anchor yes there needs to be a delay, tested it with this and it worked as well

addMissionEventHandler [
    "GroupCreated",
    {
        _this spawn {
            sleep 1;
            private _group = _this;
            private _leader = leader _this;
            private _units = units _this;
            private _return = [_group, _leader, _units];
            systemChat str _return;
        };
    }
];

without a delay, the handler fires without grabbing the units before they init

lean anchor
#

would that be faster than if i was exec to another sqf file?

#

im wanting this specific thing to be as fast as possible

#

and yeah, i found that passing it out works

cosmic lichen
#

Exec makes it slower

still forum
fair drum
#

how would you personally delay it a frame without heading into scheduled?

proven charm
#

you need scheduled inorder to use sleep

tired scarab
#

Good Morning from England,

Would anybody here be able to assist? I want to be able to end a mission upon the condition that a given task is completed.

I have set up a trigger with the condition of

taskCompleted inteltask1;

with an on activation

"inteltask1" call BIS_fnc_Endmission.

Though this doesn't seem to work. I imagine that that taskCompleted condition doesn't function how I understood or maybe I have named a variable incorrectly. Maybe there is also a way to do this by usind the End Scenario Module in the editor?

Any advice is greatly appreciated.
Thanks

cosmic lichen
#

Use BIS_fnc_taskCompleted instead of taskCompleted

#

You can also sync the trigger to the end scenario module, but that has less options than BIS_fnc_endMission

#

also SP or MP?

tired scarab
#

SP Thanks

#

Let me give that a go, I am quite new to the editor and scripting so learning out of necessity as I go along,

cosmic lichen
#

Sure.

tired scarab
#

do I need to call this function in the condition of the trigger or is it sufficient just to state it?

cosmic lichen
#

in the condition

tired scarab
#

okay, just checked the syntax on the wiki, I will test it now,

#

ahh excellent it works as intended! thanks you so much!

cosmic lichen
#

yw 🙂

still forum
winter rose
cold pebble
#

Does CBA_fnc_addClassEventHandler not work on buildings such as "Land_Cargo_HQ_V1_F2 or flags? And if not, does anyone know an equivalent way?

copper narwhal
#

hello all again, i think this is the right channel. But for structured text is it possible to position the text more precisely than what i have below 🤔

cutText ["<t valign='bottom'align='left' color='#813b07' size='2'>testtext</t><br/>***********", "BLACK IN", 10, true, true];```
grizzled lagoon
winter rose
#

Does it work without the addon thing - that's the question

grizzled lagoon
#

the diag_log is not work on my log server, but for the sqf [] call compile preprocessFileLineNumbers "\John_serveur\core\extdb\fn_server_init.sqf"; it work

willow hound
#

@grizzled lagoon What about [] call JS_fnc_server_init?

grizzled lagoon
#

it is for load extdb 3

willow hound
#

But does [] call JS_fnc_server_init work too?

grizzled lagoon
#

Yes it work no problem

winter rose
#

I don't know if a client can ask for a function to run if it is not defined client-side too

#

as in [] remoteExec ["ServerSide_Only_Function"];

willow hound
#

Local functions work, see last Note on remoteExec.

winter rose
grizzled lagoon
#

Yes on init un spawn local functions for remoteexec

copper narwhal
willow hound
grizzled lagoon
#

Yes

willow hound
#

Can you post the source code of JS_fnc_teste?

rancid mulch
whole lotus
#

Is there any API for extracting real-time info from the server (player positions, heading, speed etc)? Looking for possibilities to make a real time browser map for a server to use in ATC-operations.

copper narwhal
#

AAA very nice thank you @fair drum @rancid mulch

#

and i presume id use this same thing if i wanted different messages to appear in different areas of the screen consecutively?

grizzled lagoon
# willow hound Can you post the source code of `JS_fnc_teste`?

sorry for my late, ```sqf
params ["_uid", "_nom"];

diag_log "Reception coté serveur";

private _query = format ["INSERT INTO personnage (uid, nom, nombre) VALUES('%1', '%2', '0')",_uid, _nom];

dialog format ["Format sur envois fnc %1", _query];
[_query,1] call JS_fnc_request;

private _query = format ["SELECT nom, nombre FROM personnage WHERE pid='%1'", _uid];
private _result = [_query,2] call JS_fnc_request;
diag_log format ["resultat %1", _result];

private _query = format ["UPDATE personnage SET nombre='%2' WHERE uid='%1'",_uid, ((_result select 1) + 1)];
[_query,1] call JS_fnc_request;```

winter rose
#

dialog format

rancid mulch
# whole lotus Is there any API for extracting real-time info from the server (player positions...

There is an old and dead project. Code is available on github.
https://forums.bohemia.net/forums/topic/168411-real-time-browser-map/
Another project, which does the data extraction on the client:
https://forums.bohemia.net/forums/topic/171846-athena-an-arma-2nd-screen-application/
And a 3rd one here. Basically only the map in a browser but scroll to the bottom and see ctab project:
https://jetelain.github.io/Arma3Map/

grizzled lagoon
whole lotus
#

Athena is not open source unfortunately.

willow hound
fair drum
copper narwhal
#

yeye so for example if i wanted to have the text on the bottom right fades out just as another message in the top left fades in, it would be possible?

fair drum
copper narwhal
grizzled lagoon
still forum
whole lotus
vague geode
#

Is there a way to stop Portable Helipad Lights from blinking instead having them either switched on or off?

cosmic lichen
#

You might be able to use animateSource ["MarkerLight", 0 or 1]

vague geode
hallow depot
#

Hi! I need some guidence once again, can someone please tell me why I get an error message on this script?

cosmic lichen
#

!code

wicked roostBOT
#
How to use SQF syntax highlighting in Discord

```sqf
// your code here
hint "good!";
```

// your code here
hint "good!";
hallow depot
#

I'm trying to make several units guard a building

#
if !(isServer) exitWith {};

_unit1 = newGroup1 createUnit ["rhsusf_army_ucp_squadleader", [14589,16754.2,0], [], 0, "FORM"];
_unit1 setDir 135;
_unit1 setFormDir 135;
_unit1 setPos getPos _unit1;
[_unit1, "GUARD", "FULL"] call BIS_fnc_ambientAnim

_unit2 = newGroup2 createUnit ["rhsusf_army_ucp_squadleader", [14585.2,16750.5,0], [], 0, "FORM"];
_unit2 setDir 135;
_unit2 setFormDir 135;
_unit2 setPos getPos _unit2;
[_unit2, "GUARD", "FULL"] call BIS_fnc_ambientAnim
hallow depot
cosmic lichen
#

So what isn't working?

hallow depot
#

I get an error message

cosmic lichen
#

That says what?

hallow depot
#

hold on, I will start the game

cosmic lichen
#

[_unit1, "GUARD", "FULL"] call BIS_fnc_ambientAnim
One error is in this line

#

Open your rpt

#

no need to start the game

#

!rpt

wicked roostBOT
#
Arma RPT

Arma generates a .rpt log file each time it's run, which contains a lot of information like the loaded mods, or any errors that appear, this log file can be very useful for troubleshooting problems.

To get to your RPT files press Windows+R and enter %localappdata%/Arma 3

Additionally see the wiki page for more info: https://community.bistudio.com/wiki/arma.RPT

To share an rpt log here, please use a website like https://sqfbin.com/ to upload the full log, that way the people helping you can take a look at it and try to figure out the problem you're having together with you.
Note: RPT logs can hold personal information relevant to your system, the game or others.

hallow depot
#

Ok, I think I got the .rpt file inot sqfbin.com, how do I show it for you?

#

*into

cosmic lichen
#

save it and copy the link

cosmic lichen
#

Read the line

#

something is missing

hallow depot
#
[player, "STAND1", "ASIS"] call BIS_fnc_ambientAnim;
#

this is the example from bi wiki

#

I don't get it where there is something missing

cosmic lichen
#

A line has a start and an end.

#

Read it from start to end.

hallow depot
#

Oh, I missed ;

#

at the end

cosmic lichen
#

Exactly

hallow depot
#

Thank you!

#

Still error

cosmic lichen
#

What now?

hallow depot
#

Error setdir: undefined varable in expression newgroup1

cosmic lichen
#

What is newGroup1 ?

hallow depot
#

I guess the group for my _unit1

cosmic lichen
#

Did you create that prior the creation of the unit?

hallow depot
#
if !(isServer) exitWith {};

_unit1 = newGroup1 createUnit ["rhsusf_army_ucp_squadleader", [14589,16754.2,0], [], 0, "FORM"];
_unit1 setDir 135;
_unit1 setFormDir 135;
_unit1 setPos getPos _unit1;
[_unit1, "GUARD", "FULL"] call BIS_fnc_ambientAnim;

_unit2 = newGroup2 createUnit ["rhsusf_army_ucp_squadleader", [14585.2,16750.5,0], [], 0, "FORM"];
_unit2 setDir 135;
_unit2 setFormDir 135;
_unit2 setPos getPos _unit2;
[_unit2, "GUARD", "FULL"] call BIS_fnc_ambientAnim;
cosmic lichen
#

That means newGroup1 is undefined

hallow depot
#

No, whats that?

cosmic lichen
#

newGroup1 = createGroup east;

#

prior to the createUnit command

#

same for the second group

hallow depot
#

Ok, I'll try

hallow depot
cosmic lichen
#

Awesome

#

_unit2 setPos getPos _unit2;
Also, this doesn't make much sense. You can probably just remove it

hallow depot
#

!code

wicked roostBOT
#
How to use SQF syntax highlighting in Discord

```sqf
// your code here
hint "good!";
```

// your code here
hint "good!";
hallow depot
#
[_unit, "STAND", "FULL", { (player distance _this) < 5 }] call BIS_fnc_ambientAnimCombat;
#

if I want the unit to exit the animation and it's on the same side as me, what do I put in the text where it says "player distance _this"?

cosmic lichen
#

side _this == side player

#

or
side _this == playerSide;

hallow depot
#

So for me to understand that, does that mean that the Ai only recognizes Ai on the same side in a 5 meter radius?

hallow depot
#

when I put down an enemy Ai near the Ai with the animation it doesn't exit the animation

#
if !(isServer) exitWith {};

newGroup1 = createGroup [west, true];
_unit1 = newGroup1 createUnit ["rhsusf_army_ucp_squadleader", [14589,16754.2,0], [], 0, "FORM"];
_unit1 setDir 135;
_unit1 setFormDir 135;
//_unit1 setPos getPos _unit1;
//[_unit1, "GUARD", "FULL"] call BIS_fnc_ambientAnim;
[_unit1, "KNEEL", "FULL", { (side _this == side player) < 5 }] call BIS_fnc_ambientAnimCombat;
tough abyss
#

hey guys I am trying to make the task complete when destroying AA and Artillery pieces , this is my code

!alive Mortar1 && AA1;

I tried it in game and gave me error

spark turret
#

yeah you have to add eventhandlers that auto end the animation on danger or similar.

winter rose
#

yup

spark turret
#

even for being killed iirc

tough abyss
#

How would I pair them both for the condition

#

if possible

spark turret
winter rose
fair drum
tough abyss
#

Oh thanks guys , it had me stumped for a bit lol

winter rose
#

I was about to write the "or", so mutual -ninja actually blobdoggoninja 😄

spark turret
#

if you place down (obsolete) brackets in your code, it gets a bit clearer as to why your way doesnt work:

(!(alive Mortar1)) && AA1;
#

but bigbrain could oc set AA1 to value = true, since SQF isnt statically typ(ised(?))

#

(dont do that)

cosmic lichen
#

Am I right to assume that there is no command to check whether simulation is disabled by dynamic simulation system? 😦

winter rose
#

by it, no iirc

cosmic lichen
#

that is a 🦆ing bummer

spark turret
#

hm maybe there are eventhandlers for that that would let you log it?

#

very wild guess

winter rose
#

well a simple dynamicSimulationSystemEnabled && simulationEnabled should do, provided that you do not disable simulation manually

cosmic lichen
#

no

#

simulationEnabled doesn't work for groups

winter rose
#

check its leader then 😬

cosmic lichen
#

that's not the same

winter rose
#

unfortunately.

cosmic lichen
#

I am trying to replicate the debug mode from diag exe

#

Well, mission failed.

spark turret
#

we'll get 'em next time! 🐍

winter rose
#

time for a ticket!

spark turret
#

all these things should automagically go into the arma 4 git feature request tracker

#

damn i was to slow 🐌

cosmic lichen
crystal flame
#

How do I go about retrieving linked objects?

fair drum
#

linked as in modules?

crystal flame
#

Doing Sync To, then using synchronizedObjects returns an empty array

#

like attaching an object in the editor

little raptor
cosmic lichen
#

inside the Editor use the 3den* commands

crystal flame
#

I want to link an object to the garage to use as spawn points

cosmic lichen
#

Need to be more specific

#

What garage?

crystal flame
# cosmic lichen What garage?

Sorry. Just an object I've placed down, with an action on it. When the player uses the action I'm trying to get an array of linked objects to spawn a vehicle at

fair drum
#

why don't you record the posATL and dir of each of the linked objects and just use those in the addaction script?

crystal flame
#

Ideally I want to be able to just link positions to the garage object that I can move around without having to use specific object variable names. That way I can have multiple garages where I can add/remove/move spawn points easily

#

And potentially another script in the future to set spawn points during runtime

#

So my idea was that any object with the garage script as an action would look through some list of spawn points when you do the action, where the list could be modified and not hardcoded

little raptor
crystal flame
little raptor
#

synchronizedObjects don't work on those afaik

crystal flame
#

If thats what you meant

#

That's just one of the things I tried

fair drum
#

you are over complicating this. just select all the positions of the objects you want, right click select log -> positions to clipboard and just paste it in a variable for init and just call a select random of that variable for a position

crystal flame
#

Yes I'm fully aware I can do something like that. But I'm trying to not have the spawn positions hard coded

little raptor
crystal flame
#

And any time I want to make adjustments I have to go back in and copy paste new positions

#

It's very poor coding practice

fair drum
little raptor
fair drum
#

its a combination of conditions with setCaptive

crystal flame
little raptor
crystal flame
#

My end goal is a base building scenario. Where there could be any amount of garages in the game, with any amount of spawn points in use by each one at undetermined positions

little raptor
#

how do you "determine" them then?

fair drum
#

why not use the alternative syntax of getPos or use BIS_fnc_findSafePos? with the garage object as the center

crystal flame
#

Some method of spawning a garage initially, then there will be an action to add a new spawn point. You move to the position, and use some action like "Set Spawn Point Here". It then adds your position to the garage somehow so when you use it as a spawn, it has its own list of positions

crystal flame
#

The reason I was trying to use links in the editor is because I want to have premade garages as well

#

Okay I think I'm on the right path now then

#

Thanks for your help

fleet plaza
#
// your code here
if (hasInterface) then {
    private _zeus = (allMissionObjects "ModuleCurator_F") select 0;

    _zeus addEventHandler ["CuratorObjectPlaced", {
        params ["_curator", "_entity"];
        
        if (_entity isKindOf "Land_GarbageBags_F"}) then {
            deleteVehicle this;
        };
        
    }];
};
#

how to fix this so it works?

winter rose
#

deleteVehicle _entity;?

willow hound
#

Remove the excess } in the if-statement.

fleet plaza
#

if (hasInterface) then {
private _zeus = (allMissionObjects "ModuleCurator_F") select 0;

_zeus addEventHandler ["CuratorObjectPlaced", {
    params ["_curator", "_entity"];
    
    if (_entity isKindOf "Man" && {(side (group _entity)) isEqualTo EAST}) then {
        null = _entity spawn INF_fnc_infecthim;   
    };
    
}];

};

fleet plaza
winter rose
#

this } is the issue

fleet plaza
#

oh wait

#

well now it works

#

tnx

wicked fulcrum
#

Not sure if this is the correct channel to ask. But I got a question about best-practices for signing of mods. So for mods that has server-side code creating a new key-pair for each update is, as I understood it, best-practice as it ensures that any client only joins with the mod version that match the server-side "mod code".

However for purely client-side mods would you still create a new key-pair for each mod update? Or would you just use the same key as there is no server-side "mod code" to match?

I can see the benefit of using the same key would save the server-admins from having to update the key upon update. While the negative part is that the server-admins won't see and test the changes a update brings, before there could be clients on the server using that update.

little raptor
wicked fulcrum
#

Cheers. Will do that. 🙂

past wagon
#

I need a piece of code that will delete all vehicles within a marker area, but I can't figure out how to go about doing this. It seems simple, I just don't know what to do

little raptor
past wagon
#

this isnt related to my last question, but how does this code look?

_spawners = allPlayers inAreaArray "VehicleSpawningArea";
[_spawners, ["Please wait before spawning another vehicle!"]] remoteExec hint;
cosmic lichen
#

units inArea?!?

past wagon
#

yeah i have no idea

cosmic lichen
#

hint in forEach?

past wagon
#

yeah lol

#

i really have no clue how that is supposed to work lmao

cosmic lichen
#

I don#t even know what you are trying there

#

read docs of units, inArea, hint and forEach, maybe also format

past wagon
#

heres what im trying to do

#

I have an action that spawns a vehicle. i want to limit how quickly players can spawn vehicles, which i have already done. When it stops them from spawning a vehicle, I want it to hint them that message. So, what I did was I made a small area around the action, and I want it to hint all players in that area

past wagon
#

okie

little raptor
#

but hint forEach makes no sense

past wagon
#

is that because hint is local?

cosmic lichen
#

yes

#

and because you only need hin once

past wagon
#

do i need to remoteExec?

cosmic lichen
#

yes

#

without forEach

little raptor
cosmic lichen
#

Yeah, that is true too

past wagon
#

ok ok ok

#

i get it

#

i can use a single hint command to hint multiple units

#

so, an array of units

cosmic lichen
#

just remoteExec the hint to all players that are in the spawn area

past wagon
#

oh wait i forgot to remoteExec

cosmic lichen
#

Will still not work

#

read the units doc

#

and maybe allPlayers

past wagon
#

ok

#

also when I do remoteExec on hint will it look like this? I am guessing I am completely wrong. just trying to remember what it looked like last time I used remoteExec

[_spawners, ["Please wait before spawning another vehicle!"]] remoteExec hint;
crude vigil
#

Dont try to remember what you did, try to open wiki of the command if you do not remember the available syntax

#

Memorizing does not really help when you need to alter things.

cosmic lichen
#

There is literally an example on the remoteExec page. Please read it

past wagon
#

i know but im always confused about remoteExec syntax

cosmic lichen
#

Invest these 5minutes

past wagon
#

even when I read the wiki

crude vigil
#

There are 11 different examples on the page.

#

There is a direct example of hint usage.

past wagon
#
["Please wait before spawning another vehicle!"] remoteExec ["hint", _spawners, false];
crude vigil
#

See, that is now progression

#

Thank you mighty docs

cosmic lichen
#

You can omit "false" since that's the default

#

Just make sure you _spawners is correct now.

past wagon
#

thanks, my bad for not checking the wiki first

#

yeah now I gotta fix _spawners

cosmic lichen
#

read allPlayers

past wagon
#

ok

cosmic lichen
#

That's what you want to use

past wagon
#

alright so heres what i have now:

_spawners = allPlayers inAreaArray "VehicleSpawningArea";
["Please wait before spawning another vehicle!"] remoteExec ["hint", _spawners, false];
little raptor
cosmic lichen
#

Looks good if "VehicleSpawningArea" is a area marker

past wagon
#

yep

#

thanks

past wagon
#
_cars = vehicles inAreaArray "CarSpawn1";
{ deleteVehicle _x } forEach _cars;
#

so my goal is to delete all vehicles inside a marker ("CarSpawn1"). Will this do the trick?

winter rose
#

did you try it 😊

past wagon
#

yeah lemme try it

#

also can I do something like this where I have 3 different variables and I just want it to wait until at least one of them is equal to zero?

waitUntil { s1 == 0 or s2 == 0 or s3 == 0 };
cosmic lichen
#

waitUntil { 0 in [s1, s2, s3]}; would work as well

dreamy kestrel
#

Q: working on a mission/mod, I noticed that my side flips from playerSide or WEST to ENEMY after engaging several EAST faction units. why is this? and is there a way to prevent it?

#

I'll elaborate a bit, it matters because I am also counting units by side, so counting on the alignments to be dependable.

past wagon
little raptor
#

use a HandleRating event handler to prevent negative rating

#
player addEventHandler ["HandleRating", {
    params ["", "_rating"];
        0 max _rating;
}];
dreamy kestrel
#

friendly fire? hmm... so I am setting friendliness as well, could that be it?

#

mainly wanting to account for civilian disposition toward players, that sort of thing; but I was wondering if that also deals with opfor aggression towards blufor?

little raptor
dreamy kestrel
#

okay, that's a clue where to begin looking

little raptor
#

try that event handler code

#

it'll prevent it

#

if that's why

dreamy kestrel
#

what does it prevent? friendliness from being evaluated?

little raptor
#

you won't get negative rating for friendly fire

dreamy kestrel
#

so I could set that, but really the root cause is to use the friendliness better. east+west should always be aggressive to each other, no half measures. civilians is another question.

#

thanks

#

follow on question, I guess there is no way to identify the "other" unit in the rating evaluation short of bookkeeping hits and kills?

little raptor
dreamy kestrel
little raptor
#

yeah you don't

dreamy kestrel
#

so in other words, we might "allow" true friendly fire, but might filter true enemy fire

little raptor
#

that's what I said

#

you need an even handler on the other unit to detect he is being hit

#

like hit, handleDamage, etc.

dreamy kestrel
#

right, okay dokay, thanks

crystal flame
#

still needs some more work, I want to add camouflage selection, and display the top speed and seat count as well

fair drum
#

You ended up doing what I pm'd?

dreamy kestrel
#

I properly engaged my first couple of sector captures today, including OPFOR units spawning in. And with a little help from a damage reflection god mode, jammed through them and play tested out some kinks. For the most part working well, but I need to fine tune the unit garrison strategies a bit. Should not be difficult, but I do want to keep the groupings at least somewhat geographically centered if possible. Then round it all out with light and heavy vehicles.

round scroll
#

this code here seems broken after a recent arma update. Earlier it stopped AI infantry to be fixated on air units when they appear, now it does not do much. Is forgetTarget broken or is another command needed now? https://sqfbin.com/rumoliyiqelusamewigo

ivory lake
#

OK i got a weird situation, I'm using a deleted eventhandler on an object and when it runs I want to delete an array of objects along with it. I feel like I should know the answer for this but what I've tried so far doesn't work or sucks.

#

However getvariable doesn't work on the object as it's deleted

#

What's the best way to pass an array to the eventhandler and allow for multiple instances of the script (so has to be a unique global variable if going that route)

#

NVM I'm a moron who used the wrong variable name, getVariable worked fine.

cold pebble
#

I have a question ref CBA_fnc_addClassEventHandler which has confused me a bit. I'm currently using it for a variety of classnames however a few recent additions don't seem to be working as intended.

private _fobBuildingClassname = getText(missionConfigFile >> "Blufor_Setup" >> "AW_fobBuilding"); //returns "Land_Cargo_HQ_V1_F"
[_fobBuildingClassname,"initpost",{
    params ["_object"];
    if ([getPosATL _object] call AW_fnc_isNearFOB) then {
        _object addEventHandler ["HandleDamage",{0}];
    };
},false] call CBA_fnc_addClassEventHandler;
["Land_TentHangar_V1_F","initpost",{
    params ["_hangar"];
    AW_maxPlaneCount = AW_maxPlaneCount + 1;
    publicVariable "AW_maxPlaneCount";
},false] call CBA_fnc_addClassEventHandler;

The above are 2 examples where it doesn't seem to be working. When looking at it further, if I do ["All","init",{systemChat str _this}] call CBA_fnc_addClassEventHandler nothing comes up for when either of the above are spawned however when I look at the XEH configs it should be enabled

class All {
        XEH_ENABLED;
    };

Have I missed something, or is this intended? And if it is, is there a nice way to do what I am trying with something within CBA or ACE?

vague geode
#

Is there a way to command subordinate AI like UAVs (waypoints marked, changeable waypoint types etc.)?

winter rose
#

only with the command menu, no "create waypoints" for them in vanilla @vague geode

cosmic lichen
#

High Command

vague geode
#

Ok, thank you guys.

vague geode
#

Is there a way to take a look at the code that makes it possible for UAVs to be commanded that way?

cosmic lichen
#

It's handled inside the engine I believe.

#

No way to look at it

vague geode
sonic linden
#

i have a problem, i want to attach my player to an object and still be able to move my had and look around is this even possible at all ?

willow hound
#

Well, have you tried moving anything after attaching your player to something?

sonic linden
#

i dont get this question can you repeat ?
i have tested it and my player is attacht but my 1/3personview is locked

warm hedge
#

attachTo is not really cool with native actions. Forget the idea is the best way to achieve, or do setPos setDir or such command every frame

sonic linden
#

okay

willow hound
#

attachTo is the only way to attach objects, but, as you already found out, you can not look around when attached to something.
I imagine the only way around this would be making a mod with a fake vehicle seat for the player to sit / stand in (and then attaching that seat), because you can look around and shoot in vehicles.

sonic linden
#

i have done that but its a bit wired, i dont get the eye pos of cargoslots to work, its always offset to the center of the "vehicle"

willow hound
sonic linden
#

that's funny, already ask there a few days ago. they sad use attachTo ;D

crystal flame
#

I’ll need to make some changes for multiplayer but as is it works great

drifting portal
#
{ 
_x enableSimulationGlobal false;
_x hideObjectGlobal true;
} forEach units independent;
#

this doesn't seem to work?

#

its not hiding or disabling simulation on independent units

copper raven
#

where are you running this

drifting portal
#

I think I need to do spawn right?

warm hedge
#

No call should do

#

Make sure units independent is returning something

drifting portal
copper raven
#

dedicated?

drifting portal
copper raven
#

but dedicated? or playerhost?

#

doesn't tell me much

drifting portal
copper raven
#

and you're the one running the code, not some other client?

drifting portal
#

yes

#

Server Exec

copper raven
#

🤔

drifting portal
#

and tried global exec

#

it just hides them

#

simulation is still on

#

they still shoot me

#

but they are not visible

drifting portal
drifting portal
#

fixed it

#
{  
_x enableSimulationGlobal false; 
_x hideObjectGlobal true;
vehicle _x enableSimulationGlobal false; 
vehicle _x hideObjectGlobal true; 
_x disableAI "all";
} forEach units independent; 
winter rose
#

now that's quite different from

this doesn't seem to work?
its not hiding or disabling simulation on independent units
😬
so, yeah, vehicled units are managed differently. kudos on finding out

fair drum
#

Yeah if the units are in a vehicle, just disable and hide the vehicle. It will disable and hide the units as well making it easy.

cosmic lichen
#

What's the best way to check if player(s) was/were detected by given side? knowsAbout seems to be a bit too unreliable.

hollow thistle
#

you mean <side> knowsAbout player?

cosmic lichen
#

Yeah

hollow thistle
#

hmm, well you could check knows about of every units <side>

#

but that's more expensive.

#

Probably bit more reliable.

#

or big ass trigger with detected by condition pepe_laugh

cosmic lichen
#

targetsQuery perhaps

#
[] spawn 
{
  while {true} do 
  {
    sleep 30; 
    _detected = units east findIf {((_x targetKnowledge player) # 0 == true || (_x targetKnowledge player) # 1 == true) && alive _x};
    hint str (_detected > -1);
  };
};
```This seems to actually work very nicely. This way the player has 30 seconds to kill the unit which detected him before the alarm goes off.
proven charm
#

its not always 30 secs, depends when you call the code

cosmic lichen
#

true

proven charm
#

could already be sleeping there 🙂

cosmic lichen
#

Good catch

cosmic lichen
#

Is there a way to spawn fireflies?

#
createvehicle [_type,_pos,[],_maxHeight * 0.1,"none"];
``` Works but no FSM =/
warm hedge
#

Fireflies?

#

As, bugs?

hollow thistle
cosmic lichen
#

❤️

hollow thistle
#

not sure if it works on them.

cosmic lichen
#

Gonna find out

hollow thistle
#

"P:\a3\animals_f\Data\Scripts\main.fsm"

#

it just calls this func on the agent and quits

cosmic lichen
#

Doesn't work

hollow thistle
#

try with an agent

#

you're creating a vehicle, vehicles have no brain

cosmic lichen
#
private _agent = createAgent ["FireFly", getPosATL player, [], 0, "NONE"];  
[_agent] call BIS_fnc_animalBehaviour; 

No luck

hollow thistle
#

it seems they can't be created as agents

#

null object

cosmic lichen
dreamy kestrel
#

re: garrison for a sector, I spawn a group in, that much is fine, but they "always" form up in whatever formation, and I'd like that not to be the case, i.e. just be where I placed them. I might give them an instruction, i.e. defend a point, patrol waypoints, etc, but that's a next step. thanks...

tough abyss
#

bruh

cosmic lichen
#

@dreamy kestrel Create one group for each unit

#

or use doStop

dreamy kestrel
#

doStop, thanks...

little raptor
cosmic lichen
#

Doesn't matter for 2 or 5 units

#

I am here to show options, not tell what's the best for his situation

dreamy kestrel
cosmic lichen
#

Be more precise next time then

little raptor
#

There are two problems with that.

  1. Group limit (256 per side I think)
  2. Each unit will have their own path finding thread, which will severely slow down the game
    when they're grouped only the leader generates a path (the others simply follow the leader)
dreamy kestrel
#

I wasn't asking that though, read the OP. only that the group would form up. anyway, doStop is the solution. appreciate the feedback.

wind hedge
#

guys, is this:

#

(((getPosWorld _x) select 2) < 20)

#

as good as

#

(((getPosATL _x) select 2) < 20)

#

I need to find out if the unit is not too high in the air

#

getPosWorld is faster so that is why I am trying it use it

cosmic lichen
winter rose
#

ATL = Above Terrain Level

#

but not above building level 👀

little raptor
#

a completely different thing

#

if the unit is not too high in the air

#

neither of them fit your need

hoary halo
#

Hey guys! I've got this recruitment script that I use, but I'd like the dismiss action range to be reduced, otherwise I see the "dismiss" action on screen all the time, I'd like to reduce it so I have to be facing 1 meter of the unit I want to dismiss for the action to pop up, if anyone could help that would greatly appreciated

#

said script :

#

MMF_fnc_recruit=
{ params ["_caller"];

if (_caller== player) then {

MMF_recruitAction=[ player, "Join Group",
"\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa",
"\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa",
"player distance cursorTarget<5 && (cursorTarget getvariable ""MMF_isRecruit"") <1", "playerSide isEqualTo side cursorTarget", {}, {}, {
[cursorTarget] call MMF_fnc_recruit;
}, {}, [], 2, 0, false, true] call BIS_fnc_holdActionAdd;
} else {

[_caller] join (group player);
systemChat "Joined group";
_caller setVariable ["MMF_isRecruit", 1];

dismissAction=_caller addAction ["Dismiss", "[_this select 0] join grpNull; (_this select 0) setVariable [""MMF_isRecruit"", 0]; (_this select 0) removeAction dismissAction;"];
_caller addEventHandler ["Killed", {
(_this select 0) removeAction dismissAction;
}];
};
};

willow hound
winter rose
#

!code

wicked roostBOT
#
How to use SQF syntax highlighting in Discord

```sqf
// your code here
hint "good!";
```

// your code here
hint "good!";
willow hound
#

You might run into problems using that dismissAction variable because it's a global variable. Imagine this scenario:
You have two units A and B. Unit B already has had an action added to it previously, unit A has not. You add the dismiss action to both units.
Because it already had an action added to it, addAction with unit B will return 1. But addAction with unit A will return 0, so one value will overwrite the other because both are saved to the same dismissAction variable.
Now you can't delete the dismiss action from one of the units because what's stored in dismissAction is not the same as the Action ID of the dismiss action on that unit.

cosmic lichen
#

Just save it in the namespace of the unit

wind hedge
# little raptor neither of them fit your need

This is my need: ```SQF
waitUntil {
sleep (2 + random 2);
if (diag_fps > 15) then {
private _playerIsNearEnough = ((allPlayers - entities "HeadlessClient_F") findIf { (alive _x) && !(vehicle _x iskindof "Air") && (_x distance2D _zombieSpawnPos < _zombieSpawnDistance) && (((getPosWorld _x) select 2) < 20) }) isNotEqualTo -1;
(_playerIsNearEnough)
};
};

winter rose
#

with words please? what do you want to achieve?

cosmic lichen
#

😄

little raptor
wind hedge
#

I don't want players too high up to trigger the continuation of the waituntil

little raptor
#

height is measured from the sea when you use ASL

#

a person on a mountain will be considered "too high" in your code. so _playerIsNearEnough = false

#

also no need for _playerIsNearEnough

copper raven
#

use lazy eval and omit the if

wind hedge
little raptor
cosmic lichen
#

ASL is just wrong

little raptor
#

ASL and AGL are the best world coordinates

wind hedge
#

I just want the fastest what will do the job, so it is AGL?

cosmic lichen
#

You are evaluating that every 2 to 4 seconds

#

saving 0.002ms on a position won't save you

wind hedge
#

yes but I have like 30 locations running that spawn4

cosmic lichen
#

if you need to watch our for surfaces eg rocks use AGLS

wind hedge
#

No I just need to know if a player is near enough so I can spawn the zombies

cosmic lichen
#

How many players?

little raptor
wind hedge
#

I will just go with getPosATL

cosmic lichen
#

Remove the if, remove the _variable use lazy eval

#

then do performance testing

wind hedge
# cosmic lichen Remove the if, remove the _variable use lazy eval

Like this: SQF waitUntil { sleep (2 + random 2); ((((allPlayers - entities "HeadlessClient_F") findIf { (alive _x) && !(vehicle _x iskindof "Air") && (_x distance2D _zombieSpawnPos < _zombieSpawnDistance) && (((getPosATL _x) select 2) < 20) }) isNotEqualTo -1) && (diag_fps > 15)) };

#

?

cosmic lichen
#
waitUntil
{
   sleep (2 + random 2);
   ((((allPlayers - entities "HeadlessClient_F") findIf
   {
     alive _x && 
     !(vehicle _x iskindof "Air") && 
     (_x  distance2D _zombieSpawnPos < _zombieSpawnDistance) && 
     (((getPosATL _x) select 2) < 20) }) isNotEqualTo -1) && 
     diag_fps > 15)
   };
}; ```
#

a bit easier to read

#

might wanna exit if diag_fps is < 15

#

so perhaps put that in front and use lazy eval

copper raven
#

just lazy eval whole thing

#

no need to do any exiting

cosmic lichen
#

That's what I meant

little raptor
#
waitUntil {
  sleep (2 + random 2);
  diag_fps > 15 && {
    (allPlayers - entities "HeadlessClient_F") findIf { (alive _x) && !(vehicle _x iskindof "Air") &&   {(_x  distance2D _zombieSpawnPos < _zombieSpawnDistance) && (((getPosATL _x) select 2) < 20)} }) != -1
  }
}; 
cosmic lichen
#

this

wind hedge
#

Thanks guys! You rock!

#

can't wait util @cosmic lichen and @little raptor release their own cDLC!

cosmic lichen
#

#notGonnaHappen

#

Wait, why if in waitUntil?

#

I guess it's not needed

little raptor
#

isn't it an infinite loop?

#

I just remove it for now

#

I don't know what it is anyway

cosmic lichen
#

I dunno.

#

that random 2 is also weird given that he is looking for max performance but can't decide on how often he needs to run it 😄

wind hedge
#

the random part is so that it doesn't check at the same time as the other 20 loops

#

but perhaps my logic is flawed

willow hound
#

Have you already considered using distance to omit the height check?

wind hedge
#

but distance is 800...

#

I guess I could also use isTouchingGround

willow hound
#

You're already checking for aircraft and I don't see many other options to gain altitude, so what's up with that anyways?

cosmic lichen
#

Parachutes ? 😄

#

Flying tanks

wind hedge
#

Arma 3!

cyan dust
#

Good day. Is there a command to play "glitch" visual effect just like when mission ends?

cosmic lichen
#
0 cutrsc ["RscInterlacing","plain"]; 
0 cutrsc["RscNoise","black"]; 
0 cutrsc ["RscStatic","plain"];
little raptor
brave lance
#

Hello is this working?
(desc.ext)

disableChannels[] = {
    {0, true, true}, //--- Global Chat
    {1, false, true}, //--- Side Chat
    {2, true, true}, //--- Command Chat
    {3, false, false}, //--- Group Chat
    {4, false, false}, //--- Vehicle Chat
    {5, false, false}, //--- Direct Chat
    {6, true, true} //--- System Chat
};
copper raven
#

iirc disableChannels is broken

brave lance
#

soo?

#

what can i do about it to disable any channels

copper raven
brave lance
#

If you guys keep going to give wiki links every one for helping wtf is this channel anyways?????

copper raven
#

well do you want me to copy paste the syntax or what?

brave lance
#

bruh

#

tbh arma community dying every single day because of this kinda stuff (infistar, weirdly moderated servers, people are so arrogant)

#

Not up-to-date tools old engine, really bad coding language. And this game is still making money at least update the editor.

winter rose
winter rose
brave lance
#

Okay maybe i want, spoonfeeding. I think this is the right place to ask.

  • SQF language is only works for Arma.
  • Hard to learn.
  • Look like cpp but not cpp maybe java?
  • Not really great videos for visual learners.(They are great but old)
  • So complicated and no proper debugger.

And yes new comers wont understand from wiki. Sorry.

graceful kelp
#

Hey could i get some quick help to get a statement to work, so if there is an intersect it removes _X from array

_ins = [_heli, "GEOM"] Intersect [_heli modelToWorldWorld [0,2.1,2.2], aimPos _x];
if !(_ins isEqualTo []) then {
    _dataLinkArray = _dataLinkArray - [_x];
};
winter rose
#

Is that understood? We understand the potential frustration, but we are not your punching ball to evacuate it.

little raptor
#

you can't remove array from array like that

copper raven
graceful kelp
#

it is inside a foreach statement that checks everything in an array

little raptor
#

it doesn't matter

graceful kelp
#
    {
        _ins = [_heli, "GEOM"] Intersect [_heli modelToWorldWorld [0,2.1,2.2], aimPos _x];
        if !(_ins isEqualTo []) then {
            _dataLinkArray = _dataLinkArray - [_x];
        };
        sleep 0.20;
    }   foreach _dataLinkArray;

so this wont work

little raptor
#

if _x is an array , _array - [_x] won't work

little raptor
brave lance
#

By any meaning i don't want to be disrespectful to any one. I love ArmA. Its not like a game it more like framework for milsim. But arma is lacking on game engine. 10 years old engine and still working on single thread. Please update wiki(Classnames are missing some pictures from beta.) and editor.

graceful kelp
#

is if !(_ins isEqualTo []) then {
incorrect?

little raptor
graceful kelp
#

object

little raptor
#

then it should work

graceful kelp
#

it dosent want to

winter rose
graceful kelp
#

thats what i need help with

little raptor
graceful kelp
#

so im tryna make a radar script i came on here before to get help using check vis but that dosent work for what i need

if (isVehicleRadarOn _heli && (_heli animationPhase "fcr_enable" == 1) && _heli getHit "radar" < 0.8) then {
    _datalinkarray = (listRemoteTargets playerSide) apply {_x # 0};
    {
        _distOffAxis = abs ([[_heli, (getposatl _heli select 0), (getposatl _heli select 1), (getposatl _x select 0), (getposatl _x select 1)] call fza_fnc_relativeDirection] call CBA_fnc_simplifyAngle180);
        if (_x == _heli || _x isKindOf "man" || _x isKindOf "StaticCannon" || laserTarget _heli == _x) then {
            _dataLinkArray = _dataLinkArray - [_x];
        };
        if !(alive _x) then {
            _dataLinkArray = _dataLinkArray - [_x];
        };
        if ((_heli getVariable "fza_ah64_agmode" == AGMODE_GND) && (_distOffAxis > 45)) then {
            _dataLinkArray = _dataLinkArray - [_x];
        };                
        if (_heli getVariable "fza_ah64_agmode" == AGMODE_AIR && !(_x isKindOf "air")) then {
            _dataLinkArray = _dataLinkArray - [_x];
        };
        _ins = [_heli, "GEOM"] Intersect [_heli modelToWorldWorld [0,2.1,2.2], aimPos _x];
        if !(_ins isEqualTo []) then {
            _dataLinkArray = _dataLinkArray - [_x];
        };
        sleep 0.20;
    }   foreach _dataLinkArray;
    {
        if !(_x in fza_ah64_targetlist) then{
            fza_ah64_targetlist = fza_ah64_targetlist + [_x];
        };
    } foreach _dataLinkArray;
};
fza_ah64_fcrlist = _dataLinkArray;
brave lance
graceful kelp
#

so im tryna check if there is something between the target and heli

little raptor
#

Finds named selections in object which are in specified LOD, intersected by given section of a line.

graceful kelp
#

lineIntersects then?

little raptor
#

what you wrote checks if it intersects with heli

little raptor
graceful kelp
little raptor
graceful kelp
#

thats beyond me

little raptor
graceful kelp
#

would lineintersect not work

brave lance
little raptor
graceful kelp
#

crap

little raptor
#

all intersect commands have a limit

#

even if the wiki doesn't say so

graceful kelp
#

right so how would i got about splitting the distance?

little raptor
#

a for loop meowsweats

graceful kelp
#
    _ins = lineIntersectsSurfaces [_heli modelToWorldWorld [0,2.1,2.2], aimPos _x, _heli, _x];
    if !(_ins isEqualTo []) then {
        _dataLinkArray = _dataLinkArray - [_x];
    };
#

so i would need to check twice somehow by splitting it

little raptor
#
_lastPos = _p1;
_dir = _p1 vectorFromTo _p2;
for "_i" from 3000 to _totalDist step 3000 do {
  _NextPos = (_dir vectorMultiply _i) vectorAdd _p1;
  //check from _lastPos to _NextPos;
  _lastPos = _NextPos;
};
//now do it from _lastPos to _p2 one last time outside the loop

splits by 3000m

graceful kelp
#

that looks like black magic give me a min to try understand

winter rose
brave lance
#

Thank you. So much!

winter rose
#

Does it work?

graceful kelp
little raptor
#

yeah

brave lance
#

My description file is description.ext

little raptor
#

p2 end

brave lance
#

But i write the disable channel thing like this;

disableChannels[] = {
    {0, true, true}, //--- Global Chat
    {1, false, true}, //--- Side Chat
    {2, true, true}, //--- Command Chat
    {3, false, false}, //--- Group Chat
    {4, false, false}, //--- Vehicle Chat
    {5, false, false}, //--- Direct Chat
    {6, true, true} //--- System Chat
};
#

Its not working i can still use side chat.

winter rose
graceful kelp
#

what is _i then

brave lance
#

Mission file >> description.ext

little raptor
winter rose
brave lance
#

Yes its mission.sqm

#

Oh sorry my bad 😂

little raptor
brave lance
#

Its binarized btw.

winter rose
#

1, false, true
means
side channel / disable text / allow voice

#

@brave lance ^

#

if you want to entirely disable it set it to false, false

brave lance
#

Hmm okay thank you. So that code is working right?

#

Okay thank you so much.

graceful kelp
#

black magic of another level im barely understanding
so would this work

_lastPos = _heli modelToWorldWorld [0,2.1,2.2];
_dir = _heli modelToWorldWorld [0,2.1,2.2] vectorFromTo aimPos _x;
for "_i" from 4000 to 8000 step 4000 do {
    _lastPos = (_dir vectorMultiply _i) vectorAdd _heli modelToWorldWorld [0,2.1,2.2];
};
_ins = lineIntersectsSurfaces [_heli modelToWorldWorld [0,2.1,2.2], _lastPos, _heli, _x];
_ins1 = lineIntersectsSurfaces [_lastPos, aimPos _x, _heli, _x];
if !(_ins isEqualTo [] || _ins1 isEqualTo [] ) then {
       _dataLinkArray = _dataLinkArray - [_x];
};
winter rose
brave lance
#

let me check 1 sec.

little raptor
#

see the code again

#

I added some stuff

graceful kelp
#

8000 is the distnace i need

#

for "_i" from 4000 to 8000 step 4000 do {
_lastPos = (_dir vectorMultiply _i) vectorAdd _heli modelToWorldWorld [0,2.1,2.2];
};
is this a loop?

little raptor
#

it should be what it IS

graceful kelp
#

right

little raptor
#

distance from heli to aimPos _x

brave lance
winter rose
#

so there may be an issue with the description.ext. Is it the only thing that is in the file?

graceful kelp
#
_lastPos = _heli modelToWorldWorld [0,2.1,2.2];
_dir = _heli modelToWorldWorld [0,2.1,2.2] vectorFromTo aimPos _x;
_totalDist = _heli distance _x;
for "_i" from 3000 to _totalDist step 3000 do {
    _lastPos = (_dir vectorMultiply _i) vectorAdd _heli modelToWorldWorld [0,2.1,2.2];
};
_ins = lineIntersectsSurfaces [_heli modelToWorldWorld [0,2.1,2.2], aimPos _x, _heli, _x];
if !(_ins isEqualTo []) then {
    _dataLinkArray = _dataLinkArray - [_x];
};

how do i put that in a loop?

little raptor
#

you copy paste it meowsweats

brave lance
#
author="Yanoee";
onLoadName = "Hybrid Combat Royale";
OnLoadMission = "<t color='#4af0a8'>Hybird Combat Royale | Yeni bir deneyim için.<br /><t color='#7289da'>Discord: xxxxx<br /><t color='#CAE4F1'>Web: xxxxx<br /><t color='#FF0000'>V:3.6.0";
overviewPicture = "Core\Resources\Images\logo.paa";
respawn = 3;
respawnOnStart = 1;
respawnDelay = 6; 
disableChannels[] = {
    {0, true, true}, //--- Global Chat
    {1, false, true}, //--- Side Chat
    {2, true, true}, //--- Command Chat
    {3, false, false}, //--- Group Chat
    {4, false, false}, //--- Vehicle Chat
    {5, false, false}, //--- Direct Chat
    {6, true, true} //--- System Chat
};
showHUD[] = {
    1,    // Scripted HUD (same as showHUD command)
    1,    // Vehicle and unit info
    1,    // Vehicle radar [HIDDEN]
    1,    // Vehicle compass [HIDDEN]
    1,    // Tank direction indicator
    1,    // Commanding menu
    1,    // Group info bar
    1,    // HUD weapon cursors
    1,    // Vehicle display panels
    0,    // "x killed by y" systemChat messages
    1    // force show drawIcon3D icons
};

corpseManagerMode = 2;
corpseLimit = 10;
corpseRemovalMinTime = 200;
corpseRemovalMaxTime = 300;
wreckManagerMode = 2;
wreckLimit = 5;
wreckRemovalMinTime = 200;
wreckRemovalMaxTime = 300;
class Params
{
    class MapPick
    {
        title = "Choose Area";
        values[] = {0,1};
        texts[] = {"Larche","Fields"};
        default = 0;
        isGlobal = 1;
    };    
};
#include "Core\Scripts\Market\Gunstore\DEF_Gunstore.hpp" //Gunstore
#include "Core\Scripts\Market\Gunstore\UI_Gunstore.hpp" //Gunstore
class RscTitles
{
    #include "Core\Scripts\Client\Player\StatusBar\statusbar.hpp"        
};
graceful kelp
#

im to far beyond my understanding to finish this but this is a help so far thanks

winter rose
little raptor
# graceful kelp ```sqf _lastPos = _heli modelToWorldWorld [0,2.1,2.2]; _dir = _heli modelToWorld...
_p1 = _heli modelToWorldWorld [0,2.1,2.2];
_lastPos = _p1;
_p2 = aimPos _x;
_dir = _lastPos vectorFromTo _p2;
_totalDist = _lastPos distance _p2;
_clear = true;
for "_i" from 3000 to _totalDist step 3000 do {
  _NextPos = (_dir vectorMultiply _i) vectorAdd _p1;
  //check from _lastPos to _NextPos;
  _ins = lineIntersectsSurfaces [_lastPos, _nextPos, _heli, _x];
  if !(_ins isEqualTo []) then {
    _clear = false;
    _dataLinkArray = _dataLinkArray - [_x]; break;
  };
  _lastPos = _NextPos;
};
//now do it from _lastPos to _p2 one last time outside the loop
if (_clear) then {
  _ins = lineIntersectsSurfaces [_lastPos , _p2, _heli, _x];
  if !(_ins isEqualTo []) then {
      _dataLinkArray = _dataLinkArray - [_x];
  };
}

brave lance
graceful kelp
#

is _p1 & break intentional

#

il give that a go thanks

winter rose
graceful kelp
little raptor
#

maybe (if the distance is round)
you can check that too

graceful kelp
#

its checking all the way _totalDist
so the last pos would overlap i think

graceful kelp
#

ah so it checks in 3000?

little raptor
#

yes

graceful kelp
#

right so it would have to be 3,6,9

little raptor
#

ye

graceful kelp
#

got you

#

im in a situation where there is definetly intersection but
if !(_ins isEqualTo []) then {
apparantly isint right

winter rose
#

it is

#

even though isNotEqualTo exists now ^^

graceful kelp
#

il give that a go

#

so isNotEqualTo is a thing?

#

the wiki stopped working for me noooooooooo

winter rose
graceful kelp
#

great thanks

#

if (_ins isEqualnotTo []) then {
the statement to remove stuff just isint working

winter rose
misty salmon
#

How do pass in parameters to this? In Zeus with Zeus Enhanced, one option is "Execute Code". Mousing over the box where you can enter code shows this:

This code will be passed the following arguments:
0: Module Position ASL
1: Attached Object (objNull if none)

I'm guessing that the attached object that I'm passing in is the vehicle that I'm clicking on before the execute code dialog box pops up. I tried this land "LAND" to land the heli but it won't work. I'm unsure of how to pass in the second argument instead of this.

little raptor
fair drum
#

so those are arguments, you have to assign parameters to those arguments.

buoyant hare
#

The wiki is currently down (at least for me). Anyone knows the arguments for getClientState?

misty salmon
little raptor
#

how you want to use them is up to you

#

e.g.:

_obj land "LAND"
crystal flame
#

Is there a way to limit a player driven vehicles speed that isn't just applying a force every tick? limitSpeed and forceSpeed don't seem to have an affect.

misty salmon
little raptor
#
[1,2] params ["_num1", "_num2"]; //_num1 is 1, _num2 is 2
misty salmon
crystal flame
#

Darn

little raptor
#

limitSpeed and forceSpeed
AI limits

crystal flame
#

Yeah that’s what I figured

#

All I'm trying to do is put a speed restricted area inside a base, so I'm thinking a single loop that iterates over each vehicle in the area and caps it's velocity shouldn't be too bad

#

only one way to find out I guess

little raptor
crystal flame
outer fjord
copper raven
#

uhm, what?

#

look at the example

outer fjord
#

Is there a temp file that gets made some were I pull from? I actually have no idea were the config.bin gets made when you run the game after it compiles Mods, CDLC, ect

#

Utils 2 just shows bin\config.bin/

cosmic lichen
#

It wants a config

copper raven
#

every addon has config.bin, they all get loaded into the game

cosmic lichen
#

not a file

copper raven
#

you just need to pass a config to the command

outer fjord
#

oooo

copper raven
#

diag_exportConfig ["C:/mycfgvehicles.txt", configFile >> "cfgVehicles"]

outer fjord
#

my bad, I misread the path part >.>

#

had them in reverse

clear ravine
#

Hey guys can anyone help me with the new SOGPF module for cinematic? I have the camera shots working fine however there are more than one and they seem to play in a different order every time i start the mission. I would like them to play in a specific order every time. Can anyone help? thanks

wanton forge
#

Hey does anyone know how to get an AI to shoot an RPG at a helicopter with 100% accuracy, but no damage when the helicopter passes through a trigger?

#

lmfao I still can't figure this shit out @fair drum

fair drum
#

still didn't get the guided projectile to work?

wanton forge
#

yea unfortunately no

fair drum
#

post what you got

tardy oriole
#

How would I get the gas masks to work with the current chemical weapons?

wanton forge
#

kk give me a sec. I will write it out

#

Guided missile Sqf:
`_target = _this select 0;
_startPos = _this select 1;
_missileType = _this select 2;
_missileHeight = _this select 3;

_perSecondsChecks = 100;

_missileSpeed = 6174;
_pos = [0,0,0];

if (isNull _target) exitWith {hintSilent "No Target Found!"};

_pos = [_startPos select 0, _startPos select 1, _missileHeight];

_missile = _missileType createVehicle _pos;

while {alive _missile} do {
if (_missile distance _target > (_missileSpeed / 10)) then {
_dirHor = [_missile, _target] call BIS_fnc_DirTo;
_missile setDir _dirHor;

_dirVer = asin ((((getPosASL _missile) select 2) - ((getPosASL _target) select 2)) / (_target distance _missile));
_dirVer = (_dirVer * -1);
[_missile, _dirVer, 0] call BIS_fnc_setPitchBank;

_flyingTime = (_target distance _missile) / _missileSpeed;
_velocityX = (((getPosASL _target) select 0) - ((getPosASL _missile) select 0)) / _flyingTime;
_velocityY = (((getPosASL _target) select 1) - ((getPosASL _missile) select 1)) / _flyingTime;
_velocityZ = (((getPosASL _target) select 2) - ((getPosASL _missile) select 2)) / _flyingTime;
_missile setVelocity [_velocityX, _velocityY, _velocityZ];

sleep (1/ _perSecondsChecks);
};
};`

Script used in trigger: nul=[target, startLocation, missileType, missileLaunchingHeight] execVM "guidedmissile.sqf"

Script used in object that you want to fire: nul=[laserTarget player, getPos startLocation, "M_Scalpel_AT", 500] execVM "guidedmissile.sqf"

fair drum
#

you took that from somewhere else didn't you

wanton forge
#

yea

#

I am learning from it though

tardy oriole
#

Thanks chief

fair drum
#

give me the starting position you want

fair drum
wanton forge
#

10005.3,16813,1

#

I am also using Fockers Arma3 Scripting Guide and it is helping me understand more

fair drum
#

why are you insisting on spawning these projectiles righ tnext to the ground...

#

they are just gonna hit something

tardy oriole
#

I found the script after looking

wanton forge
#

okay

fair drum
#

and just use the built in function

#

give me, the target name

wanton forge
#

h1 is the target

fair drum
#

works fine for me

#

make sure you use it in a scheduled environment

wanton forge
#

Sweet I will try this. And does this sit in a trigger?

fair drum
#

you can do anything you want with it

wanton forge
#

For some reason it doesn't work...

fair drum
#

dude i literally just sat in the virtual editor, changed h1 to player and shot myself

#

took about 10 seconds for the missile to get to me

wanton forge
#

okay let me do some more testing lmao

#

thanks tho, brother!

#

Oh maybe because the target is not a player but a helicopter

#

That could be it

fair drum
#

nope

#

target can be any object

#

are you spawning it?

wanton forge
#

No I am not spawning it.

fair drum
#

notice is says spawn, not call

wanton forge
#

oh nvm! I switched the two false lines to true

fair drum
#

cool you just made your heli die no matter what and you also just made it spawn a projectile for every client that joined the game

wanton forge
#

oh wait wtf!

#

lmao

fair drum
#

stop messing with the arguments of things thinking they will change something. i just showed you that it works.

wanton forge
#

okay okay.

#

Thanks bro

fair drum
wanton forge
#

oh lol okay

#

how long does it take to hit?

#

because it is not hitting

#

My Trigger:

Everything Below [ASLToATL [10005.3,16813,1000], "M_Air_AA", h1, 1020, false, [0,0,0], 30, "", false] spawn BIS_fnc_EXP_camp_guidedProjectile; Works...

[ASLToATL [10005.3,16813,1000], "M_Air_AA", h1, 1020, false, [0,0,0], 30, "", false] spawn BIS_fnc_EXP_camp_guidedProjectile; h1 setHitPointDamage["HitVRotor", 50]; h1 setHitPointDamage["HitEngine", 50]; h1 setHitPointDamage["HitHull", 50]; h1 setHitPointDamage["Glass1", 50]; h1 setHitPointDamage["Glass2", 50]; h1 setHitPointDamage["Glass3", 50]; h1 setHitPointDamage["Glass4", 50]; h1 setHitPointDamage["Glass5", 50]; h1 allowDamage false; _source01 = "#particlesource" createVehicle getPosWorld h1; _source01 setParticleClass "UAVWreckSmoke"; _source01 attachto [h1,[0,1,-1]]; [] spawn { sleep 30; [h1, hccs1, hccs2, hccs3, hccs4, hccs5, hccs6, hccs7, hccs8] apply { deleteVehicle _x; }; };

#

Oh nvm @fair drum

#

Thanks for the help!

cosmic lichen
#

!code

wicked roostBOT
#
How to use SQF syntax highlighting in Discord

```sqf
// your code here
hint "good!";
```

// your code here
hint "good!";
cosmic lichen
#

@wanton forge

still forum
queen cargo
# brave lance Okay maybe i want, spoonfeeding. I think this is the right place to ask. + SQF ...

There is sqf-vm allowing you to code with sqf outside of the armaverse theoretically (practically, nobody does (yet))

It also features a full debug interface, available through code or cli (also being used by arma.studio, so here you get the debug features from sqf-vm too)

Sqf is of the c style Syntax family more or less, yes

Programming of any kind is never good for "visual learners"

Btw, did I already mention the plethora of language servers for visual code, aiding in development?

spark turret
#

sqf is easy, but its inconsistent and arma is buggy and you have to dig deep until you get a proper debugger.

wraith cloud
spark turret
#

arma is a very open and friendly community. i have never had a community that was more willing to help with problems.

cosmic lichen
#

I think SQF is the easiest language I know, so I'd disagree on that
True, only thing which makes it sometimes a bit hard to understand are little inconsistencies.

cyan dust
#

Good day. Is there a way to check if GPS is active or not? I'm trying this, but it's returning true even if GPS is turned off

        private _gpsdisplay = uiNamespace getVariable "RscCustomInfoMiniMap";
        if (!isNil "_gpsdisplay") then
        {
            private _gpscontrol = _gpsdisplay displayCtrl 101;
            if (!isNull _gpscontrol) then
            {
                _gpsActive = ctrlShown _gpscontrol;
            };
        };
#

Also tried ctrlVisible and ctrlFade > 0 both giving false negative result (false even when GPS is on)

warm hedge
#

Does parseText have 8192 bytes limit?

wraith lake
willow hound
#

What have you got so far?

wraith lake
#

in what way? (im very new to scripting)

winter rose
#

what did you try / what is the error you meet?

willow hound
#

What are you trying to use setSlingLoad for and how have you tried getting that to work so far?

wraith lake
#

uh im not meeting any error, im trying to make mraps slingloadable by putting it in the init box

willow hound
#

Ah, but setSlingLoad is meant to actually attach some cargo to some helicopter.

#

There is enableRopeAttach which can be used to disable (and re-enable) sling loading for sling-loadable cargo.

#

But I don't know how much these commands can be used to override limitations such as the Ghost Hawk not being able to carry a Slammer MBT.

wraith lake
#

yeah no for heavy lifting id use the CH-47, then to make it work should i use the example provided?

winter rose
#

it should work out of the box. what is the precise case you are trying?

#

e.g if you are trying to lift a tank with the MH6 (or a house), it won't work

wraith lake
#

im trying to lift the m1220 with a ch-47

winter rose
#

M1220… is not a vanilla asset
nor is the CH47

I assume it's too heavy for this helicopter
you can change its weight with setMass

wraith lake
#

those are mod assets yes i could try changing the mass of said vehicle

#

either im being very incompetant or it doesnt seem to work

winter rose
#

what did you try?

#

@wraith lake

wraith lake
#

i tried lowering the mass of the vehicle it had no effect on it being able to slingload

winter rose
#

how did you do it?

#

(also, maybe its config does not allow it, and therefore you cannot fix it by scripting)

hallow depot
#

Hi everyone! I have one issue, I want to load one box on one truck, I want to drive it into a trigger that activates a hint, the box has the variable name cargo. My issue is that it wont work.
Trigger
Activation: Blufor
Condition: this && cargo in thisList
On Activation: hint "The cargo has arrived";

Any suggestions?

cosmic lichen
#

thisList will only list Blufor objects since thisList only contains objects that satisfy the trigger's condition

hallow depot
#

How can I solve it?

cosmic lichen
#

Change the trigger to "empty"

hallow depot
#

like Activation: None?

fair drum
hallow depot
#

Thank you

hallow depot
# fair drum yup

It wont work

Activation: None
Condition: cargo in thisList
On Activation: hint "The cargo has arrived";

hallow depot
pulsar bluff
#

hey fellas, to host a dedi with prairie fire, do i need to have -mod=??? filled

#

think i got it thx

#

"-mod=vn"

fluid wolf
#

does BIS_fnc_EXP_camp_SITREP have the ability to adjust its location on the screen? For instance is there a way I can spawn it in the center of the GUI?

copper raven
#

it probably uses one of the layout coordinates

#

you can either "hack" and change them, then restore, or edit the function

fluid wolf
#

Ah ok

#

I'll probably try the latter then

long cosmos
#

Hey guys, I just want to know if there is a comprehensive list of basic scripts to download for mission making. If yes, How and where to download? Thanks.

winter rose
long cosmos
#

Thanks sir

#

I dont know anything about programming so i thought it would be better if i just use scripts which is meant to perform a certain task.

little raptor
hushed tendon
#

Will the init.sqf run once when the player first joins the hosted session or will it run again if they rejoin?

winter rose
hushed tendon
#

Ok

placid trellis
#

How do you remove any type of NVG from a unit? I've tried this unassignItem "NVGoggles"; this removeItem "NVGoggles";, but it only works with that classname.

placid trellis
wanton forge
#

Thanks bro @cosmic lichen

winter rose
#

No can do.

#

Just chain the if-exitWith @sacred tree

ripe ledge
#

guys is there any easy way to make mission for example i want on my mission to put 1 red cyrcle marker but when all enemy die inside on my marker radius the marker delete is any way to do that so my frients on my mission know when the mission is clear

#

with trigger ? and what setup i need to do on my triger or i need script for that?

buoyant hare
# ripe ledge guys is there any easy way to make mission for example i want on my mission to p...

Mission making is easy with the 3DEN editor alone. There are a lot of good tutorials in the BiKi, so you could start there:
https://community.bistudio.com/wiki/Category:Eden_Editor

Anyway, if I understood you correctly, do the following:

  • Place a marker of your desired shape/color/size in the zone where the enemies are, and name it myRedMarker or to whatever name you want in the marker’s Variable name field.
  • Then place a trigger, preferably the same shape/size as the marker above, in the zone where the enemies are.
  • In the trigger’s Activation drop-down menu, choose the side the enemies belong to.
  • In the trigger’s Activation Type drop-down menu, change it to Not Present.
  • In the trigger's On Activation text field put the following code: deleteMarker "myRedMarker"; (or to whatever you chose to name your marker)
  • Make also sure to check the Server only, just to make sure the marker gets deleted for everyone if it’s a multiplayer mission.

The result? Once all enemies that are not present in the trigger/marker area (either dead/killed or moving away), the marker will then get deleted.

sacred slate
#

is there a way to add spyder addons via script and without sync?

dim terrace
#

did something changed with ifdef & functions? I cannot recompile function if it contains ifdef - it just fails silently and produces empty code { }

little raptor
little raptor
dim terrace
#

it seems both fails for me?

#

but let me check if its only recompile

little raptor
#

@still forum ☝️ you might want to take a look at this too?

dim terrace
#

ok, I'm dumb. One of the ifdefs had double hash in front of it. I hate when stuff fails silenty

gusty lantern
#

Hey guys, i'm trying to find any function to check if unit has chemical detector, any help? Thanks!

cosmic lichen
#

<detector> in items player. Just need the class name

little raptor
cosmic lichen
#

"ChemicalDetector_01_watch_F"

#

that's the class name

gusty lantern
#

Thanks!

cosmic lichen
#

You can also do

"ChemicalDetector_01_watch_F" in assignedItems player
#

to check if it's properly slottet

#

Here is more info

daring parrot
#

Hey, I would like to get some help with this script

#

if (groupId (group player) == "B 1") then {playmusic "EventTrack02_F_Orange";};

#

I would like to playMusic for the members of "B 1" group.

#

I currently know my groupID is "B 1", which has to able to hear music.

#

using debug console, and looks like it doesn't work out.

#

any help please?

winter rose
#

@daring parrotwhy have it locally and not trigger it from the server? (are you using triggers maybe?)

daring parrot
#

yes it is

winter rose
#

you should better name the group with a variable (e.g bravo1group, etc) and do sqf if (group player == bravo1group) then { /* ... */ };

daring parrot
#

Oh, I will try that one thank you.

dreamy kestrel
#

Is there a way to tell if an object is a vehicle? i.e. I can tell whether an object is itself, i.e. not "in" a vehicle, but that's not quite the same thing. like perhaps whether the object supports driver+commander+gunner+cargo assignments?

tough abyss
#

how do i find the user actions inside a config, won't let me search

winter rose
dreamy kestrel
#

fullCrew got it, thanks

tough abyss
#

Right so, I'm trying to find where the specific UserAction for opening some gate. Currently looking for it inside the config, however I can not find it. I have the config open for the object but useractions isn't listed anywhere.

winter rose
tough abyss
#

ok thanks

dreamy kestrel
#

hmm probably better to verify _x isKindOf "Man" or even _x isKindOf "CAManBase", i.e. when vehicle has no crew, both return [], which is a false positive.

winter rose
#

you can ask fullCrew to return empty seats

#

rrrrrread the doc 😛

dreamy kestrel
#

ah right okay thanks

#

it's interesting isPlayer vehicle player is also true