#arma3_scripting

1 messages · Page 586 of 1

winter rose
#

hm-hm

tough abyss
#

Alright. Appreciate it.

#

By the way, in general, is this a good way to do that?

#

for example, let's say, KOTH server. so I need some kind of a server loop not exposed to the user to determine who is in the zone

#

so would it be that initLocalPlayer.sqf calls [server_fn].add_player(this) ?

winter rose
#

what do you mean "not exposed to the user" ? 🙄

tough abyss
#

the user won't see any of the server side code in the PBO downloaded locally

winter rose
#

so your mission becomes completely dependent of this server-side addon, ok

tough abyss
#

i.e., yes

winter rose
#

so would it be that initLocalPlayer.sqf calls [server_fn].add_player(this) ?
@tough abyss no
since the clients would not know of server-side declared functions
you can do a client-side function that sends the required data yes

tough abyss
#

ok

winter rose
sage flume
#

Trigger to hide object module to object, another show module to object. I enter the trigger, the object appears, cool. Now if I back away from trigger I want object to disappear again. Do I need to say something in "on deactivation?

#

or...

#

do I need two triggers?

winter rose
#

tried on deactivation?

sage flume
#

Trigger is guarded by blufor

#

well actually Blufor presesnt

#

I'd like to just walk in and out of said trigger and make an object appear/disappear

#

appear os ok but disappear not so much

#

I

#

ve been looking for 2 hours. 😟

#

what could I say in deactivatioin?

winter rose
#

obj hideObject false ?

#

scripting all the way

#

(this is the channel for it after all)

sage flume
#

💯

#

so just copy obj hideObject false into deactivation?

winter rose
#

is it MP?

sage flume
#

atm SP

winter rose
#

will it be MP?

sage flume
#

I will be porting to coop in the future

winter rose
#

well anyway, use hideObjectGlobal and make the trigger to be server-side

manic sigil
#

I've been looking about and can't figure it; is it possible to update and add information to a diary record, rather than creating a new one every time?

winter rose
#

no way that I know of, except deleting/re-adding it

manic sigil
#

Wait, they can be deleted?

#

The only thing I saw on that was an ancient post saying it wasn't possible 😮

winter rose
#

maybe I am wrong on that one too 😄

manic sigil
#

Yeah, the wikipage for deleteDiaryRecord isn't very helpful :p

#

I'd post the link, but the joke is that it's got no information whatsoever, is a Contact exclusive (?) function, and no description.

winter rose
#

https://community.bistudio.com/wiki/BIN_fnc_deleteDiaryRecord

manic sigil
#

That one right there, officer.

winter rose
#

yeah I believe Contact uses another system, so it is indeed Contact exclusive

manic sigil
#

Huh... you'd think this would be included in the 'see also' for createDiaryRecord.

winter rose
#

shhh, don't criticise the wiki

plain linden
#

hey so I'm going to re-attack

I have set the variable "squad1" in the eden editor to the team lead for a unit

_marker1 = ["enemyPos1", position squad1]; _marker1 setMarkerType "mil_objective"; _marker1 setMarkerColor "ColorRed"; _marker1 setMarkerText "Large OPFOR unit";

when it runs it says something like "setMarkerType got an array, expected string"

so i did this

_marker1 = ["enemyPos1", position squad1]; "_marker1" setMarkerType "mil_objective"; "_marker1" setMarkerColor "ColorRed"; "_marker1" setMarkerText "Large OPFOR unit";

got no error or results

not sure what to do

#

i even switch the "_marker1" with "enemyPos1"

winter rose
#

"_marker1" is not your marker's name

plain linden
#

so in theory, the "enemyPos1" should of worked

#

_marker1 = ["enemyPos1", position squad1]; "enemyPos1" setMarkerType "mil_objective"; "enemyPos1" setMarkerColor "ColorRed"; "enemyPos1" setMarkerText "Large OPFOR unit";

winter rose
#

should have please @_@

#
_marker1 = ["enemyPos1", position squad1]; // does NOT create a marker.
plain linden
#

so i tried this, and it yielded no results or error

#

ah

#

well

#

oh boy, here i go reading again

#

mother

#

f'er

#

i see it

winter rose
#

spanky for no read-y the wiki

#

…now

manic sigil
#

t_t

plain linden
#

_marker1 = createMarker ["enemyPos1", position squad1]; "enemyPos1" setMarkerType "mil_objective"; "enemyPos1" setMarkerColor "ColorRed"; "enemyPos1" setMarkerText "Large OPFOR unit";

winter rose
#

```sqf so it's fancier

plain linden
#

sqf _marker1 = createMarker ["enemyPos1", position squad1]; "enemyPos1" setMarkerType "mil_objective"; "enemyPos1" setMarkerColor "ColorRed"; "enemyPos1" setMarkerText "Large OPFOR unit"

#

hold on lemme re-read the pin

winter rose
#

line-return after sqf and you're good - it should even colour while typing

plain linden
#
_marker1 = createMarker ["enemyPos1", position squad1]; "enemyPos1" setMarkerType "mil_objective"; "enemyPos1" setMarkerColor "ColorRed"; "enemyPos1" setMarkerText "Large OPFOR unit";
#

this worked btw

winter rose
#

noice

sage flume
#

Got it Lou !

#

two triggers

winter rose
#

?

sage flume
#

1 trigger = present

#

2 trigger not present

#

object appears when I enter trigger and disappears when I leave

winter rose
#

huh… why not one trigger?

sage flume
#

I doneknowwhat to type

#

I'm a noooooob

#

old noooob

winter rose
#

onAct: do the stuff
onDeact: undo the stuff

#

ta-daaa

sage flume
#

I know but I need someting I can copy/paste 😳

#

I looked at the wiki but ...

#

I just can't comprehend it

winter rose
#
theStuff hideObjectGlobal true;
theStuff hideObjectGlobal false;
```…this?
#

true to hide, false to unhide

sage flume
#

I try

#

it

winter rose
#

check the wiki, it's good for the brain 😉

#

