#arma3_scripting

1 messages ยท Page 312 of 1

vapid frigate
#

is it the object getting hit?

hollow lantern
#

no

vapid frigate
#

ah ok

hollow lantern
#

its just need to be setDamaged

vapid frigate
#

yeh global variable is easiest.. but still not so easy if you want multiple

hollow lantern
#

and I'm not sure, the function can run multiple times to create more units on different positions. Not sure if this will still work if the variable is global?

vapid frigate
#

is this for that same hitpart thing?

hollow lantern
#

yes

vapid frigate
#

_obj setVariable ["other_object", _otherObject];

#

then in your event

#

_object getVariable "other_object";

hollow lantern
#

hmm not sure if I can setDamage on a variable

vapid frigate
#

you can.. what else would you use it on?

#

what i said above should work

#

_obj setVariable ["AEB_unitToKill", _unit];

#

_unit = _object getVariable ["AEB_unitToKill", objNull];

hollow lantern
#

yes thanks that worked indeed.

vapid frigate
#

appliance theft mod?

hollow lantern
#

no, Evil Fridgeman Enemy

#

๐Ÿ˜„

#

if I get that phrase right

leaden summit
#

Ok I know what is wrong with this, but I don't know how to fix it

"VSM_OPS_multicam",
"VSM_OPS_2_multicam"} else {
"VSM_OPS_multicam",
"VSM_OPS_2_multicam",
"VSM_Beanie_tan",
"VSM_Beanie_tan",
"VSM_Beanie_tan",
"VSM_Multicam_Boonie"};

_availableHeadgear call BIS_fnc_selectRandom;```
#

I realise it's just filling the array with the last item because (I assume) it doesn't know to append it to the array. How to I fix that?

jovial ivy
#

@JD Wang#0828 Erm, if your wanting them to be arrays they should probably be wrapped in [].

leaden summit
#

Yeah I tried

"VSM_OPS_multicam",
"VSM_OPS_2_multicam"]}``` etc

but it errors out
vapid frigate
#

that shouldn't error

#

unless _availableGoggles is wrong

#

(not a string)

leaden summit
#

I get an "Undefined variable in expression" error when I get to

_unit addHeadgear _availableHeadgear;

vapid frigate
#

maybe _unit is undefined?

#

btw there's a relatively new scripting command, selectRandom _availableHeadgear

leaden summit
#

What does that select from?

#

Like is that just going to give me vanilla headgear?

rancid ruin
#

that code is all kinds of fucked up

leaden summit
#

You mean mine?

night frigate
#

try...

_addthisone = selectRandom _availableHeadgear;
_unit addHeadgear _addthisone;

But yeah, need to structure the array correctly. ๐Ÿ˜ƒ

rancid ruin
#

maybe it's just too early in the morning but it looks wonky as hell to me yes @leaden summit

jade abyss
#

first of all: dafuq is that formatting

#

2nd you don't give an Array back

rancid ruin
#

it's 7am and i just smoked a joint, but is this what you're after

private "_availableHeadgear";

if ((_availableGoggles == "VSM_Balaclava2_tan_Goggles") OR (_availableGoggles == "VSM_Shemagh_Balaclava2_tan")) then {
    _availableHeadgear = [
        "VSM_OPS_multicam",
        "VSM_OPS_2_multicam"
    ]
} else {
    _availableHeadgear = [
        "VSM_OPS_multicam",
        "VSM_OPS_2_multicam",
        "VSM_Beanie_tan",
        "VSM_Beanie_tan",
        "VSM_Beanie_tan",
        "VSM_Multicam_Boonie"
    ]
};

_chosenHeadgear = selectRandom _availableHeadgear;
#

that if just looks all fucked up though

jade abyss
#
  1. bis_fnc_selectRandom <- ? selectRandom = way better
rancid ruin
#

how do you get syntax highlighting up in here?

jade abyss
#

it's 7am and i just smoked a joint, <- Thats stuff you don't have to mention...

rancid ruin
#

sqf was probably designed at 7am after someone smoked a joint, maybe i'm at an advantage

jade abyss
#

๐Ÿ™„ ...

night frigate
#

fair point. ๐Ÿ˜‰ And the syntax highlighting is, I think, just putting sqf after the opening three backticks (same line, no space?)

rancid ruin
#

nice, thanks

#

i don't think using _availableHeadgear / _availableGoggles as an array, and then a classname for the chosen headgear/goggles is the best idea

#

you'll look back at the code in future and be confused by the way you named the variables

#

have an array of availableX then select a chosenX from those arrays IMO

#

or something similar which won't confuse you in future

jade abyss
#

What kind of nonsense do you write there?

rancid ruin
#

afaik he's selecting headgear and goggles randomly from arrays of available headgear and goggles

#

but calling the selected ones availableX

jade abyss
#

@leaden summit

_availableHeadgear =
if ((_availableGoggles == "VSM_Balaclava2_tan_Goggles") OR (_availableGoggles == "VSM_Shemagh_Balaclava2_tan")) then
{
    selectRandom ["VSM_OPS_multicam",
    "VSM_OPS_2_multicam"]
}
else
{
    selectRandom ["VSM_OPS_multicam",
    "VSM_OPS_2_multicam",
    "VSM_Beanie_tan",
    "VSM_Beanie_tan",
    "VSM_Beanie_tan",
    "VSM_Multicam_Boonie"]
};```
leaden summit
#

I realise a lot of my shit is wrong, I'm trying to piece together code I found to make it do what I want, that's how I learn. I've always used this script to randomise gear, but judt didn't want the units wearing boonies if they had the balaclava on because it clips ๐Ÿ˜›

jade abyss
#

That code above should work. No clue what oneoeh is brabbeling about.

rancid ruin
#

weird variable names

jade abyss
#

and?!

leaden summit
#

Cool that works perfectly, thanks @jade abyss

night frigate
#

Yeah, the variable names make it seem like they should actually be the names of the array, not the result of a random selection from an array. ๐Ÿ˜ƒ

#

But hey, if it works that's the important thing.

still forum
#
_availableHeadgear = selectRandom
(
(if ((_availableGoggles != "VSM_Balaclava2_tan_Goggles") AND (_availableGoggles != "VSM_Shemagh_Balaclava2_tan")) then {
    ["VSM_Beanie_tan",
    "VSM_Beanie_tan",
    "VSM_Beanie_tan",
    "VSM_Multicam_Boonie"];
} else {[];}) append ["VSM_OPS_multicam", "VSM_OPS_2_multicam"]
);

Doesn't look that much better ๐Ÿ˜„

rancid ruin
#

would that work? isn't that trying to append stuff to a {} block?

still forum
#

edited it and added more paranthesis

rancid ruin
#

still not confusing enough, please add some more

still forum
#
_availableHeadgear = selectRandom
(
    [
        ["VSM_OPS_multicam",
        "VSM_OPS_2_multicam",
        "VSM_Beanie_tan",
        "VSM_Beanie_tan",
        "VSM_Beanie_tan",
        "VSM_Multicam_Boonie"],
        ["VSM_OPS_multicam", "VSM_OPS_2_multicam"]
    ] select ((_availableGoggles == "VSM_Balaclava2_tan_Goggles") OR {_availableGoggles == "VSM_Shemagh_Balaclava2_tan"})
);
#

Someone should update the discord SQF syntax highlighting thingy and add selectRandom and the other new commands

jade abyss
#

Oh yeah, make the script more buttfk \o/

little eagle
#

Challenge accepted.

#

Someone should update the discord SQF syntax highlighting thingy
discord isn't open source fml, it will never update

tough abyss
dusk sage
#

@little eagle The lib they use is open source on GH. Linguist IIRC

little eagle
#

Can't be.

#

Linguist is using JonBons repository.

#

And his is up to date and used by Github for example.

#

I use it for ST3

tender fossil
#

Is iniDB still de facto standard for having database on your server in A3?

scarlet spoke
#

Well I know that there is also extDB for that prupose...

#

And it doesn't really matter what the standard is as it will run in the background and noone will care about it as long as it works ^^

tender fossil
#

Yeah, I just would like to have as tested / reliable platform as possible ๐Ÿ˜ƒ

scarlet spoke
#

I think all those database tools are so old that they can be considered pretty stable...

#

But apart from that I can only tell you that I have extDB running absolutely smooth so far... ๐Ÿ˜ƒ

tender fossil
#

Well, at least the extDB dev is still active

warm gorge
#

Extdb is still updated regularly to this day @scarlet spoke

scarlet spoke
#

Okay... I guess that answers the question about the stability ๐Ÿ˜„

earnest path
#

Hey guys i am trying to write a script that reads possitional information from objects placed trough the map editor and than uses that information to create the same objects in the same possition. However my objects are badly displaced. I have a SP mission with init.sqf will anyone be able to help me out if i paste it here?

scarlet spoke
#

Sure

#

Or at least I can try ^^

warm gorge
#

Im happy to help too

warm gorge
#

You able to send a pastebin of the individual script please?

earnest path
warm gorge
#

Alright hold up a few minutes, having a look now

scarlet spoke
#

Try using the alternative syntax of createVehicle with the CAN_COLLIDE option. That should keep ArmA from changing the position of the object

#

@earnest path

earnest path
#

I did try it didnt work but i will give it a go again.

scarlet spoke
#

Are you sure you need modelToWorld for getting the position?

warm gorge
#

Yeah I was gonna say

earnest path
#

Its tables and chairs in a building so i need to get the offset from the centre of the object. The aim of this task will be that i can furnish all buildings of type X with that setup without editing the map.

scarlet spoke
#

So is "Land_MilOffices_V1_F" a furniture?

warm gorge
#

No thats a building on the map

scarlet spoke
#

Then you aren't creating any furniture at all as far as I can tell...

warm gorge
#

What do you mean lol?

#

I can see he is

scarlet spoke
#

Oh wait... My bad

#

Now I got it xD

warm gorge
#

Im about to open the mission to give it a test

earnest path
#

What i am doing is i am using the Eden editor to place furniture in that "Land_MilOffices_V1_F" building. Than i am getting the relative coordinates of each of the furniture objects and tryng to place new furniture objects overlapping the original once. If they overlap one to one i can use the array of data to populate any building of that type with the same furniture but i cant get it to overlap one to one.

scarlet spoke
#

So how big is the placement offset?

#

Like a few mm or rather on the other side of the map?

earnest path
#

The furniture is within the building but its all over the place.

warm gorge
#

I see what you mean with the positions being way off. let me have a play around with the script, stay here

earnest path
#

@warm gorge and @scarlet spoke thanks for spending time on it appretiate it! ๐Ÿ‘Œ

scarlet spoke
#

Have you tried to reduce the problem to a single object instead of iterating through multiple ones? Like just use an object of reference and one furniture object that should be recreated?

earnest path
#

I have but it should not matter. If the model to world and world to model are consistent in their result than it should work. I have checked that they work with ATL coords so i am just lost . I tried a lot of different itterations before i ask questions here ๐Ÿ˜ƒ

scarlet spoke
#

Well if it works in a small example then you messed up somewhere in your script otherwise the approach is the wrong one

#

Do it on one simple object and then start to build up on that

earnest path
#

I also tried to use attachTo but it does not seem to work with buildings. Thats why i even spawned a secondary building on top of the map default building but attachTo does not work on custom spawned buildings too.

scarlet spoke
#

attachTo is not what you want in that case... Not really at least

warm gorge
#

@earnest path yo you there

#

I fixed it

earnest path
#

@warm gorge Magician ๐Ÿ˜ƒ how did you achieve this

warm gorge
#

_x worldToModel position _temporaryBuilding; to _temporaryBuilding worldToModel position _x;

#

So from this: _x worldToModel position _temporaryBuilding;

rancid ruin
#

it's possible to do all of this in eden editor without actually running the mission btw

warm gorge
#

To this: _temporaryBuilding worldToModel position _x;

earnest path
#

Oh wow sorry about this

warm gorge
#

Dont be sorry, we all make mistakes

#

Im glad I figured out what was wrong though, otherwise I would have been thinking of it going to bed aha

earnest path
#

haha Yeah and wake up 3am wit a solution ๐Ÿ˜ƒ

#

Well thank you very much for spotting that.

warm gorge
#

No problem, glad I could help

rotund cypress
#

Hey, not sure if this is related to my scripting, but I am currently getting a crash with error STATUS_INTEGER_DIVIDE_BY_ZERO. I am not sure if that has to do with my scripting or a problem with my ArmA. It always crashes after initialization of my player and making a database connection with extDB3. Testing locally.

#

Anyone that could have a clue whats that about?

rancid ruin
#

64 bit client and plugin?

hollow lantern
#

can someone explain for me the usage of EH on dedicated servers? I tried to but its not working on my dedicated. What I tried is this:

if (isDedicated) then {
_obj addMPEventHandler ["MPHit", {
    _object = _this select 0 select 0;
    _hits = _object getVariable "hitTimes";
    _unit = _object getVariable ["KI_unitToKill", objNull];
    _light = _object getVariable ["KI_vehToRemove", objNull];
    if(isNil "_hits") exitWith { _object setVariable ["hitTimes", 1]; };
    if(_hits == 1 && alive _object) exitWith {
        for "_i" from 1 to 2 do {
            createVehicle ["Bo_GBU12_LGB",[(getPos _object select 0)+ (_i*cos (_i*17.5)),(getPos _object select 1)+ (_i*sin (_i*17.5)),0],[],0,"CAN_COLLIDE"];
            _object setDamage 1;
            _unit setDamage 1;
            deleteVehicle _light;
        };
        _object setVariable ["hitTimes", 0];
    };
    _object setVariable ["hitTimes", (_hits + 1)];
}];
};```
#

