#arma3_scripting

1 messages Β· Page 5 of 1

past wagon
#

ok

tough abyss
#

At some point it's either put up with some network desync or use a different method for moving the vehicle

#

Perfect network sync isn't gonna happen

little raptor
#

there is one thing you can do

#

use local vehicles meowsweats
if you don't want to use AI at all

past wagon
#

well I'd much rather just have the pilot fly the plane in a straight path than use setVelocityTransformation, anyway, if that would have the same effect

tough abyss
#

I mean yeah but meowsweats

past wagon
#

I'm fine with having an AI fly the plane, as long as it wouldn't be unreliable

#

I need it to go in a line

little raptor
#

if you use setFlyInHeightASL it should

past wagon
#

ok

#

sweet

little raptor
past wagon
#

got it

#

thanks

#

and what about the dir? I can't have it switching direction, even a tiny bit

tough abyss
#

Also strip out any additional behavior from the ai you don't need to make it more stable

little raptor
#

setting it to careless is enough imo

tough abyss
#

Should be

past wagon
#

ok...

tough abyss
#

Theoretically πŸ˜“

little raptor
past wagon
#

ok

little raptor
#
_plane setDir (_start getDir _end)
tough abyss
#

Simply punish the ai with setDamage when it moves to enforce compliance >:)

little raptor
#

and make sure you change setPos to setPosASL

tough abyss
#

The punishment for using setPos is death

#

Pretend it doesn't exist it's for the better

#

Honestly biki page for setPos should just force redirect to setPosWorld

brazen lagoon
#

how would you find magazines for a unit classname?

little raptor
brazen lagoon
#

yes

#

if you have a spawned unit you can just do primaryweapon and look in cfgweapons

#

basically is there a helper fn for getting config weapons for a unit classname + for getting mags for that

little raptor
#

and the magazines entry ofc

brazen lagoon
#

well i just want to get all mags allowed for all weapons of a unit

little raptor
#

wait I'm confused

#

magazines it carries?

#

or compatible mags?

brazen lagoon
#

yes so. given a unit classname. i want to get all compatible mags for all weapons that unit has

little raptor
#

e.g. an ammo bearer carriers AT rounds but he doesn't have a launcher

brazen lagoon
#

yeah that doesn't matter to me

little raptor
#

and after v2.10 update, compatibleMagazines command

brazen lagoon
#

ok. that's for getting mags for a weapon classname

#

so i just need to get those from config

little raptor
#

yes

#

I think there might be a function for that too

brazen lagoon
#

yeah i couldnt find it

little raptor
#

looks like it doesn't return muzzles

#

you have to get those yourself

brazen lagoon
#

oh wait. just doing CfgVehicles >> _classname >> magazines[] might be good enough

little raptor
#

it's not

#

it only shows mags added to the unit itself, and has nothing to do with compatible mags

brazen lagoon
#

yeah, that's good enough I think. this is for having an 'arsenal' for refilling ammo

past wagon
#
private _plane = createVehicle ["B_T_VTOL_01_infantry_blue_F", [0, 0, 1000], [], 0, "FLY"];
private _pilotGroup = createGroup blufor;
_pilotGroup deleteGroupWhenEmpty true;
private _pilot = _pilotGroup createUnit ["B_Pilot_F", [0, 0, 0], [], 0, "CAN_COLLIDE"];
_pilot moveInDriver _plane;
_pilot setBehaviour "CARELESS";
_plane flyInHeightASL [1000, 1000, 1000];
_plane setPosASL _planeStartPos;
_plane setDir (_planeStartPos getDir _planeEndPos);
```Right now this is what I have, and the plane is changing direction. what parts of the pilot's AI should I disable?
granite sky
#

Doesn't "FLY" actually create the aircraft at a much lower altitude than the input?

#

So the flyInHeight is asking it to climb hard.

past wagon
#

hmm

#

well if I don't create it in "FLY", then the engine isnt on

#

but when I do _plane setPosASL _planeStartPos, that sets it to the correct height

tough abyss
#
private _dir = _planeStartPos getDir _planeEndPos;
[_plane, _dir] spawn {
  params["_plane", "_dir"];
  while {true} do {
    _plane setDir _dir;
    sleep 1;
  };
};

this could also help as a bit of a "bruteforce" solution to keeping the dir constant

#

though likely that it will still have some sync issues in MP

past wagon
tough abyss
#

shouldn't affect velocity

#

and yes I know it's gross but

#

Β―_(ツ)_/Β―

little raptor
past wagon
#

nope

little raptor
past wagon
#

just heading

tough abyss
#

I assume you have a waypoint set up externally...?

#

elsewise not sure how you're even getting the pilot to move to the pos

past wagon
past wagon
tough abyss
#

test it with a waypoint and then if it's still behaving weirdly then gross measures may be in order

past wagon
#

can I just do _pilotGroup move _planeEndPos?

#
private _plane = createVehicle ["B_T_VTOL_01_infantry_blue_F", [0, 0, 1000], [], 0, "FLY"];
_dir = _planeStartPos getDir _planeEndPos;
[_plane, _dir] spawn {
    params ["_plane", "_dir"];
    while { !isNil "_plane" } do {
        _plane setDir _dir;
        sleep 1;
    };
};
clearItemCargoGlobal _plane;
clearBackpackCargoGlobal _plane;
private _pilotGroup = createGroup blufor;
_pilotGroup deleteGroupWhenEmpty true;
private _pilot = _pilotGroup createUnit ["B_Pilot_F", [0, 0, 0], [], 0, "CAN_COLLIDE"];
_pilotGroup move _planeEndPos;
_pilot moveInDriver _plane;
_pilot action ["VTOLVectoring", _plane];
for "_i" from 1 to 3 do {
    _pilot action ["VectoringDown", _plane];
};
_pilot setBehaviour "CARELESS";
_plane flyInHeightASL [1000, 1000, 1000];
_plane setPosASL _planeStartPos;
_plane setDir (_planeStartPos getDir _planeEndPos);
_plane lock 2;
```This is what I currently have
tough abyss
#

I mean you can use move

#

but you'd want to use addWaypoint for a standard waypoint

past wagon
#

what's the difference?

tough abyss
#
_pilotGroup addWaypoint [_planeEndPos, 0];
past wagon
#

ok

#

that's all I need tho, I don't need to set the waypoint type or anything?

