#arma3_scripting

1 messages · Page 325 of 1

quasi rover
#

thanks, @nocturne iron good idea.🙂

weak obsidian
#

It's about that what I always hoped the UGV would do if I tell it to follow

#

unfortunately follow does not work with UGV

nocturne iron
#

Thanks

#

That's a lot less janky than what I came up with

nocturne iron
#

I think you need to create the control from a class where the shadow is predefined

blazing zodiac
#

Does anyone know if it's possible to slow down the condition check in addAction to not be onEachFrame

#

I need to check if a door is open or closed to have this action show and the fnc to check it is somewhat slow, I would've liked to have slowed the check down to maybe 4 times a second instead of on each frame

#

Yea that's how I had it setup before

#

Will have to go back to that I suppose

vapid frigate
#

i think conditions are checked every .5 seconds?

#

on actions

blazing zodiac
#

NOTE: condition is evaluated on each frame in |non-scheduled environment. If action is added to some object and not to player, condition will only get evaluated IF player is closer than 15m to the object AND is looking at the object. If action is added to player, the condition is evaluated all the time.

#

Unfortunately it seems not

vapid frigate
#

yeh just saw that

#

seems unnecessary most of the time

blazing zodiac
#

I agree

#

Seems extremely excessive

vapid frigate
#

it could still be better than having a script spawned manually doing it though

#

depending on how heavy the check is i guess

blazing zodiac
#

the check is returning the nearestDoor to you to check for the proper animation to use with animationPhase to see if the door is open

vapid frigate
#

you could use a public bool variable for the condition too

#

is the action on the door?

#

or the player?

blazing zodiac
#

yes

#

the door

#

so it's not evaluating all the time at least

vapid frigate
#

you don't really need to find the nearest door then?

#

just the animationphase of _target

blazing zodiac
#

Oh shit, I forgot entirely about _target

#

although I think _target will return the object

#

so the building the door is attached to

vapid frigate
#

true

#

might be worth checking out the default open/close door actions

#

see what they do

blazing zodiac
#

do you know where I would find those?

#

in the building config I would assume somewhere?

#

or can we even see them?

vapid frigate
#

yeh cfgviewer, on phone

blazing zodiac
#

ok cool

#

will take a look

vapid frigate
#

depending on how you're adding the actions, you could also include the selection name in the condition

#

like have the condition as { _target animationPhase "door_1" > 0 } or whatever

subtle ore
#

animationSources entry is what you need, some of them are just animated hitpoints afaik

vapid frigate
#

the game does it (at least with cup running) like i said above

#

this is the CloseDoor_01 from a Land_House_C_1_EP1 >> UserActions:

condition = "((this animationPhase 'Door_1') >= 0.5)";
position = "Door_1";
statement = "([this, 'Door_1','Door_1_Handle','Door_1_Handle_2'] spawn CUP_fnc_Door_close)";
#

(excluding some obvious ones)

blazing zodiac
#
{

  _doors = getNumber(configFile >> "CfgVehicles" >> (typeOf _x) >> "numberOfDoors");

  for "_i" from 1 to _doors do
  {

    _x addAction
    [
      "Breach", //Name
      {
        [_this] call Hound_fnc_attachCharge;
      }, //Code
      nil, //args
      1.5, //priority
      true, //showWindow
      true, //hideOnUse
      "", //shortcut key
      "('BreachCharge_Remote_Mag' in Magazines Player) && {(_target animationPhase (format['door_%1_rot', ([_target] call Hound_fnc_nearestDoor)])) isEqualTo 0}", //condition
      1.75, //radius
      false, //unconscious
      format["door_%1", _i] //selection
    ];

  };

} forEach _buildings;
subtle ore
#

Does the animation phase ever go between 1 and 0 without a scripted method? Never seen like a door go halfway open or such.

blazing zodiac
#

This is what I'm doing right now to add them to all buildings with doors on the map

#

_buildings being that array

vapid frigate
#

i guess during the animation of it opening it's between

#

for a second

subtle ore
#

condition = "((this animationPhase 'Door_1') >= 0.5)"; 🤔

vapid frigate
#

would depend on how the building is set up

#

that one i mentioned doesn't have a door_1_rot that i can see

#

you can see all the options in AnimationSources

#

is this for strictly a mission script?

#

because seems like it might be better to add it to the config for buildings? but then i guess you'd have to put it in every building type

blazing zodiac
#

No this is meant to be usable at any door on any map

#

It does work this way but the function that returns the nearestDoor takes longer to run then I'd like to have it running on every frame when near a door

vapid frigate
#

i don't think i'd work on all third party buildings though

#

you're sort of assuming there's a door_X and door_X_rot

blazing zodiac
#

I know that I'll ahve to change the format for some of th ethird party buildings

#

but that can be done with checks and generally just changing those parts of the strings to match whatever the authors used

vapid frigate
#
 format["('BreachCharge_Remote_Mag' in Magazines Player) && {(_target animationPhase 'door_%1_rot') isEqualTo 0}", _i], //condition```
#

i think that would work without that check

#

(but still makes the same assumption about door_X_rot)

blazing zodiac
#

That was the first thing I had tried but _i doesn't hold it's value in the condition check

vapid frigate
#

it doesn't need to

#

that is passing the formatted string in as the condition

#

rather than passing 'format' as part of the condition

blazing zodiac
#

OH I see

#

I misred that

#

perfect this is exactly what I was looking for

#

thanks for working through that with me man

vapid frigate
#

np.. the door_X_rot is the harder part to solve i think

blazing zodiac
#

I'm just hoping that they follow the same naming convention map wide in some of the third party maps

#

like "door_x_whatever"

vapid frigate
#

i wouldn't count on it.. some will use third party + vanilla buildings

blazing zodiac
#

and not different for every building

vapid frigate
#

the one i'm looking at seems to have just Door_1 for both the selection and animation

blazing zodiac
#

where can I view the anim names by the way?

#

animationSources in the building config?

vapid frigate
#

yeah

#

so you could read it from there

#

finding any that contain door would probably be pretty safe

#

but then you need to match that with the selection name

blazing zodiac
#

right

#

will have to start doing that next on some third party maps

blazing zodiac
#

Does anyone happen to know the name of the sound when an explosive is placed off the top of their head?

#

The little beeping sound that is

subtle ore
#

@blazing zodiac the config viewer is your best friend in this case. Likely you'll have to go digging. Not many times people are able to remember a classname off the top of their head.

blazing zodiac
#

Yea I've been looking through for a bit

subtle ore
#

Some of the sounds may not be acessible via the config viewer iirc, data lock probably.

warm gorge
#

Are there any concerns around using remoteExec to execute scripting commands, rather than functions? I remember reading it somewhere but cant find it anymore

warm gorge
#

Ah yeah thats where I saw it, when reading about Battleye filters.

#

cheers

velvet merlin
tough abyss
#

is it possible to detect a player using modded armour and decrease its ballistic protection to zero through a script?

jade abyss
#

@velvet merlin afaik not.

warm gorge
#

Does the profiling branch of an arma 3 server provide much information that might help in determining what could be causing script lag on a server?

#

Because im having quite some issues on my server. Done my best to optimize both the server and client mission file. Ive got the server FPS higher than it used to be, but still experience severe server script lag at times

still forum
#

@warm gorge Yes.

warm gorge
#

Ive never used it before, so hopfully not too complex

still forum
#

Well.... It's a profiler. Soo.. It's not gonna tell you "That script there is the problem!"

warm gorge
#

Yeah I know I know, im sure ill figure it out

velvet merlin
#

in debug.log it logs scripts and functions with unusual long runtime

#

but its very bare overall and you have to do most of the work yourself

still forum
#

Since when? And where is that debug.log? I've never read/heard about that

velvet merlin
#

debug.log is only with diag.exe and located in the profile folder

still forum
#

diag exe is not profiling branch though

jade abyss
weak obsidian
#

It's like auto fußball

nocturne basalt
#

Hi. I attached an object to the turret of a tank, but the direction it faces are always forward (it folows the barrels movements, but nose always pointing the same direction as the body)

#

anybody know what I need to do?

subtle ore
#

@tough abyss going to check one moment

#

@nocturne basalt setDir

#

@tough abyss no server crash 🤷

#

Yep, peer to peer and ded.

#

You're executing this via a event script yes?

#

Letme try this one more time

nocturne basalt
#

@subtle ore So I guess, the dir value I need to get from the turret itself and not the vehicle?

#

and set it on my object

subtle ore
#

@tough abyss client crash, not server crash however.

#

@nocturne basalt use getDir on the player setDir on the object.

#

_myPeaShooter setDir (getdir player);

nocturne basalt
#

will that work when Its supposed to follow a turret on my tank?

still forum
#

@subtle ore If client crash make sure to upload the crashdump to the feedback tracker report

#

Yep I know.

subtle ore
#

@tough abyss yep client crash

#

@still forum I will eventually

muted hill
#

Can't see anything in the Biki, does anyone know if there's a way to change the wholeHeight of a combobox control ingame? Populating them with an unknown number of items, and want to resize to fit the number of items up to a limit.

rotund cypress
#

@jade abyss this OBE is this with just draw3D and lineIntersects etc or do you have to mod?

#

Looks pretty cool

subtle ore
#

is there a possibility of doing something like a manual transmission for vehicles in script? Or is that something more along the lines of a config?

rotund cypress
#

Is publicVariables considered performnace heavy? Considering JIP and stuff like that. I have maybe 10 PVAR's with scripts in them, broadcasted from server to all clients joining. Is this generally a bad idea or is it fine?

subtle ore
#