if (!isDedicated) then {
_obj addEventHandler ["HitPart", {
    _object = _this select 0 select 0;
    _hits = _object getVariable "hitTimes";
    _unit = _object getVariable ["KI_unitToKill", objNull];
    _light = _object getVariable ["KI_vehToRemove", objNull];
    if(isNil "_hits") exitWith { _object setVariable ["hitTimes", 1]; };
    if(_hits == 1 && alive _object) exitWith {
        for "_i" from 1 to 2 do {
            createVehicle ["Bo_GBU12_LGB",[(getPos _object select 0)+ (_i*cos (_i*17.5)),(getPos _object select 1)+ (_i*sin (_i*17.5)),0],[],0,"CAN_COLLIDE"];
            _object setDamage 1;
            _unit setDamage 1;
            deleteVehicle _light;
        };
        _object setVariable ["hitTimes", 0];
    };
    _object setVariable ["hitTimes", (_hits + 1)];
}];
};``` I tried HitPart on "Singleplayer" as it is available via ``addEventHandler``. But thats not available on ``addMPEventhandler`` so I took Hit. I just want an explosion to be triggered when an Object (in this case a fridge) gets hit two times and that works in "Singleplayer" but not on a dedicated Server. I want to admit that I created the Fridge Object using ``SERVER EXEC``
#

also tried via GLOBAL EXEC same result

tardy pagoda
#

So I am trying to make a condition true by putting this in the condition box of an object: phasep isEqualto 1; this does not activate the object so is there another way to remotely set a condition to true?

little eagle
#

@hollow lantern Hit (and MPHit) only fires on the shooters machine, so unless AI owned by the dedicated server is doing the shooting, the eh will never fire.

#

This includes MPHit, because the way these MP eventhandlers work is, that they transfer their code across the network should the event happen on whatever local machine the event happens.

#

So not added on shooter machine == doesn't trigger

#

@tardy pagoda I don't understand this question. Makes no sense to me.

tardy pagoda
#

so in the arma 3 eden editor if you click on any object the condition will be true. I have a variable called phasep and i want the condition to turn to true only when the value of phasep is equal to 1. ive tried putting in phasep == 1 and phasep isequalto 1 but both dont work

little eagle
#

When do you plan to set phasep to 1?

hollow lantern
#

@little eagle Well the only one who is firing on the fridge are normal players but the explosion should occur for everyone globally. So if player A shoots at the fridge twice everyone should see the explosion

#

and thus everyone gets damage when in range of the blast

little eagle
#

Shouldn't be aproblem since all commands you use have global effects.

#

createVehicle, setDamage, deleteVehicle.

hollow lantern
#

the thing is that the EH won't fire if I shoot the fridge

#

on a dedicated

little eagle
#

The event will not fire on a dedicated server unless the shooting AI was owned by the server.

#

Because hit event only fires on the machine of the shooter.

hollow lantern
#

why shooting AI? The one who is shooting is no AI, its a PLAYER. The object is just getting hit and when it got hit two times the EH creates a bomb on the objects position to create an explosion

#

object is a fridge btw no AI ^^

little eagle
#

Then you have to add the eventhandler on the players machine for the event to fire.

tardy pagoda
#

on a triggers activation it does phasep = phasep + 1; i tested the value of phasep with an if then statement if (phasep == 1) then
{
hint "You are the leader of your group."};

little eagle
#

Object doesn't matter, shooter matter for HitPart eventhandler

#

While you can add "HitPart" handler to a remote unit, the respectful addEventHandler command must be executed on the shooter's PC and will only fire on shooter's PC as well.

#

@tardy pagoda
The condition field of a trigger is evaluated twice a second (roughly). The condition field of an object is evaluated once at the init phase of the mission.

#

So if the condition of the object "presence" is false at mission start, the object is not part of the mission.

tardy pagoda
#

Ah ok

#

that makes alot more sense

little eagle
#

You're supposed to enter stuff like random 2 > 1 or maybe global variables you define in preInit.

tardy pagoda
#

thanks for answering my question ๐Ÿ˜ƒ

little eagle
#

yw

#

@hollow lantern I think it would be best if you add that eventhandler on every machine.

#

Do not use isDedicated (ever) and do not use MP eventhandlers either (ever).

hollow lantern
#

okay is there a general idea on how to archieve this? I mean there is a initPlayerLocal.sqf but I think I can't tell the EH to run like I would put the EH there?

little eagle
#

Add an eventhandler on every machine? init.sqf I guess.

hollow lantern
#

but then I need to exclude to EH from my script thats not what I want is there rly no other way?

little eagle
#

but then I need to exclude to EH from my script
?

hollow lantern
jade abyss
#

What is he trying to achieve?

hollow lantern
#

EH that works on dedicated server for every player

jade abyss
#

Why?

little eagle
#

Ah I see what the problem is.

hollow lantern
#

so that if someone shoots at a object (firdge) it will explode

little eagle
#

Let me explain.

hollow lantern
#

ok

little eagle
#

You're creating an object on one machine (server), because createVehicle obviously has global effects.

#

And then you add an eventhandler to that object, but unfortunately the one you use has to be added on every machine, because anyone can shoot the fridge and the event you use only fires on the shooters machine.

jade abyss
#

another q: Why that _i*sing (_i * 17.5) etc?

little eagle
#
// init.sqf
["Fridge_01_closed_F", "Hit", {
    ...
}] call CBA_fnc_addClassEventHandler;
#

^ this is what you should use

hollow lantern
#

uuuh nice thanks

little eagle
#

Hit doesn't trigger at all for me on this class, probably because it has damage disabled.

hollow lantern
#

hmm true but idk why it works in singleplayer on it

little eagle
#

I am in SP.

#

Same for handleDamage

hollow lantern
#

well yeah the solution with CBA_fnc_addClassEventHandler; seems not to work, true. but my handler used in the script sqf _obj addEventHandler ["Hit", { _object = _this select 0 select 0; _hits = _object getVariable "hitTimes"; _unit = _object getVariable ["KI_unitToKill", objNull]; _light = _object getVariable ["KI_vehToRemove", objNull]; if(isNil "_hits") exitWith { _object setVariable ["hitTimes", 1]; }; if(_hits == 1 && alive _object) exitWith { for "_i" from 1 to 2 do { createVehicle ["Bo_GBU12_LGB",[(getPos _object select 0)+ (_i*cos (_i*17.5)),(getPos _object select 1)+ (_i*sin (_i*17.5)),0],[],0,"CAN_COLLIDE"]; _object setDamage 1; _unit setDamage 1; deleteVehicle _light; }; _object setVariable ["hitTimes", 0]; }; _object setVariable ["hitTimes", (_hits + 1)]; }]; works fine in Singleplayer

#

I shoot the fridge twice and boom the explosion will be created

little eagle
#

How many fridges are in the mission?

hollow lantern
#

depends, I have planned 6

little eagle
#

ok

#
[_fridge, ["Hit", {
    ...
}]] remoteExec ["addEventHandler", 0, _fridge];
#

I think this is how it goes with remoteExec. I don't use it that often.

#

Point is that you have to add the eventhandler on all machines.

#

If it's only 6 and not fifty then transfering code doesn't matter.

#

Although Hit doesn't fire for me even in SP.

hollow lantern
#

hmm weird

little eagle
#

HitPart vs Hit?

hollow lantern
#

let me check

#

true that, Hit does not work for me either buuuut HitPart works on it

little eagle
#
[_fridge, ["HitPart", {
    ...
}]] remoteExec ["addEventHandler", 0, _fridge];

then

#

The CBA one doesn't work, because this is a map / terrain object and still has this disabled for performance reasons that were decided back in A2 :/

hollow lantern
#
[_obj, ["HitPart", {
    _object = _this select 0 select 0;
    _hits = _object getVariable "hitTimes";
    _unit = _object getVariable ["KI_unitToKill", objNull];
    _light = _object getVariable ["KI_vehToRemove", objNull];
    if(isNil "_hits") exitWith { _object setVariable ["hitTimes", 1]; };
    if(_hits == 1 && alive _object) exitWith {
        for "_i" from 1 to 2 do {
            createVehicle ["Bo_GBU12_LGB",[(getPos _object select 0)+ (_i*cos (_i*17.5)),(getPos _object select 1)+ (_i*sin (_i*17.5)),0],[],0,"CAN_COLLIDE"];
            _object setDamage 1;
            _unit setDamage 1;
            deleteVehicle _light;
        };
        _object setVariable ["hitTimes", 0];
    };
    _object setVariable ["hitTimes", (_hits + 1)];
}]] remoteExecCall ["addEventHandler", 0, _obj];``` That works as expected, thanks @little eagle
little eagle
#