(j/k, it's not)

sage flume
#

WellI know your right and I havew picked up stuff but it's really hard to get up that first mountain

#

I keep trying though,...stubborn

faint kraken
#

how do i trigger my open.sqf in the onAct field of a trigger ```sqf
this addAction ["Open", {true}];

#

thats got to be close ?

winter rose
#

nope

faint kraken
#

lol come on it is

winter rose
#
execVM "open.sqf"
#

common terms: (O|o)pen

faint kraken
#

thanks ill try that

#

but the rest is good to go

#

or just this new bit you give me

lone zenith
#

Remember that execVM isn't the most efficient way to execute code, it basically reads the file everytime you call it- so don't put it in a loop

winter rose
#

if you want to run your sqf file, just what I set

also what ↑ said

faint kraken
#

the video that plays is on loop

#

but would only be triggered once

#

thanks

#

no it dont work still

#

execVM "DataTerminal\open.sqf";

#

i tried this in the end and that didnt work either

winter rose
#

¯_(ツ)_/¯

lone zenith
#

Where's the file DataTerminal located?

#

Mission file directory?

faint kraken
#

in the mission folder

#

in a folder call DataTerminal

lone zenith
#

so is it something like mymission.altis? that kind of mission folder?

#

or the "missions" folder

faint kraken
#

yea

lone zenith
#

uhh yea to which one

faint kraken
#

top one

#

sorry

lone zenith
#

oh right

faint kraken
#

mpmissions/ ee.altis/ dataterminal/open.sqf

lone zenith
#

do you have the debug console?

faint kraken
#

no

lone zenith
#

Try execute the line execVM "DataTerminal\open.sqf";

faint kraken
#

i know the trigger will work

lone zenith
#

oh

faint kraken
#

i did thats what i came back with and it dont work either

#

string ecpected nothing or something

lone zenith
#

are you sure you don't have the debug console?

faint kraken
#

the bit where the animation list is

lone zenith
#

Right do you see the textbox that says "execute" - copy the line execVM "DataTerminal\open.sqf"; and click local exec

#

well I mean copy and paste into the text field

faint kraken
#

ok ill give it a try thanks for the help

#

i used the debug and it said it couldnt find the file, so i checked and the dile name was OpenTerminal so i changed it all but its still saying string expected nothing

#

execVM "DataTerminal\OpenTerminal.sqf";

robust hollow
#

is that a script error or an editor popup error?

faint kraken
#

editor popup error

robust hollow
#

tried nul = execVM "DataTerminal\open.sqf";?

lone zenith
#

did you write the OpenTerminal.sqf yourself?

faint kraken
#

no someone did it for me on the bis forum

lone zenith
#

oh right

#

send a link maybe?

faint kraken
#
while {true} do 
{ 
_object = _this select 0;
_caller = _this select 1;
_id = _this select 2;
_object removeaction _id;
[_object,3] call BIS_fnc_dataTerminalAnimate;
sleep 2;
with uiNamespace do {
     disableserialization; //thank you so much tankbuster
    _object setObjectTexture [0,"images\ee6.ogv"]; 
    1100 cutRsc ["RscMissionScreen","PLAIN"];
    _scr = BIS_RscMissionScreen displayCtrl 1100;
    _scr ctrlSetPosition [-10,-10,0,0];
    _scr ctrlSetText "images\ee6.ogv";
 
    _scr ctrlCommit 0;
   
};


};



autoplay = 1;
loops = 1;
_closeaction = [[_object,["Close","DataTerminal\CloseTerminal.sqf"]],"addAction",true] call BIS_fnc_MP;
lone zenith
#

can you try again and tell me what variable is the error referring to when it says string expected nothing

faint kraken
#
[[this,["Open","DataTerminal\OpenTerminal.sqf"]],"addAction",true] call BIS_fnc_MP;
lone zenith
#

should have a # in front of the problem variable

faint kraken
#

thats bit gose in the terminal object

#

nul = execVM "DataTerminal\open.sqf";

#

this did pass without an error untill i pressed play

#

then theres was a script error

#

but i didnt read it

robust hollow
#

yea, the script expects it to be on an addaction

#

dont understand what it is in a loop for

faint kraken
#

it plays an ogv on loop

#

untill its closed

robust hollow
#

it also removes the action on loop

#

but it surely only needs to once

faint kraken
#

thats ok for now cause i need it auto playing more than an addaction now

#

but both would be better

#

the type script expected nothing

lone zenith
#

maybe remove the nul=

#

is there a particular reason for that?

robust hollow
#

is supposed to stop editor complaining about getting a return

faint kraken
#

the nul stops the popup erros

#

i ran it through the debug and it was saying something about these bits

#

_object = _this select 0;
_caller = _this select 1;

robust hollow
#

yea, because it is written to be run off an addaction

#

it is expecting the action parameters

faint kraken
#

right

lone zenith
#

Well as far as I can see you're not passing any variables through the execVM

#

oh wait

faint kraken
#

what about getting an npc to trigger the addaction with a waypoint ~?

lone zenith
#

_object = _this select 0;
_caller = _this select 1;
@faint kraken
right you should get errors from this if you run it through execVM but not if you run it through addAction

faint kraken
#

but how would i write that ?

lone zenith
#

wait hold on one thing after the other

#

whats your issue exactly

faint kraken
#

i have a hostage in a room with a screen infront of him and in another room ins the data terminal, and when the terminal is open the ogv plays on the screen

lone zenith
#

ok and what error are you getting when you do the run the addAction

faint kraken
#

this addAction ["Open", {true}];

#

i thought this would work but it didnt. let me open it and check the erro

robust hollow
#

this addAction ["Open", "DataTerminal\OpenTerminal.sqf"];

lone zenith
#

this addAction ["Open", "DataTerminal\OpenTerminal.sqf"];
@robust hollow was just about to say, always good to start with non-mp first

faint kraken
#

no that dont work either. it dont come up with any eorrs but the terminal isnt opening

robust hollow
#

did you add the action to the terminal?

faint kraken
#

no to the onact of the trigger

robust hollow
#

with the way that script you pasted is written right now, it assumes the object thee action is attached to is the terminal.

faint kraken
#

lol

robust hollow
#

you should give your terminal a variable and rewrite the script to use it

faint kraken
#

yes i have that bit i pasted in the terminal and any unit can open it but i need a trigger to open it

#

[[this,["Open","DataTerminal\OpenTerminal.sqf"]],"addAction",true] call BIS_fnc_MP;

#

that bit is in the terminal

#

yes

#

it opens the video plays on the terminal and the screen

#

yeah

#

both if possible

#

cause then it can be stopped when needed

#

thats ok thanks for the help

lone zenith
#

replace insertTerminalVariableNameHere with the variable name of the terminal object (idk what you named it)
@eager pier
In other words, in the editor, change the name of the terminal object to something like myTerminal and do [myTerminal]execVM "DataTerminal\OpenTerminal.sqf";

faint kraken
#

thanks ill try them ina bit. pc crashed now

#

yeah like civ1

#

[term1] execVM "DataTerminal\OpenTerminal.sqf";
script type expected nothing

#

sweet thank you everyone for all your help, it is working now 🙂

#

nul = [term1] execVM "DataTerminal\OpenTerminal.sqf";

#

i did get an error but it dont matter cause its all working now. thanks

lone zenith
#

ah nice glad to hear it

slim bloom
#

How do i turn off the abort function in the esc menu? I have the ALIVE mod installed and soon as someone presses abort rather than "Player exit" the server hangs when trying to do an ALIVE server save so my only fix i can think of is turning it off any ideas?

meager granite
#

@slim bloom idd 49, idc 104

#

findDisplay the menu, ctrlEnable false the button

vague geode
#

@Genius Play Unique have you tried the USS Nimitz mod? That is a working carrier.
@primal marten Can you send me a link to that mod? (A mod is not really a solution for my problem since I would like to put my mission on a open server one day and if I would include mods players would need to download and install those mods before playing which I think will turn a sizable away from the server BUT I may be able to look at the code and "reverse engineer" a scripted solution...)

primal marten
vague geode
#

@primal marten Thank you.

primal marten
#

put this in the init field (I can't believe I just wrote that!)```sqf
if (!isServer) then { this setVariable ["BIS_exitScript", false]; };

@winter rose Sadly tested... and did not work... 😦

winter rose
#

…try true? that would make more sense actually

primal marten
#

on it!

brave jungle
#

Is configClasses Case Sens?

#

For example would "WeSt" work

#

instead of "west"

winter rose
#

yep, would work

brave jungle
#

hmmm

#

Must be something else erroring then

winter rose
#

but sides are numbers in config 🙃

brave jungle
#

configfile >> "CfgGroups" >> _side >> "someFaction" >> "Infantry"

#

for example

winter rose
brave jungle
#

What for the path?

winter rose
#

oh, idk
check the Config Viewer maybe

brave jungle
#

Yeah just did

winter rose
#

maybe "West"

brave jungle
#

found out independent is Indep

#

so that's just completely helpful

#

smh

#

haha

winter rose
#

soooooo you're good?

brave jungle
#

Yeah 🙂

winter rose
#

okido! 👌

brave jungle
#

Got more than one error but thats where it stopped

#

Trying to make a UI filter from side, add filtered factions, then filter the factions by each squad

#

Annoying me 😄

#

Will probs be back

#

haha

winter rose
#

🙀

primal marten
#

…try true? that would make more sense actually
@winter rose Sad news dude... still dont work.. damn swivel targets

winter rose
#

welp, idk
you can check BI script and find out how it works, or contact the mod author for assistance

primal marten
#

Will do thanks Lou for trying though! Super appreciate the community help

winter rose
#

we try :p

brave jungle
#

waitUntil { if (lbtext lbCurSel 2101) != "") exitWith {}; sleep 1; }; I don't see my error here, i'm comparing two values, two strings?

primal marten
#

It will all be better in ARMA4

winter rose
#

@brave jungle waitUntil expects a boolean

#
waitUntil
{
  if (lbtext lbCurSel 2101) != "") exitWith {};
  sleep 1; // returns Nothing
};


waitUntil
{
  sleep 1;
  lbtext lbCurSel 2101) != ""; // returns Boolean
};
brave jungle
#

Oh right okay

#

having true in the exitwith would also work I guess?

#

For future ref

winter rose
#

no

#

you have to place the Boolean at the end of the statement, therefore place the sleep before

brave jungle
#

Ohhh I see

brave jungle
#

Still getting an error 😅

#

_curSelFac = lbText [2101, lbCurSel 2101]; waitUntil { sleep 1; _curSelFac != "";};

#

Generic error at the |#|!=

still forum
#

that waitUntil will never ever exit or not exit immediately

#

your variable will never change, the result of the != comparison will never change

#

The waitUntil either does nothing, or you will get stuck forever

brave jungle
#

Right

#

how2fix 😄

winter rose
#
waitUntil { sleep 1; lbText [2101, lbCurSel 2101] != ""; };
```for the logic issue
#

as for the generic error, something may be wrong with lbText idk

brave jungle
#

Yeah not getting the value now, so probs something before that contributing

finite bone
#

So, I'm trying to create a "safe zone" using triggers that forbids the player from causing nor taking any damage while in the trigger zone. The script works, however, it fails to deactivate and keeps getting stuck with the safe zone calls.

This is what I have it set so far:

Condition:

this

On Activation:

inZoneSafe = [] execVm "inSafeZone.sqf";

The inSafeZone.sqf contains:

hint "Entering Safe Zone";
player allowDamage false;
vehicle player allowDamage false;
while {true} do
{
    player action ["SwitchWeapon", vehicle player, player, 100];
    sleep 1;
};

On Deactivation:

null = [] execVm "leftSafeZone.sqf";

The leftSafeZone.sqf contains:

terminate inZoneSafe;
hint "Exiting Safe Zone";
player allowDamage true;
vehicle player allowDamage true;
player action ["SwitchWeapon", vehicle player, player, 0];
sleep 1;
winter rose
#

your while true… there is no exit condition

finite bone
#

shouldn't

terminate inZoneSafe;

stop the previous script?

winter rose
#

yup, should

finite bone
#

only in this case it does not for some reason

winter rose
#

does the trigger fire it continuously?

#

try hint format ["Entering Safe Zone @ %1", round time];

finite bone
#

So the player spawns in the safe zone at start, gets in the desired vehicle and leaves the safe zone to engage others

#

the switch weapon stops the player from using the weapon but it keeps getting stuck even after leaving the safe zone

#

Its only at 1 round time

#

the deactivation does not even get triggered and hint "Exiting Safe Zone" is not displayed.

winter rose
#

is the trigger "one-time" only?

finite bone
#

repeatable

still forum
#

if the trigger fires more than once, the script will spawn a second time and inZoneSafe will be overwritten

#

you'll have the while loop running twice, but you can only terminate one

#

add to your trigger condition && isNil "inZoneSafe"

#

and in your code after the terminate do inZoneSafe = nil;

finite bone
#

thanks, will try

#

now its entering and exiting the safe zone one after the other

#

iirc, the trigger only fires once while the player is in the zone; how does it run twice?

still forum
#

depends on how the trigger activation is set

finite bone
#

Activation: BLUFOR
Type: Present

winter rose
#

so if any blufor unit enters, player becomes invincible

finite bone
#

my idea is to make that IF and ONLY IF and WHEN the player enters the safe zone, then THAT player is invincible

#

while inside the safe zone

#

the other blufor units outside can still fire / die while not in the zone

winter rose
#

then link the trigger to this player unit, or make condition this && player in thislist

finite bone
#

but that wouldn't take into account if the player gets into a vehicle while in the safe zone?

also, using that condition, the safe zone is activated, and while entering a vehicle it gets deactivated and activated back and never to be deactivated again when leaving the zone.

winter rose
#

this && vehicle player in thislist then

finite bone
#

sorry im being too much of a pita...

winter rose
#

np
but triggers are not the best way to do this thing anyway (entering a vehicle inside the trigger fires a "vehicle entered the area" iirc)

finite bone
#

i tried

this && ((vehicle player) || player) in thisList
winter rose
#

no need for || player

#

vehicle player == player true if player on foot

finite bone
#

ah

winter rose
#

this writing would also throw an error, as you are comparing objects, with ||

finite bone
#

Progress! Thanks a lot.

#

but its not yet completely solved though kek

#

the activation scripts keeps working on loops for some reason, im going to combine what dedmen said

#

yet the deactivation script worked after leaving the area

#

nope does not work

#

got the solution

#

terminate the script twice 😄

quartz pebble
#

For which purposes stuff like nearestLocation might be used?

winter rose
#

where is the closest city, for example

#

or the closest hill, etc

warm hedge
#

It may be used to show something like “NE of Kavala” text

grim wing
#

Hello, is there a way to disable night time?

exotic flax
#

change the time to day?

grim wing
#

no like the mission is staying up for 6 hours and I want to disable night time

exotic flax
#

no, that is not possible

#

however you can use setTimeMultiplier to slow it down a lot

grim wing
#

but then when it gets to night time, night is very slow

winter rose
#

then use setDate

#

every hour, reset an hour earlier, ta-daaa

#

also you don't want to "disable night time", you want to stop daytime progress - that's different

#

@grim wing ^

grim wing
#

huh

#

can i like set it to if it detects a certain daytime then change the multiplayer and change it back to original when its day time again

winter rose
#
// server-side, e.g in initServer.sqf
[] spawn {
  private _date = date;
  while { true } do {
    sleep 1 * 60 * 60;
    setDate _date;
  };
};
#

@grim wing ^

#

every hour, reset to start date

slim verge
#

yes have a looping script that has case values and then when a certain time occurs setdate to skip the time

grim wing
#
if (daytime = 18.5) then {setTimeMultiplier 80};
if (daytime = 6) then {setTimeMultiplier 12};
#

something like that

tough abyss
#

hi all, did you know if there's any way to configure the factions that the opfor side npc's identify an OPFOR player as an enemy and attack him and obviously they also attack a NATO side player?!

Cause I want to create a PVE multiplayer mod with two factions, the blue side and the red side but I want that the NPC's look both as enemies.

winter rose
#
while { true } do {
  waitUntil { sleep 60; daytime > 6 };
  setTimeMultiplier 12;
  waitUntil { sleep 60; daytime > 18.5 };
  setTimeMultiplier 80;
};
```@grim wing
grim wing
#