@rotund cypress I would assume bad, as the more variables you pack on the more that are stored in memory. I would only use variables and set variable on a need to know basis. Also, if the variables aren't reset or set to nil after end usage it affects performance acoording to the biki

rotund cypress
#

Thing is this, you would still have so many variables stored in memory, public variable or not, doesn't matter. It's more the broadcasting I am worried about.

#

If I have 100 functions with mns variables, it would be the same, still in memory.

still forum
#

size matters. a few dozen publicVar's that each contain a single number are not as heavy as a single variable containing a 20kb script

rotund cypress
#

These variables are because I want to get certain scripts off of client side, antihack etc

#

Most of them are < 20 lines

#

And of course @still forum. I wonder if if the performance impact is negligible or if I should stop doing it.

#

However I really don't want some of these scripts on client side

still forum
#

If you don't want the scripts to be on the clientside. Then there is not really a way around it

#

You shouldn't do it if you can prevent it ofcause

rotund cypress
#

Would you be able to say if it's negligible performance impact or no?

#

Not sure how easy that is to say

still forum
#

totally not easy to say. Less is better generally though

#

But that's always the case

subtle ore
#

Am I correct in saying that resetting a variable to nil after use will save performance regardless right?

tough abyss
#

Instead of storing scripts/code in public variables, how about you simply have the server run this:

addMissionEventHandler ["PlayerConnected", { _this call myFunFunction; }];

myFunFunction:

// Stop server from running this
if (time == 0) exitWith {};

params ["_dpID", "_uid", "_name", "_jip", "_owner"];

diag_log format ["Player Connected: %1", _uid];

private _initFunction = "
    if (isServer) exitWith {};
    // The code you want your client to run
";

// Have the client initialize
[[], compile _initFunction] remoteExec ["spawn", _owner];
#

@rotund cypress

rotund cypress
#

You rly have spawn whitelisted? @tough abyss

#

I don't see how that would solve my problem anyways, I have server side code, multiple functions, that is accessed by both server side and client side.

#

Thanks anyways though!

tough abyss
#

The server runs that code and is only present on the server. It is never seen by the client.

rotund cypress
#

Doesnt matter

still forum
#

Am I correct in saying that resetting a variable to nil after use will save performance regardless right? No @subtle ore

tough abyss
#

I just skimmed your whole publicvariable discussion and thought you wanted to pass code to the clients instead of having it located in the mission.

rotund cypress
#

Yep exactly

still forum
#

a remoteExec with code has more overhead than a publicVariable with same code

rotund cypress
#

^^

tough abyss
#

Just how I do it personally, if you're worried about a couple 0.001 ms then whatever.

rotund cypress
#

Its not that small overhead though

#

They differ quite majorly in my experience

subtle ore
#

Am I mis interpreting this? @still forum Once created, variables will take up space in your computer memory. This is not drastic for small variables, but if you use a big number of very large variables, you should undefine any variables that are not needed anymore. This can be done with the command nil.

still forum
#

Yes. They take up space and don't do anything. Which also doesn't do anything performance wise

rotund cypress
#

Well, ye, but it shouldn't do anything with performance

still forum
#

assigning the variable to nil however needs some processing to be done. Which "hurts" performance

tough abyss
#

Just thought I would share that if it was at all helpful. But I only use that one time upon a client connecting.

rotund cypress
#

I need my scripts on demand

#

Not on client init

tough abyss
#

Anyway. Have a good evening. I'm off for the night.

rotund cypress
#

And if I would use your method, I would have to use PVAR regardless

#

Since the server also uses the code

tough abyss
#

Every situation for use is different. I didn't know your application.

rotund cypress
#

You should also look into dewhitelisting spawn for security

tough abyss
#

I would use public variables in that situation too.

rotund cypress
#

In case you use this on a production server

#

I would never whitelist call / spawn since that would mean free for all for hackers

tough abyss
#

True. I haven't used in production environment yet.

rotund cypress
#

You could just make a function to pass code to, then make sure its the server that is remoteExecuting it with remoteExecutedOwner and then exit if its not

#

Thats how I have made my debug console for one

tough abyss
#

Gotcha. Thanks. Anyway. Gotta run.

rotund cypress
#

So it can securely be used in a production environment

#

Cya

#

Thanks for the tip anyways 😉

dry egret
#

anyone know what the CBA command is that you want to use over the default sleep command?

still forum
#

CBA_fnc_waitAndExecute?

#

But that's not really a "sleep alternative" It does a completly different concept

nocturne iron
#

Is fleximenu in CBA A3?

spark cobalt
#

is there a way to stop a particular playAction animation? e.g. die, spasm etc? playActionNow description suggests that it cancels previous playActions but this doesn't happen with for me.

rotund cypress
#

Is there a way to get dikCode of escape key when its rebound to another key than default?

#

Maybe inputAction is what I'm looking for

#

Ye

#

Found it, thanks

#

It's just returning 0 with inputAction which is weird

#

I guess actionKeys worked however

half monolith
#

Id like to polish an arsenal script by automatically adding grenades to grenade launchers and rockets as well, automatically without having to load them manually. is there anyone that can give me some direction on this?

velvet merlin
#

@little eagle / anyone from ACE team / anyone else:
why are you caching the RemoteControl unit in a GV - ref: https://github.com/KoffeinFlummi/AGM/issues/327#issuecomment-57999966
whats the benefits (and downsides) of this approach

halcyon crypt
#

it seems like bis_fnc_moduleRemoteControl_unit is actually set by BI

velvet merlin
#

yes its from ZEUS

cedar kindle
#

what GV @velvet merlin ?

velvet merlin
#

AGM_player (probably now ACE_player)

cedar kindle
#

it's pretty simple, sometimes you want to refer to the current unit, and sometimes the actual player

#

ace_player is player when not remote controlling

#

take for example gforces module, you want the effects based on unit flying the plane, not "player" since that could be the guy connected to zeus

nocturne basalt
#

can I attach an object to a weapon?

the script dont see the weapon as an object but as a string when fetching it with _this select 1

velvet merlin
#

no you cant. weapons are not entities in A3

nocturne basalt
#

@velvet merlin ok thanks... that sucks :\

velvet merlin
#

there is the attachment system though; i guess its about your mech - not sure if one can make them work for vehicles

nocturne basalt
#

nah I actually tried to make something work on a handheld weapon this time

#

by a man

velvet merlin
#

@cedar kindle do you know where ACE_player gets cached. from what i read its done in perFrame EH

cedar kindle
#

just a CBA player event

velvet merlin
#

ok thanks. how often are they checked - perFrame?

nocturne basalt
#

@velvet merlin I just added a test attachment like this:

    class test_bipod_01_F: ItemCore
    {
        scope                 = 2;                                                                    /// available in Arsenal
        displayName            = "My Little Bipod";                                                    /// name of item in Inventory (and Arsenal)
        picture                = "\A3\Weapons_F_Mark\Data\UI\gear_accu_bipod_01_snd_CA.paa";            /// icon in Inventory
        model                 = "\Test_weapon_01\test_bipod_01_F.p3d";                        /// path to model
        class ItemInfo: InventoryUnderItem_Base_F
        {
            deployedPivot    = "bipod";        /// what point should be used to be on surface while unfolded
            hasBipod        = true;            /// bipod obviously has a bipod
            mass            = 10;            /// what is the mass of the object
            soundBipodDown[]     = {"A3\Sounds_F_Mark\arsenal\sfx\bipods\Bipod_BLU_down",db-3, 1, 20};    /// what sound should be played during unfolding
            soundBipodUp[]         = {"A3\Sounds_F_Mark\arsenal\sfx\bipods\Bipod_BLU_up",db-3, 1, 20};        /// what sound should be played during folding            
        };
        inertia = 0.2;                        /// how much does the bipod add to inertia of the weapon
    };
#

is it any way of fetching that object in an EH?

#

is it any function like "attachedweaponitems" or something?

warm gorge
#

Any idea why BIS_fnc_switchLamp isn't working for me when run on the server? Works fine when run locally/globally th o

nocturne basalt
#

thanks alot

subtle ore
#

@winged sphinxRanger#8911 you need to remoteExec it as I think the comand is local to the machin e

chrome mason
#

I need some guidence... If i am correct then this: if(typeOf vehicle player == "O_Heli_Attack_02_black_F") then { vehicle player removeMagazinesTurret ["8Rnd_LG_scalpel",[0]]; vehicle player removeMagazinesTurret ["38Rnd_80mm_rockets",[0]]; }; will search for that type of vehicle and remove that type of ammo, right?

halcyon crypt
#

yes

#

assuming all the classes and turret paths are correct

cedar kindle
#

@velvet merlin yeah it's a cba perframehandler

chrome mason
#

And this: if(typeOf vehicle player == "O_Heli_Light_02_F" || typeOf vehicle player == "O_Heli_Light_02_v2_F") then { vehicle player removeMagazinesTurret ["12Rnd_PG_missiles",[-1]]; }; will do the same for both types of orca?

halcyon crypt
#

yep

jade abyss
#

@chrome mason As i told you the last time, do it this way:

if(typeOf vehicle player in ["O_Heli_Light_02_F","O_Heli_Light_02_v2_F"])then{...```
Makes it easier fo you.
#

Also:
```sqf
Code
```
= Correct Code Highlighting.

chrome mason
#

Ah

#

I didnt realise you could highlight

#

Anyhow, will this execute on a player everytime they enter that vehicle or will i have to include some sort of loop to constatly search to see if that vehicle is being used or not

#

I need to basically have it so that when a player enters the vehicle it executes that code

chrome mason
#

So there is an event handler for "Getin"

#

I'm still an sqf noob so a way from a vet to include this event in a script will further help me understand how to include this

#

Would you be able to help me out @jade abyss

jade abyss
#

no

chrome mason
#

😛

#

Okay sorry to have bothered you

jade abyss
#

It just won't help it. You will run in more complex stuff later, so taking you by the hand wouldn't help you in the end. ¯_(ツ)_/¯

chrome mason
#

See i'm a visual learner, i read and understand syntax etc but fair point

jade abyss
#

Just play around in the Editor (e.g. use "systemchat str _this/_VariableName") -> Thats how you learn the quickest.

chrome mason
#

Oki doki

#

thanks for the help

little eagle
#

why are you caching the RemoteControl unit in a GV
So all scripts work with remote controlled units. Basically every time you would use player, you use a local variable instead that is the unit the camera is currently attached to. And in the places you can't use a local variable, you use ACE_player instead.
whats the benefits (and downsides) of this approach
Pro: everything works with zeus
Con: you poll every frame for the "current unit". But there are other reasons to do so, so meh.

#

commented on Oct 6, 2014
T_T time flies

deep herald
#

hey

#

how i can declare multiple object for addeventhandler ?

#

like this

#

player addeventhandler ["HandleDamage", { player playAction "gestureFollow" }];

#

working only for player, i want to make it working also for AI / Zeus controled unit

vapid frigate
#

by caching the RemoteControl unit in a GV?

#

actually in that case you could do
_unit addEventHandler ["HandleDamage", { params ["_unit"]; _unit playAction "gestureFollow"; }];

#

(the first param passed in to the script is the unit)

celest rivet
#

Dialogs/GUI question:
Does anyone know why RscStructuredText or other dialog elements disappear behind IGUIBack regardless of which order I place them in the GUI Editor?

vapid frigate
#

don't know why, but a solution is to put the background in controlsBackground instead of controls

#

then it can never be on top of controls

warm gorge
#

@subtle ore Thats what I thought. But BIS_fnc_switchLamp's effect is meant to be global, so im not sure why it wouldnt work when run on the server.

still forum
#

@nocturne iron Is fleximenu in CBA A3? yes

warm gorge
#

@still forum I've always exited loops early through a variable, guess I just havent gotten into a habbit of using breakOut

still forum
#

Besides that example on the Wiki page I haven't ever seen code that uses breakOut with return value. Just wondering if there is some problem with it that makes it unusable or something

vapid frigate
#

i guess because it's ugly/confusing and resembles GOTO, which everyone hates

little eagle
#

All I see is the same A2 code from jaynus over and over again.

vapid frigate
#

i'm guessing that's generated code or something

still forum
#

That's from OOS

vapid frigate
#

ah ok

still forum
#

Yeah. I tried to find a better search filtering out all the breakTo's without return. Found out that didn't work and reverted my message again. You happend to click my link in the 20 seconds it was wrong ^^

velvet merlin
#

@little eagle
thanks. why cache it and not check the variable from BI when needed? aka is the perFrame check more optimized in general vs just do the query when needed

little eagle
#

There is an eventhandler associated with it.

#

check our variable against the BI one
if still the same -> ignore
if different -> update our variable and do event

#

It's a bit more complicated since it was moved from ACE to CBA. ACE_player now is essentially for bwc and set by the event.

velvet merlin
#

yes thats done by CBA perFrame

little eagle
#

While CBA has an internal variable

#

technically it's not done by a perFrameHandler, but by a EachFrame mission eventhandler.

velvet merlin
#

yeah ok. my point was the frequency

#

like this should not be an expensive operation, is it?
missionNamespace getVariable ["bis_fnc_moduleRemoteControl_unit", player]

little eagle
#

perFrameHandler doesn't necessarily run each frame though.

velvet merlin
#

so again my question is why you use the current design with caching and updating it every frame, vs just put that into a function and call that when needed

little eagle
#

like this should not be an expensive operation, is it?
It's not, but it sure is ugly compared to ACE_player. But the real reason is, that you need a global variable anyway for the eventhandler.

still forum
#

missionNamespace getVariable ["bis_fnc_moduleRemoteControl_unit", player] This is cheap. But still more expensive than just using the variable. And also a lot more verbose

subtle ore
#

@still forum oooooh! breakOut looks neat

still forum
#

a function and call is even moore expensive. And also verbose

little eagle
#

so again my question is why you use the current design with caching and updating it every frame, vs just put that into a function and call that when needed
And the answer is to have the playerChanged eventhandler

still forum
#

TFAR does the same with TFAR_currentUnit

velvet merlin
#

readability is a good argument, so is the playerChanged eventhandler

little eagle
#

readability is a side benefit, because you could just use a macro

velvet merlin
#

right

still forum
#

BI added that PlayerViewChanged EH that could replace the EachFrame check. CBA tried that. It broke a lot of stuff because it didn't work as expected. And CBA reverted to the EachFrame check again

little eagle
#

True, technically ACE_player is no longer the variable the EachFrame handler for the eventhandler checks against, but the variable itself is updated by the eventhandler.

#

People liked ACE_player

#

And it's easier to remember to just use ACE_payer everywhere where you would use player.

#

I also think using a variable is cheaper than the nullary player command.

#

But that also depends on how many globals you have.

#

I have no idea what's going on with PlayerViewChanged. It's totally broken.

still forum
#

A variable and a nullary command are the same compilation wise. Sadly. It could get faster if BI would stop ignoring my scripting bug reports

#

ACE_player is always the Unit that your Camera is in

#

So.. when Remote Controlling via Zeus for example

#

You are not IN the UAV. So no.

little eagle
#

ACE_player will be objNull at preInit or maybe even nil when your preInit script runs before ACE (only possible with addons)

zenith totem
#

Quick check, anyone know if it's possible to create a simpleObject from p3d only and texture it in-game with setObjectTexture(Global)?

subtle ore
#

@zenith totem I'm pretty sure createsimpleObject only takes p3d paths anyways

#

Oh cool

still forum
#

You need HiddenSelection defines. Which you only have in config. That's why you need to create from config

limpid pewter
#

hey i have a possibly quite easy question, i just haven't been able to answer it myself just yet. How could i use triggers to activate a function on a each player's computer as they themselves enter the trigger area?

still forum
#

Just put the function into onActivation.

limpid pewter
#

So i want a function to be called as soon as a player walks into trigger area, but i don't want that function to be called on all player's computers and i don't want it to be called only once when activated, but as each player enters,

#

nah sorry demen, didn't explain it correctly

still forum
#

the trigger onActivation script is executed on each player already

#

making it retrigger for each player that enters is your question then

limpid pewter
#

^ but only once

#

yes

still forum
#

You can set triggers to repeatable

limpid pewter
#

hence a bad explanation XDE

#

yes but they don't retriger if repeatable

#

they only are able to be re activated

#

so essentially i want the trigger to activate a funtion every time a player enters the area, no matter if the trigger already has other players on it

#

does that make sense?

still forum
limpid pewter
#

yeah thats what i thought -_-. I am currently using a loop to check the players distance from a point as a makeshift trigger and that is working when, but i don't want to have to use that for all 7 triggers i need it for : (

#

thanks anyway

still forum
#

That's how I would do it.

#

To safe a little performance I'd check all triggers in one loop

limpid pewter
#

yeah ok that would make sense

#

just while you're there, i want to ask a similar question. with these triggers i am making various capture points and currently i am using triggers. They work perfectly atm, but do you think (from your experience) that i should stay with the triggers or would makeshift trigger loops be better?

hushed rampart
still forum
#

@limpid pewter Stay with triggers. That's exactly what they were intended for

limpid pewter
#

k thamks

zenith totem
#

@tough abyss Would creating from model at least use the default textures? I'm guessing it does otherwise what use is it

limpid pewter
#

@still forum was able to use triggers for that need after all, just needed to start a loop (active when trigger active and not when trigger isn't) that would run my script for each player remotely from server. using thisList. Thanks for your help

still forum
#

@zenith totem It will use the default textures for that Model.
If you got the Model path of the config of a retexture it will not use the texture of that retextured object

zenith totem
#

@still forum I'm planning to use a custom model in an unmodded mission so I can't use class/cfgs, default textures is at least workable for my purposes though

limpid pewter
#

another possibly stuid question: Which is the correct way for spawning a function using remoteExec? this sqf _myParams remoteExec ["myFunction", somePlayer]; or is this the correct way ```sqf
[_myParams, myFuction] remoteExec ["spawn",somePlayer];

blazing zodiac
#

Does anyone know of a way to change the moving bool of a control via sqf?

#

There seems to be a ctrlXXXX command for just about everything defined in a control except that

still forum
#

remoteExec should according to BIKI spawn the script. Not sure though

limpid pewter
#

no, but why not use some kind of EH to set the ctrls pos everytime the ctrl is moved?

#

its clunky but idk

#

@still forum thanks

blazing zodiac
#

Well the idea is to create basically a lock and unlock button that will allow the controls to be moved around but the user so they can set it up however they like

#

Similar to some MMOs UIs for addons and what not

#

All that's needed is to be able to toggle the moving property via sqf

limpid pewter
#

the only way i can think of doing it, is if you were to create your own little GUI editor infrastructure that would save to a profileNameSpace and then could be used latter. But again, no idea how it would work and if at all XD sorry

blazing zodiac
#

Actually I think I just thought of a workaround

#

duplicate each ctrl, one that's got moving enable and one that doesn't

#

Then toggle them with ctrlShow

limpid pewter
#

yeah ok thats sounds like a good idea 😃

blazing zodiac
#

And eventHandlers of course

little eagle
#

remoteExec should according to BIKI spawn the script. Not sure though
No. For commands, the command does the same thing as remoteExecCall. The difference is with functions.

Which is the correct way for spawning a function using remoteExec?
The first one-

#

Although the second one has the same effect, it's unnecessarily complicated. like

_arg spawn
    _this spawn {
        ...
    };
};