yw

hollow lantern
#

I should've known that earlier. Used remoteExecCall for switchMove animations a while ago and solved it also with remoteExecCall

little eagle
#

You could optimize this by using

{_this call My_fnc_hitFridge}

So you

  1. don't transfer as much data over the network
  2. circumvent a bug where Arma has to recompile the whole function passed to addEventHandler, because it's stored as string.
#

And define My_fnc_hitFridge in init.sqf (on every machine)

rancid ruin
#

why are you shooting a fridge though anyway?

bitter bough
#

Say someone makes a script, and it works flawlessly being hosted via client.
But is completely fudged once hosted on a dedicated server.
Is ther a specific reason Servers don't recognize functions? Or some kind of engine difference that has to be remembered?

hollow lantern
#

@rancid ruin Because I made a fridge with arms and legs and thats an enemy now ๐Ÿ˜›

rancid ruin
#

nice, can't argue with that

little eagle
#

@bitter bough Impossible to tell really. The scripter messed up somewhere. That's all you can say for sure.

bitter bough
#

Ugh.
Because I know for a fact that things work properly when being hosted. Both client and 'hosted client' side

little eagle
#

There is no magic flip to switch to make something like that work

bitter bough
#

Yeah I know that much. But understanding why servers seem to have a different method for calling functions might.

rancid ruin
#

there's a difference between client and server, that's about all there is to it

#

need to get locality correct or things won't work as expected

bitter bough
#

It's Mostly UI errors. Only one thing isn't really. This should be interesting....

hollow lantern
#
_obj setVariable ["KI_unitToKill", _unit];
_obj setVariable ["KI_vehToRemove", _light];```
I tried to ``remoteExecCall`` them with 
```sqf
[_obj,"KI_unitToKill", _unit] remoteExecCall ["setVariable", 0, _obj];
[_obj,"KI_vehToRemove", _light] remoteExecCall ["setVariable", 0, _obj];``` is that wrong? The code above works in singleplayer but the one below doesn't :S
vapid frigate
#
_obj setVariable ["KI_vehToRemove", _light, true];```
#

that will broadcast them so they're everywhere

#

(the true at the end)

#

remote exec should work too i think.. but never tried setVariable in remoteExec like that

rocky drum
#

Currently using a scenario with indi v blu. However I have indi being initially friendly to blu.

Is there a way to make a trigger that, when I shoot/kill one of the indi dudes, they become hostile towards blu?

still forum
#

add killed eventhandlers to the indi guys... But that would mean a lot of eventhandlers

warped fractal
#

I'm trying to move a huron fuel container inside a trigger by airlifting it with a helicopter
How do I make a trigger that activates once the container has been moved inside of it by the helicopter?
I've tried
objectnamehere in thislist;
and
this && (objectnamehere in thislist);
but it doesn't work nor does putting the objectname in quotes
What am I doing wrong?

vapid frigate
#

i think thislist is only units, not objects?

#

objectnamehere inArea thisTrigger might work

hollow lantern
#

thisList In Triggers ("Condition" or "On Activation/Deactivation" line): An Array of objects that are currently fulfilling the trigger's condition (same as the what is returned by the list command).

jade abyss
#

@rocky drum 1 Person or the whole Indi Side hostile to Blu?

vapid frigate
#

@hollow lantern yeah, but thisList - list of all objects in trigger area, based on 'Activation' and activation can only be None - No default activation, only a custom condition expression can activate the trigger. Anybody - Activated when any object satisfies the 'Activation Condition'. BLUFOR, OPFOR, Independent, Civilian, Game Logic - Activated when any object of the given side satisfies the 'Activation Condition'. Seized by BLUFOR, Seized by OPFOR, Seized by Independent - Activated when the given side is in control of the area. Strength matters, which means one tank can be in control of an area while ten enemy infantrymen are still present. Radio Alpha, Radio Bravo, Radio Charlie, Radio Delta, Radio Echo, Radio Foxtrot, Radio Golf, Radio Hotel, Radio India, Radio Juliet - Activated by a player using a radio command (accessible for the player by pressing 0-0 on a standard keyboard). The trigger 'Text' will be used as the command title.

warped fractal
#

@vapid frigate Thank you! inarea this trigger worked

vapid frigate
#

np

#

you probably want that activation on 'none' too

#

@jade abyss addRating would make them enemies to all blufor as well? (i don't know a way around it though)

rocky drum
#

@jade abyss Whole.

jade abyss
#

Then play around with setFriend

#

@vapid frigate addrating -2000 = Makes the unit hostile to EVERY other Unit

rocky drum
#

Yep. Alreay on it. Cheers. It's madness trying to re-learn so many of the easier scripts.

warm gorge
#

Has anyone ever had issues with unique object variables? On my server with high traffic, many of the players returned from playableUnits randomly just become null.

cedar kindle
#

what's the reason you're using playableUnits? and not allPlayers/similar command

#

functions*

warm gorge
#

@cedar kindle Would it make much of a difference though if I used allPlayers or whatever? If the issue is unknown to me, and not related to dead players or whatever, but just players randomly going null

cerulean whale
#

@warm gorge I've had similar issues before and I must say, code optimization is key in that regard, avoid large dumps from allPlayers (what I use) or playableUnits in your instance. @cedar kindle I'm not entirely sure if there is much of a difference in performance over them but I know there are some differences in other areas.

#

@warm gorge To my knowledge I believe that playableunits works on unoccupied units... this could be avoided by SQF isPlayer _x I believe

cedar kindle
#

playableUnits is slottable units occupied by AI and also players, can't think of when you'd want to use that
as for them going null, the variable will be objNull once the player disconnects but it should not be populated in the list anymore. might happen when they die if no respawn, unsure. If you're using an array argument and passing it around with sleeps etc you could fall into that trap. Hard to say without you posting some code

warm gorge
#

@cedar kindle Ive noticed the issue mainly through my admin menu, which simply loops through playableUnits, adding them all to a ListBox and then when you click on a player it does a check if the unit isNull, and if it isnt, displays info about the player. For these 'bugged' players, it doesnt show any info, because their null.

#

But the same issue is with all the menus which use playableUnits. Whenever I chuck their variable in the debug console watch, it shows as null, even know the player is alive and well.

#

Ive always used playableUnits in most cases as ive seen most other people use it

rotund cypress
#

@rancid ruin Yes 64-bit and an extension.

cedar kindle
#

use allPayers/CBA_fnc_players if you only want players, no reason to use playableUnits. how are you getting the selected player back from uiNS?

warm gorge
#

@cedar kindle _unit = lbData [1500,lbCurSel 1500];
_unit = call compile format ["%1",_unit];

little eagle
#

call compile format
There it is again

warm gorge
#

What you mean? @ commy2

#

@little eagle

little eagle
#

Bad code.

warm gorge
#

What do you recommend instead?

little eagle
#

Good code. Sorry I have no time atm.

vapid frigate
#

missionNamespace getVariable format would likely be a lot faster

warm gorge
#

@tough abyss All good haha

vapid frigate
#

but don't think it'd work with an object anyway

little eagle
#

Yes, that's definitely it, QS.

simple fiber
#

"What do you recommend ? Good code"

#

Dafuk

little eagle
#

Anyway,

call compile format
is where your code bugs out.

simple fiber
#

Ty captain

warm gorge
#

@little eagle Even then, if I just put the variable name of these 'bugged' players in the debug console watch, they show up as null. So wouldnt that be completely separate from using call compile format?

#

E.g in my case, lets say 'civ_11' is bugged. Ill chuck civ_11 in a watch bar, and it will show up as null even know they are alive and well

simple fiber
#

But what do you get with the first line

little eagle
#

Because those variable names cannot be used to serialize object references.

simple fiber
#

Is it an object ?

warm gorge
#

Its players

little eagle
#

civ_11 is an object, because all units are objects

simple fiber
#

If it's already a string why do you format it

#

And if it's an obj whu do you convert it to str

#

I don't get it

little eagle
#

You cannot do that ^ reliably. That is where the bug is.

#

Cannot use str _object or format object

#

It will fail eventually.

#

My time's up.

simple fiber
#

If you save an object as an object why do you want to convert it to str anyway to call compile to get the obj

#

Wat

vapid frigate
#

because you can't save an object to a listbox entry

warm gorge
#

^

vapid frigate
#

only a string (lbData) or number (lbValue)

simple fiber
#

This game never fails to surprise me...

vapid frigate
#

you can setvariable on a control.. thats the only way i can think of to work around it

#

(an array set on the whole listbox)

warm gorge
#

I understand call compile might not be the best method of doing this, but that isnt the cause of the issue that I know of. I dont see how the way I store a player reference in a list box has anything to do with player variable names (civ_1, civ_2 etc) becoming null

vapid frigate
#

yeh not sure, maybe when they die?

#

i thought those var names stuck though

simple fiber
#

Because you cannot get an obj like this

vapid frigate
#

you can get an object like that

cedar kindle
#

i doubt they're alive and well, I think you have the wrong unit

#

or objname

vapid frigate
#

serializing it might be unpredictable, but if you have the right name it should deserialize

simple fiber
#

I don't think {OBJNAME} = Objname

vapid frigate
#

that's what the 'call' is for

simple fiber
#

no shit

warm gorge
#

I definitely am using the right var name, and they are alive. They just sometimes become null, and randomly 'fix' out of no reason

simple fiber
#

But I don't think it will return the obj anyway

vapid frigate
#

they also null in the debug console watch things?

warm gorge
#

Yes

vapid frigate
#

harmdhast it does.. it's just _obj = call compile "civ_11"; is the same as doing _obj = civ_11;

#

(well a lot slower.. but same result)

simple fiber
#

I'm not used to this kind of call compile sorcery

cedar kindle
#

good, it should've died with a2

#

@warm gorge just to be clear, you mean objNull and not nil?

simple fiber
#

never played with editing in a2 anyway

warm gorge
#

@cedar kindle Yes, objNull

simple fiber
#

@ShadowRanger Are the players JIP or are they connected and initialized ?

warm gorge
#

@simple fiber Cant be sure exactly, because its such a high traffic server and it happens only sometimes out of the blue. Id say its JIP players mainly tho

simple fiber
#

Just use a isNull check when you build your list then :)