oooo

#

spicy

#

thanks

fervent kettle
#

how can I change the view color of players? google didnt helped that much

winter rose
#

the view color…?

#

@fervent kettle

fervent kettle
#

In ACE f.e. if you put on glasses your view color changes to yellow-ish. I want that the color changes like that but without an item

winter rose
#

See post process effects on the wiki 😉

fervent kettle
#

aah right, thanks

crude vigil
#
while { true } do {
  waitUntil { sleep 60; daytime > 6 && daytime < 18.5};
  setTimeMultiplier 12;
  waitUntil { sleep 60; daytime > 18.5 };
  setTimeMultiplier 80;
};

@grim wing This might be better as the code Lou suggested will continuously switch multiplier from 12 to 80 once you hit daytime 18.5 (both waitUntils will return true, resulting in both setTimeMultipliers execute)

winter rose
#

@crude vigil true dat, thanks

#

in a (boring & long) work meeting at the same time… I should check twice

crude vigil
#

@winter rose Well, people should still be happy that still in such case you are trying to assist them, in addition to your continuous assistance ⭐

winter rose
#

Mraw!
I also use this channel as a way out, too 😄

fervent kettle
#

One more question, i am trying to add a range to an "addAction" but it doenst change the range

Tavares addAction ["<t color='#0ac6d2'>Jammen</t>", {
    "jam.sqf"}, [], 6, false, false, "", "", 0.1];
winter rose
#

a range, like a max distance for it to display?

fervent kettle
#

Yea, i want that only the guy who has the addAction to see it

warm hedge
#

jam.sqf does what? Anyway you need to do execVM in order to execute the script

winter rose
fervent kettle
#

it does as it`s named, it james lol

warm hedge
#

Ah

#

Forgot 'bout that because I never used it 😄

crude vigil
#

@fervent kettle {"jam.sqf"} is incorrect, you either will give ur script file as string , or code, you are kind a trying to do both which actually results in a script returning "jam.sqf" as text. (In practice no effect)

fervent kettle
#

Well, it actually just removes the ammo from a turret with some fancy effects^^

#

@fervent kettle {"jam.sqf"} is incorrect, you either will give ur script file as string , or code, you are kind a trying to do both which actually results in a script returning "jam.sqf" as text. (In practice no effect)
@crude vigil Still the problem with the range

winter rose
#

is the range the issue, or that everyone can use the action?

crude vigil
#

0.1 range is for a vehicle or something?

fervent kettle
#

Wait... totally forgot that the first addAction is in the onPlayerRespawn wich i didnt change -_-

crude vigil
#

Also.... by "" in 7th parameter, you are overriding condition of code...

#

if you have no condition, you need to make it return true. ie. "true"

fervent kettle
#

so like this?

Tavares addAction ["<t color='#0ac6d2'>Jammen</t>", 
    "jam.sqf", [], 6, false, true, "", "", 0.1];
crude vigil
#

no the one before 0.1

fervent kettle
#

so smth like [...] "", true, [params], 0,1];

crude vigil
#
Tavares addAction ["<t color='#0ac6d2'>Jammen</t>", 
"jam.sqf", [], 6, false, false, "", "true", 0.1];
winter rose
#

"true" ← default value

fervent kettle
#

oh you have to set it in ""

winter rose
crude vigil
#

@fervent kettle If you are not willing to modify parameters, better to use nil to leave them to default values to avoid issues like this.
Nevermind, it is only applicable to functions, my bad.

winter rose
#

String, Optional, default "true", so… yes, quotes ^^

fervent kettle
#

Ok, somehow it is not executing the .sqf tho

winter rose
#

@crude vigil not sure nil is accepted in commands

crude vigil
#

I remember so. Time to test! 😩

fervent kettle
#

range is working, the rest is not :/

crude vigil
#

@winter rose @fervent kettle Ignore that suggestion with nil. My bad :X

winter rose
#

I got tricked with that too after a long time using functions!
nil is so useful

crude vigil
#

Pretty much the only command I would use with since there are 11 12 parameters and the necessary ones are at the end.

fervent kettle
#

tried this one here, still not executing the .sqf

[Tavares, ["<t color='#0ac6d2'>Jammen</t>", "jam.sqf", [], 6, false, false, "", "true", 0.1]] remoteExec ["addAction", 0,true];
winter rose
#

is your "jam.sqf" at the mission root?

fervent kettle
#

Yep

winter rose
#

wait

Why a 0.1 radius? so only Tavares get the action?

fervent kettle
#

Yep

winter rose
#

then```sqf
[Tavares, ["<t color='#0ac6d2'>Jammen</t>", "jam.sqf", [], 6, false, false, "", "true", 0.1]] remoteExec ["addAction", Tavares, true];

#

you don't need to set the radius at all if the action is on the unit himself?

fervent kettle
#

I do need to, it will create an immense radius like up to 10 meters

#

still not executing the .sqf

winter rose
#

50m

crude vigil
#

What is tavares btw?

#

a unit?

fervent kettle
#

just the unit name

crude vigil
#

a soldier?

#

right?

#

if he is inside vehicle etc, u might not be able to reach to 0.1 radius of him

fervent kettle
#

range is working so far, might change that later on

crude vigil
#

oh so you see the action but the code is not doing anything

fervent kettle
#

Yea

crude vigil
#

then there is probably a mistake in your code?

#

do you have -showScriptErrors on?

fervent kettle
#

It does show me errors sometimes even tho i didnt activate that

crude vigil
#

the errors will be displayed in 3den, not when u run the mission afaik.

fervent kettle
#

sometimes it does that

#

I am just gonna send you the whole code, one sec

#

Init.sqf:

[Tavares, ["<t color='#0ac6d2'>Jammen</t>", "jam.sqf", [], 6, false, false, "", "true", 0.1]] remoteExec ["addAction", Tavares, true];

onPlayerRespawn.sqf:

[Tavares, ["<t color='#0ac6d2'>Jammen</t>", "jam.sqf", [], 6, false, false, "", "true", 0.1]] remoteExec ["addAction", Tavares, true];

jam.sqf:

// pret1 = name of the turret
// Taveres = name of the unit

removeAllActions Tavares;    // removes the "jam" option from the unit

    [] spawn{
    sleep 23.0;    // waits 23 seconds before executing the next variables
    pret1 setVehicleAmmo 0;    // sets turret ammo to empty
    addCamShake [10, 5, 25];    // adds camera shake [strenght, duration, frequency]
    playSound "sounds\emp.ogg";

    [] spawn{
    sleep 300;    // waits 300 seconds before executing the next variables
    pret1 setVehicleAmmo 1;    // sets turret ammo to full
};

    [] spawn{
    sleep 600;    // waits 600 seconds before executing the next variables
    [Tavares, ["<t color='#0ac6d2'>Jammen</t>", "jam.sqf", [], 6, false, false, "", "true", 0.1]] remoteExec ["addAction", Tavares, true];    // adds the "jam" option to the unit
};
exotic flax
#

and what is the error you get?

fervent kettle
#

No error, it is just not executing the jam.sqf

crude vigil
#

there is missing bracket there

#

1st spawn

#

has no ending }

fervent kettle
#