instead of

_arg spawn
    ...
};
limpid pewter
#

ok thanks @little eagle

zenith totem
#

@limpid pewter Basically this:
remoteExec = remote spawn
remoteExecCall = remote call

limpid pewter
#

yeah thanks for that

#

i got it all working now 😃

zenith totem
#

Standard rules about spawn vs call applies, if it's just quick do this, use call

#

If you need suspension etc, use just remoteExec

willow basin
#

Just to be sure, must "enableEnvironment" be run client sided or server sided?

#

Ahh, thanks thats great then.

nocturne iron
#

If it would override it as if you were executing the code in a sp environment, it will remove it

#

just change the layer

nocturne iron
#

So I've been playing around with DrawLine3D

#

Managed to render cylinders, 'teardrops' and a couple other shapes

tough abyss
#

Is there a CBA XEH that runs on game load?

#

When addons are being loaded and such.

#

Pondering whether this hacky ass thing would work -
XEH_preStart (or whatever the on game load XEH is called, if there is one): ```SQF
if (isClass (configFile >> "CfgPatches" >> someMod)) then {
#define STUFF
};

config.cpp: ```CPP
#ifdef STUFF
    #include "someStuff.hpp"
#endif
little eagle
#

It wouldn't, because preprocessor commands don't work like that.

still forum
#

The preprocessor runs before scripts are processed. PRE-PROCESS.
When your script executes it's too late

velvet merlin
#

@little eagle @still forum why do you update/check for RC EachFrame and not uiSleep 0.1/0.01 loop frequency?
to not miss out any script check for RC, yet ensure ACE/TFAR_player is updated as soon as the switch happens?

PS: did anyone ever ask KK for a playerEntityChange EH? (or was their failed attempt to it/sth similar sign enough they cant/wont)

still forum
#

Because a scheduled script with a uiSleep 0.1 might only trigger 10 or 20 seconds or several minutes after the player changed.

#

And yes. They are updated on a eventhandler which get's triggered inside that check

jade abyss
#

Because a scheduled script with a uiSleep 0.1 might only trigger 10 or 20 seconds or several minutes after the player changed.
Uhm, what?

still forum
#

What I said

jade abyss
#

Thats nonsense

still forum
#

Why?

velvet merlin
#

LET THE FIGHT BEGIN 👺

jade abyss
#

🤦

still forum
#

It's true though.

jade abyss
#

In wich situation?

halcyon crypt
#

🍿

still forum
#

And it's a thing ACE has to think about.
Scheduler overloaded.

velvet merlin
#

too much sqf done in ui namespace?

jade abyss
#

🤦

still forum
#

Spawn 5000 scripts that do some heavy script in a while true loop

jade abyss
#

Can happen, when Sheduler is full/overload, but even then -> More than 10s? Thats nonsense with uisleep

velvet merlin
#

those nametags onEachFrame already lag a bit by themselves, or is there more efficient solutions these days?

still forum
#

The scheduler will be dead

#

Why?

#

uiSleep does exactly the same as Sleep does (in that regard)

little eagle
#

@velvet merlin I think it works better with Draw3D than EachFrame

velvet merlin
#

(well i meant that 😊 )

little eagle
#

I don't see why that would be choppy then. Maybe use the "visual" getPos whatever commands instead of the simulation ones.

velvet merlin
#

10s is rare, but the old warfare coding added such delay at times (especially with some other bad coded systems)

little eagle
#

I've seen missions where the ESC pause menu took 30 seconds to open. It's also scheduled.

#

Makes the game unplayable.

jade abyss
#

Sounds like pretty bad coding or a 486er as PC

still forum
#

Yes. Exactly. @jade abyss

halcyon crypt
#

yeah clicking the options button in the pause menu is a good sign when the scheduler is overloaded (and most likely a while true somewhere) as unfolding the menu will be slow as hell

jade abyss
#

If you have sooo much stuff running, that your sheduler is fkd up, you should reconsider your code.

still forum
#

@jade abyss This is CBA though. CBA has to work even if it's running on a Life server or worse.

#

And that's exactly the reason why they can't have that potential problem that might in rare cases occur. Because even these rare-cases are too much

jade abyss
#

But putting everything inside an eachFrame (wich costs way more than a simple sleep 0.1; loop), i dont know if thats a better solution :/

queen cargo
#

scheduler overload is like the fear that you get stuck with your car on a highway ...
it is nonsense, can indeed happen but only if too many dump idiots drive on the road

#

chances that you get extended sleep rates for scheduled scripts are very low and you have to intend to get there ...

little eagle
#

TIL traffic jams don't actually exist

queen cargo
#

for nearly all scripts, spawn is way more then enough

still forum
#

Yeah. I know the overhead. And I hate it too. But.. there is no better way. Engine Eventhandlers could solve all that. But these mostly don't ever appear. And if they do they are in some way broken.

#

Especially if you control the Mission you are running spawn is completly fine. Because the Mission is the place that could mostly mess up. Mods tend to get it right or atleast not too wrong

queen cargo
#

only actual things that require faster response times are thigns like TFAR
where kind of real time is required for the immersion

little eagle
#

Make a guess on what TFAR is based on.

#

This is silly.

queen cargo
#

ohh yeah ... right @little eagle ... forgot that positions update by reading the brainwaves of the user

jade abyss
#

True. Sad, but true @still forum

still forum
#

TFAR would be fine if position updates are lagging a bit. Not that nice. But doesn't kill the game as much as when you press the Interaction key and nothing happens for a couple seconds. when trying to drag some downed mate out of enemy fire

jade abyss
#

imho, Multiple Threads for SQF (like declaring "This runs in Sheduler/Scope 1 of 10") could help. but... i doubt that will be doable.

queen cargo
#

that is engines fault though @still forum
as it is a ui event handler

#

@jade abyss nope, actual real multi-threadding is pretty nasty in most used script languages

still forum
#

@jade abyss Do you mean it would just execute 3ms of each "Thread" one after the other? So that atleast 10 scripts will run if the scheduler is completly overfilled?

#

Would reduce the impact of the problem. But not by much

zenith totem
#

Even bohemia's own functions are trash for overloading the scheduler

#

Try and use their ambientAnim on a few units and you're asking for trouble where you can't revive people properly

jade abyss
#

More like:
Thread 1 = Run Scripts 1-10
Thread 2 = Runs script 11 (HeavyLoadStuff)
Thread 3 = Runs 10-100
etc. that kind of stuff

queen cargo
#

that is not how it will ever work 🙈

zenith totem
#

I ended up overhauling the ambientAnim for my milsim group lol

still forum
#

Or "Thread"'s sorted by priority? So that priority scripts execute first?
Or do you actually mean Parallel scripts? @jade abyss

jade abyss
#

Not about priority, more like a: If > 3ms -> Put in the next Thread and handle it there, so it doesn't affect the other ones

queen cargo
#

parallel

#

he means

#

actual real OS-based threading for the script engine

jade abyss
#

Parrallel, more or less.

#

Imagine it more like a LoadBalancer

#

Too much load on ScriptingThread 1? -> Put it in the next one!

queen cargo
#

i personally think they should just make arma CLR compatible and thread safe
afterwards we got our new "script language"

still forum
#

That doesn't work. You can't run some parts of the script engine in Parallel. And you can't control that only threadsafe commands are used in a script

jade abyss
#

Who is talking about some parts?

still forum
#

me.

jade abyss
#

Script -> whole *.sqf file

zenith totem
#

Either way, In bohemia's next game, for bohemia's sake it better not be SQF , SQF is aids

still forum
#

Yeah. As of right now only some SQF commands can be executed in Parallel safely. That's why you can't do such a thing for every script without overhauling the complete script engine

#

Most of Scripts can be ran in parallel. But as soon as you have a createUnit or setVariable in it you are not threadsafe and as such can't run in parallel.
Intercept is already doing some experiments on parallel scripts.

jade abyss
#

Thats why i said: i doubt that will be doable.

#

It would be just nice to have ¯_(ツ)_/¯

zenith totem
#

OOP would also be nice to have, but that is never going to happen in A3

still forum
#

Most of TFAR's onEachFrame can probably be parallelized. Didn't have time to look into that yet.
@zenith totem We already have that. Kinda. Intercept can do all that.

dusk sage
#

You're welcome to look at those BI functions.... 😄

little eagle
#

To "fix" scheduled environment, they would also have to get rid of the disableSerialization and "undefined variable in expression" nonsense. And fix that bug with with.

jade abyss
#

with with?

#

"With namespace"?

little eagle
#

Yes

jade abyss
#

whats the bug?

still forum
#

get rid of the disableSerialization They can just choose to not throw an error
"undefined variable in expression" nonsense They just need to pass a false instead of a true
And fix that bug with with. They just need to store in in the ScriptVM instead of a global Variable

little eagle
#
[] spawn
{
    with uiNamespace do 
    {
        for "_i" from 1 to 1 do 
        {
            systemChat str [
                currentNamespace isEqualTo uiNamespace, 
                currentNamespace isEqualTo missionNamespace
            ]; 
            // result [true, false]
            sleep 0.05; //<-- small suspension
            systemChat str [
                currentNamespace isEqualTo uiNamespace, 
                currentNamespace isEqualTo missionNamespace
            ]; 
            // result [false, true] <-- switching
        };
    };
};
jade abyss
#