cedar kindle
#

all I can tell you is that if the unit is named civ_11 and it's a reference to the player object who is alive, it cannot be objNull. So either you've got the wrong ref or something is overwriting civ_11 variable

warm gorge
#

@simple fiber I shouldnt have to when they are alive and well, thats the thing. @cedar kindle Thats exactly what I think. Thats why its so confusing to me, I dont know whats causing it. I know 100% im referencing them properly and using the right variables, so its weird

vapid frigate
#

not using the var name elsewhere as well? (on something that gets deleted)

cedar kindle
#

save the list as a gvar and select the index from the listbox maybe? then you avoid the whole serialization between namespaces and don't have to name your player objects with a variable

simple fiber
#

A check won't cost anything tbh. Assuming you are on AL

#
  • To others, CIV_xx vars are not rewrote
warm gorge
#

@vapid frigate Id have to go through the whole mission file, but im pretty sure I dont. @cedar kindle Ill probably have a play around with it to see if I can figure anything out. @simple fiber Im not worried about the check, its just the neccesity of the check.

simple fiber
#

Probably the.best you can go with is to check if the player is JIP with getClientState or.other commands I probably forgot

cedar kindle
#

the only way for them to become objNull is death/disconnect during the selection time

simple fiber
#

But I don't remember allPlayers returning null players

#

That's weird

warm gorge
#

Im using playableUnits

#

That might be a start, changing to allPlayers

cedar kindle
#

they can die and disconnect while the UI is open

warm gorge
#

Cheers for the help guys, ill make some changes and see how I go. If I continue with issues, ill be sure to update you all if I can.

simple fiber
#

๐Ÿ‘

ivory nova
#

Hey o/ I keep getting an undefined variables error when I call _group = (_this select 0); \ _group = setBehaviour "SAFE"; Anyone know what that could be? The script that appears in is called from squad leader init with null = [group this] execVM "waypoints.sqf";

#

Oh wait, I don't need that = do I

#

brb kms

vapid frigate
ivory nova
#

@vapid frigate hahaha, awesome ๐Ÿ˜ƒ

cedar kindle
#

just look at the code and google setBehaviour for an example

ivory nova
#

Indeed ๐Ÿ˜ƒ I'm just still so bad, but getting there ๐Ÿ˜ƒ I'll stop posting newb questions sorry

warm gorge
#

Weird question but where do you guys call disableSerialization in your scripts? At the very top? Or below your main private [] call?

still forum
#

private [] call ? I use it where it's needed just before it's needed

warm gorge
#

I just sometimes see people call it at the top of their scripts, above or below the most outermost variable private declarations

#

Not sure what 'habbit' to get into

#

I can show you what I mean if you want. Not sure i fim allowed to post links to github reps tho

still forum
#

Well.. There is no reason to use it where it's not needed. It might actually hurt. So I don't see a reason to use it at the top of every script

#

Sure you are allowed to post links.

warm gorge
still forum
#

Yeah.. okey.. Most people don't consider it as a real part of code and put it just like in the script you linked at the top of the script. together with the header and #defines and other misc stuff that aren't actually part of the script itself.

#

Personal preference. I like my scripts to be compact. So I'd move the disableSerialization call "out" of my script. Performance wise it's best to do it only when you need it. In the linked script for example if the if block doesn't execute you are still executing disableSerialization. But the performance impact is to small to really care about it.

warm gorge
#

Alright cheers

tender fossil
tender fossil
#

@tough abyss Why wouldn't they be if they become popular?

#

I don't like most of the popular youtubers either, but I don't think I can use it as measurement of their intelligence or such stuff

#

What makes it ironic is that it states exactly that criticizing is a lot easier than creating something actually new (and working)

#

Yes

#

It's also interesting how the different levels vary in different persons, eg. I consider myself as good at creating, but very poor in applying/execution

#

Yup

still forum
tender fossil
#

Alright, let's move on that channel

still forum
#

#offtopic_arma is the general offtopic channel. the other offtopic channels are for specific topics...

little eagle
#

What? There are way to many ideas out there and too few that execute them well.

bleak schooner
#

Hi,
I can use ammo to get the current amount of ammo a player has in his weapon. Is there any way, without mods, to check the amount of amo a player has in his vest and backpack (not the amount of magazines, the exact number of rounds)

little eagle
#

Like the total number of rounds no matter which weapon?

bleak schooner
#

yes

little eagle
#

private _ammo = 0;

{
    _ammo = _ammo + (_x select 1);
} forEach magazinesAmmoFull player;

_ammo
bleak schooner
#

thats what I was looking foor; thx

little eagle
#

yw

still forum
#

wants std::accumulate

tough abyss
#

+1

little eagle
#
call compile (magazinesAmmoFull player apply {_x select 1} joinString "+")
#

I thought this chat room might like it

still forum
rancid ruin
#

isn't there a neat way to sort arrays using apply?

#

i'm sure i saw someone post some elegant solution before

little eagle
#

sort how

rancid ruin
#

same as how BIS_fnc_sortBy does it

#

i think

little eagle
#
#define ASCEND true
#define DECEND false

private _array = allPlayers;

_array = _array apply {[_x distance player, _x]};
_array sort ASCEND;
_array = _array apply {_x select 1};
_array

I guess. Added something for Dscha.

tough abyss
#

Macros

#

Why not just true? ASCEND is longer in characters

dusk sage
#

For one the macro length doesn't affect anything after the precompilation, and two, it's readable ๐Ÿ˜„

tough abyss
#

By length I mean it takes longer to type so more work

dusk sage
#

Might aswell bind it to a key then ๐Ÿ˜„

tame portal
#

#define true false

#

And watch the world burn

tough abyss
#

Lol

high vigil
#

Hi guys, can any one help me with PlayerViewChanged EH, trying to make a 3d person limiter with out nasty loops

little eagle
#

Last time I tried it was pretty broken.

still forum
#

longer to type == more work? Most scripters have autocomplete

little eagle
#

Unusable in MP

still forum
#

Well.. Might work good enoughish for first/third person switching... Wasn't that the problem with it not detecting the view change in Zeus Remote Control?

little eagle
#

Also quadbikes

#

It didn't work at all when doing stuff with vehicles.

high vigil
#

im ok with vehicles

little eagle
#

Sometimes executed, sometimes didn't.

high vigil
#

i actually want 3d person to be enabled when inside vehicle ๐Ÿ˜„

little eagle
#

You can try to use it. What's the problem?

high vigil
#

no idea how to code it ๐Ÿ˜ฆ

little eagle
#

Oh, this has nothing to do with cameraViewbtw. So you can't get rid of those loops.

high vigil
#

how so ?

#

oldCameraOn: Object - cameraOn before EH fired
newCameraOn: Object - cameraOn after EH fired

little eagle
#

cameraOn != cameraView

high vigil
#

after 13 years they still cant make it right....

rocky drum
#

Trying to limit a unit to only using standing and crouched positions. How do I disable prone?

little eagle
#

setUnitPos "UP"
or
setUnitPos "MIDDLE"

#

But no way to allow both, but disable "DOWN" (prone)

#

There's also a button for this in the editor. It uses the same icons as the stance indicator.

rancid ruin
#

yeah nice sort function commy. i think you wrote that exact thing here before lol

little eagle
#

compileFinal doesn't work on functions stored in a displays namespace. Can overwrite them without problems. :/

tender fossil
#

Is there list of default displays somewhere?

#

Eg. display 46 is default display, Zeus interface is display/IDD 312, 12 is map etc...

still forum
#

Display list is config. I'm quite sure I told you that already

#

Just grab a allInOne config and search for idd and you'll get all existing display ID's

little eagle
#

#46 is not the "default display"

#

#46 is RscDisplayMission

#

If there is an "default display" then it's RscDisplayMain or #0

#

Pretty sure zeus - RscDisplayCurator is 313, not 312

#

#49 is the pause menu - RscDisplay(MP)Interrupt

tender fossil
#

@still forum How do I "grab an allInOne config"? ๐Ÿ˜„

dusk sage
still forum
#

Just google "Arma 3 all in one config"

tender fossil
#

Ahh, it was literally "allInOne" instead of retoric clause lol

manic sigil
#

Helicoptergunner dolookat (player pointer) -> headtrack turret while pilot?

hollow lantern
#

@vapid frigate Yep broadcasting the variable with true helped, thx

#

hmmm but now the fridge will explode eveytime when someone hits it. weird

#

it should be like --> two times hit --> boom --> end

#

hmm lets see

rancid ruin
#

Helicoptergunner dolookat (player pointer) -> headtrack turret while pilot?
what

peak plover
#

??

subtle ore
#

is it possible to spawn blood decals? Or?

jade abyss
#

is it an Object?

subtle ore
#

I'm honestly not sure.

jade abyss
#

I assume it is an .p3d

#

You just have to find it in the files and create it

subtle ore
#

I see.

#

fn_bloodEffect ๐Ÿคท

#

bloodsplah.p3d ๐Ÿคท

jade abyss
#

=}

warm gorge
#

Weird question, but do you guys think a developer position on a server deserves the same sort of gratitude that a regular staff member (moderator/admin) would deserve?

jade abyss
#

Ask yourself: What would the Mod/Admin do without a Dev? What would a Dev do without a Mod/Admin? Whats more needed?

warm gorge
#

Yeah, well im in a bit of a 'sticky' situation haha. But id say a dev would be more needed, cause without them, you wouldnt have the server.

#

@jade abyss Just a bit difficult when you have someone who doesnt understand coding and all the work that I do, and doesnt think its worthy of a higher staff position.

jade abyss
#

Do what i would do, if they got a Problem say: "Good luck finding the problem"

warm gorge
#

Haha yeah

tame portal
#

@tough abyss at that point the owner would label himself Developer

halcyon crypt
#

as a dev, don't seek gratitude or appreciation, you won't get it