now it`s working, thanks ❤️

exotic flax
#

which should give you errors---

winter rose
#

code with Show Script Errors

fervent kettle
#

but kinda didnt xD

crude vigil
#

Next time open -showscripterrors :)

fervent kettle
#

yea will activate that now

still forum
#

Maybe only rpt

winter rose
#

(Launcher's option or ^ .exe argument)

exotic flax
#

error = error... no matter where you look

fervent kettle
#

why is it giving me an "couldnt find sounds\emp.ogg" error tho O.o

#

like, it IS clearly there

crude vigil
#

try a \ at the beginning of it

winter rose
#

because check wiki on playSound…

#

hint: CfgSounds

crude vigil
#

oh yeah.

#

I think what you wanted to use is playSound3D?

fervent kettle
#

I just want a sound to be played, and heard, no matter where the players are

winter rose
#

playSound is local

#

so either use playSound3D (absolutely read the wiki on this one)
or remoteExec playSound

crude vigil
#

judging from the name, it will be a position based sound, so it will be a sound played on a location, if players are nearby, they will hear it. In this case you want playSound3D

#

but if you want to play some sort of sound at the proximity of each player, then playSound...

fervent kettle
#

No, i dont want a position based one, i want so that everyone, no matter where, can hear it

winter rose
#

remoteExec playSound 😉

#

(and define your sound in Description.ext/CfgSounds)

crude vigil
fervent kettle
#

just did it like this

description.ext

class CfgSounds
{
 sounds[] = {};
 class emp
 {
  name = "emp";
  sound[] = {"\sounds\emp.ogg", 25, 1};
  titles[] = {0,""};
 }
};

jam.sqf

remoteExec playSound "sounds\emp.ogg";
crude vigil
#

you need to pass emp there only

#

not emp.ogg

#

it wants a class name, not file name

fervent kettle
#

ooh ok

crude vigil
#

class emp {...} means you need to pass emp there

fervent kettle
#

with the folder it is in?

crude vigil
#

no folder, just classname

#

file location is already defined in class emp

#

it has the data there.

winter rose
#

playSound "soundClassname"; ← ↑

fervent kettle
#

thought i should do with remoteExec remoteExec playSound "emp";

#

still says file not found

crude vigil
#

That is not how you use remoteExec.

winter rose
#

that's not how remoteExec works

fervent kettle
#

had a feeling that it was to easy

#

maybe with some fancy brackets?

crude vigil
#

You used it once correctly, try to use it again in this scenario. It takes practice :)

fervent kettle
#

like this? remoteExec [playSound "emp"];

crude vigil
fervent kettle
#

Already on that page,

crude vigil
#

playSound is a command, so it has to be alone there

#

"emp" is a parameter of this command.

fervent kettle
#

maybe this one here? playSound "emp" remoteExec ["playSound", player, true]

crude vigil
#

close enough, playSound shouldnt exist in parameters.

#

also I am not sure, you want JIP compatibility there. (the true at the end)

winter rose
#

@fervent kettle being on the page is not enough, try reading it 😋

fervent kettle
#

I`m trying my best but some things are just so confusing

crude vigil
#

it is ok, u re doing fine.

winter rose
#

if you can manage to decypher this page, you can read all of them and the wiki knowledge opens to you

crude vigil
#

why did you use playSound "emp" before remoteExec? It says params, params of playSound in your case, is param of playSound is playSound?

#

are you writing
playSound playSound "emp"
when you are using the command or?

fervent kettle
#

so my playSounds param is "emp"?

crude vigil
#

yes

fervent kettle
#

does this look about right?
[["emp"] remoteExec ["playSound", player, true]];

crude vigil
#

first of all, why the outer [ ] ?

fervent kettle
#

dunno, thought i had to bracket it like in the other line

crude vigil
#

do you see any such example in the page you are looking?

fervent kettle
#

ehm... actually.. no

#

so like that?
["emp"] remoteExec ["playSound", player, true];

#

or without the [ around "emp"

crude vigil
#

better, but you are not using playSound ["emp"] you are using playSound "emp"

#

yes.

#

without the [] around "emp" indeed in this case.

fervent kettle
#

soo playSound "emp" remoteExec ["playSound", player, true];
or "emp" remoteExec ["playSound", player, true];

crude vigil
#

You say it

fervent kettle
#

wich one, first or second?

crude vigil
#

Which one is correct? Why? tell it

fervent kettle
#

dont slaughter me
the second one? cause "emp" is my param, wich is the only thing i need in front of remoteExec

crude vigil
#

Indeed.

fervent kettle
#

welp, it`s still not finding the sound file

crude vigil
#

remove the \ at the beginning of sound[] = {"\sounds\emp.ogg", 25, 1};

#

It might work, I am always confused with these...

winter rose
#
["emp"] remoteExec ["playSound", player]; // -not- JIP
fervent kettle
#

tried, still not working

crude vigil
#

oh true, that as well

fervent kettle
#

still showing an error

#

do i need to set JIP to false?

winter rose
#

don't set JIP
you don't want JIP players connecting an hour later to hear the sound

fervent kettle
#

OK, as I said, still not finding the sound

winter rose
#

what does your CfgSounds look like?

#

(```cpp)

fervent kettle
#

Posted it already a bit more up

#

just did it like this

description.ext

class CfgSounds
{
 sounds[] = {};
 class emp
 {
  name = "emp";
  sound[] = {"\sounds\emp.ogg", 25, 1};
  titles[] = {0,""};
 }
};

jam.sqf

remoteExec playSound "sounds\emp.ogg";

@fervent kettle

winter rose
#

; after class CfgSounds

just to be sure, is your file description.ext or description.ext.txt?

fervent kettle
#

.ext

#
class CfgSounds;
{
 sounds[] = {};
 class emp
 {
  name = "emp";
  sound[] = {"\sounds\emp.ogg", 25, 1};
  titles[] = {0,""};
 }
};
#

that ; after class CfgSounds looks a bit missplaced tbh

#

tried it with that

class CfgSounds
{
 sounds[] = {};
 class emp
 {
  name = "emp";
  sound[] = {"\sounds\emp.ogg", 25, 1};
  titles[] = {0,""};
 };
};

still getting an error

winter rose
#

Which error? (sound "emp" not defined/found?)

fervent kettle
#

Sound emp not found

quartz pebble
fervent kettle
#

found the error, i had to remove the last ;

class CfgSounds
{
 sounds[] = {};
 class emp
 {
  name = "emp";
  sound[] = {"\sounds\emp.ogg", 25, 1};
  titles[] = {0,""};
 };
}
still forum
#

no, the last ; was definitely correct

fervent kettle
#

Nope, cause now it is working

still forum
#

Yes it was correct

fervent kettle
#

dont ask me why, but as soon as i removed that ; it worked

still forum
#

probably just arma not properly reloading the changes you made before that. Maybe forgot to save the file. many possible human errors

flint portal
#

Is there a difference between “{_x someaction} foreach units this;” in the groups init vs “{_x someaction} foreach units group this” in the group leader init?

still forum
#

no

vivid monolith
#

I'm trying to have it where a marine gets a radio transmission from one of his fellow marines saying "We're under attack, requesting MEDEVAC Over!!" how do i put the dialogue for that in script and animation

fervent kettle
#
  [] spawn{
_unit sideRadio "We're under attack, requesting MEDEVAC Over!!";
_unit playMove "Acts_listeningToRadio_Loop"; // playMove or switchmove not sure rn
_unit setRandomLip true; // dunno if it works when using playMove tho
sleep 5.0; // put whatever time you want in here
_unit setRandomLip false;
_unit switchmove ","; // didnt test this one yet
}

btw, is it a soundfile too or just text?

winter rose
#

sideChat? just text.

fervent kettle
#

depends on where he wants to have it. As far as i remember, in campaign you have the chats in side chat too, so i just came up with that

winter rose
#

sideRadio != sideChat

fervent kettle
#

aah ok

#

changed that^^

tough abyss
#

yo

#

what's the code for ace, to kill an ai

#

and @fervent kettle I use _unit sideChat format ["thank god you're here!"];

#

tried to do [unit, 100, "head", "bullet"] call ace_medical_fnc_addDamageToUnit

#

but it only injures them

#

unit setdamage 1; doesn't show up on the ace medical system as killed, so that doesn't work either.

winter rose
#

@tough abyss

_unit sideChat format ["thank god you're here!"]; // format is not needed if there are no arguments
_unit sideChat "thank god you're here!"; // correct, faster
tough abyss
#

ahh ok

fervent kettle
#

you just want to kill the ai right? use _unit setDamage 1; no need for all that ace stuff, or what exactly are you trying to do @tough abyss

tough abyss
#

when I do _unit setDamage 1; it doesn't actually kill the unit, it puts them on the ground with their hands out, it's because i'm using the ace medical system

#

so it doesn't register as killed, and when you go into the ace medical system on the body it sais no damage.

fervent kettle
#

new or old ace?

tough abyss
#

new

fervent kettle
#

cause for me that works fine

tough abyss
#

weird

fervent kettle
#

i am using a downgraded one tho

tough abyss
#

that's prob why

fervent kettle
#

will test it with the new one

#

