#arma3_scripting

1 messages · Page 321 of 1

rancid ruin
#

ah, @icy mauve it may be a copy/paste problem, that's happened before in here

#

try typing that part out manually

#

i am so rusty with sqf though, hopefully someone less rusty will lay some eyes on it

icy mauve
#

I replaced "==" with "isEqualTo"

#

same Error tho, it works, and randomizes and shows different animations but I still get the error.

rancid ruin
#

afaik isEqualTo is marginally faster than == but functionally no different

#

wait are you doing !isEqualTo ? because that won't work

#

to wait until something is false you need to do !(condition which is true) i believe

icy mauve
#

No I'm not doing that

#
alex_fnc_animatron = {
    sleep 0.1; 
    params  ["_unit", "_animations", "_randomize"];

    if (_randomize) then {
        while {true} do {
            _animation = selectRandom _animations;
            _unit playMove _animation;
            waitUntil {
                animationState _unit isEqualTo _animation;
            };
        }
    } else {
        {
            _unit playMove _x;
            waitUntil {
                animationState _unit == _x;
            };
        } forEach _animations;
    };
};
tough abyss
unkempt spire
#

the player init box in editor runs locally right?

rancid ruin
#

i think it runs each time a player connects

indigo snow
#

its not locally

#

global

#

every client will execute all init boxes upon connecting

vapid frigate
#

isEqualTo is functionally different to ==

#

@royal coral to fix that error, just use more brackets (animationState _unit) isEqualTo _animation;

#

but yeah, you probably do want to wait until it's not equal

#

otherwise it'll just be spamming playMove every frame

rancid ruin
#

ah thought they were the same

#

It can compare Arrays, Scripts and Booleans (alive player isEqualTo true)

#

== can't compare arrays?

#

and what does it mean by comparing Scripts? comparing something wrapped in {}?

vapid frigate
#

yeah == can't compare arrays

#

yeah not sure about scripts.. guess it compares compiled scripts

#

(not really sure why it'd be useful.. maybe to check if one's blank or something)

little eagle
#

SCRIPT refers to the script handles reported by spawn and execVM.

#

Also iirc == cannot compare CODE (e.g. {true}) either, unless you stringify it first.

str {true} == str {true}
vapid frigate
#

ah ok that makes more sense

subtle ore
#

Is there any command to apply custom rank configurations? Cant seem to be able to apply anything but the default ones. Keeps reverting to private

icy mauve
#

If I activate a function inside a file from a unit, is "this" inside the file still the unit?

#

And how can I check if a variable is of a certain type, say "this" needs to be a unit and not a trigger?

warm gorge
#

It needs to be passed to the script somehow. And you can use the param/params command for making sure its a unit such as like params [["_unit", objNull, [objNull]]];

vapid frigate
#