#

๐Ÿ˜ƒ

#

๐Ÿ˜

simple fiber
#

You won't get gratitude and appreciation because you are developping for random kiddos on life servers. There are communities out there that have a huge respect for their developpers / content makers including mine

#

It just depends if the admins recognize the amount of work needed or if they just don't care

#

But as ShadowRanger asked, I think a developper should be at the same level as an admin or mod. They often need access to the server and they have access to all the content. A dev must be someone you can trust like an admin

halcyon crypt
#

there's a difference between true appreciation and appreciation so that you keep working for them ๐Ÿ˜›

jade abyss
#

and most of the time it's the last case

rancid ruin
#

what is a "higher staff position"? if they're not paying you then why would you care about an imaginary internet rank?

#

either get paid or do it cos you love doing it. that's my rule of thumb

warm gorge
#

Yeah but certain access does help with developing, such as access to the server files etc

#

yeah, you make good points

rancid ruin
#

i'd say just work with friends, or at least people who you share mutual respect with

#

i predict you're probably working with 14 year old "admins" on a life server or something?

warm gorge
#

Nah much older, just one of the admins doesnt understand coding as well as I do or the other main admin does, which makes things difficult sometimes

rancid ruin
#

but it is a life server right?

warm gorge
#

Yes

rancid ruin
#

there you go then

warm gorge
#

lol

#

I code because I enjoy it and I like seeing people enjoy what I make. Its also good experience for me as im still fairly young. But not everyone understands the amount of work that can go into coding and how long some things actually take

rancid ruin
#

i don't really mean that in a nasty way, but the life people are basically only known for disrespecting developers

warm gorge
#

I understand what you're saying

warm gorge
#

Would it be worth moving from using cursorTarget to cursorObject in most cases for getting the cursor target object for vehicles, players, buildings etc?

#

Ive noticed from when ive used it so far its a lot more accurate, and doesn't have detection/reveal issues like cursorTarget

thin pine
#

I only use cursorTarget for in game debugging, trying to target a moving object eg helicopter

warm gorge
#

@thin pine What do you use for non-debugging purposes? Theres not really many other choices for getting targets

thin pine
#

In my scripting activities so far I haven't really had a need for the cursor target/object grabbing commands other than a nametag script I wrote years ago

turbid thunder
#

cursorTarget only returns something when the object can actually be identified. Imagine it like when it is night and you play on low difficulty that sometimes it isnt really telling you what unit you are aiming at, or the unit is not visible on the map even though it is pretty close to you and in your line of sight. Basically you need to have some level of knowsAbout or else it wont return something. cursorObject is going strictly by line of sight and doesnt care if you can actually see it (based on weather, fog, time of day ect)

rocky drum
#

If you need a reason to live, just look to the easily scripted AI of arma that always works and does everything you tell it to do to the letter.๐Ÿ˜‘ ๐Ÿ”ซ

rancid ruin
#

what are you having trouble with?

rocky drum
#

Nothing I can't work out msyelf. Mostly I'm dealing with pathing and unable to do more than leave it up to chance on whether or not the AI I'm working with will do what I want.

#

Just thought I'd leave that message. You know. For inspiration.

rotund cypress
#

if !(meaning in life) exitWith {setDamage 1;};

rocky drum
#

โฌ† ๐Ÿ‘Œ

plucky beacon
#

Old joke, was used 1 month ago

rotund cypress
#

^

#

In that case
setDamage [1, false];
@tough abyss

#

And why would you use alternative syntax?

#

Its defaulting to false anyways

turbid thunder
#

I wasnt even aware it had an alternative syntax

rotund cypress
#

Me neither

turbid thunder
#

@rotund cypress Based on the wiki, true is default

#

false to skip destruction effects

#

I guess that is so turn vehicles into wreckages without them exploding? Hmmmm

rotund cypress
#

lol

#

Never bothered about use efffects, never knew what it did, and AFAIK it defaulted to false, but I guess I were wrong ๐Ÿคฃ

grand berry
#

The alt syntax was only added in v1.67.

rotund cypress
#

makes sense

rocky drum
#

Is there a way to expand "doTarget" to allow multiple targets?

turbid thunder
#

@rocky drum A unit can only always have one target assigned to it (although that doesnt mean that it will only shoot that target)

warm gorge
#

@tough abyss Theres still even a lot of missing BIS functions on the wiki from the current version and several previous versions. Not sure if youll see the dev version functions there anytime soon

thin pine
rotund cypress
#

if (dream in life) exitWith {call _fnc_wakeUpPlayer};

warm gorge
#

Is there any way to sort a combo box alphabetically? Unfortunately theres no similar lbSort command for combo boxes

thin pine
#

Try lbsort

tame portal
#

@thin pine lbsort doesn't work ^^

warm gorge
#

Surprised theres not a command for it already. Might be worth making a suggestion on the Arma 3 Feedback Tracker

tame portal
#

@warm gorge A workaround would be to put all items in the format of ["text","value"] into one array and then use the sort command and add them back to the combobox

#

It will use the first element of a sub array

#

So if the display text is the first element in the items array, it will sort alphabetically

#

@warm gorge Does that make sense to you?

warm gorge
#

@tame portal In my case, im trying to sort allPlayers/playableUnits array by their names, so id assume you mean save their name, and object reference to a 2d array and then sort before looping through it and adding it to the combo box?

tame portal
#

Yes

#

I'd do it like this

#

Foreach player object do

#

_allunitstosort pushBack [name _x, _x];

#

Then so

#

_allunitstosort sort false;

#

Then loop through _allunitstosort and add them to the combobox

warm gorge
#

Alright ill give that a go. That wouldnt be too performance inneficient would it?

#

For a menu that might get constantly opened

tame portal
#

No

#

There's not really any other way to do it

thin pine
#

Instead of optixes pushback you could also use apply if you want to be fancy :p

warm gorge
#

@tame portal @thin pine Tried using apply for this, but doesn't seem to be working properly.

#

_players = allPlayers apply {name _x; _x};
_players sort true;

still forum
#

facepalm

#

_players = allPlayers apply {[name _x, _x]}; _players sort true;

#

Additionally _players = _players apply {_this select 1} Now you have array of player objects sorted by name

warm gorge
#

@still forum Ah I see, sorry bout that. Couldnt quite understand how the apply command works. The documentation on the wiki doesnt explain it very well/not enough examples imo. Thanks though, that works perfectly

willow basin
turbid thunder
#

@Quiksilver#5042 why would you need to compare a bool though?

#

Its already true or false so using a command to return a bool if you already have one seems weird

cedar kindle
#

seems like he's comparing the previous state

quasi thicket
turbid thunder
#

@quasi thicket You can also use the arsenal to assign yourself DLC weapons but you'll be greeted with an unremovable huge watermark that covers, well, your entire screen

warm gorge
#

Is there a way to workaround AI taking the place of player units who get kicked off the game such as through client not responding?

rotund cypress
#

Yay, new update on dev branch as usual, saw something interesting BIS_fnc_admin, anyone found out what it does yet?

native hemlock
rotund cypress
#

Oh already on the wiki lol ๐Ÿ˜„

warm gorge
#

Surprisingly

rotund cypress
#

Ironic or no? ๐Ÿ˜‰

native hemlock
#

Killzone Kid is on top of new things usually

rotund cypress
#

Aah alright

native hemlock
warm gorge
#

I tried contacting people to update it, havent spoken to KK tho, might send him a PM now

rotund cypress
#

He is not on Discord though @warm gorge

warm gorge
#

Yeah on the forums

native hemlock
#

He reads forum PMs. When I checked 6+ months ago there were 200+ functions missing from the wiki

split coral
#

You don't seem to be doing anything at the moment, you could add them. ๐Ÿ˜ƒ

rotund cypress
#

Does he have access though? ๐Ÿค”

warm gorge
#

None of us have access to exporting the output of that command

split coral
#

oh? I thought it was available for anyone

native hemlock
#

Well you can for individual functions, you just can't do a full dump

rotund cypress
#

But there is no way to make an account

#

So RIP

warm gorge
#

There is, just contact @lavish ocean

rotund cypress
#

I wanted to add examples, but I couldn't

warm gorge
#

I sent him a PM on the forums and he made me one

native hemlock
#

I think the wiki formatting has slightly changed though so some editing is probably necessary

rotund cypress
#

Ah nice, @warm gorge just PMd him on DS

split coral
#

Note to self: don't try exporting all the functions at once.
Seems to take a while.

warm gorge
#

Yeah I tried the other day aha

#

Is there a guide somewhere on how to make changes to the wiki? I dont understand the formatting for this

rotund cypress
split coral
#

oh right. Formatting.

rotund cypress
#

๐Ÿ˜ƒ

warm gorge
#

cheers

waxen jacinth
#

can someone tell mich wich scriptlanguage is the most comparable to sqf`?

split coral
#

ok, who wants the 70,682 lines of functions export? ๐Ÿ˜

rotund cypress
#

C

#

There is a few languages which has it similarities though

#

I believe PHP can be quite similar in some ways as well

#

@waxen jacinth

waxen jacinth
#

ah, cheers!

dusk sage
#

C like syntax, but not statically typed, somewhat JS like @waxen jacinth

#

Really just a mash of a lot of languages

waxen jacinth
#

yeh thought there might be one wich is really similiar

dusk sage
#

Not really

#

Only in style

native hemlock
#

It actually let you export all the functions? I'm pretty sure when I tried I hit the string limit. If you look at the "source" for BIS_fnc_admin you should be able to get a general idea of the formatting as well

split coral
#

Yeah.

#

293 funcs missing from wiki apparently.

bitter bough
#

that's a lot of missing functions

warm gorge
#

Yeah wow aha. I messaged Killzone, hopefully he can update it. Doubt anyone wants to add them all manually

split coral
#

I think you could dump the whole export to wiki in one go

warm gorge
#

How bad is a constant 5 FPS (server fps) for a server with 100+ players?

willow basin
#

Well I wouldn't perform any AI tasks with it. Also players newly joining will have another daytime than players who are online for longer (in default). Loops / sleeps take longer serversided, etc.

bitter bough
#

"CHECKVISIBLE" - disables visibility raycasts
What exactly does 'raycasts' mean?

rotund cypress
#

Does anyone have any experience with crashes with error STATUS_INTEGER_DIVIDE_BY_ZERO? I'm running a query with extDB3 and it stops after that with that error

bitter bough
#

sounds like I'll just not confuse myself with more locality issues.

bitter bough
#

anyone versed in the art of CBA perFrameHandler?

#

Due to locality issues, I need to use it so I can disable certain AI functions on a loop.
And then at a certain point, I will remove the PFH so the AI can resume normal behaviour

#

Locality issues = 2 Headless clients.

#

I could be using the removePFH wrong, but I'm not certain

#

I can test that. But I've been told to use PFH because once locality changes to a diff HC, it resets the AI

velvet merlin
#

is there some hack to detect a weapon deployed event reliably?
https://community.bistudio.com/wiki/Arma_3:_Event_Handlers#WeaponDeployed

according to reyhard it triggers also when your weapon cant be deployed ("WeaponDeployed is triggered every time you are deployed. if you don't have a bipod you can still deploy")
the made the workaround to add the EH via weaponInfoType dialog onload of the desired weapon and apply some magic

    {
        onLoad="[...]; _this call rhs_fnc_handle_pk;";
    };
//cfgWeapon class:
weaponInfoType = "rhs_rscOptics_pkm";```
script itself:
http://paste.ubuntu.com/24421669/
#