@tough abyss just tested it and it`s working fine for me

tough abyss
#

figured it out, was a conflicting mod, thnx.

fervent kettle
#

ah ok

tough abyss
#

I'm trying to get a server addon only to be started (initialized). What is the proper way to do it ?
( It's not a mission )

still forum
#

what does initialized mean?

#

if you want script, a preInit CfgFunctions script is usually used as entry point

tough abyss
#

@still forum Thanks. I tried, but it doesn't execute

#
class CfgFunctions {
    class academy_koth
    {
        class main {
            file = "academy_koth";
            preInit = 1;
            class preInit {
                preInit = 1;
            };
        };
    };
};
#
// fn_preInit.sqf
diag_log "nisan server initialized";

doesn't print to RPT

still forum
tough abyss
#

I already read all that doc

#
class CfgFunctions {
    class academy_koth
    {
        file = "fn_preInit.sqf";
        preinit = 1;
    };
};

Is this better?

#

@still forum ?

cunning crown
#

That's not what the doc says...

winter rose
#

CfgFunctions >> tag >> category >> function

tough abyss
#

Alright

#

So, I reached this structure:

#

testmod/functions/server/fn_func.sqf
testmod/config.cpp

// config.cpp
class CfgFunctions
{
    class SKR
    {
        class server
        {
            class func
            {
                preInit = 1; //(formerly known as "forced") 1 to call the function upon mission start, before objects are initialized. Passed arguments are ["preInit"]
            };
        };
    };
};
winter rose
#

Congratulations

still forum
#

testmod/functions/server/fn_func.sqf

wrong.
testmod/functions/fn_func.sqf

winter rose
#

oh, "mission only"

tough abyss
#

oh!

#

checking..

#

I'm really surprised there are no warnings/errors relating to this..

#

getting started is really rough

winter rose
#

have you checked your rpt?

tough abyss
#

ofcourse

winter rose
#

funny, as in mission config there are plenty of "file not found" messages

tough abyss
#

This still doesn't work for me. I have fn_func.sqf do:

diag_log "Testing";
#

But it doesn't print to rpt

winter rose
#

-server- rpt, right?

tough abyss
#

Yes

winter rose
#

path to an addon is not included and has to be part of the file path, e.g., myAddon\myFile.sqf
try defining manually the file =

tough abyss
#

It's frustrating. I feel like it's such a simple and beginner thing, and I just can't get that to work :\

#

trying

winter rose
#

it's not a beginner thing, but once you have it right once you get it forever

tough abyss
#

I agree

#

so wait, the file should point to the fn_func.sqf?

winter rose
#

depends if you set file = to the category or the function class

#

said in the doc 🙃

tough abyss
#

ugh..nada

#

not working

#

It doesn't print to the RPT

#

hence I conclude it doesn't initialize

winter rose
#

preInit = 1 runs the function on mission start
preStart = 1 runs the function on game start

tough abyss
#

I think both should have been initialized, but I will try preStart

winter rose
#

if you didn't start a mission, no chance you had any results indeed.

tough abyss
#

nope, not working

#
 0:51:37 Dedicated host created.
 0:51:44 Game Port: 2302, Steam Query Port: 2303
 0:51:44 Mission BFArma.Altis read from directory.
 0:51:44 Host identity created.
 0:51:44 Roles assigned.
 0:51:44 Reading mission ...
 0:51:50 Mission read.
 0:51:50 Game started.
#

it's persistent

winter rose
#

?

tough abyss
#

persistent battlefield

winter rose
#

how does it matter in the issue at hand?

tough abyss
#

preInit is on mission start

#

the mission started even when I didn't enter the server because it's persistent

winter rose
#

ok, auto-started is fine (or should be fine) too

tough abyss
#

ok

#

uhm

winter rose
#

show your CfgFunctions?
```cpp

tough abyss
#

sure

#

thanks for assisting by the way

#
class CfgFunctions
{
    class SKR
    {
        class server
        {
            file="testmod\init.sqf";
            preStart = 1; //(formerly known as "forced") 1 to call the function upon mission start, before objects are initialized. Passed arguments are ["preInit"]

            class func
            {
                file="testmod\functions\fn_init.sqf";
                preStart = 1; //(formerly known as "forced") 1 to call the function upon mission start, before objects are initialized. Passed arguments are ["preInit"]
            };
        };
    };
};
#

(I also tried preInit)

#
// init.sqf
diag_log "INIT Testing";
#
// fn_func.sqf
diag_log "Testing";
winter rose
#

file = "" in the category is to define a (sub)directory, not a file

tough abyss
#

okay, so testmod alone?

winter rose
#

also, preStart/preInit/preAnything do not have any use in the category

tough abyss
#
class CfgFunctions
{
    class SKR
    {
        class server
        {
            file="testmod";

            class init
            {
                file="testmod\init.sqf";
                preInit = 1; //(formerly known as "forced") 1 to call the function upon mission start, before objects are initialized. Passed arguments are ["preInit"]
            };
        };
    };
};
#

oh, path to an addon is not included

winter rose
#

it should target the file in "testmod\init.sqf"

tough abyss
#

yea

#

just read that

#

ok, same result

#

commandline, by the way, is:

"C:\Program Files (x86)\Steam\steamapps\common\Arma 3\arma3server.exe"  -port=2302 "-config=C:\Program Files (x86)\Steam\steamapps\common\Arma 3\TADST\default\TADST_config.cfg" "-cfg=C:\Program Files (x86)\Steam\steamapps\common\Arma 3\TADST\default\TADST_basic.cfg" "-profiles=C:\Program Files (x86)\Steam\steamapps\common\Arma 3\TADST\default" -name=default -filePatching -autoInit -serverMod=testmod