#
[_plane, _dir] spawn {
    params ["_plane", "_dir"];
    while { !isNil "_plane" } do {
        _plane setDir _dir;
        sleep 1;
    };
};
```Also this does make the plane freeze mid-air
tough abyss
#

ah shoot forgot setDir resets velocity

#

could do

private _dir = _planeStartPos vectorFromTo _planeEndPos;
[_plane, _dir] spawn {
  params["_plane", "_dir"];
  while {true} do {
    _plane setVectorDir _dir;
    sleep 1;
  };
};
#

would just need to make sure the Z pos of the start and end positions are the same so it doesn't pitch (unless you want it to?)

past wagon
#

yup

#

ok thanks

#

yeah this is awful

#

the plane is still frozen and it is wobbling worse than ever lol

#

maybe I should go back to setVelocityTransformation?

#

I don't think I'll be able to get the pilot's AI to do what i want

#

it's a very long distance and I need it to fly perfectly straight

little raptor
past wagon
#

yes

#

well, with this:

private _plane = createVehicle ["B_T_VTOL_01_infantry_blue_F", [0, 0, 1000], [], 0, "FLY"];
_dir = _planeStartPos vectorFromTo _planeEndPos;
[_plane, _dir] spawn {
    params ["_plane", "_dir"];
    while { !isNil "_plane" } do {
        _plane setVectorDir _dir;
        sleep 1;
    };
};

private _pilotGroup = createGroup blufor;
_pilotGroup deleteGroupWhenEmpty true;
private _pilot = _pilotGroup createUnit ["B_Pilot_F", [0, 0, 0], [], 0, "CAN_COLLIDE"];
_pilotGroup move _planeEndPos;
_pilot moveInDriver _plane;
_pilot setBehaviour "CARELESS";
_plane flyInHeightASL [1000, 1000, 1000];
_plane setPosASL _planeStartPos;
_plane setDir (_planeStartPos getDir _planeEndPos);
tough abyss
#

did you try it with the waypoint without the bruteforce spawn

past wagon
#

not sure, I'll try that now

little raptor
tough abyss
#

bruteforce was meant to be a last resort πŸ˜›

past wagon
# little raptor show me a vid

just imagine the plane frozen mid-air, the pilot constantly trying to fly the plane down, and the plane's dir being reset every second

little raptor
#

then the problem is the plane's height

#

the AI is trying to move lower

past wagon
#

nah

#

the plane gets created at the right altitude, then set to the right altitude, then flown at that altitude

past wagon
little raptor
#

what is the Z in plane's start pos?

tough abyss
#

perhaps try flyInHeight instead of flyInHeightASL as well, as flyInHeightASL has this note: Sets the minimal ASL height. Final height is flyInHeight max flyInHeightASL - the higher altitude has priority.

little raptor
#

_plane flyInHeightASL [1000, 1000, 1000];
you might want to do that with delay

tough abyss
#

though then again it might not matter if flyInHeight is never set

past wagon
little raptor
#
private _plane = createVehicle ["B_T_VTOL_01_infantry_blue_F", [0, 0, 1000], [], 0, "FLY"];
_plane setDir (_planeStartPos getDir _planeEndPos);
private _pilotGroup = createGroup blufor;
_pilotGroup deleteGroupWhenEmpty true;
private _pilot = _pilotGroup createUnit ["B_Pilot_F", [0, 0, 0], [], 0, "CAN_COLLIDE"];
_pilotGroup addWaypoint [_planeEndPos, -1];
_pilot moveInDriver _plane;
_pilot setBehaviour "CARELESS";
[_plane, _planeStartPos, _planeEndPos] spawn {
  params ["_plane", "_planeStartPos", "_planeEndPos"];
  sleep 1;
  _plane flyInHeightASL [_planeStartPos#2, _planeStartPos#2, _planeStartPos#2];
  _plane setPosASL _planeStartPos;
  _plane setDir (_planeStartPos getDir _planeEndPos);
};
_plane setPosASL _planeStartPos;
#

@past wagon try that ^

little raptor
#

select 2

past wagon
#

ah

#

oh right

#

why would anyone use select then?

little raptor
#

it's older

tough abyss
#

because select has alternate syntaxes as well

little raptor
#

# is newer and not known by many

past wagon
#

yea

tough abyss
#

and also has different operator priority

#

...precedence

#

that's the word I'm looking for

past wagon
#

yeah ima start using that now, much cleaner

past wagon
tough abyss
#

select is mainly still useful in that it allows for selecting ranges and filtering

#

which # does not

#

and iirc # isn't compatible with bools like select is

#

so no using it for compact if statements

past wagon
#

yeah

#

I'm gonna go back to setVelocityTransformation for now, because I got that working a lot better than it was before, without the pilot

little raptor
little raptor
#

yes

past wagon
#

well, the vehicle is used to transport all the players on the server at once

#

I'm currently doing that on the server, not sure what doing that locally would look like, or if I even could

little raptor
#

well each player would be in their own local vehicle

past wagon
#

yeah I couldnt do that lol

little raptor
#

not sure if they would disappear tho

past wagon
#

oh

little raptor
#

but if they don't it should look fine

#

unless the other players wobble for them

past wagon
#

well all the players need to be taken across the same flight path at the same time

#

there would be a boom I think

little raptor
#

no

#

the vehicles are local. they don't even see the other player's vehicle

past wagon
#

so the vehicle dont exit for the other players?

little raptor
#

yes

#

it's just an idea tho

#

but worth a try

past wagon
#

yeah, I feel like it would mess up the mission a bit

#

I mean, I like the players being able to see each other inside the vehicle, it would be weird if they couldnt

tough abyss
#

well they would see each-other

#

it's just that...

little raptor
#

well you never know unless you try

tough abyss
past wagon
#

floating through the air?

little raptor
#

they are floating

#

but you still see your own plane

past wagon
#

lmfao

little raptor
#

so it looks like they're actually in your plane

tough abyss
#

assuming they're synced well enough it should look normal-ish...

past wagon
tough abyss
#

I mean it comes down to what you care about more

little raptor
tough abyss
#

the plane being smooth or players being smooth

past wagon
#

is there really no way to just get a normal plane flight for all players across the map in a straight line?

tough abyss
#

arma has a wonderful way of making seemingly simple goals very hard to accomplish

#

a bitter pill to swallow

past wagon
#

yeah

#

well, what I have right now is all right

open fractal
#

doMove on the pilot doesn't work?

past wagon
#

uh

little raptor
#

try this:

private _plane = "B_T_VTOL_01_infantry_blue_F" createVehicleLocal _planeStartPos;
_plane setVehiclePosition [[0, 0, 1000], [], 0, "FLY"];
clearItemCargoGlobal _plane;
clearBackpackCargoGlobal _plane;
_plane setPosASL _planeStartPos;

private _startTime = serverTime;
addMissionEventHandler ["EachFrame", {
        _thisArgs params ["_plane", "_planeStartPos", "_planeEndPos", "_startTime"];
        private _vectorDir = _planeStartPos vectorFromTo _planeEndPos;
        if (_vectorDir vectorCos (getPosASL _plane vectorFromTo _planeEndPos) <= 0) exitWith {
            removeMissionEventHandler ["EachFrame", _thisEventHandler];
        };
        private _vectorUp = _vectorDir vectorCrossProduct [0, 0, 1] vectorCrossProduct _vectorDir;
        private _velocity = _vectorDir vectorMultiply 100;
        private _distance = _planeStartPos vectorDistance _planeEndPos;
        private _interval = (time - _startTime) / (_distance / 100);
        _plane setVelocityTransformation [
            _planeStartPos,
            _planeEndPos,
            _velocity,
            _velocity,
            _vectorDir,
            _vectorDir,
            _vectorUp,
            _vectorUp,
            _interval
        ];
}, [_plane, _planeStartPos, _planeEndPos, _startTime]];
past wagon
#

I don't think trying to get an AI pilot to fly a plane on a perfectly straight path for several kilometers will ever work

little raptor
open fractal
#

I did it with a helicopter in my mission

past wagon
open fractal
#

no afaik I set the direction and velocity and it continued on the path

past wagon
#

hmm

tough abyss
#

did you get it to sync well in MP though thonk

#

clearly the solution here is to hide all of the other players and make local object clones of them to sit in the local plane 😭

past wagon
little raptor
#

which is wrong meowsweats

past wagon
#

also the plane just looks buggy in general, the wheels keep appearing and disappearing

little raptor
#

it doesn't give the mission start time meowsweats

past wagon
#

hmm

#

I prefer my old method anyway

#

it'll work

tough abyss
#

setVelocityTransformation is about the best solution possible

#

the limits of MP sync are fairly fundamentally unavoidable

little raptor
past wagon
#

no

#

okay, now I have a bit of a predicament. I am using the following code without a pilot, and the plane essentially looks fine:

private _plane = createVehicle ["B_T_VTOL_01_infantry_blue_F", [0, 0, 1000], [], 0, "FLY"];
clearItemCargoGlobal _plane;
clearBackpackCargoGlobal _plane;
_plane setPos _planeStartPos;
_plane lock 2;
private _startTime = time;
addMissionEventHandler ["EachFrame", {
        _thisArgs params ["_plane", "_planeStartPos", "_planeEndPos", "_startTime"];
        private _vectorDir = _planeStartPos vectorFromTo _planeEndPos;
        if (_vectorDir vectorCos (getPosASL _plane vectorFromTo _planeEndPos) <= 0) exitWith {
            removeMissionEventHandler ["EachFrame", _thisEventHandler];
        };
        private _vectorUp = _vectorDir vectorCrossProduct [0, 0, 1] vectorCrossProduct _vectorDir;
        private _velocity = _vectorDir vectorMultiply 100;
        private _distance = _planeStartPos vectorDistance _planeEndPos;
        private _interval = (time - _startTime) / (_distance / 100);
        _plane setVelocityTransformation [
            _planeStartPos,
            _planeEndPos,
            _velocity,
            _velocity,
            _vectorDir,
            _vectorDir,
            _vectorUp,
            _vectorUp,
            _interval
        ];
}, [_plane, _planeStartPos, _planeEndPos, _startTime]];
```However, I need a pilot in order to do this code:
```sqf
_pilot action ["VTOLVectoring", _plane];
for "_i" from 1 to 3 do {
    _pilot action ["VectoringDown", _plane];
};
```The problem is, even when I disable the pilot's AI, it still has the wobbly effect on the plane.
tough abyss
#

could just briefly spawn a temporary pilot

past wagon
#

I also tried doing this:

[_pilot] spawn {
    sleep 5;
    deleteVehicle _pilot;
};
```but the pilot doesnt get deleted for some reason
#

oh

#

haha

tough abyss
#

lol

past wagon
#

yeah, it works

#

I hope none of my players notice that there is nobody flying the plane

tough abyss
#

doing

_pilot disableAI "all";

didn't stop it from messing up the movement?

past wagon
#

nope

sweet pendant
#

Hi, I'm currently having issues with getMissionPath-Command. Although the mission I'm using is packed as a PBO and has a custom name, all paths returned refer to mpmissions/__cur_mp.altis. Is there anything I'm missing here? As a side note: this is a MP mission tested on a locally hosted dedicated server instance. Thought I might ask here before opening a ticket on the feedback tracker...

little raptor
#

but it should work nonetheless

#

or do you mean that the paths are not correct when returned like that?

frail ermine
#

Is there a way to use Cruise Control on AI? I’m trying to do a parade

little raptor
granite sky
#

limitSpeed is fine too.

frail ermine
#

Ok, thanks

granite sky
#

I use limitSpeed to control convoy spacing, works surprisingly well.

wanton swallow
#

Hi. I can't to add Mission EH EntityCreated. This code generates error:

addMissionEventHandler ["EntityCreated", {
    params ["_entity"];
}];
17:12:48 Error in expression <addMissionEventHandler ["EntityCreated",>
17:12:48   Error position: <addMissionEventHandler ["EntityCreated",>
17:12:48   Error Π’Π½Π΅ΡˆΠ½ΡΡ ошибка: Unknown enum value: "EntityCreated"
hallow mortar
#

I'm pretty sure EntityCreated doesn't exist until the next update

wanton swallow
#

Oh. Yes, i see we have 2.08 for now πŸ™‚

hallow mortar
#

2.10 is expected to land in mid to late August

sweet pendant
tough abyss
#

is there an easy way of making particles like the enfusion workbench for arma 3? or do i have to change a particle array manually until its better?

hallow mortar
hallow mortar
#

If you need to display the file name for some reason you could try missionName or missionNameSource.

sweet pendant
# hallow mortar I've got a feeling that is correct and that's just how DS handles the current mi...

it is definitely not correct that's the problem.
Arma saves mission files in mpmissions with the same name the PBO has on the server side. __cur_mp.altis is the filename, if the mission is provided as a directory instead of PBO. so effectively it points to the wrong file. to make matters worse, even replacing __cur_mp with a copy of my mission file did not yield results that's why I'm thinking this might be an issue with the command itself

#

So I'm pretty sure now, that this is broken. I checked again and it works in singleplayer and hosted MP, dedicated MP however seems to break it. I'm going to head over to the feedback tracker for this. thanks for the input πŸ™‚

quiet geyser
#

Is there any reason that the below script would cause issues on a dedicated server, being executed from a trigger?

call{{_x setdammage 0; _x setfuel 1; _x setVehicleAmmo 1; _x call ace_medical_treatment_fnc_fullHeal;} forEach thislist;}

Activation requirements are Any Player Present, repeatable, 60/60/60 Timeout timer

winter rose
#

issues as?

quiet geyser
#

Any, I'm just curious if I've made any errors in the way it's written.

#

Basically I want it set up such that if someone drives a vehicle in, it'll completely repair, refuel and rearm said vehicle, as well as healing anybody in the trigger using ACE's full heal function.

winter rose
#

well, ask if it would cause issues then! πŸ˜„
check locality for commands/functions, also check if the trigger is server-only

#

and remove that useless call {} wrap

#

also setDamage hahaha

tough abyss
#

Does call actually do anything beyond change scope?

little raptor
tough abyss
#

call{{_x setdammage 0; _x setfuel 1; _x setVehicleAmmo 1; _x call ace_medical_treatment_fnc_fullHeal;} forEach thislist;} would be redundant because it's already running unscheduled as far as I know

little raptor
#

Call doesn't run unscheduled

tough abyss
#

But is blocking correct?

#

It requires a return type?

little raptor
#

No, and no

tough abyss
little raptor
#

idk what you mean by is blocking

tough abyss
#

Adds given set of compiled instructions to the current stack and waits for it to finish and return, provides an option to pass arguments to the executed Code. See Scheduler to learn more about how the code is excuted and behaves.

little raptor
tough abyss
#

?

little raptor
#

Like I said, call doesn't run unscheduled
It just executes the code

tough abyss
#

Only referring to what was said there...

#

When i said blocking meaning it waits for a return before proceeding.

little raptor
#

It doesn't "wait" for anything

#

It's part of the current code

tough abyss
#

"Adds given set of instructions to the stack and waits for it to finish and return" Is the wiki wrong?

little raptor
#

No

#

At least what it's trying to say is not wrong

tough abyss
#

...

little raptor
#

The problem is the word wait. There's no waiting

#

When you write: if (condition) then code, do you "wait"?

tough abyss
#

If it's an if condition no.

#

If it's an endless loop yes

little raptor
#

Call is the same thing

tough abyss
#

Why do so many scripting commands do redundant things...

little raptor
#

I didn't say it's redundant. I just don't like using the word wait here

tough abyss
#

If no return type is specified will call lock up a script?

little raptor
#

It always "locks it up", regardless of return

tough abyss
#

So waits for it to finish?

#

IF it gets a return type?

little raptor
#

It always "waits" for it to finish

tough abyss
#

You just said it didn't...

warm hedge
#

regardless

little raptor
#

It just runs sequentially

#

What's there to wait for?

tough abyss
#

A return type?

#

I've actually experienced it first hand.

little raptor
#

I don't think you understand my point. nvm

#

Let's just say it waits...

winter rose
#

basically:
call is just like copy-pasting code at its location, that's it

#

so it has to process the code before jumping to the rest

#

no returns? no problem.

tough abyss
#

Still vague...

winter rose
#

call doesn't change scope, it adds code to the current one

#

that's it.

little raptor
#

It's kinda unique in some ways tho

#

You can't compare everything

tough abyss
#

So am I right to assume under the hood everything is a bowl of spaghetti?

#

I wish the Java programming project BI was working on was actually done...

little raptor
# tough abyss Still vague...

If you get what a "code" in sqf is it will make sense
Again:

if (true) then {...};
// Or
if (true) then my_function

Is the same as:

call {...};
// Or
call my_function
tough abyss
#

Okay. Lets go a bit more in depth? Are even control structures commands?

#

And what is compiled code according to arma?

#

Is it bytecode?

little raptor
little raptor
#

if is a unary command

#

If BOOL, and returns IF

#

then is binary, IF then CODE, and returns whatever the code returns (if the condition was true)

tough abyss
#

I've seen a tool being used around

#

called ArmAcriptCompiler.exe ?

#

Is that just translating to raw byte code?

#

and the VM just executes it without any care?

copper raven
#

that's translating to bytecode, and the engine translates bytecode to whatever internal structure it uses for the instructions and what not

#

call creates a scope and runs some code, whatever is left on the stack is pushed back onto calling scope's stack(call command's return value, literally like any other command), call is blocking yes, but blocking in it's actual context, not entire scriptvm, if you use scheduled code for example

#

and that "pushing back" behavior appears pretty much everywhere, do, then forEach and other commands

#

and no there are no control structures,

_alive = alive player;
_if = if _alive;
_else = [{"alive"}, {"dead"}];
hint (_if then _else);

is valid

warm hedge
#

Never thought about it 🀣 Looks cursed

winter rose
#

looks cursed? it absolutely is
thanks for the nightmares sharp. πŸ˜„

proven charm
#

can you somehow remove player from the slot in the lobby?

winter rose
#

not afaik

proven charm
#

hmm except via kick I guess

winter rose
#

that would be considered rude

warm hedge
#

But rule might be rude

proven charm
#

so not good option...

quiet geyser
#

On the off chance anyone here knows, for those of you familiar with the ALiVE framework and its Virtual AI system, is there a way to set it up such that vehicles will devirtualize further away than infantry (as standard and set by the Virtual AI module)?

winter rose
quiet geyser
#

Thanks, will take a look at that now. Out of curiosity, is the cooldown on the backpack being moved or just using the action itself? Ie will trying to hit it when enemies are nearby cause it to "eat" the cooldown?

winter rose
#

you should also add a check for screenToWorld return value - if someone looks at the sky, you will get an error

#

also, the person could use binoculars and put the respawn point 5km away

quiet geyser
#

Cool, thanks. I'll have a look at getting it into the mission and see how it goes.

quiet geyser
# winter rose https://sqfbin.com/ezacazaboluvozayodiv \:-)
21:54:47 Error in expression <markerName];

private _actionId = _unit addAction ["Place Rally Point", {
params>
21:54:47   Error position: <addAction ["Place Rally Point", {
params>
21:54:47   Error Type String, expected Bool
21:54:47 File C:\Users\Jesse\Documents\Arma 3 - Other Profiles\Fuzzle\mpmissions\Eisenwand1.WL_Rosche\onPlayerRespawn.sqf..., line 12```
winter rose
#

stop breaking my code

quiet geyser
#

Forgive me, my copy paste skills are clearly not sufficient

winter rose
#

at least I fixed the _unit β†’ _target thing

#

ah yes
forgot a nil, before 1.5,

#

@quiet geyser while I'm at it, wanna set a max distance from leader?

#

like, can't place the spawn 200m away

quiet geyser
#

No that's all good, the primary purpose of this is so that a squad leader can place a rally point in a secure point before their element assaults through a town/objective etc. So making it so that you need to be within x distance to respawn would potentially break things on larger urban objectives.

winter rose
#

no no, I mean

#

your code says "if there are no enemies around the leader then place the spawn point wherever you want" (a.k.a 10km away, right in the middle of enemies, etc)

quiet geyser
#

oh wait, you mean so that when you're placing it, the point it's getting placed needs to be within x distance of the guy placing it?

hallow mortar
#

think of it as a limitation on the length of the squad leader's arms

winter rose
#

yeah, kinda πŸ˜„

quiet geyser
#

oh yeah if you know a good way to do it I'll take it; placing within like 5 meters would be fine

winter rose
#

"hey, I'm in a safe place - let's put the spawn point in that enemy camp I see on the hill through my binoculars"

quiet geyser
#

My goodness you're a machine

#

testing now

#

Works like a charm!

winter rose
#

one could also add the cooldown timer in the action but that should be good for now ^^
I have a local version where the action doesn't appear if the location is too far away, wanna?

quiet geyser
#

There is exactly one other thing that could improve it, and make it exactly like Project Reality's rally point system which was sort of the goal: is there any way to make it check if there are group members within a certain distance? Ideally I'd like it to require at least 1 other group member (not including the squad leader) within 10 meters.

If you can get that working, you should seriously publish the script online as I know tons of people love the PR spawn system, and a rally point system that works like this is dead-on.

winter rose
#

check if there are group members within a certain distance? Ideally I'd like it to require at least 1 other group member (not including the squad leader) within 10 meters.
gimme 5

warm hedge
#

5... I gave it you!

quiet geyser
#

Very nice, thanks again

#

What does MIN_MOVE_DISTANCE do?

winter rose
#

if you want to prevent the guy moving the spawn point by 1m

quiet geyser
#

oh right, nice.

winter rose
#

I wanted to set it to e.g 200m, but I thought "what if the pole is misplaced and the person just wants to put it e.g behind that building"

#

I could also add another parameter to decide how many group members should be there (1, 5, 500)

quiet geyser
#

Yeah honestly just having it as a control for misclicking the scroll menu right next to the previous one is good.

quiet geyser
winter rose
quiet geyser
#

Yes, sounds good as in the affirmative, get it in there

winter rose
#

I also didn't get

there are words I thought were benign that are not benign, learning experience.
?

quiet geyser
#

I tried to type shorter-word-for-overweight-fingered rather than misclick and got a finger-wag from the server

winter rose
#

oh. yyyeah, I got a 1 min cooldown myself for explaining a word I did ***star out

quiet geyser
#

But yeah, that aside, a parameter to set how many people need to be nearby sounds good πŸ˜…

winter rose
#

oooh, a bug

#