does that trigger properly? and isWeaponDeployed is reliable? ๐Ÿ˜ฎ

#

thanks. will do some tests now

bitter bough
#

@tough abyss I take it I can't just plug that into the 'on activation' section of a trigger can I?

open tendon
#

Hey, im scripting a mission for Arma2, using the RE command. (remoteexecute). I need an object that will always be local on the server so the

#

RE only executes on the server

#

any hints?

little eagle
#

remoteExec does not exist in A2

open tendon
#

this is arma 2 and it works ;p im currently using this line

#

[nil, nil, rEXECVM, "custom\server_kickplayer.sqf", player] call RE;

#

but I only want the kickplayer script to run on server. not on clients

#

the wiki says if I change the 2nd nil to some object local on server it should be god

little eagle
#

Add

if (isServer) exitWith {};
#

to the script

open tendon
#

It will be the same performance wise you think?

little eagle
#

negligible difference

open tendon
#

alright thanks

little eagle
#

On all clients is public variable eventhandler that executes scripts that corresponds to less-than-100-percent-multiplayer-working script commands. One script for one commands, no string sending that will be compiled and executed for the sake of clarity and easiness of creating MP-friendly commands from the engine MP-unfriendly ones.

#

Who wrote this?

#

bis_functions_mainscope should be a game logic always local to the server, but I can't recall if this existed back in A2.

open tendon
#

I didn't understand that part lol

#

let me test bis_functions_mainscope

#

looks like that variable exists

#

so you are sure bis_functions_mainscope is NOT local on clients?

#

I don't have a dedi server to test :->

little eagle
#
    //--- Create functions logic (cannot be created when game is launching; server only)
    if (isserver && isnull (missionnamespace getvariable ["bis_functions_mainscope",objnull]) && !isnil {uinamespace getvariable "bis_fnc_init"} && worldname != "") then {
        private ["_grpLogic"];
        createcenter sidelogic;
        _grpLogic = creategroup sidelogic;
        bis_functions_mainscope = _grpLogic createunit ["Logic",[9,9,9],[],0,"none"];
        bis_functions_mainscope setvariable ["isDedicated",isDedicated,true];
        
        //--- Support for netId in SP (used in BIS_fnc_netId, BIS_fnc_objectFromNetId, BIS_fnc_groupFromNetId)
        //--- Format [netId1,grpOrObj1,netId2,grpOrObj2,...]
        if (!isMultiplayer) then {bis_functions_mainscope setVariable ["BIS_fnc_netId_globIDs_SP", []]};
        
        publicvariable "bis_functions_mainscope";
    };
#

initFunctions.sqf

open tendon
#

thank you โค

little eagle
#

This is from A3, but this sure looks like code old enough for the A2 days. And I doubt they changed it since.

spice arch
#

hey guys

#

i got a script that generates random locations based on some input

#

i'm trying to test it via the console

#

if i spawn the function it seems to work okay

#

but when i try to player setPos to the function return value it gives me a generic error

#

i've tried a few things but it still gives a generic error with no explanation

#

currently trying this:

#

my_fnc = compile preprocessFile "scripts\randLoc.sqf";

_posVal = [9000,18000,100,0.8] call my_fnc;

vapid frigate
#

could try [] spawn { //that stuff };

#

(if this is just to test in debug console)

spice arch
#

so i tried that as well

#

my_fnc = compile preprocessFile "scripts\randLoc.sqf";

_posVal = [9000,18000,100,0.8] spawn my_fnc;

player setPos _posVal;

#

and i still get a generic error but now with the player setPos part

vapid frigate
#

nah not like that

#

spawn won't give you the return value

#

it will give you a reference to the spawned 'thread'

#
[] spawn {
    my_fnc = compile preprocessFile "scripts\randLoc.sqf";
   _posVal = [9000,18000,100,0.8] call my_fnc;
   player setpos _posVal;
};```
spice arch
#

oh i see let me give that a shot

#

still giving me an error:

#

18:47:35 Error in expression <essFile "scripts\randLoc.sqf";
_posVal = [9000,18000,100,0.8] call my_fnc;
pla>
18:47:35 Error position: <= [9000,18000,100,0.8] call my_fnc;
pla>
18:47:35 Error Generic error in expression

vapid frigate
#

hmm don't see what's wrong with that

#

unless you can't have _privates in debug console? i think you can in that spawn at least though

spice arch
#

hm

#

so its got something to do with player setpos _posval

#

the call to my_fnc seems to go through alright

#

my_fnc hints the new coordinates

#

so i see that once i return to game

vapid frigate
#

does your function definitely return a position?

spice arch
#

yeah new one each time

#

i'm using this line of code in the actual .sqf func file

jade abyss
#

_posVal = [9000,18000,100,0.8] spawn my_fnc; <---

vapid frigate
#

so if you do my_pos = instead of _posval =

spice arch
#

hint format ["%1,%2,%3", _randLoc select 0, _randLoc select 1, _randLoc select 2];
returnVal = _randLoc;

jade abyss
#

_posVal = [9000,18000,100,0.8] spawn my_fnc; <-- spawn -> call

vapid frigate
#

yeh explained that already dscha

spice arch
#

and the hint returns a location properly

vapid frigate
#

you need just _randLoc on the last line

#

not returnVal = _randLoc

jade abyss
#

No clue, there is too much codestuff without the CodeTag in here, hard to keep track of everything

spice arch
#

oh whats the code tag for discord?

#

[code] text [/code]?

jade abyss
#

```sqf
CODE
```

spice arch
#

sqf test test

#

ah k

jade abyss
#

```sqf
CODE STARTS IN NEW LINE
```

#
hint str [1];
#

for example

spice arch
#

yeah i was just using the

_returnVal = _randLoc;

as an organizer but it should still work as a return value no?

#

or does that a pointer to _randLoc instead?

#

return a *

jade abyss
#

First of all: What are you trying to achieve?

spice arch
#

i'm trying to test a random location script i wrote

#

so i've been using combinations of call/spawn/execVM in the console

jade abyss
#

execVM? Why?

spice arch
#
[] spawn { 
 my_fnc = compile preprocessFile "scripts\randLoc.sqf"; 
posVal = [9000,18000,100,0.8] call my_fnc; 
player setpos posVal; 
};
#

so i findthat the first 2 lines of the spawn { } works

vapid frigate
#

the last line of your function needs to return something

#

so needs to just be _randLoc

#

or _returnVal

jade abyss
#

how does "randLoc.sqf" look like?

vapid frigate
#

if it's a statement, it'll just return 'nil'

spice arch
#

ok one sec let me change that real quick lecks

#

i'll post the code in a pastebin if its still problematic

jade abyss
#

Just paste (next time) the whole Code in here, if you need help. Guessing what the rest of the code looks like is pretty annoying and wastes alot of time

spice arch
#

ah okay that worked

#

thanks guys

#

so if i understand correctly

#

is it because the statement _returnVal = _randLoc doesn't actually return

vapid frigate
#

yeah

spice arch
#

the return statement of sqf has to be a single line

vapid frigate
#

that just assigns _returnVal

spice arch
#

that like calls the variable

jade abyss
#
my_fnc = {_a = 1; _a};
hint str (call my_fnc); //Result: "1"
spice arch
#

ok i get it, thanks guys!

vapid frigate
#

yep and ```SQF
my_fnc = {_a = 1;};
hint str (call my_fnc); // Error

#

np

hushed quail
#

Question for the Alive experts! Does the TAOR Markers need to be square or circle?

halcyon crypt
#

either

jade abyss
#

As i was playing around with fired EH:
Anyone know a way to find out, when a bullet hit something?

warm gorge
#

@hasty violet Yeah actually, I used it a couple weeks ago and had the same issue, didn't understand what was going on

jade abyss
warm gorge
#

That doesnt shuffle the whole array though

jade abyss
#

๐Ÿคฆ

#

"Why not do it the other way around with "

vapid frigate
#

it should be random ```private _cnt = count _this;
for "_i" from 1 to _cnt do {
_this pushBack (_this deleteAt floor random _cnt);
};

#

actually i guess that could leave chunks of the original

dusk sage
#

It is as random as the random command can get

vapid frigate
#

but it could be pushing back the same ones each time

jade abyss
#

Having 3 Entrys in it and expecting everytime a different result is... erm.. yeah ๐Ÿ˜„

dusk sage
#

It could, it's random after all ๐Ÿ˜‰

vapid frigate
#

so it has a pretty high probability of having chunks from the original

#

unless it happens to do at least every 2nd one

dusk sage
#

It has the same probability as not having the same pattern as the original

little eagle
#

There also is `CBA_fnc_shuffleยด

dusk sage
#

Depending on the frequency of non unique elements, of course

#

Isn't it the same code commy?

little eagle
#

No idea.

#

I can't imagine BIS_fnc_arrayShuffle being not random though.

#

Well you are playing with randomness here. So maybe you're just unlucky.

still forum
#

Just shuffle a random number of times

warm gorge
#

@jade abyss In regards to a bullet hit event, I dont believe there is one. Only thing I could think of doing is using a waitUntil {isNull _projectile} in a Fired event handler

little eagle
#

And that isn't safe for projectiles that can bounce.

turbid thunder
#

Are you saying that Arma spawns a new projectile when it bounces off a surface?

little eagle
#

No, but the projectile isn't deleted when it hits. It bounces.

turbid thunder
#

I see

jade abyss
#

Yeah, that hit doesn't seem to work anymore.

#

+isNull is pretty useless, as (since commy said) they bounce around

#

none of them triggered -.-

_projectile addEventHandler ["Explosion",        {systemchat format["Explosion: %1",_this];}];
_projectile addEventHandler ["HandleDamage",    {systemchat format["HandleDamage: %1",_this];}];
_projectile addEventHandler ["HitPart",            {systemchat format["HitPart: %1",_this];}];
_projectile addEventHandler ["Hit",                {systemchat format["Hit: %1",_this];}];
_projectile addEventHandler ["Killed",            {systemchat format["Killed: %1",_this];}];
_projectile addEventHandler ["Dammaged",        {systemchat format["Dammaged: %1",_this];}];
_projectile addEventHandler ["Deleted",            {systemchat format["Deleted: %1",_this];}];```
little eagle
#

CfgAmmo have no eventhandlers in A3.

jade abyss
#

meh

little eagle
#

Not even init ๐Ÿ˜ฆ

jade abyss
#

fml

#

-.-

#

Would be nice to have

little eagle
#

Agreed.

still forum
#

Well you could add Got infront of each of these EH's. GotDamaged GotDeleted GotHit. That's also what they do on other objects

jade abyss
#

?

still forum
#

And a projectile doesn't get hit

jade abyss
#

You suggest it could already exist?

still forum
#

Just saying it's logical that these EH's don't work. Because the Hit eventhandler is a HasBeenHit eventhandler. Not hasHitSomething

#

Like the Killed EH. It only checks hasBeenKilled. Not if a Player hasKilled something

little eagle
#

There is no difference in a projectile hitting you at 600 m/s or you running into a still projectile.with 600 m/s technically.

jade abyss
#

nutting -.- grml

#

technically, yeah

turbid thunder
#

dat censorship

still forum
#

Hit EH on the projectile will probably fire if you hit the projectile with a projectile

jade abyss
#

Nope

turbid thunder
#

@still forum Is that physically possible to do?

still forum
#

I don't think so

little eagle
#

No, dedmen. Hit eh on a mine doesn't trigger when you shoot the mine.

jade abyss
#

โ˜

little eagle
#

Neither does "killed"

jade abyss
#

Nothing is triggered

#

Not even "deleted"

little eagle
#

Or deleted

#

yes

#

No

jade abyss
#

You can

#

but it won't trigger

#

๐Ÿ˜„

little eagle
#

๐Ÿคฆ

willow basin
#

wasn't there somthing like ExplosionNearby

little eagle
#

Yes, let's attach a gamelogic with explosion nearby eventhandler to every mine.

jade abyss
#

"Explosion"

willow basin
#

๐Ÿ˜ฌ

jade abyss
#

Armitxes

#
Triggered when a vehicle or unit is damaged by a nearby explosion. It can be assigned to a remote unit or vehicle but will only fire on the PC where EH is added and explosion is local, i.e. it really needs to be added on every PC and JIP and will fire only where the explosion is originated.```
#

btw... hmm...

vapid frigate
little eagle
#

You can get the projectile fairy easily, QS with incoming missile.

jade abyss
#

can i shoot myself?

little eagle
#

But passing it would be prefered.

jade abyss
#

hmm

little eagle
#

I don't think you can shoot yourself.

#

I think it phases through you or something.

jade abyss
#

mom =}