They just need to pass a false instead of a true
Wich could end up in more confusing ppls ^^

#

wait, what? Commy?

#

Rly?

little eagle
#

try it out

jade abyss
#

oh myy...

#

Is it just a for loop?

#

Or also happen when you place it outside?

little eagle
#

for, if, try, call

still forum
#

the problem is that the Namespace doesn't switch back when the Scheduler enters the function next frame.

jade abyss
#

(don't have Arma open, can't test yet :/ )

#

oh damn, commy.

still forum
#

The current Namespace is a global variable. with namespace switches that. Scheduler leaves the script it get's switched back. Scheduler enters the script on next frame. The Global variable doesn't get set again.

#

Make me a BI dev and I'll fix it in a few hours.

queen cargo
#

you probably would not
you would have to ask your management to be allowed to put it in high priority so you can fix it

still forum
#

^^

jade abyss
queen cargo
#

would require a new variable for the scructs where they store those scripts in
telling what that fancy namespace was

#

but one probably does not wants to hunt down bug in ancient code bases like the one in RV

dusk sage
#

@still forum If it switches when moving scripts, why is that same logic not applied in reverse?

still forum
#

Experience with game development
*Senior Engine Programmer*
Don't have that
Math and linear algebra skills Not the best in the world.

queen cargo
#

nobody has
that is why such things are bollocks

#

also, that job is mainly for the actual engine
not for the scripting part
whoever works at that position is too expensive for the script engine

still forum
#

I have a lot of experience with the Arma Codebase though.
Also it doesn't say that that job applies to Arma 3. Might also Apply to Argo/DayZ/Arma 4 or whatever

queen cargo
#

making the whole game open source but leave the content out

#

takes organisation
but allows for the community to contribute

#

or different speaking: fire all your programmers, you got passionated modders now doing the job for free

#

((though ... it was a wish that KSH followed))

jade abyss
#

I must agree, tbh. (except for the "fire your programmers"-part)

queen cargo
#

afterwards your engine goes down in performance a lot
so you hire those old engineers again to now only do performance patching

#

new features come mostly from community anyway, but community does not cares for overall performance

still forum
#

community does not care for overall performance Sooo wrong

jade abyss
#

Yeah, it's the most important thing oO

zenith totem
#

Well, the people talking here currently do

queen cargo
#

ye ... totally ...
just that the scope is different
you implement a new feature in a gigantic source base

it is not like you know anywhere close to enough or spend enough time to fix all those holes

zenith totem
#

The rest of the community, maybe not

#

Speaking of performance, what are FSMs like?

jade abyss
#

Yes.

queen cargo
#

FSMs are like SQF

#

just different

#

in fact: they are SQF powered state machines

still forum
#

FSM's are just SQF with a bit of statemachine control flow mixed in

jade abyss
#

Don't they run in their own scope/Thread?

zenith totem
#

I've never touched any FSMs in a major manner, only altering some SQF on steps

queen cargo
#

yes @jade abyss

little eagle
#

FSMs are like SQF
just different
Way to say absolutely nothing.

jade abyss
#

^^

queen cargo
#

@little eagle you are right, your shot was better

#

ohh ... wait

still forum
#

If you want the best available performance. Ditch Battleye and use Intercept

jade abyss
#

But iirc, spamming too many FSM's -> Performance was also going downwards. (wasn't there a max of 20 or so?)

zenith totem
#

Got a link?

queen cargo
#

FSM was introduced mainly for AI anyway @jade abyss

#

hf @zenith totem

zenith totem
#

Thanks

jade abyss
#

Doesn't matter for what the purpose was, tbh. Of they got a better Performance -> HeavyLoadScripts in FSM might help ¯_(ツ)_/¯

queen cargo
#

it would

#

execution time is ~1/3

#

of the whole script engine

#

just forgot where i read that in the wiki ...

jade abyss
#

Still: Wasn't there a max Number of FSMs?

queen cargo
#

could be

#

just spawn em

#

you will then see 😄

still forum
#

I'll check.

jade abyss
#

I can't remember where it get that from, but i am pretty sure there was.

queen cargo
jade abyss
#

Something deep deep down in the back of my brain

queen cargo
#

y ... same with that 1/3rd

zenith totem
#

@queen cargo I've seen it but it was early stages when I last used it

queen cargo
#

read it on some wiki page i now attempt to find for ages

little eagle
#

Something deep deep down in the back of my brain
Your imagination?

queen cargo
still forum
#

If you create more than INT_MAX FSM's you produce a integer overflow

jade abyss
#

Nah, in my imagination there is something else.

queen cargo
#

integer overflow?!
you mean like ... crashing the game ... 🤦

zenith totem
#

So how does intercept work? Is it basically just a client&server dll that fires code directly at the game rather than going through the script engine

queen cargo
#

or just some script error crap

still forum
#

@zenith totem Basically yes

#

I don't see anything limit the count of FSM's you can spawn with execFSM. And my Visual Studio crashed

zenith totem
#

I can only make use of it serverside then since I'm running an unmodded mission

still forum
#

Yeah that would be true then

jade abyss
#

hmmm

zenith totem
#

But still worth looking into purely for simplying SQL stuff

#

And hiding that away a little bit from the exploitful SQF

queen cargo
#

if intercept is too complicated you might also want to look into alternative SQF script languages

still forum
#

Which have no advantage over plain SQF other than being OOP. Because in the end they convert to plain SQF

queen cargo
#

ASL actually has just different syntax

#

getting reformatted back to plain SQF

zenith totem
#

I have a game dev on my team who hates SQF and was looking for some "normal programming language" interface anyway

#

So he should like intercept

queen cargo
#

i highly doubt that

zenith totem
#

"anything but SQF" in his own words

jade abyss
#

Everytime i read something like that: I have a game dev on my team i must giggle 😂

zenith totem
#

Hey, I didn't say professional game dev 😉

still forum
#

We have 3ms per frame of scheduled script.
These can be
SQS
SQF
FSM

They are sorted by age (longest time since last execute)
and then for 3ms the oldest of them get executed.
If the first one takes 3ms then only that will be executed and no other scripts will run after it in that frame

#

So FSM's being 1/3rd is not that right

jade abyss
#

but?

still forum
#

Besides Java based FSMs. These run outside of the 3ms scheduler

zenith totem
#

I'll look at what's been said later, leaving the building I'm in before I get locked in lol

jade abyss
#

If the first one takes 3ms then only that will be executed and no other scripts will run after it in that frame
wait wait wait, wasn't it -> When 3ms reach -> Script gets suspended and the next one will be executed?

still forum
#

No.

#

3ms per frame max.

#

Otherwise we wouldn't have that "script might not execute for several mintues" problem. The game would just freeze if you launched thousands of scheduled scripts

jade abyss
#
The 3ms run time
A scheduled script runs for exactly 3ms before it is put in suspension to be resumed on the next frame, again for another 3ms and so on until the script is finished. The amount of suspension depends on FPS. At 20 FPS the duration of suspension for example is 50ms.