whatever you pass in to the script (whatever's before spawn/execvm/call) will be _this in the script

#

which you can then pull apart with params as shadowranger said if you want

icy mauve
#

Now my Code doesn't run at all, lol

#

are there any logs?

warm gorge
#

Show us what you've got

#

And how you're executing the script

icy mauve
#

Are the Animations sqf ["Acts_JetsCrewaidF_runB_m", "Acts_JetsCrewaidLCrouch_in_m", "Acts_JetsCrewaidFCrouchThumbup_in_m", "Acts_JetsCrewaidFCrouchThumbup_loop_m", "Acts_JetsCrewaidFCrouchThumbup_out_m"] working for anyone?

or are those Actions and therefore executed with playAction instead of playMove?

vapid frigate
#

there is logs, and you should also enable -showScriptErrors while scripting to show them on screen

#

logs are in %appdatalocal%\arma 3

icy mauve
#

Is that the little black box that sometimes appears?

vapid frigate
#

one of them, yeah

#

the one that you don't have to click ok

icy mauve
#

I already activated that then

copper raven
#

@delicate lotus exactly what i was looking for, thank you very much!

jade abyss
#

Some animations just don't work with playMove/PlayAction @icy mauve
Nothing you can do

icy mauve
#

oh too bad, kay then

jade abyss
#

+Could be, that those are some of them

icy mauve
#

I think they where added with the Jets DLC as those are only jet-animations but okay then

jade abyss
#

¯_(ツ)_/¯

icy mauve
#

I'll just leave that out then and focus more on the content of the mission.

jade abyss
#

Do a test: Add another Anim

#

player playmove "AwopPercMstpSgthWrflDnon_throw2"; <-- for example that one

little eagle
#

@subtle ore No, the available ranks are hard coded and you cannot add new ones by modifying CfgRanks.

#

CfgRanks for example has GENERAL, but that enum is unused by the game. Only the other 7 ranks (class 0 .. class 6) are used and also "" I guess.

copper raven
#

i might sound a little noobish here, but how can i display full number? instead of decimals and stuff? this is what i mean http://prntscr.com/fenoce i dont want this

still forum
#

use toFixed

copper raven
#

thanks @still forum

quasi rover
delicate lotus
#

disabled sim

quasi rover
#

thx, FurtherV🙂

copper raven
#

how can i check if there is a player 3 meters away from ATM? i tried this:

_return= false;
_atm= (_this select 0);
_checkList= getPos _atm nearEntities [["Man"],4];
hint str(_checkList);
_check= _checkList select 0;
if (isNil "_check") then {
    _return=false;
}
else
{
_return=true;
};
_return
``` doesnt seem to work tho
#
_atm addAction ["Access ATM", "ATM\ATMaction.sqf",{}, 0,false,false,"","[_atm] call sh_fn_ATM"];
delicate lotus
#

nearby objects in 3m?

#

then check if atm is in it?

#

or just add the action to the atm?

copper raven
#

if i add the action into atm, then you can access it just by pointing at it from big ranges

#

thats not what i want, i want a player to get close first

#

@delicate lotus ima try your idea

delicate lotus
#

you can set a range in add action

still forum
#
private _atm = (_this select 0);
private _checkList = (getPos _atm) nearEntities [["Man"],4];
hint str(_checkList);
(count _checkList > 0)
#

why don't you just add the action to the ATM and set the interaction distance to 3 meters?

copper raven
#

because i dont want opfor guys to access it

delicate lotus
#

than add a condition to the action

copper raven
#

ill see what i can do , one sec

delicate lotus
#

"side player == opfor"

still forum
#

also _atm addAction ["Access ATM", "ATM\ATMaction.sqf",{}, 0,false,false,"","[_atm] call sh_fn_ATM"];
that "[_atm] call sh_fn_ATM" _atm is a undefined variable

#

also you don't need to pass it inside a array just to take it back out again. just pass it directly

copper raven
#

its defined in file above, anyways i found the fix:

_player= (_this select 0);
_return=false;
_checkList= nearestObjects [getPos _player, [], 4];
_checks= [];
{
    _checkName= (str _x) splitString "_";
    _checks pushBack _checkName;
}forEach _checkList;
{
    if ("Land_Atm_02_F" in _checkList) then
    {
        _return=true;
    };
 }forEach _checks;
 _return;

misscopied smth, edited

delicate lotus
#

too much code for the problem

copper raven
#

meh, i got it working , and its ok for me, thanks for help tho.

warm gorge
#

Anyone know any issues with attachTo? Specifically when using it to attach players to other players. Im having an issue where the attached player will ocasionally glitch to position [0,0,0] on the map. For the attached player, they can see themselves in the correct position, but for other people and the person their attached to, their at [0,0,0]. Even more strange, sometimes other players can see them attached correctly, but the person their attached to cant. Very weird behavior. It seems like some sort of locality issue, but I really don't know.

delicate lotus
#

why do you want to attach players to other players

halcyon crypt
#

dragging and carrying comes to mind

warm gorge
#

Escorting system for restrained/cuffed players

delicate lotus
#

yeah but... do you need them to attach to that player?

#

is there not other way?

warm gorge
#

Not really no

indigo snow
#

tried attaching them to a helper object and manipulating that?

warm gorge
#

Nah was considerin that

still forum
#

@copper raven What the hell is your code doing?
You are checking the same condition potentially hundreds of times with always the same result.
And no.. _atm is not defined in the addAction condition. Local variables don't carry over like that.
But your code is for Life right? So.. I guess it's complying with Life coding standards...

copper raven
#

i forgot to rename it, _atm is passing _player

#

sorry

#

there, edited

#

done

still forum
#

Still

{
    if ("Land_Atm_02_F" in _checkList) then
    {
        _return=true;
    };
 }forEach _checks;

That if statement always returns the same. Why are you executing that for every element in _checks?

#

setting a variable to true dozens of times doesn't make it any more true

#

And why are you passing _player in an array if you're gonna take it out again right away anyway?

#

And I thought you wanted it only to be available to not opfor people? Your code does nothing like that

#

All your code does you can do by just setting addAction's radius parameter to 4

copper raven
#

idk iam not script god, i got it working, not gonna go anymore deep into it

still forum
#

I just told you hot to make it better and how horrible your script is. And you just ignore the advice?

copper raven
#

iam not ignoring you , iknow its potato way that i have done it, if it causes problems later on , i will take your advice then

#

iam too lazy to rework it in a proper way rn

still forum
#

Change atm addAction ["Access ATM", "ATM\ATMaction.sqf",{}, 0,false,false,"","[_atm] call sh_fn_ATM"]; to atm addAction ["Access ATM", "ATM\ATMaction.sqf",{}, 0,false,false,"","true",4];

#

5 seconds

copper raven
#

i dont want this

little eagle
#

¯_(ツ)_/¯

copper raven
#

i have different scenario

#

which i wont explain because there is no point to

tough abyss
#

how you dare helping me! fuck you!

#

😄

still forum
#

You come here asking for advice. People give you advice. You ignore it and just fiddle on your own which creates horrible code. And then you say "I don't want any advice. this works"

copper raven
#

FurtherV ( ͡° ͜ʖ ͡°) gave me the advice that i needed, and it worked out

#

no point of making out other statements which i dont need

jade abyss
#

aannndddd next one on the list

still forum
#

He told you to add a condition to check the side of the player. Which you completly ignored

jade abyss
#

sshhh Dedmen, not worth it 😄

copper raven
#

yes pls, end of story

little eagle
#

Insanity

tough abyss
#

Hi, is there a way of preventing popup targets from popping up after being shot?

long hatch
#

nopop=true;

tough abyss
#

I put it in init.sqf?

delicate lotus
#

you ask them to do not

still forum
#

Just spawn a AI MG gunner with unlimited Ammo and tell them to fire on the target everytime it tries to pop back up

little eagle
#

The last question makes no sense.

delicate lotus
#

okay lets make a real question here,
What is a efficent, fast and good working way to check how many units are in a marker area?

tough abyss
#

Sorry but what exactly makes your question more real than mine?

#

He said "nopop=true;" I have no idea what to do with it. If I had, I wouldn't ask

#

I already figured it out, thanks for whatever

delicate lotus
#

xDD

little eagle
#

This is the scripting channel though. What do you think we do with code? We execute it.

subtle ore
#

Boolean 🙄

little eagle
#

Reading it out load won't convince the game not to make the targets pop up.

#

@delicate lotus
I propose:

{_x inArea _marker} count allUnits
subtle ore
#

"Hey arma, stop you and your popup bullshit 😃 "

delicate lotus
#

xD

#

I didnt know there was a inArea function lol

#

nice

#

nice indeed

halcyon crypt
#

I see everyone is a bit salty again today? 😁

delicate lotus
#

And no I did not search for it

#

Lazy me

little eagle
#

Alternatively:

count (allUnits inAreaArray _marker)

This could be faster, but I never used the command, so no idea if my understanding of it is correct.

#

It avoids the loop.

delicate lotus
#

yeah that could be really faster

little eagle
#

I hope so 😃

delicate lotus
#

yeah I do to

little eagle
#

inArea is a nice function to have as command.

delicate lotus
#

yes it is

little eagle
#

@halcyon crypt
I blame the heat.

halcyon crypt
#

hehe

#

it is kinda warm and sticky :/

delicate lotus
#

I have a big fan and lots of water

little eagle
#

I have one window to open and lot's of empty water bottles. 😦

delicate lotus
#

RIP

#

how about you steel some water bottles from opfor?

little eagle
#

steal*

delicate lotus
#

rip grammar

little eagle
#

grammer

#

It's just a spelling mistake, which is different from a grammar mistake.

delicate lotus
#

doStop commy2;

delicate lotus
#

lol

warm thorn
#

@vivid quartz Regarding the playMusic issue. I have tested it to start the playMusic as server. Unfortunately JIP wont work there :/

subtle ore
#

@warm thorn what? No jip with playMusic?

warm thorn
#

I have tested it - nope

subtle ore
#

Fack

little eagle
#

playMusic has an alternate syntax to set the starting point of the sound file, so if you're smart, JIP should be no problem.

tough abyss
#

Is there a way to get the trigger-zone visible? (this blue zone)

little eagle
#

Triggers are visible in the editor and invisible ingame.

still forum
#

Put a marker over it

misty trail
#

how do i change the icon when i use BIS_fnc_setTask ?

subtle ore
#

@little eagle hey now. I want to be smart too 🙃

little eagle
#

Everyone does, but it's not granted, it's earned.

still forum
#

gives @subtle ore a 🍪

subtle ore
#

@little eagle joke being a wannabe is uhealthy

#

@still forum thanks, is it oatmeal rasian?

still forum
#

No. Chocolate chip

subtle ore
#

Shiet :(

little eagle
#

Good taste.

subtle ore
#

Oatmeal raisin is the stuff.

tough abyss
#

@little eagle not visible on map - like the 3d blue zone ingame 😄

little eagle
#

I don't think you can. I'm not aware of a way to take that editor functionality into the ingame / preview mode without adding models etc.

indigo snow
#

Might wanna poke around in the 3den pbo to see if theres a p3d in there

tough abyss
#

then it would be a scalable p3d? i doubt

indigo snow
#

no i imagine wall segments

#

youd have to position them by script but thats fairly trivial if they exist

little eagle
#

I don't think they are a model. I think they're drawing these things procedurally and I don't think the method is accessible to us.

ivory nova
#

Can someone confirm/clarify something for me: is it just me or does setGusts have no effect on the wind at all?

#

Been messing with it and can't detect any impact on the environment

ivory nova
#

@tough abyss OHHHHHHHHHHHHHHHH SHHHHIIIIT

#

okay thank you man

#

Trying to make my own wind gusts system wasn't a waste after all

weak tiger
#
18:12:02   Error position: <_grpIconColor set [0,(_grpIconColor sele>
18:12:02   Error Undefined variable in expression: _grpiconcolor
18:12:02 File A3\modules_f\marta\data\scripts\fnc_effect.sqf, line 35

been getting a few of these lately

vivid quartz
#

How do i check if player is the owner of some object?

_veh= _type createVehicleLocal _pos;
_playerObject=player;
_veh setOwner (owner _playerObject);

i use this to set owner, but how do i check if player is owner of veh?

jovial ivy
#

So

little eagle
#
owner _veh == owner _playerObject

???

jovial ivy
#

Yeah that. lol

vivid quartz
#

that escalated quickly 😂

#

ty, gonna try

little eagle
#

There is not much point in setting the owner of an object created on presumably the players machine (presumed because the usage of _playerObject=player;, because the object will be local to the machine that created it already.

#

And then there is the point that the owner and setOwner commands only work when executed on the servers machine. And player is null on a dedicated server

#

So there are so fundamental problems with these 3 lines.

#

Unless I'm overlooking something...

#

Also you cannot even set the owner of an object that only exists on your machine.

#

Yeah... looks like back to the drawing board for this one.

vivid quartz
#

@little eagle oh boy , i will have to do some stuff here to get it fixed then, since i dont test this mission on dedicated server but player host, i dont encounter those problems, but i will soon, thanks for tips/explainments. 😄

little eagle
#

Well it's trivial in SP editor. owner and setOwner don't do anything there and createVehicleLocal is basically identical to createVehicle

vivid quartz
#

yea gonna rewrite some stuff

little eagle
#

Depending on what you're trying to do, it would still work. But the whole code could be boiled down to line 1 and it would do the same thing: create an object only on the machine where the code was executed on.

#

No one else could see it.

icy mauve
#

I forgot who gave this to me but I continue getting errors for no reason:

waitUntil {
  (animationState _unit) |#|!= _animation;
};```
still forum
#

And what is the error?

icy mauve
#

"general exception in expression"

#

Full Code in init.sqf:

alex_fnc_animatron = {
    params  ["_unit", "_animations", "_randomize"];
    
    if (_randomize) then {
        while {true} do {
            _animation = selectRandom _animations;
            _unit playMove _animation;
            waitUntil {
                (animationState _unit) != _animation;
            };
        };
    } else {
        {
            _unit playMove _x;
            waitUntil {
                (animationState _unit) != _x;
            };
        } forEach _animations;
    };
};
#

nvm I'm stupid

halcyon crypt
#

what the hell is |#|!= ? 🤔

still forum
#

|#| marks the error

halcyon crypt
#

doesn't ring a bell at all ¯_(ツ)_/¯

jade abyss
#

-showScriptErros

halcyon crypt
#

ah gotcha. Had to find a screenshot though. ^^

subtle ore
#

@jade abyss Erros 🤔

jade abyss
#

🤔 ?

subtle ore
#

🤔 <- thinking emote

jade abyss
#

No shit Sherlock, rly?

#

😂

little eagle
#

? < question mark

jade abyss
#

Where the f do you come from?

subtle ore
#

0_o

little eagle
#

Hiding in the bushes.

jade abyss
#

sneakyy

little eagle
#

Like usual

subtle ore
#

:thinking:

jade abyss
#

Don't do that infront of a kindergarten, might end bad.

#

😂 Okay, back to doing stuff =}

subtle ore
#

:monkey:

still forum
#

:squirrel:

subtle ore
#

