#arma3_scripting

1 messages ยท Page 430 of 1

still forum
#

Needs a rename directly in the database to make it accessible again I think.
Best just contact Dwarden :D
Needs to rename that account to proper casing in the wiki DB and link it to BI account

compact galleon
#

@still forum Great... So apparently sometime in 2009, I've forgotten the password to my old account, but still known the one to my wiki account, so I must have created a new forum account. And then during the upgrade, they've been merge into one, with the password I don't know.

still forum
#

Can't you just request password reset if you still know your email?

compact galleon
#

And I assume they're registered with my very old e-mail, which I haven't had access to since probably the 90s.

still forum
#

That answers that

#

Interesting that google translates of cause correctly and doesn't show any warning about that.
Lul. linguee shows like 99% german/austrian websites as examples for uses of of cause ๐Ÿ˜„

compact galleon
#

Well, "of cause" is valid. But it means something completely different than "of course"

still forum
#

of cause translates to something like "for a good reason"
And of course translates to "for sure" or "certainly" or "naturally" or "obviously"

little eagle
#

Machine learning. ยฏ_(ใƒ„)_/ยฏ

compact galleon
#

@still forum Actually, "of cause" is closer to "for some reason"

still forum
#

Well.. Yeah.. There is some reason why scheduled scripts get worse timing ๐Ÿ˜„

#

Fixed it to of course now tho. And got a crap ton of extensions to check spelling and grammar for me.

compact galleon
#

Yeah, but "for some reason" is the same as saying "I don't know why, but it happens"

#

Which I doubt is what you want to convey

still forum
#

Man English is hard :x

little eagle
#

tf are you doing?

still forum
#

Me? Why? What? Where?

little eagle
#

Yeah, you.

still forum
#

blog post about scheduler

little eagle
#

Starting off with that?

#

Ew.

still forum
#

Was easier to explain than SQF Assembly

little eagle
#

pls

still forum
#

And didn't have ideas for what else

#

I guess a "why private keyword is better" post would be good too. But that would be so short

little eagle
#

As long as you don't do the multidimensional array copy thing.

astral tendon
#

exemple 8

_wh = "GroundWeaponHolder_Scripted" createVehicle position player;
player action ["DropWeapon", _wh, currentWeapon player];
#

exemple `3
_veh = createVehicle ["ah1w", position player, [], 0, "FLY"];

#

How do i use the alternative Syntax in the exemple 3 on the exemple 8?

still forum
#

How do I use this thing on that different thing

#

what?

#

You mean how to spawn a "GroundWeaponHolder_Scripted" with that script that spawns a "ah1w" ?

astral tendon
#

Yup.

still forum
#

Well.. Eh..
Use "GroundWeaponHolder_Scripted" instead of "ah1w"

astral tendon
#

_veh = createVehicle ["GroundWeaponHolder_Scripted", position player, [], 0, "FLY"];
Nothing happens

still forum
#

"nothing" ?

#

That's almost certainly incorrect

compact galleon
#

Well, he's right

still forum
#

Do you mean it returns nil. Or it throws an error. Or you just don't see the created object?

compact galleon
#

= results in Nothing

#

hahahaha

#

so Nothing happens

still forum
#

LOL

#

Dude

#

Too far.

compact galleon
#

xD

astral tendon
#

Well, no error, no weapon, no return, nothing.

still forum
#

No return is not possible

#

Something has to be in _veh either it's nil or something else

#

And yeah.. No weapon is normal.

#

As you don't spawn a weapon.

astral tendon
#

soo, what is the solution for the same effect i want?

still forum
#

I don't know what effect you want

astral tendon
#

I want to use the Alternative Syntax on the "GroundWeaponHolder_Scripted"

still forum
#

Yeah.. You did that

#

that will spawn a weapon holder.

#

It does exactly that. And you just did that

astral tendon
#

Yeah, i "see".

lone glade
#

holy fuck @still forum , those commit messages

#

my sides

still forum
lone glade
#

....

#

At first I was like "huh, that's actually good" then I looked down and the apocalypse struck.

#

Please, someone teach this man on how to use feature branches and squash.

still forum
#

I also do such things when fixing CI because you have to trigger a build. But I squash it down to a single commit with reasonable title when I'm done

lone glade
#

I just commit properly so even when I fuck up I can blame / history check it.

queen cargo
#

I am too Lazy to develop on my Linux and pushing stuff manually over is just too much to bother me

lone glade
#

having a "lot of commits" isn't a big deal, not being able to blame or have a proper history is.

#

O.o

#

DUDE

still forum
#

When fixing CI and you just change a comma or something there isn't really much to name properly ^^

lone glade
#

true.

#

that's why you call those "Fix" and squash them ๐Ÿ˜„

still forum
#

Didn't even think about blame yet..

#

If you later find some bug and want to find out how that happened. And that file has like 500 changes and 90% of them are just like a missing indentation or something with a commit title of "LOL"

lone glade
#

you're utterly fucked

#

Using versioning like this defeats the point of versioning.

still forum
#

I sometimes overdo it with the squashing though. If you look at Intercept ๐Ÿ˜„

lone glade
#

it's no biggie if the original feature branch is still available somewhere

queen cargo
#

It is not like I just squeeze out bs commit messages...
That literally was getting the shit working and driving me crazy
Also.. If you are the only one mainly deving then there is not much who you can blame for (and it is not like I got many intendation fixes in there....)

still forum
#

Also top thing for lazyness and "can't be bothered" is to get some git UI tool.

lone glade
#

even git for windows is better than nothing (NOT GITHUB DESKTOP)

still forum
#

I pump out a couple dozen bullshit commits. Then just Click + Shiftclick to select and then rightclick->Squash. Done.

#

Then change the title and all looks beautiful

lone glade
#

or just use CLI, literally the same workflow

still forum
#

I still remember your 200+ commit arsenal PR btw ๐Ÿ˜‰

queen cargo
#

Would not really have solved the g++ commits
Those would have required Filezilla pushing Code changes regulary to my Linux and then commiting the change and reverting on the Linux to pull again

lone glade
#

let's see how many those were, I think 258

still forum
#

You push manually to Linux and compile there?

astral tendon
#

I see the problem

still forum
#

Why not just use VS integration and let it be done automatically

queen cargo
#

No
I use git for that

still forum
#

Ah. You can still squash and force push later though. To clean up the history when you are done getting something working

astral tendon
#

_veh = createVehicle ["arifle_MX_ACO_pointer_F",[3801.08,13468.1,0.0015955], [], 1, "none"];
Not working

_veh = createVehicle ["Weapon_arifle_MX_F",[3801.08,13468.1,0.0015955], [], 1, "none"];

working

queen cargo
#

Vs Integration is for some reason not working clean
With complete hangups partially
Probably my Web connection...

still forum
#

What?

#

Weapons are not vehicles

queen cargo
#

I May at some point just create a new Master branch and add everything
Or I leave it like it is right now
Tbh... There is not much of a difference

astral tendon
#

but it does apears

#

and i can take it on the ground

lone glade
#

holy fuck dedmen

#

371 commits

still forum
#

๐Ÿ—ž

astral tendon
#

something wrong with arifle_MX_ACO_pointer_F, is there something diferent that i need to note?

lone glade
#

stats in comparison is 83 commits

still forum
#

As I said. Weapons are not vehicles

#

I guess Weapon_arifle_MX_F is a weapon holder class that contains a MX by default

#

You need to add the weapons to the weapon holder that you spawned

astral tendon
#

strange that the weapon on my hand does go to the ground with all the attachments

still forum
#

addWeaponCargo(Global)

#

Why is that strange?

lone glade
#

"all the attachments" as in an ACO scope and a laser pointer that's it

astral tendon
#

because "arifle_MX_ACO_pointer_F" do not work and is a MX with a sight and a pointer that i cant spawn

lone glade
#

there fixed

still forum
#

As I said. A weapon is not a vehicle.

lone glade
#

weapons are weapons, they are defined in CfgWeapons, vehicles are defined in CfgVehicles

still forum
#

I still don't know what's strange that if you drop a weapon... your weapon get's dropped. Seems obvious to me

lone glade
#

weapon ground holder are also defined in CfgVehicles

astral tendon
#

but i can get the "Weapon_arifle_MX_F" on the ground that MX i have in hand goes to the ground with all the attachments

lone glade
#

:facepalm:

astral tendon
#

So, what is the weapon holder of "arifle_MX_ACO_pointer_F"?

still forum
#

What?

#

It doesn't work like that

#

a weapon holder is a empty, invisible inventory "box" that you can add items into

#

And if you add items they are displayed

lone glade
#

there are different types, but that's mostly it

#

boxes are the same, people are the same

still forum
#

There are SOME prefilled ones I guess. But not one for every weapon type

lone glade
#

ohgod the horror

astral tendon
#

So why does the "arifle_MX_ACO_pointer_F" do not spawn?

still forum
#

BECAUSE A WEAPON IS NOT A VEHICLE

#

You can't spawn weapons using createVehicle

#

because a WEAPON IS NOT A VEHICLE

#

I already told you what you have to do. But you apparently just ignored that

astral tendon
#

then, what is on the ground when i drop my weapon? is there a way to create a weapon?

still forum
#

It automatically creates a weapon holder and put's your weapon into it

#

And yes. I already told you how.

#

To quote myself You need to add the weapons to the weapon holder that you spawned
addWeaponCargo(Global)

astral tendon
#

So, using this
_veh = createVehicle ["currentMuzzle player",position player, [], 0, "none"];
by default will not work, how should i put addWeaponCargo with createVehicle?

still forum
#

WTF

cold pebble
#

Create the groundweaponholder first

#

Then add the weapon

still forum
#

Again..
You need to add the weapons to the weapon holder that you spawned

#

weapon holder that you spawned Spawn a weapon holder.
add the weapons Add the weapon(s)
You need to Do that.

subtle ore
still forum
#

40 minutes ago you still knew how to spawn a weapon holder. So don't try to tell me you don't know how.

queen cargo
#

Angry Dedmen

#

You need to chill

little eagle
#

Never change, Dedmen.

astral tendon
#

my problem was that GroundWeaponHolder_Scripted seens to get the weapon on my hand

still forum
#

It doesn't

astral tendon
#

so that did not worked because of the weapon on my hand did not have a weapon holder

still forum
#

Of course if you use player action ["DropWeapon", _wh, currentWeapon player]; to Drop your Weapon you will drop your weapon

#

so that did not worked because of the weapon on my hand did not have a weapon holder What? If you drop a weapon it automatically creates a weapon holder

#

That does work.

lone glade
#

ofcause doesn't exist, it's of course @still forum .

#

๐Ÿ—ž

still forum
#

Thanks

#

Please keep reminding me so that I learn that

lone glade
#

It's called prevention, that way I have less stuff to fix in reviews ๐Ÿ˜„

still forum
#

Got the feeling it's gonna take me some time to get used to it

lone glade
#

taps forehead

queen cargo
#

There is work to be done guys
Go Code monkeys

lone glade
#

not for me

#

I just need to review ded's PR and do stats documentation.

little eagle
#

Wait, you thought "ofcause" was a word?

queen cargo
#

Great @lone glade
I got stuff to do for you

lone glade
#

FUCK NO

#

runs

subtle ore
#

of course a horse a horse is a horse because horses are coarse of course.

queen cargo
#

waits until He come back

lone glade
#

reminds me of that buffalo buffalo phrase

#

I can't remember how many you use though.

astral tendon
#

Let me try to simplefie

still forum
#

You want to spawn a weapon on the ground?

queen cargo
#

@astral tendon just rephrase what you want to archive

#

then we post you the code

#

and then you can say "no that is not what i want"

#

and we rant each other and somebody posts ๐Ÿฟ

still forum
#

I already lost all faith in you learning how to script anyway

lone glade
#

use createVehicle to create a groundWeaponHolder, then addWeaponCargoGlobal the weapon you want

astral tendon
#
player action ["DropWeapon", _wh, currentWeapon player];```
works great, but my problem is that the weapon some times apears far from the player or on the outside of the wall, i want it to spawn on the player's feet
still forum
#

