#arma3_scripting

1 messages · Page 439 of 1

still forum
#

Oh I think I know why it happens

sacred fox
#

@Dedmen

´´´

_waypoints = [[3611,13113,0],[3251,5236,0]];
_trp = createVehicle ["B_Heli_Light_01_F", [3611,13113,0], [], 0, "CAN_COLLIDE"];
_trp setDir 185;

_pos = getPosATL _trp apply {call BIS_fnc_cutDecimals};
if (_pos in _waypoints) } then { hint "true!" } else { hint "false"
};
´´´

#

damn forgot the marks for higlitght

still forum
#

If you drop weapon player wants to play animation. And after animation is done the weapon is dropped. That might explain the slight delay

warm gorge
#

Use the toFixed command instead of BIS_fnc_cutDecimals, its faster. Nothing major, but worth a change.

still forum
#

@sacred fox I said remove the parseNumber not remove all arguments to BIS_fnc_cutDecimals

#

@warm gorge toFixed turns into string

warm gorge
#

Sorry, in combination with parseNumber

torn juniper
#

possibly yea

still forum
#

I don't think that converting to string, truncating and converting back is more expensive than just doing modulo 1 or something like that

torn juniper
#

found another bug/feature with uisleep though

#

but this one aint an issue imo

warm gorge
#

parseNumber (3.56346 toFixed 4); //0.0026 ms (10000 cycles)
[3.5634,4] call BIS_fnc_cutDecimal; //0.0111 ms (10000 cycles)

still forum
#

actually. _x - _x % 1 might be a nice solution

subtle ore
#

So, how exactly would I makeshift a entity created event, is there anything in CBA for that yet?

still forum
#

CBA eventhandler?

#

What do you mean

subtle ore
#

Meaning -> No entity creation handler exists yet -> How would I get a script to catch new units?

still forum
#

CBA XEH. Init eventhandler

#

I'm sure there is also a scripted variant of that

warm gorge
#
_waypoints = [[3611,13113,0],[3251,5236,0]]; 
_trp = createVehicle ["B_Heli_Light_01_F", [3611,13113,0], [], 0, "CAN_COLLIDE"]; 
_trp setDir 185; 

_pos = getPosATL _trp apply {_x - _x % 1};
if (_pos in _waypoints) } then { hint "true!" } else { hint "false"
};
``` @sacred fox
subtle ore
#

Alright, I'll check that out.

torn juniper
#

no way to dupe that

#

lol

still forum
#

@warm gorge Do you have Arma open? Can you check
parseNumber (3.56346 toFixed 0);
[3.56346,0] call BIS_fnc_cutDecimal;
3.56346 - (3.56346 % 1)
?

warm gorge
#

parseNumber (3.56346 toFixed 0); // 0.0016
[3.56346,0] call BIS_fnc_cutDecimal; // 0.0011
3.56346 - (3.56346 % 1) // 0.0007

#

Interesting

torn juniper
still forum
#

cutDecimal is suddenly faster than toFixed+parseNumber?

#

Probably handles 0 decimal places specially

warm gorge
#

I copied that speed result from someones comment on the wiki

torn juniper
#

oh you wanted speed 😅

still forum
#

That wiki entry was probably before cutDecimal was optimized

warm gorge
#

I edited my above example to him with your method, the fastest

#

And yeah most likely, ill update it

sacred fox
#

@Dedmen is it possible to remove one number infront of the decimal, so when it comes to getPosATL it will only count every 10m. so for example instead of [9193,12114,0] it will be [919,1211,0]

still forum
#

Yes.

#

It's called division by 10

#

number/10

sacred fox
#

lol, i feel retarded now xD

#

too obvious

peak plover
#

😂

still forum
#

easy way _pos vectorMultiply [0.1,0.1,0.1]

sacred fox
#

right now i have this, and it is working, but its too precise for me :P
_approxPos = _vehiclePos apply { [_x,0] call BIS_fnc_cutDecimals};

#

so you mean i should make like
_roughPos = _approxPos vectorMultiply [0.1,0.1,0.1]; ?

still forum
#

yeah

#

But that will be a completly different position

#

9193 -> 919 is 8274m away from the original position

sacred fox
#

15:29:59 Error in expression <nc_cutDecimals};_roughPos = _approxPos vectorMultiply [0.1,0.1,0.1]; if (_rough>

15:29:59 Error position: <vectorMultiply [0.1,0.1,0.1];if (_rough>
15:29:59 Error vectormultiply: Type Array, expected Number

cutting away the decimals work, but vectorMultiply on that doesnt for some reason.

#

do i have to make a forEach statement of apply or something?

#

like
_roughPos = _approxPos apply {vectorMultiply [0.1,0.1,0.1] };

still forum
#

oh

#

oops vectorMultiply 0.1

#

Ah yeah. oops

sacred fox
#

so
'''
_roughPos = _approxPos apply { vectorMultiply 0.1; };
'''

#

btw what was the trick to get syntax higlightning in discord? 😛

still forum
#

No

#

without the apply

sacred fox
#

oh ok

still forum
#

```sqf

```

sacred fox
#

so this is right then?

_roughPos = _approxPos vectorMultiply 0.1;
still forum
#

yeah

astral tendon
#

do you guys know a way to lock ammo boxes?

still forum
#

Just close the inventory right after someone opened it

#

tehn hint "This box is locked"

#

I think Lifers do the same

astral tendon
#

what about the take action from the weapon holders?

still forum
#

That's already too late

#

That happens after you took something

meager heart
#

replace your crate with simple object

torn juniper
#

Disable the action via a mod is only way to remove the hand

astral tendon
#

Well, i remove it by set the damage to 1

#

the weapon was supouse to be a dummy anyway.

#

But any way, since the update that did this, i dont know how to put magazines in the weapon that are either placed in the editor or in script, anywone know that?

#

for exemple

_holder = createvehicle [ "weaponholdersimulated",[getPos player select 0, getpos player select 1,0],[], 0, "can_Collide"]; 
_holder addWeaponCargoGlobal [primaryWeapon player,1];
_holder addMagazineCargoGlobal [currentMagazine player, 1];

The magazine is not on the gun, there is only a tiny box on its side

still forum
#

you cannot create magazines with attachments (that includes magazines) via script

#

besides giving them to an AI and ordering it to drop it

#

I have a script command ready for that. Still waiting on BI to copy-paste it into the engine :U

wary vine
#

quick question , is it possible to create a local unit ? I need it just to check if player has space for a bunch of items before merging them onto the player

astral tendon
#

so, what is the work around for what i what?

still forum
#

Why don't you just check... If the player has space? Without a local unit? ^^ I think you can createVehicleLocal a unit.

#

@astral tendon As I said. besides giving them to an AI and ordering it to drop it

wary vine
#

its for my market system @still forum i want to make sure they have space for all the items, before they are added 😃

still forum
#

Yeah.

#

Why not just check

astral tendon
#

well, i cant order a dead AI to drop it.

wary vine
#

so it doesnt get halfway through and say no fuck you

still forum
#

aka get their uniform classname. Check in config how much total space it has

#

then use script to check how much of it is full

#

Check how much space the items you wanna add need

wary vine
#

i was going to use canAddItem to backpack etc

still forum
#

Can do all that without a sacrificial unit

#

yeah

#

I know

#

uniform/vest/backpack all the same

wary vine
#

load ?

still forum
#

Don't even need config

#

Miiight need config to get the mass of the items you are trying to add.

#

Dunno if there is a handy command for it

wary vine
#

II could probably make one

#

would that be weight in the config ?

peak plover
#

There is

wary vine
#

@peak plover what is it ?

peak plover
#

Plus related commands

wary vine
#

can add doesnt give mass.

#

Im trying to find out if the player can hold all the items, before adding any of them.

peak plover
#

Ohh u need that, nah I thought u need to check if u can add sth

#

Aaah

wary vine
#

nah, I was going to create a duplicated unit, with the same gear, and add it to him, then if he can hold all of them, copy the gear over.

peak plover
#

Hmm

#

Why dis even

#

Like buying from shop?

wary vine
#

Market.

#

so basically need to know if it can hold all of the items, before even adding one.

winter rose
#

^ the penis licker item is expensive

wary vine
#

Ikr xD

#

I was testing if edit listing worked...

peak plover
#

So u stop buying completely ?

winter rose
#

I buy, but I complain

wary vine
#

when the buyer clicks buy.. its going to check if they have space for all the items, if they do, send the function to the server to set the item as bought , then return, and give the player all the items.

peak plover
#

Save weight into the thingy

#

Check available weight

wary vine
#

total weight wont work

#

because it might have the right weight between 2 containers.

#
{
  private _itemClassname = _x select 0;
  private _itemType = _x select 1; //only needed for virtual items.
  if (_itemType != "virtual items") then {
    _itemWeight = //This is what I need.
    if (_spaceLeftinBackpack < _itemWeight) then {
      if (_spaceLeftinVest < _itemWeight) then {
        if (_spaceLeftinUniform < _itemWeight) exitWith {
          //No containers left.
          _notEnoughSpace = true;
        } else {
          _spaceLeftinUniform = _spaceLeftinUniform - _itemWeight;
        }
      } else {
        _spaceLeftinVest = _spaceLeftinVest - _itemWeight;
      }
    } else {
      _spaceLeftinBackpack = _spaceLeftinBackpack - _itemWeight;
    }l
  };
}forEach _arr;
``` something like that.
#

I need the ``_itemWeight`

peak plover
#

Use.config viewer ingame

wary vine
#

i did, cant find anyintg xD

#

only thing even close is weight which on all the items I have seen is 0

wary vine
#
  private _itemClassname = _x select 0;
  private _itemConfig = ([_itemClassname] call Life_fnc_fetchCfgDetails) select 6;

  private _mass = switch (_itemConfig) do {
    case ("CfgWeapons") : {getNumber(configFile >> "CfgWeapons" >> _itemClassname >> "mass")};
    case ("CfgVehicles") : {getNumber(configFile >> "CfgVehicles" >> _itemClassname >> "mass")};
    case ("CfgMagazines") : {getNumber(configFile >> "CfgMagazines" >> _itemClassname >> "mass")};
  };
``` have to work on it a bit, but thanks @restive cedar
errant jasper
#