I cant see the squirrel @still forum :(

inner swallow
#

is there any way to see how the action command works?

#

e.g. if i wanted to see how exactly the rearm or repair actions are implemented?

#

because they seem broken in MP

#

i thought they were only a problem with tanks, but turns out it's all vehicles

#

basically, i have something like this:

_veh = VehCSAT_AH1;
[_veh,["rearm", ammoBox]] remoteExec ["action"]```
and it refuses to work with more than one player in the helicopter.
#

no matter what i try as targets

#

and this is true of ammo trucks, etc in general - more than one player means no action appears on the scroll wheel menu

still forum
#

action has nothing to do with stuff on scroll wheel menu

inner swallow
#

@still forum don't the scroll wheel menu entries like eject, rearm, repair, etc "call"/use actions?

#

(i'm not saying that an action magically appears on the action menu btw)

#

but anyway, that's irrelevant in some ways - does anyone have a clue about making the repair/rearm/refuel actions work with multiple people crewing a vehicle?

#

20:04:43 Remote entity want to supply: VehCSAT_AH1

#

that's the message that appears if i'm gunner and someone else is driver.

#

if i'm driver i don't get that message

#

doesn't resupply either way

warped moon
#

Anyone know how to use the BIS_fnc_findSafePos to find a position, but not near a certain object? (for example Exile_Flagpole) ?
So far I got this, which is working, but it might spawn around the Exile_flagpole...
_positiontest = [[4992.81,8005.06,0.00143814],300,10000,0,0,0.35,0] call BIS_fnc_findSafePos;

little eagle
#

don't the scroll wheel menu entries like eject, rearm, repair, etc "call"/use actions?
No, they are different, but I'm sure both action and what is hardcoded and in CfgActions point to the same basic engine functionalities.

inner swallow
#

so then those functionalities are broken, i guess...(not as if i hadn't made a bug report a few months ago)

#

FWIW when i executed that code locally it worked for me but not the gunner, and when i accidentally executed it globally it worked for both of us, but there was a period of a a minute or two for which it would keep resuplying us.

gilded rover
#

how do you get coloured text?

rotund cypress
#

Does anyone have an idea of why (uiNamespace getVariable "RscMiniMap") displayCtrl 101 returns 00000000002FF7E00?

#

Basically want to get the GPS ctrl so I can add Draw eventhandler to it...

#

The above ID is what is referred in RscMiniMap.sqf in ArmA 3 default GPS

#

when I add displayNull to it, it says no ctrl

#

But not sure why it's not getting the ctrl

still forum
#

Are you sure 00000000002FF7E00 is not the control?

#

check typeName of returned value

rotund cypress
#

typeName does not return anything @still forum

still forum
#

What? Typename returns "" ?

#

or nil ?

rotund cypress
#

typeName ((uiNamespace getVariable "RscMiniMap") displayCtrl 101)

#

Doesn't return anything in watch fields

#

So most likely ""

still forum
#

try [typeName ((uiNamespace getVariable "RscMiniMap") displayCtrl 101)]

rotund cypress
#

String

still forum
#

In escape menu the MiniMap is not shown right?

rotund cypress
#

diag_log [typeName ((uiNamespace getVariable "RscMiniMap") displayCtrl 101)]; = string

still forum
#

so RscMiniMap is probably nil

rotund cypress
#

It does not show in RscDisplayInterrupt no

still forum
#

Yeah. So the minimap display is not there. So you can't get it's control

rotund cypress
#

Could it maybe be after Jets DLC update 🤔

still forum
#

try
[] spawn {sleep 5; systemChat str [typeName ((uiNamespace getVariable "RscMiniMap") displayCtrl 101)];}
Then go ingame and wait

rotund cypress
#

5 seconds and nothing is showing

#

Or wait

#

Had chat disabled

#

Its string

#

Same as when I used diag_log

#

I see new ones such as RscCustomInfoCrew, RscCutomInfoMiniMap etc etc

#

Yep

#

New one is RscCustomInfoMiniMap

#

Begs the question why bohemia dont delete their old code

still forum
#

Does that need to be changed somewhere on the wiki?

rotund cypress
#

I've not seen any coverage on it anywhere on the wiki

still forum
#

kk

rotund cypress
#

Btw is the updated CfgVehicles wiki page by you?

still forum
#

Noooooo

#

You can see that by clicking History on the top-right

rotund cypress
#

aah

#

Okey

#

So still doesnt work

#

Now it says no display

#

((uiNamespace getVariable "RscCustomInfoMiniMap") displayCtrl 13301)

#

Its really hard to know as well, since RscCustomInfoMiniMap.sqf has no code in it

#

Wait..

#

Ye, not working

#

(uiNamespace getVariable "RscCustomInfoMiniMap")

#

Is not even giving me any display

little eagle
#

@rotund cypress Congrats. You found the DISPLAY typed nil .

rotund cypress
#

However uiNamespace getVariable "RscCustomInfoSlingLoad" shows display

little eagle
#

CONTROL*

rotund cypress
#

What?

little eagle
#

Every nil can have a type.

#

displayCtrl is a function supposed to report a CONTROL

rotund cypress
#

I know that lol

little eagle
#

So if you feed it the command nil, it will report a nil with CONTROL type

rotund cypress
#

Oki

little eagle
#

That is how SQF is done. Value and type of a variable are independent, so you can have a nil for every type.

#

type being SCALAR, BOOL etc.

rotund cypress
#

Ok so uiNamespace getVariable "RscCustomInfoSlingLoad" and uiNamespace getVariable "RscCustomInfoCrew" is returning displays but not RscCustomInfoMiniMap

#

Ye ok

little eagle
#
uiNamespace getVariable ["RscCustomInfoMiniMap", displayNull]

to avoid nil

#

But it would still mean that the display and the control are null

rotund cypress
#

Yes I know 😃

little eagle
#

Not every display can be retrieved with this method.

#

They have to use BIS_fnc_initDisplay or define the variable manually in a different way.

#

And not every display has a onLoad script

rotund cypress
#

Well this is calling an empty onLoad script RscCustomInfoMiniMap

little eagle
#
class RscCustomInfoMiniMap {
    idd = 311;
    scriptName = "RscCustomInfoMiniMap";
    scriptPath = "IGUI";
    onLoad = "[""onLoad"",_this,""RscCustomInfoMiniMap"",'IGUI'] call     (uinamespace getvariable 'BIS_fnc_initDisplay')";
    onUnload = "[""onUnload"",_this,""RscCustomInfoMiniMap"",'IGUI'] call     (uinamespace getvariable 'BIS_fnc_initDisplay')";

This one does though, so no idea why it's not working.

rotund cypress
#

yep

#

And in that initDisplay script it registers the display in uiNamespace

#

Soo

#

And it's quite weird that it shows the infocrew and infoslindload even thought those are not open

little eagle
#

Ergo the display doesn't exist.

rotund cypress
#

Maybe handled by engine?

little eagle
#

Maybe it's a different display.

#

Don't think so

#

It would be a first.

#

Everything else is a dialog in config

rotund cypress
#

But it would be majorly stupid if you can not modify it

little eagle
#

Main menu, server browser, lobby

#

You're probably looking at the wrong class.

rotund cypress
#

RscCustomInfoSlingLoad is also empty

#

But it still returns display

#

And when I use createDialog "RscCustomInfoMiniMap" it works

little eagle
#

Well, then you created the display and it didn't exist before. No surprise. That pretty much confirms what I said.

#

Gesundheit.

gilded rover
#

sorry

little eagle
#

Haha

gilded rover
#

😛

rotund cypress
#

But the RscCustomInfoMiniMap should be created when I open the miniMap

#

Or the GPS

little eagle
#

No, why?

#

It has no obligation to.

rotund cypress
#

Of course not

#

But it would be most logical

little eagle
#

There could be a different display / control that does the job than you're looking at.

rotund cypress
#

Is there a keyhandler or something I could look at in the fileS?

little eagle
#

Uhm.

#

But it would be most logical
Logic only can tell you if an expression is valid. Not if it's true.

rotund cypress
#

🙃

#

getting all variables in uiNamespace does not work either for some reason

#

Okey apparently i can with parsingNamespace

little eagle
#

Yes, some... have decided that allVariables is a security risk in MP

native hemlock
#

What are you trying to do? Drawing on the GPS works if you use RscCustomInfoMiniMap

little eagle
#

It won't work with ui and mission namespace.

rotund cypress
#

@native hemlock not returning any display

native hemlock
#

Not returning any display when running?

private _miniMapDisp = uiNamespace getVariable "RscCustomInfoMiniMap";
rotund cypress
#

uiNamespace getVariable "RscCustomInfoMiniMap"; == no display

native hemlock
#

This is 1.70?

rotund cypress
#

Yes

#

Ctrl + M with GPS in inventory

native hemlock
#

That's bizarre...

#
private _miniMapDisp = uiNamespace getVariable "RscCustomInfoMiniMap";
private _ctrl = _miniMapDisp displayCtrl 101;
_ctrl ctrlAddEventHandler ["Draw", {
    _this select 0 drawIcon [
        "iconStaticMG",
        [1,0,0,1],
        getPos player,
        24,
        24,
        getDir player,
        "Player Vehicle",
        1,
        0.03,
        "TahomaB",
        "right"
    ]
}];

That draws an icon correctly on the mini map for me

rotund cypress
#

Not for me

#

GPS open but still no display

native hemlock
#

Have you modified that config class?

rotund cypress
#

Nope vanilla arma

#

Latest update

#

Did you try this today?

native hemlock
#

Yes I tested the code I pasted above just before I sent it.

rotund cypress
#

Even in editor it doesnt work for me

#

So its not anything with my mission

jovial ivy
#

Is there any reason: init="call{this addAction [""Gun Store"", {_null = [] call GunStore_Open}];}"; would only be executing on one player that selects it? As in when me and a friend were testing it out, I could scroll wheel and open it, but he could not. Any idea's? The code itself is all local.

#

That is straight from a units init field(from within the sqm file)

rotund cypress
#

For one of my friends it works as well, so its really weird that it isnt for me

#

Okey after restart it works lol

native hemlock
#

Interesting, could you have accidentally used setVariable instead of getVariable, and set it to be displayNull?

little eagle
#

It was nil, not null

rotund cypress
#

Thats a big possibility, however I did not remember ever using setVariable during the time the game was open

#

That was RscMiniMap @little eagle

#

IIRC RscCustomInfoMiniMap was always null

little eagle
#

Maybe you used createDisplay, which overwrote the variable with a new display and then closed it by pressing ESC...

rotund cypress
#

I used createDialog, but yes also a possibility

little eagle
#

Something along those lines.

rotund cypress
#

Is there anyone who know of any "recommended" safezone macros?

subtle ore
#

is there any way to use handle disconnect whilst setting a profile namepsace variable without it being assigned to that player slot specifically? I've been having a weird issue that only saves the variable for that player slot only, I was led to believe it was saved in the player's profilenamespace exclusively. Here is my code: https://pastebin.com/Ncp40sUH

spice arch
#

having some issues with a script if anyone can help

#

basically in the init i have a script that generates a random location to populate with enemy vehicles

#

i have a task created to destroy those vehicles

#

but the way to succeed the task is via a trigger that i create over the random location

#

the trigger is supposed to detect when all vehicles in the AO are destroyed

#

but for some reason the trigger keeps activating even though the condition is not properly met

#

when i test via the debug console

#

it seems that it is unable to find the vehicle that is generated in the AO

#

despite it being there and visually being there

#

if i preplace a trigger and a vehicle/s with the same activation condition it seems to work

#
if (isServer) then
{
    while {true} do
    {
       sleep 5;
       if (waveClear) then {
          _side = selectRandom ["opfor","indfor"];
          _loc = [waveNum,_side] call spawnGround;
          _taskName = "mission" + format ["%1", waveNum];
          _taskDescription = "CAS Mission " + format ["%1", waveNum];
          [west,_taskName,["Destroy all vehicles in the area",_taskDescription,"ao"],_loc,true,2,true,"destroy",false] call BIS_fnc_taskCreate;
          [_taskName,"ASSIGNED",true] call BIS_fnc_taskSetState;
          _trg = createTrigger ["EmptyDetector",_loc];
          _trg setTriggerType "NONE";
          _trg setTriggerType "NONE";
          _trg setTriggerArea [200,200,0,false];
          _trg setTriggerActivation ["ANY","PRESENT",false];
          _statement1 = "((count (thisList select {alive _x && (_x isKindOf "+"Tank"+" || _x isKindOf "+"Car"+")})) isEqualTo 0);";
          _statement2 = "if (isServer) then {_handler = ["+_taskName+",thisTrigger] execVM 'scripts\missionComplete.sqf';};";
          _trg setTriggerStatements [_statement1,_statement2, ""];
          waveClear = false;
       }
    }

   
}
#

if anyone has any idea please let me know

#

also it seems my trigger isn't getting the passed _taskName for some reason

#

in the _statement2 and setTriggerStatements part

delicate lotus
#

there is no way to add playable units on the run right?

weak tiger
#

any shortcut functions to determine the direction of a runway?

nocturne basalt
#

when spawning my vehicle with crew, is it possible to let some of the crew positions stay empty by default?

little eagle
#

Using createVehicleCrew?

nocturne basalt
#

thanks I'll read about it and do some testing

little eagle
#

It was a question, because with that command you can only create the whole crew. No idea what other method you would be using atm if it's not createVehicleCrew.

nocturne basalt
#

ok

little eagle
#

ok 😐

indigo dove
#

hi, i'm wondering if there's a way for the camera to track a character and follow him, so that for example, if he runs forward, the camera moves so that the distance from him to the camera stays the same

little eagle
#

Considering there is a spectator mode that does exactly that I'd say yes.

indigo dove
#

okay, thanks 🙂

delicate lotus
#

Im trying to create dialog right now but I dont know where I can get a defines.hpp from.

#

Anyone here has a defines.hpp to share with me? ^^

nocturne iron
#

I'll PM you one

quasi rover
#
_check = _this select 1;  //true or false

if (_check) then { 
  _spawn = ... ;
} else {
  _spawn = ... ;
};

... _spawn... ;

why the last _spawn is undefiend variable? so private delaration in the first line is needed to use _spawn? 😬

indigo snow
#

yes, local variables cant be declared from a lower scope, only higher ones

quasi rover
#

Thanx cptnnick. 😅

indigo snow
#

there is a trick you could use if you wanted though.

private _spawn = if (_check) then {
    [0,0,0]
} else {
    [999,999,999]
};
quasi rover
#

🙂

#

😄

pliant stream
#

Don't do that if you don't understand it. Both expressions are evaluated and if they have side effects your code is broken.

nocturne basalt
#

how can I get the current weapon if It's not connected to a turret?
currentWeapon seems to just work on turrets....

vapid frigate
#

in a vehicle i'm pretty sure all weapons are connected to turrets (in the config)

nocturne basalt
#

hm, I have missilepods on the wings of a plane and no turret specified

#

weapons[]={"rockets_Skyfire"};
magazines[]={"38Rnd_80mm_rockets"};

#

it's not inside any turret

#

I have used currentWeaponTurret on a tank with a turret, and it works fine. Does not work here (since I dont have a turret?)

vapid frigate
#

not sure, maybe that's the 'drivers turret' or 'primary turret' ?

nocturne basalt
#

a deault turret you mean?

#

default

vapid frigate
#

that might help you get the turret paths

nocturne basalt
#

I managed to get it just by using this:
_w = _this select 1;

#

_w is selected weapon. hmm didnt even need to use one of those curretWeapon functions

austere hawk
#

does someone have a solid way to have a script run at a reduced,. but fixed framerate (independant of the game framerate?)

still forum
#

CBA onEachFrame with delay != 0

nocturne basalt
#
_v = _this select 0;
_w = _this select 1;
_count = _v ammo _w;
hintSilent str _count;

_w returns "rockets_Skyfire", but _count is always 0....
this should be right, right?

I'm using magazines[]={"38Rnd_80mm_rockets"};

icy mauve
#

I keep getting "general exception in expression" on various "==" comparisons completely unrelated to the context. Does this appear if I try to compare apples with peas unrelated object?

#

Also my script doesn't even run anymore lol

#

I used _unit setVariable ["continue", true, true]; and try to retrieve amd check it with (_unit getVariable continue) isEqualTo true

#

So I can later cancel the while-loop by using <unitname> setVariable ["continue", false];

distant egret
#

You have to use Quotes
(_unit getVariable "continue") isEqualTo true

#

around the var -> continue

spice arch
#

got a weird issue popping up

#
Error Undefined variable in expression: _enemyside
icy mauve
#

so I guess setVariable sets a string of a private array bound to the unit (like PHP does everything) right?

distant egret
#

idk how it works behind the screens, but you use a string is variable.

spice arch
#
params ["_waveNum","_enemySide"];
...
...
if (_enemySide isEqualTo "opfor") then
       {
icy mauve
#

It works again but canceling does not.

distant egret
#

do you run it on a dedicated machine?

#

because when setting it true you set the public flag to true, when you set it to false you don't.

spice arch
#

i'm calling the function from:

_eSide = selectRandom ["opfor","indfor"];
[waveNum,_eSide] call missionGen;
distant egret
#

@spice arch I suggest you to debug it with diag_log

spice arch
#

ok i'll give that a try

icy mauve
#

@distant egret no I don't run it on a dedicated machine.

distant egret
#

k

#

but setting it to false doesn't work?

icy mauve
#

No.

#

I am not exactly sure

#

I have a trigger with this: ```sqf
crewman2 setVariable ["continue", false, true];
crewman2 playAction "WalkF";
systemChat "entered";

distant egret
#

k

icy mauve
#

I get printed "entered" but the previous animation continues.

distant egret
#

and the systemChat shows?

#

k

icy mauve
#

I'll try with switchMove

#

wait it's playAction. Why?

#

It actually worked before when the animations didn't run.

distant egret
#

Any errors when running that via the debug console?

#

Also I think someone said earlier that playAction didn't work properly in Arma3

icy mauve
#

So switchMove does indeed stop the animation, the unit however does not walk to the desired Waypoint

spice arch
#

hey @distant egret

#

so I tried using diag_log

#

and the result has be puzzled

#

so from the init where I initialize the arguments

#

and then perfrom the call:

_eSide = selectRandom ["opfor","indfor"];
[waveNum,_eSide] call missionGen;
#

the diag_log returns properly:

[1,"opfor"]
#

but right after the params of the missionGen.sqf file

#

the diag_log also throws the error:

#
Error Undefined variable in expression: _enemyside
#

the missionGen starting lines look like this

#
params ["_waveNum","_enemySide"];
_args = [_waveNum,_enemySide];
diag_log _args;
cedar kindle
#

why not use actual sides instead of strings ?

indigo snow
#

diag_log can log nil in arrays cant it? so thats a kinda wierd error

icy mauve
#

I hate "general exception in expression", it tells me nothing.

spice arch
#

@cedar kindle I could try that, I'll give that a shot but it is very strange to me that the passed value is just lost

#

@cedar kindle just changed it, same problem except the first diag_log outputs

[1,EAST]

instead

indigo snow
#

the error really should be somewhere else

#

diag_log doesnt error when logging a nil value in an array

spice arch
#

hmm

#

so i am doing this in the init

#

let me paste the whole thing so

indigo snow
#

pastebin!

spice arch
#

maybe i am causing a scope problem or race condition or something

indigo snow
#

your error is elsewhere

#

or youre not in the right file

#

the error you pasted also doesnt have the S in enemySide capitalized as it is here

spice arch
#

ok let me post the other one

indigo snow
#

there is no _enemyside there either, only _enemySide

spice arch
#

hm wait i dont understand

#

didnt I put _enemySide as the param?

indigo snow
#

look at the capitalized letters

#

did you copy paste your error or write it out yourself?

spice arch
#

copy paste

indigo snow
#

see the S isnt capitalized

spice arch
#

i thought that was just the rpt doing its own capitalization

#

or lack thereof

#
scripts\missionGen.sqf, line 68
10:57:55 Error in expression <oc"];
_randLoc = [];

_args = [_waveNum,_enemySide];
diag_log _args;


_mapSize >
10:57:55   Error position: <_enemySide];
diag_log _args;