Might aswell just tell us what you want and let us give you the finished code

queen cargo
#

faith is never lost
it just fades away

lone glade
#

It's neither hard nor difficult to understand.

still forum
#

Yeah. That's why you use that alternative syntax. That I showed you how to use like.. an hour ago

#

Continue to tell us why the solution to your problem didn't solve your problem.

astral tendon
#

And, i did not figure it out how to use that syntax with "GroundWeaponHolder_Scripted", so i would ask for a example

still forum
#

What?

#

You literally wrote me back how to use that syntax with that

queen cargo
#

๐Ÿ™„

still forum
astral tendon
#

You said to just swap it so
```_veh = createVehicle ["GroundWeaponHolder_Scripted", position player, [], 0, "FLY"];````

still forum
#

See! Right there.

#

Exactly

astral tendon
#

did "nothing"

#

that means, the weapon is not there

still forum
#

And I asked what you mean by that

#

Yeah..

#

Why would the weapon be there

#

you spawned a invisible box to put the weapon into

#

Arma doesn't magically know what you want from it. You have to tell it to drop the weapon into the box(weapon holder)

#

player action ["DropWeapon", _wh, currentWeapon player];

#

Or did you think the DropWeapon thing was irrelevant?

astral tendon
#
player action ["DropWeapon", _wh, currentWeapon player];```
#

and this still spawning the weapon far from the player

still forum
#

special: String - "NONE", "FLY", "FORM", "CAN_COLLIDE". "CAN_COLLIDE" creates the vehicle exactly where asked, not checking if others objects can cross its 3D model.
"CAN_COLLIDE" creates the vehicle exactly where asked, not checking if others objects can cross its 3D model.
"CAN_COLLIDE" creates the vehicle exactly where asked
"CAN_COLLIDE"

#

I could've told you that right away if you would have told me what you wanted to do or what your problem was ๐Ÿ˜„

astral tendon
#

THERE

#

I was paying atention only for the placement

queen cargo
#

that is why you should always at first try to phrase your problem @astral tendon

astral tendon
#

Sure, It was my mistake not to give a context

#

anyway, is there a way to remove default actions like take? removeAllActions does not seens to work

worldly locust
#

Having some problems, i think with locality.

#

I've got this _mkrPos = param[0]; //systemChat format ["%1", _mkrPos]; uav1 addAction ["Remove Flight Recorder","rdg_UAVTakeFlightRecorder.sqf"]; _mkr = createMarker ["mkrUAV", _mkrPos]; _mkr setMarkerShape "ELLIPSE"; _mkr setMarkerSize [600,600]; _mkr setMarkerColor "colorOPFOR";

lone glade
#

Not without modding

worldly locust
#

it creates the addaction but I don't see the marker

lone glade
#

Base actions are removed via config, you can't remove them with SQF

astral tendon
#

I kinda make that work on my last mission by seting the damage of a weapon on the ground to 1 so the action gone, but i wondering if there is another way

worldly locust
#

that snippet above is what's called here in UAVClientSetUp

//This section needs creating on server only.
_mrk = "mkrUAV";
_area = markerSize _mrk;
_nul = _area pushBack markerDir _mrk;
_nul = _area pushBack ( markerShape _mrk isEqualTo "Rectangle" );
_vehPos = [ _mrk, _area ] call BIS_fnc_randomPosTrigger;
uav1 = "B_UAV_02_dynamicLoadout_F" createVehicle _vehPos;
_dir = random 360;
_dist = random 500;
_mkrPos = uav1 getPos [_dist, _dir];
_taskID ="UAV";
            _title = "Recover UAV Flight Recorder";
            _desc = "A UAV has been lost in the indicated area. It's likely that it captured the location of enemy camps before it was lost, we need that data!. Recover the UAV Flight Recorder and return it to the Intelligence Office for processing";
            [WEST,[_taskID],[_desc,_title,""],objNull,0,2,true] call BIS_fnc_taskCreate;
            [_taskID,"plane"] call BIS_fnc_taskSetType;
            [_taskID, _mkrPos] call BIS_fnc_taskSetDestination;
        