Is there some built in function that display some structured text in a dialog?

wary vine
#

?

#

ctrlSetStructuredText

#

but you have to have a control in your dialog , that is compatible with structuredText

errant jasper
#

Yup. But I am asking if there is such a generic function already. Basically, want to avoid defining my own Dialog.

#

Probably BIS or CBA maybe already has something.

wary vine
#

o.O

#

ctrlCreate

errant jasper
#

Basically just need to display some structured text and a close button.

wary vine
#

rscStructuredText

naive estuary
#

Then manually set position and size.

errant jasper
#

I know how to do it. I am asking if there already is functionality already done.

wary vine
#

hintC

errant jasper
#

Yup. That gets close. But no close button, and ideally would like something scrollable

wary vine
errant jasper
#

ahh. let me try

wary vine
#

if you want it scrollable, you will need rscControlsGroup

errant jasper
#

Hmm hint works, but hintC does nothing

wary vine
#

at this point predefining a display is probably cleaner xD

#

and quicker

#

a control sorry,

astral tendon
#
if !(Side _this == civilian) then{
_this addMPEventHandler ["mpkilled", {
_Target = (_this select 0);
_Unit = (_this select 0);
_killer = (_this select 1);
_Unit remoteExec [ "RemoveAllActions", 0, true ];
if (Side _killer == west AND (currentWeapon _Unit isEqualTo "")) then {hint "ROE violated"};
if (true) then {
_wh = "WeaponHolderSimulated_Scripted" createVehicle getpos _Target;
_wh addWeaponCargo [currentMuzzle _Target,1];
_wh addMagazinecargo [currentMagazine _Target, 1];
_wh setPosASL [(eyePos _Target select 0) + 0,(eyePos _Target select 1) - 0,(eyePos _Target select 2) - 0];
_Target action ["DropWeapon", _wh, currentWeapon _Target]; 
_wh addAction ["Secure Evidence", {
_wh = _this select 0;
Player playAction "TakeFlag";
deleteVehicle _wh;
},nil,1.5,true,true,"","true",2,false,""
];
removeAllWeapons _Target;
_wh spawn {
sleep 1;
_this  setDamage 1;
    };
   };
 }];
};

My only problem with this is the fact that the weapon holder does not have a magazine on the weapon but out side of it, any fix for that?

wary vine
#

create a controls group, with the controls you need, then create a function that you can call to make it 😃

naive estuary
wary vine
#

unit addWeaponItem [weaponName, itemName]

still forum
#

@astral tendon Why do you ask the same question again that I answered you before?

astral tendon
#

Like i said, i cant order a dead unit to drop the weapon

still forum
#

There is no other way

wary vine
#

@astral tendon : unit addWeaponItem [weaponName, itemName]

still forum
#

You have to spawn a living AI. Give it the weapon. let it reload. Let it drop the weapon. And despawn it again

#

@wary vine No. Completly useless

wary vine
#