This means that if scheduled script cannot be completed under 3ms, the execution can stretch for undefined amount of time, subject to engine load, FPS and other non scheduled scripts running at the same time. A while true loop with sleep started in scheduled environment therefore has little chance to follow with exact interval.```
still forum
#

Yes. again for another 3ms in the next frame/scheduler cycle.

jade abyss
#

But and no other scripts will run after it in that frame wouldn't be true

#

I read it like 3ms reach -> store somewhere, use/execute the next script.

still forum
#

That wiki text is incomplete then.

queen cargo
#

the whole wiki is partially outdated
partially false and nowhere is actual number evidence

still forum
#

Btw Arma 1.72 is still executing the Java FSM's even though the Java scripting engine should be disabled. I should someday try to reenable the Java engine and hook into it ^^

queen cargo
#

please no

#

🙈

jade abyss
#

Why?

still forum
#

Fun

queen cargo
#

evil things will arrise

#

monsters

#

slender man

jade abyss
#

But Java

queen cargo
#

lord GabeN himself

#

or worse: commy

#

anybody here willed to do my job for me today? still got 4 hours to work but i do not want to ... would rather get shit done on ArmA Studio

still forum
#

Hmm. I only need to re-enable the ExecJFSM script command.. That should be easy

queen cargo
#

Java is evil
do not do it 😨

zenith totem
#

It's not hard to make a case for any language other than SQF lol

queen cargo
#

you now got 3 other ones

#

2 form to SQF

#

one uses DLL magic

#

2 form their one subset of lang

#

somewhat resembling a different one

#

one is c++

#

pick one and stick with it

still forum
#

You also have partly implemented LUA and Python is getting the basics up currently.

queen cargo
#

c# is also on the list using arma2net

#

even a solution to debug your SQF code if that was all that ever bothered you is available by today

#

fuck this crap ... need to redownload arma because steam "forgot" my arma on my HDD being there -.-

#

and not enough room to just "install" it ontop

still forum
#

but arma2net still needs SQF on one side.

zenith totem
#

Still using a HDD and not an SSD? 😮

still forum
#

Don't need a HDD for Arma ^^

zenith totem
#

Intercept seems like the cleanest solution from a glance at the repo

still forum
#

I can live with having to wait half a minute for all models to load ^^

queen cargo
#

got 2 SSDs in my system
need actually a new HDD with actual storage in place as one of my HDDs is dying where most of my crap is on (5TB)
but they currently are priced at incredible ranges

zenith totem
#

RPTs have probably trashed my main SSD anyway

queen cargo
#

cleanest solution is SQF

#

all other things require some sort of hack to get to their goal
being the hack that you use external tool to compile to your target language
or hook the engine

#

SQF works in every arma

#

at any time

#

tell your dev he should man up

#

and use the appropriated tools

still forum
#

Intercept also works in.... Arma 3.. at any time.. If Intercept is installed and up-to-date... :u

queen cargo
#

ye ... just like the rest

#

just that SQF is always installed and up to date

zenith totem
#

Not an issue to maintain for a server only deployment

warm gorge
#

Not to start back on what was previously somewhat argued about above, but in regards to scheduler overload and its effect on uiSleep/sleep, from my experience uiSleep has proven a lot better than sleep in terms of being affected by scheduler lag, but when the scheduler becomes overloaded, it definitely still makes a noticeable difference

little eagle
#

Both commands do exactly the same in MP (after the briefing).

#

There can be no difference.

warm gorge
#

Really? When I switched from sleep to uiSleep on my server mission, I noticed that scripts which used it as a timer were a lot more accurate compared to sleep

jade abyss
#

uisleep is not affected by fps

warm gorge
#

Thats what I was under the impression of. Which in my case where I was suffering low server FPS at one stage, uiSleep seemed to help over sleep.

#

I always hear mixed opinions on sleep and uiSleep, in terms of some saying uiSleep isnt really that different to sleep other than the fact that it can be used where simulation is paused, others saying that it is. Very confusing

zenith totem
#

From my experience, uisleep works as described in MP

tough abyss
#

@little eagle & @still forum, ok thank you. I assumed it was pretty retarded to begin with 😂

peak plover
#

placebo @warm gorge

#

In arma there are too many variables to take into account

#

In my cases either it's the script being too complicated or broken, other than that the difference is so marginal that it makes no difference in real gameplay. As long as you don't leave your script running and use event driven intead of waituntil etc. It will be fine

little eagle
#

I think the first one needs parenthesis

#
{} count (_array select {conditions})
still forum
#

if _array is usually empty the second one would be better.
But if it has more than a couple elements then the first one will be better.
Just add a isEmpty check. Like if (_array isEqualTo [])

queen cargo
#

I have a permanent mention counter displayed in here 😑

rotund cypress
#

Hey guys, does anyone of you know a good command or a good way of setting a object relative to another objects position?

#

Found a command that should work, modelToWorldWorld 😃

#

Question is, why not modelToWorldASL lol

zenith totem
#

Am I retarded or is there no moveInDriver equivilant that plays the animation still

#

Other than action that needs the vehicle to be unlocked

tough abyss
queen cargo
#

does not works on mobile phone @tough abyss :/

modern sigil
#

@tough abyss now we can create Altis Life Casinos for gambling Dialog slot machines

little eagle
#

selectRandomWeighted [..., "7", 0.0000001, ...]

jovial ivy
#

Exactly.

#

How would I go about getting the floor position of a building. So from there I can build up the floors into a array.

vapid frigate
#

don't think there is really a concept of 'floors' in the game

#

you might be able to use 'buildingPos' to get the various heights

#

or lots of samples with lineIntersects

subtle ore
#

"memoryPoints"

nocturne iron
#

@jovial ivy the best (although non-dynamic way) would to get the heights of floors for each building class relative to the origin of the model

#

thats how ALiVE etc do it

zenith totem
#

"Dialog slot machines" great term for that

#

Also, how do you guys do your UIs

#

I currently do mine manually in the config and hate it with a passion

jovial ivy
#

@nocturne iron Hmm gotcha, i'll take a further look into it later.

torn jungle
#

What idd is 46? (from findDisplay 46)

#

I mean since its the main screen, is it always present even when you are in say, ACE spectator mode?

#

I cant seem to get it to work. Im calling ACE spectator mode manually from an addaction (as sort of like a satellite view object)

#

this addAction ["Spectate", {[true] call ace_spectator_fnc_setSpectator}];

#

And i put this in my init.sqf:

#
_keyDown = (findDisplay 46) displayAddEventHandler ["KeyDown", "if (_this select 1 == 33) then {[false] call ace_spectator_fnc_setSpectator}"];```
#

but im pressing F and it wont work

vapid frigate
#

needs to be \prefix_of_pbo\folder_in_pbo\file.sqf

#

the prefix is generally determined by the folder of your stuff on P:

#

so if your stuff is in P:\conway\modfolder\init\init.sqf, you should use \conway\modfolder\init\init.sqf

#

that's the case whether your config.cpp is in conway or modfolder

#

or init even

#

best to use cfgfunctions for running scripts though btw

#

because they compile while the game is loading where execvm recompiles it every time you run it

tough abyss
#

hey gents me again on the cfgfunctions :D

CPgen = call JSFAR_CP_fnc_gen;
CPinit = call JSFAR_CP>
16:38:54   Error position: <JSFAR_CP_fnc_gen;
CPinit = call JSFAR_CP>
16:38:54   Error Undefined variable in expression: jsfar_cp_fnc_gen
16:38:54 File mpmissions\__cur_mp.Malden\initServer.sqf, line 2``` Error from a mission with the initserver located in a server side mod as @mod/addons/mod_cp.pbo/cp/fn_gen.sqf
#

in mod_cp.pbo are ```Markdown

  1. config.cpp
  2. folder called cp
  3. inside folder cp the script fn_gen.sqf```
zenith totem
#

Need to see your config.cpp

little eagle
#

jsfar_cp_fnc_gen is not defined

tough abyss
#
{
    class JSFAR_CP
    {
        class CombatPatrol
        {
            file = "addons\mod\cp";
            class fn_init {};
            class fn_gen {};
        };
    };
};```
#

isn't that JSFAR_CP?

#
{
    class myTag
    {
        class myCategory
        {
            file = "myPath";
            class myFunction {};
        };
    };
};``` From the BI
little eagle
#

Full RPT? Because functions end up being undefined if they have a syntax error.

#

Tag is not needed.

tough abyss
#

https://pastebin.com/LZnix86B

#

got the feeling it's not even loading the mod addon

zenith totem
#

Your path isn't right

tough abyss
#
class CfgFunctions
{
    class JSFAR_CP
    {
        class CombatPatrol
        {
            file = "addons\JSFAR_CP\CombatPatrol";
            class fn_init {};
            class fn_gen {};
        };
    };
};```
zenith totem
#

Get rid of addons\

tough abyss
#

alright

#

changed it

zenith totem
#

Either
\JSFAR_CP\CombatPatrol
or
JSFAR_CP\CombatPatrol

I can't remember which it is atm

little eagle
#

16:45:56 C:\InstallationCharlie@JSFAR_CP\addons\jsfar_cp.pbo - unknown

#

This PBO IS being loaded. Is that the right one?

tough abyss
#

yea

little eagle
#

What's the full config.cpp?

tough abyss
#

that is the full thing

little eagle
#

You could try to load the mod locally and check via ingame config viewer if the class is right and check if the function is defined via debug console

zenith totem
tough abyss
#

why does it need a patch

little eagle
#

Oh yes. You need CfgPatches too.

#

Because every config patch needs a CfgPatches class.

tough abyss
#

should I change the name to CfgFunctions.sqf instead than config.cpp?

zenith totem
#

no

#

You put them both in config.cpp

#
class CfgPatches {
...
};
class CfgFunctions {
...
};
tough abyss
#

okay lemme try that one

#
16:57:18 c:\w\stable\futura\lib\network\networkserver.cpp NetworkServer::OnClientStateChanged:NOT IMPLEMENTED - briefing!
16:57:18 Attempt to override final function - bis_fnc_storeparamsvalues_data
16:57:18 Error in expression <f !(isServer) exitWith {};
CPgen = call JSFAR_CP_fnc_gen;
CPinit = call JSFAR_CP>
16:57:18   Error position: <JSFAR_CP_fnc_gen;
CPinit = call JSFAR_CP>
16:57:18   Error Undefined variable in expression: jsfar_cp_fnc_gen
16:57:18 File mpmissions\__cur_mp.Malden\initServer.sqf, line 2
``` nope
#

didn't work

zenith totem
#

Did you name the class in CfgPatches JSFAR_CP

tough abyss
#
class CfgFunctions
{
    class JSFAR_CP
    {
        class CombatPatrol
        {
            file = "\JSFAR_CP\CombatPatrol";
            class fn_init {};
            class fn_gen {};
        };
    };
};

class CfgPatches
{
    class MyAddon
    {
        // Meta information for editor
        name = "[JSFAR] Mission Library";
        author = "TheNightstalk3r";
        url = "";
 
        // Minimum compatible version. When the game's version is lower, pop-up warning will appear when launching the game.
        requiredVersion = 1.72; 
        // Required addons, used for setting load order.
        // When any of the addons is missing, pop-up warning will appear when launching the game.
        requiredAddons[] = {"A3_Functions_F"};
        // List of objects (CfgVehicles classes) contained in the addon. Important also for Zeus content unlocking.
        units[] = {};
        // List of weapons (CfgWeapons classes) contained in the addon.
        weapons[] = {};
    };
};```
zenith totem
#

change MyAddon to JSFAR_CP

tough abyss
#

rgr

