#arma3_scripting

1 messages Ā· Page 343 of 1

little eagle
#

etc.

#

So it seems that you can go exactly one out of bounds without error.

tame portal
#

Lol

little eagle
#

But if you go two out of bounds, it errors.

tame portal
#

Doesn't sound consistent šŸ˜„

little eagle
#

It's not, but it has been like that since forever.

tame portal
#

I mean well, it is, but its kind of stupid

little eagle
#

Yep.

#
[???] param [1]

^ this is why this was made

#

ā¤

tame portal
#

I see, param is your favorite scripting command lol

little eagle
#

It's the solution to everything*
*not actually everything

tame portal
#

There must have been someone at BI thinking "Pun intended hoh"

little eagle
#

I have no idea why "shot parents" is a thing.

#

Sounds so weird.

tame portal
#

I'd name it getProjectileParents at worst

little eagle
#

I wish setShotParents was usable (worked outside of the server)

tame portal
#

Oh it doesnt, wait

#

It doesnt work outside of the server?

little eagle
#

It only works on the server. So for server spawned projectiles... But you can't change fired projectiles reliably, because they might hit before you can remote exec this command to the server.

#

And bullets are local to each client, which is I think why it completely fails for those.

#

So essentially, use this command for called in artillery strikes and nothing else.

#

Disappointment of 2016 this command.

tame portal
#

I was about to say, I don't think theres anything apart from projectiles that fly for a long time where this makes sense

little eagle
#

I think we tried to use it for mines, but there was a problem with those too...

spice kayak
#

@little eagle Thanks for that, I'll give it a try! Might I ask what the origin part of that was for?

little eagle
#

The center of the radius you want to search. Can be object or position

tame portal
#

It is safe to assume that the instigator in case of a player kill is always the actual other unit that killed him?

little eagle
#

No, step on the grenade you dropped.

tame portal
#

Wait, so it's LITERALLY only an object, if someone pulled a trigger?

spice kayak
#

Ah, so player would work. Thank you.

little eagle
#

Yes, player would work.

#

OPTiX ???

tame portal
#

I am confused

little eagle
#

No, it's the same as firer, except if the firer was a vehicle. Then it's the gunner of the weapon of the vehicle

tough abyss
#

@little eagle mines are the biggest bitches i've worked with so far...

little eagle
#

Can't attach variables to CfgAmmo : (

tough abyss
#

one of the best examples of a extremly bad implementation

spice kayak
#

Okay, this is giving me an error, but I feel it's because of my own stupidity and redundency vDestroyedVehicle = (getPos player nearestObjects [player, ["Car","Tank","Plane","Helicopter"], 50] param [0, objNull]);

little eagle
#

nearestObjects is a unary command.

#

You put something on the left side of a unary command -> error

peak plover
#