15:15:03 [GERSL1,"< 1"]
15:15:03 Unknown attribute itemsCmd
15:15:03 Unknown attribute itemsCmd
15:15:03 [B Alpha 1-1:2,"< 1"]
15:15:03 Error in expression <) then
{
diag_log [_this, "< 1"];
_this setUserActionText [_this getVariable "FU>

#

when selecting another unit (via F2) while the action is up

#

or "hidden feature", at least
it seems that _this (in addAction's condition) changes depending on who is selected 🀨 πŸ˜„

quiet geyser
#

Very lovely work. I won't be able to test the group member additions until tomorrow, but thank you very much for all of your work. Like I said, you should really post this script up somewhere. I can think of a ton of people who would want to use it.

winter rose
#

well, I don't know of any public SQF scripts library so far but maybe one day πŸ˜‰ feel free to share to lovely people needing it

quiet geyser
#

Excellent work again. Cheers, and I'll let you know if there's any issues with it in a live server environment tomorrow

winter rose
#

Customer Service ready for action, sir!

spiral temple
#

Is there any scripting function that overwrites the vehicle config value of armor? I just found setVehicleArmor but it's just like setDamage

tough abyss
#

couldnt you just use set object scale on a smaller vic and then detect when its dead then create a satchel charge and blow it up? i know it's be a bit of work but it might work

jolly dune
#

Hii, guys can you help me with something?

Basically I need this to work on server, it works on AI unit in singeplayer but im not sure how to implement it on dedicated server.. I need a unit to be just bigger, thats all.

[] spawn {
while {alive dude1} do {
dude1 setObjectScale 0.3;
};
};

winter rose
#

see notes (performance would be awful)

jolly dune
hallow mortar
#

setObjectScale requires local arguments so you need to make sure it's executed where the affected unit is local (or possibly even everywhere since its behaviour may not be normal)

open fractal
#

on each frame as well not just in a while loop

winter rose
#

see notes
:-)

open fractal
#

those were clearly written just to be skimmed over and ignored

leaden ibex
#

I am back with another question!
disableAI https://community.bistudio.com/wiki/disableAI - If the unit changes locality, this command might need to be executed again at the new locality to maintain effect.
Is there a way to detect if locality has changed?
Is all AI by default "owned" by the server? Once a player joins and "takes over", is that unit owned by the player? If this player leaves, is the unit (AI) owned by the server again?

I've got this script

{
  _x disableAI "AUTOTARGET";
  _x disableAI "TARGET";
  _x disableAI "FSM";
  _x disableAI "MOVE";
  _x stop true;
  _x setBehaviour "CARELESS";
  _x allowFleeing 0;
  _x disableConversation true;
  _x setVariable ["BIS_noCoreConversations", false];
  _x setSpeaker "NoVoice";
} forEach playableUnits;

Do I just run it once on mission start, or do I also need to create a handler for HandleDisconnect and run it again with the unit as a parameter?
So far it never worked 100%, so any insight into this is really welcome!

leaden ibex
#

So running this on mission start and then every time the Local event get's fired should get the job done?
(AI should just stand still, if player disconnects, the AI should just "freeze")

winter rose
#

TBH I am not sure about

If the unit changes locality, this command might need to be executed again at the new locality to maintain effect.

it might be that the command only works where it has been applied when the object is local
but again, it might also be "the command is ignored if the object is not local", too.

leaden ibex
#

Well, the Local event handler might help me, thank you!
Will experiment with it a little more

winter rose
#

good luck!

#
[_unit, false] remoteExec ["allowDamage", _unit];
_unit setVariable ["ILBI_allowDamage", false, true];
#

and in the local EH, get that variable to see if true or false?

leaden ibex
#

Thanks man, I'll report back with either broken framework, or a thank you note

winter rose
#

hehe noice! GL

winter panther
#

I have an addAction that when triggered, runs a script with execVM. Inside the script, I run setDamage [1, false]; on a vehicle. But this doesn't work for some reason. The line is executing, the vehicle is valid and alive, but the setDamage doesn't work. If I run it from the command console, it works. Do anyone know why could this be happening?

#

this is the script:

params["_veh"];

if (isNil "_veh") exitWith {};
_isDeployed = _veh getVariable ["deployed", false];
_isAlive = alive _veh;
if (!_isDeployed) then {
    if (alive _veh) then {
        _veh setDamage [1, false];
        hint "RESPAWNING";
    };
}
else
{
    hint "VEHICLE IS DEPLOYED. CAN'T RESPAWN";
};
#

the hint "RESPAWNING" is displayed, but the vehicle doesn't take any damage

#

setDamage has global params and effect, so it shouldn't be necessary to do remoteExec. I also tried to do remoteExec on the server but didn't work

winter rose
#
[_veh, [1, false]] remoteExec ["setDamage", _veh];
winter panther
#

Hmm didn't work. I still get the hint, but it's not applying damage. I tried with a different vehicle placed in the editor, and it didn't work either.

#

if it helps, this is what's in the init field of the object that has the action:

call{
this addAction [["<t color='#FF0000'>", "RESPAWN MHQ", "</t>"] joinString "","scripts\respawnMHQ.sqf", [mhqv1], 1.5, true, true, "", "true", 10];
}
winter rose
#

what if you set it to true?

hallow mortar
#

Are you definitely looking at the right vehicle? I know you've checked that the vehicle is valid, but is it the one you're looking at when you test or might there be a similar one elsewhere you've got mixed up with?

winter panther
#

oh I think I found the problem

#

addAction sends 4 params to the script, the fourth one is the custom arguments

#

I was trying to kill the object that has the action

#

yep, that was the problem. Thanks ppl

frigid oracle
#

What is the best way to spawn a while loop in a mod not mission? I currently have my script setup to execvm 3 scripts inside the XEH_postInit but I feel like its not starting up correctly or something. The first execvm starts up, but the others sometimes does not I feel. My while loops work correctly when I run them in debug console but seems to not startup correctly on mission boot or something.

slim venture
#

Hey guys, does anyone have the python code with opencv to plot the Armas 3 boundingbox in the image (print)?

little raptor
frigid oracle
#

well I debug the loop and every condition fires true

#

when I run the whole loop in debug it runs correctly

#

so idk if the mod is firing the script up correctly

little raptor
#

mods don't do anything special

#

so either your postInit EHs are wrong, or the loops themselves

frigid oracle
#
if !(hasInterface) exitWith {};
_handle1 = execVM '\KPP_RadiationSystem_indev\functions\radscore\KPP_RadiationCore.sqf';
_handle2 = execVM '\KPP_RadiationSystem_indev\functions\radscore\KPP_GeigerTicks.sqf';
_handle3 = execVM '\KPP_RadiationSystem_indev\functions\radscore\KPP_WarningBeeps.sqf';

here is what is in my postInit

#

RadCore works correctly all the time

#

but the other two seem to not start up all the time

little raptor
#

what do they contain?

frigid oracle
#

while loops

#

3 loops in total

little raptor
#

I mean I want to see the actual codes

frigid oracle
#
while {radSystemToggle && KPP_Boolean_GeigerCounterWarningBeep && {"KPP_GeigerCounter" in items player}} do {
    if (KPP_Float_RadsValue >= KPP_Int_GeigerCounterWarningBeepThreshold) then {
        playSound "warning_beep";
        sleep 4.5;
    } else {
        sleep 4.5;
    };
};
#

beeps

#
while {radSystemToggle && KPP_Boolean_GeigerCounterTicks && KPP_Float_AreaRads >= RadiationValueLight && {!isNil {radObjects select 0} && {"KPP_GeigerCounter" in items player}}} do {
    private _sndList = selectRandom [
        "geiger_1",
        "geiger_2",
        "geiger_3",
        "geiger_4",
        "geiger_5",
        "geiger_6"
    ];
    switch (true) do {
        case (KPP_Float_AreaRads == RadiationValueHigh): {
            playSound "geiger_long";
            sleep 6.05;
        };
        case (KPP_Float_AreaRads == RadiationValueMedium): {
            playSound _sndList;
            sleep (random [0.01, 0.05, 2]);
        };
        case (KPP_Float_AreaRads == RadiationValueLight): {
            playSound _sndList;
            sleep (random [0.01, 0.5, 2]);
        };
    };
};
``` ticks
little raptor
#

have you defined radSystemToggle and KPP_Boolean_GeigerCounterWarningBeep?

frigid oracle
#

yeah

little raptor
#

and other global vars?

#

where?

frigid oracle
#

hence the condition saying its true

little raptor
#

where did you define them?

frigid oracle
#

XEH_PostInit

frigid oracle
#

below

#

lemme go edit that post real quick

little raptor
frigid oracle
#

ah ok

#

lemme try that then

little raptor
#

for the other:

"KPP_GeigerCounter" in items player

#

there may not even be a player

#

your while loop starts working if you switch to another player for example

frigid oracle
#

when I drop the item the condition fires false, when I pick it up true

little raptor
#

my point is that your while loop is not persistent

#

as soon as it's false, it completely stops

little raptor
frigid oracle
#

it updates correctly when the loop is active

#

issue is think the loop isnt starting up sometimes cause of how im trying to start it or something

little raptor
frigid oracle
#

I have, thats how I confirm the loop works

little raptor
#

so the loop magically starts working after you drop and pick up the item?!

frigid oracle
#

yeah

#

well no

#

it stops when I drop it

#

the behavior I want

#

and starts when I pick it up

little raptor
#

you'll see what I mean

frigid oracle
#

i've only noticed this issues as when I sent the mod to my friend he had the issue of the loops not working

#

then when he restart the mission to stream and show me it started working all of a sudden

little raptor
#

it will never start again, unless you have an event handler that controls when to start the loop somewhere

frigid oracle
#

Well if that is the case truely what event handler would I need to reduce/fix the issue?

frigid oracle
#

how does this even handler apply when the unit spawns with the item?

#

Oh ok I found something interesting

#

decided to actually use that diag_activeSQFScripts command and found out that geigerticks is actually not running

#

warningbeeps and core are.

#

which explains why those two seems to always works fine expect ticks

woeful quartz
#

Anybody got a working flak script that will work on any AA?

frigid oracle
#

strange I think I figured it out

#

I reduced the amount of stuff being checked in the while condition and it works perfectly now on every startup

#

I guess while has a limit on what or how much it can check

little raptor
#

you have several conditions. if one of them is not true then the while loop stops

#

and you never restart it, because there is nothing to restart it in your code

little raptor
#

you could easily break it by testing it like that

brazen lagoon
#

how would you filter out weapon classnames that aren't weapons? like how would I filter out binocs and such

frigid oracle
little raptor
#

anyway, using its type

brazen lagoon
#

yeah I mean like, things that don't fire things like. bullets or grenades or so on

#

I could always check its ammo + simtype

#

@little raptor do you mean the 'type' config entry?

little raptor
#

yes

brazen lagoon
#

is there an explanation of how that works

little raptor
#

Β―_(ツ)_/Β―

brazen lagoon
#

lmao

brazen lagoon
#

thanks though

#

lol it just says its an integer

#

and nothing else :v

little raptor
#

well 1 is primary

#

2 is handgun

#

4 is launcher

#

and some large number is vehicle weapon

#

probably 65536

brazen lagoon
#

πŸ‘

little raptor
#

I don't know what Type=WeaponHardMounted is supposed to mean meowsweats

winter rose
#

come to my room, I'll show you 😏

smoky rune
#

Is there any command to check if player sees some object (maybe it's tied to raycasting, so command to cast ray from player's eyes to to object and see if intersects anything)?

little raptor
#

or lineIntersects

#

or checkVisibility

little raptor
winter rose
#

ah, noice! *unlocks the door* you're free then πŸ˜„

little raptor
winter rose
#

{{Link|#paragraph}} πŸ™‚

#

{{Link}} covers ExternalLink and HashLink now

little raptor
winter rose
#

it does, but you have to escape that {{=}}!

#

or use |text= my text with = sign

tough abyss
#

Note to self: do not spend days trying to debug MP performance issues only to find out that they were caused by my friend setting a projectile's speed to the literal speed of light

#

Interestingly enough it didn't cause any performance drop in SP... somehow

granite sky
#

fun. I wonder if object update rate is scaled proportionally to velocity or something.

tough abyss
#

I'm sure the network loved needing to update its position by 300,000,000 meters every second

hallow mortar
#

What's the difference between unitBackpack and backpackContainer, if any?

hallow mortar
#

Yes, but that's from 2014 so I was just wondering if anything might have changed.

frigid oracle
#

is it possible to get cutText on the top of the screen rather than center or below

austere wigeon
#

Is there a Discord specifically for ACE3? If not, may I ask a scripting question here about it?

warm hedge
austere wigeon
# warm hedge Yes, and yes anyways https://discord.com/invite/FVkgwggNcZ

Thank you πŸ™‚ It's a fairly simple question...
I want to call ace_medical_fnc_addDamageToUnit which simply takes "Damage" as a number as one of its parameters. But I can't find anywhere what the acceptable "range" of damage should be. Is it 0 to 1? 0 to infinity? I just want to avoid values that would constitute instant death, but there doesn't seem to be any documentation I can find or helpful comments in the source code that would hint at what a sensible number would be.

granite sky
#

I would think the quickest way would be try-it-and-see.

#

I'm gonna guess it's the same scale as Arma damage values, so roughly 0-1 but potentially larger for headshots etc.

austere wigeon
#

Gives me a start. TYVM

granite sky
#

Bear in mind that with ACE, a small bruise can cause death under the wrong circumstances.

#

(typically when someone was bandaged up but not stitched)

austere wigeon
open fractal
#

see cba settings for that

#

you can adjust it in addon options

#

most stuff in ace can be tweaked on your end

#

including causes of death

quiet geyser
#

@winter rose so, a couple of small bugs I've noticed (can work around them but fixing is obviously better) with the rally point script:
There's a noticeable (roughly 5 second) delay on the object being moved. This may be because the server was under heavy load, and isn't a huge issue.
This one is more important. For whatever reason, after deploying the rally point once, the marker doesn't move, then when you deploy it again, it moves to the previous position. From that point onwards, it's always one "placement" behind where you want it.

rough summit
#

How can i perform helicopter to land?
AI looks so buggy and don't landing after reaching waypoint.

#

Im spawn helicopter and create vehicle crew

    private _airVehicle = createVehicle [(selectRandom _helicoperClasses), getMarkerPos _spawnMarker, [], 0, "NONE"];
    private _airCrew = createVehicleCrew _airVehicle;

After im create check for spawn and initialize

    waitUntil {!isNull _airCrew &&  !isNull _airVehicle};

Create cargo group and push into group (and vehicle) units

    private _landSoldiersGroup = createGroup [West, true];

    private _squadLeader = _landSoldiersGroup createUnit [_squadLeaderClass, getMarkerPos _spawnMarker, [_spawnMarker], 10, "NONE"];

    _squadLeader moveInCargo _airVehicle;

After that im set destination via

private _reinforcementsOffest = _reinforcementsPosition getPos [(random [100, 150, 200]), random 360];
private _landPos = [_reinforcementsOffest, 1, 500, 15, 0, 30, 0] call BIS_fnc_findSafePos;
private _landPad = createVehicle ["Land_HelipadEmpty_F", _landpos, [], 0, "NONE"];
_airCrew move _landpos;

And set land command where this heli is near of position

while {uiSleep 1; !(isTouchingGround _airVehicle) || !(alive _airVehicle || !isNull _airVehicle) || (count (units _airCrew select {alive _x}) == 0) || ((count (units _landSoldiersGroup select {alive _x}) == 0))} do {
    _airVehicle land "GET OUT"; // "LAND"
};

But heli didn't land 😦
P.S This is part of script (full script contains much more lines)

tough abyss
#

@warm hedge Goal is the spawn rain puddles, as well as create a realistic looking rainfall particle effect coming off roofs

copper raven
round scroll
#

The Nimitz has a fairly complex init script system where the sub-systems are spawned dynamically and arranged on the carrier. Now if I try to spawn the Nimitz via Zeus on a dedicated server the server crashes with dump files generated. I see 12:05:47 Ref to nonnetwork object 4bf48100# 166167: empty.p3d REMOTE as last message from default_init.sqf for the in-mission init script. I suspect the complete script is broken as somehow the locality of a Zeus spawned entity is not the server, or? I added _nimitz setOwner 2; to the init script, but that probably does not work from init?

rough summit
somber radish
#

Anyone with experience building extensions?
I am building a super-simple extension (just copying the example on biStudio.com)
However I am getting this error message:

Trying to load a x86 DLL 'C:\<CENSORED>\@MyExtension\dllExtensionTry_x64.dll' from a 64-bit executable

Any help anyone?

round scroll
#

did you compile it as 64bit extension?

somber radish
#

no

#

How do I do that?

#

I just used the build option

#

and got a dll file

round scroll
#

which make system do you use?

somber radish
#

Visual studio 2019

round scroll
somber radish
#

thank you btw!

#

I used duck duck go, didnt get a decent result

somber radish
#

I already went trough:

https://stackoverflow.com/questions/1159161/how-to-compile-a-64-bits-version-of-my-dll

&&

https://stackoverflow.com/questions/50164687/how-to-compile-a-64-bit-dll-written-in-c
winter rose
winter rose
distant oyster
#

I have an Eden mod with the following expression:

            expression = "[_this] execVM 'test.sqf';";
``` and the following test.sqf:
```sqf
params ["_box"];
[_box, ["Test Action", {hint "Hello World";}]] remoteExecCall ["addAction", 0, _box];
``` but on the connecting player I get two addActions?
#

the expression is only evaluated on the server afaik

winter rose
#

-0 :-)

somber radish
#
[_box, ["Test Action", {hint "Hello World";}]] remoteExecCall ["addAction", 2];

or

[_box, ["Test Action", {hint "Hello World";}]] remoteExecCall ["addAction", 0];
somber radish
#

oh

winter rose
#

the issue comes from running it from the init
the init runs for the server and for every client, including JIP

little raptor
winter rose
#

well it might be the same

distant oyster
#
// Expression called when applying the attribute in Eden and at the scenario start
// The expression is called twice - first for data validation, and second for actual saving
// Entity is passed as _this, value is passed as _value
// %s is replaced by attribute config name. It can be used only once in the expression
// In MP scenario, the expression is called only on server.
somber radish
distant oyster
#

only in Eden i think

little raptor
#

I meant this

distant oyster
quiet geyser
somber radish
# little raptor

Unfortunately I am not able to send screenshots here or I would sho you.
I am on that page and just do not get the same option

winter rose
somber radish
#

And you are getting these options with a C# class library project?

little raptor
#

ofc yes meowsweats

somber radish
#

Well... I am not...

little raptor
somber radish
#

hmm... I'll check...

leaden ibex
#

@somber radish
Right click on the project and go to properties. Choose the Application tab and, on the right side, you have an option called Output Type. You can choose whatever you want; for example, if you want your project to emit a DLL, just choose Class Library.
From: https://stackoverflow.com/questions/56044025/visual-studio-2019-exports-c-sharp-program-as-dll-instead-of-exe

(Simple fix, use C++, C++ masterrace kalm)
(In case your add-on/extension becomes popular, you're making the life living hell for Linux admins dogeKek)

somber radish
somber radish
rough summit
winter rose
#

indeed, that's quite some intricate setup - cool you found!

quiet geyser
#

I checked all the variable names as well, they seem like they line up fine. I doubt those would be it as the respawn_west markers were moving, just one jump behind the bag

#

Actually, just occurred to me: the delay is what's screwing it. Is there any chance I could trouble you to set the marker move to be after the bag, with a delay of 10 seconds?

#

To be clear, by bag, I'm referring to the object. We're using a backpack heap for the object lol

little raptor
quiet geyser
#

No. The issue is just that when there's high load on the server, the script is a bit delayed.

little raptor
#

high load on the server or clients?

#

did you check diag_activeScripts on the clients?

quiet geyser
#

High load on both. All that needs to move here is the segment of the script which moves the respawn_west markers.

little raptor
#

the only thing I can think of is that the object doesn't get moved instantly because it's not local to the clients

#

you're trying to fetch the rally point's position and set it on the marker, while it may not have moved at all yet (as you said it yourself, it happens with a 5s delay)

#

just use the position you set on the rally

#
_rallyPoint setVehiclePosition [_pos, [], 0, "NONE"];
_markerName setMarkerPos _pos;
#

_pos set [2, 0]; // on the floor
_pos is always "on the floor"

proven charm
#

what you guys think about first calling endMission on client that's been idling for too long and then after few secs kick him? So that the player slot is freed. This is the best I come up with so far.

#

endmission so that client sees the reason for the kick

quiet geyser
winter rose
proven charm
#

anyone know why this works with owner but not with ID? _pw serverCommand format["#exec ban %1", owner _plr];

#

tried getPlayerUID & getPlayerID

proven charm
winter rose
#

that's not my question

proven charm
winter rose
#

does ban take uid?
does the ban server command take a UID as parameter?

proven charm
winter rose
proven charm
#

Ah I was missing quotes . works now! thx!

little raptor
#

screenToWorld doesn't detect the "wall" anyway

#

Only terrain

#

Not sure about water tho

#

iirc ignored

winter rose
#

noice
I did set this as a safety, I didn't remember the behaviour

#

so maybe a lineIntersects check would be noice, to be "100% cool"

quiet geyser
#

Any thoughts on getting around server load delay?

winter rose
#

nope πŸ˜„ don't get an overloaded server!

quiet geyser
#

is it possible to just put a sleep delay on the marker move?

winter rose
#

the "marker going one step later" that's weird and shouldn't happen

#

are you sure you did remove all your other "marker moving" scripts?

winter rose
#

the marker is setPosed before the object is due to network
try

[_spawnPoint, _posAndOtherArgs] remoteExec ["setPosStuff", _spawnPoint];
[_marker, _pos] remoteExec ["setMarkerPos", _spawnPoint];
```to sync them
quiet geyser
#

where would I put that in the script?

winter rose
#

don't copy/paste it, it's pseudocode πŸ˜„

#

@little raptor this would line them in the JIP queue and update only when it's done I believe

#

though… because of setVehiclePosition the marker won't be pinpoint on the location

little raptor
winter rose
#

so yeah, @quiet geyser , line 52

_markerName setMarkerPos getPosWorld _rallyPoint;
// replace with
_markerName setMarkerPos _pos;
tough abyss
#

is there any invisible objects other than the helipad?

little raptor
#

Plenty

winter rose
tough abyss
#

tried that performance goes down a lot because im attaching a player to it

#

basically what im doing is having an area that if a player goes into it they start levitating then die

#

but because pub zeus restrictions

#

have to try attachto

#

then set an objects velocity

winter rose
#

aaand… why do you need invisible objects for that?

tough abyss
#

so they cant see it and it is mysterious

#

i suppose i could try make it small with setobjectscale

winter rose
#

what's wrong with the helipad?

tough abyss
#

no that wouldnt work

#

isnt it attached to the ground?

winter rose
#

no

#

well, the decal is, but an invisible helipad itself is in the air if you set it there πŸ™‚

tough abyss
#

ok thanks

little raptor
#

There are other invisible objects

tough abyss
#

cfg names etc?

little raptor
#

I don't remember meowsweats
On mobile rn

tough abyss
#

ah ok dw ill find a fix

winter rose
little raptor
#

I don't use my memory for that stuff πŸ˜…

winter rose
#

good 😁 db exist for a reason

tough abyss
#

database's are best setup on excel change my mind

little raptor
#

They're invisible by default

winter rose
tough abyss
#

how much therapy?

winter rose
#

in the first two months I created on the side a db + a web interface for customer service logging (yeah, they tried to make me write on PAPER for every call) - they didn't renew my trial period, and they signed me immediately 😁

tough abyss
#

the real question is was this early bohemia interactive?

winter rose
#

it was 12 years and 5 months ago 😎 in France

quiet geyser
#

An aside and unrelated to my rally point thing, having an issue where for whatever reason players that should be able to can't call in any support. Support provider modules are synced to the requester module, a HQ unit is present and being read by the modules. The link from the players who should be able to call the support are applied by a short line in their init:

[RTO,SuppReq] call BIS_fnc_addSupportLink;```
This works just fine locally, but for clients on a dedicated server it's not a fan. What's a good way around this?
winter rose
#

run a player-hosted server? πŸ˜›

quiet geyser
#

Yeah, performance issues would bugger that very hard. Is there a better way to apply this line on both server and clients, and make sure it applies on respawn? I would assume onPlayerRespawn.sqf is the way to do it, but I need to make ti so that it's only for certain variable names

quiet geyser
#

that's what SuppReq is

#

RTO is placeholder for a player variable name (there are a few), SuppReq is the requester module which is itself connected to the providers

winter rose
#

[requesterUnit, requesterMod, providerMod]
I count three parameters

[RTO,SuppReq]
I count two arguments

#

RTO is placeholder for a player variable name
use player then?

tough abyss
#

prepare for some bad formatting
ok so im getting a no ; error at _Ent = createVehicle "Land_HelipadEmpty_F" #position pos1;
pos1 is defined as an init name which i believe is global

_Ent = createVehicle "Land_HelipadEmpty_F"  position pos1;
_Array1 = _Ent nearEntities ["Man", "Car", 5];
_obj1 = createVehicle "Land_HelipadEmpty_F" _Array1;
_Array1 attachTo [,_obj1 [0, 0, 0]];
_obj1 setVelocity [, 0, 0, 10];
_posATL = _Ent modelToWorld [0, 0, 10];
_ps1 = "#particlesource" createVehicleLocal _posATL;
_ps1 setParticleParams [["\A3\data_f\ParticleEffects\Universal\Universal.p3d",16,13,2,0],"","Billboard",0.07,5,[0,0,0],[0,0,6],0,4,7.9,0.1,[0.5],[[0.251196,0.0512141,0.401182,1]],[1000],1,0,"","","",0,false,0,[[0,0,0,0]]];
_ps1 setParticleRandom [1,[2,2,2],[0,0,15],20,0,[0,0,0,0],0,0,1,0];
_ps1 setParticleCircle [0,[0,0,0]];
_ps1 setParticleFire [0,0,0];
_ps1 setDropInterval 0.01;
winter rose
#

very, very, very first line - the rest doesn't matter.

tough abyss
#

ive had issues befor but i suppose nothing being made there could conflict

winter rose
#

I don't know what it is supposed to mean

#

your issue is here

_Ent = createVehicle "Land_HelipadEmpty_F"  position pos1;
#

also, what is pos1 exactly?

tough abyss
#

the init name of an invisible helipad

winter rose
#

ah, ok. named like this, it could be a position, not an object

tough abyss
#

i dont need position

#

i tried earlier without

#

didnt work either

winter rose
#

so because both don't work, it means you don't need position? wait, what is that logic πŸ˜„

#

"your engine is dead"
"I don't need the key to start the car! I tried without earlier, it didn't start either"
sorry but no 😁

tough abyss
#

i just saw r3vo's reply tbh

#

but my brain smol

#

i fail to see what is wrong is it something to do with how defined pos1?

stable dune
#

Does that nearEntities work without you are selecting there which you want and If its empty array IT doenst work.
I had select and check so i got work my nearEntities loop work.

while {alive TAG_myObject} do {
_nearest = TAG_myObject nearEntities ["Man", 2];
if !(_nearest isEqualTo []) then {
    _nearest = _nearest select 0;
    if (isPlayer _nearest) then {
            _nearest setPos [(getPos _nearest select 0) +10, getPos _nearest select 1, getPos _nearest select 2];
        };
    };
sleep 0.5;
};
winter rose
#

hint #2

tough abyss
#

is the position not getting the position of pos1?

#

wait

#

im sooooo stupidd

winter rose
#

TYPE createVehicle POSITION
πŸ˜„

tough abyss
#

i need to put my palm through my face real quick

winter rose
#

not stupid, but don't code when exhausted (and/or drunk πŸ˜‹)

tough abyss
#

im 16 not drunk but tired ish

tough abyss
winter rose
stable dune
#

It was for you, i had problem with nearEntities, i got that work Leo or Lou answered here that gives more than 1 array or nothing. So If you dont have anything what you select from array it will give error

winter rose
#

yes

stable dune
winter rose
#

if the array is empty, selecting 0 will return nil, above will throw an error
so check before that if the array is empty with isEqualTo []

#
private _theArray = /* blablabla */
if (_theArray isEqualTo []) exitWith {};

// _theArray has content, we can work
stable dune
#

Yeh

cosmic lichen
winter rose
#

the sky

cosmic lichen
#

You, when I shoot you too the moon

stable dune
quiet geyser
winter rose
#

no idea!

winter rose
#

also no

stable dune
#

Ye, thats what i was trying to answer to nucle problem

tough abyss
#

it'd propably pop up with some error about not expecting an array

cosmic lichen
quiet geyser
# winter rose no idea!

Would there be any way to apply it to certain variable named player slots in onPlayerRespawn.sqf?

stable dune
# tough abyss _prepare for some bad formatting_ ok so im getting a no ; error at ``` _Ent = ...
//pos1 is defined as an init name which i believe is global
_ent =  "Land_HelipadEmpty_F" createVehicle getPosATL pos1;
_array1 = _ent nearEntities ["Man", "Car", 5];
if !(_array1 isEqualTo []) then {
_array1 = _array1 select 0;
_obj1 ="Land_HelipadEmpty_F" createVehicle  getPosATL  _array1;
_array1 attachTo [_obj1 [0, 0, 0]];
_obj1 setVelocity [0, 0, 10];
_posATL = _ent modelToWorld [0, 0, 10];
_ps1 = "#particlesource" createVehicleLocal _posATL;
_ps1 setParticleParams [["\A3\data_f\ParticleEffects\Universal\Universal.p3d",16,13,2,0],"","Billboard",0.07,5,[0,0,0],[0,0,6],0,4,7.9,0.1,[0.5],[[0.251196,0.0512141,0.401182,1]],[1000],1,0,"","","",0,false,0,[[0,0,0,0]]];
_ps1 setParticleRandom [1,[2,2,2],[0,0,15],20,0,[0,0,0,0],0,0,1,0];
_ps1 setParticleCircle [0,[0,0,0]];
_ps1 setParticleFire [0,0,0];
_ps1 setDropInterval 0.01;
};

tough abyss
#

was more for 1 line

#

thanks a lot if it is

hallow mortar
#

Both instances of createVehicle in that are still wrong. That's not a valid syntax

tough abyss
#

yeah i know

#

fixed that before

#

had a big facepalm

winter rose
distant oyster
#

yeah? isn't it already?

quiet geyser
# winter rose no idea!

Yeah it turns out I'm a fucking moron and put the wrong variable name into the existing inits lmao

#

No need for anything complex

round scroll
#

back to the Nimitz. When zeus spawning it on dedicated server I get the following debug output now: 18:27:09 Mission id: de2911ef5117f5467726756977dea68c22e9b513 18:27:20 "Nimitz: 4ad6c100# 166167: empty.p3d REMOTE" 18:27:20 Ref to nonnetwork object 4ad6c100# 166167: empty.p3d REMOTE I guess this means that the init script is executed with a different client id than server, e.g. the Nimitz object is Remote to the script and stuff stops working.

#

I'll try remoteExec the init function on the server now: // _nimitz call TTT_nimitz_fnc_defaultInit; [_nimitz] remoteExec ["TTT_nimitz_fnc_defaultInit", 2];

quiet geyser
#

I've asked this in a few other places, but is anyone aware of a way to make the CAS bombing run module into requesting a gun run instead? Somewhat akin to the Zeus module.
The idea here is to have an A-10 that the player RTOs can call for pinpoint suppression, but bombing runs just aren't quite what I'm looking for. Nothing else I can find seems to help in this regard, and ideally this would still be going through the supports menu.

tough abyss
#

use cfg vehicles to get the a10 strafe

#

then find where the player is looking

#

then make a way for the player to activate it addaction if you want ot be fancy group artillery menu

#

create the vehicle where theyu are looking

quiet geyser
#

Not sure you're following what I'm saying; I want it to go through the exsting Supports menu which you get from using the Support modules in editor. There is a way to enact a script on the spawned aircraft; was wondering if it would be possible to remove the vehicle's loadout leaving it only with guns, then forcing it to use said guns on the marked point?

tough abyss
#

you can make it use guns

#

there is a module just for guns

quiet geyser
#

There's a Zeus module, not an editor module.

tough abyss
#

you can use createvehicle to get the zeus one

#

the runs are in cfgvehicles

round scroll
quiet geyser
#

Yeah on an Australian internet connection not sure I'm going to be downloading the entirety of Unsung for that one, sorry. Anything a bit more digestible you'd be able to point me towards?

tough abyss
#

my b im thinking of artillery target

round scroll
#

copy the BI function and modify it

quiet geyser
#

which function

round scroll
#

modules_f_curator\CAS\Functions\fn_moduleCAS.sqf

quiet geyser
#

Yeah looking at that now, thanks. Pretty much all of this is over my head so don't worry about it.

round scroll
#
    _weaponTypesID = _logic getvariable ["type",getnumber (configfile >> "cfgvehicles" >> typeof _logic >> "moduleCAStype")];
    _weaponTypes = switch _weaponTypesID do {
        case 0: {[ "vehicleweapon" ]};
        case 1: {[ "rocketlauncher" ]};
        case 2: {[ "vehicleweapon", "rocketlauncher" ]};
        case 3: {[ "bomblauncher" ]};
        case 4: {[ "missilelauncher" ]};
        default {[]};
    };```
#

gun is vehicleweapon as far as I remember

quiet geyser
#

Also this still seems to be operating off the Zeus module, not the editor ones at least as far as I can tell

#

The existing bombing run module works fine it's just that in this use case I'd want to make the aircraft use guns instead.

round scroll
#

you can modify the radio menu as well

#

but if the moduleCAS is already too tough, this might be to involved, sorry to say

tough abyss
#

couldnt he just use an ai waypoint with removeweapon?

round scroll
#

moduleCAStype = 0 should do the trick in the module, or?

#

@quiet geyser this is the call napalm script from Unsung: https://sqfbin.com/zakomotucisaruwebijo you need to at least change vehicle to your plane type class and type to 0. Also uns_mbox_fnc_moduleCAS needs to be the vanilla CAS module or a copy of it, at you preference. I would use this as addAction for now and once you get it working I share the radio support menu stuff with you

quiet geyser
#

Have tried implementing that as an addAction, keep getting back this error:

[BIS_fnc_moduleCAS] No weapon of types ["machinegun"] wound on 'CUP_B_A10-_DYN_USA'```
I assume "wound" there is found. What's odd is that the vehicle most definitely has a gun.
#

Have tried the other types (2 for guns/launcher) and they don't want to work either, it can't seem to find any weapons on the plane. When you place it by default in the editor it's absolutely stacked with munitions so I don't think it's an issue with the plane itself there.

open fractal
quiet geyser
#

Oddly enough, I may have found a good fallback if this doesn't work. For whatever reason, the Helicopter Attack module still supports fixed wing, and basically just functions like a search and destroy directive. Means that if we can't get a targeted gun run (which is ideal) working, at least players can still call in an A-10 to hunt down some targets.

quiet geyser
open fractal
#

"CUP_Vacannon_GAU8_veh" is the weapon name

#

not "machinegun"

quiet geyser
#

If you check the script TeTeT linked above, that's not something I'm defining. It's taking that (presumably a category or class of weapon) from the CAS module.

open fractal
#

then you're looking for "vehicleweapon"?

#

if it's a text entry try without quotes as well

round scroll
#

it's not looking for it verbatim, it uses https://community.bistudio.com/wiki/BIS_fnc_itemType : sqf _weapons = []; { if (tolower ((_x call bis_fnc_itemType) select 1) in _weaponTypes) then { private _firstMag = getArray(configFile >> "CfgWeapons" >> _x >> "magazines") # 0; private _ammo = getText(configFile >> "CfgMagazines" >> _firstMag >> "ammo"); private _airLock = getNumber(configFile >> "CfgAmmo" >> _ammo >> "airLock"); // ignore air to air weapons if (_airLock != 2) then { _modes = getarray (configfile >> "cfgweapons" >> _x >> "modes"); if (count _modes > 0) then { _mode = _modes select 0; if (_mode == "this") then {_mode = _x;}; _weapons set [count _weapons,[_x,_mode]]; }; }; }; } foreach (_planeClass call bis_fnc_weaponsEntityType);//getarray (_planeCfg >> "weapons");

#

I really think for your purpose it's much easier to fork the moduleCAS function and hardcode your cannon weaponry to it

faint oasis
#

Hi, is there a way to remove the "goggles" added automatically with the "createUnit" command ? I tried "removegoggles" but it doesn't work. I think the goggles are added after

hallow mortar
#

You could wait a moment with e.g. sleep 0.1

faint oasis
winter panther
#

How can I find the icons of vehicles for a marker? I mean the icons that are displayed on the map on allied crewed vehicles or enemy contacts, NOT the NATO icons.

hallow mortar
#

I'd hazard a guess it could be found in the vehicle's cfgVehicles entry

winter panther
#

ah yes, it's the "icon" of the cfgVehicles entry. Thanks

#

I guess I can't use any PAA file as marker

distant oyster
quiet geyser
#

Can second -par; I've been using it on my dedicated server for a few months now. Oddly enough we actually had problems with our server provider and particular mods; had to use -par to get the commandline to read properly which was bizarre. Now we use txt file modlines for everything as it lets us change modsets really quickly.

distant oyster
#

does anybody know where the rpt is written to when you start two instances of the game without specifying the -profiles parameter?

little raptor
#

isn't it written in the same place?

#

it should just have a different timestamp

distant oyster
#

apparently not, it only creates an rpt for the first instance

worthy igloo
#

Whenever I add any Arma3Profile files to \Documents\Arma 3 - Other Profiles\User and load in game with it add of its data is reset is there any way to stop this

granite sky
#

If you're trying to transfer them between profiles, you need to rename to match, and Arma must be shut down first.

worthy igloo
winter rose
severe frost
#

Will moveInGunner work for two-seated jets? Im having difficulty with it

#

player moveInGunner _jet1; is the command I'm using

warm hedge
#

Depends on the plane

severe frost
#

Its the phantom from SOG:PF

warm hedge
#

Probably moveInTurret instead

severe frost
tough abyss
#

What is the purpose of the cross product in arma 3?

#

I know what the cross product is but how does arma 3 use it?

little raptor
#

Same way it's used everywhere else blobdoggoshruggoogly

#
_n = _vec1 vectorCrossProduct _vec2
tough abyss
#

Creates a vector perpendicular to the other vectors?

little raptor
#

Yes

tough abyss
#

Which is used to derive the Z axis?

little raptor
#

A normal axis

tough abyss
#

Ohhh. So plane presented in Tangent space is gets the normal axis of geometry of an object like a house or car.

#

Namely the normal of the actual model triangle?

#

Or whatever it is, that must be how the eden editor snaps objects to surfaces.

#

What is the purpose of the SetVectorUp command?

#

I see it used everywhere but what does it do exactly?

little raptor
#

Sets the up vector of the model to the vector in world

tough abyss
#

Sort of like defining the local axis in a model vs global axis?

little raptor
#

I don't know what you mean by vs

#

It just sets the up vector

tough abyss
#

What is the up vector?

little raptor
#

A vector pointing to the up (+z) of the model

tough abyss
#

Ah.

#

I noticed a command called LinearConversion could this be used to convert my problem of 0 - 360 to a representation of 0 to 1

#

?

little raptor
#

Yes

tough abyss
#

Ah ha.

#

Another question I am trying to find out how to create arma 3 water particles. I'm mucking around with the idea of water running off the roof of a building, how could I go about doing this?

little raptor
#

I would just forget about it if I were you
Particles don't have collision (at least not with objects)
So to do what you want you'd need to detect the edges of the model

#

Which needs thousands of line intersections

#

Which is slow

tough abyss
#

So very computationally intensive, and the engine won't like it?

#

Has the Enfusion engine fixed any of that?

little raptor
#

Β―\_(ツ)_/Β―

#

I doubt it

#

But you can ask them in their channel

tough abyss
#

I saw a guy created an arma 3 script which could collide with the ground.

#

Water splashes.

#

On roads or is that a different issue?

little raptor
#

Sure

#

That's easy

#

But you're talking about water running off a roof

#

It's not just a simple line intersection anymore

#

If you want to simulate the flow of each water drop that's still relatively easy, but again it's slow

tough abyss
#

It was more like spawning them at the edges of the building

#

Letting them drip off

#

Not making them run off a roof.

#

It simulates enough without being too intensive

little raptor
tough abyss
#

So particles are not smart enough to interact with geometry?

#

They'll just fall straight through.

little raptor
#

No

little raptor
#

e.g. smoke rises

tough abyss
#

So you can control whether they are influenced by gravity or their density etc?

little raptor
#

Yes

tough abyss
#

But they lack the smarts for collisions.

little raptor
#

Many engines don't have that anyway blobdoggoshruggoogly

tough abyss
#

Yeah I can imagine the performance cost.

#

Checking say 1000 particles if they hit something or not.

#

Definitely expensive.

little raptor
#

It's many more

tough abyss
#

Particles are CPU bound too are they not?

little raptor
#

Yes

meager granite
#

What could cause setFog to only decrease the fog?

#

0 setFog * sets it properly

#

But having time>0 makes fog only decline instead of reaching target value

#

Same behaviour on both syntaxes

#

It works fine on an empty mission, but doesn't work on mine

#

Feels like some other weather parameter prevents fog from working

#

I logged each and every setFog usage so its not some other script messing it up

winter rose
#

did you try ticking "override fog" in mission's settings?

#

It works fine on an empty mission, but doesn't work on mine
then something is changing that in your mission πŸ‘€ πŸ˜„

meager granite
#

Yeah, and I can't figure out what πŸ€”

winter rose
#

tru

#

also base fog -1000 😬

meager granite
#

Isn't it a default?

#

Oh, default is 0 πŸ€”

#

Can't remember how that -1000 got there

#

fog is 0.01
Executing 100 setFog 0.2;
starts going down to 0

#

It uses time but always target value of 0

#

1 setFog 0.2 => goes to 0 in 1 second
0 setFog 0.2 => sets to 0.2 instantly

winter rose
meager granite
#

Rewrite the whole mission FeelsGoodEnoughMan

#

Found out what it was

#

Having 0 setWindStr 1

#

Doesn't matter what wind you set afterwards, if you have that, no more fog for you

#

Honestly I have no idea what setWindStr and setWindForce are

#

"Set max. wind overall wind changes in time."

winter rose
#

it respectively sets wind's str and force

meager granite
winter rose
#

hue hue hue

mellow scaffold
#

Is there a way to detect mission-side if a mission was launched from the MP Eden editor? I'd like to dis/enable some debugging if it is

meager granite
#

is3DENPreview ?

mellow scaffold
#

ah, that might work, thanks

meager granite
#

0 setWindStr 0.85; 1 setFog 0.2 sets fog to 0.15 over 1 second

#

Oh, so the formula is simple

#

Max fog = 1 - setWindStr

#

Not explained anywhere it seems, thanks Arma

winter rose
#

ooooooh, wikiwikiwiki

pulsar bluff
#

is an "AttachTo" event handler a good idea? @meager granite

meager granite
#

Feel free to remove them and add the info to the article itself

#

I wont mind

meager granite
pulsar bluff
#

there is one in the engine event enumeration , think it is not hookable tho

#
    TurnOut = 31,
    TurnIn = 32,
    AttachTo = 33,
    HandleHeal = 34,
    HandleIdentity = 35,
    AnimStateChanged = 36,```
meager granite
#

Interesting

pulsar bluff
#

im on laptop, cant open arma rn

#

can you test to see if it works? dont think ive ever actually tried

winter rose
meager granite
#

I think it might be one of VBS event handlers

#

Sadly VBS scripts reference is behind login now, can't check it anymore

pulsar bluff
#

hmm

meager granite
#

Volumetric clouds can be disabled with setSimulWeatherLayers 0 but can't be enabled back even after switching mission or server.

    private _display_menu = findDisplay 46 createDisplay "RscDisplayInterrupt";
    ctrlActivate(_display_menu displayCtrl 301);
    ctrlActivate (findDisplay 5 displayCtrl 2);
    _display_menu closeDisplay 2;
```Code snippet to re-init volumetric clouds in case somebody needs it. It opens video menu and closes it, triggering the engine to re-init the clouds.
#

Sharing in case somebody was dealing with overcast and clouds

#

If you want to deny players getting more FPS by script-setting themselves flat Arma 2 clouds before playing your mission/server samatra

meager granite
#

Already posted a comment with that snippet there

hallow mortar
#

It might be sensible to raise a FT ticket about it too, that seems like something that should be fixed

coarse dragon
#

How does one teleport the player to a different location by a trigger?

winter rose
#

setPosASL etc commands

meager granite
languid tundra
#

As far as I remember it does not work in MP though

austere nymph
#

Thansk @languid tundra that's very kind of you

languid tundra
#

You can thank Lou for pinging me or I would have missed it for sure πŸ˜…

winter rose
#

thank everyone, all of you!

austere nymph
#

@languid tundra I honestly just saw a YT video of that arma 2 mission where you have to imput a code and your video was recommended next. Blew my mind.

cold pagoda
#

Does anyone know where the holster function is? I would like to change the placement of the rifle. If that is possible?

winter rose
cold pagoda
hallow mortar
#

I'm pretty sure that this should cause the while loop to stop when njt_gpsjamming becomes true. It doesn't. There must be something obvious I'm missing but I just can't see it.

while{!(missionNamespace getVariable ["njt_gpsjamming",false]) && {!isNull player}} do
// ...
// This happens later in a function that runs on the server and is verified to run
missionNamespace setVariable ["njt_gpsjamming",true,true];```
Never mind. I found a second while loop hidden deeper in the code which is what _actually_ causes the issue.
winter rose
#

uuuuuuuuugh

#

you mean distance + direction + inn vehicle?

brazen lagoon
#

probably want to check if the vehicle is close enough to the right orientation and not exact bc that'd be really tedious

#

check if direction vehicle player is close to direction launchpad1

#

check vehicle player distance launchpad1

#

lou is probably typing out the if statement I was going to type so I'll just defer to him

winter rose
#

something like that

private _veh = objectParent player;
if (_veh != mySuperAircraft || { _veh distance theLaunchPad > 100 }) exitWith {};
#

the dir thing is a lengthier thing to do but you get the idea

#

yeah

brazen lagoon
#

yeah you'll prob want to do something like direction pad - direction veh < 5 or something

#

err. put an abs in there too

winter rose
brazen lagoon
#

since they'd be on the same surface as the launcher?

winter rose
#

oh, didn't even get that part πŸ˜„

brazen lagoon
#

im not certain obv, i could be wrong. but thats how i read it lol

winter rose
#

no no you're right, I just stopped reading at the <code> post πŸ˜„

little raptor
#

neither are correct

#

e.g. if direction of vehicle is 359 and direction of pad is 3 both will yield incorrect results

#

it is possible. but it's incorrect

rough summit
#

call compile wont work 😦

little raptor
rough summit
#

Just checking some shops from life servers and try to do something, linked with conditions

little raptor
#

well if you do it like this:

{ private _dir = (direction _aircraft - direction launchpad1 + 360) % 360; _dir < 5 || _dir > 355}
#

it will be correct

rough summit
little raptor
#

that's not the correct syntax

rough summit
#
['someVar', 0]
little raptor
#

ye

rough summit
#

didn't spot syntax error

little raptor
#

also I'm not sure why you're using call compile

#

why is that code a string in the first place?

rough summit
#

cfg

#

{"itemclass", "itemPrice", "condition", "description"}

#

ye, it works, thanks

brazen lagoon
#

so anyway if I want to use the arsenal to let you refill ammo how should that work? I tried adding all mags for all weapons but they don't show up unless you already have one of those mags on your person.

#

oh im dumb. ofc. i was using virtualitemcargo when i should have been using magazine cargo πŸ€“

#

how would I get statics for a faction? would i just look up CfgVehicles entries with scope=2, faction = _faction, iskindof "StaticWeapon"?

little raptor
#

but I personally hate isKindOf for that kind of stuff

brazen lagoon
#

yeah its not ideal :/