#
17:00:10 Error in expression <f !(isServer) exitWith {};
CPgen = call JSFAR_CP_fnc_gen;
CPinit = call JSFAR_CP>
17:00:10   Error position: <JSFAR_CP_fnc_gen;
CPinit = call JSFAR_CP>
17:00:10   Error Undefined variable in expression: jsfar_cp_fnc_gen
17:00:10 File mpmissions\__cur_mp.Malden\initServer.sqf, line 2``` not there yet
zenith totem
#

RPT

tough abyss
#

https://pastebin.com/r86Dj1hi

zenith totem
#

Oh

#

Remove fn_ in CfgFunctions

#
16:59:40 Warning Message: Script \JSFAR_CP\CombatPatrol\fn_fn_init.sqf not found
16:59:40 Warning Message: Script \JSFAR_CP\CombatPatrol\fn_fn_gen.sqf not found
#

You have:

 class CombatPatrol
        {
            file = "\JSFAR_CP\CombatPatrol";
            class fn_init {};
            class fn_gen {};
        };

Change to:

 class CombatPatrol
        {
            file = "\JSFAR_CP\CombatPatrol";
            class init {};
            class gen {};
        };
tough abyss
#
if !(isServer) exitWith {};
CPgen = call JSFAR_CP_fnc_gen;
CPinit = call J>
17:05:34   Error position: <= call JSFAR_CP_fnc_gen;
CPinit = call J>
17:05:34   Error Generic error in expression
17:05:34 File mpmissions\__cur_mp.Malden\initServer.sqf, line 2```
#

yea done that

#

is it because of the underscore betweeen JSFAR and CP?

zenith totem
#

Shouldn't be

#

RPT again though

tough abyss
#

https://pastebin.com/wipjpP42

little eagle
#

What does JSFAR_CP_fnc_gen look like?

#

I think I know this error.

tough abyss
#

https://pastebin.com/fu3kaQYY

little eagle
#

Yep.

#

You are ending the function with an assignment operator.

CCP_Init_Done = true;
#

And then you are calling this function and you store the return value in another variable.

#
CPgen = call JSFAR_CP_fnc_gen;
tough abyss
#

ah how should that be addressed?

little eagle
#

So basically:

CPgen = (CCP_Init_Done = true)
tough abyss
#

aaaah

little eagle
#

You have to rewrite your function so it has a return value that is not from an assignment operator

tough abyss
#

so it should be return true?

little eagle
#

E.g. simply:

nil
tough abyss
#

and CCP_Init_Done = call JSFAR_CP_fnc_gen;?

zenith totem
#

I didn't even realise SQF was that retarded

little eagle
#

Or

true

sure.

#

@zenith totem It's a bug.

#

That has been around since SQF existed.

still forum
#

It's a feature!

tough abyss
#

can I simply use return true?

little eagle
#

As I said, you can return anything you want.

#

Just not an assignment operator.

#

Ideally every function should have a return value. Even if it's just true or nil.

tough abyss
#

so I can put at the end return true;

still forum
#

No

tough abyss
#

awh

still forum
#

You can just return true but you cannot return true as SQF doesn't have a return command

tough abyss
#

oh wait

#

that's C

still forum
#

the last value in your script will be returned so if your script ends with true it will return true. or isPlayer player it will also return true

little eagle
#
call {
    true // <- return value
};
still forum
#

you just can't end with x = y because the = operator returns Nothing. And you can't have a function return Nothing

little eagle
#

isPlayer player it will also return true
Well, false, because this is on a server

tough abyss
#

I take it it should be true; then?

#

or just true

little eagle
#

No diff

still forum
#

If it's on a Server and you want to use return just use Intercept 😄 If your C++ is better than your SQF.
Doesn't matter.

#

I leave the ; away to indicate a return value though. Just for readability

little eagle
#

I hate this particular error so much.

zenith totem
#

SQF
Readability

little eagle
#

CHECK MY SCRIPTS. THEY ARE READABLE ALRIGHT

tough abyss
#

hmm

#

still spawns me in water as if it didn't read it

#

anything that used to be in initserver.sqf, should it be called or used with execVM?

zenith totem
#

Used to be?

tough abyss
#

moved it to that server mod

#

as call it in initserver.sqf

still forum
#

Btw I lied. Operator = doesn't return nothing. I think a =operator doesn't even exist.
It's the variable assignment Instruction that doesn't return anything.

#

@tough abyss Just check RPT for script errors.

tough abyss
#

nothing there

zenith totem
#

You are calling or spawning your function somewhere right?

tough abyss
#

call yes

#

in initserver.sqf

#

hmm still no luck

#

as if it never ran

#

@little eagle another feature I'm not aware of? https://pastebin.com/CM8kKebU

#

calling that code does nothing

still forum
#

Why do you put the link inside `` ? It would be far easier if I could just click it

tough abyss
#

fair enough

little eagle
#

No, but who knows whats wrong with this script. It's 1200 lines +

tough abyss
#

just preventing the window to pop up when posting

#

it works fine when used with execVM

still forum
#

You don't have the rights to have a window pop up here.

tough abyss
#

I think it's because of the waitUntil {!isNil "CCP_Init_Done"};

#

really?

#

didn't know that

still forum
#

I don't see what could be wrong with that script. It's a little too big for my screen

tough abyss
#

the script itself works flawless, but for some reason when using it as a function it gets either stuck or won't run at all

still forum
#

What part of that script is the important one?

tough abyss
#

it's the init of combat patrol

still forum
#

Have you considered just putting some diag_log's in there to check if it is executing as it should

tough abyss
#

prob found it

#

it should run before mission start

#

or it'll wait forever for the CCP_Init_Done

analog umbra
#

Does someone know how to create a lightsource with the "beam" effect that the lighthouse does?

still forum
zenith totem
#

Have a look at the lighthouse Cfg, it'll be under reflectors or something like that

zenith totem
still forum
#

What setting in that config do you think causes the beam? @zenith totem

zenith totem
#

innerAngle outerAngle

torn jungle
#

FindDisplay 46 doesnt seem to work while im in spectator mode. Is there a way to see the current IDD's that are onscreen?

halcyon crypt
#

^^

zenith totem
#

It may be possible to get something similiar using setLightAttenuation though

#

"linear (SCALAR) – Support signed number, effective range is from 0 ~ 100 (passed minus value will be treated as 0), this parameter determines the concentration of the light source, higher the number is, more will the light concentrate, vice versa. In other words, this parameter will turn the source into spotlight and sharpens its light circle border."
https://community.bistudio.com/wiki/setLightAttenuation

still forum
#

I'd guess the Attenuation setting controls the Attenuation setting. And not the Flare cone size.

halcyon crypt
#

lol

#

^ not making fun of anyone, it just sounded funny ... 😁

limpid pewter
#

hi, with regards to GUIs, what is the best way to only allow numbers be entered into a RscEdit control? Is the some way that XML coding could do this? or would i just have to do it in within another functions?

still forum
#

XML coding?

limpid pewter
#

like the html coding, thats what it says on the wiki, well at least how i understood

still forum
#

GUI's are configs. No XML and no HTML.
And thus #arma3_config may know more about that.

#

#arma3_scripting wise you might be able to add a eventhandler that fires on every character entered and makes sure only numbers are allowed

limpid pewter
#

Nah i meant like structured text. The wiki said something about XML being like HTML or soemthing (need to read more about it before i start refering to it often XD).

#

I don't really want an EH to fire on every character, trying to save performance. But maybe i could check every character returned in the string, to see if it is a number or not. If not, bring up an error message

#