player nearestObjects [player

spice kayak
#

Yeah, that's why I said redundency.

#

So, would vDestroyedVehicle = nearestObje.... work?

little eagle
#

Yes.

#

On how you use this command.

#

Don't be confused about the similar names. Doesn't mean the syntax is anything like...

spice kayak
#

Right, sorry.

#

Ha, yeah. Thank you.

tame portal
#

Killer kills with gunshot from vehicle with own weapon -> instigator
Killer kills via roadkill -> ?
Killer kills with gunshot -> instigator
Killer kills with grenade -> ?

little eagle
#

firer ... vehicle that owned the weapon
instigator ... person that fired the weapon

#

For roadkills, instigator and firer are both the driver iirc (instigator is null?)

#

firer = vehicle instigator

#

instigator = gunner firer (but only if a weapon on the main turret was used)

tame portal
#

I'm sorry if this was an annoying question, but these names never really made sense to me

little eagle
#

They don't make sense.

tame portal
#

I personally would have expected firer to be the actual unit firing

little eagle
#
firer ... vehicle that owned the weapon
instigator ... person that fired the weapon

^ these are the definitions. Don't worry about what the names imply.

tough abyss
#

did something in RV ever make sense?

grand berry
#

If this is related to event handlers the names make sense?
Firer - vehicle that "fires" the event handler
Instigator - person who instigated the event handler to be fired

tame portal
#

Hm well it kind of does, I would have expected such parameter to be named similar to "TriggerUnit" or something

#

Or triggerObject

peak plover
#

Might make more sense if you know czech.

grand berry
#

^^ This is true, might be a slight translation issue.

tame portal
#

So instigator is finally the great solution to finding a killer that killed someone via a nade

#

Which is great

#

I found it pretty hard to accurately find the instigator prior to this parameter

grand berry
#

Haha are you trying to find a why to shame people that forget G isn't gear any more?

tame portal
#

( ͔° ĶœŹ– ͔°)

little eagle
#

The instigator can be determined by using the weapon and then iterating through all weapons of the vehicle, thereby finding the turrent and then getting the turretUnit of the turret and vehicle.

#

The requirement for this is, that the vehicle does not use multiple turrets with the same weapon class. But that is extremely unlikely because the weapon muzzle effects are defined in the weapons class.

#

So unless you have two weapons that use the same muzzle, you will have unique weapon classes on all turrets

#

Example is that bluefor transport heli with the two gatling guns.

#

They are exactly the same, but one inherits from the other to switch the muzzle name for the firing effect.

#

It's not that hard, but clumsy and now no longer needed

tight moat
#

Given an object how would I go by creating another object at the exact same position, rotation etc. as the old object?

#

Currently using setPos, setVectorUp, and setDir and that order but that does not place the new object at the exact position of the old one

#

Instead resulting in the new object being placed several meters away from the old one

still forum
#

setPosASL setVectorDirAndUp

tight moat
#

That does not do it

#

New object has the correct rotation and stuff, but is in a wrong position, 2.5 meters away from the original

still forum
#

are you using getPosASL and setPosASL?

#

or just getPos/setPos

tight moat
#

_new = "Land_i_House_Small_02_V2_F" createVehicle getPosASL _target;
_new setVectorDirAndUp [vectorDir _target, vectorUp _target];

still forum
#

you are not setPos'ing

tight moat
#

setPos after createVehicle gets closer, but still 30cm off the original

still forum
#

For me setPosASL has always been exact..

indigo snow
#

which direction are you 30cm off in? height?

#

Possibly setPos again after the rotation business

#

or only do it after

tight moat
#

Height is spot on, x,y is off by 25cm

indigo snow
#

yea that might be caused by changing the normalvector, iirc the position family of commands work off of the contact surface which would move if you change the normal vector

#

so create, setvectordirandup, setposasl

tight moat
#

Yeah that works, spot on

#

Thanks for the help

warm gorge
#

Noticed a few weapon camo selection changes made in the dev changelog, how do you actually apply this?

#

I assume with setObjectTexture/Global but havent tried it before

tough abyss
#

Is the structuredText for cutText actually working this patch?
cutText ["<t color='#ff0000' size='5'>RED ALERT!</t><br/>***********", "PLAIN", -1, true, true];
tried that and no text

indigo snow
#

@warm gorge theyre just weapon variants like the MX, MX black and MX green

#

Weapons cant be targeted with texturing commands

warm gorge
#

Ah I see, so would that mean that this 'Added: Camo selections to all weapons which were missing them' would meann that all the variants would be put in for all weapons then?

#

Cause I nkow that there are a few missing variants

indigo snow
#

It generally means weapons can be retextured with a mod

#

E.g. if an object doesnt have a hiddenSelections it cant be retextured

warm gorge
#

So what do the hiddenSelections of weapons mean? For example, I just opened up a config of the Mk-18, and it has 2 hidden selections

#

Nevermind I understand now

little eagle
#

You can make a mod where you can change the texture via config instead of having to change the model. If anyone was wondering.

grand berry
#

Any reason why this wouldn't work as a condition statement?
(assignedVehicleRole player select 1) != 0

peak plover
#

why != 0?

subtle ore
#

Doesnt look like it returns any numbers.

peak plover
#

!= [] might work

grand berry
#

Fixed it, second value of array is another array.

subtle ore
#

What did you change?

grand berry
#

(assignedVehicleRole player select 1 select 0) != 0

subtle ore
#

That still doesnt make sense. Doesnt return any objects unless you are counting them

peak plover
#

turret path

grand berry
#

assignedVehicleRole player returns -
["cargo",[0]]

#

so it would be the second array

subtle ore
#

Oooohh...

peak plover
#

It might return

["Driver"] - Assigned as driver

subtle ore
#

Why wouldn't it just return nil instead of 0

grand berry
#

Becuase ["cargo",[0]] signifies the first FFV slot, normal cargo positions are all returned as ["cargo"]

subtle ore
#

Ohh...so they are cargo positions.

grand berry
#

Special ones - you can't access them using the getCargoIndex command hence the above workaround.

subtle ore
#

Interesting. I will keep that on the back burner then. Neat workaround

grand berry
#

Cheers, thanks for the help. Things become clearer when you discuss.

subtle ore
#

Indeed.

grand berry
#

Turns out that doesn't work anyway - can't use as a condition as if you are in any other slot except the FFV ones you get no result which seems to default to false. I wish BI hadn't used Cargo again for FFV.

little eagle
#

What are you doing?

grand berry
#

It's a condition for an action in the new vans - making them show up when in certain positions in the van. I need the action not to show when the player is in a specific FFV slot.

little eagle
#
cameraOn getCargoIndex player != 2
#

???

#
cameraOn turretUnit [1] != player
grand berry
#

FFS i could swear getCargoIndex didn't work for FFV slots.

little eagle
#

alternative

grand berry
#

My bad - thanks.

little eagle
#

It does iirc. If not use the alternative.

grand berry
#

Yea it does, cheers. Commy to the resuce as always šŸ‘Œ

little eagle
#

huh

#

I swear someone asked for this. Am I going insane?

tough abyss
#

How do I iterate through all pylons?

#

I guess I could go through like 50 indexes.

little eagle
#
private _allPylons = "true" configClasses (configFile >> "CfgVehicles" >> typeOf _plane >> "Components" >> "TransportPylonsComponent" >> "pylons") apply {configName _x};
tough abyss
#

Would this also work? ```SQF
{
(vehicle player) setAmmoOnPylon [_x, 10000];
} forEach [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];

little eagle
#

for the first ten, yeah

tough abyss
#

What's the max amount of pylons on a vehicle?

little eagle
#
for "_x" from 0 to (count (configFile >> "CfgVehicles" >> typeOf _plane >> "Components" >> "TransportPylonsComponent" >> "pylons") - 1) do {

};
tough abyss
#

Thanks.

little eagle
#

oops

#

edited

#

This is all under the condition that you can't inherit and add new ones in one class. Which is how it works for turrets.

tough abyss
#

Can I do isKindOf "PLANE" so it works for all planes?

#

Wait it needs an obj.

#

Hmm.

little eagle
#

Of course it needs an object. setAmmoOnPylon does too and each plane has a different amount of pylons.

#

Each class of plane.

warm spade
#

Does anyone know how to create the effect used in the laws of war campaign to start a memory? To be more clear i mean the "bubble effect" around some objects

little eagle
#

Open the mission and find out?

warm spade
#

that's possible? i going to do that. i thought the files are encrypted until official release

rotund cypress
#

Dougemm made a tool @warm spade

indigo snow
#

Dont mention illegal tools on here

warm spade
#

@hasty violet thats exactly what i searched for, thank you.

little eagle
#

Yes, they are not.

#

Yes.

#

Well, no

#
allMissionObjects "WeaponHolder" + allMissionObjects "WeaponHolderSimulated"

@tough abyss this ^ is what you need

#

They are different classes not inheriting from another

#

allMissionObjects does pick them up though.

#

["WeaponHolderSimulated","ThingX","Thing","All"]

#

["WeaponHolder", "ReammoBox","Strategic","Building","Static","All"]

rotund cypress
#

@indigo snow the tool itself is not illegal...

dusk barn
#

Hey could someone teach me how to mod Arma 3 please?

rancid ruin
#

look at other people's mods and see how they did it

dusk barn
#

I tried there is nothing I can use in them

rancid ruin
#

what do you want to make?

dusk barn
#

Its a bug from starship troopers called Tiger,

rancid ruin
#

do you have the model already?

dusk barn
#

Yes and the textures

rancid ruin
#

you made them?

dusk barn
#

a friend

rancid ruin
#

😱

dusk barn
#

?

subtle ore
#

Yes there are many things you can compare. Configuration? Structure?

dusk barn
#

the main problem I am having is with the animations, they need to be a specific file, but you need a model config and this other file that I have no clue how to do them

subtle ore
#

That is something you can learn from other mods

#

Any mods with models have a model.cfg

#

And any of them that have animations have the rtm configurations

dusk barn
#

but would you just edit it?

#

I can only find stuff for vehicals and none for NPCs

indigo snow
#

not a lot of people do it, but there are a few

#

If youre polite about it, Mondkalb might be able to give you some pointers

dusk barn
#

should I PM him?

indigo snow
#

He's fairly active over there

#

I'd ask in the animations channel if i were you

dusk barn
#

ok thanks

peak plover
#
_var = [blu001,"saved_variable",nil] call seed_fnc_getVarsTarget;

I made a script that checks for saved varaibles and it allows for default value, but if I use NIL

#

It seems to throw an error...

#

How bad is this in terms of functions like this?

indigo snow
#

explicit nil values are really only allowed in scheduled, iirc

#

ideally youd just not provide a third entry in your array

peak plover
#

Should I worry about fixing that, or is it fine to leave stuff like this up to the user (can't use nil)

indigo snow
#

Wel i mean it throws an error :P

peak plover
#

I'm just contemplating, wether this would be real issue or a overthinking issue

indigo snow
#

Overthinking

peak plover
#

Thanks ā¤

peak plover
#

Hmm, who was doing the new inventory?

#
/*--------------------------------------------------------------------------------------------------

    Author: Jiri Wainar

    Description:
    Returns array with classname of the plain weapon (without attachments), followed by classnames of all its attachments.

    Example:
    ["arifle_mx_f","optic_aco","acc_pointer_ir"] = "arifle_mx_aco_pointer_f" call BIS_fnc_weaponComponents;

    Remarks:
    * Classnames returned are converted all to lowercase.

--------------------------------------------------------------------------------------------------*/
#

BIS_fnc_weaponComponents

subtle ore
#

@peak plover this was added in dev?

peak plover
#

Im on stable, just found it in the functions

subtle ore
#

Oohh..i was going to say, thought i had seen that before. Wasn't sure.

peak plover
#

Date on it is 26 april

#

I keep not finding action menu

#

I want to move it to the left ( can't edit in in-game hud editor )

#

Build the mission in a way in which it can be saved

#

Yes there are many ways

subtle ore
#

Best to use server profile or db i guess.

peak plover
#

How do I clear my debug console? accidentally put a code into check and it is bad:D

tough abyss
#

@peak plover its stored in some profile. just switch profiles

#

or figure out wher ein the profile

#

anyone know why GetInMan EH (when spawned on player) works in SP but when i try MP it doesnt?

#

nvm

#

locality issue

#

:<

still forum
#

@cptnnick#7051 explicit nil values are really only allowed in scheduled, iirc unscheduled*
@peak plover _var = [blu001,"saved_variable",nil] call seed_fnc_getVarsTarget; isn't that just OBJECT getVariable ARRAY?

#

@peak plover I guess it's saved in a variable in profileNamespace ĀÆ_(惄)_/ĀÆ

#

You mean retrieve it via script? yes

#

They are just variables in uiNamespace

queen cargo
#

*profileNamespace

still forum
#

(profilenamespace getVariable ['IGUI_TEXT_RGB_R',0])
(profilenamespace getVariable ['IGUI_TEXT_RGB_G',0])
(profilenamespace getVariable ['IGUI_TEXT_RGB_B',0])
is the textcolor for example

little eagle
#

You can use nil in scheduled and unscheduled.

#

What you can't do in scheduled environment is:

  • use a undefined variable / a variable with value nil (same thing)
  • assign CONTROL or DISPLAY to a variable including _this, _x etc. indirectly by using call, spawn, forEach etc. (ARRAY holding CONTROL, DISPLAY are fine) unless you use disableSerialization; first, which is not possible when using the indirect method spawn.
tough abyss
#

Is there a way to find a pylon's max ammo capacity?

little eagle
#

Sure.

peak plover
#

@still forum
it's overly complicated

// Code begins
params ["_target",["_requested",nil],["_expected",nil]];
// Set ownername for request variable
private _ownerName = "";
private _owner = "";
// If we are on a server it's going to be server
if (isServer) then {
    _ownerName = "server";
} else {
    // If we are not a server, get player name instead
    _ownerName = name player;
};
// Create variable which will be used to send the information to us :)
private _requestVar = format ["seedVarsRequest_%1_%2",_ownerName,ceil random 10000];
// Delete the variable from everyone to make sure it's not used
missionNamespace setVariable [_requestVar,nil,true];
// remoteExec the getVarsSend on target
[[_requestVar],[_requested,_expected]] remoteExec ["seed_fnc_getVarsReturn",_target];
// Wait for response
waitUntil {
    private _checkVar = missionNamespace getVariable [_requestVar,nil];

    !isNil {_checkVar}
};
// Get the result
private _result = missionNamespace getVariable [_requestVar];
systemChat str _result;
// Delete the variable from network
missionNamespace setVariable [_requestVar,nil,true];
// finish with the result
_result
#

It's used to grab a varaible from profile namespace of remote clients

little eagle
#

// Code begins
lol

still forum
#

squint

#

Tooo.. much.. comment

little eagle
#

Anyone agrees with me that you should put an empty line before the code blocks / comments?

still forum
#

Too.. few.. comment consistency

peak plover
#

I will forget about this in a few months, I need to be able to fix it even in 6 months

little eagle
#
missionNamespace getVariable [_requestVar,nil];

šŸ¤”

still forum
#
// If we are on a server it's going to be server
if (isServer) then {
    _ownerName = "server";
} else {
    // If we are not a server, get player name instead
    _ownerName = name player;
};

These comments both apply to the the same thing.. setting _ownerName. Why is one inside the if scope and one outside? Shouldn't both be inside and indented?

#

default value of nil doesn't make any sense because nil is already default

peak plover
#

Alright, tanks for the feedback, I must admit, new to comments

still forum
#

Instead of having a receive variable and waiting for response. The client could just remoteExec the response back and execute your code that way.. Because this way. If the client doesn't answer your waitUntil loops indefinetly

little eagle
#
params ["_target", "_requested", "_expected"];

// Set ownername for request variable
private _ownerName = "server";

// If we are not a server, get player name instead
if (!isServer) then {
    _ownerName = name player;
};

// Create variable which will be used to send the information to us :)
private _requestVar = format ["seedVarsRequest_%1_%2", _ownerName, ceil random 10000];

// Delete the variable from everyone to make sure it's not used
missionNamespace setVariable [_requestVar, nil, true];

// remoteExec the getVarsSend on target
[[_requestVar], [_requested, _expected]] remoteExec ["seed_fnc_getVarsReturn", _target];

// Wait for response
waitUntil {
    !isNil {missionNamespace getVariable _requestVar};
};

private _result = missionNamespace getVariable _requestVar;
systemChat str _result;

// Delete the variable from network
missionNamespace setVariable [_requestVar, nil, true];

_result
peak plover
#

Hmm, so a fallback to whenever something goes wrong so loop is exited

little eagle
#

Does this look better?

still forum
#

How about


// Wait for response
private _result = nil; //Does this work? Is the variable still privated to here although nil?
waitUntil {
    !isNil {_result = missionNamespace getVariable _requestVar};
};

systemChat str _result;
little eagle
#

Yeah. This should be safe. Forgot about scheduled risks.

#

Well, the syntax is a bit wrong

#
// Wait for response
private "_result";

waitUntil {
    _result = missionNamespace getVariable _requestVar;
    !isNil "_result"
};

systemChat str _result;
still forum
#

Oh yeah.. šŸ˜„ That's a bit cleaner.

little eagle
#

Yours will loop forever.

still forum
#

ouh.

#

true.

#

Too much c++ to few sqf lately

little eagle
#

Yeah^^

#
_result = 1;
private "_result";
isNil "_result" // false
_result = 1; 
private _result = nil; 
isNil "_result" // true
#

Still not needed if you don't use the variable in the same script though.

_result = 1;

call {
    private "_result";
    isNil "_result" // true
}
still forum
#

a uninitialized variable is not nil?

#

What is in _result on your first example?

little eagle
#

There is no initialization in SQF. private sets the variables home scope.

#

What is in _result on your first example?
Nothing.

still forum
#

But nothing should be true on isNil shouldn't it?

peak plover
#

private _result = nil; == private "_result";_result = nil;

little eagle
#

I was just pointing out a small difference between private STRING and private var = nil;.

#

The waitUntil should have a timeout.

tough abyss
#

@little eagle: can I get a clue?

peak plover
#

True, I guess if it does not recieve it's data in a second, it's not coming

little eagle
#

Pylon ammo?

still forum
#

Or just take my solution of the client just remoteExec'ing back. Then you don't even need a waitUntil and don't have to worry about timeouts

tough abyss
#

Yes.

little eagle
#

PylonRack_1Rnd_Missile_AA_04_F

#

That is one round.

#

1

#

???

peak plover
#

This function is to be used in other scripts. I

tough abyss
#

Thanks.

peak plover
#

I'd have to wait somewhere, why not here

little eagle
#

PylonRack_7Rnd_Rocket_04_HE_F

#

And that is seven rounds.

#

Was this what you needed?

tough abyss
#

Sorta.

still forum
#

@peak plover oops.. forgot that you return the result šŸ˜„

little eagle
#

Those are just magazines. You can get the ammo count like with any other magazine.

#
getNumber (configfile >> "CfgMagazines" >> _pylonMag >> "count")
peak plover
#

My only hope is that this won't cause traffic when used on client that is the owner of _target

#

Anyway great many thanks for the pointers and the lesson on comments

still forum
#

You could just add a check if he is the owner. Just to be extra safe

tough abyss
#

I was thinking ```SQF
_pylon = getText (configfile >> "CfgVehicles" >> "B_Plane_CAS_01_dynamicLoadout_F" >> "Components" >> "TransportPylonsComponent" >> "Pylons" >> "Pylons9" >> "attachment");
_splitPylon = pylon splitString "";
_cfgRndCount = _splitPylon select 1;
_rndCountArr = _cfgRndCount splitString "R";
_rndCount = _rndCountArr select 0;

still forum
#

@tough abyss There is no guarantee that the classname contains the number of rounds

tough abyss
#

Ahh bollocks!

still forum
#

use commy's method. it works

little eagle
#

^ generally good advice.

tough abyss
#

Ok.

peak plover
#

You could just add a check if he is the owner. Just to be extra safe
Wouldn't that require server since owner does not work on clients?

still forum
#

owner does not work on clients?

#

if (local _target) exitWith {missionNamespace getVariable _requestVar}

little eagle
#

Yes, owner does not work on dedicated clients

peak plover
#

Ohh, ok. I always figured some form of local exists in remoteExec, but never hurts to be srue

peak plover
#

can #include use a macro?

still forum
#

no

peak plover
#

🤦

still forum
#

#includes are resolved at preprocess. Macros are resolved at preprocess

#

Includes come first tho. as otherwise it wouldn't know how to resolve the macros that were defined in included files

peak plover
#

ughh... What's the difference of using cfgFunctions and preProcessFileLineNumbers

still forum
#

Whats the difference between an apple and a horse?

peak plover
#

Can I use #include in cfgFunctions?

still forum
#

cfgFunctions is a class

#

yes you can use #include in configs

peak plover
#

#define and MACROS too

still forum
#

..

#

you can use preprocessor commands.

#

#include and #define are both preprocessor commands

#

There is no place where only one of them works

indigo snow
#

If its a textfile you can use preprocessor commands

#

Maybe thats a good generalization

peak plover
#

If I use #include inside a #include, it does not compute

still forum
#

it does. CBA and ACE do that in every function

peak plover
#

or broken path...

still forum
#

broken path probably

peak plover
#

what's the correct path to plugins\settings\ ?

#

inside mission?

still forum
#

depends where your file that #include's is

peak plover
#

inside plugins\settings\

#

But I need the full path

still forum
#

then the path is ""

#

why?

peak plover
#

So I can use it in plugins\seed\ later

still forum
#

..\seed\

peak plover
#

So pretty much use .. to go back and that's it?

still forum
#

you can

peak plover
#

Sure it'll do

#

Well, thanks a lot. Was giving me a major headache

still forum
peak plover
#

I've done that, I just always thought that "plugins\settings" was going to be the right path

peak plover
#

Something I still can't understand

#

#define PLUGIN_PATHFILE(var2) plugins\##PLUGIN\files\##var2

#

How on earth does this return a string?

indigo snow
#

it doesnt

#

but arma can interpret it as a string in config

peak plover
#

Ahh, thanks

#

See the preprocessor wiki pages didn't tell me this 😦

indigo snow
#

it wouldnt

#

its a config glitch

peak plover
#

Does that mean I should not do it?

indigo snow
#

best practice ā„¢ would be to wrap that in a QUOTE() macro

#

but arma can interpret

class A {
    text = sometext:
};

text as a string

peak plover
#

#define PLUGIN_PATHFILE(var2) QUOTE(plugins##PLUGIN\files##var2)

#

Like this?

indigo snow
#

sure

peak plover
#

it does not process ## if I do that...

still forum
#

#define QPLUGIN_PATHFILE(var2) QUOTE(PLUGIN_PATHFILE(var2))

indigo snow
#

you can only use # (quote) on a completed macro iirc

#

think its a left-to-right reading thing

peak plover
#

Ohh, I'm starting to get it now thanks

grand berry
#

Any reason this wouldn't work as a condition?
!((this getCargoIndex player) in [0,3,4])

indigo snow
#

Where is this a condition?

#

What is this?

still forum
#

trigger. obviously

#

but in a trigger this is not a vehicle where a player could sit in

indigo snow
#

Might be a waypoint, then this is the groupleader

grand berry
#

Sorry not a trigger - it's in the condition statement for Class userActions.

#
class open_driver_door: door_action {
    userActionID = 53;
    displayName = "Open Driver Door";
    available = 1;
    condition = "(this animationPhase 'Door_LF' == 0) && ((player distance2D (this modelToWorld [-1,2.2,-1])) < 2) && (!((this getCargoIndex player) in [0,3,4]))";
    statement = "this animateDoor ['Door_LF', 1,false];";
};```
indigo snow
#

Mhm, looks syntactically correct. Do you get an error or does the condition not activate when you add that to the condition?

grand berry
#

No error but doesn't seem to activate when true.

indigo snow
#

Does it work without that bit but with the rest? Does it activate in other seats? If you check it in the debug menu with this substituted for the vehicle, does it return true?

grand berry
#

Yep returns true with the debug and works fine without it.

#

I think it might be the diag config merge. Let me rebuild the whole pbo and see if that fixes it.

indigo snow
#

Mmmaybe.

grand berry
#

Yep that seemed to fix it. Weird.

indigo snow
#

the actions might be compiled wierd that they dont update with a merge

grand berry
#

Yea that seems the most likely explanation.

hollow niche
#

Hey guys, is there any chance to fix the distancesounds for sirens on Police or Medics ( vehicels )... since maldren its bugged, anyone know? or any hotfix o_o

peak plover
#

dynasound?

indigo snow
#

sirens?

hollow niche
#

soundfiles for siren or horn

#

The problem is to change the sound so you can hear it from far away.

#

its like 60meters and then it just disappear for everyone

grand berry
#

Is there a way to read JSON data into game? I'm using extdb for SQL but looking at a new project that would use Firebase as a backend so need to be able to read JSON data.

still forum
#

write your own Extension or use Intercept

#

you could also enable filePatching and write the data to a textfile and read it using.. readFile? Dunno what the script command is called

indigo snow
#

loadFile, preprocessFile and preprocessFileLineNumbers

brazen sparrow
#

are u intending to use firebase to store "map/player/vehicle" data?

grand berry
#

Firebase will serve the web side of the app and also serve as the DB. @brazen sparrow yes essentially - it's a PMC based gamemode/ server where you can create a crew/ company and accept jobs, buy new equipment etc

#

Web interface to allow gear purchases and contract acceptance. Vehicle setups etc.

peak plover
#

I know somone else doing a similar thing, great idea...

subtle ore
#

@grand berry Sneak previews anytime soon? šŸ˜‰

grand berry
#

I wish - i'm in concept phase right now. Might just do the full UI mockup first.

subtle ore
#

Awesome

storm sierra
#

hey, I made a picture, converted it to PAA (using the correct tools yes) and I got it on my mission, put it in a dialog.hpp file, included it and set style to 2096, and put the picture in text="" but when I run cutRSC to load it, it is just a black square, no picture at all, any ideas?

subtle ore
#

Is the path correct?

storm sierra
#

should be, the paa is in my "data" folder so path is text="data\PZH.paa";

compact maple
#

Hello guys, what is the most efficient system to display images on an object in game. Directly create a new PBO with the concerned image OR simply apply a texture in the init of the object in the mission.sqm. Thanks.

subtle ore
#

@compact maple depends on if you are making a mod or a mission. If you are making a mission that doesn't require a mod dependency then don't make a mod for it

compact maple
#

@subtle ore Its actually for a life server. So there is already a lot of thing in the mission, my question is, whats the better way between using init or pbos

subtle ore
#

Unless you are placing this texture on a custom model there shouldn't be any performance difference at.all

compact maple
#

Its actually on a big sign (id like to place pub on it)

austere granite
#

anyone happen to have on hand what the IDD/IDC for the Zeus map control is?

#

Also whether there are any eventhandlers/scripted events whenever it gets shown/hidden

subtle ore
#

@austere granite to find a display : findDisplay yourIDC returns a boolean. Look in the config viewer for the zues rsc stuff. Should be all the way towards the bottom

#

Not a boolean

#

It returns the display

#

!isNull findDisplay 12 will check to see if main player map is open

still forum
#

He asked what the IDC is so he can access it. And you are telling him how to find a display using it's IDC. Completly didn't answer the question

subtle ore
#

@still forum i answered in part. Read the question again.

austere granite
#

nvm

austere granite
#

findDisplay 312 displayCtrl 50

#

is the one

subtle ore
#

There you go

austere granite
#

and there's no "real" event handler, so using a scripted one to check if isNill

#

was just hoping for a proper one

#

isNull*

subtle ore
#

No there is no "real" one.

#

Hopefully you get whatever you need working

austere granite
#

yea all good

still forum
#

you can insert one into the config if you can go mod

subtle ore
#

^

austere granite
#

yea too lazy for that right now, it's purely for debugging purposes anyway so doesn't need to be clean

still forum
#

Or try out the Map eventhandler and check in there

austere granite
#

All good, thanks anyway

subtle ore
#

Are the map and the zeus map different displays or are they considered to be the same? Zeus map shows clickable entities overlaying the map

austere granite
#

Different ones

subtle ore
#

Gotcha

austere granite
#

Also the map never actually closes

#

So if you have (ctrl)addEventHandlers on the map, they will stay if you open and close tha map

#

Gotta check if Zeus has similar behaviour, but I'm expecting a no

subtle ore
#

Interesting, thanks for that. Didn't lnow that tid bit.

misty gulch
#

What language do you use for arma 3 scripting

indigo snow
#

sqf

misty gulch
#

never heard of it

#

😦

indigo snow
#

its specific to arma

steep gazelle
#

Any way to remove turret on Marshall/Marid/Gorgon?

indigo snow
#

Yes, there are special animations to hide them

#

Pseudocode would be this animate ["hideTurret",1,true]

#

Youd have to look up the animation name in config

steep gazelle
#

That should do it, thanks.

indigo snow
#

Youll have to lock it too, so noone can get in it

#

The above just makes it invisible

steep gazelle
#

And the second question: Is there any way to make Gunner seat not crewable?

#

or delete the ammo.

indigo snow
#

You can lock the turret with lockTurret, remove the magazines in the turret and remove the weapons in the turret

subtle ore
#

is it possible to select the player object from the server?

#

I'm trying to handle connections to the server - > Reload positions, etc. Except that I am not sure I can use setPos without having the player object.

tame portal
#

Whats the reason drawTriangle isn't in stable yet?

#

I felt slightly retarded when I read "dev 1.73" and I expected it to be in 1.74 šŸ˜›

tough abyss
#

lol i thought drawTriangles was like primatives or something

tame portal
#

Ahhh

#

Okay, sorry missed out on a lot

still forum
ionic anchor
#

i am trying to make script to open the side doors for the vans in the upcomong dlc on an altis life server

so far i have

private [ "_state" ];
_state = ( _this select 0 ) doorPhase "door_source_3ā€;
if ( _state == 0 ) then {
    ( _this select 0 ) animateDoor ["Door_source_3ā€, 1, false];
} else {
    ( _this select 0 ) animateDoor ["Door_source_3ā€, 0, false];
};
}; ```
#

will i have to define it in class Actions and call to a function?

#

im very new to coding/scripting so just trying my best 😃

still forum
#

If you want to have it in a config for all Van's then yes.
also

private [ "_state" ];
_state = ( _this select 0 ) doorPhase "door_source_3ā€;

can be replaced by

private _state = ( _this select 0 ) doorPhase "door_source_3ā€;
ionic anchor
#

on the vans their is source 3 and 4 will i have to do seperate functions for side door and rear door?

still forum
#

yes. Except if you always want to operate both with one action

ionic anchor
#

makes sense, tyvm for your help @still forum

still forum
#

You can make one function and just pass the source name to the function as parameter

tough abyss
#

@little eagle SQF getNumber (configfile >> "CfgMagazines" >> _pylonMag >> "count") _pylonMag is classname, not "pylonN", right?

little eagle
#

No.

tough abyss
#

Then?

little eagle
#

PylonRack_7Rnd_Rocket_04_HE_F e.g.

tough abyss
#

Ah, ok.

little eagle
#

The ammo doesn't depend on the pylon slot, it depends on the pylons magazine.

tough abyss
#

It looks stupid but I think it might work ```SQF
_vehicle = vehicle player;

if (_vehicle isKindOf "Plane") then {
for "_i" from 0 to (count (configFile >> "CfgVehicles" >> typeOf _vehicle >> "Components" >> "TransportPylonsComponent" >> "pylons") - 1) do {
_vehicle setAmmoOnPylon [_i, getNumber (configfile >> "CfgMagazines" >> getText (configfile >> "CfgVehicles" >> typeOf _vehicle >> "Components" >> "TransportPylonsComponent" >> "Pylons" >> ("Pylons" + str _i) >> "attachment") >> "count")];
};
};

still forum
#

squint maybe..

little eagle
#
private _vehicle = cameraOn;

if (_vehicle isKindOf "Plane") then {
    private _allPylons = "true" configClasses (configfile >> "CfgVehicles" >> typeOf _vehicle >> "Components" >> "TransportPylonsComponent" >> "Pylons");

    {
        private _ammo = getNumber (configfile >> "CfgMagazines" >> getText (_x >> "attachment") >> "count");
        _vehicle setAmmoOnPylon [_forEachIndex, _ammo];
    } forEach _allPylons;
};
tough abyss
#

But it worked 😦

little eagle
#

I really doubt pylons have to be named "PylonsX"

tough abyss
#

They're named pylonsN in the config.

little eagle
#

("Pylons" + str _i)

tough abyss
#

Well yeah, "Pylons" + "1" = "Pylons1".

little eagle
#

But as far as I can tell, the name could be anything. And my code doesn't care about the name. It just deals with CONFIG not classnames

#

idk if the position in the array corresponds with the index in setAmmoOnPylon though.

#

There is a priority entry too.

#
_vehicle = vehicle player;

if (_vehicle isKindOf "Plane") then {

    {
        private _ammo = getNumber (configfile >> "CfgMagazines" >> _x >> "count");
        _vehicle setAmmoOnPylon [_forEachIndex, _ammo];
    } forEach getPylonMagazines _vehicle;
};
#

this?

tough abyss
#

Hmm, I guess. Thank you.

little eagle
#

Instead of _forEachIndex you can use _x I think.

#

The wiki says it works with names and indices.

#

Eh, no. Those are the mags.

warm gorge
#

Anyone know how FPS friendly the draw commands (eg drawIcon) are with the Draw event handler for maps?

peak plover
#

i don't think you can cause fps drops on the map...

still forum
#

You can cause fps drops everywhere... Question just is "does it matter?"

peak plover
#

Exactly ^

#

*I don't think FPS matters on the map...

#

Other than the bug on zeus when you zoom in and game freezes

warm gorge
#

Yeah fair enough, just read somewhere on the wiki to be careful with using the draw commands. But considering Draw only runs when the map is opened, shouldnt be too bad

tough abyss
#

@little eagle: your code doesn't work as expected, the amount of ammo doesn't correspond to the max capacity.

#

Running the code in a Wipeout with the default loadout results in - 8 Falchions, 3 Shriekers HE, 8 Macers, 6 GBU-12s and 1 Shrieker AP.

#

Actual loadout is - 2, 7, 6, 4, 7.

little eagle
#

You mean the last one?

#

The one with getPylonMagazines?

tough abyss
#

Yes.

little eagle
#

["PylonRack_1Rnd_Missile_AA_04_F","PylonRack_7Rnd_Rocket_04_HE_F","PylonRack_3Rnd_Missile_AGM_02_F","PylonMissile_1Rnd_Bomb_04_F","PylonMissile_1Rnd_Bomb_04_F","PylonMissile_1Rnd_Bomb_04_F","PylonMissile_1Rnd_Bomb_04_F","PylonRack_3Rnd_Missile_AGM_02_F","PylonRack_7Rnd_Rocket_04_AP_F","PylonRack_1Rnd_Missile_AA_04_F"]

#

1,7,3,1,1,1,1,3,7,1

tough abyss
#

Well the aircraft ends up with 0 Falchions on the left side, and 8 on the other šŸ˜•

little eagle
#

Hmm, I wonder why that is.

#

getNumber (configfile >> "CfgMagazines" >> "PylonRack_1Rnd_Missile_AA_04_F" >> "count")
1

#

getNumber (configfile >> "CfgMagazines" >> "PylonRack_7Rnd_Rocket_04_HE_F" >> "count")
7

#

those work as expected

#

lol, the pylons indices are 1-10 and not 0-9

#

🤦

tough abyss
#

Yeah they start at 1 in the config.

little eagle
#

That is not how you count with computers.

tough abyss
#

Yep, arrays start at 0.

#

Well Lua starts with 1

#

And everything else for that matter.

#

As array index

#

@tough abyss: Lua, among other languages.

little eagle
#

The goal is to rearm it the same as would be as default?

tough abyss
#

Yes.

little eagle
#
cameraOn setVehicleAmmo 1;
tough abyss
#

As if we're doing ```SQF
{
_vehicle setAmmo [_x, 1000000];
};

#

Uh, so setVehicleAmmo works, but setAmmo doesn't?

#

Interesting.

little eagle
#

setAmmo always only worked with the main turrets weapons, so nothing new.

#

Heh, I made it a one liner.

tough abyss
#

Like you always do 😃

#

Why cameraOn and not vehicle player?

little eagle
#

lazy

#

y rite mny wrds?

#

c-tab auto-completes it correctly

tough abyss
#

C-Tab?

little eagle
#

C key and then Tabulator key

#

Tab key is for auto complete.

tough abyss
#

Yeah I know that.

#

In which program doesn't it auto-complete?

little eagle
#

Dunno, I mean the debug console in Arma

tough abyss
#

Ohh.

#

This only goes to show that BIS devs are lazy.

little eagle
#

cameraOn is essentially the short hand for vehicle player.

tough abyss
#

But is it faster šŸ¤”

little eagle
#

Probably, since it's one command less. Not that it matters all that much.

peak plover
#

The new panels that came with jets DLC

#

What's their IDD/IDC for changing size?

tough abyss
#

(Darn it, I can't react with šŸ‡µ šŸ‡¦ šŸ‡· šŸ…° šŸ‡²)

peak plover
#

The image is scaled wrongly if the new panels used for pip (vanilla)

little eagle
#

IDD_CUSTOMINFO_MINEDETECT

#

?

tough abyss
#

MINEDETECT for a jet's HUD?

#

Thanks baby šŸ˜‰

little eagle
#

I wield the power to add reaction faces.

peak plover
#

I don't have dev build

#define IDD_CUSTOM_ARCADE 25

#

Would this be it?

#

#define IDD_CUSTOMINFO_FEEDDRIVER 316

#

ahha

little eagle
#

Why not
#include "\a3\ui_f\hpp\defineResinclDesign.inc"
and then use whatever is in the config?

peak plover
#

Gotcha now!

tough abyss
#

With great power comes great responsability.

still forum
#

cameraOn is faster. Because with vehicle player the engine first looks up the player entry in the world and then goes into it to find the vehicle.
cameraOn is a variable right next to player. Very fast to lookup

tough abyss
#

Dedmen you didn't click the poop.

#

Aww.

#

a variable right next to the player
Underrated.

little eagle
#
[1,2,3,4,5,6,7,8,9,10] apply {[_x, cameraOn AmmoOnPylon _x]}
[[1,1],[2,7],[3,3],[4,1],[5,1],[6,1],[7,1],[8,3],[9,7],[10,1]]
#
{ 
    private _ammo = getNumber (configfile >> "CfgMagazines" >> _x >> "count"); 
    cameraOn setAmmoOnPylon [_forEachIndex + 1, _ammo]; 
} forEach getPylonMagazines cameraOn;

So this should workk too^

#

afterwards:

[[1,1],[2,7],[3,3],[4,1],[5,1],[6,1],[7,1],[8,3],[9,7],[10,1]]
#

lgtm

peak plover
#

I'm having trouble editing it

#

ctrlSetPosition does not work 😦

little eagle
#

Is it a map?

peak plover
#

it's the pip camera

little eagle
#

Hmm.

peak plover
#
disableSerialization; 
_display = findDisplay 46; 
_control = (_display displayCtrl 102); 

systemchat str _display ;
systemchat str _control ;

_xnorm = safezoneX; 
_ynorm = safezonY; 
_wnorm = safezoneW/40; 
_hnorm = safezone/25; 
 
_pos = ctrlPosition _control; 
_pos params ["_x","_y","_w","_h"]; 
_pos = [ 
 (_x), 
 (_y), 
 (6*_wnorm), 
 (4*_wnorm) 
]; 
_control ctrlSetPosition _pos; 
_control ctrlCommit 0

little eagle
#

two typo with safezone

peak plover
#

Well still does not change anything

little eagle
#

Are you sure this is the right control? because the mine display id is not 46.

peak plover
#

alldisplays does not show that one and this display is the only one that found the correct control

little eagle
#

Try:

private _display = uiNamespace getVariable "RscCustomInfoMineDetect";
peak plover
#

nothing

#

RscCustomInfoTransportFeedPrimaryGunner However...

#

317

little eagle
#

Yeah. findDisplay and allDisplays don't work with displays. Only dialogs.

peak plover
#

ā¤

#

Btw do you also know of any way of moving/removing the control that is the addaction pop up in the middle?

little eagle
#

Don't think you can.

#

It's like the crosshair or titleText. Not a control.

peak plover
#

Also why did they not make this configurable through custom layouts

rocky marsh
#

is it possible to display a video upon a interface? like lets say i make a tablet and i want the background to be a video?

indigo snow
#

The tanoa expansion added some functions for that, iirc

still forum
#

@rocky marsh Possible since Arma2. Atleast Videos overlayed over the HUD. On objects is also possible since Arma 3 atleast

#

But dunno how to on objects. on HUD BIS_fnc_playVideo

real vessel
#

Anyone know if there is a way to increase the view distance on PiP renders? By default it seems the view distance fog starts at 1000m.

peak plover
#

I don't think so. I would also like to have shadows in pip render 😭

heady flame
#

So im looking for some insite on some scripting. Had an old Arma 2 dayz server and did some scripting on there but it looks like a lot has changed. Wanting to get an Arma 3 exile server and looking for some help figuring everything out on whats best to use and stuff these days. Would love someone to DM me that has some insite/advice and some knowledge on what there doing. Please and thank you in advance.

peak plover
#

Did you try the arma 3 exile discord/forums?

heady flame
#

Meh looking for a more personal approach. Info from someone that has a server running, or someone that helps with getting servers setup. Looked on some forums last night and the only people to respond arent great with english and want to charge monies for scripting and setup fees. unless they are just trying to scam me. not sure.

peak plover
#

A lot of exile servers might operate on a donater / vip basis. That's why it's expected from those communities...

#

The communities make money, why shouldn't the people helping them get a cut of the action?

still forum
#

Had an old Arma 2 dayz server and did some scripting on there but it looks like a lot has changed Uhm.. No.. Not really

heady flame
#

hmmmm. well i guess ill have to do some research then. Thanks i guess.

peak plover
#

šŸ˜‰

tough abyss
#

Yeeeeees!

#

@little eagle: I like how findDisplay doesn't work with displays.

tough abyss
#

i kind of expect a note from @little eagle on the param page šŸ¤”

tough abyss
#

:eyes:

little eagle
#

There probably was one, back when

[0,1,2] param [-1,-1] // 0
#

They wrecked my markdown formatting on Gist.

barren magnet
grand berry
#

Shame about KK leaving but that "parting gift" is pretty damn awesome... now to get TFAR and ACRE working across two servers.

still forum
#

His script would work really well with the new Escapade I have in mind.. Screwing everyone.. Thanks KK.

grand berry
#

Yea i can see how it can be used malliciously but there are still "good" uses...

#

Oh

still forum
#

TFAR across two servers is not really a problem

grand berry
#

that said exploit just now

still forum
#

It did. I googled for "Other word for exploit" Because people take that word so negativly

grand berry
#

Haha very true

still forum
#

Sadly I only remember the stuff about KK that he has messed up recently..

grand berry
#

Ok fair enough, his tutorials and site amongst other stuff helped me a lot when I first started playing around in arma.

tough abyss
#

Shame to see him go, but i can understand why plus he been at this for long time.

Nice workaround to transfer clients to another server.
Only exploitable if people can remote exec code on clients etc and get past scripts.txt etc.
But at the point your server is screwed anyways

#

Good run, KK.

still forum
#

The Idea to transfer people from one server to the other is very old. And I would have done it the same way as him. I thought about that years ago in A2... But found it too much hassle to go through all the UI stuff. And I know a couple other Scripters that had the same Idea but were too lazy to go through that hassle.
I only found KK's ridiculously weird tutorials useful. Mainly the "Who’s Placing/Deleting Markers?" thingy. If you look at the code your first thought is "What crazy mind came up with this?!"
KK invested a lot of time and patience into Arma that's for sure

tough abyss
#

Btw, someone needs to archive the site.

#

For when the hosting ends.

grand berry
#

Yea i was thinking that - might be worth just asking him for a FTP copy?

still forum
#

archive.org somehow doesn't wanna save 😮 ends up in an endless reload loop

barren magnet
#

After all his edits to the wiki and his commitment to the community, he deserves to have his contens put up on the community. subdomain in his own directory

#

@lavish ocean looks over to you

grand berry
#

I think I've got a copy of the site just waiting for it to finish.

#

Eh it's wordpress, would be best to get a copy of the site from him.

tame portal
#

The real question is

#

Who will update the wiki now?

velvet merlin
#

back to the dark ages 😐

still forum
#

šŸ–

#

I will atleast add new commands from time to time. Which bad explanations and crappy grammar

tame portal
#

I don't trust Dedmen, before I realize it I run malicious code on my PC when trying to run a sample for something like drawTriangle

#

( ͔° ĶœŹ– ͔°)

still forum
#

Ouh.. Nice Idea :3

tame portal
#

Hm, would actually be a good idea to have code to output what things are not in the wiki yet but which are ingame

#

I think you're doing it by hand atm Dedmen?

still forum
#

Yeah.. Theoretically Intercept could do that automatically though

#

But I'm to lazy to code that up. I rather do it by hand the few times.
With Intercept we also have a server that always tests Intercept on latest dev-branch. That could also automatically detect and add new commands to BIKI if we really wanted to. Thanks for the idea.

little eagle
#
_this resize 0;

šŸ¤”

still forum
#

set's _this to empty by modifying the reference. _this = [] would not modify the reference.
But I still don't see the reason

grand berry
#

Got a full copy of the site - needs some work to make all pages accessible but that can be done later.

peak plover
#

Dev-Heaven is also down

#

Anyone got a copy of that?

still forum
#

dev-heaven is big. And most repositories are probably password protected

#

They still have it. If you want your repository back you can contact them

peak plover
#

Many links I've found googling have been broken, is all

grand berry
tough abyss
#

@grand berry good work!

dusk sage
#

Much faster šŸ™ƒ

#

onEachFrame-ception

rose hatch
#

Does setUnitTrait (e.g. medic, engineer) carry over on respawn or should I re-apply all traits on respawn?

lavish ocean
#

it's end of an era @velvet merlin @still forum @tough abyss yet at last with neat parting gift ...

still forum
vague hull
#

inb4 serverclusters

subtle ore
#

Is the server profile persistant over restart?

vague hull
#

yes

subtle ore
#

mind if I post my issue here?

vague hull
#

just do so

subtle ore
#
if (isServer) then {
addMissionEventHandler["HandleDisconnect",{profileNamespace setVariable[_uid,[(position _unit),(getDammage _unit),(getFatigue _unit),(getStamina _unit),(_unit getUnitTrait "Medic"),(_unit getTrait "Engineer"),(getAllOwnedMines _unit)],false];}];
onPlayerConnected {
    {
    if(getPlayerUID _x isEqualTo _uid) exitWith {
    _player = _x;
    _x setPos ((profileNamespace getVariable _uid) select 0); 
    _x setDamage ((profileNamespace getVariable _uid) select 1); 
    _x setFatigue ((profileNamespace getVariable _uid) select 2); 
    _x setStamina ((profileNamespace getVariable _uid) select 3); 
    if((profileNamespace getVariable _uid) select 4) then {_x setUnitTrait["Medic",true];}; 
    if((profileNamespace getVariable _uid) select 5) then {_x setUnitTrait["Engineer",true];
    {_player addOwnedMine _x;} forEach (profileNamespace getVariable _uid select 6);
    
            };
        } forEach allPlayers;
    };
};

issue is on restart. Everything works whilst in game

vague hull
#

saveProfileNamespace; after setVariable

#

but this is blocking, so better do that with timeouts or something

subtle ore
#

Okay, letme try this out.

vague hull
#

and idk what this offers you over restart: getAllOwnedMines _unit
you cant recover them after restart if you save them this way

subtle ore
#

I'm not sure why it wouldn't. HandleDisconnect - > Find player info - > Store it in variable with player's uid as string - > Add them back after connect

#

you can't recover detonation

#

Like Touch of Bomb and such

vague hull
#

objects are not the same after restart

subtle ore
#

It wouldn't be saving to the object

#

it's literally just reapplying the values. Which don't pertain to one object or another.

vague hull
#

mines = objects

#

thus after restart they are not there anymore, or if recreated, dont have the same serialization

subtle ore
#

Ooohhh.

#

I see what you are saying now

#

My bad!

vague hull
#

better save some other meta data

#

like position and classname

limpid pewter
#

hey, a probably dumb* question, but what exactly does it mean when this happens```sqf
_hintThis = _array select 2;
hint str _hintThis; // hints: any

vague hull
#

then get the nearest object of that type afterrestart (if the mines are recreated)

subtle ore
#

Yep, that's exactly what I was going to do

#

thanks Senfo

vague hull
#

np

#

@limpid pewter _hintThis is nil in this case

limpid pewter
#

ok, so when you try to hint a nil or undefined var, it will say "any" then, correct?

vague hull
#

yeah

limpid pewter
#

bugger XD

#

thanks tho

vague hull
#

sometimes stuff like <NULL> can happen too I think

limpid pewter
#

yeh

vague hull
#

not too sure tho

limpid pewter
#

god damn them undefined vars

vague hull
#

^^

#

just params the array with default values or check for Nil state

limpid pewter
#

kk

tough abyss
#

anyone know how to check if the pilot of a vehicle has any control over guns (not manual fires)

subtle ore
#

@tough abyss (gunner _veh == player) && (!isManualFire _veh)

tough abyss
#

let me check šŸ˜„

subtle ore
#

Oh wait. Pilot? Pilot never has control unless it's manual fire.

#

@vague hull No go my friend.

if (isServer) then {
addMissionEventHandler["HandleDisconnect",{profileNamespace setVariable[_uid,[(position _unit),(getDammage _unit),(getFatigue _unit),(getStamina _unit),(_unit getUnitTrait "Medic"),(_unit getTrait "Engineer"),(getAllOwnedMines _unit)],false]; saveProfileNamespace;}];
onPlayerConnected {
    {
    if(getPlayerUID _x isEqualTo _uid) exitWith {
    _player = _x;
    _x setPos ((profileNamespace getVariable _uid) select 0);
    _x setDamage ((profileNamespace getVariable _uid) select 1); 
    _x setFatigue ((profileNamespace getVariable _uid) select 2); 
    _x setStamina ((profileNamespace getVariable _uid) select 3); 
    if((profileNamespace getVariable _uid) select 4) then {_x setUnitTrait["Medic",true];}; 
    if((profileNamespace getVariable _uid) select 5) then {_x setUnitTrait["Engineer",true];
            };
        } forEach allPlayers;
    };
};
tough abyss
#

@subtle ore helis like pawnee

still forum
#

saveProfileNamespace is not needed anymore afaik.

#

Game automatically saves on exit. But might not if it crashes I gues

subtle ore
#

looks like the pilot remains a pilot and gunner doesn't return the pilot when in the pilots seat @tough abyss

#

@still forum So what's up then? Can't seem to find what's wrong.

vague hull
#

are _uid and so on really magic vars?

still forum
#

Don't use onPlayerConnected use addMissionEventHandler

subtle ore
#

yep

#

Oh, stackable right?

still forum
#

_uid doesn't exist in onPlayerConnected

#

forget that

subtle ore
#

Okay.

still forum
#

are you really sure _uid is not nil?

subtle ore
#

Positive.

#

works ingame when server has not reset

#

just never after restart

still forum
#

Something is really wrong

#
if (isServer) then {
    addMissionEventHandler["HandleDisconnect",{profileNamespace setVariable[_uid,[(position _unit),(getDammage _unit),(getFatigue _unit),(getStamina _unit),(_unit getUnitTrait "Medic"),(_unit getTrait "Engineer"),(getAllOwnedMines _unit)],false]; saveProfileNamespace;}];
    onPlayerConnected {
        {
            if(getPlayerUID _x isEqualTo _uid) exitWith {
                _player = _x;
                _x setPos ((profileNamespace getVariable _uid) select 0);
                _x setDamage ((profileNamespace getVariable _uid) select 1); 
                _x setFatigue ((profileNamespace getVariable _uid) select 2); 
                _x setStamina ((profileNamespace getVariable _uid) select 3); 
                if((profileNamespace getVariable _uid) select 4) then {_x setUnitTrait["Medic",true];}; 
                if((profileNamespace getVariable _uid) select 5) then {_x setUnitTrait["Engineer",true];};
            } forEach allPlayers;
        };
    };
#

the closing bracket of your exitWith is the one from the forEach

#

_unit getTrait "Engineer" is wrong as you can see in the syntax highlighting

subtle ore
#

should be getUnitTrait yep

still forum
#

it's called getUnitTrait like you already did correctly

#

this cannot work. This is full of errors

subtle ore
#

Okay, walk this through with me there then.

still forum
#

why do you _player = _x; if you never ever use _player anywhere?

vague hull
#

put (profileNamespace getVariable _uid) in a variable

subtle ore
#

Because originally it was a piece to add owned mines to the variable back after connect

vague hull
#

then params it

subtle ore
#

Alrighty

still forum
#
if (isServer) then {
    addMissionEventHandler["HandleDisconnect",{profileNamespace setVariable[_uid,[(position _unit),(getDammage _unit),(getFatigue _unit),(getStamina _unit),(_unit getUnitTrait "Medic"),(_unit getUnitTrait "Engineer"),(getAllOwnedMines _unit)],false]; saveProfileNamespace;}];
    onPlayerConnected {
        {
            if(getPlayerUID _x isEqualTo _uid) exitWith {
                private _variable = (profileNamespace getVariable _uid); 
                _x setPos (_variable select 0);
                _x setDamage (_variable select 1); 
                _x setFatigue (_variable select 2); 
                _x setStamina (_variable select 3); 
                if(_variable select 4) then {_x setUnitTrait["Medic",true];}; 
                if(_variable select 5) then {_x setUnitTrait["Engineer",true];};
            };
        } forEach allPlayers;
    };
};

That is atleast syntactically correct

subtle ore
#

I was going to add that private lol

still forum
#

that private doesn't matter

#

because there is no upper scope

#

it is actually useless here

subtle ore
#

Correct.

vague hull
#

_x setUnitTrait["Medic",_variable select 4];
_x setUnitTrait["Engineer",_variable select 5];

#

the ifs are not needed

subtle ore
#

Noted.

still forum
#

if (true) then {true} didn't even see that

vague hull
#

didnt see the missing bracket ĀÆ_(惄)_/ĀÆ we all got our strengths

still forum
#

in HandleDisconnect _unit and _uid are undefined

vague hull
#

tought so too, thats why I asked wether they are magic vars as in some other eventhandlers

subtle ore
#

The code will receive a number of special variables: ?

still forum
#

they are in onPlayerConnected

#

onPlayerConnected != HandleDisconnect

subtle ore
#

Why is it different in the eh?

#

I understand that

#

My question is now regarding the onPlayerConnected eh

vague hull
#

the ones added with addMissionEventhandler gets the parameters passed in _this

still forum
#
if (isServer) then {
    addMissionEventHandler["HandleDisconnect",{
        params ["_unit", "", "_uid"];
        profileNamespace setVariable[_uid,[
            (position _unit),
            (getDammage _unit),
            (getFatigue _unit),
            (getStamina _unit),
            (_unit getUnitTrait "Medic"),
            (_unit getUnitTrait "Engineer"),
            (getAllOwnedMines _unit)
        ]];
    }];
    addMissionEventHandler["PlayerConnected", {
        params ["","_uid"];
        {
            if(getPlayerUID _x isEqualTo _uid) exitWith {
                private _variable = (profileNamespace getVariable _uid); 
                _x setPos (_variable select 0);
                _x setDamage (_variable select 1); 
                _x setFatigue (_variable select 2); 
                _x setStamina (_variable select 3); 
                _x setUnitTrait["Medic",_variable select 4]; 
                _x setUnitTrait["Engineer",_variable select 5];
            };
        } forEach allPlayers;
    }]
};
subtle ore
#

Woops. Previously it was onPlayerConnected

#

But yeah

#

that's looking better now

vague hull
#
]
,false];
saveProfileNamespace;```

remove the false, you cant broadcast the profilenamespace
opaque jungle
#

Posted this in a different channel but here might work just as well

#

[6:57 PM] Byakko: So I am having some issues with this now that I am getting around to it
[6:57 PM] Byakko: 3 guys at an objective
[6:57 PM] Byakko: name them guy1, guy2, guy3 for example
[6:58 PM] Byakko: place a trigger and edit the settings for it
[6:58 PM] Byakko: what should be the syntax for if guy1, guy2, guy3 die to put as a text message "Guys eliminated" that everyone sees

subtle ore
#

šŸ‘€

still forum
#

Neat copy paste. fluff off

opaque jungle
#

rude

still forum
#

yes

#

Put effort in question or get ignored

subtle ore
#

Hm?

vague hull
subtle ore
#

Anyways, Thanks @vague hull and @still forum For the help!

opaque jungle
#

Trying to work a trigger so that when a group of enemies is killed a chat message pops up saying the objective is cleared. Units named guy1, guy2, guy3 for the sake of argument.

Upon death of all three I want a message such as Dedmen eats bananas with the skin on to pop up in global chat. Worked at following one tutorial online but for some reason using the same syntax is not giving me any results and error messages at that.

still forum
#

Using what syntax

subtle ore
#

Well, despite the changes. It still doesn't seem to work upon restart.

still forum
#

diag_log ĀÆ\_(惄)_/ĀÆ

subtle ore
#

:/

#

hahaha

#

ĀÆ_(惄)_/ĀÆ

#

AGH! Freaking SQF! Missing a semicolon at the player connected EH

velvet merlin
#

time to start using some IDE

vapid frigate
#

could add a speaker icon next to the name or just change font colours

long hatch
#

what i do wrong {_x animate ["terc",1];} forEach ["igrp1_1","igrp1_2","igrp1_3","igrp1_4","igrp1_5","igrp1_6"]; i get every time "Error Generic Error in expression"

little eagle
#

animate needs an object and not a string.

long hatch
#

thanks

still forum
#

@long hatch You don't only get a "Generic Error in expression" Check the full error report. It first says you what's wrong. Then where. Then prints "Generic Error in expression" for some reason

#

and it will tell you that it got a string but expected an object

indigo snow
#

iirc only nil errors something just mysteriously keep it at Generic Error.

little eagle
#

animate throws very weird error messages

still forum
#

:u

#

Is there a hidden variant of animate that takes a bool? ^^

little eagle
#

Nah, count expects bool.

#

animate returns "nothing"-nil, but nil animate reports vanilla-nil.

#

count only accepts vanilla-nil or bool, but freaks out for flavored-nils and nothing-nil

tame portal
#

The wiki says to use animateSource, could that potentially fix the weird behaviour?

little eagle
#

No.

tame portal
#

Hm

little eagle
#

It's a general thing with all SQF commands.

shadow sapphire
#

As a player in charge of an AI group, there are a ton of useful commands. Can you script the AI to utilize these commands alone?

Like, "2 - Watch - North."

peak plover
#

Yea

#

doWatch / setFormDir

shadow sapphire
#

Interesting! I use these commands, but didn't realize they were related in this way. So, I can leverage these same commands to have a group leader issue them conditionally?

indigo snow
#

no, but you can emulate the effects of those commands by script

shadow sapphire
#

Hmm... good enough... maybe. How do we force AI to speak lines?

ivory vector
#

anyone here know if you can create ControlsGroup controls, dynamically ? as I have to do something like

class MessageList: Lega_Phone_RscControlsGroup
{
    idc = 9999;
    colorDisabled[] = {0,0,0,0};
    x = 0.432969 * safezoneW + safezoneX;
    y = 0.3856 * safezoneH + safezoneY;
    w = 0.14 * safezoneW;
    h = 0.2772 * safezoneH;
    colorBackground[] = {0,0,0,0};
    class Controls {
        class Lega_Phone_BackgroundControl1 : Lega_Phone_RscText {
            idc = 673;
            sizeEx = 0.020;
            text = "";
            w = 0.12 * safezoneW;
            h = 0.2772 * safezoneH;
            colorDisabled[] = {0,0,0,0};
            colorBackground[] = {0,0,0,0};
        };
        class Lega_Phone_MessageControl1 : Lega_Phone_RscStructuredText {
            idc = 672;
            sizeEx = 0.020;
            text = "";
            w = 0.12 * safezoneW;
            h = 0.2772 * safezoneH;
            colorDisabled[] = {0,0,0,0};
            colorBackground[] = {0,0,0,0};
        };
        class Lega_Phone_BackgroundControl2 : Lega_Phone_BackgroundControl1{
            idc = 683;
        };
        class Lega_Phone_MessageControl2 : Lega_Phone_MessageControl1{
            idc = 682;
        };
        class Lega_Phone_BackgroundControl3 : Lega_Phone_BackgroundControl1{
            idc = 693;
        };
    };
};
``` to get mine to work.
tranquil nymph
#

Has anyone here used control type 46 (the menu type that was added with eden) successfully?

#

Trying to use it in a display and it seems to just be invisible

ivory vector
#

Yeah ctrlCreate doesnt work for my application, and I would be using it in a forEach, and it just overwrites the last one,.

tranquil nymph
#

Why would ctrlCreate not work?

subtle ore
#

control groups != controls ?

tranquil nymph
#

A controls group is a type of control

#

display ctrlCreate ["RscControlsGroup", idd]

subtle ore
#

RscControlsGroup

#

yep

ivory vector
#

then it wouldnt work in the listbox.

tranquil nymph
#

RscListBox

queen cargo
#

So you blame the system for not working like you expect it to?

tranquil nymph
#

Not entirely sure what I'm looking at, is one broken?

#

Oh the overlap on the bottom message I guess

queen cargo
#

The ui system of Arma is indeed

#

Broken

#

Working

tranquil nymph
#

Seems like you're specifying an incorrect y coordinate for that control

queen cargo
#

But still plain PITA

ivory vector
#
        Backgroundidc = 673;
        Textidc = 673;
        for($i = 2; $i < xyz; $i ++;){
            class LegaPhoneBackgroundControl[$i] : Lega_Phone_BackgroundControl1{
                idc = Backgroundidc + 10;
            };
            class Lega_Phone_MessageControl[$i] : Lega_Phone_MessageControl1{
                idc = Textidc + 10;
            };
        };

is there a way I can do something like that to autocreate the config ?

still forum
tender fossil
#

Does anyone know whether scheduled scripts run in their own CPU threads or not?

still forum
#

They don't

#

Arma is not multithreaded (besides few exceptions)

tender fossil
#

Is there a proper, technical reason why they don't @still forum?

still forum
#

Because they can't

tender fossil
#

Or is it just the old "because BI" again? šŸ˜„

still forum
#

RV engine wasn't made for Multithreading

#

On Linux the SQF engine might theoretically be able to multithread read-only operations. Still doing testing on that

tender fossil
#

So the engine architechture makes it hard?

#

Ie. it's too much work for them to make it threaded instead of running everything in the same thread

still forum
#

Yes.

#

The whole engine wasn't made to be multithreaded. Changing that would require rewriting most of it

tender fossil
#

I see

thick sage
#

Hi guys. If I need to use a global object to share variables across machines, what simpleObject should I use? E.,g. CBA uses createSimpleObject ["CBA_NamespaceDummy",...] without CBA, which dummy show I use?

indigo snow
#

youre aware of the existence of publicVariable?

#

e.g. is there a need for a separate namespace?

still forum
#

Use some building

#

in general it doesn't really matter

#

Place it out of view distance and stop caring ^^

indigo snow
#

im suprised Static has a public scope tbh

still forum
#

It doesn't probably

#

that's why CBA has a subclass

#

But maybe it still works? ĀÆ_(惄)_/ĀÆ

indigo snow
#

nah its a base class

thick sage
#

@indigo snow two reasons: 1. encapsulation of data in the same object. 2. avoid cluttering the missionNamespace

still forum
#

nah its a base class Which is what I said?

thick sage
#

thanks @still forum. Good idea went to check out the config files

indigo snow
#

e.g. you won't be able to spawn it if its just a mission

little eagle
#

Building is a good one. Scope 1, no model and very cheap simulation

rotund cypress
#

Hey guys, question: does Headless Client recognizes as server in CfgRemoteExec?

opaque jungle
#

Back to making mistakes trying to learn code. Trying to set it so that an objective can be either to steal or blow up an enemy vehicle. Would an easiest way be to set a trigger with an enormous radius and upon the vehicle leaving that area it qualifies as stolen at that point?

#

And then program objective completion as an OR for either destroyed or outside of the radius of the trigger placed?

hollow niche
#

Is it possible to give a seperated Gangs/Groups acces to there own Crate? like a box they can fill there own stuff inside and other gangs/players cant?

tranquil nymph
#

@opaque jungle If you set the trigger synced to the vehicle and have it active when the vehicle leaves the area, then name the vehicle (e.g. myVehicle) just set the trigger condition to this || !alive myVehicle

#

It might actually be grouping the trigger to the vehicle that allows you to set that, not syncing it

#

Then just set the trigger onActivation to run the code for objective completion

opaque jungle
#

@tranquil nymph I tested it with !alive vehiclename OR !(vehiclename in thisList) and it seems to work

peak plover
#

Finally managed to clean up the tiny loading bars and fix the name /author

#

@hollow niche using a inventoryopenend EH?

#

Yes

shadow sapphire
#

Where can voice line class names be found?

indigo snow
#

I dont think theyre classnames

#

Theyre just files in a pbo

little eagle
#

CfgVoice, CfgVoiceTypes

#

They are referenced in directories, not files though.

#

Every file would be overkill I guess.

tough abyss
#

how would i remoteExec [0] spawn life_fnc_setKing; to cursorObject? tried [0] remoteExec ["life_fnc_setKing",cursorObject]; but no luck

little eagle
#

lgtm. It's probably disabled on your server if it doesn't work like that.

rotund cypress
#

Hey guys, I am getting a reserved variable in expression error. This is when I amtrying to make a public variable which has a PVAR evh attached. Any ideas why?

indigo snow
#

one of your variables might have the same name as a command

#

which word in the script does the error point to?

rotund cypress
#

It doesn't say what variable is reserved

indigo snow
#

the error will point at a word in the script in the error message

#

in the RPT its marked with |#|

rotund cypress
#

It doesn't

#

You mind if I send you a PM with script error? @indigo snow

indigo snow
#

the error message in your RPT would be of more help

rotund cypress
#

Ye that's what I mean

indigo snow
#

either way, that error is definitely trying to use a command as variable name

frosty crescent
#

I have replaced everything with my own paa and text but it doesnt work as shown 😦

indigo snow
#

just making sure youre on the dev branch?

frosty crescent
#

Yep

indigo snow
#

also what errors is arma showing?

frosty crescent
#

I have other functions on dev branch working also. This one is the only one giving me problems

#

one moment

#

So when I use it there is no actual errors, it just doesnt work šŸ¤”

#

Im doing something wrong I think

indigo snow
#

just making sure youre in 3den / have showScriptErrors enabled? check your error RPT file? Try executing it from the debug menu?

#

a good way to check if the game even tries to run something is to add a diag_log or systemChat just before it

rotund cypress
#

Hey, is there anyone here that knows if it at all possible to move camera while in dialog, as in holding alt and looking around?

#

I know you can move around, but not enabling freelook

simple solstice
#

Hi guys, I have a script that counts the driven distance. I want to increase a variable by one, every 100 meters driven. How would I go about that?

indigo snow
#

have a variable that tracks the distance, if its over 100, reset and increment the counter

#

or any other similar structure

simple solstice
#

So just an additional variable for the distance thats only used to be reset

#

thanks!

indigo snow
#

id personally save the current position and use that to check the distance against but either works

rotund cypress
#

myvar = myvar + value

#

if (myvar > 100) then {myvar = myvar + increase;};

#

@simple solstice

indigo snow
#

id personally not name the two the same šŸ˜›

#

dont forget to reset the distance variable back to 0, too, or update the 100 to 200

quaint ivy
#

Can anyone help me set up a simple script? Im trying to set up a timer that can be stopped from a trigger/action

simple solstice
#

yeah, i got it just needed the idea

indigo snow
#

if the score is always 1/100th of the distance you could simply divide and round down, too, but it's probably not?

simple solstice
#

it isnt

peak plover
#

When a unit respawns it's name for example my_player_01 is instantly transferred to the new unit from old one?

peak plover
#
            style = ST_CENTER + ST_VCENTER;
            class Attributes {
                font = "RobotoCondensed";
                color = "#ff0000";
                align = "center";
                valign = "middle";
                shadow = true;
                shadowColor = "#ffffff";
                size = "1";
            };

It's not centered...

#

How do I center this structured text?

vapid frigate
#

is the control taking up the full size of the thing you want to center it in?

peak plover
#

Yes, I have background enabled for this control and it's showing the text on the top algined middle horizontally, but not vertically.

vapid frigate
#

not sure sorry, don't think i've tried to vertically center something

peak plover
#

The Issue I'm having

--------------------------------------------
|                LOL!                
|                                
|                                
|                                
-------------------------------------------

--------------------------------------------
|  LOL! LOL! LOL! LOL!LOL!LOL!LOL!    
|           LOL!LOL!LOL!            
|                                
|                                
-------------------------------------------
#

I want it to be

--------------------------------------------
|                                
|                                
|                                
|                     LOL!                
|                                
|                                
|                                
-------------------------------------------
vapid frigate
#

(with script)

#

but yeah not sure how to make ST_VCENTER work

peak plover
#

ā¤

#

I'll give that one a go

#

Good idea

vapid frigate
#

see example 2 there too

peak plover
#

That's not going to work because text is dynamic

#

I can't do count _text as well because it's different size for all clients...

#

I'll try with ctrlTextHeight and see if I can just adjust the control instead

vapid frigate
#

either would work with dynamic text i think?

peak plover
#

If I use that example, it will always be exact same height misalgined from the top. This means bigger texts will be alinged to bottom instead

vapid frigate
#

hmm u sure?

#

i think it's just adding a line to the top to use as 'padding'

#

oh nvm... he means manually set the size to adjust i guess

hollow niche
#

@peak plover thanks! i will try it 😃

peak plover
#

Yeah the padding line is a BLOCK that blocks šŸ˜„

#

ctrlTextHeight works wonders 'tho

#

Thanks @vapid frigate

vapid frigate
#

np

queen cargo
#

that is pretty much all the tiny SQF emulator can do for now ...
but it is only 5h old

peak plover
#

😮

queen cargo
#

maybe will make it to a full emulator ... more or less a requirement for another project

#

and some other ones too

#

next thing on the list is variables

peak plover
#

Damn, isn't that like building everything from scratch?

queen cargo
#

also thinking from educational side
never created a stack based language before

#

so ... it has benefits

#

i ... think

#

but yes

#

all is done from scratch

#

the stack itself is no problem btw.

#

the parsing of the commands is

peak plover
#

What if you end up accidentally making whole arma from scratch?

queen cargo
#

impossible as i do not plan to add a rendering part

#

just dummy end points for those

#

eg. draw3d would have a dummy endpoint

#

doing just nothing

#

in the end you could then just load your SQF files into the emulator, that is providing you a simple interface to trigger various events etc.

#

thats how i would imagine the whole thing in the end

#

but now, all it can do is + - * / and diag_log to console

#

and it is not very good in understanding what you want šŸ™ˆ doing 1+2 will break it currently as the parse function requires space separation for "tokens"

peak plover
#

Very cool

#

I wonder if it's hard to move from SQF to like C or sth to do simple exec...

queen cargo
#

if you only ever did sqf ... yes

peak plover
#

A little bit of python, but mostly SQF...

queen cargo
#

if it ever works to the extend, that most things work, i might create a bot for the discord

manic sigil
#

AI pilots enter helicopter, engineon script turns it over. A load and a hold waypoint follow right on it, on a helipad, with a trigger that clears when the fireteam gets in.

Instead, the pilots get in and immediately climb to 20m or so.

Bluh. I know im missing something.

peak plover
#

So you can use the bot to parse stuff and it will throw a return ? woah

#

@manic sigil
I think ```
If you order get in to a helicopter that is landed. The helicopter sometimes takes off

#

If that's the case, just workaround by setting fuel to 0 until it's allowed to takeoff

manic sigil
#

But i want the engine running, the whole scenario is a quick reaction force getting called up :/

peak plover
#

How about disableAI or enableSimulation false for pilot

manic sigil
#

Hrm... im already futzing with locking the chopper, locking the pilot in place is just a step to the left. Imma try it.

#

Testing looks good, didnt know if i should use enablesimulation or -global so i did both.

peak plover
#

global is used only on the server, does it for ALL clients

#

Normal one is used anywhere and only does it to the machine that executes the command

#

You want to do that one on whatever you host your ai on OR just use global

manic sigil
#

Yeah, global and local is one of many of my coding weaknesses >_< thanks tho, seems ive got a handle on my helicopter controls.

peak plover
#

setVariable ["var",value,true]; // global var

#

Does that trigger publicVariable eventhandler

still forum
#

It should. Probably does.

peak plover
#

is there a object always owned by server that I can use as refference for remoteExec

still forum
#

you want to execute code on server?

peak plover
#

Yes

still forum
#

You know that you don't have to pass an object to remoteExec do you?

peak plover
#

Yes