//this section needs creating on all clients
[[_mkrPos], "rdg_UAVClientSetUp.sqf"] remoteExec ["execVM"];```
#

Anyone see what I've done wrong?

still forum
#

We talked about removing that action a couple weeks ago. I don't remember if there was a solution though

#

Who did I talk to about that some retards will always do something like 0 = call func even if it doesn't make any sense? The DUWS guy right?
Look at this:

_nul = _area pushBack markerDir _mrk;
_nul = _area pushBack ( markerShape _mrk isEqualTo "Rectangle" );

Ah @hushed minnow that was you! +

queen cargo
#

makes sense to me @still forum

#

if i wanted to at some point say "improved performance of skript"

#

i would do exactly that

still forum
#

"Stopped script from always crashing when calling a function"

lone glade
#

someone doesn't know about performance loops

worldly locust
#

Dedmen, sorry, i just copied that from a thread on BIS.

lone glade
#

"Remove a decimal here so we can say we improved speed by 10%"

still forum
#

From BIF? See that proves even more that that's not rare. Always make sure to never end your API functions with an assignment guys

worldly locust
#

Anyway, pretty sure that's not the problem. that bit works, I get a random position in the area I think.

still forum
#

Scrolled right past the fact that there is a CBA function that does that.

worldly locust
#

true.

#

and again. that's not what stops my code from showing the marker. So...

#

Figured it out. I was using the same marker name twice. Duh.

lusty canyon
#

do all classes have the custom info panel? eg:


        class CustomDisplayXY       //Custom display using custom resource
        {
            componentType = "CustomDisplayComponent";
            resource = "RscCustomInfoMyCustomRadModule";
        };

if not, is there a configless, script way to add custom display pip for player and show a cam object on it?

unborn ether
#

@lusty canyon You can use Procedural Textures alike #(argb,512,512,1)r2t(uavpipsingleview,1.0) to provide the effect you want

golden storm
#

so i have a trigger with the spawn BIS_fnc_spawngroup function, if i place

if !isServer exitWith {};
#

Should that make it so the AI spawns only once?

#
if (!isServer)  exitwith {};
for "_i" from 0 to 2 do {

_UnsGroup = createGroup [east,true];

_typeofgrp = [(configfile >> "CfgGroups" >> "East" >> "UNSUNG_EV_VC" >> "vcmainforceInfantry" >> "vc_mainriflesquadone")];
_UnsGroup = [getMarkerPos "spawn1", EAST, _typeofgrp] call BIS_fnc_spawnGroup;
_ranWay = [3015.9,535.170];
_UnsGroup addWaypoint [_ranWay,0];
}

Like that?

compact galleon
#

That.. Or check "Server only" in the trigger

golden storm
#

@compact galleon thanks! I was to try that but i wasn't sure if the "Server Only" helps, thing is that the mission is MP and meant for a large group of players

#

but last time i tried it, it spawned that group for each player that entered the trigger

lone glade
#

@still forum I did a review, it's mostly a few typos, nothing too big and the presentation seems good on my end.

golden storm
#

@subtle wigeon you could use Mission madoules in the editor, its way easier... Ooor, we could make the mission from script

still forum
#

typo's ? I already fixed typo's like a dozen times or so

lone glade
#

That's a big fat phony lie

golden storm
#

@lone glade which? to Dedmen or to me?

lone glade
#

dedmen

golden storm
#

Thanks, i guess mine has a solution then!

lone glade
#

Your inner german also leaked a bit ded, I saw one word with capitalization still present.

#

IN THE MIDDLE OF A PHRASE !!!1111

still forum
#

You just capitalized every word in that phrase

lone glade
#

which is a single word

#

And if you don't choke twice on it it's not german enough ๐Ÿ˜„

still forum
#

Yes. phrase is a single word

subtle ore
#

Well, i wouldn't call a solution a solution for as long as it's stuck in a trigger

austere granite
#

Anyone happen to know what the name is for arty computer display / idd?

unborn ether
#

@Adanteh#0761

class RscDisplayArtillery: RscStandardDisplay
{
    idd=-1;
    enableSimulation=1;
    class controlsBackground

If its the one, it has idd=-1 and no scriptName, so basiclly not marked in UI namespace.

austere granite
#

thanks

pseudo cypress
#

i hope im right here but i have a little problem with R3F Logistic

fading burrow
#

unlock vehicle with lost key every restart is bugged for me, sometimes it open even if i have key
anyone have a fix?
i use this : UPDATE
Object_DATA
SET
Object_DATA.CharacterID = 0
WHERE
Object_DATA.CharacterID <> 0
AND Object_DATA.CharacterID <= 12500
AND Object_DATA.Classname NOT LIKE 'Tent%'
AND Object_DATA.Classname NOT LIKE '%Locked'
AND Object_DATA.Classname NOT LIKE 'Land_%'
AND Object_DATA.Classname NOT LIKE 'Cinder%'
AND Object_DATA.Classname NOT LIKE 'Wood%'
AND Object_DATA.Classname NOT LIKE 'Metal%'
AND Object_DATA.Classname NOT LIKE '%Storage%'
AND Object_DATA.Classname NOT IN ('OutHouse_DZ', 'GunRack_DZ', 'WorkBench_DZ', 'Sandbag1_DZ', 'FireBarrel_DZ', 'DesertCamoNet_DZ', 'StickFence_DZ', 'LightPole_DZ', 'DeerStand_DZ', 'ForestLargeCamoNet_DZ', 'DesertLargeCamoNet_DZ', 'Plastic_Pole_EP1_DZ', 'Hedgehog_DZ', 'FuelPump_DZ', 'Fort_RazorWire', 'SandNest_DZ', 'ForestCamoNet_DZ', 'Fence_corrugated_DZ', 'CanvasHut_DZ', 'Generator_DZ', 'BagFenceRound_DZ')
AND FindVehicleKeysCount(Object_DATA.CharacterID) = 0

unborn ether
#

@pseudo cypress Well you better contact that addon community, since you could mistake a vehicle classname, or whatever happens in that scripts.

#

@fading burrow Pasting a SQL query especially without markdown is quite not helpful, but you actually set CharacterID = 0 for anything that has that not at 0 value and doesn't look like those classnames parts listed after WHERE statement. That seems like to be a Arma 2: DayZ Epoch database? As I remember CharacterID was a field for a password values of a safes, not the keys of vehicles.

fading burrow
#

arma 2 dayz epoch yes

barren magnet
#

Hey gus, whats the difference between having a jet places as object ingame and creating it via via createvehicle? Does arma internally create the static vehicles as simple objects or are there any antimations executed to make things like no tires, closed cockpit etc possible

indigo snow
#

vehicles spawned with createvehicle are just like those normally placed in 3den

barren magnet
#

well the jet is not started in editor, ingame its at full engine speed without anyone flying it ...

#

pretty obscure behavior

#

Does it have to to with enablesimulation?

unborn ether
#

@indigo snow Besides ownership is different in MP.

indigo snow
#

Local to the client where it is created? I dont think thats worth mentioning when the context is the mentioned above.

#

And if i had to guess, yea, playing with enableSimulation might result in wierd behaviour

inner swallow
#

@barren magnet you may consider playing around with the special string in the createVehicle command. I'm assuming "FLY" is set by default above a certain height above terrain level

barren magnet
#

allright, I will play around with it thx

austere granite
#

So did BIS change that you can't prevent vanilla actions anymore by return true on EHs?

meager heart
#

with KeyDown works

#

people was yelling at me for that... some time ago lol
was solution for blocking throw ๐Ÿ˜€

little eagle
#

DefaultAction can be blocked. Throw used to be blockable, but is no more. The rest cannot be blocked.

austere granite
#

The fug

#

I swear you could just return a true on keyup/keydown and block shit

#

Am I making this up?

still forum
#

Keys yes

austere granite
#

you coudl but not anymore?

still forum
#

not aware of it not working anymore

little eagle
#

KeyUp could never block. KeyDown can block, but this won't prevent binds like 2x_Key_ or Hold Key.

meager heart
#

still works, but... not reliable for some custom key binds

0 spawn {
        disableSerialization;
        waitUntil {!isNull (findDisplay 46)};
        VAR_block_nades = (findDisplay 46) displayAddEventHandler ["KeyDown",{
            if (inputAction "Throw" > 0) then {true} else {false};
        }];
    };
little eagle
#

then {true} else {false};

#

Why?

winter rose
#

could be readability

meager heart
#

for return true... or it will not work, commy

little eagle
#
(findDisplay 46) displayAddEventHandler ["KeyDown",{
    inputAction "Throw" > 0
}];
#

Already returns a boolean, otherwise the IF wouldn't work.

unborn ether
#

is the situation the same for both actionKeys and inputAction?

little eagle
#

"the situation"

#

?

unborn ether
#

about keys distinguishing because of precision

still forum
#

then {true} else {false}; Never makes sense

#

And no.. then [{true},{false}] also doesn't

meager heart
#

End Game Bis code #official ๐Ÿ˜€

// Block throwing grenades
    [] spawn
    {
        disableSerialization;
        scriptName "initPlayerLocal.sqf: Players stuck at start";
        waitUntil { !isNull (findDisplay 46) };
        BIS_lockThrow = (findDisplay 46) displayAddEventHandler ["KeyDown", "if ((_this select 1) in actionKeys 'Throw') then { true } else { false };"];
    };
little eagle
#

Demellion, not sure what you're trying to say. KeyDown can't block 2x_Key_ and Hold Key either. Or mouse inputs or joysticks.

#

#official is the best argument against copy pasting it tbqhfamalarm

meager heart
#

๐Ÿ˜€

unborn ether
#

Im just asking if inputAction reliable to detect something like Throw action in KeyDown

#

as actionKeys sucks because of reasons.

little eagle
#

KeyDown can't block Throw reliably, so it doesn't matter if you used inputAction or actionKeys.

unborn ether
#

awesome.

meager heart
#

tested... for custom keybinds not reliable...

#

#100%

little eagle
#

I thought we went over this weeks ago already.

meager heart
#

yep

little eagle
#

No other way as far as I am aware of. At least nothing that can't be exploited.

winter rose
#

there is this big safezone object in 3den editor, preventing players to shoot anything (catching the bullets and keeping them out)

unborn ether
#

@little eagle Why _this setWeaponReloadingTime [_this, _x, 1]; if true will just not allow to shoot?

little eagle
#

This is for Throw and Put.

unborn ether
#

Oh ok.

little eagle
#

The true is for the weapon.

unborn ether
#

cool. so actually make a nade forever reload ๐Ÿ˜„

little eagle
#

More like make the hands forever reload.

#

Hands are the weapon, grenade is the magazine.

unborn ether
#

well techncally yes, but that sounds.. strange ๐Ÿ˜„

little eagle
#

It being strange is not of concern as long as it's true.

meager heart
#

don't having body but having hands which is weapons... more strange, noooo

little eagle
#

The really strange thing is that each grenade type is a different muzzle of the Throw weapon (hands).

#

Which is why changing from frags to smokes is faster than taking the next frag right after you threw one.

austere granite
#

ir eally hope A4 will give us more control over behaviour like that

#

btw commy because you're a smart lad, any way to block firing vehicles like that?

little eagle
#

Haven't tried. Vehicles are weird, because they may not belong to your machine if there's a driver and then some commands just fail.

meager heart
#

firedMan eh maybe...

unborn ether
#

Well FiredMan doesn't give you keys control, only like deleting the projectile.

meager heart
#

i mean if that just some sort or restrictions... but if eh is to late then just lock it

wary vine
#

is it possible to create controls within a controlsGroup ?

astral tendon
#

is there a way to stop BIS_fnc_UnitPlay?

strange urchin
#

Yes

#

You just create a controls class within the ControlsGroup

#

In fact, thatโ€™s the entire point of it.

wary vine
#

didnt work for me.

#

I just wanted a listbox type thing with buttons , but im just opting for listnbox

strange urchin
#

I put a list box in one the other day

#

Youโ€™ll want to set the x and y to 0 on the list box

#

Easiest way to put it in top left

wary vine
#

what I came up with when I couldnt get the groups working.

astral tendon
#

array = [0,1,2,3,4,5,6,7,8,9,10]
how i can select 5 to 10 with out have to do "select x" to all numbers i want?

hushed minnow
#
array select [start, count]  
#

It is alternative syntax 4 for select

#

Or otherwise array select expression where expression is tested against each _x array element

astral tendon
#

uh nevermind, i found a better solution for what i want

#
_thing setVariable [ "BIS_fnc_unitPlay_terminate", true ];
#

btw, can you make a better exemple with that? i am actually interested

hushed minnow
#

1st or 2nd one?

astral tendon
#

1st

hushed minnow
#

okay using your 'array' as the example, to get 5 to 10

array select [5,6] //returns [5,6,7,8,9,10]
array select [5,5] //returns [5,6,7,8,9]
array select [1,99] //returns [1,2,3,4,5,6,7,8,9,10]
#

gg?

astral tendon
#

hum the second one returns [6,7,8,9,10]

hushed minnow
#

oh right you are, got my indices mixed up

astral tendon
#

if i undestand right

#
array select [start, count] 

the count only counts AFTER the start?

hushed minnow
#

The wiki says count is... ""Number of array elements to select""

#

so the start index onwards , up to what count would you like returned.

astral tendon
#

i think i got it

#

can you give me that wiki page you see?

hushed minnow
#

Looking at #4

astral tendon
#

thanks.

celest rivet
#

"The information on this page is very outdated and often misleading. The content of this page most likely will radically change in the future."
https://community.bistudio.com/wiki/Function
Anyone able to update that page?

meager heart
celest rivet
#

@meager heart Yet again, you have the answer I sought! Thank you ๐Ÿ˜„

meager heart
#

achievement unlocked

celest rivet
#

lol

little eagle
#

The old page about functions is weird. The second sentence is already off topic and talks about commands instead of functions.

verbal otter
#

@little eagle can i ask you about your custom lobby script? I want make custom lobby, but can't find script what set roles on lobby listbox.

little eagle
#

What do you mean "set roles"?

#

?

#

@verbal otter Uhm.

verbal otter
#

in lobby 2 listboxes - 1 - roles in team 2 - is players list

#

can't drop picture ๐Ÿ˜ฆ

#

can i send you in pm?

warm gorge
#

Does anyone know what box/device in Arma is called that you can animate through scripting to open it up etc?

little eagle
#

? ... p3d?

warm gorge
#

Huh?

meager heart
#

"Data Terminal" ? ๐Ÿ˜€

warm gorge
#

Yes! Thats it. Thank youuu

meager heart
#

Land_DataTerminal_01_F classname

fleet wind
#

Is there any good tutorials out there for how to use Mysql as a database for arma. Or any tutorial what so ever to get started with Mysql?

warm bone
#

Hi James, I used armadb to add a database to my arma server.

#

It has a pretty good step by step instructions

still forum
#

Cool. I use a ton of stuff on my server and they have almost no instructions

#

I'm sure you'll find extDB stuff in life forums or maybe Exile

warm bone
#

Yep, experience is the best teacher huh ๐Ÿ˜ƒ

still forum
#

Or you could just ask Torndeco the... eh.... brain... cmon.. wtf... Eh... Torndeco directly if he ehh... has too much free time

warm bone
#

haha

#

I did find his site too ..

#

SInce i'm in the channel, is anyone interested in helping optimize my server scripts, pls pm me.

still forum
#

how many scripts? Some framework?

warm bone
#

Total of about 6-8 scripts just like init.sqf, initPlayerServer, initserver etc...

still forum
#

Put them on github and ask here if someone can review it

warm bone
#

Yea framework to run database and whitelisting.

still forum
#

UltraNoob did that a couple days ago and it worked well I'd say

warm bone
#

Ok, awesome thanks for advice.

#

Atm they are just a bunch of scripts I have cobbled together over time and probably not optimized.

winter rose
#

@warm bone I can take a look (no promise on result though)

lusty canyon
#

how can you make any vehicle into a uav? i tried adding B_UAV_AI as driver/gunner but nothing shows up on terminal? (without cfg, sqf only)

ornate pawn
#

Can somebody help me with an script? I'm trying to create basic logistics system for a mission. I need to be able to attach a helicopter to a landing platform but i need the action only to appear when the helicopter is within a certain distance from the platform. here's what i got so far.

#

[
player,
"Attach AH-6 Little Bird Helicopter",
"images\take_ca.paa",
"images\take_ca.paa",
"_target distance LP_1 < 2.5", // LP_1 IS THE LANDING PLATFORM
"_target distance LP_1 < 2.5", // LP_1 IS THE LANDING PLATFORM
{},
{},
{
_target playaction "Putdown";
LB_1 attachTo [LP_1, [2, 0, +2.2] ]; // LB_1 IS THE LITTLE BIRD
sleep 0.1;
lb_1 setDir 270;
},
{},
[],
10,
1000,
true,
false
] call BIS_fnc_holdActionAdd;

still forum
#

Ah yeah. And.. What's the problem?

#

Only displaying if distance is right?

ornate pawn
#

yeah

#

exactly

#

between helicopter and landing platform

still forum
#

Add LB_1 distance LP_1 < (your distance) to the condition

ornate pawn
#

where the condition goes?

#

im kinda new to this haha

#

sorry

still forum
#

where you have the landing platform comment

queen cargo
#

mhhh ... could somebody check if this ends up as a comment?

_str1 = 'left /* middle */ right';
_str2 = 'left // right';
diag_log [_str1, _str2]```
ornate pawn
#