_mapSize >
10:57:55   Error Undefined variable in expression: _enemyside
#

oh i pasted the wrong section of the rpt, its a recurring error becuase of the loop in the init

#

the section for the diag_log is here

#
Error in expression <oc"];
_randLoc = [];

_args = [_waveNum,_enemySide];
diag_log _args;


_mapSize >
10:57:55   Error position: <_enemySide];
diag_log _args;


_mapSize >
10:57:55   Error Undefined variable in expression: _enemyside
10:57:55  scripts\missionGen.sqf, line 15
10:57:55 "TEST LINE"
indigo snow
#

cant figure it out, sorry.

spice arch
#

it's all good thanks for trying m8!

#

my guess right now is that it has something to do with the fact that its a loop-ed call in the init

#

and maybe the machine like having a race condition because i didnt do a wait till null or something

little eagle
#

Error Undefined variable in expression can only have one reason.

#

You execute the code in scheduled environment and tried to access a variable that is undefined.

#

_enemyside was nil and you used _enemyside

indigo snow
#

oh shit i forgot scheduled did care about that

spice arch
#

ok hmm

#

thanks commy, i think the problem stems from the fact that i have a missionComplete.sqf being called from a trigger

little eagle
#

race condition

spice arch
#

with regards to scheduled vs unscheduled