( I'm using TADST )

winter rose
#

is your file in testmod\testmod\init.sqf?

tough abyss
#

no

#

%ARMA%\testmod\init.sqf

winter rose
#

then why did you add testmod\ in front of init.sqf

also, shouldn't addons be in Addons? 🤔 unsure about that and config though

tough abyss
#

because it didn't work when I tried

#

Also, because of this:

#

I tried so many different stuff, all fails to work.
I really am frustrated by this. It should be so simple..

#

@winter rose Are you willing to remote my desktop and try for yourself ?

winter rose
#

negative, that's an addon & #arma3_config issue and I am not well versed into this
would it have been for a mission it would already be working.

tough abyss
#

Yeah, Okay

distant wave
#

it's posible to load an default arma3 dialog into GUI editor to get some specific things like font used and size of the dialog? to be more specific i'm looking for EDEN editor mission selector (not map) thingy

fluid cairn
#

How do I Make a trigger activate when a specific person enters it?

gaunt ferry
#

go to trigger activation

#

wait no, go to trigger and replace the condition with a Tag you gave whoever you want

#

as in Condition; Player1

#

@fluid cairn

gaunt ferry
#

I think, if not maybe use Condition: this ; player1 ;

fluid cairn
#

@gaunt ferry Thankyou

gaunt ferry
#

@fluid cairn if it doesnt work tell me, ill tell you within the hour, and teach you how to do it as well

quartz pebble
#

[1:54 AM] Lou Montana: show your CfgFunctions?
I've been curious what's the reason of using CfgFunctions for a user mission? It is cumbersome, hard to maintain, requires exit to editor each time you wish to add/remove a function.

warm hedge
#

exit to editor each time you wish to add/remove a function.
thonk No

quartz pebble
#

No
So far I had to exit and save/load each time I wanted to get any description.ext updates

warm hedge
#

In Eden Editor just save does. If not, just preview and back to the mission does

robust lichen
#

how do you check if a unit of specific side has killed a CIV

robust lichen
#
addMissionEventHandler ["EntityKilled",
{
    params ["_killed", "_killer", "_instigator"];
    if (isNull _instigator) then {_instigator = UAVControl vehicle _killer select 0};
    if (isNull _instigator) then {_instigator = _killer};
    if ("_killed" side civ) then {
        _killerSide = side "_killer";
        if (_killerSide !side civ) then {
            _killerside addScoreSide -2;
        };
    };    
}];
#

how does this look?

warm hedge
#

Variables aren't string

#

!side
thonk

robust lichen
#

im new to this 😂

warm hedge
#

Also I don't think addScoreSide in this situation will work, it's only for the server, according to BIKI

robust lichen
#

how would i go about adding to subtractinbg the sides score?

warm hedge
#

Is this for singleplayer or multiplayer?

robust lichen
#

server

#

so mp

warm hedge
#

I'm not really sure about multiplayer-behaviour of addMissionEventHandler so...

robust lichen
#

is there a better way youd go about subtracting a sides score if they kill a civ?

warm hedge
#
addMissionEventHandler ["EntityKilled",{
    params ["_killed", "_killer", "_instigator"];
    if (isNull _instigator) then {_instigator = UAVControl vehicle _killer select 0};
    if (isNull _instigator) then {_instigator = _killer};
    if (side _killed == civilian) then {
        _killerSide = side _killer;
        if (_killerSide != civilian) then {
            _killerside addScoreSide -2;
        };
    };
}];```I don't think this is correct, but rather make sense than your original code (not tested)
quartz pebble
#

I assume if CIVs are serverl-local then entityKilled should trigger on server.

robust lichen
#

now i have a question if its civs from ambiant civ module will it trigger even if they are agents?

quartz pebble
#

What is an agent in arma? Saw them but have never used

warm hedge
#

Agents are “dumb” NPCs, which don't have AIs so computers run faster, AFAIK

robust lichen
#

as far as i can tell a dumb down version of the ai that only have three states panic, idle , or hiding

warm hedge
#

And well, I think it will

quartz pebble
#

So it can stand, walk or die and can be used as storyline NPCs?

warm hedge
#

It will do nothing unless you order them via scripts, but we can shoot them, kill them, anything other we can with regular AIs

robust lichen
#

main reason i want them over normal is s i can have quite a few and save on cpu

#

should i put this in init.sqf or?

#

i have trouble figuring out where to put stuff

quartz pebble
#

should i put this in init.sqf
generally speaking - no

robust lichen
#

and also with event handler does it run every time enitiy is killed or do i have to loop it

warm hedge
#

No need to execute more than once

robust lichen
#

okay, good to knwo

quartz pebble
#

In MP init.sqf you:

  • check if the code has ran on client or on server
  • run the appropriate initialization routines
  • into the server initialization routines you call your code
robust lichen
#

so init.sqs does it function like init.sqf except only runs mp code?

#

nvm

#

initserver.sqf

quartz pebble
#

all .sqs stuff is legacy and normally must not be used

robust lichen
#

okay i was wondering about that

warm hedge
#

Just it exists for “backward compatibility”

robust lichen
#

would it be best to use initSever over initPlayerServer becuase the event handler is only on server correct? or should i put it in an obj init

warm hedge
#

Object init is a massive no

robust lichen
#

whys that?

warm hedge
#

Maybe initServer.sqf will do, I honestly don't know what's the exact behaviour of the multiplayer tho

robust lichen
#

mhm well ill test it

warm hedge
#

Also, object init will be executed on every clients, which will cause unnecessary things

robust lichen
#

oh my

#

ye dont need that running on every client lmfao

quartz pebble
#

would it be best to use initSever over initPlayerServer becuase the event handler is only on server correct? or should i put it in an obj init
Your choice is initServer

fervent kettle
#

getting an "type string, expected number" error when using this here
player removeAction healplayer;

healplayer = [player, ["<t color='#0ac6d2'>Heilen</t>", "heal.sqf", [], 6, false, false, "", "true", 0.1]] remoteExec ["addAction", player, true];

quartz pebble
#

remoteExec won't return you the action ID, so removeAction won't be able to remove the action

fervent kettle
#

Right, what do i need to add?

warm hedge
#

Why do you need to remove the action?

quartz pebble
#

And why do you call remoteExec targeting the player machine?

robust lichen
#

how to check if the zeus side is same as a sectors

fervent kettle
#

It`s for a training map, i want that players have the option to remove or add the "heal" option

quartz pebble
#

if the code runs on a server, there is no player there; if the code runs on client, then remoteExec ... player means "client own machine" (i.e. makes no sense)

fervent kettle
#

is supposed to run on a server

#

but effecting the client? if that makes sense

quartz pebble
#

so it won't as server has no idea what player is

fervent kettle
#

but player addAction ["Heilen", "heal\heal.sqf"]; worked

#

wait a second...

quartz pebble
#

if you run remoteExec from server to clients you use some server-existing player selector
i.e. side or group or an array of units

#

but player addAction ["Heilen", "heal\heal.sqf"]; worked
The question is - how do you run your tests. If you do "Editor -> Run in Multiplayer" then you'll have surprises when you go to real MP

fervent kettle
#

It worked in Editor MP aswell as on the server

#

so if i replace "player" by "side or group" it`d work?

quartz pebble
#

so if i replace "player" by "side or group" it`d work?
By anything the server may use to get required players

fervent kettle
#

does that look about right?
blufor removeAction healplayer;

healplayer = [blufor, ["<t color='#0ac6d2'>Heilen</t>", "heal\heal.sqf", [], 6, false, false, "", "true", 0.1]] remoteExec ["addAction", blufor, true];

robust lichen
#

is addCuratorPoints the correct thing to call to give a zeus more money

quartz pebble
#

does that look about right?
no

robust lichen
#

oh i thought you were talking to me lmao

quartz pebble
#

I don't have experience with zeus, so I wasn't🙂

fervent kettle
#

Oof, can you give me a lil hint?

warm hedge
#

According to BIKI, that's a yes, me neither tho >curator

quartz pebble
#

Oof, can you give me a lil hint?

//client - moving the addAction stuff to a separate func to be able to deal with `player` variable
my_fnc_add_action = {my_action_id = player addAction ["<t color='#0ac6d2'>Heilen</t>", "heal\heal.sqf", [], 6, false, false, "", "true", 0.1]};

//server - run action add
0 remoteExecCall ["my_fnc_add_action", blufor]
robust lichen
#

is there a way to count how many sectors a side controls

quartz pebble
#

Oof, can you give me a lil hint?
to remove the action - it depends on who is a remove decision maker

if that is a server, then

//client - moving the removeAction to a separate func to be able to work with `player` variable
my_fnc_remove_action = {player removeAction my_action_id}

//server
0 remoteExecCall ["my_fnc_remove_action", <some_correct_selector>];
//i.e.
//0 remoteExecCall ["my_fnc_remove_action", blufor];
//0 remoteExecCall ["my_fnc_remove_action", player_1];// where player_1 - is some variable name
//or so on

if it is a client then

player removeAction my_action_id;
fervent kettle
#

i want players to activate the addAction

robust lichen
#
if (ownerSide == blufor) then {blu_z  addCuratorPoints 50}; 
if (ownerSide == opfor) then {opf_z  addCuratorPoints 50}; 
if (ownerSide == independent) then {ind_z  addCuratorPoints 50];
``` in theory would this work in the Expression Field of a sector?
fervent kettle
#

doesnt add the heal option tho

warm hedge
#

I think this meanssqf params ["_module","_ownerSide","_previousOwnerSide"]?

fervent kettle
#

@quartz pebble this right here seems to work.. atleast in MP Editor
removeheal = player removeAction healplayer;

healplayer = player addAction ["<t color='#0ac6d2'>Heilen</t>", "heal\heal.sqf", [], 6, false, false, "", "true", 0.1];

robust lichen
#
params ["", "_owner",""];
if (_owner == independent) then {ind_z  addCuratorPoints 50];
``` so like this?
quartz pebble
#

doesnt add the heal option tho
Have you updated the CfgRemoteExec for my_fnc_remove_action / my_fnc_add_action ?

fervent kettle
#

mhm

#

but the way i changed it seems to work, just gotta test it on the server

warm hedge
#

IDK Aurora, I just guessed as I've no experience with Zeus

robust lichen
#

is that a proper use of perams?

warm hedge
#

params

robust lichen
#

oops

#

minus that tho

warm hedge
#

And yes

robust lichen
#

learning more about scriping having a goal and reading the wiki and getting help from yal then i would of gotten any other way lmao

#

if all this functions then i think im good, i thank you both for your assistance!

glass zinc
#

is there such a thing a as a autoformatter for sqf?

#

that can take existing code blocks, and neatten them up?

quartz pebble
#

is there such a thing a as a autoformatter for sqf?
I haven't seen such

still forum
#

SQF-VM has one

quartz pebble
robust hollow
#

that looks like koth

quartz pebble
#

Probably. That was a first piece of obfuscated code I found.

robust hollow
#

it works if you remove the #include and #define lines

quartz pebble
#

But the real code is most likely to have them🙂

still forum
#

Well it can't resolve includes that it doesn't have

fervent kettle
#

whats the iskondof name for helicopters/planes?

robust hollow
#

air?

fervent kettle
#

tried but doesnt work

still forum
#

Any of these:
"Helicopter_Base_H", "Helicopter_Base_F", "Helicopter", "Air", "AllVehicles", "All"

fervent kettle
#

Ive set this as condition ({_x isKindOf "Air"} count thisList) > 0

quartz pebble
#

Well it can't resolve includes that it doesn't have
It tries to resolve includes? Quite unexpected for a linter.
(I have no objections ragarding the attempt to resolve, but failures on that confuse me)

still forum
#

actually that thing has preproc not enabled

#

and its not a linter

fervent kettle
#

buuut the condition doesnt work

quartz pebble
#

linter, formatter.. whatever

robust hollow
#

@fervent kettle can a helicopter show up in thisList?

fervent kettle
#

i dont know... but when you ask like that, probaply not

robust hollow
#

i dont use triggers, but based on my 30 second test, no.

warm blaze
#

Hello guys! Just one fast question: is it possible to remove destroyed town structures that were hidden underground (~40-100 meters) automatically by Arma logic once a building has been destroyed (setdamage 1)?

robust hollow
#

if it is a map object, no i dont think so. if it is a building you placed, yea.

warm blaze
#

means: better stay those map objects alive, if possible, or partially damaged?

robust hollow
#

if you like. is it a performance concern?

warm blaze
#

yes

robust hollow
#

it should be fine. you can hide the destroyed structures if it makes you feel better, but i doubt itll have any noticeable effect because you cant see them anyway.

fervent kettle
#

what would I use then?

@fervent kettle can a helicopter show up in thisList?
@robust hollow

warm blaze
#

what if I have one destroyed structure (setdamage 1) and I decided to "resurrect" it via setDamage 0. Will it remove an underground building as well?

finite sail
#

Online version: https://sqfvm.arma3.io/vm/
@still forum Wow. I didn't know such a thing existed. 🙂 Other than #include, no errors on the first file I gave it 🙂

still forum
#

it could also execute SQF online. But that needed to be disabled because of humans

robust hollow
#

@warm blaze you cant setdamage 0 on the ruin, but you can setdamage 0 on the underground building which will bring it back to ground level and remove the ruin object

finite sail
#

@robust hollow , you sure the ruin gets removed?

robust hollow
#

yea, just tested in editor

finite sail
#

ok, when I was fiddling with this, the ruin remained

robust hollow
#

the original building returned to ground level and the ruin obj is now null

finite sail
#

cool

warm blaze
#

yea, just tested in editor
@robust hollow great, thanks a lot! Appreciate it! 😎

finite sail
#

this was the cause of a huge FPS hit back in the old days

#

some simulation problem with the sunk object

#

I'm pleased to say a now retired community member and myself were among the first to highlight it when Joris and Jay still answered their phones

robust hollow
#

@fervent kettle this example isnt the best but it illustrates the kind of check you may need to do:

private _objects = _trigger nearObjects ["Air",selectMax(triggerArea _trigger select [0,2])];
count(_objects inAreaArray _trigger) > 0

hopefully someone reading has more experience with triggers and can give you a better solution.

slim verge
#

am looking for a vanilla scripting solution for a player based suppression system. Laxmanns addon uses a localised CBA based extended event handler attached to each created AI unit. Best solution I am currently working with is a localised fired event handler based system on the players machine. Pity there isn't a Fired At event handler but hey ho there isn't. Anyone have any better ideas than the one i listed above ?

rough dagger
#

I am using a vehicle ammo box in my mp mission "Box_NATO_AmmoVeh_F" .. it's a nice solution as you just land next to it and automatically get rearmed. Is it possible to control what ammo gets replenished? E.g. guns yes, rockets no? Cheers 🙂

slim verge
#

i would say not using the built in BI system, you would have to attach an addaction to the box that runs a script, that way you can define exactly what you want

#

or base it on a trigger that execs a script

rough dagger
#

gotcha - cheers

#

can do 🙂

slim verge
#

there is an event handler for opening or taking items from a storage container, you could also use that

#

I use that to booby trap players looting from the obvious dead sniper in the middle of a field

rough dagger
#

ahhh haha sweet!!

#

X) ruthless

slim verge
#