little eagle
#

Important for jets and stuff

#

wait

jade abyss
#

lulz

little eagle
#
params ["_vehicle", "_ammo", "_whoFired"];

private _projectile = getPos _whoFired nearestObject _ammo;
#

This was like the first trick I was told in SQF.

#

getPos is probably not even needed...

jade abyss
#

what the?

little eagle
#

?

jade abyss
#

Are you still using that?

little eagle
#

IncomingMissile doesn't give the projectile, Dscha, so yes.

jade abyss
#
player addEventHandler ["Fired",    {call My_fnc_firedEH;}];
My_fnc_firedEH =
{
    params["_unit","_weapon","_muzzle","_mode","_ammo","_magazine","_projectile","_gunner"];
};```
little eagle
#

IncomingMissile, not Fired

jade abyss
#

incoming... hmpf

little eagle
#

Only the unary syntax according to the wiki

#

nearestObject

#

nearestObject [position, type]

jade abyss
#

You own bullet can not kill you ๐Ÿ˜ฆ

#

thats boring

little eagle
#

It can if it has splash damage.

#

yes

#

It will phase through the shooter.

#

I guess so it doesn't collide with your own hitbox.

jade abyss
#

Yep, it ignores the player/shooter

vehicle player addEventHandler ["Fired",    {call My_fnc_Handle_Projectile;}];
My_fnc_Handle_Projectile =
{
    params["_unit","_weapon","_muzzle","_mode","_ammo","_magazine","_projectile","_gunner"];
    
    _projectile spawn
    {
        uisleep 0.5;
        _pos = player getRelPos [-5, 0];
        _this setPos [_pos select 0,_pos select 1, 0.2];
    };
};```
little eagle
#

๐Ÿคฆ

jade abyss
#

Worst thing:

#