Okay, i'll give it a try thanks for quick response

#

im doing it wrong.

#

this is how it looks now

#

[
player,
"Attach AH-6 Little Bird Helicopter",
"images\take_ca.paa",
"images\take_ca.paa",
"_target distance LP_1 < 2.5", // LP_1 IS THE LANDING PLATFORM
"_target distance LP_1 < 2.5", // LP_1 IS THE LANDING PLATFORM
"LB_1 distance LP_1 < (2.5)"
{},
{},
{
_target playaction "Putdown";
LB_1 attachTo [LP_1, [2, 0, +2.2] ]; // LB_1 IS THE LITTLE BIRD
sleep 0.1;
lb_1 setDir 270;
},
{},
[],
10,
1000,
true,
false
] call BIS_fnc_holdActionAdd;

still forum
#

Yes you are doing it wrong

ornate pawn
#

could you explain real quick? like i said im only good at changing values and names haha

still forum
#

"_target distance LP_1 < 2.5" -> _target distance LP_1 < 2.5 && LB_1 distance LP_1 < (2.5)

ornate pawn
#

still wont work

#

i hate bothering people

#

[
player,
"Attach AH-6 Little Bird Helicopter",
"images\take_ca.paa",
"images\take_ca.paa",
"_target distance LP_1 < 2.5", // LP_1 IS THE LANDING PLATFORM
"_target distance LP_1 < 2.5", // LP_1 IS THE LANDING PLATFORM
"_target distance LP_1 < 3" -> _target distance LP_1 < 3 && LB_1 distance LP_1 < (3)
{},
{},
{
_target playaction "Putdown";
LB_1 attachTo [LP_1, [2, 0, +2.2] ]; // LB_1 IS THE LITTLE BIRD
sleep 0.1;
lb_1 setDir 270;
},
{},
[],
10,
1000,
true,
false
] call BIS_fnc_holdActionAdd;

still forum
#

Dude

#

Really?

#

-> means "change to this"

ornate pawn
#

i didn't know that

#

it says invalid number in expression

winter rose
#
[
player,
"Attach AH-6 Little Bird Helicopter",
"images\take_ca.paa",
"images\take_ca.paa",
"_target distance LP_1 < 2.5", // LP_1 IS THE LANDING PLATFORM
"_target distance LP_1 < 2.5", // LP_1 IS THE LANDING PLATFORM
"_target distance LP_1 < 3 && LB_1 distance LP_1 < 3"
{},
{},
{
_target playaction "Putdown";
LB_1 attachTo [LP_1, [2, 0, +2.2] ]; // LB_1 IS THE LITTLE BIRD
sleep 0.1;
lb_1 setDir 270;
},
{},
[],
10,
1000,
true,
false
] call BIS_fnc_holdActionAdd;
subtle ore
still forum
#

Dude

compact galleon
#

@queen cargo As expected, both become comments

queen cargo
#

wut?

still forum
#

"Change to this"
Not like.. Append that into a new element in the array

queen cargo
#

so _str1 is left right

still forum
#

change both conditions you already have

queen cargo
#

and _str2 probably completly breaks

compact galleon
#

Yes

winter rose
#

@ornate pawn to format your code, do the following:

```sqf
your-code-here
```

compact galleon
#

and second is not terminated

queen cargo
#

great ...

#

as expected

#

so preprocessor only checks for "..."

ornate pawn
#
[
  player,
  "Attach AH-6 Little Bird Helicopter",
  "images\take_ca.paa",
  "images\take_ca.paa",
  "_target distance LP_1 < 2.5 && LB_1 distance LP_1 < (2.5)", // LP_1 IS THE LANDING PLATFORM
  "_target distance LP_1 < 2.5 && LB_1 distance LP_1 < (2.5)", // LP_1 IS THE LANDING PLATFORM 
  {},
  {},
  {
    _target playaction "Putdown";
    LB_1 attachTo [LP_1, [2, 0, +2.2] ]; // LB_1 IS THE LITTLE BIRD
    sleep 0.1;
    lb_1 setDir 270;
  },
  {},
  [],
  10,
  1000,
  true,
  false
] call BIS_fnc_holdActionAdd;
#

wont work

still forum
#

why not?

ornate pawn
#

invalid number in expression

still forum
#

+2.2 Wtf is that?

#

can you show the actual error message

subtle ore
#

Yeah no, +2.2 doesn't make any sense at all.
LB_1 attachTo[LP_1,[2,0,2.2]];

#

That could be your errror

ornate pawn
#

that's not the problem

#

i deleted the + sign and still

#

same problem

#

init: Generic error in expression

#

thats what it says

#

"_target distance LP_1 < 3 && LB_1 distance LP_1 < (3)",

#

two LP_1 ?

#

should i change it to: "_target distance LP_1 < 3 && LB_1 distance LB_1 < (3)",

#

same freaking error

#

heres what i get

still forum
#

LB_1 distance LB_1 Doesn't even make any sense

#

why would you check the distance to yourself and expect anything other than 0?

ornate pawn
#

dude i was doing what you said

subtle ore
#

Invalid number in expression:
it stops at : //

#

Try removing // ? ๐Ÿ˜„

ornate pawn
#

LB_1 = Little bird helicopter and LP_1 means Landing Platform

#

Im going to try that @subtle ore

subtle ore
#

not sure if comments work in the init boxes or not.

ornate pawn
#

maybe that's why

#

launching a3

peak plover
#

Can time of day be changed clientside?

still forum
#

dude i was doing what you said No you weren't. I gave you LB_1 distance LP_1 And you thought LB_1 distance LB_1 is a better idea

ornate pawn
#

i didn't change anything before trying everything you said

still forum
#

And I didn't know you were trying to use a init box. You never said that.
Yeah comments in init box == bad

ornate pawn
#

i deleted them already

subtle ore
#

@peak plover skiptime only can be executed on server, so I dunno ๐Ÿคท

ornate pawn
#

i forgot to delete one more comment

#

now the init box accepts the script but when i put the helicopter close the the Landing Platform the action doesn

#

appear

#
[ 
  player, 
  "Attach AH-6 Little Bird Helicopter", 
  "images\take_ca.paa", 
  "images\take_ca.paa", 
  "_target distance LP_1 < 2.5 && LB_1 distance LP_1 < 2.)", 
  "_target distance LP_1 < 2.5 && LB_1 distance LP_1 < 2.5", 
  {}, 
  {}, 
  { 
    _target playaction "Putdown"; 
 LB_1 attachTo [LP_1, [2, 0, 2.2] ];
 sleep 0.1; 
 lb_1 setDir 270; 
  }, 
  {}, 
  [], 
  10, 
  1000, 
  true, 
  false 
] call BIS_fnc_holdActionAdd;
still forum
#

Well

#

yeah.

#

syntax error

#

It's like.. really obvious...

ornate pawn
#

syntax error?

still forum
#

yeah

#

you have two lines which previously were always exactly the same

#

suddenly they aren't anymore

#

I don't even know why. That change isn't even related to the other stuff you just tried to fix

lusty canyon
#

my cheeky uss freedom is always pretending to be a submarine


openMap true; onMapSingleClick "