this addEventHandler ["ContainerOpened", {
params ["_container", "_unit"];
}];

or

this addEventHandler ["InventoryOpened", {
params ["_unit", "_container"];
}];

rough dagger
#

Thank you @slim verge that’s helpful 🙂

warm blaze
#

@robust hollow sorry for disturbing but coming back to "underground houses": if I set not setDamage 0, but f.e. setDamage 0.5 then underground house will disappear as well?

robust hollow
#

i dont know, didnt test that. i assume repairing it any amount will remove the ruin and restore the underground building.

warm blaze
#

that sounds promising cause I would like to keep them not in brand new mode

robust hollow
#

check #arma3_gui , was discussing that sort of thing earlier

red bear
#

how would i make it so if a person is alive long enough you fail

winter rose
#

sleep for x seconds, if alive → fail

red bear
#

is there something like !dead

winter rose
#

how would you check if someone is dead?

red bear
#

nvm, i confused myself

distant wave
#

it's posible to load an default arma3 dialog into GUI editor to get some specific things like font used and size of the dialog? to be more specific i'm looking for EDEN editor mission selector (not map) thingy

quartz pebble
#

get some specific things like font used and size of the dialog
For that you find the dialog in config

slim verge
#

dead = ! alive in code.... or you can attach a killed event handler to the unit and if he dies then you win, if he is still alive at mission end you lose. Can be done in a trigger, in a script

faint kraken
#
class Music1
    {
        name = "Music1";
        sound[] = {"\music\eedc.ogg", db+0, 1.0};
    titles[] = {0,""};
    };