#

scheduled basically means that the script has a 3ms limited run time before it gets paused for the next one

#

and unscheduled the script just keeps running?

#

are there any other differences besides that?

little eagle
#

You cannot use suspension commands in unscheduled environment. (sleep, uiSleep, waitUntil).

#

canSuspend reports true in scheduled environment and false in unscheduled environment.

#

Scheduled code has serialization and it is enabled by default and can be disabled using disableSerialization.

#

When serialization is enabled, you cannot store DISPLAY and CONTROL values in variables directly.

spice arch
#

oh, another question, can spawn/execVM cause race conditions within the scheduled envrionment?

little eagle
#

You can indirectly by using arrays...

#

spawn and execVM do start pseudo threads, so using those presupposes the scheduled environment. No idea what you exactly mean by that question.

spice arch
#

like say i have 3 execVM calls

#

the first two write to a variable X

#

the first says x=1

#

the second says x=2

#

and put those writes into an inf loop

#

the thrid execVM has an infinite loop that reads x and hints or outputs it

#

will the output randomly be 1/2?

little eagle
#

I'd say yes. You at least have no guarantee which one x will be.

spice arch
#

ah k, sorry to interrupt your previous explanation

little eagle
#

Because the code can be suspended after every command obviously.

#

I was done explaining. That is all the differences I can think of.

spice arch
#

thanks m8

#

i'm not too familiar with serialization

#

where can i read up on it?

little eagle
#

No where. It's just basically saving a copy of all running scheduled scripts when saving a game. And then resuming the scripts when loading it.

#

And if you disable the serialization, the script will be gone when loading a save.

#

There is no real reason why you can't use CONTROL and DISPLAY inside variables in that environment by default. It's just that controls and displays don't survive when closing the game, so I guess this annoying error is to prevent you from borking up save games.

#

Which everyone does anyway.

spice arch
#

ah k

#

thanks for the explanations!

little eagle
#

Bad design. Too bad I was still in elementary in 1997 when this stuff was coded...

spice arch
#

well we can only hope some of this stuff will be updated for arma 4/enfusion

onyx geode
#

Is there a way to compile a String containing a Function with Macros to code ?

still forum
#

Is there a preprocess command? I can't look now

#

likes besides preprocessFile

little eagle
#

No, you can only preprocess from files, not strings.

still forum
#

BI couldn't allow that. Because then you could just crash the game for everyone

little eagle
#

You can do that regardless.

still forum
#

@jade abyss OBE is obfuscated? Really? Wanted to find out how you do the window breaking and now I have to deobfuscate that pbo first?

jade abyss
#

intersect

hallow spear
#

is there anyway to dark the images when using setobjecttexture. they are coming in many shades lighter on vehicles

#

i've tried images and rgba color selector

austere hawk
halcyon crypt
#

😁

spice arch
#

hey guys

#

back for another round of why is my variable undefined

#

error code:

16:05:50 Error in expression <dLoc, -1, objNull];
guardArray pushBack _gp1;
guardArray pushBack _gp2;

_randLo>
16:05:50   Error position: <_gp1;
guardArray pushBack _gp2;

_randLo>
16:05:50   Error Undefined variable in expression: _gp1
#

my code in the script:

_gp1 = createGuardedPoint [east, _randLoc, -1, objNull];
_gp2 = createGuardedPoint [resistance, _randLoc, -1, objNull];
guardArray pushBack _gp1;
guardArray pushBack _gp2;
halcyon crypt
#

check the line before where you define _gp1 😃

spice arch
#

hmm this is what i have before it

#
_trg = createTrigger ["EmptyDetector",_randLoc];
_trg setTriggerType "NONE";
_trg setTriggerType "NONE";
_trg setTriggerArea [200,200,0,false];
_trg setTriggerTimeout [3,7,5,false];
_trg setTriggerActivation ["ANY","PRESENT",false];
_trg setTriggerStatements ["(count (thisList select {alive _x && _x iskindOf ""LandVehicle""}) isEqualTo 0)",
"waveClear = true; publicVariable ""waveClear""; waveNum = waveNum+1; publicVariable ""waveNum""; ",
""];
waveClear = false;
publicVariable "waveClear";
trg = _trg;

_gp1 = createGuardedPoint [east, _randLoc, -1, objNull];
_gp2 = createGuardedPoint [resistance, _randLoc, -1, objNull];
guardArray pushBack _gp1;
guardArray pushBack _gp2;
#

guardArray is a public variable defind in the init.sqf

#

_randLoc is something that is position generated in this script earlier

halcyon crypt
#

createGuardedPoint doesn't return anything

#

apparently

spice arch
#

ah

#

so how do i delete the guardedpoint

#

do i just find the created trigger?

halcyon crypt
#

no clue really

#

it seems like that guard point is forever

spice arch
#

hm

#

i guess i can do a workaround

#

via create trigger

#

and then setTriggerType

#

but its odd

#

the documentation for setTriggerType says - use createdGuardedPoint instead

halcyon crypt
#

createGuardedPoint seems completely unrelated to triggers

#

only uses the GUARD waypoint

spice arch
#

am i misreading the documentation? it seems to imply that a guarded point is a trigger with the "guarded by" type

#

and the guard waypoint is for the unit/group

tough abyss
#

If I wanted a client to ask another client to execute a script, without it having to interact with the server, what would be the best way to do it? Is this even possible without CBA?

For example, an infantry client tells a tank-gunner client to spawn a marker at a position.

frank mesa
#

Anyone in here would like some freelance work scripting a few gas grenades for me?

subtle ore
still forum
#

@tough abyss remoteExec

#

you can pass player objects into there

#

for example driver (vehicle player)

tough abyss
#

You can? So if I name a unit bob_1, I can use bob_1 to remoteExec?

subtle ore
#

👍

tough abyss
#

If so, the wiki needs to be updated. "Object - the function will be executed only where unit is local"

#

That makes things significantly simpler though. Thanks guys. Wow, I was about to write a whole headache of minimal package sharing

still forum
#

a player is only local for the player

#

AI can be local at many places. But a human occupied unit is ... almost always local to the human

tough abyss
#

I figured a unit variable would be local to the server. Good to know, though, that answers a lot of other potential questions.

warm gorge
#

How do I go about applying hidden textures to stuff like weapons? Some weapons have hidden selections but im not sure how to apply them. Would I just access the associated config value and setObjectTexture with that?

indigo snow
#

You cant

vapid frigate
#

if it has hidden selections, you can with a mod (but not script)

#

just need to overwrite hiddenSelectionsTextures[] =

delicate lotus
#

Is there a way to get if a unit is currently moving / walking

#

?

vapid frigate
#

i guess 'speed' or 'velocity'

#

havent tried on units but they should work

warm gorge
#

@vapid frigate Hmm okay, thought it might be possibly in vanilla but all good

delicate lotus
#

@tough abyss I meant moving in generell

#

not some walking

jade abyss
#

speed ?

delicate lotus
#

um

#

rip me

#

yeah speed is right lol

tough abyss
#

How do I send the client's unit to the server? 'player' is always local, so attempting to send that to the server has the server just refer to itself.
Ex., the client remoteExecs a function that asks the server to move the client's unit

indigo snow
#

Send the player object as an argument

tough abyss
#

I do, but on whichever machine the code is executed, 'player' is replaced with that machine. I want to send the actual client's unit as a variable

#

Maybe I gave a poor example

#

player remoteExec ["hint", 0]; This being 'requested' to be ran by the client.

ex, I'd want that hint to say the client's name. Instead it says the host's name, as it's being executed on the host,, so player == host

subtle ore
#

too little arguments if you want to hint the client's name

tough abyss
#

How would I send the client's name?

subtle ore
#

just like if you were to grab a name in any other context. (name player)

#

[(name player)] remoteExec["hint",player,false];

tough abyss
#

Oh, duh. Then I can just use the name to refer to the client's unit.

subtle ore
#

doubt that works, going to try it now. one sec

tough abyss
#

It does, just ran it

subtle ore
#

what? (name player) or [(name player)] remoteExec["hint",player,false]; ?

tough abyss
#

[name player] remoteExec ["hint", player];

subtle ore
#

make sure to disable jip

tough abyss
#

Just debug consoling to make it sure it works atm.

subtle ore
#

well unless this is just on a need to know basis

tough abyss
#

Thanks, can't believe I didn't think to send the name.

subtle ore
#

Yep.

chilly hull
#

Anyone know how to go from spectator camera to zeus? I'm trying to make it so that our dead admins can switch into the zeus interface. I've tried just calling openCuratorInterface, but that just crashes the game.

tough abyss
#

Ah, that solution won't work @subtle ore . It's the unit itself I'm trying to send, and while I can send their name in singleplayer (if I name the unit "bob" in editor, itll send bob), in multiplayer it sends their profile name, which I cannot use to find the unit.

indigo snow
#

if you use the player command as an argument it should send the object variable, not the player command itself, so that should resolve

tough abyss
#

When using remoteExec, that doesn't work.
If a client executes (say via addAction):

player remoteExec ["fnc_killMe", 0]; 

player is local to whoever is actually executing the script. So since the server is running fnc_killMe, player == server, not the client that sent the request.

icy mauve
#