_freedomCarrier = createVehicle [""Land_Carrier_01_base_F"", _pos, [], 0, ""NONE""];

openMap false; 
true"; 

spawns at seabed, how to move it just a bit under sea surface?

still forum
#

setPosASL

ornate pawn
#

so i should delete one of these lines: "_target distance LP_1 < 2.5 && LB_1 distance LP_1 < 2.5",

still forum
#

No

#

Wow..

ornate pawn
#

?

still forum
#

you have two lines which previously were always exactly the same
suddenly they aren't anymore

Like.. Just read.
You have two lines who were the same previously. Now they are different.

Now think. Is the solution removing one line although that was not a problem at all before.
Or is the solution to fix the typo you made in the second line?

subtle ore
#

The function needs a condition.

ornate pawn
#

I have no idea how to script okay? i only take scripts from the game and change some stuff.

still forum
#
  "_target distance LP_1 < 2.5 && LB_1 distance LP_1 < 2.)", 
  "_target distance LP_1 < 2.5 && LB_1 distance LP_1 < 2.5", 

Just use your eyes.

ornate pawn
#
  1. and 2.5
still forum
#

You don't even need to know how to script

ornate pawn
#

that is the problem?

still forum
#

No it's totally not the problem at all /s

ornate pawn
#
[ 
  player, 
  "Attach AH-6 Little Bird Helicopter", 
  "images\take_ca.paa", 
  "images\take_ca.paa", 
  "_target distance LP_1 < 2.5 && LB_1 distance LP_1 < 2.5)", 
  "_target distance LP_1 < 2.5 && LB_1 distance LP_1 < 2.5)", 
  {}, 
  {}, 
  { 
    _target playaction "Putdown"; 
 LB_1 attachTo [LP_1, [2, 0, 2.2] ];
 sleep 0.1; 
 LB_1 setDir 270; 
  }, 
  {}, 
  [], 
  10, 
  1000, 
  true, 
  false 
] call BIS_fnc_holdActionAdd;

#

Still nothing

still forum
#

๐Ÿคฆ

#

I'm done.

ornate pawn
#

Okay

#

thanks for your help

#

sorry for not understanding

#

I'll ask my friend who works in BIS he's the one that helps me but he'

#

he's currently offline that's why i came here.

tough abyss
#

๐Ÿค”

devout niche
#

if i have the variable that is assigned to the groupID of a specific group of players, how can i forEach all the units in that group later on? using ```
{
code
} foreach units (variable);

#

or is there another method to store a group of players and run code on them later on

still forum
#

groupID?

#

just save the group in a variable

ornate pawn
#

I got the script working.

#
[ 
  player, 
  "Attach AH-6 Little Bird Helicopter", 
  "images\take_ca.paa", 
  "images\take_ca.paa", 
  "_target distance LP_1 < 2.5",
  "LB_1 distance LP_1 < 2.5",
  {}, 
  {}, 
  { 
    _target playaction "Putdown"; 
 LB_1 attachTo [LP_1, [2, 0, 2.2] ];
 sleep 0.1; 
 LB_1 setDir 270; 
  }, 
  {}, 
  [], 
  10, 
  1000, 
  true, 
  false 
] call BIS_fnc_holdActionAdd;
subtle ore
#

Your username surely shouldn't be permitted, but I guess you've found a way to be annoying @devout niche

ornate pawn
#

hahaha

devout niche
#

ive asked a few times for it to be changed but nobody has changed it for this server for me ๐Ÿ˜ฆ

subtle ore
#

change your name, leave, rejoin

devout niche
#

I was asking for a server-specific name change

subtle ore
#

Well it's annoying universally.

still forum
#

PM a moderator

little eagle
#

Oh my.

unborn ether
#

Will the function from CfgFunctions marked with preInit|postInit execute if its having a conflict with the same function name and tag?

little eagle
#

Why do you ask this?

still forum
#

It executes the function by name

#

There can only be one

unborn ether
#

My friend dude has a conflict somewhere, and bit of a dumb to find it within hunders of his shitty addons. Just changed the tag. Thanks guys.

open vigil
#

I have no idea how to script okay? i only take scripts from the game and change some stuff. Then you really shouldn't be touching scripts.

#

@devout niche Best bet is to use an alternate name for this Discord. Else you'll join one day to find you've been banned. 11,000 + members and only one person who can change names...it aint gonna happen.

tough abyss
#

I really want to find the person responsible for those characters beening in utf
But its a good idea to change your name, its just annoying and some people will just block you aka me ๐Ÿ˜‰

fringe torrent
#

Hi everyone
i am trying to edit values in the config based on a script
but seems not to allow me to slingload verhicles ...they don't even show up on the SLA

if (_t in ['B_Heli_Transport_03_unarmed_green_F']) then {
         slingLoadMaxCargoMass = 15000;
         liftForceCoef = 1.7;
};
still forum
#

i am trying to edit values in the config based on a script impossible

#

Also that's not how scripting/programming works

#

it doesn't magically know which config value you want to change

tough abyss
#

all you basically done is defined some global variables, you need to make an addon to override some config values

fringe torrent
#

ok thanx

hollow stump
#

hi can anyone please help me im trying to make a script that says if player is <= sea level else if above sea level then

still forum
#

(getPosASL player) select 2

#

gives you the height above sealevel

hollow stump
#

ok thanks ill give it a try ๐Ÿ˜ƒ

fringe torrent
#

@Dedmen
so is there anyway i can change say Huron Config in the mission file ?

hollow stump
#

like this ?

if ((getPosASL player) select 2 > 0) then { blabla } else {  if ((getPosASL player) select 2 <= 0) then { blabla }; };
meager heart
#

๐Ÿค”

still forum
#

@fringe torrent No.

#

@Zeuzy#0422 Yeah... But you don't need the other if in the else.

#

If it's not bigger then 0 then it's obviously less or equal to 0

hollow stump
#

yeah thanks there's more to the if statements but didn't want to add too example which is why the extra else

edgy dune
#

oh question

#

so the spartan sam missiles come in 21 missiles per mag if u do this _this addMagazineTurret ["magazine_Missile_rim116_x21" ,-1,1]; _this addWeaponTurret["weapon_rim116Launcher", -1.1];

#

I was wondering

#

is there away to add say 6 missiles rather then 21?

#

ik u can add partially filled magz for infantry weapons, but is there away for vics?

still forum
#

That should do exactly that

#

I don't know what you are doing there

#

turret path is an array. not a number

twin frigate
#

Hello, I'm quite unexperienced in scripting with sqf and would like to know how to remove the ammunition of the car the player is currently sitting in (e.g. an armed ifrit). I've already tried "vehicle player setVehicleAmmo 0;", but it also removes the ammunition of the player itself, which is something I dont want to do. Anyone want to help me..?

unborn ether
#

@ViRazY#0594 Any vehicle?

twin frigate
#

Tank, Car, Helicopter, Plane, Boat.. Anything controlled by players and being able to shoot..

#

It's for a little safezone-script and I dont want players to abuse their invincibility to shoot out of the safezone with a vehicle

unborn ether
#

@ViRazY#0594 Kinda not the best way to take ammo away but:

player addEventHandler ['GetInMan',{
    params ['','_proxy','_vehicle',''];
        _vehicle setVehicleAmmo 0;
}];
#

updated, forgot that that you just might get to gunner

twin frigate
#

Thanks, but its not working as it should do.. It's working fine if I'm switching to the gunner's seat without exiting the vehicle but if I'm accessing the gunner's seat from the outside it's always empty and the ammo is still full if I'm switching to the gunner's seat without exiting the vehicle inside of the safezone. Should I paste the whole code, so you could better understand what i'm trying to achieve (and maybe what isn't working)?

unborn ether
#

@ViRazY#0594 Oh i forgot thats AL. Well you need to remoteExec this to a vehicle owner, because only owner can actually remove the ammo.

twin frigate
#

Do I need to do something specific with your piece of code or is it something in the initialization of the script? As I said before: Im quite unexperienced and the wiki page of "remoteExec" kind of confuses me even more with these 10 different examples. I'm sorry for these dumb questions I guess

ruby breach
#

Honestly, you may be able to just use a "firedman" EVH to delete the projectile if player distance "safezone" < _distance. Not sure if deleting the projectile via firedMan will work with 100% success or not however

twin frigate
#

Deleting projectiles would be awesome (even better than my current solution for preventing players from shooting). If you would explain me how to do this, I would be very happy ๐Ÿ˜ƒ

edgy dune
#

awww fuck

#

I accidently typed it wrong

#
_this  addMagazineTurret ["magazine_Missile_rim116_x21" ,[-1],1];  
_this  addWeaponTurret["weapon_rim116Launcher", [-1],1];```
#

okay so that will add 21 spartan missiles to the pilot

#

is there away so that I can only add say 1 missile for the magazine?

meager heart
#
_vehicle addMagazineTurret ["60Rnd_40mm_GPR_Tracer_Red_shells",[0],13]; //--- 1 magazine for turret [0] with 13 rounds

@edgy dune

unborn ether
#

Gnashes: Honestly, you may be able to just use a "firedman" EVH to delete the projectile if player distance "safezone" < _distance. Not sure if deleting the projectile via firedMan will work with 100% success or not however
commy's gonna have a dejavu again ๐Ÿ˜„

#

Safezones: The Following

meager heart
#

probably most reliable way will be setVehicleLock and FriedMan at the same time ๐Ÿ˜„

edgy dune
#

w8 thats 13 mags of 60 rounds though? What Im wondering is can I add just 40 rounds with the weapon you mentioned

meager heart
#

no lol

edgy dune
#

T_T sad days

meager heart
#
Since Arma 3 v1.55.133817 it is possible to set custom ammo count in added magazine.
edgy dune
#

oh

#

cool

meager heart
#

that is not magazines count... that is ammo count in added magazine

edgy dune
#

yea I wonder if there was a way to change the ammo count in the magazine

little eagle
#

Person or vehicle?

edgy dune
#

vehicle

little eagle
#

A currently loaded magazine or one from the reserve?

edgy dune
#

hmmm I wana try and load half a magazine of spartan missiles(which is 21 missiles for a full mag,so I guess 10 spartan missiles). SO a currently loaded mag

little eagle
#

Wait, is that a plane?