#
tor1 say3D ["Music1", 900, 1];
        sleep 5;
        Miller_alive = true;
        }else{
#

i have these bits of code playing my audio

#

but it sounds like the audio is retriggering before the clip ends. how do i write the duration in to one of those bits of code ?

#

52000 ms

winter rose
#

the music stops at the end of the file
if it repeats, then it means that you are calling the sound twice

faint kraken
#

it sounds like its playing ti a few times

#

but not everytime i play

#

also is there a way to rotate the sound ?

winter rose
#

rotate the sound… ?

slim verge
#

randomly select you mean ?

faint kraken
#

yeah like the sound is louder in one direction and alot quieter in the opposite direction

winter rose
#

I would think "move the sound source"?

faint kraken
#

but thats a screen

#

ll try other objects for that tho thanks

#

is there a way to set auio duration tho ?

winter rose
#

There is no such thing

#

You are playing it multiple times, that's it

robust lichen
#
addMissionEventHandler ["EntityKilled",{
    params ["_killed", "_killer", "_instigator"];
    if (isNull _instigator) then {_instigator = UAVControl vehicle _killer select 0};
    if (isNull _instigator) then {_instigator = _killer};
    _killerSide = side _killer;
    if (side _killed == civilian) then {
        if (_killerSide != civilian) then {
            _killerSide addScoreSide -2;
            hint format ["A civilian was killed by", _killerSide];
        };
    };
    if (side _killed != civilian) then {
        _killerSide addScoreSide 1;
    };
}];
``` it says im mission a ;
#

but as far as i can see im not?

still forum
#

just look at the colors in your syntax highlight

#

the error is not colored because its invalid

robust lichen
#

ops miss spell

#

lmfao

#

thank you

#

wow look at that syntax actually highlighting lmao

west tree
#

I'm trying to spawn back a bunch of lost items in a cargobox using this example piece of code:

_targetContainer = cursorTarget; 
_restoreItems = ["rvg_money"] ;
 
{_targetContainer addItemCargo [_x, 1];} forEach _restoreItems

But whichever item i try to use for testing on my cargobox ends up spawning the box with 10.000 of that specific item. Can someone help me understand what im doing wrong? (im executing this through the in-game debugger clientside)

#

If i make a full array of restoreitems it seems to spawn somewhat random amounts of items, im getting the impression it may execute more times then once.

winter rose
#

the code posted here is right; something else isn't

west tree
#

Okay so something else is rummaging with the snip, good to know 🙂

winter rose
#

you may have this snippet in a loop, like a while { true }? @west tree

west tree
#

I'd literally pasted just that in my debug console window in-game, expecting it to execute just once.

#

in the long run if the syntax worked i did want to fedge that snip into a bit of script so i can easily restock certain chests for missions/events, but thats once i got the hang of understanding the commands more 🙂

winter rose
#

maybe you clicked bottom-left "benchmark"?

west tree
#

Oh i didnt know that was supposed to be a benchmark, i'd only noticed it executed. But okay i guess it makes sense if benchmark executes the snip 1000 times xD

#

now a whoooole lot of strange stuff i had makes a ton more sense xD

hollow tusk
#

ok y'all, i'm brand new here so be gentle. Signed up for discord earlier with a different problem that I then solved. Got a new one now, I'm using unitCapture to precord driving paths for my convoy to get around the ai pathfinding problems, 3 path.sqf files recorded, all identical save for unit identifiers and the path name inside each sqf is numerically distinct also. Path1, Path2, Path3. All my inits are set up, identical save for their own identifiers, each one pointed to the correct path file. The convoy drives through the trigger (3 triggers laid on top of each other) and as each vehicle passes its trigger, it's put onto its .sqf by calling the entry i made in the init and from there just follows the path. This keeps them in formation and stops them hitting each other or having accidents, as they're all just playing the same recording copy pasted starting a few seconds behind each other. One and two start just fine, three is not. Three just tries to use his pathfinding ai instead of playing the recording and ARMA's into a wall at the first opportunity

#

as i say, everything is identical save for unit identifiers, any idea what is going on? or suggestions for steps to take to troubleshoot

#

worth mentioning i did have all three moving together yesterday, but on a smaller scale

west tree
#

@hollow tusk Maybe it's worth a shot to try and let them start at a slightly larger distance of one another? in an attempt to check if AI might wanna take over if one car's too close to another? just purely guessing as i haven't messed with paths ever before.

hollow tusk
#

They're not pathing, once the recorded movement takes over they're just copying what i did one time, the issue is 3 is hitting the trigger and not starting the recorded movement, even though all the triggers .sqf files and init entries are identical save for unit info and filenames

#

I can only think for it to be the trigger or my scripting, but as there isn't much script it has been easy to check both]

west tree
#

Maybe try a log-output just to double-check all three triggers actually fire?

hollow tusk
#

can i just ask the trigger to print something when it fires?

west tree
#

I guess hint should work fine for most purposes

#

but not sure how to make sure to do that when its triggered instead of init yet, ive mostly used eden (and ingame console) myself 😦

hollow tusk
#

rec = [] spawn TruckPath3;
hint "Fired";

#

so, the triggers on activation looks like this, no message

#

for some reason my trigger is not firing

west tree
#

How did you setup trigger activation, might it be (still) triggered by another entity? i.e. the previous car?

hollow tusk
#

Blufor

#

Preset

#

this && truck_3 in thisList

#

*Present

west tree
#

Im not sure on this, but it may be triggers don't re-check/refire while another BLUFOR still is within the trigger. many games handle such things differently.
If you i.e. use the script in OnActivation you might want to assign specific owners for the vehicles

#

to make sure each truck can only fires its own trigger

hollow tusk
#

that sounds likely, i'm gonna take out the blufor and present and just leave it with truck_3 in thisList, see if that changes the behaviour

#

further testing has revealed it's definitely the trigger

#

trigger 2 fires and prints a message just fine

west tree
#

Okay so we also know for sure our debug message should function once the trigger fires 🙂

hollow tusk
#

still no joy

#

i'm gonna make a brand new trigger whose only purpose is to make a print, but is otherwise identical, see what happens

#

i'm starting to crack up. the new test trigger won't detect it either, why is truck_3 invisible to all triggers? and why did this exact code work fine yesterday and not today? BOHEMIA!

#

in all honesty though, the challenge is fun

#

just for the sake of argument i'm closing and reopening arma. by god i hope this doesn't work

hollow tusk
#

holy shitballs i got it to work. After fixing the testing trigger that i made for debug i got it to fire, so i figured hey what, maybe some triggers are just born wrong and deleted the original trigger3, gave its code to the test trigger, copied and pasted the x and y coords an tested. suddenly this trigger which worked a minute ago does not work. lucky me on returning to the editor the camera was in just the right place to see the trigger flung way off in the corner of the map.

#

today i learned that if you try to layer triggers on top of each other by copy pasting coords, arma does not like that, and will curse you by flinging your triggers off into the void

potent depot
#

Anyone know what causes those Error Zero Divisor errors relating to select? @ me please

potent depot
#

Additional question: synchronized object/waypoints/triggers can only be achieved via script of editor correct? Zeus cannot do so?

still forum
#

what causes those Error Zero Divisor errors relating
index thats not in the array

potent depot
#

Now thats the weird thing as im using _forEachIndex.

still forum
#

why do you select with _forEachIndex?

potent depot
#

Its a set of data arrays that are supposed to be kept synced. I guess they get desynced somehow, the question is why.

#

I dont believe arma supports 2D arrays afaik

still forum
#

It does.

potent depot
#

how so?

still forum
#

Don't know what you want me to tell you

#

It just works.

#

What do you want to hear

#

"how" you put an array into an array, bam 2D

potent depot
#

Actually, yeah Im aware it does in a sense but i though select doesnt work with it?

still forum
#

select works with arrays

#

a array inside an array is just an array

potent depot
#

yeh but last i tried ((array select x) select x) didnt work

winter rose
#

You may have made a mistake at the time then 😄

potent depot
#

perhaps it was a while back so may have forgotten what exactly was my problem then. I had tabled this project for a bit

#

That said, that pseudocode should work right?

#

Also any answer on the synchronization question?

slim verge
#

what tags do i need to place a code snippet in, for viewing hewre

potent depot
#

?

slim verge
#

like annihalators codse snippet aBOVE

#

EG [CODE] .... [/CODE]

potent depot
#

if it isnt over the character limit you can paste it normally and format it.

#

you can use sqf as the language

winter rose
#

see pinned messages 🙃

slim verge
#
player sidechat "TEST2.SQF Running";
_fx1= ppEffectCreate ["RadialBlur",400];
_fx1 ppEffectEnable true;
_fx1 ppEffectAdjust [20];
_fx1 ppEffectCommit 5;
player sidechat format ["FX: %1",_fx1];
player sidechat format ["ENABLED: %1",ppEffectEnabled _fx1];
sleep 10;
player sidechat format ["ENABLED: %1",ppEffectEnabled _fx1];
_fx1 ppEffectAdjust [0];
_fx1 ppEffectCommit 5;
sleep 10;
_fx1 ppEffectEnable false;
ppEffectDestroy _fx1;
player sidechat "TEST2.SQF END";

Am struggling to see why the above ppeffect isnt being enabled, the debugging sidechat lines are returning false on both occasions for the enablement. the handle is returning -1 if that makes any difference

#

am justb learning the ppeffect code, first time dabbling with it

winter rose
#

```sqf -line return-
code
```

slim verge
#

k thx

winter rose
#

noice!

#

if you did disable this effect in video settings, it won't work iirc

slim verge
#

initially i stated working in the debug console copying and pasting snippets from wherever, and was getting ppeffects so... must be enabled right /

winter rose
#

there are examples on this ↑ page btw

slim verge
#

the snippet i am using is a breakdown of the bi pages examples

#

from what i can see and have read, the code should create a blur effect what i dont understand is why the fx is returning as not enabled

winter rose
#

you cannot use sleep directly in the debug console as it is unscheduled

slim verge
#

the only returns i can use for debugging is the _fx1 value, returning as -1 and the calls for ppEffectEnabled _fx1 which return false in both cases

winter rose
#

I hope you are using a [] spawn around your code

slim verge
#

this is not in the debug and was doing in debug using spawn

#

this is execvm

winter rose
#

do you have radial blur disabled in your video options?

slim verge
#

would have to restart to see, did have a radialblur effect running when i was in debug console though

#

currently arma switched off

winter rose
#

your code seems right though

slim verge
#

its on

#

mmm maybe some code snippet from whatever source has managed to disable it then

#

how would that effect the base game though rather than just the mission

potent depot
#

if you dont have show script errors on btw you will want that on it can help if its an error issue. Arma seems to reset that parameter after updated sometimes for some reason for me at least.

slim verge
#

I have showscripterrors on ive been dabbling with ofp arma code since 2002

potent depot
#

Just saying it turns off sometimes for me

slim verge
#

ok just done a complete arma restart and still getting no fx and values still returning false

#

I use a desktop shortcut m8, so my startup is always consistent

#

ive sat here for over an hour before i pasted this, normally in just about all code I have plenty of vars i can return to debug, these ppeffects dont have much to work with

#

are post processing effects magical as in can effect outside of the arma engine... am failing to see what the hell is wrong

potent depot
#

Cant really provide much insight on that as I haven't used it however the BIKI on it does include a while loop for the creation with increasing priority

slim verge
#

I tried replacing it with DynamicBlur, same returns

#

i saw that, and understand the priority base, however other working snippets dont use the while loop or the incremental priority and they worked in the debug console

#

AHA>>>> success, seems its a priority issue, just replaced the priority value from 400 which was the default value for it to 0 and success

potent depot
#

default for it is 100 so i guess you can try that as well

#

It does state the higher the priority the later it is applied

slim verge
#

ok i could see why, after dabbling with all types of ppeffect code it may not have run initially due to a priority value.... however if there was another ppeffect running that should have been terminated when i restarted arma

#

oh well learning curve thx for the help

potent depot
#

It could just be that the higher priority put its spawn after its removal canceling it

slim verge
#

the test code is linear and there are sleep com,mands to out wait any commit times

#

so... maybe a normal bis default screen has a ppeffect on it that appears "normal" ??

#

any way thats my last 2 hairs gone off my head

#

and am getting a different return value for the handle, which is 93 ??

potent depot
#

Ikr we all know how arma can be. Now for a question on 2D arrays. Is it possible to have in or find process a 2D array by comparing only to the [x][0] index value?

slim verge
#

ah its incremental, now 94,, so this i dont understand, if i am " ppEffectDestroy _fx1; " why is the _fx1 number going up when i rerun the script in the same mission instance

potent depot
#

Im assuming it doesnt remove old values in order to maintian the handles

#

like EHs

#

they function the same way

slim verge
#

ah ok have never returned an eh handle, never needed to

potent depot
#

yeah it needs the number for deletion purposes

slim verge
#

dont know the answer to yours, have always written a function to search nested depths, if it doesnt make it easier create a version of the nested array as a simple array and search that

potent depot
#

Well im wondering if im gonna be able to do it with the vanilla commands or if im gonna need to create a function to handle it. And while I wouldnt mind having a synced array, ive been having issues with my synced arrays so im trying to change them to 2Ds

west tree
#

ive been able to edit a specific position by i.e. using _arrayVars set [3, ["some_item",1]]; so change the object on third position to another array

#

I tried looking for a way to use an array in a key-value type sense, and there ended up stuffing my array with arrays xD

potent depot
#

Im aware thats how to do so for set im talking about in and find While I can create function for it, I was hoping that the vanilla commands may support doing so. I guess its not really possible.

west tree
#

I do know theres a way to check if a certain value is part of the array, but it returns either true or false not the object itself

#

you might be able to use that for more advanced search behaviour i guess though

#

alternatively arrayInterset can be used to find an array of possible entries in an array

potent depot
#

Thats the purpose of in and its what im using it for. That said, I dont need to modify individual values in subarrays so i can use set. But I will need to find the indexes of data sets based of a key value. As such I believe the only way to do so is to make a function to do so as afaik the vanilla command equivalents do not support 2D arrays. I was just asking in case if there was a way to do so I want aware of.

still forum
#

as afaik the vanilla command equivalents do not support 2D arrays
As I said above, arrays inside arrays are just arrays

#

the commands support these too just like any other array in any other place

#

i mean you could show your code and i could tell you what you are doing wrong

#

or you can keep stating that they don't support something that they indeed do support just fine and just ignore everything I'm telling you

potent depot
#

So assuming:

grpData = [[group,owner],[group2,owner]];
if (group2 in grpData) then {}

This is pseudocode but this is the functionality im looking for. Afaik, This isnt possible in this way?

still forum
#

_grpData findIf {_x select 0 == group2} != -1

potent depot
#

Well thats exactly what I was looking for. But that begs the question, why isnt that just rolled into find like select?

still forum
#

because SQF is made to have many generic blocks

#

that you can build more complicated things with if you need to

potent depot
#

fair enough

slender geyser
#

Hello, was someone from people around using leaflet script ? I mean dropping them from plane or drone

robust lichen
#

POLPOX lol your core mod says this ```sqf
File @POLPOX's Base Functions\mod.cpp, line 2: '.logo': Missing ';' at the end of line

robust lichen
#

Not all sectors are loading in sector control?

warm hedge
hollow lantern
#

is there a negotiation for isKindOf? I basically want to check if something is not X. Current code is sqf (typeOf _x) isKindOf ["Tank_F", configFile >> "CfgVehicles"] and I want that to check if something is not Tank_F e.g.

queen cargo
#

Add a not in Front of it @hollow lantern

still forum
#

(typeOf _x) you know that isKindOf takes object?

#

and that CfgVehicles is default?

elder trench
#

hey guys can someone help me the problem is that i can't get the doctors to handcuff the civilians (is one altis life server)

still forum
#

(typeOf _x) isKindOf ["Tank_F", configFile >> "CfgVehicles"]
-> _x isKindOf "Tank_F"
-> !(_x isKindOf "Tank_F")

hollow lantern
#

yes typeOf _x is fine there. because I do a foreach loop

still forum
#

yes typeOf _x is fine there. because I do a foreach loop
no

hollow lantern
#

...

still forum
#

forEach loop doesn't matter

hollow lantern
#
 {
    if  ((typeOf _x) isKindOf ["Tank_F", configFile >> "CfgVehicles"]) then {

        _x addEventHandler ["Fired", {
            _wep = _this select 1;
            if (_wep isKindOf ["CannonCore", configFile >> "CfgWeapons"]) then {
                _veh = _this select 0;
                _vel = velocity _veh;
                _dir = _veh weaponDirection _wep;
                _veh setVelocity [
                    (_vel select 0) + (_dir select 0) * -3.5,
                    (_vel select 1) + (_dir select 1) * -3.5,
                    (_vel select 2) + (_dir select 2) * -3.5
                ];
            };
        }];
    };
} forEach vehicles;```
still forum
#

yes its fine in that it works, but its useless, superfluous, nonsense

hollow lantern
#

so just _x is fine?

#

without the typeOf

robust lichen
#

how does one increse max curator points higher then 1

still forum
#

so just _x is fine?
Thats literally what I just said. yes.

 {
    if  (_x isKindOf "Tank_F") then {
        _x addEventHandler ["Fired", {
            params ["_veh", "_wep"];
            if (_wep isKindOf ["CannonCore", configFile >> "CfgWeapons"]) then {
                private _vel = velocity _veh;
                private _dir = _veh weaponDirection _wep;
                _veh setVelocity (_vel vectorAdd (_dir vectorMultiply -3.5));
            };
        }];
    };
} forEach vehicles;
hollow lantern
#

yeah, I see, the code is from Arma 2 times, thanks for the insight

#

thanks for the rewrite

arctic bay
#

hi, im fairly new to the editor aand i want to make a stealth mission ala MGSV, is there a way to makee the ai detection decreased? this regards to gunshots with the supressor, being down low proning, etc.

quartz pebble
#

ai detection decreased
afaik - no. only the overall skill reduction might help

tough abyss
#

How do I make an enemy attack another enemy from the same side?

#

I was looking the sideEnemy comand, but, how can I use it?!

mortal crypt
#

Do you want that they attack all each other or just attack one group/unit?