Whats wrong with this? ```sqf
(group crewman2) setCurrentWaypoint 1;

tough abyss
#

@icy mauve *

icy mauve
#

So I need to set it twice?

tough abyss
#

Evidently so.

icy mauve
#

So I am able to set unit a the waypoint 1 from unit b?

tough abyss
#

I'm not sure what you mean

icy mauve
#

I have Unit A in Group A, and Unit B in Group B. And if I want to I could send Unit A to the Waypoint of Unit B right?

#

I mean, I'm not trying to do that, just wondering.

tough abyss
#

I don't know, you'd have to test that, but it looks like that might be possible.

icy mauve
#

My Snippet unfortunately doesn't work anymore.

ionic hemlock
#

I have a very weird issue

#
bomb addEventHandler ["hit", "call bomb_fnc_bombHit"];```
#

this just doesn't do anything anymore, calling the function per debug console works just fine

warm gorge
#

How could I get an object out of a string such as '983c100# 1121956: i_house_big_02_v1_f.p3d'? call compile doesnt seem to work

tough abyss
#

Solved my issue @indigo snow @subtle ore incase you want to know.

Storing "player" as a value stores the unit, not the locality. So

_client = player;
_client remoteExec ["hint", 0];

displays "Bob" (client unit's editor name)

Weird that I couldn't find this issue online anywhere, figured this would be a pretty commonly used MP scripting issue

warm gorge
#

How could I get an object out of a string such as '983c100# 1121956: i_house_big_02_v1_f.p3d'? call compile doesnt seem to work

still forum
#

Can't

ionic hemlock
#

somehow it seems that eventhandlers are broken

#

my eventhandler just doesn't get called anymore at all

tough abyss
#

eventhandlers aren't broken, if its not getting called there is something wrong with your code

ionic hemlock
#

yeah the issue was somewhere else, hit wasn't firing because I was firing a 9mm gun at a water tank

#

I have a different issue though

#

I use setVehiclePosition iterating over all entities at the start of my mission

#

but it's only sporadically working

#

all AI units will be teleported with that, but every player just gets teleported to the position of their vehicle and starts outside of it

#

even so setVehiclePosition seems only to trigger after the mission has been started from the briefing

#

the issue is only present on dedicated servers, not on self hosted ones

cedar kindle
#

@ionic hemlock hit doesn't fire for really small objects, or similar

ionic hemlock
#

Figured that out already

cedar kindle
#

post code for your tp script

ionic hemlock
#

It's basically a foreach entities with setVehiclePosition

#

Give me a few minutes

cedar kindle
#

idgi what you mean with "the position of their vehicles and outside of it"

#

what do you expect to happen?

ionic hemlock
#

I expect all units to be around the point I set via setVehiclePosition and not next to their vehicles they are assigned to

#

Generally​ the issue is that it doesn't work for ai units during briefing, only afterwards everyone gets teleported (or not)

#
// move all vehicles
{
    _x allowDamage false;
    if(side _x == west) then {
        _x setVehiclePosition [[(bluStartLoc select 0)+(([1,-1] select ((_forEachIndex+1) % 2))*(1+(3*_forEachIndex))), (bluStartLoc select 1), (bluStartLoc select 2)], [], 0, "NONE"];
    };
    if(side _x == east) then {
        _x setVehiclePosition [[(opfStartLoc select 0)+(([1,-1] select ((_forEachIndex+1) % 2))*(1+(3*_forEachIndex))), (opfStartLoc select 1), (opfStartLoc select 2)], [], 0, "NONE"];
    };
    _x allowDamage true;
} foreach vehicles;
// move all AI units
{
    _position = [0,0,0];
    _x allowDamage false;

    if(side _x == east || _x == opfor_scientist) then {
        _position = [(opfStartLoc select 0) + random 5, (opfStartLoc select 1) + 10 + random 5, (opfStartLoc select 2) + random 5];
    } else {
        _position = [(bluStartLoc select 0) + random 5, (bluStartLoc select 1) + random 5, (bluStartLoc select 2) + random 5];
    };

    if (_x == opfor_scientist || _x == blufor_scientist) then {
        _x setVariable ["scientist", true, true];
    };

    _x setVariable ["orgPos", getPos _x, true];
    _x setVehiclePosition [_position, [], 0, "NONE"];
    [_x, [_position, [], 0, "NONE"]] remoteExec ["setVehiclePosition", _x, false];

    _x disableAI "MOVE";
    _x allowDamage true;
} foreach entities [["CAManBase"], [], true, false];```
#

I ran into the issue that it doesn't work consistently and that it doesn't work on AI slotted units during briefing

#

iirc none of my units that is not a player is getting moved during briefing, I use setVehiclePosition for other entities during PostInit as well

#

debugging-wise I saw them teleported once the briefing was over

#

the same script works just fine when I am the hosting server, this postInit script is running on the server only

cedar kindle
#

your script will error out if opfor/blufor scientist slots aren't taken

#

those variables will be nil

ionic hemlock
#

disregard that

cedar kindle
#

use _x == missionNamespace getVariable ["opfor_scientist", objNull]

ionic hemlock
#

as in, it doesn't matter

#

I'll use that thanks

cedar kindle
#

the remoteExec is not needed

ionic hemlock
#

that might be

#

it was for testing purposes

#

the script logs no errors into the rpt and I don't see any on screen running it

cedar kindle
#

this runs where ?

ionic hemlock
#

on a dedicated server

#

again, the main issue is that the units are not getting teleported before/during the briefing

#

speaking mostly of AI slotted units

#

that's like my main issue

hollow lantern
#

is there any way to work with simlinks? So to say my scripts are on a different location then my mission. Just local for testing and such

gray thistle
#

this is actual a good question, But i suggest you to leave it in the mission folder itself you only will get mad about a diffrent location than the mission folder.

jade abyss
#

Should work.

hollow lantern
#

@gray thistle ah nope 😄 Thats the thing I not want to do. But I'll guess it will work if I just clone the stuff over Github and do my edits on my original mission. I just don't want to have several versions of a file somewhere on my SSD. Just one file I need to edit and everything else is on the same version

#

alltough the solution is not the best because I need to sync everytime I made a change

gray thistle
#

i see ^^

halcyon crypt
#

anyone know whether the BIF supports inline code? Like single backtick vs triple backticks

hollow lantern
#

I tried it once with a simlink and a sample sqf file but mr. 3DEN was like nope, sqf not found

#

but it works with Mods 😄

#

like A3 Dev: mklink /D "F:\SteamLibrary\steamapps\common\Arma 3 [development]\@VM" "F:\SteamLibrary\steamapps\common\Arma 3\"

jade abyss
#

Why not do the same with the unpacked MissionFolder?!

hollow lantern
#

I tried that but the sqf will not be loaded

#

its like 404 not found 😄

jade abyss
#

Then... you did something terribly wrong

hollow lantern
#

hmmmm okay I try it again

gray thistle
#

sometimes i just amaze myself... i am getting things done like syncing databases with a third party tool but i am thinking about how to get an addaction for players permanent (after death)<.<

halcyon crypt
#

like an action on a dead body?

gray thistle
#

na more like an add action after respawn thinking about the eventhandler respawn

halcyon crypt
#

ah

gray thistle
#

Somewhere a player should be abel to save for their selfs 😄

halcyon crypt
#

yeah just re-add it during whatever is being ran on respawn ^^

gray thistle
#

will take its time i juste learned yet about remoteexeccall

#

i think the object persistance would be easier to do than the player persistance with all the local and server stuff ^^

hollow lantern
#

seems not to work 😄

halcyon crypt
#

mklink /D is for directories not files

hollow lantern
#

aah yes dang

#

I should have known that grr...

#

thx

spice arch
#

hey guys

#

been poking around with the new jets

#

it seems that the data link stuff is all config based

#

so I have ran into a problem where if I turn on the data link via the editor

#

if the vehicle respawns

#

it loses that setting

#

i cannot seem to find any scripting commands that allow me to turn the data link stuff back on

#

is there any way for me to modify the config for the respawned vehicle?

#

oh wait nvm

#

i am just bad at searching the scripting commands

#

for reference if anyone else needs it

cedar kindle
#

@gray thistle CBA_fnc_addPlayerAction

nocturne iron
#

Is BIS_fnc_manageCuratorAddons local or global?

#

it doesn't seem to work for clients on dedicated server when called from the initServer.sqf

rotund cypress
#

RemoteExec with JIP to true? @nocturne iron

#

Never used that function but RE might be what you're loking for

nocturne iron
#

I'll give it a look

#

Also

#
["sg_singleclick_west","MapSingleClick",{vblue_z_lastCamJump = _this select 1;publicVariable "vblue_z_lastCamJump";hint "thx"}] call BIS_fnc_addStackedEventHandler; 
``` any clue why this isn't hinting 'thx; when I click on the map?
#

it's being called from initPlayerLocal.sqf if that helps

vapid frigate
#

don't think you need a stacked event handler for that? try addMissionEventHandler ["MapSingleClick", {vblue_z_lastCamJump = _this select 1;publicVariable "vblue_z_lastCamJump";hint "thx"}]

leaden summit
#

Can someone point out what I've done wrong here
It's supposed to kick you out of a chopper if you're not wearing the right gear. I get the hint, but it doesn't eject me?

_veh addEventHandler [ "GetIn", {
    _unit = _this select 2;
    If ( uniform _unit != "U_B_HeliPilotCoveralls" || headgear _unit != "H_PilotHelmetHeli_B" ) exitwith {
         _unit action ["Eject", vehicle _unit];
         Hint "You need your flight gear to fly.";
    };
}];```
nocturne iron
#

@vapid frigate thanks, that worked

simple solstice
#

@leaden summit have you tried moveOut?

leaden summit
#

I haven't, I didn't see that in the action list on the wiki. I'll give it a shot

tough abyss
#

There's also getout

#

I think

leaden summit
#

Yeah pretty sure I've tried getout

simple solstice
#

moveOut _unit; should work just fine

#

or player...

leaden summit
#

would player still work in MP ?

simple solstice
#

well if hint works only for the player, I think player should work. but I may be wrong.

leaden summit
#

Cool, moveOut works just fine thanks. Strange that the eject action didn't though.

simple solstice
#

maybe because action is local and moveOut is global?

leaden summit
#

More than likely. Usually when I've messed something up 95% of the time it's a locality issue

delicate lotus
#

@nocturne iron I like defines.hpp you send me but its not a total complete one ._. . Do you know where I can get a complete one? Or does anybody know?

nocturne iron
#

what classes in particular are you looking for?

#

you could also de-pbo'ing something like warfare

#

actually I might send that through to you

delicate lotus
#

Yesterday I made a working dialog. Now I started a project using a dialog and I cant get it to work

#

It always tells me resource not found.

#

while I have this in my description.ext:

#include defines.hpp
#include weaponshop/gui.hpp
#

and this in the gui.hpp:

class weaponshop_dialog
{
    idd = 5000;
    movingEnable = false;
    enableSimulation = true;
    
    class controlsBackground {
        class background: RscText
        {
            idc = 1000;
            text = "";
            x = 0.3425 * safezoneW + safezoneX;
            y = 0.318 * safezoneH + safezoneY;
            w = 0.301875 * safezoneW;
            h = 0.28 * safezoneH;
            colorText[] = {0,0,0,1};
            colorBackground[] = {0,0,0,1};
            colorActive[] = {0,0,0,1};
        };
    };
    
    class controls {
        class list: RscCombo
        {
            idc = 2100;
            text = "List";
            x = 0.381875 * safezoneW + safezoneX;
            y = 0.332 * safezoneH + safezoneY;
            w = 0.18375 * safezoneW;
            h = 0.028 * safezoneH;
            colorText[] = {1,1,1,1};
            colorBackground[] = {0,0,0.25,1};
            colorActive[] = {0,0,0,1};
        };
        class buy: RscButtonMenu
        {
            idc = 2400;
            text = "Buy";
            x = 0.585312 * safezoneW + safezoneX;
            y = 0.332 * safezoneH + safezoneY;
            w = 0.0525 * safezoneW;
            h = 0.07 * safezoneH;
            colorText[] = {1,1,1,1};
            colorBackground[] = {0,0.25,0,1};
            colorActive[] = {0,0,0,1};
        };
        class cancel: RscButtonMenuCancel
        {
            x = 0.585312 * safezoneW + safezoneX;
            y = 0.43 * safezoneH + safezoneY;
            w = 0.0525 * safezoneW;
            h = 0.07 * safezoneH;
            colorText[] = {1,1,1,1};
            colorBackground[] = {0.25,0,0,1};
            colorActive[] = {0,0,0,1};
        };        
    };
    

};
vapid frigate
#

@delicate lotus can you paste the script you use to open it

#

?

#

(or the line)

#

should just be

createDialog "weaponshop_dialog";```
delicate lotus
#

yeah but nothing happens

#

and In editor it tells me after going back from the preview that preprocessor failed file not found or empty

#

Î think I found out what I did wrong

#

maybe

#

yeah I forgot some ""

delicate lotus
#

okay now I have another issue

#

how can I get the icon of a weapon to be used in a dialog?

#

I know how to get the displayName

#

but not the icon

#

okay nevermind

#

I found a wonderful online config browser which showd me the way to the picture

#

now I have another issue

#

the picture which I get is kinda to small

warped moon
#

How could one remove the "activate mine" from the commanding menu? Ever since last arma patch when you drop a slammine, and scroll over it, you'd get that option.. :\

icy mauve
#

For the life of me I can't figure out how to stop a certain Animation and make the AI move to a god damn waypoint.

halcyon crypt
#

_unit switchMove "" should kill whatever animation the unit is in

icy mauve
#

@halcyon crypt it does, but I can't make the Unit walk to the Waypoint.

#

In the Wiki for "addWaypoint" it says:

In game versions prior to Arma 3 v1.22: If you add a waypoint to your group and then want them to start moving to that waypoint, make sure to call setWaypointType "MOVE" on your waypoint.

Does it maybe still apply although said otherwise? I tried creating a waypoint and "setCurrentWaypoint" and "addWaypoint". But the Unit never moves.

halcyon crypt
#

no clue to be honest

#

seems more like that you somehow disable unit movement all together

icy mauve
#

Oh my fucking god, yes I did.

#

It says "disableAI Move" in the init

#

I am probably the stupid person on this planet.

jade abyss
#

Yep.

icy mauve
#

When I wrote the above question I thought like "damn, asking the real questions on my way to my pro-scripting-carreer" lmao

#

Still doesn't go to the damn Waypoint.

#

it.... may.... be...

#

So he walked somewhere, but I don't think his goal is the Waypoint

#

he just stopped randomly

#

it finally works

icy mauve
#

Oh really? Barely and of the Briefing Animations work.

["Acts_HUBABriefing", "HubBriefing_lookAround1", "HubBriefing_lookAround2", "HubBriefing_loop", "HubBriefing_pointLeft", "HubBriefing_scratch", "HubBriefing_talkAround", "HubBriefing_think"]
nocturne iron
#

@delicate lotus make sure your text size isn't being multiplied by anything in the default class

#

GUI editor outputs text size about 40x too large and text boxes can appear missing because of that

tough abyss
#

the ai group ownership tool is coming along. you can individually push each ai group to be controlled by a desired client or headless client. or press a button that evenly distributes the ai to all clients. even got a button that shows you server fps. testing with 200 ai spawned on the server and myself as a client, server fps goes from 20-25 up to 45-50 when I hit the distribute button. I guess it's because the server and client run on seperate threads/cpus.

subtle ore
#

@tough abyss this is a project you are working on?

tough abyss
#

yeah. I'll add a thing here and there every once in a while

nocturne iron
#

That's pretty cool

warm gorge
#

Would the setHit command be an accurate way of determining how much damage to a certain body part would kill the player? Im trying to confirm how much damage to certain parts (ie, head, face_hub, body etc) actuallyy kills the player, as im reading some people say for some parts its 0.9, whereas ive also seen it as 1 or above.

icy mauve
#

I feel like Arma has 1001 various functions to do all kinds of stuff but nothing I want is working properly.

  1. I need an Animation for a Ground Crew to tell a Helicopter to take off, didn't find one yet.
  2. I need a player to play a Briefing Animation (animations don't work)
  3. I need a player to play "Acts_TerminalOpen" to the Player opens the Terminal and....
  4. I need to make a UAV (RHS: AFRF) to become a BluFor one.

I have no idea how to do any of those and nothing works.

icy mauve
#

I can't even use "animationNames" to find out which Animation possibly opens the Terminal or which animation to use animate.

icy mauve
#

I don't even get where "diag_log" puts stuff, the Wiki just doesn't tell.

still forum
#

RPT

#

Wiki just doesn't tell. WTF dude? Dumps the argument's value to the report file. and report file is a link that tells you everything about it

icy mauve
#

Link report_file: Location: See "Crash_Files" => Crash Files: Visit: "%userprofile%\AppData\Local\Arma 3" Nothing there that contains anything useful. Only File dated today ends more than 2 hours ago where I had a crash during startup. @still forum

still forum
#

do you launch arma with -noLogs ?

icy mauve
#

@still forum Nope, logs are enabled.

vapid frigate
#

there should be an rpt file in there

#

very rare for it to have 10 mins without something in there for me

still forum
#

If you have -noLogs then there indeed might be no rpt in there. But otherwise there is always one

vague hull
#

its not there if you specify a profile folder, then its most likly there

full bone
#

Does anyone have a script for waypoints to have transport planes drop AI paratroopers, and the another script for a second waypoint to despawn the plane? I am looking to have a AI c47 drop AI paratroopers in a mission I am making (ifa3 lite)

icy mauve
#

@vague hull Where exactly would it be?

vague hull
#

where ever you have defined it

#

otherwise search your whole drive for the rpt ^

icy mauve
#

copyToClipboard doesn't help as well.

vague hull
#

...

icy mauve
#

What is wrong with this?

anims = animationNames player;
diag_log anims;```
I get exactly nothing.
#

Or in it's other version:

anims = animationNames player;
copyToClipboard (toString anims);```
#

Neither do I get anything when replacing player with dataterm, a Data-Terminal

young current
#

animationnames command is for vehicle animations not man animations

jade abyss
#

toString < ? Why?

#

toString != ""
str word > "word"

still forum
#

to string takes an array of numbers. not an array of strings

vapid frigate
#

have you found the 'animations' button under the debug console?

#

that's the easiest place i know of to find human anims

#

(not that it's particularly easy still)

icy mauve
#

@young current might have worked anyways, I need the animation for an Object as well.

#

nvm

delicate lotus
#

@nocturne iron well the problem is that the picture is too small. Text has perfect size thou

cobalt vine
#

Can anyone advise if enableDynamicSimulation has to be executed globally or if just server is sufficient?

halcyon crypt
#

I'm gonna guess that dynamic simulation runs on the server anyway

#

so server should be sufficient

halcyon crypt
#

there you go

#

not just server 😛

#

or is it

#

wtf

#

weird docs

cobalt vine
#

testing it is then... XD

austere granite
#

could anyone explain me why fullCrew [cursorObject, "", true]; returns a driver on static weapons

#

i mean it would be kinda nice if that command would return the actual seats. I know that's asking for a lot

delicate lotus
#

is there a way to trigger a action on the press of a key ?

rancid ruin
#

yeah, keydown event handler

delicate lotus
#

k

subtle ore
tough abyss
#

@cobalt vine i remember one of the blues saying enableDynamicSimulation only had to be executed once

#

looked through my post history, cant seem to find it

cobalt vine
#

Once as in on one client/server? Or once as in once and then don't execute again. My application is a more dynamic version of the dynamic simulation with LOS checks

subtle ore
#

http://imgur.com/a/iLhBK , this is what is retruned by the command side on a param passed unit, I have no idea what the hell is going on with this one

#

^ disregard above, it was a remote unit.

tough abyss
#

Is there a way to count how many players are assigned to a shared Task (from the 2016 task overhaul system)?

tough abyss
#

Addtionally, would would arguably be more effecient performance wise: sending 10~ string variables with a remoteExec, or sending 10 separate remoteExec requests?

tough abyss
#

1 remoteExec

tough abyss
#

@tough abyss nice, cant wait till you release it?

rancid ruin
#

distributes AI ownership among clients and server, i believe

vapid frigate
#

i've found the same thing (even zeus-placed units can slow things down if we don't send them to the server or HC).. but uploads on home connections are slow here in australia

rancid ruin
#

@vapid frigate off topic, but are there any other aussie films like Chopper? i tried romper stomper and it was awful

tough abyss
#

lol

vapid frigate
#

i can sorta barely remember the chopper movie.. there's lots of australian movies, but i don't watch a lot of movies in general. i don't think there's many people like chopper reid though

rancid ruin
#

man it's one of the best films ever, absolute classic. straya needs to step up and make more films in that vein

warm gorge
#

Any idea why adding weapons to a vehicle, for example in my case a Caesar plane through '_vehicle addWeapon "M134_minigun"' no longer shows the ammo display in the top right? Since last update? Not sure if theres a way to fix this

ivory nova
#

Anyone able to send me an example of stepping through a for loop inside a while loop, assuming that's possible? Trying to do so, but running into situation where the for loop always ends early, then the script starts the while loop again

vapid frigate
#

depends what you want to do.. if your loop is ending early maybe you're using (for example) _i for both loops

#

simplest example is ```SQF
while {true} do {
for "_i" from 0 to _count-1 do {

};
};

limpid pewter
#

Hey, im trying to figure out what the syntax is for adding an action to a GUI button. From what i understand he wiki says that is should be like this action = "this spawn mld_fnc_spawnPlayer;"; But this didn't work. How would you go about spawning a command from button press?

vapid frigate
#

i think onButtonClick instead of action

#

and _this, not this

limpid pewter
#

What would be the best way to stop people from closing a dialog by pressing esc, but still allow them to open the pause menu?

jade abyss
#

Not rly possible, afaik.
You can disable specific Buttons in a particular Display, but thats it.

warm gorge
#

@limpid pewter The most viable workaround to that issue would be through the use of a loop and waitUntil and just re-opening the dialog.

vapid frigate
#

yeah seen that done on spectator dialogs.. sorta situation dependent though

limpid pewter
#

@warm gorge Yeah, i have tried something similar, i had an event handler for the dialog, that would re create the menu when the dialog was closed by pressing esc. noEsc =(findDisplay 12034) displayAddEventHandler ["Destroy", { hint "Please Don't Press the ESC Key"; sleep (0.5); call mld_fnc_createSpawnMenu; }];

vapid frigate
#

if you just want to prevent pressing it you can add a onkeyup event handler and return false if the key is ESC

#

but it can be annoying not being able to get to the pause menu

limpid pewter
#

@vapid frigate Yeah i want to avoid that

vapid frigate
#

@limpid pewter you could do what you have with a bit bigger sleep and then pressing ESC twice would open the menu

icy mauve
#

Is there any way to connect a OPFOR (Russian Pchela from RHS) to a BLUFOR UAV Terminal?

icy mauve
#

I think I found an error in the wiki but since I'm quite new to this, I maybe want to verify it.
I used: sqf _drone = [[14214, 16288, 0.1], 233, "rhs_pchela1t_vvs", "west"] call BIS_fnc_spawnVehicle;
and it resulted in: http://i.imgur.com/uC6H05W.jpg

Replacing "west" with "group player" (or similar) fixed this.

limpid pewter
#

can you post the code that defines the param's variables

#

maybe you haven't selected the right index from array?

#

just a thought

icy mauve
#

There are no variables in the params.

limpid pewter
#

oohhh nvm, i should have read that it was a bis function

icy mauve
#

Is it working properly at all?

#

Because the selected Vehicle doesn't spawn at the location. I don't know where it spawns at all.

limpid pewter
#

if you don't know wether it spawns at all just write into debugg systemChat str(_drone); as a testing thing (remeber that _drone is a local var)

icy mauve
#

It does, since I selected my own group, I get 2 new people in my group where it says "inside drone" for both.

#

However, I don't know where any of them are as well.

limpid pewter
#

where the drones are? or the players?

icy mauve
#

Both

limpid pewter
#

just do a system chat again and but say systemChat str([getPos player, getPos drone]);

#

or something

#

but as to your orignial question "Is there any way to connect a OPFOR (Russian Pchela from RHS) to a BLUFOR UAV Terminal". Im not sure, but you could create a script that would switch player to drones camera view, then a script that adds a bunch of display 46 event handlers that would each trigger some code that would control various thing about the drone (pos, velocity, dir, etc..).

#

This is very clunky, but i might work 😛 idk

#

display 46 keydown EHs i meant to say, so that when the player keydowns the usual flight control buttons it would control the attributes of the drone

icy mauve
limpid pewter
#

before and after the original code you posted?_drone = [[14214, 16288, 0.1], 233, "rhs_pchela1t_vvs", "west"] call BIS_fnc_spawnVehicle;

#

is that what you meant by before and after?

icy mauve
#

No. That is only a part of the code.

#

This is the complete part sqf deleteVehicle ru_drone_old; _drone = [[14214, 16288, 0.1], 233, "rhs_pchela1t_vvs", group _unit] call BIS_fnc_spawnVehicle; _newdrone = _drone select 0; _unit connectTerminalToUAV _newdrone; systemChat str([getPos player, getPos _newdrone]);

limpid pewter
#

k

#

so are you still trying to find how it spawns? or are you trying to find out why you can't connect to it?

#

how = where * sorry

icy mauve
#

okay, adding the chat message and the UAV Feed, it spawns in a height of 50m and crashing ~4 seconds after spawning.

limpid pewter
#

ok

#

are you sure you have correctly created and put _unit into a group?

icy mauve
#

_unit is at the moment it's own group as it's a test unit.

#

But in the scenario it will be the person using an action in the action-menu.

#

But why does it spawn in a height of 50 meters instead of the given 0 or 1?

limpid pewter
#

yeah idk aye, you has see it to spawn at 0.1 m yeah?

#

maybe the Postition format is not AGLS for this function idk

icy mauve
#

Yes, that was one of the tests

vapid frigate
#

no real need to use the bis function, you could just use createVehicle

limpid pewter
#

at this point i woul suggest some serious trial and error XD

#

what lecks said

#

but not unless it doesn't fit your scenario

icy mauve
#

@vapid frigate I need to set the SIde as I'm trying to spawn a OPFOR Drone.

vapid frigate
#

_newDrone = "rhs_pchela1t_vvs" createVehicle [14214, 16288, 0.1];

#

only groups have sides, and only units have groups

#

well vehicles do have sides.. but it's in their configs which you can't edit with script

icy mauve
#

But I need to grant a BLUFOR-UAV-Operator access to the OPFOR-Drone

limpid pewter
#

edit the configs sounds like the way to go

icy mauve
#

no idea about that tho.

limpid pewter
#

ok, wait 1 sec will get wiki link

icy mauve
#

And it would be awesome to enable the drone being blufor via script, not initially.

vapid frigate
#

does that 'connectTerminalToUAV' work?

#

if it doesn't, i imagine it won't really be possible

icy mauve
#

It doesn't work no, but I may have found another option, lemme check.

limpid pewter
#

if you find it impossible how bout my previous shitty solutioons "but as to your orignial question "Is there any way to connect a OPFOR (Russian Pchela from RHS) to a BLUFOR UAV Terminal". Im not sure, but you could create a script that would switch player to drones camera view, then a script that adds a bunch of display 46 event handlers that would each trigger some code that would control various thing about the drone (pos, velocity, dir, etc..).
This is very clunky, but i might work 😛 idk
display 46 keydown EHs i meant to say, so that when the player keydowns the usual flight control buttons it would control the attributes of the drone" haha

vapid frigate
#

actually can you just give them the other terminal?

#

give the unit an opfor terminal

limpid pewter
#

that won't workl

#

it will check the side of that unit, if you give CSAT terminal to NATO unit will not work

#

atleast last time i tried

icy mauve
#

Okay "moveInDriver" doesn't work either, too bad.

vapid frigate
#

when you go up to that drone there's an option to 'hack UAV'

#

which lets you take it over

limpid pewter
#

@icy mauve lol no that won't work haha

#

@vapid frigate ahhh maybe there is a function/command to do that in a script

icy mauve
#

I don't want the "Hack UAV" thing. I want fancy animations and stuff.

limpid pewter
#

player setUnitTrait ["UAVHacker",true];

#

yeah maybe you could do it all behind the scenes by using a command, or selecting that action from the action menu( again behind the scenes)

icy mauve
#

UAVHacker true enables the unit to hack uavs, but it doesn't hack the uav itself so you have to do it again.

#

wait wait wait

limpid pewter
#

k

icy mauve
#

it might have just worked

#

no it didn't

limpid pewter
#

lol ok

#

Yeah sorry man, i don't have a solution atm. im intrested in the issue tho, i will probably do some more reasearch tommorow.

tough abyss
#

if i add two addActions to initPlayerLocal.sqf it should show right? Debug console seems to run (show my actions just fine) but execVM decides not to work

limpid pewter
#

show code

tough abyss
#

player addAction ["Move", {[cursorObject] spawn MoveMent;}, nil, 6, false, false, "", "true"];

limpid pewter
#

MoveMent one of your functions?

tough abyss
#

yep

#

it works but if i add it to my execVM i dont see the action

limpid pewter
#

try spawn yourtag_fnc_MoveMent

#

ok

vapid frigate
#

add it to what execvm? you shouldn't need to execVM anything for addactions in initPlayerLocal.sqf