edgy dune
#

wat? spartan missiles? nah Its the sam short range missiles on the carrier I think

little eagle
#
_vehicle removeMagazinesTurret [_magazine, _turret];
_vehicle addMagazineTurret [_magazine, _turret, 10];
#

Tried this?

edgy dune
#

isnt that just adding 9 mags of what ever _magzine is?

little eagle
#

No, one with 10 rounds.

edgy dune
#

ill try that in the morining,im sleepy now ๐Ÿ˜›

little eagle
#

before:

magazinesAllTurrets a
[["FakeWeapon",[-1],1,1e+007,0],["magazine_Missile_rim116_x21",[0],21,1e+007,0]]

script:

private _vehicle = a;
private _turret = [0];
private _magazine = "magazine_Missile_rim116_x21";

_vehicle removeMagazinesTurret [_magazine, _turret];
_vehicle addMagazineTurret [_magazine, _turret, 10];

after:

magazinesAllTurrets a
[["FakeWeapon",[-1],1,1e+007,0],["magazine_Missile_rim116_x21",[0],10,1.00001e+007,0]]
#

Even changed optically. I thiknk your previous error was adding another magazine without taking the full one away. Also adding another copy of the weapon is just weird.

meager heart
#

i think wrong turret index also

#

was

#

b4

little eagle
#

Yeah, [-1] is the driver.

meager heart
#

was [-1]

#

yep

little eagle
#

They said something about "pilot" too. Can you even enter these?

meager heart
#

no clue

fossil yew
#

How to implement custom respawn timer depending on respawn position selected?

little eagle
fossil yew
#

Problem is more, when to run that command? We have on killed and on respawn events but not on select respawn

austere granite
#

make one :3

#

probably make a loop that checks for current selected respawn and call a scripted event if it's changed

fossil yew
#

How do you know which spawn is selected on the map?

astral tendon
#

why is causedBy returning the player intead of the object used?

#

for context here is the code

this disableAI "move";
this addEventHandler ["HandleDamage",{0}];
this addMPEventHandler ["MPHit",{
systemChat format ["select 0 %1",_this select 0 ];
systemChat format ["select 1 %1",_this select 1 ];
systemChat format ["select 2 %1",_this select 2 ];
systemChat format ["select 3 %1",_this select 3 ];
systemChat format ["select 4 %1",_this select 4 ];
}];
#

select 0 is returing the name of the unit
select 1 the player
select 2 the damage
select 3 the player
select 4 <null>

still forum
#

if he damaged himself

#

then it will be caused by the player

astral tendon
#

it was used a weapon for the hit

#

though i dont get the name of the weapon

#

same problem with the normal Hit

little eagle
#

@fossil yew
Add some ui eventhandler on the respawn ui. Which one depends on what that ui is. Never used it myself.

knotty mantle
#

I had to deal with that not so long ago. This thread was the best solution i found and it still works (with the mentioned fix in the last post)

#

ah fml. nvm. Sorry. You want the respawn position not the role.

#

Still maybe a look at the link helps you. It uses the same ui after all

fossil yew
#

thanks

astral tendon
#

Was that intentional?

#

causedBy is atually the one that shots?

fading burrow
#

anyone with custom deathscreen on 1.0.6.2?

still forum
#

@fading burrow Did you hit the wrong discord?

fading burrow
#

nope

#

i got help here earlier with arma 2 dayz epoch

obtuse cosmos
#

lol

bitter bough
#

So, doing a little experimenting with the BIS_fnc_garage
And I've realized I'll also need some kind of trash removal.
Is there some kind of way I could link deleteVehicle to a certain area, and have it delete any vehicles inside that area?

little eagle
bitter bough
#

Commy back at it again with the good links

bitter bough
#

So I'll admit, I'm probably out of my league here.
How can I set it up so whatever array nearEntities detects, if it's a vehicle then deleteVehicle removes it.
So far I've only managed to get a list, and not managed to pull from that list and use deleteVehicle

unborn ether
#

@bitter bough You need to check it with isKindOf

#

@bitter bough Or you can go as example given in the command Example 1:

_list = (position player) nearEntities [["Man", "Air", "Car", "Motorcycle", "Tank"], 200];
#

This will return only kinds of that is specified there.

little eagle
#

CAManBase instead of Man.

bitter bough
#

Oh I'm gonna need to start making my own functions for this arent I

unborn ether
#

@bitter bough If you are not afraid of people getting in those vehicles, you can also use deleteVehicle with GetInMan EVH.

little eagle
bitter bough
#

Alrighty, this is beginning to make a bit more sense now.

unborn ether
#

@little eagle curious why CAManBase exactly, does Man missing something? Or its just about capturing animals too?

bitter bough
#

So, I'll let you guys tell me I've done something fairly horribly wrong, as it makes sense but I just don't grasp the full concept.
this addAction ["Remove Vehicle",{(VehSpawn nearEntities 15), deleteVehicle} forEach ["Tank"]]

#