then {

little eagle
#

๐Ÿคฆ ๐Ÿคฆ ๐Ÿคฆ

jade abyss
#

๐Ÿ˜‚

little eagle
#

๐Ÿ˜‚

jade abyss
#

Damnit, i need a hit detection for the bullet -.-

little eagle
#

You could create a ticket on the feedback tracker ๐Ÿ˜œ

jade abyss
#

uh wiat, haven't tested EPE stuff yet

#

Yeah, sure. Sry, but i gave up on Feedback Tracker

little eagle
#

If you have a bug, like animate being borked, just add a note to the wiki.

#

KK will reverse your change and say that the bug has been scheduled for a fix.

jade abyss
little eagle
#

Still waiting on that set of commands that removes items etc. from ammo boxes / vehicle cargo.

jade abyss
#

never

#

Missing essential command since... ofp :/

little eagle
#

They were running out of budget after setUnitLoadout

jade abyss
#

hehe

little eagle
#

"setVehicleLoadout" was too expensive

jade abyss
#

nah

little eagle
#

EntityCreated

T_T

jade abyss
#

naaahhh

still forum
jade abyss
#

Yep

#

"Realistic tank armour" kinda like the direction why i need it

#

Projectile hits an object, EH trigger that gives out the vehicle that was hit, position, worldToModel Pos of Vehicle, maybe the angle it came from/in

tough abyss
#

โฌ† Having said EH return the hit pos' armour angle could also be useful.

#

Could be used together with the projectile's angle in order to determine if penetration occurred.

#

Of couse, having all of that engine based would be nice ๐Ÿ‘€

warm thorn
#

Is there a base class for all types of Objects/Structures like Sandbags, Walls, Buildings and so on? Everything with the classname "Land_xxxxxxx". I search for something that I can use like "isKindOf "Land_base_F"

still forum
#

I think there is a Building class. Best way to find out would be to check the config Viewer. I don't have my game open right now.

warm thorn
#

@still forum I've already spent a lot of minutes in the config viewer. Maybe I am too brain AFK ^^ @tough abyss THANKS! Welcome back to arma... where buildings are under vehicles ^^ I have missed that xD

vague hull
#

I am waiting for signature checks on extensions since almost a year.. but security obviously isnt worth enough too

peak plover
#

Hey

#

I have the weirdest issue

#
_usedSpots = fullCrew [_vehicle,''];
_allSpots = fullCrew [_vehicle,'',true];
_emptySpots = _allSpots - _usedSpots;
_emptySpots = (count _emptySpots);


private _transUnitList = [];

_transUnitArray = call compile format ["_%1_%2",_side,_units];
_transGroup = createGroup (_side);
_unitPos = [(_pos select 0),_dist,[nil, _dist] select _out] call BRM_aiMaster_fnc_landPos;

{
    _unit = _transGroup createUnit [ _x, _unitPos, [], 20, "NONE" ];
    _unit setVariable ["unit_side", (_side)];
    _unit setVariable ["aiMaster_cleanUp",true,true];
    _unit addEventHandler ["Hit", BRM_FMK_fnc_setHitFace];
    _unit addEventHandler ["Hit", {(_this select 0)setVariable["last_damage",_this select 1]}];
    _unit addEventHandler ["Killed", BRM_fnc_onAIKilled];
    _unit addEventHandler ["Killed", BRM_aiMaster_fnc_onKilled];
    _unit setSkill _skill;
    _unit setskill ["aimingAccuracy",0.6];
    _unit setskill ["aimingShake",0.5];
    _unit setskill ["aimingSpeed",0.5];
    if (_offensive select 1) then {
        _unit disableAI "AUTOCOMBAT";
    };
    if (side _unit == east) then {[_unit, "VANILLA"] call BRM_fnc_initAI;};
    if (side _unit == west) then {[_unit, "VANILLA"] call BRM_fnc_initAI;};
    if (side _unit == resistance) then {[_unit, "VANILLA"] call BRM_fnc_initAI;};
    _transUnitList = _transUnitList pushBack _unit;
    //_voice = selectRandom ["Male01PER","Male02PER","Male03PER"];
    //_unit setSpeaker _voice;
    true
} count _transUnitArray;
#

This fails because the 2nd time it loops the count, it says _transUnitList is number, expected array

#
//_transUnitList == [];
//after _transUnitList = _transUnitList pushBack _unit;
// _transUnitList == 0;

why?

warm gorge
#

pushback returns a number

#

You're assiging transUnitList a number

peak plover
#

oh my god

#

oh my god, i'm so stupid, thanks

#

That's so obvious ๐Ÿคฆ

warm gorge
#

haha np

peak plover
#

Rhanks ๐Ÿ˜„

#

Spent over an hour trying to figure this out. It's the darn easiest things ๐Ÿ˜„

manic sigil
#

So I unpacked the Dynamic Recon Ops mission to try and add Zeus to it - for personal use, no intent to redistribute etc - but it doesn't seem to want to stick. It lists the first player as u1, doesn't destroy or replace that unit, even codes u1 in as the server admin... but adding a Zeus token with u1 as the owner doesn't allow for Zeus to be opened :/

#

Okay, it CAN work, but only if I cancel the mission setup menu... which you can't reopen, effectively breaking the mission. Hm.

#

And for a few brief seconds after the mission begins, too... narrowing down.

open vigil
#

Do you have permission to do so?

manic sigil
#

No, I have not sought out the mission maker's permission to edit the mission, but I also have no intent on releasing it. But I understand the concern :/

open vigil
#

It's one thing to have a peek to see how a mission maker has solved a particular problem, but it's quite another to alter someone's mission without permission.

jovial ivy
#

I mean. It would really depend if you release it publicly. I edit missions from the workshop all the time for fun with my friends.

manic sigil
#

FM is right, though. I mean, without monetization its not crime of the century, but its still a sketchy thing to do - not everyone who says they'll keep it private means it, intentionally or not.

jovial ivy
#

Indeed.

dusk sage
#

If they wanted it to be private, then why* would they release it ๐Ÿค” ?

#

jesus, mashed that

manic sigil
#

I get what you mean, but that feels like slippery slope to Ayn Rand "im a creator but i never write down my work because you arent worthy of it"ism.

dusk sage
#

Was it workshop?

#

Gotta have a peek at the license, very few limit you to do your own thing (w/o redis)

open vigil
#

Most people will give you permission if you just ask. But, not asking, at its most basic level, is disrespectful.

dusk sage
#

If they have released something for the public to use, and you alter that for your own private usage, that's perfectly normal

open vigil
#

You wouldn't say that about a mod, so why would you say that about a mission?

dusk sage
#

Aslong as he is remixing the mission itself, and not using its contents for his own creation

#

Regardless, gotta check license. I can't think of one which would revoke that right

rotund cypress
#

No one will use his changes if he does not release it, why is there a problem with modifying something only you know you have modified?

tough abyss
#

In order to add Zeus to a mission via script: ```SQF
private "_curator";

_curator = (createGroup sideLogic) createUnit ["ModuleCurator_F", [0, 0, 0] , [], 0, ""]; // Create curator module, needed in order to assign a curator
player assignCurator _curator; // Assign a curator, the user in our case
openCuratorInterface; // Force open the curator interface

// Called with (requires CBA)
QUOTE(closeDialog 0; [] remoteExecCall [ARR_2(QQFUNC(openZeus), 0)]);

open vigil
#

Again, at the most simple level, it's courtesy. Because you're tinkering with someone else's creation without at the very least even asking.

rotund cypress
#

"Hey, can I change this line right here to do this so I can have fun with it for 5 minutes?"

#

rofl

tough abyss
#

NOTE: all player will be able to use Zeus (in case you're planning on using the above in MP).

open vigil
#

And then someone who was playing on said mission likes it, makes a few edits themselves, then the next thing you know it's on SW.

rotund cypress
#

But he said he was only using it himself? ๐Ÿค”

open vigil
#

It's this attitude of "I don't need to ask permission" that has led to the recent wave of bans.

rotund cypress
#

Its not that, people should defo ask for permission

manic sigil
#

^ as I said, intentional or not. The topic is a bit moot at this point, however - I have posted a comment on his SW page asking his opinion on edits.

rotund cypress
#

But changing something that you are only gonna use locally?

tough abyss
#

I don't see the problem with alter content as long as you're using privately.

rotund cypress
#

^^

tough abyss
#

I've done it, and I'll continue to. Hasn't caused any trouble to original creators or me as of right now.

rotund cypress
#

How will people know that someone has changed it? If he is the only one using it?

tough abyss
#

^

manic sigil
#

Its a content creator thing, additionally as FM said, if I played with someone they get a copy, and may be less scrupulous about content rights.

rotund cypress
#

Of course, but then its not locally anymore which makes it another thing

#

And then if he is a cunt and shares it, he will deal with the problems

tough abyss
#

Also, what "recent wave of bans" if I may ask? (@open vigil)

rotund cypress
#

And he already have a copy which he can download from WS

tough abyss
#

Look at groups who alter community made mods for their own purposes.

open vigil
#

@tough abyss those groups you just mentioned were the target of some of those bans

tough abyss
#

Tens, if not hundreds of folks get their hands on modified scripts and configs. Yet noone get hurt.

#

@open vigil 23rd Tactical Realism Unit, 1st Recon Battalion, DBH Server, RAEF?

#

TBH what they is pretty dumb.

#

Plenty of other ways to distribue content to a certain group of people with anyone external knowing.

#

You can even set SW mods to "friends only".

rotund cypress
#

It will still be seen by Game Publishers?

#

So Dwarden could still ban people?

tough abyss
#

IIRC workshop moderators will be able to see it.

still forum
#

But why would he if no one Reports that. And I'm not sure if Dwarden even cares about private items with only a handful of subscribers

tough abyss
#

^

open vigil
#

If it's reported, it gets dealt with. Anyways, back to Scripting ^, or you may continue in #ip_rights_violations

viral lance
#

How do I prevent an object I'm towing from an attachto script to not have any collision damage around players? I've tried DisableCollisionWith.. but no luck

rancid ruin
#

think attachTo'd stuff will never have collision

turbid thunder
#

That's wrong, otherwise how could you kill people in ACE3 with the tyres you carry?

#

Collision is still on even when using attachTo

#

@viral lance You probably made a mistake with the locality. How'd you execute the command?

rancid ruin
#

was that just an arma 2 limitation? i coulda sworn..

jovial ivy
#

So, is drawIcon3D local via on a player? Or is it server wide?

rancid ruin
#

local

turbid thunder
#

I dunno what it was like in Arma 2 tbh, but atleast in Arma 3, the collision is still there and it is pretty deadly aswell

#

Just saying, that whole tyre carrying in ACE3, you can wreck vehicles aswell as people with it

jovial ivy
#

Alright just making sure. Gotta be sure before I use it.

jovial ivy
#

Is there any good way to reduce loading time into a editor mission(on like tanoa)?

little eagle
#

make your the postInit scripts unscheduled I guess.

vague hull
#

Am I dreaming?

jade abyss
#

Noice!

dusk sage
#

@pliant stream ^

#

Pretty sure you mentioned this the other day ๐Ÿ˜› I said we needed it!

pliant stream
#

interesting

#

are pv ehs not in wide usage in a3 anymore?

#

does everyone just use this RE thing

jade abyss
#

i do ยฏ_(ใƒ„)_/ยฏ

#

PV(C/S) was never my favorite, tbh.

pliant stream
#

i only deal in a2 personally, and added _owner to server side pv ehs

dusk sage
#

PVEHs are still massively used, shame they didn't include it with this, ๐Ÿคž though

jade abyss
#

How do you know?

tough abyss
#

is there an opportunity to get a pitch/bank change for a camera into camcommit without a big workaround?^^

queen cargo
#

That command allows for some fancy things

little eagle
#

Nothing that couldn't be done before aside from security stuff I guess.

leaden summit
#

I'm trying to come up with a MP compatible way to link any player in the mission (who has a particular backpack) to the BIS support requestor, and then unlink them if they take that pack off. Pretty much a no frills JTAC script. Does anyone know of a script that already does this?

little eagle
#

I don't think there is. I opened the module function and it execVMs a script that requires the exact module to be present (classname hardcoded) and that script starts a fsm. Really convoluted stuff. Probably not possible to disable it without rewriting it all.

tough abyss
#

hi guys, a question. I have a server of altis life, i want make a script when if you are in range of an PVP action, if start show a popup message whit "you want start the action?" if selected yes the script force the first person and count the position in 2 km on the center of action if you go out, go out of the action and can use third person camera and report "this guy left the action zone"... is something possible to make?

still forum
#

Yes it's possible. Almost everything is possible in Arma

warm gorge
#

Is there any benefit using uiSleep over sleep? In my case for loops on a server mission file

jade abyss
#

huehuehue

#

uisleep = systemtime

still forum
#

If your game is paused sleep will also pause. uiSleep will continue running

#

Not correct! ๐Ÿ˜„

jade abyss
#

๐Ÿ˜„

#

and i quote again "uiSleep is basically using the system time (uiTime more specifically) and not simulation time."

still forum
#

true. ^^

jade abyss
#

(ignore us both from now on, thats a topic we often have)

warm gorge
#

Sorry to sound ignorant, but im a bit insure what the difference is between system time and simulation time

still forum
#

diag_tickTime is systemTime.. Well.. Offset from game start in systemTime

#

Simulation can be paused

jade abyss
#

uisleep won't get interupted

#

e.g. when you tab out -> It still fires

still forum
#

For example when you tab out in singleplayer. uiTime will continue running but simulation time will be stopped

warm gorge
#

So using it on a server mission file over sleep wouldnt make a difference? Because theres no UI on the server

still forum
#

also when you change the Speed in Singleplayer. Simulation time will accelerate uiTime won't

jade abyss
#

Also: When your FPS is low (below 10) -> sleep can be delayed, uisleep don't

#

Its just the name, you can use it on the server aswell

still forum
#

IMO generally uiSleep is the better choice.. But in most situations it doesn't matter

jade abyss
#

โ˜

#

And thats the point, where we agree again and you can start listening to us again

#

๐Ÿ˜„

still forum
#

If you really want to go OCD then you can add these 2 characters to all your Sleeps. But I wouldn't waste that time (Hah! time! sleep! ๐Ÿ˜„ )

warm gorge
#

So if uiSleep doesnt get affected by low FPS, remember this is on the server in my case, wouldnt that be the better option in most cases?

#

Cause im having a lot of issues with the sleep command as its not accurate when the server fps is low

jade abyss
#

I would use uisleep on the Server. Thats the first thing that goes down in FPS (CPS), so its pretty important that the sleeptimer is started precisely

#

Yes.

#

There is also the possibility of using diag_TickTime and waitUntil, but... nah

warm gorge
#

Is waitUntil similar at all? Is it less efficient or whatever

jade abyss
#
_EndTime = diag_tickTime + (5*60); //5min
waitUntil{diag_TickTime > _EndTime; uisleep 1};```
#

added a sleep as an example

still forum
#

waitUntil checks it's condition every frame or every few frames. And if it's true it continues the script

jade abyss
#

waitUntil would fire up each frame (wich is most of the time not needed)

still forum
#

It is less efficient than (ui)sleep because it has to execute the script in it's condition. (ui)sleep is evaluated engine side without calling scripts

jade abyss
#

even an uisleep 0.01 can make a difference

#

Exactly.

#

So: Stick with uisleep, its enough

still forum
#

So if you just want to sleep. And have fps problems anyway. Stick(Not the wooden one) with (ui)sleep

jade abyss
#

already wrote that, too slooowww

#

oh myyyy, dat edit

warm gorge
#

Ah yep I see, I think ill swap over to uiSleep. A bit confused on the difference between systemTime and simulationTime tho

jade abyss
#

yepyep

warm gorge
#

Just to confirm, is uiSleep affected by server FPS at all? Or just a lot less than sleep

jade abyss
#

no

#

not affected.

still forum
#

TBH Sleep also shouldn't be affected by FPS... What's probably happening is that the script scheduler is so filled up that it doesn't execute the sleeping script right after the sleep ran out...

jade abyss
#

naaahhh, that sleep can be delayed is okay.

#

Cycletime is reduced, so time goes on "slower"

still forum
#

If the scheduler is the problem uiSleep won't make it better.

jade abyss
#

Wait, its not "okay", but its correct