oh wiat[.

still forum
#

unit

#

He doesn't have a unit

wary vine
#

he wants to add a magazine to the holder

still forum
#

he has a weapon holder

wary vine
#

gg

#

goodluck

errant jasper
#

@naive estuary Thanks, that pretty much exactly what I was looking for.

#

No scrolling though, so have to make my own

naive estuary
#

He wants to add a magazine to a weapon in the weapon holder.

astral tendon
#

So, how does the game does that by default?

wary vine
#

@astral tendon you can not see a weapon as a "container" in a wh

still forum
#

The game does that in engine

#

not possible with scripts

wary vine
#

ezfix

#

invisibleunit. add the weapon and magazine

still forum
#

Which is what I've been saying an hour ago ^^

wary vine
#

only way

still forum
wary vine
#

i had to do it for my weaponshop a while ago

#

get arma to implement it xD

still forum
#

get BI to implement it. They only have to copy-paste

wary vine
#

+1 to that would be nice.

still forum
#

Dwarden told me I should ask again after Arma 2 EOL

wary vine
#

yh.

#

I could make my weaponshop a hell of a lot cleaner then

still forum
#

Arma 2 patches stopped a month ago. But they aren't done yet

wary vine
#

I have it so you can preview the item with attachments, but there is a few second gap when it reloads the weapon

still forum
#

But. My command doesn't have magazine yet 😄 ¯_(ツ)_/¯

wary vine
#

if you can modify the attachments in the wh, it would be beautiful

astral tendon
#

fak

still forum
#

I think magazine was too hard to implement. But I might take a look at it again later

astral tendon
#

So, is there a way i can get the droped weaponholder init?

still forum
#

"init" ?

astral tendon
#

"init"

still forum
#

Well. Just type "init" in the debug console and you'll get "init"

wary vine
#

You cant reference a weapon as a "container" at all

#

whilst its in a weaponholder

astral tendon
#

I would like to get the weapon holder a variable at the moment the unit dies and put comands on it

still forum
#

get it a variable?

#

you mean get it INTO a variable?

astral tendon
#

I dont know man.

still forum
#

If you don't know what you want how should anyone help you with that?

astral tendon
#

Never mind, better i just live with that.

real tartan
#

how can I check when modded "face" is used but addon not loaded ?

#

_faces apply { if ( ([_x] call BIS_fnc_itemType) select 1 isEqualTo "" ) then { diag_log format ["_class: %1 | face not found", _x]; _faces = _faces - [_x]; }; };

#

this apply only for items, but not faces

still forum
#

how do you retrieve the faces?

#

isClass configFile >> "CfgFaces" >> _x probably

real tartan
#

got faces in predefined array _faces

#

I want to filter faces that are used but their addon is not loaded

#

and subtract them from _faces array

digital pulsar
#

anyone knows a foolproof way of deleting a vehicle and spawning a similar one in the exact same spot? deleteVehicle _vic; private _newVic = "B_G_Offroad_01_F" createVehicle [23783,23007,0.55]; _newVic setPosATL [23783,23007,0.55]; _newVic setDir 282; this leads to an explosion 1 in 5 times

still forum
#

spawn + sleep

#

deleteVehicle doesn't delete

#

it just marks for deletion

digital pulsar
#

i tried a little sleep between del and create but to no avail

#

vehicle is inside a garage btw

still forum
#

bugging into roof or ground or just randomly exploding?

digital pulsar
#

hard to tell, it seems to spawn in the correct spot

#

i copied pos directly from editor

wary vine
#

best way of checking what type of weapon I am on (prim/secondary/handgun)

still forum
#

currentWeapon == primaryWeapon and so on

wary vine
#

hmm

still forum
#

I think that's best/only

wary vine
#

not quite like that

#
    if (//istypeofprimaryweapon) then {
      if ((primaryWeapon _unit) isEqualTo "") then {
        _unit addWeapon _itemClassname;
        _itemHandled = true;
      };
    };
#

cant I use type = in the configs ?

digital pulsar
#

what's the deal with people avoiding == for string comparison, is it a habit from java/c or does it actually make a difference in arma?

wary vine
#

isEqualTo is quicker i beleive.

still forum
#

isEqualTo is quicker and case sensitive

wary vine
#
    private _weaponType = getNumber(configFile >> "cfgWeapons" >> _itemClassname >> "type");
    
    //primaryWeapons
    if (_weaponType isEqualTo 1) then {
      if ((primaryWeapon _unit) isEqualTo "") then {
        _unit addWeapon _itemClassname;
        _itemHandled = true;
      };
    };

    //Handguns
    if (_weaponType isEqualTo 2) then {
      if ((handgun _unit) isEqualTo "") then {
        _unit addWeapon _itemClassname;
        _itemHandled = true;
      };
    };


    //Launchers
    if (_weaponType isEqualTo 4) then {
      if ((secondaryWeapon _unit) isEqualTo "") then {
        _unit addWeapon _itemClassname;
        _itemHandled = true;
      };
    };
``` something like that would work right ?
tough abyss
#

Is it possible to change rain color .. would like to have green rain lol

#

acid rain

subtle ore
#

not in script

tough abyss
#

where would that be modified ?

subtle ore
tough abyss
#

ok

edgy dune
#

with ace 3 running how can you detect when a vehicle gets destroyed ? From what I understand ace does something with killed EH that I dont understand

#

wat im trying to do is

#

hint when a vehicle die, like say "vic has died"

winter rose
#

_myVehicle addEvhentHandler ["Killed", { hint "I am dead"; }] doesn't work?
you could go with waitUntil { not alive _myVehicle; } , if all else fails

meager heart
#

mission eh EntityKilled also

obsidian chasm
#

Anybody can help me understand why my AI just seems to die when they paradrop, the flyinheight is 450 which feels like enough but they faceplant when they land, only on a couple of occasions have 1-2 survived.

#

_heli flyInHeight 450;
_heli forceSpeed 50;

#

they are also using B_Parachute

meager heart
#

B_Parachute < that is backpack

obsidian chasm
#

..what

#

but they are clearly using a parachute

#

look

subtle ore
#

Release parachute is a vehicle

obsidian chasm
meager heart
#

which mod is that ?

obsidian chasm
#

just iron front

#

the script im using was left over in one of bohemias escapes but only decided to try it out today

#

so anyway, they only visually have a parachute or something?

subtle ore
#

Release parachute is a vehicle

obsidian chasm
#

lol..

#

@subtle ore care to elaborate?

#

anyway, fixed it myself, bparachute was the issue

daring kestrel
#

in this game parachutes work like vehicles, but you automatically get in/out

obsidian chasm
#

@subtle ore also a cat is an animal 🙂

meager heart
#

probably collisions with chutes, makes troubles there

#

also sometimes units will take damage when they ejected

#

oh nvm... they are not ejected in your script

#

disable collisions/damage for them maybe

edgy dune
#

when you use _myVehicle addEvhentHandler ["Killed", { hint "I am dead"; }] with ace it doesnt work,so for example if u try to hint back the killer, it returns error no unit or something to thatline

#

So i was wondering if there was a way around that killed Eh to detect when a vic dies

wary vine
#

amarite in saying you cant do returns with spawns ?

subtle ore
#

@wary vine the variable attached to the spawn is only going to return <spawn>

wary vine
#

yup feck

winter rose
#

what would you want to do?

subtle ore
winter rose
#

@subtle ore yes?

subtle ore
#

That's an example of what you would use a script handle for

winter rose
#

well, yes I know 😄 I asked @wary vine what he wanted the spawn to return, and maybe help him with his code

wary vine
#

yeah, no I needed an actual variable returned xD

#

its ok, was just trying to make things too complicated. xD

meager heart
#

just set it

astral tendon
#

Do you guys know how to change the name or even the skin of vanila weapons in the game with out need of mods and can be done only inside the mission file?

#

Like those servers that have custom textures for clothes.

river meteor
#

@astral tendon I don't, but I've seen quite a few guides/youtube videos on the subject. Have you tried looking at any of those already?

astral tendon
#

most of they arent reallt what i want

river meteor
#

Looking for some advice on extdb3 before I make this system. I want to just do a bunch of mysql queries all the time as it would be easier to code, but I'm concerned about a performance cost vs doing one load when the player enters the server, modification of data while in the server and one save when the player exists the server back onto the database. Is there a problem with the first method? I ask because I pretty much see people using the second method exclusively

naive estuary
#

As far as I know, there is no way to modify values set in a cfg via mission file or a script.

still forum
#

you cannot modify addon configs from mission

naive estuary
#

As long as you aren't doing a shitload of queries every second. It won't be an issue.

river meteor
#

That would be true for nearly anything though. I'm nervous about scalability

naive estuary
#

What are you going to be saving to the database.

river meteor
#

if I were to do it the second way a 2d array with around 80 elements, each element being an array of around 5 elements. The first way I would just store each as an entry into a table

#

It's a custom inventory script

#

We could say that the server would need to pull all the data of the players inventory and send it to them everytime they open their inventory, which my gut says is a problem, but I'm not entirely sure if it is

naive estuary
#

Have a loop that stores the players last inventory, and their current, if their current is not equal to the last, then update the database.

#

That way you minimize amount of queries.

#

You could even do something to make sure their inventory hasn't changed for x seconds before updating.

river meteor
#

If I wanted to do something like that I might as well have only two queries for when they leave and enter the server

naive estuary
#

Yeah

river meteor
#

I guess I'll just do that, and not risk problems by keeping the data only in the database

naive estuary
#

Keep in mind, if the server ever crashes mid-game, inventory changes since the last time a player connected wont be saved.

astral tendon
#

Is there a way to know what target is the AI targeting?

astral tendon
#

assignedTarget only return the target that is assigned, not what is targeting
targets returns all targets in a range.
targetsQuery seens to do it but o dont know if the aray it return come in order with that he is actually aiming at

astral tendon
#

im trying this

_unit = player;
_targets = (_unit targets [true, 300]);
_TagetThatUnitCanSee = [];
{if ([objNull, "VIEW"] checkVisibility [eyePos _x, eyePos _unit] > 0) then {[_x] + _TagetThatUnitCanSee}} forEach _targets;
_TagetThatUnitCanSee;
#

_targets do return the arays but it seens like that if is not happening at all and _TagetThatUnitCanSee is returning the empty aray i set before

strange urchin
#

[x] + _TagetThatUnitCanSee doesn’t do anythingn

astral tendon
#

I figured

#
_unit = player;
_targets = (_unit targets [true, 300]);
_TagetThatUnitCanSee = [];
{
if ([objNull, "VIEW"] checkVisibility [eyePos _x, eyePos _unit] > 0) then {_TagetThatUnitCanSee append [_x]}

} forEach _targets;
_TagetThatUnitCanSee;
#

this one now works

strange urchin
#

Try _TagetThatUnitCanSee pushback _x

#

Don’t use append if you don’t have to

#

Well, don’t wrap something in an array if you don’t have to

#

And your naming convention probably is going to give anyone else you show this to a seizure

#

Perhaps _visibleTargets?

astral tendon
#

If i dont put _x in a array it gives a error

strange urchin
#

Not if you use pushback

astral tendon
#

well, i not in a naming convention anyway, plus, i am not that creative with names

strange urchin
#

What’s this script for? Yourself?

astral tendon
#

Just for test and see what i could do with it

astral tendon
#

though, what is the reverse of pushBack?

astral tendon
#

well, i finished testing

#
_unit = _this;
while {(alive _unit AND !captive _unit)} do{
_targets = (_unit targets [true, 300]);
_TargetThatUnitCanSee = [];
{if ([objNull, "VIEW"] checkVisibility [eyePos _x, eyePos _unit] > 0) then {_TargetThatUnitCanSee pushBack _x}} forEach _targets;
{_unit forgetTarget _x} forEach allunits - _TargetThatUnitCanSee;
sleep 1;
};
#
{_X execVM "AiTargeting.sqf"} forEach ((allUnits) select {side group _x isEqualTo east});
#

what this does is stop the AI from targeting units it does not see, tough i dont really like to put i on a while loop, any other option better than while for a loop?

#

im afraind that it may turn urgly if there is many units on the mission

peak plover
#

Well if they are in same group

#

U kinda cant

obsidian chasm
obsidian chasm
#

although saying that, having all the AI actively come after you is quite intense..

ornate pawn
#

So i have a pbo file in my mod that contains music

#

i can call the song name for example soldier1 say3D "song Name"; say3D is not for music i know but i put the music in the config.cpp as a sound not music.

#

that works but only i can hear it

#

my other team mates can't hear the sound playing

#

any input?

peak plover
#

@obsidian chasm well that is only using doMove and also uses getpos

modern sand
ornate pawn
#

i was using [CAMP_Base_Speaker_1, "BEW_Song_01"] call CBA_fnc_globalSay3d;

#

it works on everything else

#

and i can hear the music playing on the spearker but my friends can't but they can hear other sounds using the same line of code

#

only that those sounds are in the mission and not in the mod.

#

weird

obsidian chasm
#

@peak plover huh turns out im an idiot anyway, those scripts arent even working lol, just getting script not found

peak plover
#

If it's still bugging u in a few days I'll be back at PC and can help

obsidian chasm
#

ye seems its just a problem with chaser, maybe i can get it fixed before that

#

although im thinking ive just set it up wrong, so no worries

modern sand
#

@ornate pawn ok how about the thing i suggested??

ornate pawn
#

I will give it a try yes. but now something else has caught my attention and its fucking ace mod not letting me disable view distance..

modern sand
ornate pawn
#

thansk

modern sand
#

@ornate pawn I suggest you delete the question that you copied in here, seeming cross-posting isn't allowed

#

seeming you could get in trouble

unborn ether
#

@ornate pawn You could read a whole ACE documentations and explore ACE git data for that time you've asking that a hundred time again.

#

@modern sand Questions realted to scripting are no trouble here.

modern sand
#

But view distance and ACE aren't related to scripting, more so mod use

ornate pawn
#

its okay i already deleted the question here but Are you really gonna make me read the whole documentation just to get an answer on why i can't disable view distance when i already just disable it and it seems not to make any difference ? why even add that feature ? its annoying you know? just let people tweak their own view distance.

#

Jesus..

unborn ether
#

see its kinda easy to find the source of that problem

modern sand
#

He suggested to read the documentation included with the mod, no need to come across as rude.

sacred fox
#

    private["_trigger"];
    _obstacleCount = count W_Obstacles;
    _obstacleName = _x;
    if (_obstacleCount != 0) then {
    {
      _obsPos = _x;
      _trigger = CreateTrigger ["Detector", _obsPos, true];
      _trigger setTriggerArea [10,10,3, true];
      _trigger setTriggerActivation ["GUER", "PRESENT", true];
      _trigger setTriggerStatements ["this",

      _vel = velocity _trp3;
      _dir = direction _trp3;
      _speed = 20;
      _trp3 setVelocity [
       (_vel select 0) + (sin _dir * _speed),
        (_vel select 1) + (cos _dir * _speed),
         (_vel select 2)];
  uiSleep 4;

      _obsMarker = createMarker ["Obstacle", _obsPos];
      _obsMarker setMarkerShape "RECTANGLE";
      _obsMarker setMarkerSize [100,100];
      uiSleep 0.5;
      _obstacleCount = _obstacleCount + 1;
        } forEach _obstacles;
    };

why is this throwing me

13:55:47 Error in expression <ger setTriggerStatements ["this",

_vel = velocity _trp3;
_dir = direction _trp3>
13:55:47 Error position: <= velocity _trp3;
_dir = direction _trp3>
13:55:47 Error Missing ]

At the statement line. AFAIK there is no ] missing 😐

ornate pawn
#

that's not the point dude the point is that if you have a button called Turn off / Turn On it should work and nothing more.

modern sand
#

@sacred fox because your array isn't closed.

ornate pawn
#

if that button doesn't work return the item. end of story. that's my point.

modern sand
#

Not talking about that ^ talking about your response to him suggesting you read the documentation

ornate pawn
#

@modern sand where are you from? are you from U.S ?

modern sand
#

@sacred fox This SQF _trigger setTriggerStatements ["this", Needs to be this SQF _trigger setTriggerStatements ["this"];

#

No, AU

ornate pawn
#

if that's being rude to you..

little eagle
#

server.armaprofile

viewDistance=3000;
preferredObjectViewDistance=3000;
terrainGrid=12.5;

modern sand
#

Don't know why you have to be smart buddy, you seem to always be like this when people try to help you.

sacred fox
#

damn i have stared myself blind on that. thanks nicholas, sometimes you just need other peoples eyes 😛

modern sand
#

All good buddy. glad you asked 😃

ornate pawn
#

No. you said i was being rude when i wasn't

little eagle
#

setTriggerStatements ["this"]; is broken too.

#

Needs 3 args rhs.

sacred fox
#

those arguments are below

little eagle
#

Doesn't change the line being broken and erroring out.

modern sand
#

well yer, don't know about the syntax use for setTriggerStatements, just knew that an array needed to be closed :L

ornate pawn
#

anyways @little eagle that will set mi view distance to 3000 and not letting me go lower what if my players need lower their view distance cause they have toasters?

sacred fox
#

do i really need a trigger off statement aswell?

little eagle
#

The clients can only use a view distance up to the servers view distance. If your server is on toaster settings, even the ACE slider cannot change it above that.

#

do i really need a trigger off statement aswell?
Yes, the command needs 3 args rhs. Not more, not less.

modern sand
#

[condition, activation, deactivation]

ornate pawn
#

yeah that's why i disable that feature on mods or addons configuration and it is still enable.. i don't have a module in the mission so why in the world isn't off?

little eagle
#

You need to change the view distance in the server config. ffs read the doc.

sacred fox
#

hm, ok, what the hell should i put in the OFF statement then. :P
yeah im using the biki all the time. but now i just got lost, i only want it to fire when a particular AI enters the trigger, right now its firing on anything, which is what i want when testing. but why should the trigger have to do anything when nothing has fired it?

ornate pawn
#

I disable it too.. jesus

little eagle
#

You cannot disable the view distance in the server config. That makes no sense. You'd knew that if you read the doc.

ornate pawn
#

k

modern sand
#

lol

#

@sacred fox is your question still related to setTriggerStatements? (I'm a tad confused xD)

sacred fox
#

im trying to simplify down to the basics before making it more complicated. one question though, if i want to append a number at the end of a variable value, its for creating unique names in a forEach statement, so for example Obstacle1, Obstacle2 etc.
my guess is that

obstacleName = "Obstacle"+_obstacleCount;

doesnt work?

#

this is the full statement

private["_trigger"];
    _obstacleCount = count _Obstacles;
    if (_obstacleCount != 0) then {
    {
      _obsPos = _x;
      _trigger = CreateTrigger ["EmptyDetector", _obsPos, true];
      _trigger setTriggerArea [20,20,3, false];
      _trigger setTriggerActivation ["ANY", "PRESENT", true];
      _trigger setTriggerStatements ["this", "hint 'Obstacle near'", "hint 'Obstacle cleared'"];  uiSleep 4;
      _obstacleName = "Obstacle"+_obstacleCount
      _obsMarker = createMarker [_obstacleCount, _obsPos];
      _obsMarker setMarkerShape "CIRCLE";
      _obsMarker setMarkerSize [20,20];
      uiSleep 0.5;
      _obstacleCount = _obstacleCount + 1;
        } forEach _Obstacles;
still forum
#

No you cannot append a number to a string

#

🤦

#

number and string are completly different things

sacred fox
#

oh ok, so if i want to create unique marker names for each run in the forEach loop then? yh but a number can still be typed as a string, i mean it could be a letter aswell. i just want to append something to make the markername unique each run

still forum
#

Also why is that private for _trigger up there?

#

And why do you want to name your Obstaces from Obstace20 to Obstacle40 instead of 0 to 20 ?

#

You can use str or format

sacred fox
#

as for the private, i thought it was needed, to be able to call the variable from this particular script, isnt private for the innermost scope, which mean the variable cant be touched fomr the outside of the script?

still forum
#

no

#

It means that you cannot touch variables from scripts that called yours

#

not the other way around

#

also you can use private _trigger = instead.

sacred fox
#

ah ok

obsidian chasm
sacred fox
#

so as for the count i can just use like

obastacleName = str(_obsPos); // should name the marker with the coordinates.?

still forum
#

@obsidian chasm Uh.. Yeah. Scripts folder is wrong. That page expects them directly next to init.sqf

#

@sacred fox I guess you could yeah

obsidian chasm
#

So just put all that in the init.sqf?

still forum
#

No

#

NEXT TO

obsidian chasm
#

hm well I did that and it gave me errors

still forum
#

but first you said i put them in the scripts folder

#

but that's wrong.

obsidian chasm
#

I moved them a few places for trial and erro

#

error

#

thats what I get now

winter rose
#

@still forum No you cannot append a number to a string 🤦
Weeeeeell in PHP and Javascr.... hemmm nevermind 😄

still forum
#

Well yeah.. Undefined variable.. Meaning your script was found and is running

#

chaser is the variable of the unit that should chase the player

#

you ofcause gotta have to set that

obsidian chasm
#

@still forum I don't understand sorry

#

here is the script btw, the other works perfectly fine it seems

still forum
#

I know what script u use

#

chaser is a undefined variable.

#

You need to set it

obsidian chasm
#

well they spawn from triggers

#

so would i be bale to just remove chaser and it'd do it for all ai?

#

i did that just now and got zero errors

sacred fox
#

do i need to call BIS_fnc_MP to make sure triggers get created on the server?, i have a script now, which is firing in the editor, but it wont fire on the server.

if (_obstacleCount != 0) then {
    {
      _obsPos = _x;
           _trigger = CreateTrigger ["EmptyDetector", _obsPos, true];
            _trigger setTriggerArea [20,20,3, false];
            _trigger setTriggerActivation ["ANY", "PRESENT", true];
            _trigger setTriggerStatements ["this", "_trp setFuel 1;
                  _trp setVehicleAmmo 1;
                  _trpDriver disableAI 'MOVE';
                      _vel = velocity _trp;
                      _dir = direction _trp;
                      _speed = 20;
                      _trp setVelocity [
                      (_vel select 0) + (sin _dir * _speed),
                       (_vel select 1) + (cos _dir * _speed),
                        (_vel select 2)];", "hint 'Obstacle cleared'"];
        _obstacleName = str(_obsPos);
        _obsMarker = createMarker [_obstacleName, _obsPos];
      _obsMarker setMarkerShape "ELLIPSE";
      _obsMarker setMarkerSize [20,20];
          uiSleep 0.5;
      _obstacleCount = _obstacleCount + 1;
        } forEach _obstacles;
#

and i have make sure to make it fire on ANYTHING. to rule out the conditions. so right now it seem to be some kind of server/multiplayer solution im missing. btw im running exile, maybe there is some kind of Exile function which need to be called when creating triggers?

quaint turtle
#

Hey guys, not too sure where to put this, but is it possible to put a progress bar behind an image? If so, how would i go about doing it?

still forum
#

@sacred fox No BIS_fnc_MP anymore. remoteExec command is what it is now.

#

if you run that code on server then it will run on server.

drowsy axle
#

I've personally fallen for trying to optimize the shit out of something that just works.

formal vigil
#

Is there an event for the AI when they go from normal to alerted? i.e. when AI are idle and player approaches the AI so they start fire, I'd like to hook up to that event of changing the state.

meager heart
#

if you mean "event handler" afaik there are none, but we have commands knowsAbout and targetKnowledge

formal vigil
#

Oh man, that's it. I think I could get away with using knowsAbout

#

Thank you @meager heart

worn hatch
#

Hey,

Im trying to create a helicopter that starts of flying straight away however after spawning it with this script:
_activeHeli = createVehicle ["B_Heli_Transport_03_F", getPos player, [], 0, "FLY"];
It instantly goes into a nose dive and crashes into the floor (The Engines are on but it just nose dives) any ideas?
Sorry if im being a massive noob lol

still forum
#

It doesn't have a pilot

#

is my guess

sacred fox
#

@drowsy axle i will do that, but for now, any clue on why the trigger isnt being created/firing on the server, it gets loaded, the log no longer throws any errors and my markers get generated on the map. but the trigger is driving me crazy as it does work when i run the code in the debugconsole in the editor. then it gets created and also firing when i enter it.

worn hatch
#

err I haventt manually added one no, is their a way to force an AI into the pilot seat?

#

nvm I found it thanks

drowsy axle
#

@sacred fox Did you read @still forum's post? No BIS_fnc_MP anymore. remoteExec command is what it is now.

little eagle
#

Why do you even create a trigger. They're annoying and pointless.

strange urchin
#

Probably because he’s new

still forum
#

@drowsy axle in Eden you can right-click on objects and "show in config viewer" there you can copy the classname. Maybe there is a faster way too that I can't think of

robust hollow
#

there is an option to copy the item class to clipboard on the right click menu too

drowsy axle
#

@robust hollow I cannot see that option. Could you explain it?

robust hollow
drowsy axle
#

Ahh okay. That's in default ArmA3.

tough abyss
#

Does anyone know how to replicated the rotating head in the avatar editor menu on the main screen of Arma?

wary vine
#

@tough abyss im guesing you could look through the configs, and see how its done ?

drowsy axle
#

Can you make an #include ''; inside an array?sqf bon_recruit_recruitableunits = [ #include 'script.sqf'; ];script.sqfsqf "B_solder_F", "B_solder_AT_F"

subtle ore
#

it looks like you're trying to overcomplicate something

#

what are you trying to do?

drowsy axle
#

One second

#

Why was my meesage blocked?

subtle ore
#

what message?

drowsy axle
#

I think you can tell what I am doing from the screenshot

subtle ore
#

Oh, it probably hit char limit

drowsy axle
#

Ah

subtle ore
#

Okay, so what are you trying to do with that information?

drowsy axle
#

I inputted all the classnames

#

Which all good. but I want to be able to make the classnames into separate files so that it ain't one long list.

subtle ore
#

you could do something along the lines of : (I do this a lot in my stuff):
in your description.ext:
#include "config\CfgSelectables.hpp" from there you'd make a folder named config in your root and make a header file called "CfgSelectables.hpp"
Then, in your CfgSelectables.hpp:

class CfgSelectables
{
    class nato
    {
         selectable[]={"Unit_1","Unit_2","Blah1"};
     };
}:
#

getText , getNumber , getArray , etc

drowsy axle
#

Right. Here's where the array is #included : sqf if (bon_dynamic_list) then { _scripthandler =[] execVM "bon_recruit_units\recruitable_units.sqf"; //executes dynamic arrray builder to find units of player's subfaction waitUntil{ ScriptDone _scripthandler }; //MUST wait for script to finish } else { #include "recruitable_units_static.sqf" };

#

Well that message ^ took it's time displaying... :/

subtle ore
#

Well, it doesn't make a whole lot of sense since your #include contains "B_solder_F","B_solder_AT_F" correct?

drowsy axle
#

No no no. that the original script for the array. not my file separation

subtle ore
#

because all #include does it copies the code from one file from another

drowsy axle
#

So can I do:c class CfgSelectables { class nato { selectable[]={"Unit_1","Unit_2","Blah1"}; }; class natoPacific { selectable[]={"Unit_1","Unit_2","Blah1"}; }; }:

subtle ore
#

Yeah, besides the awful formatting lol.

private _pacific = getArray(missionConfigFile >> "CfgSelectables" >> "nato-pacific" >> "selectable");
drowsy axle
#

Oh yeah

subtle ore
drowsy axle
#

natoPacific

subtle ore
#

perfect

marble flare
#

how do I exec something like "hint [speed player]"?

subtle ore
#
hintSilent format["SPEED: %1",speed player];
marble flare
#

Thanks!

drowsy axle
#
if (bon_dynamic_list) then {
_scripthandler =[] execVM "bon_recruit_units\recruitable_units.sqf";     //executes dynamic arrray builder to find units of player's subfaction
waitUntil{ ScriptDone _scripthandler  };                                //MUST wait for script to finish
} else {
_aiList = getArray (missionConfigFile >> "CfgSelectables" >> "nato" >> "selectable");
};```Would this work?
subtle ore
#

No problem Tim,
Capwell, yeah that should work.

marble flare
#

didn't work, but I think I know what's wrong

subtle ore
#

player is local

marble flare
#

lol, awesome

#

so, my speed is 0, but the speed of the ship I'm on is 7

drowsy axle
#

From:sqf { _displname = getText (configFile >> "CfgVehicles" >> _x >> "displayName"); _picture = getText (configFile >> "CfgVehicles" >> _x >> "portrait"); _weaponstring = format["%1",_displname,_picture]; _unitlist lbAdd _weaponstring; } foreach bon_recruit_recruitableunits;To:sqf { _displname = getText (configFile >> "CfgVehicles" >> _x >> "displayName"); _picture = getText (configFile >> "CfgVehicles" >> _x >> "portrait"); _weaponstring = format["%1",_displname,_picture]; _unitlist lbAdd _weaponstring; } foreach _aiLIst;Seems right?

#

@marble flare sqf hintSilent format["SPEED: %1",speed vehicle player];

subtle ore
#
hintSilent format["Player speed : %1, Ship Speed: %2",speed player,speed (vehicle player)];
drowsy axle
#

So many tim's 😛

subtle ore
#

yeah that should work.

drowsy axle
#

Do you need the (vehicle player)?

subtle ore
#

I can't really double check right now though, so you will need to test for yourself

#

Well, to return the speed of the ship yeah

marble flare
#

no, I just changed player to "sloop" (name of my ship) and it returned 7.8

drowsy axle
#

That will also work 😛

subtle ore
#

Alright, yeah. Where are you executing this? Player may not work because of locality issue

marble flare
#

when I hit escape, in the exec box

subtle ore
#

local exec?

marble flare
#

i guess

subtle ore
#

you...guess?

marble flare
#

i dunno. this scripting stuff makes as much sense to me as women

subtle ore
#

Lol, you have three boxes in your debug console: global exec, server exec, and local exec.

marble flare
#

oh, local exec

#

ok, how would I write it to automatically convert kph to knots given 1.852 kph = 1 knot?

#

figured it out, i'm sailing with a starboard tack SE at 4.5 knots

subtle ore
#

👏

wary vine
#
if !(_itemHandled) then {
  if (_forceDrop) then {
    _holder = createVehicle ["WeaponHolderSimulated", (getpos _unit), [], 0, "CAN_COLLIDE"];
    if (_holder canAdd _itemClassname) then {
      _holder addItemCargoGlobal [_itemClassname,1];
      _itemHandled = true;
    };
  };
};
``` any idea why im getting bad vehicle type here, but its all working
radiant needle
#

Anybody want to help me make a PMC economy mod?

#

And by help I mean make me a GUI

stone yarrow
#

yo

#

I just got arma 3, and I have notepad ++ with the sqf highlighting, later today It would be nice if some1 can go over the basics wit me

winter rose
real tartan
#

east setFriend [resistance, 1]; should be in initServer.sqf or init.sqf ?

winter rose
still forum
#

@wary vine Don't use WeaponHolderSimulated

#

Or do you specifically need a physx holder?

#

If so use WeaponHolderSimulated_Scripted
And you don't need the canAdd check

radiant needle
#

SO I want an array like this [[Name,"Classname"],[Name02,"Classname02"],[etc]]

#

but with every single item available in the arsenal

#

Is there a way to script this and not have to manually do it?

wary vine
#

@still forum ill take a look now.

still forum
#

@radiant needle Yes. But not thaaat easy

sacred fox
#

will variables in a script be availble for a script that is included in the script, for example you have script1.sqf which includes script2.sqf, will local variables in script 1 be availble to script2?

lusty canyon
#

you have to pass it in array

still forum
#

What is "included"?

lusty canyon
#

then get them back params / _this select x

still forum
#

@lusty canyon wrong for called and included scripts

lusty canyon
#

spawn or call same difference

still forum
#

no

#

absolutely different

lusty canyon
#

["var1","var2"] call whatever.sqf; ["var1","var2"] spawn whatever.sqf;
same difference

still forum
#

No

#

local variables carry over to call. Not to spawn

sacred fox
#

@Dedmen its a separate script which spawns the triggers at different locations, but i want it to be able to recognize the _trp from script 1 in the statements, right now, it doesnt recognize the vairable, as for now i have only included script2 from script1

still forum
#

I prefer to wait till he tells me what he means. rather than speculating

#

What does "include" mean

#

You didn't answer that

sacred fox
#

#include

still forum
#

yes. Carries over

sacred fox
#

ok 😃

radiant needle
#

@still forum Does it involve adding every item to a crate and then checking the cargo, and parsing the output? Because that's the only way I can think of.

still forum
#

no

#

Arsenal stores it's classnames after it loaded

#

Check the contents of the bis_fnc_arsenal_data variable. After opening the arsenal atleast once

radiant needle
#

Would the code be copyToClipboard str bis_fnc_arsenal_data?

#

@still forum So I did hint format["%1",bis_fnc_arsenal_data]; and it returns "Any"

still forum
#

After opening the arsenal atleast once

radiant needle
#

Whoops my bad was opening Ace arsenal

still forum
#

That also works

#

but you need a different variable

#

ace_arsenal_virtualItems

radiant needle
#

Lol it maxes out copyToClipboard

still forum
#

no

#

there is no max to copyToClipboard

#

Atleast not in Arma. Maybe in windows 🤔

radiant needle
#

Yeah im looking in n++ and it cuts off right at 8192 characters

still forum
#

enter it in debug console watch field

#

then just CTRL+A and CTRL+C it out of there

radiant needle
#

error line 112

#

Only problem with this data is it appears to be classname only

#

not display name

still forum
#

yeah

#

what "error"?

radiant needle
#

GEIE

still forum
#

To get displayName configFile >> "CfgWeapons" >> _x >> "displayName"

#

for weapons. And CfgMagazines and CfgVehicles for magazines and backpacks

radiant needle
#

I can always split it, luckily the array is already catagorized by tabs

radiant needle
#

heh cool it works

lone glade
#

ofc it's categorized 😄

#

i'm not insane

radiant needle
#

A little excel magic and baby you got a table cooking

lone glade
#
[
    [ [], [], [] ], // Weapons 0
    [ [], [], [] ], // WeaponAccessories 1
    [ ], // Magazines 2
    [ ], // Headgear 3
    [ ], // Uniform 4
    [ ], // Vest 5
    [ ], // Backpacks 6
    [ ], // Goggles 7
    [ ], // NVGs 8
    [ ], // Binoculars 9
    [ ], // Map 10
    [ ], // Compass 11
    [ ], // Radio slot 12
    [ ], // Watch slot  13
    [ ], // Comms slot 14
    [ ], // WeaponThrow 15
    [ ], // WeaponPut 16
    [ ], // InventoryItems 17
    [ ], // Unique misc 18*
    [ ], //Unique mags 19*
    [ ], //Unique throw 20*
    [ ], //Unique put 21*
    [ [], [], [], [] ] // Unique accs 22*
    [ ], //misc CfgVehicles 23*
    [ ], // misc CfgGlasses 24*
];
*(exist only between onArsenalOpen and onArsenalClose)
radiant needle
#

What would it be for magazines cause I noticed arsenal_data select 2 gave me handguns

lone glade
#

no idea for BI Virtual Arsenal

radiant needle
#

Oh is this for ace?

lone glade
#

yes

#

I made ACE Arsenal, so i'm familiar with it 😛

radiant needle
#

I wish Arma was more like excel

#

Or that it could output CSV files

#

Itd be a poor mans database

peak plover
#

haha no 😄

radiant needle
#

Incase anybody wants a huge ass list of guns + classnames

#

I feel like a stereotypical woman with shoes

#

I have 601 weapons in my mod collection but yet every mission I want something different

sacred fox
#

why is triggers so painful?, is there any way to see triggers created? right now, im not even sure the trigger gets created, the markers however is getting created. also when i try out the triggers in the editor they work as intended. so either they arent getting created for some reason or they arent fire for another reason, i've set them to fire on anything aswell. so its kinda weird.

#

btw its a server side script, and the log output shows no errors.

still forum
#

Why do you even use triggers

sacred fox
#

i want to generate triggers for every bridge (at specific coordinates) in the AI waypoint path. so that the AI gets disabled right before the bridge and then velocity gets added. and that works fine in the editor. but for some strange reason it doesnt work when on the server.

#

if only the bridges had classname and werent terrain object i could use nearObject function. but as they arent i cant. and the only solution i come up with is using triggers

#

hm.. shouldnt be too hard to make custom classnames for the bridge p3ds right?

#

however this IS working in the editor.


_trigger = CreateTrigger ["EmptyDetector", _obsPos, true];
                    _trigger setTriggerArea [30,30,3, false];
                    _trigger setTriggerActivation ["ANY", "PRESENT", true];
                    _trigger setTriggerStatements ["this", "_trp setFuel 1;
                          _trp setVehicleAmmo 1;
                          _trpD disableAI 'MOVE';
                              _vel = velocity _trp;
                              _dir = direction _trp;
                              _speed = 20;
                              _trp setVelocity [
                              (_vel select 0) + (sin _dir * _speed),
                               (_vel select 1) + (cos _dir * _speed),
                                (_vel select 2)];", "_trpD enableAI 'MOVE'"];
#

but even the most simplified TriggerStatement with hints wont fire. so its not the statements. it must be that it isnt being created somehow or maybe wrong pos.

queen cargo
#

Triggers are local only
Keep that in mind

#

Ohh.. Forget what I was saying

radiant needle
#

Is there an easy way to break the windows of every building that has breakable windows?

austere granite
#

spawn 50000 artillery shells 100m above it

#

ezpz

young current
#

just need to figure out what if theres glass hitpoints to break

austere granite
#

Any magical thing i need to do to get setParticleParams working?

#
params ["_class", ["_interval", 0.1]];
if !(isNil QGVAR(cloudDbg)) then {
    deleteVehicle GVAR(cloudDbg);
};

private _pos01 = player modelToWorld [0, 10, 1];
_source01 = "#particlesource" createVehicleLocal _pos01;
_source01 setParticleClass _class;
_source01 attachTo [player, [0, 10, 1]];
GVAR(cloudDbg) = _source01;

private _data = [_class] call FUNC(cloudletExport);

(_data select 0) set [0, "uwotm8"];
_data set [11, [500]]; // Size
_data set [13, [0.5]]; // Speed
_data set [6, [0, 200, 0]]; // Velocity
_data set [4, 10];
_source01 setParticleParams _data;
_source01 setDropInterval _interval;
_data

Put some values on bullshit stuff just to see if it worked... nope

strange urchin
#

There are on vehicles

edgy dune
#

how would go about having a addAction only only show up for only the zeus using the condition parameter?

still forum
#

assignedCurator

edgy dune
#

oh wow I didnt find that

#

any parameters for it? I cant seem to find it on the wiki

still forum
#

Well. CTRL+F finds it for me

#

I'd suggest you search for it again

edgy dune
#

ah k thx

winter rose
still forum
#

As I said. CTRL+F finds it

#

And googling for assignedCurator also finds that

winter rose
#

all I get are
getAssignedCuratorLogic
getAssignedCuratorUnit

still forum
#

throws 🍪

winter rose
#

weee

edgy dune
#

i just used getAssignedCuratorUnit 😛

still forum
#

Yeah. It's getAssignedCurator. Instead of assignedCurator. All hail BI's consistency

edgy dune
#

:hail:

#

I was hoping there was like a isCurator or isZeus

edgy dune
#

fun times,why cant there be a isCurator I just want to have a action menu be only usable by zues 😦

#

zeus*

still forum
#

Because why add a useless command

#

you already have a command you can use to do the same

winter rose
#

@edgy dune if (player in allCurators) then {} ?

still forum
#

That's a weird way of saying if false then {}

austere granite
#

allCurators is the logics, not the units assigned to it

#

player in (allCurators apply { getAssignedCuratorUnit _x })

still forum
#

that is a note on the wiki page. Should probably be in description

#

Man.. You guys have so many bad ideas 😄

#

!isNull getAssignedCuratorLogic player

austere granite
#

/care about zeus, don't even know the commands 😦

still forum
#

Oh look. It does exist

austere granite
#

no bulli mr furry

winter rose
#

it's a BIS fnc

still forum
#

@winter rose isCurator doesn't work

#

Just read the description

winter rose
#

the page is... clean?

austere granite
#

Return if given object is curator logic

#

logic, not player

winter rose
#

oh, right, maybe then

#

let's take a look at the fnc

lone glade
#

lol

still forum
#

You literally just have to CTRL+F for assignedCurator The first one is the solution

#

I don't get why people just ignore the first and directly jump to the second. Which does something completly different

lone glade
#

function is defined twice too apparently

#

yep, defined twice 😄

winter rose
#
private ["_curator","_logic","_curators"];
_curator = _this param [0,objnull,[objnull]];
_logic = missionnamespace getvariable ["bis_functions_mainscope",objnull];

_curators = _logic getvariable ["bis_fnc_curatorInterface_curators",[]];
_curator in _curators

heh, no more info

lone glade
#

and the code is different in both

#
/*
    Author: Karel Moricky

    Description:
    Return if given object is curator logic

    Parameter(s):
        0: OBJECT

    Returns:
    BOOL
*/

private ["_curator"];
_curator = _this param [0,objnull,[objnull]];
gettext (configfile >> "cfgvehicles" >> typeof _curator >> "simulation") == "curator"
winter rose
#

hahahahaha, where is this one

lone glade
#

^ this one is defined in functions_f_curator\curator

#

the other in functions_f\curator

winter rose
#

@edgy dune : player in BIS_fnc_listCuratorPlayers should definitely do it 😉

#

@lone glade I wonder how it goes when you call it "like that"

subtle ore
#

why exactly does BI not follow the a3 format:

private _curator = blah;
//vs
private["_curator"];
_curator = blah;
winter rose
#

because it was written before private varname was allowed

lone glade
#

one is probably made before pa.... oh wait there's param in there

austere granite
#

because old

lone glade
#

nope

#

param is used in there

austere granite
#

param is younger than private _var isnt it?

lone glade
#

nope

austere granite
#

older*

winter rose
#

then yup 😄

austere granite
#

i guess maybe at one point they did a regex for this select or something

lone glade
#

aaah yes it is

#

1.48 vs 1.54

still forum
#

Also we had private since arma 2

#

it was called local back then

sacred fox
#

@Dedmen ok, so now i have removed other eventual conflicting scripts from the equation, i can now tell that my triggers IS spawning on the server by using "allMissionObjects "EmptyDetector". so i see all 5 triggers are there, but still wont fire when passing trough them, still with the setTriggerActivation to ANY,PRESENT and i have tried both true and false on the Global/Local state. im out of ideas for now..unless its something with the forEach loop, could the variable name of the trigger doesnt really matter when it executes within a script right? or do it have to be unique for every trigger created?

still forum
#

What exactly doesn't fire?

#

the hint?

sacred fox
#

yes

still forum
#

There is no UI on the server

#

so the hint doesn't display there

sacred fox
#

im connecting to the server 😛

still forum
#

and if your hint is only executed on the server then you can obviously not see it if you are not the server

#

That is why self-hosting works but dedicated doesn't

sacred fox
#

but its not only the hint in the statements

still forum
#

What else?

#

That _trp variable?

sacred fox
#

yes

#

teh setVelocity

still forum
#

That is a undefined variable

#

how's that supposed to do anything

#

same as _trpD

sacred fox
#

its not undefined, its the variable of the CreateVehicle earlier in the script

still forum
#

No.

#

It's undefined

sacred fox
#

and _trpD is the driver

still forum
#

Variables only carry over to lower scopes. Aka when you call a script

#

the trigger statement is a new script instance

#

nothing carries over to that

sacred fox
#

ah

#

so thats why i cant use those variables then?

still forum
#

yeah

sacred fox
#

hm, how could i pass it to the trigger? with setVariable?

still forum
#

yeah. for example that

sacred fox
#

and make a unique one

#

that explains alot

#

@Dedmen so if i use

_trp setVariable ["transporter", _trp, true];

and then use the "transporter" variable within the triggers it could work?

still forum
#

no

#

you need to use getVariable

#

Setting the variable on the thing you don't have but want to find won't be of much use

#

as you cannot getVariable it off again if you don't know what it is

sacred fox
#

ah ok. so i would use getVariable to fetch the value of _trp first, and then set a new one with that value?

still forum
#

Uh

#

I don't know

sacred fox
#

this is confusing

still forum
#

yeah sure you could do that. Don't understand it's use though

sacred fox
#

all i want is to be able to use the local script's variables WITHIN the trigger statements 😛

still forum
#

setVariable onto the trigger object

#

you can use thisTrigger inside the statement to get the trigger

#

and then get the variable back from the trigger

sacred fox
#

aha,

#

so

_obstrigger setVariable ["transport", _trp, true];
still forum
#

why the true at the end though?

#

why do you need it global if the trigger only runs on server

sacred fox
#

public?

#

oh

#

so thats what global is?, is it like broadcasting between clients, not on server, and local is only that particular client, and server is yeah well server?

#

that part has always confused me

still forum
#

It broadcasts the variable to all other machines

#

servers and clients

sacred fox
#

ah ok

#

but as the script is only running on the server it doesnt need to broadcast it then?

#

sorry if im a pain in the ass, but im spending all my time in getting into arma3 scripting, i am reading alot on forums and biki aswell as you guys here, i have learnt alot, but some things are still confusing 😛

edgy dune
#

@winter rose ahhh thx

sacred fox
#

will that particular variable be able to call with thisTrigger[3]? i guess the variable gets added to the array when you create the trigger, or how do i fetch the value after i have stored it in the trigger ? 😛

#

or is something like thisTrigger Transport enough?

sacred fox
#

i have now tried setting variables to a trigger in the editor, but i cant seem to fetch them, what am i doing wrong here?

_trigger = CreateTrigger ["EmptyDetector", [7198.262,11039.27,0], true];
_trigger setVariable ["vehc", transport3, false];
_trigger setVariable ["tD", transport3D, false];  
_trigger setTriggerArea [30,30,3, false];  
 _trigger setTriggerActivation ["ANY", "PRESENT", true];  
 _trigger setTriggerStatements ["this", "
    thisTrigger vehc setFuel 1;
         thisTrigger vehc setVehicleAmmo 1;
         thisTrigger tD disableAI 'MOVE';
          _vel = velocity thisTrigger vehc;
          _dir = direction thisTrigger vehc;
          _speed = 20;
          thisTrigger vehc setVelocity [
                (_vel select 0) + (sin _dir * _speed),
                  (_vel select 1) + (cos _dir * _speed),
                     (_vel select 2)];
            ", "thisTrigger tD enableAI 'MOVE';"];

The statement works if i just use the transport3 variable, its thisTrigger var i have problem with

#

i dont know how to get the variable after storing them in the trigger. i've googled far and wide, about thisTrigger, but cant find anywhere on how to get data out from it other than "you can then use thisTrigger, to get your variables" but nothing precisely on how its done. should i count the vars in the trigger itself so its like thisTrigger[3] or something?

winter rose
#

getVariable?

sacred fox
#

yeah just, looked at that, so i should make like thisTrigger getVariable "vehc" then i guess?

#

@winter rose hm apparently passing objects into the trigger array, doesnt work, as the statement just see it as a value and not the OBJECT itself. so it errors out on wrong type

winter rose
#

I am really not sure what you are trying to do here

sacred fox
#

for the 3rd day in a row, im still working on a AI bridge clearance script. and the script will be running serverside , so i have for example _trp which is the unit itself, anbd the _trpD which is the driver unit. as soon as i try to call these variables within the trigger they are undefinied, so by talking to Dedmen i got advised to store the variables in the triggerobject itself and then get them with thisTrigger, however, now it errors out because on the statement functions the expected type is wrong. it is expected OBJECT but it is an ARRAY. so im not sure where to go from here

meager heart
#

in direction, where is no triggers.

sacred fox
#

the statements themselves work. if i use public variables, but i just want the trigger to use the variables defined within the script's scope

#

@meager heart ?

meager heart
#

triggers 🤢

sacred fox
#
_trigger = CreateTrigger ["EmptyDetector", [7198.262,11039.27,0], true]; 
_trigger setVariable ["vehc", transport3, false];
_trigger setVariable ["tD", transport3D, false];
         _trigger setTriggerArea [30,30,3, false]; 
         _trigger setTriggerActivation ["ANY", "PRESENT", true]; 
         _trigger setTriggerStatements ["this", "thisTrigger getVariable 'vehc' setFuel 1; 
         thisTrigger getVariable 'vehc' setVehicleAmmo 1;
         thisTrigger getVariable 'tD' disableAI 'MOVE'; 
        _vel = velocity thisTrigger getVariable 'vehc'; 
        _dir = direction thisTrigger getVariable 'vehc'; 
        _speed = 20; 
        thisTrigger getVariable 'vehc' setVelocity [ 
                   (_vel select 0) + (sin _dir * _speed), 
                     (_vel select 1) + (cos _dir * _speed), 
                      (_vel select 2)];", "thisTrigger getVariable 'tD' enableAI 'MOVE';"];
#

for reference the transport3 value is the vehicle itself created with createVehicle

#

maybe i should just use nearestObject and use that value as reference instead of trying to push a variable trough the trigger

umbral oyster
#

setPlateNumber can be used from server side?

winter rose
#

you can define in the statement " vehC = thisTrigger getVariable 'vehC' " yes

sacred fox
#

ok getVariable is the wrong type, i cant for example setfuel 1 to transport3 if its not an OBJECT, how can i make sure the reference being correct?
i have also tried with nearestObject [getPos thisTrigger, ['vehicle_classname'_goes_here'],30] setFuel 1;
throws the same "set fuel Type ARRAY, expected Object"..

#

is there a way to convert array values into objects?

winter rose
#

no wait, it's all wrong here. when it says object, it means a game object

#

transport3 - you want to set fuel to it? then it's a vehicle. define transport3 to be a vehicle

sacred fox
#

yh as in vehicle, unit, building right?

#

can i define it within the statement?

obsidian chasm
#

@meager heart What's wrong with triggers?

winter rose
#

so you can't convert array values into objects, this simply doesn't make sense.

what you should do (besides not using triggers):

trigger setVariable ["myVehicle", veh];
// then in the trigger statement
(thisTrigger getVariable ["myVehicle", objNull]) setFuel 1;
sacred fox
#

hm ok

#

can i define more than one variable to the trigger?, for example the AI_driver aswell?

#

is it the same there objNull?

winter rose
#

objNull is the default value the getVariable command returns -if- the variable could not be found

sacred fox
#

aha

winter rose
#

but maybe it finds itself under Object, I don't know for sure.

can you setVariable without error?

sacred fox
#

yup

winter rose
#

and getVariable? try something simple, remove the rest

sacred fox
#

@winter rose i think that did the trick, thanks!

winter rose
#

you're welcome

still forum
#

World would be such a better place if people could read the wiki

meager heart
#

@obsidian chasm they kinda pointless...

obsidian chasm
#

wellllllll

#

i imagine you used the wrong word there?

meager heart
#

no 😄

obsidian chasm
#

but they have a point

#

they spawn shit

meager heart
#

ok

#

something else ?

obsidian chasm
#

something else what lol

meager heart
#

some options ?

obsidian chasm
#

you are the one who said they are pointless though..

meager heart
#

correct

still forum
#

This is just trying to break your own neck just to be able to use triggers

obsidian chasm
#

what should you use instead?

still forum
#

instead of just not using triggers

#

inArea

winter rose
#

^

triggers are good for all 3den-made missions, but I invite you to drop them whenever possible

obsidian chasm
#

i wouldnt know how, only started doing stuff a little while back

still forum
#

If you can just use triggers. Then just do

#

But almost breaking your own neck just to somehow make triggers somewhat useable.. Is just dumb

obsidian chasm
#

im just trying to add something new every time

#

i mean my missions arent very complex anyway lol

#

i just make them for me and my friends

#

somehow 300+ people subbed to it 🤣

astral tendon
#
_unit = cursorTarget;
if (alive _unit AND !captive _unit AND side _unit == civilian) then{
 _unit addEventHandler["FiredNear",{
 hint format ["1%",(_this select 0)];
 selectrandom [
 ([_unit, "ApanPercMstpSnonWnonDnon_ApanPknlMstpSnonWnonDnon"] remoteExec ["switchmove", 0]),
 ([_unit, "ApanPercMstpSnonWnonDnon_ApanPpneMstpSnonWnonDnon"] remoteExec ["switchmove", 0]),
 ([_unit, select random ["ApanPercMstpSnonWnonDnon_G01","ApanPercMstpSnonWnonDnon_G02","ApanPercMstpSnonWnonDnon_G03"]] remoteExec ["switchmove", 0])
   ];
 }];
};
#

why is (_this select 0) a number? is supouse to be a Object

still forum
#

That selectRandom is not how scripts work.

#

you selectRandom between nil,nil and syntax error

#

And that format string is not how format works

#

Everything but the first 3 and last 3 lines is wrong.

meager heart
#

so bulli

inner swallow
#

last 3 lines lol

still forum
#

Well atleast the number of braces/brackets is correct. That's something.

#

Well somewhat correct. The line with format has one pair of () too many

astral tendon
#
if (alive _unit AND !captive _unit AND side _unit == civilian) then{
 _unit addEventHandler["FiredNear",{
 hint format ["%1",(_this select 0)];
 _unit = (_this select 0);
 selectrandom [
 [_unit, "ApanPercMstpSnonWnonDnon_ApanPknlMstpSnonWnonDnon"] remoteExec ["switchmove", 0],
 [_unit, "ApanPercMstpSnonWnonDnon_ApanPpneMstpSnonWnonDnon"] remoteExec ["switchmove", 0],
 [_unit, select random ["ApanPercMstpSnonWnonDnon_G01","ApanPercMstpSnonWnonDnon_G02","ApanPercMstpSnonWnonDnon_G03"]] remoteExec ["switchmove", 0]
   ];
 }];
};
#

now it is working

still forum
#

no it's not ^^

#

your selectRandom is still broken

#

and the syntax error is still in there

#

and the braces are still too many.

#

and you could move the _unit line one higher and use it in the format. Instead of calling the same _this select twice

astral tendon
#

why i am not seeying thoses?

winter rose
#

@astral tendon select randomselectRandom

still forum
#

Have fun fixing that ^^ Goodnight

astral tendon
#

Yeah, allot of fun.

winter rose
#

have a good night! see you tomorrow :p

astral tendon
#
selectRandom [hint "1",hint "2",hint "3"];

yeah i notice that was only selecting 3

#

fak me clockwise

meager heart
#

lol

#

what you trying to do ? some unit will play random anim when EH is fired ?

astral tendon
#

I was testing to do that and i would later on put a condition to check before a new animation like unitReady

#

though, i just dont know what to do with selectRandom , since the exemple in the wiki dont have anything like that.

meager heart
#
if (alive _unit && {!captive _unit} && {side _unit == civilian}) then {
    _unit addEventHandler ["FiredNear", { 
        params ["_unit"];
        hintSilent format ["%1",_unit]; //--- debug hint ?
        private _randomAnimation = selectRandom [
            "ApanPercMstpSnonWnonDnon_ApanPknlMstpSnonWnonDnon",
            "ApanPercMstpSnonWnonDnon_ApanPpneMstpSnonWnonDnon",
            "ApanPercMstpSnonWnonDnon_G01",
            "ApanPercMstpSnonWnonDnon_G02",
            "ApanPercMstpSnonWnonDnon_G03"
        ]; 
        [_unit, _randomAnimation] remoteExec ["switchmove"];
        _unit removeEventHandler ["FiredNear", _thisEventHadler]; //--- need remove this EH ?
    }];
};
winter rose
#

@astral tendon hint selectRandom ["1", "2", "3"]

meager heart
#

also google lazy eval, Roque_THE_GAMER

astral tendon
#

Thanks for that

#

btw, how you do those spaces? my notepad++ dont to that

meager heart
#

what ?

astral tendon
#

when i copy your code it put some spaces that put another one automatically

meager heart
#

oh lol press TAB 😀

astral tendon
#

oh thats nice

sacred fox
#

does the EAST side have a name like GUER is called resistance?

astral tendon
#

opfor

winter rose
#

str east gives "EAST"

inner swallow
#

opfor or east

#

both will work

winter rose
#

you have
OFP: west, east, resistance
Arma (2?): blufor, opfor, independent

inner swallow
#

assuming the type is side

winter rose
#

I am talking about string'ed sides - like format ["%1", west]

#

this will give you "WEST", as str blufor will

inner swallow
#

ya

daring kestrel
#

blufor, opfor and independent are just aliases according to wiki

inner swallow
#

yup

west vale
#

Anyone have an idea how to open rear doors on an RHS_Mi8

JNF_GovHeli2 animateDoor ["ramp_anim", 1];
JNF_GovHeli2 animateDoor ["door_rear_source", 1, false];

meager heart
#
_heliname animateDoor ["RearDoors", 1];
#

@west vale

west vale
#

Thankyou!

peak plover
#

What's that bi function that rotates the camera around some ao before the start of missions?

#

Like UAV cam

winter rose
peak plover
#

Thanks

winter rose
#

be just informed it must be used with spawn, not call.

worldly locust
#

So I am wondering if I am going about this the wrong way. What I'm looking at is creating a container full of stuff that can be unloaded and moved around via ACE interact, and one of the objects can be activated which then creates a Teleport from the main base.

To do this I have the following scripts and where they run
Crate setup/creation (server) -> calls object settings (clients)
Addaction script (client) -> calls teleport creation (addaction and markers) (clients) + create teleport pole (server)

5 scripts in all for one simple idea. Is this right?

#

I mean it works. But seems overly complicated.

winter rose
#

you can fill a crate from the server, afaik

still forum
#

you can also have "everything" serverside. remoteExec the addAction from client->server.
The actual executing the action is the only thing that needs to be on client I think

worldly locust
#

Yeah. That's how I "push" the ace settings by remoteexec the second script file.

#

I couldn't see how to just have everything in the one file

still forum
#

well you can put multiple scripts into a single file if you wanted to. But that would get messy/chaotic

peak plover
#

Hmm

#

Dedmen

#

I was thinking, and do u know how inArea works ?

#

So inArea 30 would basically be like, x > x2-30 && x < x2+30?

still forum
#

inArea 30 is syntax error.

#

sooo.....

peak plover
#

No

#

I mean

#

inarea with a square of 30 meteres

#

How does it check it

#

Does it use pythagoras?

#

How does it work?

still forum
#

Pythagoras for a square? Isn't that only triangle?

peak plover
#

yeah, but how does it know it's in that area?

#

for distance between 2 points, it's pythagoras

still forum
#

topLeft = center-[a,b,0]
bottomRight = center+[a,b,0]

return objectPos2D > topLeft && objectPos2D < bottomRight

#

atleast for angle==0

peak plover
#

Oooh

#

Okay

still forum
#

if the square is rotated.. uh.. ¯_(ツ)_/¯

peak plover
#

How about circle, does it use cosinus and such?

still forum
#

I guess

peak plover
#

okay

still forum
#

That's how I would do it

peak plover
#

exactly

#

I guess for rotated square

#

You can always just calculate 4 positions

#

And check for those

#

Interesting stuff, food for thought 😄

winter rose
#

or distance, or distance2D

peak plover
#

That's ez. Get point a get point b, make a triangle between them, use pythagoras

#

It's just inarea is faster, therefor it should be less complex for computing, so I wanna know how they do that

still forum
#

faster than what?

peak plover
#

distance

still forum
#

you have
a, b,
c = (sqrt (a² - b²)) ... Holy crap.. maffs. Gimme a minute

peak plover
#

yea, all that 2 and sqrt cost

still forum
#

if isRectangle is true.

p1 = center + [cos angle * a, 0, sin angle * a];
p2 = center + [sin angle * b, 0, cos angle * b];
    
p3 = p1 - center;
p4 = toTestPos - center;
p3size = magnitude p3 (x*x+y*y+z*z That's magnitude right?)

test = (p3 * p4) / p3size;
if (test < -1 || test > 1) return false;

p3 = p2 - center
p3size = magnitude p3;
test = (p3 * p4) / p3size;
if (test < -1 || test > 1) return false;

return true

I think that's correct ish.

#

if isRectangle is false

func sizexy(vector){
   p = x*x+z*z;
    return p * InvSqrt(p);
}    

c = sqrt (a²-b²);
diff = [cos angle * c, 0, -sin angle * c];
p1 = center - diff;
p2 = center + diff;
        
t = sizexy(toTestPos - p1) + sizexy(toTestPos - p2);
return t <= 2.0 * a:

Don't ask me. I don't understand this 😄

peak plover
#

🤔

#

interesting

still forum
#

@queen cargo Y u delete 😮

worldly locust
#

well you can put multiple scripts into a single file if you wanted to. But that would get messy/chaotic @still forum so I read that as I'm probably doing things the right way just about.

#

Probably not the best code of course but it works.

peak plover
#

If u inted coding ever again, just make separate files, more reusability and if u need something in future, u can just get the exact script and add it

fossil yew
#

@still forum - what editor do you use for scripting? Notepad++ or something else?

winter rose
#

Visual Studio Code also has SQF support if you want

still forum
#

Notepad++/Atom/VSCode

lone glade
#

sublime 3 ^

still forum
#

quick stuff in n++. Bigger projects in Atom

#

Only recently started using VSCode and didn't have any big SQF projects since then to use it for

lone glade
#

"bigger projects"
crashes on "large" files 😄

meager heart
#

also vscode power mode extension... +10 to skill 😄

peak plover
#

lmao

queen cargo
#

@still forum wanted to edit but missclicked ... (was in train and rewrite did not came through so ... fuck it)

#

short version: works the same way as in rectangles, and afterwards you just check if it is in the correct triangle

#

theoretically there also still is arma.studio in the realm of code editors
though ... i kinda dropped it as nobody uses it or contributes

still forum
#

Yeah. Wanted to mention that too. But it's not really useable as it's not polished enough

queen cargo
#

it is damn usable

#

just outdated as hell

#

last update fixed the nasty problems with auto-complete

#

now it just would need more into the auto-complete and stuff like code folding

still forum
#

middlemouse click to close tabs? Drag tabs out into new window? proper autocomplete like in Atom/VSCode? 😄
It needs a lot more work

queen cargo
#

but why implement if nobody bothers?

still forum
#

^ exactly

queen cargo
#

draging out tabs into new windows? works
middlemouse to close? works too
both was in ArmA.Studio since it was released

#

linting inbuilt? yes
for configs too? yes

#

preprocessor support? not yet but mainly due to not being able to keep the offsets, could be implemented easily if that was not a thing

#

open source? sure

#

but nobody is interested thus i do not waste my time to further implement new features

#

same thing will probably happen with sqf-vm

austere granite
#

for me it's just annoying to use different editors for things

#

It's why i quite like atom, because it has support for most things i need. I tried VS Code as well and it's okay but i did much prefer atom still

obsidian chasm
#

I'm so confused, my players seem to sometimes not spawn with their primary weapon, whereas this has never been an issue before on my mission.

errant jasper
#

@peak plover For how to implement, I did this long ago before inArea or params: https://pastebin.com/pr6r0E3h . For how to do. For a rotated rectangle and a point, basically compute the points relative position to the rectangle (e.g. so the center of the rectangle would be (0,0) from the perspective of the point). Then rotate the point same as angle, now the point is relative to a rectangle centered on (0,0) at 0 angle. Then it is a simple matter of checking if the X and Y of the point is in the box.

peak plover
#

🙀

exotic tinsel
#

would someone be willing to point me in the direction of functions or methods for reducing a players explosive charge count by one, in multiplayer?

still forum
#

c4 ?

exotic tinsel
#

explosive charge

errant jasper
#

Think he mans the Xplosive.

#

He beat me to it

#

But from what mod? Vanilla? ACE?

exotic tinsel
#

Vanilla plz

exotic tinsel
#

i saw that, was worried it would remove all of the item. does it only remove qty 1?

winter rose
#

yup

still forum
#

Considering there is removeItems which is plural

exotic tinsel
#

awesome thank you guys.

still forum
#

Why would there be removeItem and removeItems if both remove multiple items ^^

little eagle
#

Why would there be getDammage and damage, if one is just wrong?

errant jasper
#

Real question is why TF do they have a command to remove 1, a command to remove all of a given class, rather than just the command to remove X

still forum
#

you can use the cargo commands to remove x

#

Oh wait

strange urchin
#

Probably some backwards compatibility or something

still forum
#

these don't exist

little eagle
#

Because the commands were made when you couldn't carry two hundred items, i.e when the inventory system made sense.

still forum
#

wiki says they are Arma 3 though

errant jasper
#

Agree. From memory any of the *item* commands are Arma 3.

#

Dammit how to make literal '*' around text

still forum
#

\*

errant jasper
#

Really.. Discord supports escaping, but not even quoting.

still forum
#

In arma it would be **

strange urchin
#

Hm? What are asterisks used for in Arma?

lone glade
#

one day, one day we'll get quotes

still forum
#

@strange urchin nothing. Was a joke

little eagle
#

Multiplication.

winter rose
#

it should be × really 😄

little eagle
#

Yeah, I never understood that. Dumb typewriters.

winter rose
#

ASCII too

strange urchin
#

You don’t really see an × for multiplication after grade school anyway

errant jasper
#

We need a LaTeX for Unicode. (just the commands I mean)

little eagle
#

Here it's never used. Just the dot.

strange urchin
#

It’s called Alt-Codes

exotic tinsel
#

is removeItemFromBackpack global or is there a function for that. i cant find one