(be harsh if you must, if Konig were here he'd do the same)

tough abyss
#

Not like this bud {deleteVehicle _x} forEach (Vehspawn nearEntities [[โ€œTankโ€],15]); @bitter bough

#

Smth like that Iโ€™m on phone so

#

Assuming you have defined vehspawn

bitter bough
#

Ohhhhh, yeah, VehSpawn is a position

#

it's set as a variable on another object.

tough abyss
#

What

meager heart
#

missing _x there also

tough abyss
#

Not in my example

meager heart
#

yep

#
var_action = this addAction ["Remove Vehicle", {
   (VehSpawn nearEntities ["Tank", 15]) apply {deleteVehicle _x}; //--- VehSpawn is defined ?
}];
#

@bitter bough

tough abyss
#

Why

#

well

strange urchin
#

Why did you do that

bitter bough
#

what's the var_action for?

tough abyss
#

Nani?

strange urchin
#

There was already a solution given

meager heart
#

omae wa mo sindeiru

#

what's the var_action for?
that is action id

strange urchin
#

Donโ€™t know why anyone would want an apply that doesnโ€™t do anything special

tough abyss
#

It is 1% faster according to wiki :kek:

meager heart
#

yes!

strange urchin
#

Weird

bitter bough
#

Ohhhh, so I could use Action ID's should I decide to work into creating my own functions instead of working strictly out of init

#

That's a step out of the comfort zone but it makes a lot more sense

tough abyss
#

Uh

strange urchin
#

Action IDs are just handles

tough abyss
#

This

bitter bough
#

Yeah I'm still kinda learning.
I went from just putting objects down and calling it good to trying to understand systems.
Everything is making more sense little by little

tough abyss
#

how to make titleText appear if player is looking at object(s) from array while the text remains there until a player is out of range from the same object(s)?

meager heart
meager heart
#

you can make color fade out... so text is still there but becomes transparent when conditions meet... something like

_fadeOut = (player distance _x) / <number>;                
if (<condition>) then {
    _color set [3, 1 - _fadeOut];
};    
undone turret
#

Hey, need help with scripting, need help with making a script, where if units of a squad(player squad) are further then 200 meters from player unit(squad leader). I need it so that the code only executes on units further then 200 meters and not the squad members that are within 200 meters from player unit.
I can't seem to find a way that the code only executes on the units greater then 200 meters and not the entire squad.

#

_dist = ({_x} forEach units squad1) distance playerUnit > 200;

inner swallow
#

try using inArea or inAreaArray

#

so if (! inAreaArray) then {stuff}

meager heart
#

also _dist = ({_x} forEach units squad1) distance playerUnit > 200;
{_x distance playerUnit > 200} forEach units squad1; //--- if playerUnit and squad1 are defined

winter rose
#
// playersGroup has to be defined
{
   if (_x distance leader playersGroup > 200) then
   {
      /* your effect here - setDamage? huhuhu */
   }
} forEach units playersGroup;
undone turret
#

@ trying to make it so if a AI squad member is further than 200 meters away he gets teleported to your position

subtle ore
#
0 spawn
{
  while{alive player} do
  {
    {
      if(_x distance player > 200) exitWith
      {
        _x setPos[((getPosATL player) select 0) + 5,((getPosATL player) select 1) + 5,0];
      };
    } forEach units group player;
    sleep 0.3;
  };
};
#

ยฏ_(ใƒ„)_/ยฏ

#

Probably not the best example, but I guess it'd work.

#

works on my end at least.

undone turret
#

@winter rose doesn't seem to excute the code
_x moveInCargo heli

#

@subtle ore only want it to be excuted once

subtle ore
#

@undone turret Bam, done.

undone turret
#

@winter rose Ah gosh, i used execVM and it worked

#

I'v been using "exec" to execute scripts, that must be why sometimes they don't work

vagrant mango
#

Hey guys wondering if I could get some scripting assistance in here really quick? Its about adding the HoldAddAction to an object and making it execute a script.. I am not sure how to do such. It seems to only work with a function name.

strange urchin
#

Donโ€™t use exec. Itโ€™s something that should seldom get used.

obtuse cosmos
#

Looking for a way to properly attach it so it stays on door regardless of animation phase (open/closed) - any ideas?

lone glade
#

that's not possible

obtuse cosmos
#

Arma'd ๐Ÿ˜ข

unborn ether
#

Well actually that's possible, but that's gonna be retarded. You need to create some invisible helper object on interaction and probably setVariable of its position and switch drawing to its position, by reading variable from the house you just set to understand its there.

#

And its kinda enough to just createSimpleObject so it will not spam packets.

lone glade
#

....

#

dude

unborn ether
#

Well you've said its not possible at all.

#

๐Ÿ˜„

lone glade
#

because it fucking isn't

unborn ether
#

So its not possible to createSimpleObject on the selectionPosition when the door animationPhase is different from 0 on a specific door and setVariable this to the house as door name and let drawIcon3D detect that by reading that very variable for presence of object and switch drawing to that position?

lone glade
#

Re read what you just wrote very carefully

unborn ether
#

So yes i just basicly said that you need a helper object position to switch drawing to it instead of current selectionPosition.

#

If that what author actually wanted.

meager heart
#

โš† _ โš†

subtle ore
still forum
#

to switch drawing to it How do you switch drawing to something??

#

Don't even have a slight clue what that's supposed to mean

little eagle
#

@unborn ether Man isn't missing anything. CAManBase is a subclass of Man. But Man has other subclasses too. Like Animal. So your version would pick up all Animal too, like snakes, rabbits and fish.

fossil yew
#

Does this statement return unique player identifier getPlayerUID that is same every time player connects?

cosmic kettle
#

So, yes.

fossil yew
#

thanks.

wooden burrow
#

Trying to get Zeus aka Curator to work on first player spawn (currently, it works only after respawn)

Here is what happening during first player spawn (after joining the server through lobby):
Player assigned to unit in the slot -> Player requests auth from Serverside -> Serverside checks UID and Name, then sends Player data (gear, pos, dmg, etc.) -> Player recieved data, set gear, pos, etc., auth end. (Sadly, after this procedure player still have original unit name)

Respawns are handled by default Arma disposal manager, with respawn points set through mission description.ext

peak plover
#

Can missionnames setvar work in preinit?

still forum
#

yes

peak plover
#

public var?

still forum
#

Ugh... Should. Not 100% sure

lone glade
#

missionNamespace is ALWAYS available unless the mission isn't loaded (preStart)

queen cargo
#

is it really not available then @lone glade ?
what happens if you use missionNamespace during preStart?

#

crash? error?

lone glade
#

error

#

fun fact, world is present and loaded in preStart

still forum
#

unless the mission isn't loaded wrong.

#

Remove that part and you are correct

lone glade
#

weeeeell, preStart

#

but I get what you meant, I could've phrased it better

unborn ether
#

Dedmen: to switch drawing to it How do you switch drawing to something??
Change the position of drawIcon3D in Draw3D? ๐Ÿค”

still forum
#

so... you mean "change the position of the icon" and not "to switch drawing to it"

peak plover
#

BIS_fnc_getParamValue

#

does not work properly on client in preinit

#

Is that normal?

unborn ether
#

private _value = _param call (missionNamespace getVariable ["BIS_fnc_storeParamsValues_data", {}]); that's the function part, I suppose that one probably comes in postInit then.

peak plover
#

yeh

#

Okay

#

Default value works 'tho

#

so it's ok

unborn ether
#

Ok you can start TeamViewer

torn juniper
#

is there a way to directly add a magazine onto the weapon if a player has no space for the magazine?

still forum
#

addPrimaryWeaponItem

torn juniper
#

@still forum any way of doing it adding limited ammo back? like addMagazine ARRAY would work

still forum
#

:u

torn juniper
#

:[

#

trying to make a scenario where I read an ammo + mag amount and add it back to a player - want to avoid a method to refill ammo count I guess

#

unit addWeaponItem [weaponName, [itemName, ammoCount, muzzleName]]

#

I can make that work -- Thanks dedmen ๐Ÿ˜„

velvet merlin
queen cargo
#

uhm ... wut?

#

it should be the other way or ... am i missing something?

velvet merlin
#

well BI logic i guess

peak plover
#

Fucking genius ๐Ÿคฆ๐Ÿป

#

What about ACE wind_

subtle ore
#

Time for Nigel to make lifer sailboats work with the wind of the sea

peak plover
#

๐Ÿ˜‚

#

Sea of Thives Arma Life version

subtle ore
#

Heheheh

lone glade
#

don't even need to change the title for it to be relevant ๐Ÿ˜„

inner swallow
#

but don't they have a setting for wind gusts as well?

subtle ore
#

There are wind gusts yeah.

peak plover
#

Uhh

#

nvm

neon snow
#

Is there a way to run script after vehicle is rearmed?

subtle ore
#

Yes

neon snow
#

How?

subtle ore
#

Well how are you rearming? Something you made? BI vehicles?

neon snow
#

I mean, I made a script that is sending data about pylons to config , now it just works in a loop with sleep. I can add this to jet's service menu, aswell as inside init.sqf. However with that approach, the jet will not update its pylon iformation, with other rearming scripts like GOM. I just thought that there is a even handler for rearming or something similiar

meager heart
#

๐Ÿค”

still forum
#

Can you use dialog to reliably detect any case in where the mouse cursor is moveable and could leave the game window if you run windowed?

meager heart
#

with MouseMoving ctrlEH maybe

still forum
#

with a ctrlEH you already know that a dialog is open don't you?
Is there a way to allow mouse movement without opening a dialog that would trigger dialog command?

meager heart
#

with a ctrlEH you already know that a dialog is open don't you?
not dialog that will be added to one of the controls of display...

#

so i think yes, for second part

#

but you will need some extra controls for that...

#

if just check mouse position and was fast movement output is not accurate

still forum
#

Basically need a 100% safe way to check if moving the mouse would not move the cursor. Aka usually move the in-game camera.

tough abyss
#

how can I set bool to true from addAction?

#

if the bool is false I want the player to have an addAction on AI, if it's true the action is removed

#

isOnDelivery = false;

if (!isOnDelivery) then
{
// hint "debug:(isOnDelivery) false";
GetDeliveryJob = delivery_job addAction ["Get Delivery", ""];
};

if (isOnDelivery) then
{
// hint "debug:(isOnDelivery) true";
};

queen cargo
#

@tough abyss check addaction biki Page

still forum
#

addAction has a condition parameter

tough abyss
#

so in that condition I can just do isOnDelivery == true?

still forum
#

No

#

just isOnDelivery

#

It is already a bool

tough abyss
#

so how would I enable it?

#

make it true that is

still forum
#

set the variable to true. Just like you set it to false in your script

#

isOnDelivery = true;

tough abyss
#

in condition field?

still forum
#

what?

#

in condition field you just check isOnDelivery

tough abyss
#

the action isn't showing up

still forum
#

Did you set isOnDelivery to true?

tough abyss
#

isOnDelivery = true

still forum
#

Is that a yes?

tough abyss
#

yes

#

full action

#

GetDeliveryJob = delivery_job addAction ["Get Delivery","", [],1,true,true,"","isOnDelivery = true"];

still forum
#

๐Ÿคฆ

#

To repeat myself
"so in that condition I can just do isOnDelivery == true?"
"No"
"just isOnDelivery"

tough abyss
#

action shows without isOnDelivery but not with it

#

GetDeliveryJob = delivery_job addaction ["Get Delivery","","",1,false,true,"",""]; that works

#

GetDeliveryJob = delivery_job addaction ["Get Delivery","","",1,false,true,"","isOnDelivery"]; that doesn't

still forum
#

And you set the isOnDelivery variable to true? Or to false or did you not define it?

#

You can check it's current value in the debug console

tough abyss
#

it's set to false

#

and i need it to be true when addAction is activated

still forum
#

Then you have to invert the condition using !

tough abyss
#

that works but it's still false

meager heart
#
isOnDelivery = false; 

GetDeliveryJob = delivery_job addAction ["Get Delivery", {isOnDelivery = true;}, [], 1, false, true, "", "!isOnDelivery"];
#

๐Ÿ˜€

tough abyss
#

You're amazing @meager heart โค

meager heart
#

๐Ÿคฆ

dry owl
#

Hello everyone I am having a little problem, I am trying to get all the coords of the 50 Km/h speed sign on altis using this command copyToClipboard str ((nearestobjects [player,["Land_SignRestrict_01_speedLimit_50_F"], 2500000]) apply {getPosWorld _x}); however its not copying anything it just gives me "[]" when I use a building classname instead it works fine

still forum
#

Yes. And what's the problem?

dry owl
#

@still forum just edited the text sorry about that

still forum
#

Are you sure the classname is correct?
If you walk up to a sign and check typeOf cursorTarget or typeOf cursorObject?

dry owl
#

@still forum one sec

#

@still forum its returning empty as in no classname?

still forum
#

Yeah.. That's what I feared. It might be a terrain object

dry owl
#

Then why can I spawn it in though :/

still forum
#

try nearestTerrainObjects with like a 10m radius while standing next to the sign and see if it returns it

#

You can spawn it in because you spawn it as normal object. On the map it's a terrain object though

dry owl
#

[593036: signt_speedlimit50.p3d] @still forum

still forum
#

jup

dry owl
#

so no way to do it then or any other ideas?

still forum
#

That returns the objects. So you can iterate over them and call getWorldPos

#

but you might have to do the filtering by yourself

dry owl
#

okie fuck but I could specify "empty" as its class name is categorized under empty?

#

nearestTerrainObjects [player, [], 5] in the brackets can I not specify what type?

still forum
#

Type yes

#

Not classname or model filename

#

And there is no "SIGN" type

dry owl
#

Okay cool I am getting all terrain objects on altis this might take a while lmao

fossil yew
#

Is it possible to lock a house and make it unenterable with script command?

meager heart
#

_building setVariable ["bis_disabled_Door_1",1,true];

#

_building setVariable ["bis_disabled_Door_228",1,true];

#

...

fossil yew
#

cool, thanks, making it unlocked basically means setting it to 0?

meager heart
#

yep

fossil yew
#

(2nd argument)

#

ok thanks

dry owl
#

@fossil yew or if you placed it double click and you can choose which doors to lock

fossil yew
#

yes, via 3DEN, I know, I was wondering about altering the state later... like owner getting out of his house and locking the doors and then coming back (don't ask why do I need that lol)

dry owl
#

Ahhh okay

indigo snow
#

Do note that not all building support that

fossil yew
#

Yes, I will place the building via 3DEN so I'll pick the one that is ok. Basically I want to make a warehouse that is not enterable for other players, just the guard.

dry owl
#

MP mission or SP?

fossil yew
#

MP

#

other players ๐Ÿ™‚

meager heart
#

also if you need just lock it you can try _building call BIS_fnc_replaceWithSimpleObject;
afaik doors will be locked and closed on simple object...

#

@fossil yew

fossil yew
#

is there a reverse process too?

meager heart
#

no

fossil yew
#

yeah, that's a problem, it has to be unlocked at certain point. But your code above will help.

flat beacon
#

nobody knows if ternary operator exist in sqf ?

still forum
#

No. In SQS yes but not in SQF

flat beacon
#

Thanks

warm gorge
#

Is the default Arma revive system very optimized for use on high pop servers? Or would I be better off making a more simplified one

lone glade
#

in it's current state (stable) no

#

dev branch, that's a whole other thing

warm gorge
#

Yeah I saw the dev changes, just noticed it does a lot of remoteExec's and data handling for all players

#

Which I understand it has to for all the 3D icon stuff it does

halcyon crypt
#

@flat beacon I think you can do private _var = if (_something) then { 1 } else { 2 }; which is close enough I guess ๐Ÿ˜›

austere granite
#

you mean [2, 1] select _something

halcyon crypt
#

grr

sick sorrel
#

noob scripter here .. which file do I execute code in to only initialize it after MP players are in 3D? I'd like to allow them to place map markers during the briefing phase, but once the game starts, ability to place the double click map markers should be disabled / not shared with anyone else

I've gotten the code to work in initPlayerLocal.sqf, but it's already disabled markers during briefing as well

halcyon crypt
#

select has an entirely different context and I don't find it an intuitive way to replace the if / ternary operation with

#

imo ๐Ÿ˜

lone glade
#

wat

halcyon crypt
#

@sick sorrel you'll have to wait until the player object equals player I guess

#

something like waitUntil { player == player };

#

or whatever clever solution the next person comes up with ๐Ÿ˜„

lone glade
#

that's a terrible example

#

because player is always equal to itself

halcyon crypt
#

ehm oops

#

vehicle player == player

lone glade
#

we had a joke about the worst way to do this ๐Ÿ˜„

halcyon crypt
#

hm?

flat beacon
#

@halcyon crypt yes may be it's work, but it's different of _var = (something)?1:2; but thanks ๐Ÿ˜ƒ

austere granite
#

google-fu

halcyon crypt
#

๐Ÿ˜†

austere granite
#

i still think create a trigger to cover the entire map, then sleeping 0.5 sec, then doing thisList and getPlayerUID _x on it and checking if it matches player UID

#

is best

halcyon crypt
#

wouldn't the objectParent one return true during briefing?

lone glade
#

that makes it better

halcyon crypt
#

right this joke thingy is about being in a vehicle or not, not whether we're in briefing or in mission ^^

cedar kindle
#

player in player is my bae

sick sorrel
#

are any of the above meant to work? It's all still very unclear to me tbh

empty blade
#

Is there a way to add a new line in a tooltip?

austere granite
#

\n

strange urchin
#

player in player? Does that do anything special?

still forum
#

Not really. Basically the same as player == vehicle player

strange urchin
#

Figured as much

wary vine
#

I have just ran into an issue with something im working on, wondering if someone could help, Im working on a market system, and just thought of something, if someone lists say "arifle_Katiba_GL_Nstalker_pointer_F" on the market, my system removes all the attachments from the weapon, and stores them in an array, so the attachments gets added to the market along with the weapon , but then when someone buys the item they will be given the weapon and attachments... is there a way of fixing this ?

lone glade
#

get the base weapon

cedar kindle
#

thereโ€™s some BI function for that iirc?

lone glade
#

"yourClass" call bis_fnc_baseWeapon

cedar kindle
#

ah

wary vine
#

hmm

#

that could help xD

#

ty

#

Yes, Thats great thanks โค

#

Just thought people could use it to exploit xD had to fix it xD

still forum
#

A SQF script
or
An SQF script
?

tough abyss
#

An sqf script

still forum
#

An FSM script and An SQS script too?

lone glade
#

hhhhnnnnnnnnnnnnnng

#

huehuehuehue ded

tough abyss
#

@still forum direct objects start with an

#

I played with an sqf script whereas I played with sqf

tough abyss
#
_objects = nearestObjects [_position, [], _radius];```

Trying to find all AI within a radius. According to the WIKI, "Man" only lists dismounted infantry. Is there a class name that will ignore whether they are mounted or not? Or even only list the nearest groups of AI?
austere granite
#

How much AI do you expect to have and what''s your radius going to be?

tough abyss
#

it's 1000m, I expect around 40 units to be found

austere granite
#

Okay

#

(allUnits select { !isPlayer _x }) inAreaArray [_pos, _range, _range, 0, false, _range]

#

Use that instead

tough abyss
#

if I were to search only the leader of the groups that they are in, would sqf _leaders = []; { _groupleader = leader _x; _leaders = pushBackUnique _groupleader; } forEach (allUnits select { !isPlayer _x }) inAreaArray [_pos, _range, _range, 0, false, _range]; suffice?

austere granite
#

((allGroups apply { leader _x }) select { !isPlayer _x }) inAreaArray [_pos, _range, _range, 0, false, _range]

#

Should be faster

tough abyss
#

okay last question, why is ArmA nagging about a missing ; in this statement? ๐Ÿค”

{
     if (_x distance2D _base > 1500) then { 
        exitWith { _module = ["ALIVE_SYS_PROFILE","ALIVE_MIL_OPCOM","ALIVE_AMB_CIV_POPULATION","ALIVE_MIL_LOGISTICS","ALIVE_SYS_AISKILL"] call ALiVE_fnc_unPauseModule; _base_stat = TRUE;}; };
    } forEach playableUnits;```
strange urchin
#

Why are you using then before an exitwith?

tough abyss
#

hm good point

#

If you use an if exitWith, it will evalute the code segment in the exitWith regardless if it executes that branch of code etc

#

Personnal just avoid using if exitWith, not really gonna help with performance enough and chances are you will make a mistake

#
private ["_base","_base_stat","_module"];

_base = getMarkerPos "BLUF_1";

while {true} do {
    _base_stat = FALSE;

    {
     if (_x distance2D _base > 1500) exitWith { 
        _module = ["ALIVE_SYS_PROFILE","ALIVE_MIL_OPCOM","ALIVE_AMB_CIV_POPULATION","ALIVE_MIL_LOGISTICS","ALIVE_SYS_AISKILL"] call ALiVE_fnc_unPauseModule; _base_stat = TRUE; };
    } forEach playableUnits;
    
    if(!_base_stat) then {
        _module = ["ALIVE_SYS_PROFILE","ALIVE_MIL_OPCOM","ALIVE_AMB_CIV_POPULATION","ALIVE_MIL_LOGISTICS","ALIVE_SYS_AISKILL"] call ALiVE_fnc_pauseModule; 
    };
    
    sleep 300;
}; ``` Is there an easier way to escape the script then?
lone glade
#

what the....

tough abyss
#

the formatting got ruined pasting it to Discord

lone glade
#

formatting has nothing to do with my surprise

tough abyss
#

oh

#

it is supposed to check if any player is outside a certain zone and then enable the AliVE modules

#

that's why I used exitWith, because as soon as it's found the first player outside the zone, it won't have to check the rest

tough abyss
#

@lone glade ```sqf
_groupleaders = ((allGroups apply { leader _x }) select { !isPlayer _x }) inAreaArray [_center, _radius, _radius, 0, false, _radius];

        diag_log "Scanning in for BLUFOR progress...";
        diag_log format ["%1 hostile groups found.",count _groupleaders];
        diag_log format ["Position tolerance: %1 m",_posTolerance];``` returns 0 hostile groups found even with an enemy group right in front of me ๐Ÿค”
still forum
#

Uh.. yes...

#

because

#

eh no.. wait.. eh

tough abyss
#

need the entire thing?

still forum
#

you should maybe leave z axis of inAreaArray on default

tough abyss
#
while {true} do{
    { 
        if(side _x == west) then {
            _radius = 1000;
            _center = [(getPos leader _x) select 0, (getPos leader _x) select 1];
            _deleteTime = 120;
            _posTolerance = 5;

            _groupleaders = ((allGroups apply { leader _x }) select { !isPlayer _x }) inAreaArray [_center, _radius, _radius, 0, false, _radius];

            diag_log "Scanning in for BLUFOR progress...";
            diag_log format ["%1 hostile groups found.",count _groupleaders];
            diag_log format ["Position tolerance: %1 m",_posTolerance];

            for "_i" from 0 to (count _groupleaders) - 1 do
            {
                _unit = _groupleaders select _i;
                if ((side _unit != side _x) && (side _unit != civilian)) then
                {
                    _leader = leader _unit;
                    _marker = createMarker [format ["tempMarker_%1",_i], [_leader, _posTolerance, random(360)] call BIS_fnc_relPos];
                    format ["tempMarker_%1",_i] setMarkerType "o_unknown";
                    format ["tempMarker_%1",_i] setMarkerColor "ColorUNKNOWN";
                    format ["tempMarker_%1",_i] setMarkerSize [0.5, 0.5];
                    
                };
                sleep 1;
            };

            diag_log format ["%1 hostile groups found.",count _groupleaders];
            diag_log format ["Position tolerance: %1 m",_posTolerance];
            sleep _deleteTime;

            for "_i" from 0 to (count _groupleaders) - 1 do
            {
                deleteMarker format ["tempMarker_%1",_i];
                sleep 1;
            };
        };
    } forEach AllGroups;
    sleep 150;
};```
#

don't have a Z-axis in there

still forum
#

What?

#

Yes you do.

tough abyss
#

select 0 and select 1 are x and y, aren't they?

still forum
#

Yes

#

and last parameter is z

tough abyss
#

oooh

#

that Z axis

#

will try that

#

-1 right?

still forum
#

default

#

aka leave it out

tough abyss
#

by the way, anyone else seen ACE3 BLUF Tracker markers on (0,0) even though no AI should exist?

quartz coyote
#

Hello, is there a way to set the direction vector of a unit towards another specific unit ?

tough abyss
#

still getting the 18:20:28 "0 hostile groups found." 18:20:28 "Position tolerance: 5 m" after editing the code to remove the Z axis

enemy groups are approx 8m away from player (who is group leader)

#

( @still forum )

still forum
tough abyss
#

am I doing something wrong with the factions or something

quartz coyote
#

@still forum oh great thanks

tough abyss
#

@lone glade / @still forum do you reckon the issue lies with the multiple assignment of _x? In one line it refers to a group if( side _x == west)... and the other to an array element _groupleaders = ((allGroups apply { leader _x }) select { !isPlayer _x }) inAreaArray [_center, _radius, _radius, 0, false];

still forum
#

Dunno

#

Don't think so

#

I don't see another error in that statement

tough abyss
#

even though the diag_log is within the forEach statement

#

shouldn't it display all groups in once go?

#

I see why...

#

it's not working in parallel

#

any solution to make it work in parallel instead of waiting for each group for the next one to be used?