Could i do something like this? ```sqf
_myString = "dk25mdl";
{
errorCheck = isNumber _x;
} forEach _myString;

#

or isn't a string directly seen as an array? im not sure

little eagle
#

isNumber is for CONFIG

#
if (_something isEqualType 0) then {
#

is what you want

limpid pewter
#

awesome, yeah just the command i couldn't find 😃

#

but would i be able to use the forEach command on the string, like the string was an array or not?

little eagle
#

Oh.

#

Nah, forEach is for ARRAY and not STRING

limpid pewter
#

yeah that's what i thought

#

so how would i go about checking each character in the string?

little eagle
#
{
    if (_x in ["0", "1", ... , "9"]) then {...};
} forEach (_string splitString "");
#

Or something like that

limpid pewter
#

ok yeah thats looks like what i want, thanks

#

always a big help commy

little eagle
#

typo in "splitString"

still forum
#

Structered Text is HTML yeah. But that's not GUI.

little eagle
#

I think there is not much point in TEXT outside of UI.

#

Maybe for diag_log text if that counts.

tough abyss
#

nearestObjects doesnt seem to return simpleObjects, is this intended?

little eagle
#

simple object created with config or model path?

#

nearestObjects with type filter or []?

tough abyss
#

config

#

[]

still forum
#

nearestObjects filters by classnames. simpleObjects don't necessarly have classnames.
You can use allSimpleObjects

tough abyss
#

thankz

#

is there any reason they dont have a specific class name?

little eagle
#

Hmm, but it should work with empty filter.

tough abyss
#

doing typeOf returns a class

#

@little eagle my bad i read what you said wrong. I meant i do use types

still forum
#

SimpleObjects are basically terrain objects like houses. Does nearestObjects also return these?

little eagle
#

No.

#

Well

#

When loading a savegame certain lamp posts are returned until the mission finished resuming...

nocturne basalt
#

Can I use something similar to onEachFram where I can use private variables?

zenith totem
#

Anyone know the locality of setLightnings?
Server only propgoating to clients?

nocturne basalt
#

I could try to use a while loop that sleeps every 0.01 seconds though.. But that is more demanding right?

rotund cypress
#

@tough abyss _buttonBox ctrlSetEventHandler ["ButtonClick", "_this call fnc_SpawnIt"]; do ctrlParent (this select 0) to get display

jovial nebula
#

Excuse me guys, may i ask if the forEach loop gets stopped on the 10.000th iteration?

rotund cypress
#

rofl, that must be a big array

jovial nebula
#

Yeah :L

rotund cypress
#

What data are you storing in it, and how can you possibly need an array that big? If I may ask 😃

still forum
#

@nocturne basalt Why don't you just use global variables?
No. the loop is far less demanding

#

@jovial nebula In unscheduled yes. afaik.

jovial nebula
#

Understood,thanks.
@rotund cypress I'm using forEach for formatting vehicle data (Inventory,mostly)

#

So i was trying to find an universal method (That could work even with "full-inventory" vehicles)

rotund cypress
#

Ah okey, sound strange it would be that big still though considering a full inventory

tough abyss
#

if u don't need the _forEachIndex value in ur forEach loop then I would say u should use a count loop because its faster.

rotund cypress
#

^^, requires a boolean to be returned though

still forum
#

No it doesn't.

tough abyss
#

since?

still forum
#

Ever.

jovial nebula
#

It doesn't run faster or it doesn't require a bool?

still forum
#

You just need to return anything. Nil, Number,String doesn't matter

jovial nebula
#

Oh ok

still forum
#

require bool

rotund cypress
#

ye right

still forum
#

It might just error when you return Nothing. But I'm not sure about that

rotund cypress
#

It errors when nothing is returned

#

But ye, nil, number or whatever does indeed work

still forum
#

But if you have a forEach loop with 10k elements in unscheduled environment you are doing something wrong.

#

Just make it run in scheduled

nocturne basalt
#

@still forum if I use global variables, wont that effect other vehicles of same type? I want to limit these animations to this vehicle only

#

but if while is less demanding I'll stick to that

jovial nebula
#

I'm actually running it in an FSM

rotund cypress
#

👋

jovial nebula
#

Really can't think about other ways to achieve an accurate vehicle saving

tough abyss
#

count does not need a return value. Its just if you return something then it should be a true boolean if u want to count all elements. this is because of Alternative Syntax (1)

still forum
#

FSM's are scheduled anyway

jovial nebula
#

Yeah it was just for pointing it out

little eagle
#

@tough abyss is right

rotund cypress
#

When using alternative syntax 1, if you do not return a value you will receive an error in RPT.

little eagle
#

alternative syntax 1
Is that the first syntax or the "first alternative" (the second one)?

tough abyss
#

thats not true

rotund cypress
#

Well it's the alternative syntax, not the default syntax.

still forum
#

@tough abyss Can you post a example where you return nothing?

rotund cypress
#

And at least afaik, or can remember, last time i forgot to put a return value I got an error in RPT

little eagle
#
{
    systemChat str _x;
} count [1,2,3];
tough abyss
#

if u are not returning anything than all elements are counted

#

there is an other reason for those error...

still forum
#

That returns Nil.

#

Nil is not nothing

little eagle
#
{
    0 = 0;
} count [1,2,3];

^ idk about this one tbqh

still forum
#

As I said you have to return anything. Every script command you can call returns something.

tough abyss
#

if u have nested counts and forget that the inner count returns a number then u get an error

#

but if u have no return value then all is counted.

#

just test it urself

still forum
#

Yeah. That returns Nothing. And that's what I mean

tough abyss
#

example:

little eagle
#
{
    _x;
} count [1,2,3];

^ this will error

#

Type number, expected bool

rotund cypress
#

There we go ^^

tough abyss
#

this is nonesense because _x; does nothing

rotund cypress
#

_x returns current index in array

still forum
#

No..

rotund cypress
#

or not curretn index

tranquil nymph
#

It returns current element

rotund cypress
#

but the value of current index

still forum
#

_x returns the current value

tranquil nymph
#

I'm with dedmen 😛

rotund cypress
#

ye what i mean

tranquil nymph
#

Everything returns something

still forum
#

which returns a number which.. for some reason is an error.. mh..

#

Everything besides one thing.

tranquil nymph
#

Hmm...lemme think

#

Nothing returns nothing 😄

tough abyss
#

{ _x disableAI "ALL";} count AllUnits;

still forum
#

No.

#

a = b returns nothing

tough abyss
#

test this ... no error

still forum
#

Yeah. @tough abyss Because it returns Nil.

little eagle
#

Holy shit. Just start the game and try it out you fucks.

rotund cypress
#

rofl

little eagle
#

The return value in the count loop can be number or nil. Other types error

#

bool or nil*

rotund cypress
#

ye ^

little eagle
#

Thanks

rotund cypress
#

So I was right from the beginning then 😃

tranquil nymph
#

I'm not sure who is disagreeing with that

#

but they're wrong for sure 😛

little eagle
#

Agreed.

tough abyss
#

I give it up... but I know that if u use only commands inside a count which have no return value then u ll get no error

little eagle
#

And the current element iterated over is _x inside the CODE block of the alternative syntax of count

tranquil nymph
#

@tough abyss The point is that every command returns something (except assignment)

tough abyss
#

gotta go sadly ...

tranquil nymph
#

It's just that the return of many is nil

still forum
#

@tough abyss What I'm trying to tell you is every command returns something.

tranquil nymph
#

At some point in time once you've written enough code datatypes appear everywhere

#

The whole damn language is just datatypes 😛

still forum
#

It get's even weirder when you start adding your own Datatypes.

rotund cypress
#

eh

#

lol

little eagle
still forum
#

hmpf yeah.. Some coder messed up a bit though. count really errors if the value is not a bool But other values like Number and some more are convertible to bool. So count could really work with more.

little eagle
#

Btw, Dedmen. The wiki refers to nil as "nothing".

still forum
#

Yeah.. I know. Wiki is crap ^^

tranquil nymph
#

It's a colloqiualism

little eagle
#

And the assignment "operator" reports void in C++, no? Nullbyte

still forum
#

To a beginner Nil is just like Nothing. Because essentially that's what it is. A value that contains Nothing.
But that's the essence here. "A value that CONTAINS Nothing"
When I talk about Nothing I mean Nothing. No value at all

#

assignment is not a operator. It's a instruction that just doesn't push a return value onto the stack

little eagle
#

Hence the quote marks

tough abyss
#

@still forum okay I agree that.
Every command returns something.
But I m with the wiki:
Nil is nothing

dusk sage
#

what have I just read

still forum
#

That can btw be fixed by just adding 3 lines of code to the Assignment Instruction. That just returns the assigned value.
So you theoretically could just do a = b = c = d Like you can in C++
But I don't work at BI soo.. That's never gonna get fixed

jovial nebula
#

Sorry for interrupting your old fart discussions..

still forum
#

what is this ?

jovial nebula
#

Lol can't send pictures

dusk sage
#

It means it ran 10k times

still forum
#

diag_codePerformance by default always runs 10k times.

little eagle
#

That means it was fast

still forum
#

Has nothing to do with your code itself

little eagle
#

Slow code would run less cycles to not make the test take forever

still forum
#

You don't need to assign tmp and you don't need to pass cursorTarget in an array btw

jovial nebula
#

It was just for checking the returned value

#

Well then,cool

still forum
#

I just saw that alot of people have that habbit to assign needless return values and think they need to pass everything in an array

jovial nebula
#

Lol

tranquil nymph
#

Think the assignment thing stems from init fields, which is where a lot of people first do any scripting

jovial nebula
#

Thank you everyone btw

still forum
#

Didn't CBA fix that you need to store assigned values bullcrap?

tranquil nymph
#

Yeah one of the more recent versions did

#

Also, I think the weirdness was that the init field needed to return "nothing"

#

So you could also just stick nil on the end

little eagle
#

Nah. Every single statement had to return nil. Not just the last one.

tranquil nymph
#

Ah, TIL

#

How did you fix it for CBA?

little eagle
#

UI magic. Wrapping it all in a call{%1}

tranquil nymph
#

Aha ofc, similar to the UI group name magic

little eagle
#

It's even more fucked up tbqh.

waxen jacinth
#

Hey Guys, i'm lookin for a way in the debug to find object_x and have placed at all found object_x, an object_y - i remember once i found a little debug script to display all all atms on the map for example, guess this would be kinda the way

#

but actually i have no clue where to start

#

if someone could point me into the right direction, would be great

gray thistle
#
{_x addaction ["<t color='#FF0000'>Save</t>", {[player] remoteExecCall ["ser_fn_updateplayernato"];},[],0];} foreach allplayers;

Okay i have a question why does this work like intended. You have to see i want to add for every player one Save option in the scrollbar. The problem ATM is if i use

{_x addeventhandler ["Respawn",{
params ["_unit","_corpse"];
removeallactions _corpse;
player addaction ["<t color='#FF0000'>Save</t>", {[player] remoteExecCall ["ser_fn_updateplayernato"];},[],0,[],[],[],[],-1];};
]} foreach allplayers;

there is the action added again even if i did not respawn, next thing is it is visible only for another player but not for me if i delete the last part there is only one save on each client and won't be shown to other player. But then after respawn it is not stored because it is on that unit. if i just use player addaction it is visible once again to another player which should not.

Does anyone have ideas or can give me information about that

little eagle
#

It looks completely wrong.

#

Like you add N amounts of actions to the player with N being the number of connected players.

tough abyss
#

this will not work as intended:
[player] remoteExecCall ["ser_fn_updateplayernato"]

player will be caught from the machine which sends the remote execution and therefore on all receiving machines it will be the same value/object

gray thistle
#

I know now... i just talked back to Adanteh but still there is more to solve but i think i should rework that entire bottom part with information i just got

tough abyss
gray thistle
#

oh this is an important note. because my development is atm just hosted. i mostly work with remoteexeccall

#

but i think this could also aply to that

nocturne basalt
#

Hi guys. I know that this gives me the ammocount for mainTurret of a tank like this:

_v = _this select 0;
_w = _this select 1;

_ammoPos = _v ammo _w;