#arma3_scripting

1 messages ยท Page 355 of 1

peak plover
#

why not a function with posinit:```sqf
player remoteExec ["nig_fnc_getPhone",2];

ivory vector
#

and thats only 3 lines.

peak plover
#

You can also just a list of phone numbers and UIDs , then grab the phone number attached to player uid from that

#

public variables are jip compat.

little eagle
#

Hold onto your butts.

#
// server preInit
commy_initPlayerServer = {
    params ["_unit"];

    diag_log _unit;
    // do stuff
};

{
    waitUntil {!isNull player};
    [player] remoteExec ["commy_initPlayerServer", 2];
} remoteExec ["BIS_fnc_call", 0, true];
peak plover
#

๐Ÿ‘Œ

#

commy with the left hook ๐Ÿ˜„

ivory vector
#

would'nt that be in the mission.pbo though ?

little eagle
#

Mission or addon, doesn't matter.

ivory vector
#

Ill take a look, im just trying to hide a many of my functions as i can serverside.

peak plover
#

That's actually very brilliant.

#

Why hide functions?

#

Mission file size?

ivory vector
#

people connect to my server just to take stuff.

peak plover
#

take stuff

#

So they are removing scripts from your server?

ivory vector
#

using them on their own servers...

peak plover
#

I'd hate it if someone came to my server and took my scripts so I could never use them again

subtle ore
#

Missions are cached

peak plover
#

They are not stealing, they are copying...

ivory vector
#

how many servers have a phone calling system?

subtle ore
#

Just extract it and bam

ivory vector
#

Vanilla. ?

peak plover
#

Does not sound like something that's hard to do...

ivory vector
#

Only 1 server that I know of.

peak plover
#

Create a custom channel

little eagle
#

I posted the simplest solution and challenge everyone to come up with something better than that โ˜•

peak plover
#

only enable when calling for the two players etc.

ivory vector
#

People dont like putting in effort though @peak plover

peak plover
#

Still does not change the fact that no one is losing anything. But somone is gaining something

#

Copying scripts etc. is a win-win

ivory vector
#

A win for the person copying, a lose for the person trying to make something different.

peak plover
#

You are not losing anything

#

Your ability to make something different is going to remain unhinged

ivory vector
#

If I make a system, not many servers have, I dont want just anyone to be able to come and take it ? that would make it, not so differnt ?

little eagle
#
// server preInit
commy_initPlayerServer = {
    params ["_unit"];

    diag_log _unit;
    // do stuff
};

{
    if (!hasInterface) exitWith {};
    waitUntil {!isNull player};
    [player] remoteExecCall ["commy_initPlayerServer", 2];
} remoteExec ["BIS_fnc_call", 0, true];

There. Now it doesn't loop forever on a dedicated server or headless client.

peak plover
#

Unless code is directly removed your computer, you are not losing anything is all...

However... your trying to attract more players with features that only you have, so if someone else had that feature, they would have no reason to play on your server?

atomic vault
#

What scripting language does arma use?

little eagle
#

sqf

atomic vault
#

Thx ๐Ÿ˜„

little eagle
#

That was simple ^_^'

peak plover
#

๐Ÿ™ƒ

#

Not every day that you can help out the US Navy... ๐Ÿ˜ฎ

ionic orchid
#

why are cameras so difficult to work with ๐Ÿ˜ญ

#

going from pos->pos with camCommit X interpolates differently from how target->target does

peak plover
#

Last I used that, it was trial and error

#

terrible ๐Ÿ˜ฆ

ionic orchid
#

trying to use setPos & setVectorDir now, but that is a whole different can of delicious worms

waxen tide
#

has anyone managed to come up with a script that opens the player's map and centers it?

#

i found a solution online but its like 4 pages of code and looks like death and hell.

ionic orchid
#

centers it on the player?

waxen tide
#

no, on the map center.

#

for this

ionic orchid
#
[] spawn {
    disableSerialization;

    openMap true;
    waitUntil { visibleMap };

    private _mapDisp = findDisplay 12;
    private _mapCtrl = _mapDisp displayCtrl 51;    

    _mapCtrl ctrlMapAnimAdd [0.0, 1.0, [worldSize / 2, worldSize / 2, 0] ];
    ctrlMapAnimCommit _mapCtrl;
};
#

like that?

waxen tide
#

will try

#

works perfectly, thanks!

#

i was using the map center before, and it is off by quite a bit

ionic orchid
#

no problemo

#

you're doing stuff I was messing with over the last few weeks

peak plover
#

Is there a way to add item to inventory, even if it's full?

sage token
#

yo

peak plover
#

Yo, wadup dog

sage token
#

is there any more animations hiden in arma they dont want us to know about? im a bit tired of using the same ones for ai

#

example

#

[this,"REPAIR_VEH_STAND","ASIS"] call BIS_fnc_ambientAnim;

peak plover
#

There's an animation button in the debug console

#

ctrl+D in editor

#

Allows you to browse animations

waxen tide
#

also there is a command animationNames

#

it returns all animations

#

yeah animations viewer only works for infantry, with animationNames you get them for vehicles, too

ionic orchid
#

actually this is a good time to ask if anyone knows of somewhere I can read about how to put my own NPC animations into arma

#

for when I get around to that

#

as in, making the animations, not just putting them in a pbo

#

nm I found some blender stuff after 10 seconds of searching, ignore me

slender halo
ionic orchid
#

thank you, sir

dark swallow
#

Does any know how to make a whitelisting Script for Altis Life?

#

or where I could find it

rancid ruin
#

pretty sure forza has one you could use

subtle ore
#

hahaha ๐Ÿ˜‚

runic surge
#

Is this correct?

 _action = param [2, true, [true];
robust hollow
#

missing a ] on the end

runic surge
#

I noticed that earlier

#

I just don't know if this is how bool is supposed to be used with param

robust hollow
#

works the same as any other data type. So in that case if _this select 2 is not a bool or is nil it will set to true

runic surge
#

I am making a basic resource counting script, and I have an issue with the last line. I have all the parameters in line, so that is good, but I get "Generic Error in Expression" on the last line of code:

_amount = param [0, 0, [0]];
_caller = param [1, objNull, [objNull]];
_action = param [2, true, [true]];

_sideName = format ["%1_balance", side _caller];

_sideName = _sideName + _amount;
#

there are three balance variables, WEST_balance, EAST_balance, and GUER_balance

robust hollow
#

is the _sideName text a variable?

runic surge
#

yes

robust hollow
#

in which namespace?

runic surge
#

shouldn't it be the same as WEST_balance = WEST_balance + 50

#

if the amount is 50 and the player is blufor

robust hollow
#

_sideName is a string not the variable you are trying to edit

#

so you're doing "WEST_balance" = "WEST_balance" + 50.

missionNameSpace setVariable [_sideName,(missionNameSpace getvariable [_sideName,0]) + _amount];```
That doesnt look very attractive but thats what you're trying to do (assuming the variable is in mns)
runic surge
#

I'm not entirely sure what missionNameSpace even means to be honest

#

also I need it to actually hint the value for that variable so a string won't work

robust hollow
#

unless you have specified the variable to save elsewhere, its most likely in the missionNameSpace.
missionNameSpace getvariable [_sideName,0] will return the variable value (or 0 if the variable doesnt exist)

waxen tide
#

any variable you define in your mission is in the missionnamespace

runic surge
#

ok that makes sense

#

I have them all defined on init at the beginning as 0

robust hollow
#

yea, so itl be in the mns. does that line up there ^ work for u?

runic surge
#

@robust hollow Thank you sir, it appears to work as intended

// Add or subtract resources to given side
// nul = [amount,caller,action] call BTH_fnc_HandleBalance.sqf;
// amount: Number - Amount of resources to be added or removed from faction's balance.
// caller: Object - Variable name of the unit that activates the function.
// action: Bool   - Whether to add to, or subtract from the faction's balance.  true = add, false = subtract

_amount = param [0, 0, [0]];
_caller = param [1, objNull, [objNull]];
_action = param [2, true, [true]];

_sideName = format ["%1_balance", side _caller];


missionNameSpace setVariable [_sideName,(missionNameSpace getVariable [_sideName,0]) + _amount];

_total = missionNameSpace getvariable [_sideName,0];
hint str _total;

I just need to make it determine whether to add or subtract, which should work with a simple if then statement if I understand correctly

robust hollow
runic surge
#

what does private do exactly

#

also I didn't know that params was that easy

robust hollow
runic surge
#

I thought that was point of local variables in the first place

robust hollow
#

they are local to the scope they are made in and any scope below it unless you private in those lower scopes.

runic surge
#

Actually nvm I think I get it

robust hollow
#

thats how i understand it anyway.

runic surge
#

That makes sense

#

thanks for the help

#

hopefully this will work in multiplayer

#

don't see why it wouldn't

waxen tide
#
waitUntil {["set_up_fob"] call BIS_fnc_taskExists};
#

that seems fine to me?

#
 6:21:10 Error in expression <askVar = _taskID call bis_fnc_taskVar;

!isnil {(missionNamespace getVariable (f>
 6:21:10   Error position: <!isnil {(missionNamespace getVariable (f>
 6:21:10   Error Generic error in expression
 6:21:10 File A3\functions_f\Tasks\fn_taskExists.sqf [BIS_fnc_taskExists], line 45
runic surge
#
params [
    ['_amount',0,[0]],
    ['_object',"CargoNet_01_box_F",[""]],
    ['_objPos', [0,0,0],[[]]]
];

_resObj = _object createVehicle _objPos;
_resObj setPos _objPos;
_resObj addAction ["<t color='#FF52C0'>Collect Resources</t>", {_caller = (_this select 1); nul = [_amount,_caller,true] call BTH_fnc_HandleBalance;}, 0, 10, true, false];

This doesn't successfully pass the _amount number into the add action.
How can I do that?

robust hollow
#

you cant use local variables in addactions like that

#

try this sqf _resObj addAction ["<t color='#FF52C0'>Collect Resources</t>", {(_this select 3) call BTH_fnc_HandleBalance;}, [_amount,_caller,true], 10, true, false];

runic surge
#

I don't think that would work

#

_caller isn't defined

robust hollow
#

oh yea, oops

#
_resObj addAction ["<t color='#FF52C0'>Collect Resources</t>", {[_this select 3,_this select 1,true] call BTH_fnc_HandleBalance;}, _amount, 10, true, false];```
runic surge
#

also how are the parameters outside of the calling?

#

wait I get it

#

it is the array from the actual addaction

robust hollow
#

_this variable is: [target, caller, ID, arguments]

runic surge
#

well shit

#

that worked

#

thanks again

robust hollow
#

๐Ÿ‘

runic surge
#

that syntax seems very confusing

#

I can't tell which are addAction parameters and which are for calling the function

#

I can only tell the title and the script

#

wait nvm _amount takes the place of arguments

#

it says generic error in expression

#

but it appears to work just fine

#

I just forgot to quit the preview entirely to reload the function

#

all is good

runic surge
#

I have a minor issue where it is possible to harvest a resource object twice (just barely possible) if you're fast enough
Is there anything I can do to remedy this issue? Here is what the addAction command currently looks like:

_resObj addAction ["<t color='#FF52C0'>Collect Resources</t>", {removeAllActions (_this select 0); deleteVehicle (_this select 0); [_this select 3,_this select 1,true] call BTH_fnc_HandleBalance;}, _amount, 10, true, true, "", "", 3];
robust hollow
#

you could set a cooldown in BTH_fnc_HandleBalance so even if it is called more than once it should exit after the first time without doing anything

#

that would cause an issue if you use that fnc very frequently tho.

runic surge
#

that would definitely be an issue

#

It needs to be able to be called that quickly just not from the same object

#

tried disabling player simulation for a tiny bit of time

#

that doesn't disable the action menu though

#

I could do something with the addaction condition

runic surge
#

Not sure if this actually helped, but it seems removing the actions and object first, then having a tiny delay before calling the function, makes the first commands activate faster. I can't seem to double the resource gain no matter how fast I try using this addAction:

_resObj addAction ["<t color='#FF52C0'>Collect Resources</t>", {removeAllActions (_this select 0); deleteVehicle (_this select 0); sleep 0.05; [_this select 3,_this select 1,true] call BTH_fnc_HandleBalance;}, _amount, 10, true, true, "", "", 3];

@robust hollow do you think maybe the function was somehow slowing it down?

robust hollow
#

i doubt it. the actions are removed and then the obj deleted (which to me seems a bit pointless doing both) before the fnc is called.

runic surge
#

That is what I was thinking but it actually seems to make a difference

#

might be something else though

little eagle
#

It makes no difference. Removing the actions right before deleting the object is pointless.

waxen tide
#

hey commy2

#

do you have a clue why i'm breaking BIS_fnc_taskExists?

cyan pewter
#

Can someone explain to me how setVectorDirAndUp works?

#

Please, I've been punching in numbers for an hour

tough abyss
cyan pewter
#

Except the variables don't actually equate to numbers. I can't figure out for the life of me how to turn something more than 90 degrees

#

*equate to angles

tough abyss
#

the numbers of the vectors just need to add up to 1

#

for example [0.5,0.5,0] in the dir vector should be a 45 degree rotation

cyan pewter
#

But [1,0,0] is 90 degrees, and you can't make it any higher than that

tough abyss
#

?

#

you either point towards a vector or away from it

#

-1

ionic orchid
#

I was playing around with that last night trying to point a camera where I wanted it to go

#
        _camera setPosASL _pos;
        _camera setVectorDirAndUp [
            _pos vectorFromTo _target,
            [0, 0, 1]
        ];
#

use a unit vector

cyan pewter
#

When i put in negative numbers it flipped upside down

tough abyss
#

both vectors need to result in a 90 degree angle

#

@cyan pewter thats what it is supposed to do

#

and someone recently posted a snipped to keep those two vector arrays in this 90 degree angle

cyan pewter
#

So I've got a turret attached to the back of an aircraft, but the default heading is facing towards the cargo bay, so i need to spin it around 180 degrees on the z axis

tough abyss
#

[0,-1,0]

#

for the dir vector

cyan pewter
#

The chart has that position listed as y

#

And that didn't do anything

tough abyss
#

yea thats correct

#

post your full params array

#

also keep in mind that attachTo and setVectorDirAndUp are bugged

cyan pewter
#

Oh, i got it!

#

Yeah, i know you can break the game doing this

little eagle
#

the numbers of the vectors just need to add up to 1
for example [0.5,0.5,0]
That vector adds up to sqrt(2)/2 though.

indigo snow
#

I didnt think magnitude actually matters for the setDir vector set of commands

#

Guess the engine doesnt internally normalizes them to be sure then?

little eagle
#

Idk, just felt like pointing out the wonky math.

indigo snow
#

Yea wasnt aimed at you in particular

peak plover
#

2017/09/12, 14:20:37 "Failed to load plugins\loadout\loadouts\nato.sqf"
2017/09/12, 14:22:05 "loadout_fnc_cargo"
2017/09/12, 14:22:05 "beforeFile"
2017/09/12, 14:22:05 "Failed to load plugins\loadout\loadouts\csat.sqf"
still forum
#

because the file is in a clientside only mod

peak plover
#

private _factionFile = format ["plugins\loadout\loadouts\%1.sqf",_faction];

if !(_factionFile call mission_fnc_checkFile) exitWith {
    (format ['Failed to load %1',_factionFile]) call debug_fnc_log;
};

// load the file
call compile preprocessFileLineNumbers _factionFile;
#

File is inside the mission

#

it loads correctly on the client

still forum
#

what does checkFile do

peak plover
#

private ["_ctrl", "_fileExists"];
disableSerialization;
_ctrl = findDisplay 0 ctrlCreate ["RscHTML", -1];
_ctrl htmlLoad _this;
_fileExists = ctrlHTMLLoaded _ctrl;
ctrlDelete _ctrl;
_fileExists
#

ohhh

#

LMAO

#

st00ped me D

#

eks dededede

still forum
#

I heard that this method doesn't work anymore? @little eagle Or something else was wrong with that

indigo snow
#

We still use it

#

So unless last update borked it and i didnt notice it still works

still forum
#

Dunno exactly what it was. But there was something..

little eagle
#

@tough abyss I can't remember such a thing.

#

@still forum htlmLoad to check if a file exists? Works fine, but you need a machine with interface. No controls on a dedicated server machine, so no htmlLoad available there.

#

One thing to keep in mind about vehicle init is, that you can't use setVariable pubic. It will not synch the value.

#

The same might be true for setObjectTextureGlobal

#

Has nothing to do with the frame. It would work fine in the same frame in a scope that is executed after the init event.

peak plover
#

When is display 46 created?

still forum
#

@peak plover There you have your answer why it doesn't work on Server

peak plover
#

yeah thanks

little eagle
#

Depends on if editor, multiplayer, preview, restart, loaded game.

#

etc etc

peak plover
#

mp?

little eagle
#

After preInit, before postInit, no idea if the objects exist yet.

peak plover
#

I'm getting ```sqf
Error Undefined variable in expression: ace_spectator_fnc_updatesides

#

Need to find a way to wait until the unit is initialized...

#

actually...

#

I got a way...

still forum
#

just execute your code during postInit. Everything should be done then

peak plover
#

I'll just hide the unit until sleep 0.1;
then unhide after he is either put into spec or not

#

that one is during postinit dedmen

little eagle
#

Why would ace_spectator_fnc_updatesides be undefined ๐Ÿค”

peak plover
#

not initialized yet?

still forum
#

Functions are initialized in preInit/preStart

#

They definetly are initialized at init/postInit

peak plover
#

ace does not use functions library

still forum
#

yeah.. and?

little eagle
#

Should be defined.

peak plover
#

for some reaosn when my guy initializes, it's not :"(

still forum
#

I'm calling cookie fraud

peak plover
#

Anyway I don't need to do that anyway

#

Cuz i just realized

#

player unit is created before anyway

#

I was trying to avoid the behavior of player appearing for like half a second when connecting and then being set dead and disappearing

#

I need to hideobjectglobal then run scripts and unhide

astral tendon
#

i deleted a group with a variable name and when i bild another one i cant put the same old name, how do i find that group with the variable?

tough abyss
#

If you are using addons, just make up an addon similar to how Exile does it.
The inital player model is VirtualMan_F

#

@peak plover ^^ its basically an invisible player character

little eagle
#

That is exactly what VirtualMan_F was made for.

long trail
#

So you mod him so his scope is 2, then place him in the editor as playable and then selectplayer to someone else after player joins?

astral tendon
#

Nevermind, i fixed it by restarting the editor

little eagle
#

Should already be placable. You don't really need a mod for this.

long trail
#

I can only see B_soldier_vr_f as placeable in editor - checked virtualMan_f and scope is 2 and side is 7

#

sorry I meant scope is 1

little eagle
#

Pff, edit the mission.sqm

long trail
#

Ah, ok - thx for the tip

#

I've done that before to switch sides, but haven't thought to try and change classes for non-editor classes

little eagle
#

^^

queen cargo
#

just wondering right now

#

is + deep copying arrays?

#
_arr1 = [1,2,3];
_arr2 = [_arr1];
_arr3 = + _arr2;
_arr1 set [3, 4];
//What is now the value of _arr3```
little eagle
#

This question again.

queen cargo
#

reimplementing SQF, solves questions nobody asked before

little eagle
#
[] + _arr
+ _arr

Iirc, one of these ^ is deep copy, the other is not.

queen cargo
#

you sure?

little eagle
#

iirc

subtle ore
#

๐Ÿฟ ๐Ÿณ

queen cargo
#

one here who quickly could check?

#

got no arma on my laptop

little eagle
#
private _array1 = [1,2,3]; 
private _array2 = [_array1]; 
private _array3 = + _array2; 
_array1 set [2, 4];
_array3

[1,2,3]

#
private _array1 = [1,2,3]; 
private _array2 = [_array1]; 
private _array3 = [] + _array2; 
_array1 set [2, 4];
_array3

[1,2,4]

queen cargo
#

ok ... so my testcase is wrong ๐Ÿ™ˆ

little eagle
#

Conclusion, unary + is deep copy, binary [] + is not.

queen cargo
#

nope
invalid test case
expectation would be output of [[1,2,3]]

little eagle
#

Yeah, sorry

#

It's
[[1,2,3]]
and
[[1,2,4]]

queen cargo
#

kk

#

ty

long trail
#

@commy - I get this: [[1,2,3]]

still forum
#

binary + is just append. It appends the existing objects to the other array.
Unary + is a real deep copy

long trail
#

Ah ok nvm

little eagle
#

If you get 1,2,3; then you did use unary + to copy and not binary [] +.

queen cargo
#

is the unary + accepting any value?

#

or only arrays?

little eagle
#

NUMBER, ARRAY, STRING

#

NaN

queen cargo
#

NaN is accepted here? still wondering where it actually ever gets outputted ...

little eagle
#
_indeterminate = log -1; + _indeterminate isEqualTo _indeterminate

true

#
_indeterminate = log -1; (- _indeterminate) isEqualTo _indeterminate

hmm, also true, despite it showing QNAN for the first and -IND for the second.

queen cargo
#

typeName is the interesting part

#

as NaN is an actual type in SQF

little eagle
#
typeName log -1
#

"NaN"

#

I want a language with complex numbers and quaternions.

still forum
#

#Intercept

little eagle
#

You'd think those would be useful in a 3d game.

hidden field
#

@little eagle well some matrix stuff would make me happy <.<

little eagle
#
L_ind = log -1;
L_qnan_p = + L_ind;
L_qnan_m = - L_ind;
[L_ind, L_qnan_p, L_qnan_m]
#

[-1.#IND,-1.#IND,1.#QNAN]

#

๐Ÿค”

#
L_ind = log -1;
L_qnan = - L_ind;
L_inf = 1E40;
L_inf_m = - L_inf;
[L_ind, L_qnan, L_inf, L_inf_m]

[-1.#IND,1.#QNAN,1.#INF,-1.#INF]
Any more of these?

#
[L_ind, L_qnan, L_inf, L_inf_m] find L_inf_m

0
Strange.

hidden field
#

@little eagle looks like the math "error codes" are treated like one

indigo snow
#

theyre all NaN right? just different kinds of NaN

little eagle
#

All NaN

#

They are treated equally by the isEqualTo/in logic.

#

But stringyfied they are different

queen cargo
#

nothing i need to bother about in the SQF-VM i think ..

#

or does anybody sees any use for that form of stringification?

hidden field
#

@queen cargo debuging maybe

queen cargo
#

how does this be useful for debugging?

hidden field
#

@queen cargo all of these are error codes ๐Ÿ˜‰

#

sorta

#

#ind should be illegale operation, #inf should be an overflow and #qnan looks to be used once you do some additional computation with a NaN value, correct me if im wrong ^^"

little eagle
#

minus qnan is ind again.

hidden field
#

@little eagle okay O.o

dim owl
little eagle
#

No.

subtle ore
#

Yep keep using forza cars

hidden field
#

you could do it via background pictures but not by shaping the button itself

dim owl
#

but how have they done it in my screenshot ?

subtle ore
#

๐Ÿค” Ever thought of actually opening the mission file up?

dim owl
#

that is from a video :/ just saw it.

#

i think somehow it must be possible ๐Ÿ˜„

still forum
#

@dim owl Probably same as ACE does it.. Or the good old commy rose.

little eagle
#

I though there was a PR somewhere with the code.

#

but how have they done it in my screenshot ?
Not with gui buttons.

still forum
#

Actually.. The screenshot looks exactly like that....

little eagle
#

But with math.

#

MouseMoving and MouseButtonDown eventhandler where you highlight the "buttons" yourself.

#

And calculate over which button the cursor is yourself.

dim owl
#

but when you hover about a "button" it gets orange. how this happens ? like just this one piece changes its background

hidden field
#

@dim owl they change the background pic of that area

#

what you see is mostly background pictures

little eagle
#

@dim owl MouseMoving eventhandler most likely recalculating every time which "button" the cursor is over.

#

Those are not buttons. Buttons can only be rectangular. But you can make pictures with alpha that appear to have a different shape. Then you can't make them buttons though, because that would make them clickable in the transparent edges.

dim owl
#

oh okay. so i just add every piece from the circle as picture ?

little eagle
#

Yes. Or maybe it's always the same circle with different parts highlighted. Who knows.

tame portal
#

Or make it a square setup and save yourself some time :P

dim owl
#

okay thanks. i will try to do it myself ๐Ÿ˜„

#

xD

little eagle
#

Waidmannsheil.

dim owl
#

lol ๐Ÿ˜‚

tame portal
#

@little eagle I feel offended

little eagle
#

Good. That means I did something right.

spice kayak
#

Hey all o/

tame portal
#

I want a seperate channel for commy.

still forum
#

@tame portal You a waidmann?

spice kayak
#

#ComeForCommy?

tame portal
#

@still forum You're not?

#

#LeaveCauseCommy

little eagle
#

Discussion about anything related to Script creation
Good.
and usage within game ...
Shit.

still forum
#

#CumForCommy! @spice kayak

spice kayak
#

dam rite bb

still forum
#

I am spending too much time on FT...

little eagle
#

#arma3_scripting_commy
Discussion about anything related to Script creation and NO usage within game

spice kayak
#

FetishTube?

tough abyss
#

@dim owl i think the BF2 comrose for example only calculated the direction from the screencenter to the invisible cursor to select the right button and was actually not a button to be clicked directly by the cursor

#

and imho every other comrose interaction is shit

tame portal
#

That's a good solution

#

Unless you have other buttons floating around on your screen

#

@little eagle People want to be spoon-fed or else you look like a jerk!

#

Scripting is still my favorite channel. It's like it's own world within this Discord

little eagle
#

Needs more rants and infighting.

tame portal
#

I know, occasionally you come here to witness the funniest thing of the day

spice kayak
#

Even though my problem isn't technically scripting, I figured you guys would know the answer anyway. I have a global variable, which I know has the value of 1, yet my trigger, set to activate when this number is set to 1, doesn't activate. This is the condition code for it.
if ((missionNameSpace getVariable "vVariableHere") == 1)

#

in the debug console, vVariableHere is equal to 1, and triggerActivated tTrigger is false.

tame portal
#

Doesnt the condition code has to return true or false?

spice kayak
#

I didn't think it did. I've used ot to equal numbers before.

little eagle
#

You used if though.

#

if reports the IF type and not a boolean.

spice kayak
#

Oh, you're right, must return boolean.

queen cargo
#

IF returns an IF type which is not accepted in triggers

tame portal
#

So only
(missionnamespace getvariable ["vVariableHere", 0]) == 1

little eagle
#

lgtm

tame portal
#

lgtm?

spice kayak
#

lgtm?

little eagle
#

looks

#

good

#

to

#

me

spice kayak
#

Oh, right. Sorry.

#

Also, Optixs, what is the ,0] for? Default value?

tame portal
#

Interner slang, pfff

#

Yes

spice kayak
#

Ah, all good, just thought I'd check.

tame portal
#

Better than running into tons of rpt entries because the variable exploded or something

#

I want to tag emoticons aswell.

spice kayak
#

I always thought you could use IF in the condition boxes of those things. My whole lazy world has been changed :(

tame portal
#

Well, inside the if and else scope you can return something, but in your example you would only return true or false anyway so you might aswell just put the condition there

#

_hello = if (condition) then {True} else {False};

_hello = condition;

spice kayak
#

Yeah, makes sense. I'm thinking this is taking longer than the condition of presence check anyway, which wouldn't work out.

tame portal
#

Oh boy 16:40 time to buy some chicken nuggets at Lidl

#

1 KG or 2 KG?

spice kayak
#

Wait, since when did Shift+Enter work in the arma editor?!

#

2KG nuggies boi.

tame portal
#

You're god damn right.

#

I dont know, never noticed shift enter to be honest

spice kayak
#

When writing in the init box, I hit enter while holding shift and it went to a new line.

#

I tried Shift Tab, only to be greeted with the steam overlay - disappointing :(

tame portal
#

The revolution, it has begun

spice kayak
#

`using that boolean code you sent before, that should technically work within the condition of presence field, wouldn't it? Considering the variable is being defined before that should happen, you'd think so.

tame portal
#

Yes

blissful fractal
#

Hey ๐Ÿ˜ƒ So I really want to understand what Param is (https://community.bistudio.com/wiki/param) . Fx in this sample:
_vehicle = param [3,ObjNull,[ObjNull]];

if (isNull _vehicle) exitWith {systemChat "Error! Null Vehicle"};
if !(alive _vehicle) exitWith {systemChat "Error! Dead Vehicle"};
if (player distance2D _vehicle > 7) exitWith {systemChat "Error! Too Far Away"};

spice kayak
#

Yeah, it doesn't. Odd.

little eagle
#
[1,2] call {
    params ["_num1", "_num2"];

    _num1 + _num2 //3
};

???

peak plover
#

anyone know if uniform arguments are global?

little eagle
#

Yes. They are.

peak plover
#

thanks

little eagle
#

Or rather, it is.

tame portal
#

@blissful fractal Parameters to a script are accessed with the _this variable. Most of the times, _this is an array holding an amount of parameters because you want to pass more than one parameter to the script. In this case instead of manually doing _this select 0; _this select 1; and so on you can use param which you just give the index to get the parameter from _this (in the default syntax) and additionally you can do filtering such as which datatype is allowed and specify a default value if the passed parameter is not of the correct data type or not defined

#

I dont like typing on my phone

spice kayak
#

Yeah, it seems like condition of presence seems to be calculated before the variable is set, which is odd.

#

At least, in my testing.

blissful fractal
#

@tame portal Thanks.

spice kayak
#

IS there any way to get a list of objects or units synced to a trigger?

#

I thought thisList might work when it has no area, but it doesn't seem to be the case.

little eagle
#
synchronizedObjects trigger1
spice kayak
#

Oh, that was simple enough, thanks!

#

Would that return an array?

#

Ah, yeah - great, thanks!

abstract sigil
#

is anyone else having issues with the group system in arma not working correctly, sometimes?

#

we are observing a case where people within the same group all of a sudden cannot hear each other via VON

#

we boiled it down to inspect how the clients think what members are in their own group and it seems like the client sometimes think certain group members are dead AI

#

say Bob and Jamie are in the same group. everythings fine. but then all of a sudden Bob cant hear jamie anymore. they also dont see each others chat

#

the netIds of their "group player" are still the same. the server thinks both players are in the same group.

#

and suddenly Bob got replaced by a dead AI unit from Jamies standpoint

#

isPlayer Bob returns false for Jamie

#

damage Bob returns 1 for Jamie

#

alive Bob returns false for Jamie

#

and name Bob returns a random unit name for Jamie, for example Petridis (probably a CfgWorlds name)

#

this seems to happen randomly, but can be reproduced on a daily basis

#

even gets worse with more people in a group

#

eg. Bob, Jamie and Frank are in a group

#

Bob can hear Jamie and Frank

#

Jamie can hear Frank, but not Bob

#

and Bob can only her Jamie

#

i see the Task Force Radio guys are experincing the same issue since August 2016 already

#

it even got more absurd sometimes. It actually happened to me that my own player object was not in my own group. So basically "player in (units group player)" returned false. wtf?

little eagle
cloud thunder
#

I've noticed several small glitches with BIS's group manager ever since I switched over to it about a year or more ago. They are so random and I don't know how to reproduce though It is occouring less now since last update it seams. Never had any group issues before when I was using aeroson's group manager. And this is without mods on a dedicated server that never has chains (desync). Though I believe it may sometime have to do with a local clients not so good connection..

abstract sigil
#

@little eagle i take it you want me to report?

still forum
#

@abstract sigil What issues are the TFAR guys experiencing?

abstract sigil
#

this looks very similar to me. isPlayer anotherPlayer returns false

still forum
#

Didn't get any report about that since one year.

abstract sigil
#

for debugging, i made this output

#
diag_log format ["name player = %1", name player];
diag_log format ["group player = %1", group player];
diag_log "Outputting group:";

{
    diag_log "---";
    diag_log format ["_x = %1", _x];
    diag_log format ["name _x = %1", name _x];
    diag_log format ["netId _x = %1", netId _x];
    diag_log format ["isPlayer _x = %1", isPlayer _x];
    diag_log format ["alive _x = %1", alive _x];
    diag_log format ["damage _x = %1", damage _x];
    diag_log format ["typeOf _x = %1", typeOf _x];
}
forEach (units (group player));

diag_log "END DEBUG OUTPUT";```
#

which basically just dumps all the info about your own group to the RPT

#

for my own player it returns the expected result in that case:

#
18:54:52 "name _x = Not Eichi"
18:54:52 "netId _x = 2:25258"
18:54:52 "isPlayer _x = true"
18:54:52 "alive _x = true"
18:54:52 "damage _x = 0"
18:54:52 "typeOf _x = Exile_Unit_Player"```
#

for another dude in the same group standing right in front of me doing the QE dance it returned this

#
18:54:52 "name _x = Petridis"
18:54:52 "netId _x = 2:24663"
18:54:52 "isPlayer _x = false"
18:54:52 "alive _x = false"
18:54:52 "damage _x = 1"
18:54:52 "typeOf _x = Exile_Unit_Player"```
still forum
#

Can you reproduce that in vanilla without Exile?

#

That guy in the TFAR issue didn't answer for a year now.. So I guess the problem is not there anymore

abstract sigil
#

have not tried to reproduce it in vanilla, no

#

from my experience, even if you send a mission with a reproduction of the issue to BI, it still will not be addressed

still forum
#

Might just be an Exile problem. I'd say it's using selectPlayer and moving the player into a non-player unit

#

Well.. sure... You could also do nothing. Then you have no chance of ever getting a fix

#

Uhm... wait... the players owner is 2 and the other players owner is also 2? That doesn't make sense

#

Sounds to me like the units are owned by the Server. Which.. Confirms my exile problem thought

abstract sigil
#

2 is the server afaik

still forum
#

Meaning the unit is owned by the server and not by the player.

abstract sigil
#

but thats okay, as they got spawned server side

#

its been like that for 2.5 years

still forum
#

If you check isPlayer player on your mates machine.. It probably returns true. And on his machine isPlayer on you returns false

#

Because the unit really is not a player. It's an AI that is just currently possessed/controlled by the player

abstract sigil
#

the thing is, if you look at your matey and inspect "isPlayer cursorObject" then it returns true

#

if you check what is in the "units group player", then it returns false for the same guy

still forum
#

str the player object. And compare if they are the same

abstract sigil
#

they are

#

"R The Wookie Tribe:2"

#

notice how it doesnt say the player name in there

#

usually it says R Group:MemberID (Name)

still forum
#

wut? Usually it contains the adress of the object.. I thought

#

isEqualTo cursorTarget and the group unit?

#

Wait

#

Your logs you posted above are completly correct

#

your mate is dead 18:54:52 "damage _x = 1" thus he is not a player

abstract sigil
#

which is not true! ๐Ÿ˜ƒ

still forum
#

You probably have his dead body in your group but not him

abstract sigil
#

he is alive, stands right in front of me and alive as one could be

#

and even more odd, the issue seems to sometimes even affect yourself

#

every unit has to be part of a group, all the time. thats how arma works

little eagle
#

units lists corpses in your group when your avatar doesn't know that they died.

abstract sigil
#

so one could say (player in (units (group player)) is always true, right?

still forum
#

As I said. The unit in your group is dead. The one infront of you is apparently not in your group

#

yes

abstract sigil
#

its not!

#

๐Ÿค”

#

like, something has to broken to shit if your client thinks your player unit is not in the group of your player unit

still forum
#

except if you are in spectator. There you are not in a group and you are also not in that not group that you are in

abstract sigil
#

^ and exactly this reminded me of why i have retired a year ago ๐Ÿ˜„

still forum
#

Maybe exile moves you into grpNull.. If that's possible

astral tendon
#

{isNull gunner _x} count [car1, car2, car3, car4, heli1, Heli2] <= (4 - count playableUnits) max 0
this is a coop set up, i wanna this trigger to work even with less than 4 player alive.

little eagle
#

Probably just selectPlayer.

abstract sigil
#

yeah, that was my guess, too

little eagle
#

Also avoid selecting player into editor placed units in multiplayer, as it may, on occasion, lead to some undefined behaviour. If you need to selectPlayer into another unit, consider creatingUnit dynamically.

abstract sigil
#

but its done only once in a life time: when they spawn

still forum
#

It sounds alot like a Exile problem. So....

#

Stop using Exile. And Battleye.. And Arma...

little eagle
#

Never heard of this.

abstract sigil
#

i have done that, dedmen ๐Ÿ˜„

little eagle
#

Well, as I said, units lists corpses if your avatar doesn't know they're dead.

abstract sigil
#

that is correct

#

one last thing: it seems to happen randomly. sometimes it does not happen for days. during other sessions it happens very couple of seconds

#

and it does not affect all clients, only a handful

#

so if you have a group of 10, it works fine for 8 of them, while 2 might have problems

#

its just super random ๐Ÿ˜„

still forum
#

Sounds like Battleye ๐Ÿ˜„

abstract sigil
#

battleye is a good anti cheat

#

probably the best on the market as we speak

#

but lets put it this way: if you have a multiplayer environment where clients have authority, then even an anti cheat software cannot fix that

astral tendon
#

{isNull gunner _x} count [car1, car2, car3, car4, heli1, Heli2] <= (4 - count playableUnits) max 0
this is a coop set up, i wanna this trigger to work even with less than 4 player alive.

#

any idea?

little eagle
#
{isNull gunner _x} count [car1, car2, car3, car4, heli1, Heli2] <= (4 - ({alive _x} count playableUnits)) max 0
astral tendon
#

thanks man

peak plover
#
File C:\Users\Administrator\Documents\Arma 3 - Other Profiles\nigel\missions\test3.VR\mission.sqm, line 0: '/missionSQM.raP': '' encountered instead of '='
#

Anyone ever seen this?

indigo snow
#

nah. your mission is binarized? did you binarize it yourself or by editor?

peak plover
#

editr

indigo snow
#

seems some encoding error

peak plover
#

encoding error, so i screwd something up

little eagle
#

DId you manually edit the file?

peak plover
#

mission.sqm ? nah

little eagle
#

Hmm.

peak plover
#

// mission for refference
class missionSQM {
    #include "mission.sqm"
};
#

Probably this

#

yup...

#

completly usless line ๐Ÿ˜„

still forum
#

you can't include a binarized file

peak plover
#

Yeh

#

is there a way to binarize files and use them?

little eagle
#

Binarize it with a proper tool and copy over the *.sqm

still forum
#

"You can't use binarized files"
"is there a way to use binarized files?"
Uhm....

ionic orchid
#

if only linearConversion worked on vectors

#

or if there was an explicit vectorLerp

still forum
#

#Intercept.
Sadly.... That is quite often the answer for missing commands...

subtle ore
#

Does intercept have a wiki to get you going or do you need previous c++ knowledge?

simple solstice
#

@still forum has anyone used Intercept to create their mission or server?

ionic orchid
#

i'll probably port my server sqf to intercept when it's done

still forum
#

You need a little of c++ knowledge. We have a Wiki on Github with a tutorial on how to get started. If you know how SQF syntax works then you already know the basics
You can't really use it for missions. Because Intercept needs to be a Mod.
Senfo built some Zombie AI for a Server using Intercept.

#

If you don't have C++ knowledge though I wouldn't recommend moving everything to Intercept..
But you can move some commands to Intercept using RSQF (self-registered SQF commands).
For example vectorLerp or vectorLinearConversion

ionic orchid
#

i'm not planning to have a client-side mod for what I'm doing - luckily all the heavy lifting is done on the server so Intercept is perfect to offload the processing to

subtle ore
#

Sweet. Thanks for the info Dedmen.

ionic orchid
#

but for the moment, I'm just playing with sqf to see if I can get the behaviour I need with what's there w/o mods

still forum
#

Basic setup https://github.com/intercept/intercept/wiki/Windows-Environment-Setup-and-Sample-Client-Installation
Self-registered commands: https://github.com/intercept/intercept/wiki/Registered-Functions
Basically all just copy-paste and modify to your liking
I hope that code is still correct ^^ There were a lot of changes recently. And the RSQF thingy will change
userFunctionWrapper won't stay because I am forced to use snake_case but I am too lazy to do that while coding so.. I sometimes forget to change it

tulip cloud
#

What is more efficient, checking if player is inside an area trigger or checking player distance from an object?

little eagle
#

Debug console performance test button

peak plover
#

Checking if player inside an area is cheaper

#

distanceSqr is cheaper than distance 'tho

peak plover
#

I've gotta start binarizing my mission.sqm for extra kilobytes and faster loading times ๐Ÿ˜ƒ

little eagle
#

Oh no, MULTIPLE kilobytes?!

peak plover
#

200 to 100

#

I assume ~25-50% size decrease

little eagle
#

That's all the white space from those
nested
classes.

peak plover
#

shid, really?

little eagle
#

What else?

peak plover
#

I wonder how much would I save if I just replace all ; with , and remove all new lines and all useless spaces

#

make everrything into 1 line

astral tendon
#

so, i am using unit capture to a helicopter to land, but once the record end he start to hover, any work around this?

ionic orchid
#

anyone worked much with ppEffects and cameras?

simple solstice
#

@ionic orchid what do you need?

ionic orchid
#

having some trouble with motion blur on a fresh camera - it seems to be enabled by default and I'm not sure if I can turn it off

waxen tide
#

I have a question about addAction locality

#

If i put an addAction in the init of an object, it works just fine in multiplayer

#

but when i attach it to a unit with a script, it doesn't

#

i don't understand why that is exactly

#
private ["_unit"];
_unit = (_this select 0);
diag_log format ["addScript_Unit.sqf - _unit: %1", _unit];
_unit addAction ["Start conversation", "storylines\town_patrol\conversation.sqf"];
#

thats the script attaching the addaction to the unit
the diag_log output looks like this: 16:42:44 "addScript_Unit.sqf - _unit: C Bravo 3-6:1"
I'm executing the script on the server only

ionic orchid
#

oh man, it might actually just be my monitor

#

printscreen screenshot has no blur, my eyes definitely see it

indigo snow
#

addAction has local effects

#

gotta add it on all clients

waxen tide
#

i figured that, but why does it work in the init then? is the object init executed everywhere automatically?

indigo snow
#

yes

waxen tide
#

ahhhh.

indigo snow
#

thats why scripts in init boxes are dangerous

#

you end up with an ammobox with 600 magazines

waxen tide
#

well i've got a map object that has a voting screen attached that lets each player send a vote to the server - works fine so far

indigo snow
#

yea for stuff like this its fine because it has local effects

#

global effects = bad tho

waxen tide
#

yeah i'm decently aware just fucked up this time

little eagle
#
if (isServer) then {

};
waxen tide
#

well i have the server spawn civilians for players to question. so i need to attach a dialogue script to each civilian

#

the script is set up to handle being ran in parallel by multiple players

#

but i'm struggeling with attaching it to each civ with addAction

#

i guess a case for remotexec? but that command seems suspicious to me.

simple solstice
#

where do you have it?

waxen tide
#

where do i have it? so far the server handles all of that

simple solstice
#

the addiction script

waxen tide
#

well the server glues it to each unit it spawns and so obviously the only one who could use the action is the server itself i guess.

simple solstice
#

if you have it only on the server, you need to remoteexec it with JIP

indigo snow
#

also params ["_unit"]; but thats really separate

little eagle
#

Well.

simple solstice
#

I can't really understand where the script is and when does it fire

waxen tide
#

i'm utilizing that "civilian occupation system" so thats leftover code from that.

#

by this point i ripped half of it out anyways. ๐Ÿ˜

simple solstice
#

If you add action to the spawned NPC by the server, then yes you need to remoteexec it to target -2 with JIP

waxen tide
#

have to prettify that once it workss.

little eagle
#

Mods?

waxen tide
#

no mods.

#

commy2 you modaholic.

little eagle
#

remoteExec

waxen tide
#

do i need to whitelist the function if i send it server-> client ?

little eagle
#

The solution could depend on your setup, so I had to ask.

simple solstice
#

uhh if you have cfgremoteexec yes

#

or battleye remoteexec.txt

little eagle
#

You can white list it in a way that only the server can execute it, no?

waxen tide
#

well i will use mods, but i want to keep the mission in a state where it works fine with vanilla since i think it really makes testing much easier if you don't load a 20gb modpack each time.

simple solstice
#

you can select who can be the target commy

waxen tide
simple solstice
#

if it doesn't exist

#

you don't need to whitelist

little eagle
#

They're all white listed by default. Which kinda makes this a blacklist and not a whitelist ๐Ÿค”

waxen tide
#

i bet thats HORRIBLE from some security standpoint

simple solstice
#

uhm thats why you just use battleye filters

little eagle
#

Eh, this is a game for milsim with closed servers.

waxen tide
#

not closed, public

#

but the amount of malicious people showing up is quite close to 0

#

expecially with large modpacks and signature verification

#

also having a non-persistent mission, a simple restart removes most headaches

simple solstice
#

write a function that will get the parameters for addaction

#

create remoteexec.txt

#

in the battleye folder

peak plover
#

Btw I got a consipracy theory about why battleye is breaking up... I think all the PUBG is overloading their servers and they can't handle it all...

simple solstice
#

add ```
//regex
7 "" !=my_fnc

waxen tide
#

by "their servers" you mean the 386 in the basement of that one guy who pretends to be a company?

simple solstice
#

will kick every other remotexec

waxen tide
#

thanks Katekarin i'll write that down.

simple solstice
#

if you are interested about the security of your server

#

check out the battleye filters

#

and whitelist only what you use

waxen tide
#

yeah well i uploaded ~100 versions of my mission to my testserver to day to get my overly complex mission start theater working in MP with JIP

#

its on my plate but not an urgent issue

peak plover
#

overly complex mission start theater
Sounds cool

#

Like an intro camera ?

simple solstice
#

well it's pretty easy to do. log first, whitelist the ones which happen when only you play

waxen tide
#

I guess i'll record a video for you guys.

simple solstice
#

and then if that aren't using intercept they are limited to what you decided.

#

you can even restrict which vehicle players can spawn, if any. it's powerful

#

but.. that also means you as an administrator can't do anything more than players which is uhh

#

I'll end the off-topic here

peak plover
waxen tide
#

well the mission concept includes a lot of freedom for players actually, with only semi-limited equipment and vehicle spawn. the idea is partially for players to limit themselves by the idea of realistic equipment. also, the more shit you bring, the more shit the enemy shows up with.

#

also i have included some mission elements with supply issues if you're too wasteful

#

but the mission is not designed to handle abusive people.

#

i've seen it work on other servers, if you attract the right crowd.

simple solstice
#

good luck!

waxen tide
#

i'll need it.

#

the google docs look very ambitious at this point.

little eagle
#

You don't necessarily need remoteExec. You can build it with a PVEH too.

waxen tide
#

philosophical question: if you rotate your screen in windows, why does it rotate the "do you want to keep this setting" box as well

simple solstice
#

public variable, remoteexec. same security concerns, and remoteexec is just easier

little eagle
#

The security concern of adding the civilian interaction to an illegal object?

#

Oh noes, be scared.

simple solstice
#

I mean.. if the commands are enabled/disabled

#

but both propably are on

little eagle
#

if you rotate your screen in windows, why does it rotate the "do you want to keep this setting" box as well
So you can read it upright to confirm your change?

waxen tide
#

yeah, imagine some hacker would attach my silly dialogue script to a rusty barrel. THE HORRORS.

little eagle
#

Why do mirrors flip left and right, but not up and down?

waxen tide
#

but commy2, you don't rotate your screen physically BEFORE you open the menu to rotate it?

#

cause your eyes ain't onto of each other

slender halo
#

you have to quickly rotate it within the 10 seconds

waxen tide
#

how evil. i bet microsoft secretly plots to kill people by crushing them with their own hectically rotated monitors. illuminati confirmed.

little eagle
#

but commy2, you don't rotate your screen physically BEFORE you open the menu to rotate it?
There is no reason to rotate it, when it already is upright.

waxen tide
#

well. i bought this new monitor? and it is a good one. but the stand is horrible. luckily VESA is a semi standard so i can use the awesome 10kg heavy stand from my old monitor thats like cast iron, right? turns out the cables are totally in the way on the new monitor, so i had to mount it upside down. so what, just rotate the picture in the driver, right? now guess what, if i record a video ingame for you guys, its upside down.

little eagle
#

lol

waxen tide
#

soooo i left the old stand on the monitor which doesn't use vesa, but some proprietary bullshit, so my monitor has two stands. one on the top, one on the bottom. good luck rotating that monster in 10 seconds.

#

am i hulk or what.

peak plover
#

why do mirrors flip
They don't

#

I've never understood that one

#

I wonder if you do a negative width on a control, will it flip?

little eagle
#

Look in the mirror. Raise your left hand. Dude raises his right hand. And you tell me they don't flip sides.

peak plover
#

raise my left hand The hand that's to my left rises on the mirror...

#

Both left

north vortex
#

Acculty he raises his left hand

little eagle
#

/o\

peak plover
#

For the mirror guy it's both right hands

waxen tide
#

there is mirrors that don't mirror your image. they look like large boxes that contain multiple mirrors. if you look into those, you won't immediately recognize yourself. it looks a bit odd. because you're used to seeing the asymetrical parts of your face the wrong way around.

peak plover
#

Whoa

#

I want that

waxen tide
#

they had those on the world expo in 2000

#

was quite fancy

#

17 years ago ...

north vortex
#

There is a see trough mirror its called a window look it up

waxen tide
#

i'm old ๐Ÿ˜ฑ

austere granite
#

see trough mirror its called a window look it up is that those things behind curtains?

north vortex
#

Ya that you open up and you can see things

#

Playing on my 4k window ultra settings

waxen tide
#

yeah i hear about those. good graphics but the gameplay sucks and the story is the lamest stuff i've ever seen

peak plover
north vortex
#

No

#

Its a window

#

Like the kind you can see through

peak plover
#

๐Ÿค”

north vortex
#

Just replace with a 4k tv and call it your 4k window and play games off of it

peak plover
#

What's the syntax for window? Is the window local to the client or the host?

waxen tide
#

I've spend the last days on making this MP and JIP proof

#

which was excessively more work than anticipated

waxen tide
#

how can i define a param that only accepts type object?

robust hollow
#

param [0,objnull,[objnull]]?

waxen tide
#

why don't these things occure to me. thanks!

runic surge
#

Anyone know why this addAction doesn't appear?
initPlayerLocal.sqf

waitUntil{!isNull player && player == player};
waitUntil{!isNil "WEST_balance" && !isNil "EAST_balance" && !isNil "GUER_balance"};

sleep 0.25;
hintSilent "Initializing Player...";

nul = [player] call BTH_fnc_PlayerSetupLocal;

BTH_fnc_PlayerSetupLocal:

_pLocal = param [0, objNull, [objNull]];

private _pSide = format ["%1_balance", side _pLocal];
private _total = missionNameSpace getVariable [_pSide,0];

_pLocal addAction ["<t color='#FF992C'>Check Balance</t>", {hintSilent str (_this select 3)}, "test", 1, true, true, "", "", 1];
#

I can see the hint btw

#

so I know it isn't stuck on the waitUntil conditions

waxen tide
#

any script errors in the logs?

subtle ore
#

Condition has to return true inside a string, and cannot be blank iirc

waxen tide
#

oh yea. you can actually just throw out all these parameters you set on addAction since they're default values and optional anyways.

runic surge
#

no errors and the blank condition hasn't been an issue before

#

how do you skip optional poarameters

waxen tide
#

just don't put them in.

#

if they're the last ones, that is.

runic surge
#

how does it know which optional parameter you changed though

#

if you just don't put some in that appear before them

waxen tide
#

ah you want radius 1. well i would try to change condition to "true" first since that's the default and you're overwriting it with ""

#

also addAction is local and will only be executed where you call it so make sure you call it from player context script.

#

which you seem to do. ๐Ÿค

runic surge
#

still doesnt appear

#
_pLocal addAction ["<t color='#FF992C'>Check Balance</t>", {hint "Test";}];

This works

#

so it is an issue with the addAction syntax I am using or something

#

maybe the radius is just too small

#

It was the radius

#

I feel like an object being within a one meter radius of itself shouldn't be impossible

#

but what do I know

#

Is there a way to wait until a function is done executing?

peak plover
#

Yeah

runic surge
#

like scriptDone for scripts?

peak plover
#
myScript = [] spawn myFnc;
waitUntil {scriptDone myScript};
runic surge
#

Shouldn't I use call?

#

instead of spawn?

#

The function is part of CfgFunctions

peak plover
#

in that case

#

call means that it will run the function and won't continute until it's done

#
_var =  1;
call myFncTakes10Sec;
_var = 2;
runic surge
#

so it has basically the same effect as using scriptDone?

#

just having code after the function is called?

peak plover
#

so when you run that in 10 seconds it _var will be 2

#

Yeah

#

if you want 3 functions to run in a certain order

#
call fnc1;
call fnc2;
call fnc3;
#

if u use functions library

runic surge
#
sleep 0.5;
hintSilent "Initializing Player...";

private _setup = [player] call BTH_fnc_PlayerSetupLocal;

sleep 0.5;
hintSilent "Player Initialized";

So the second hint won't activate until 0.5 seconds after BTH_fcn_PlayerSetupLocal is done running

peak plover
#

yeah

#

But bear in mind

#

If you have a spawn in your function

#

you goof'd

runic surge
#

well, I don't

#

so I should be fine for now

#

hopefully I won't mess anything up for at least 10 minutes

#

does "onPlayerRespawn.sqf" activate when the respawn type "Switch to Side member" is used?

#

just tested it, and it indeed does work

peak plover
#

Don't know

#

I'd assume yes

#

onKilled runs when unit dies

#

onRespawn should run when units is re-created, I assume switch to side memeber will be a part at this

runic surge
#

I have the same init function in the "onPlayerRespawn.sqf" script and it runs once a unit is selected and switched to

peak plover
#

I assume that respawn types are jsut functions added to onRespawn event, so it should fire, yeah

subtle ore
#

@waxen tide my bad, wasn't sure on the condition

little eagle
#
waitUntil{!isNull player && player == player};

Delete that part after AND. Don't want to see that nonsense in my channel.

waxen tide
#

I think my brain has an incredible advanced algorithm for detecting wrong code and then ignoring it.

runic surge
#

@little eagle Don't know why that was there tbh

#

also afaik they both do the same thing so it is pointless

waxen tide
#

well player should always be identical to player so you're comparing the same thing to each other. which is redundant

#

you might as well write "true == true"

runic surge
#

I can't quite remember where I got that

#

must have been from some old framework

waxen tide
#

hands a โ˜• to Rylan

little eagle
#
player == player

would report false if the player was null. But then the isNull check does the same already and is clearer code.

waxen tide
#

wow. magic.

#

but shouldn't null == null equal to true?

little eagle
#
true == true

just errors, because comparing booleans is too advanced for this program.

waxen tide
#

..........

little eagle
#

but shouldn't null == null equal to true?
Maybe, but it doesn't, which in a way makes sense too

runic surge
#

is the status of nothing the same as nothing?

little eagle
#

Is underdetermined the same as underdetermined?

waxen tide
#

this channel feels like SQF is the secret language dedmen and commy2 made up to pass naughty messages in school.

little eagle
#

Because it is.

waxen tide
#

all those missed out on genital jokes

little eagle
#

You can compare boolean like this:

true isEqualTo true // true

And even null equals null!

objNull isEqualTo objNull // true
runic surge
#
if (!alive yourmom) then {hint "fucked your mom last night lol xd"} else {hint "lol ur moms dead"};
#

it all makes sense now

little eagle
#

Vile.

runic surge
#

I have the hints backwards oops

little eagle
runic surge
#

I'm not clever enough for that

waxen tide
#

You know whenever you post code that does anything, commy2 actually creates a new clever function to do it and adds it to the wiki just so he can smartass. i bet they push silent updates to arma all the time for that.

#

#conspiracy

runic surge
#

@waxen tide cease your investigation immediately

little eagle
#

Filter out ammo boxes and other unwanted stuff from the vehicles array.

vehicles select {!(fullCrew [_x, "", true] isEqualTo [])}
sage flume
#

I'm not getting any errors when I try to load the mission,....but, the progress bar goes all the way across but then nothing happens. Here is what I touched since my last successful mission load,...gut says it's in here but I can't even get an error to show on the rpt.
_weapArr = [["uns_thompson",["uns_thompsonmag_30","uns_thompsonmag_30_T"]],["uns_uzi",["uns_32Rnd_uzi"]],["uns_sten",["uns_stenmag"]]];

if ((dayTime < 4.5) or (dayTime > 19)) then
{
_weapArr = [["uns_uzi",["uns_32Rnd_uzi"]]];
};

if (RYD_JR_BetterGear) then
{
_weapArr = [["uns_xm177e1s",["uns_30Rnd_556x45_Stanag","uns_30Rnd_556x45_Stanag_T"]],["uns_M16",["uns_30Rnd_556x45_Stanag_T","uns_30Rnd_556x45_Stanag_T"]],["uns_sten",["uns_stenmag_T","uns_stenmag","uns_stenmag"]]];
};

if (RYD_JR_Difficulty == 3) then
{
_weapArr = [["uns_38spec",["uns_38specmag","uns_38specmag"]],["uns_357m",["uns_357mag",uns_357mag","uns_357mag"]],["uns_coltcmdr",["uns_coltcmdrmag","uns_coltcmdrmag","uns_coltcmdrmag"]],["uns_uzif",["uns_32Rnd_uzi"]]];

};
#

gut says it in teh array but ???

waxen tide
#

@sage flume

#

["uns_357m",["uns_357mag",uns_357mag","uns_357mag"]],

#

this array element is broken

#

uns_357mag"

#

missing a " in the beginning

#

you should think about getting an editor with good SQF syntax highlight and a linter. sublime 3 works for me, some people use visual studio code or atom (from github)

#

my sublime draw a nice ? at that line and highlighted the bracket going all "wtf you want from me, asdfghj?"

#
_weapArr = [
            ["uns_thompson",["uns_thompsonmag_30","uns_thompsonmag_30_T"]],
            ["uns_uzi",["uns_32Rnd_uzi"]],
            ["uns_sten",["uns_stenmag"]]
            ];


if ((dayTime < 4.5) or (dayTime > 19)) then
    {
    _weapArr = [["uns_uzi",["uns_32Rnd_uzi"]]];
    };

if (RYD_JR_BetterGear) then
    {
    _weapArr = [
                ["uns_xm177e1s",["uns_30Rnd_556x45_Stanag","uns_30Rnd_556x45_Stanag_T"]],
                ["uns_M16",["uns_30Rnd_556x45_Stanag_T","uns_30Rnd_556x45_Stanag_T"]],
                ["uns_sten",["uns_stenmag_T","uns_stenmag","uns_stenmag"]]
                ];
    };

if (RYD_JR_Difficulty == 3) then
    {
    _weapArr = [
                ["uns_38spec",["uns_38specmag","uns_38specmag"]],
                ["uns_357m",["uns_357mag","uns_357mag","uns_357mag"]],
                ["uns_coltcmdr",["uns_coltcmdrmag","uns_coltcmdrmag","uns_coltcmdrmag"]],
                ["uns_uzif",["uns_32Rnd_uzi"]
                ];
    };
#
_weapArr = [
            ["uns_thompson",["uns_thompsonmag_30","uns_thompsonmag_30_T"]],
            ["uns_uzi",["uns_32Rnd_uzi"]],
            ["uns_sten",["uns_stenmag"]]
            ];


if ((dayTime < 4.5) or (dayTime > 19)) then
    {
    _weapArr = [["uns_uzi",["uns_32Rnd_uzi"]]];
    };

if (RYD_JR_BetterGear) then
    {
    _weapArr = [
                ["uns_xm177e1s",["uns_30Rnd_556x45_Stanag","uns_30Rnd_556x45_Stanag_T"]],
                ["uns_M16",["uns_30Rnd_556x45_Stanag_T","uns_30Rnd_556x45_Stanag_T"]],
                ["uns_sten",["uns_stenmag_T","uns_stenmag","uns_stenmag"]]
                ];
    };

if (RYD_JR_Difficulty == 3) then
    {
    _weapArr = [
                ["uns_38spec",["uns_38specmag","uns_38specmag"]],
                ["uns_357m",["uns_357mag",uns_357mag","uns_357mag"]],
                ["uns_coltcmdr",["uns_coltcmdrmag","uns_coltcmdrmag","uns_coltcmdrmag"]],
                ["uns_uzif",["uns_32Rnd_uzi"]
                ];
    };
#

see syntax highlight makes your error super obvious

sage flume
#

I really appreciate that. Still learning and I use Notepad++ but I think I need to learn other ways as well

waxen tide
#

check that out. seems to be quite recent, too so likely its up to date and works nicely

sage flume
#

๐Ÿ‘Œ

waxen tide
#

I'm still learning everyday as well, but using good tools makes a big difference for me.

subtle ore
#

disregard last

runic surge
#
if (side (_this select 1)) != (side (_this select 3)) exitWith {hint "You cannot control a unit that isn't on your side!";};

I don't know why this doesn't work

#

I feel like I am missing something obvious here

subtle ore
#

(side (_this select 1)) you end the if before it can account for the rest of the statement

runic surge
#
if ((side _this select 1) != (side _this select 3)) exitWith {hint "You cannot control a unit that isn't on your side!";}
subtle ore
#

Sure, try that out

runic surge
#

It says the same thing it did before

subtle ore
#

what's the error?

runic surge
#

type array, expected something else

subtle ore
#

you may need to close those brackets up, as it may stop at side _this .

if( side (_this select 1) != side (_this select 3)) exitWith {hint "You cannot control a unit that isn't on your side!";};
#

@hasty violet I would say it's easier to grab too. Just find the player and it's associated variable and use it. Compared to filtering the array and finding the associated unit

runic surge
#

I fixed it

subtle ore
#

How so?

runic surge
#
if ((side (_this select 1)) != (side (_this select 3))) exitWith {hint "You cannot control a unit that isn't on your side!";}
#

I thought that is what I had in the original

#

I must have been missing a ) or ( somewhere

subtle ore
#

Nope, but you could do with a little less brackets.

runic surge
#

shouldn't the entire if condition be close in?

#

and (_this select #) also needs to be closed in

subtle ore
#

not necessarily. Because side (_this select 1) will return the same thing as (side (_this select 1))

runic surge
#

ah

cedar kindle
#

@runic surge I'd suggest adding a params above the if somewhere so you don't have to do the select inside the statement. and also checking the group's side, it's safer

params ["", "_unit", "", "_guy"];
if (side group _unit != side group _guy) then
runic surge
#

it is inside an addAction

#

needs to be that way

cedar kindle
#

no. why you think that?

runic surge
#

because it is inside and addAction

#

@cedar kindle here is the full command

_soldier addAction ["<t color='#53BE5F'>Switch to Unit</t>", {if (side (_this select 1) != side (_this select 3)) exitWith {hint "You cannot control a unit that isn't on your side or dead!";}; removeAllActions (_this select 3); selectPlayer (_this select 3); nul = [(_this select 3)] call BTH_fnc_PlayerSetupLocal; removeAllActions (_this select 1); nul = [(_this select 1)] call BTH_fnc_UnitSetup}, _soldier, 1, false, true, "", "true", 4];
cedar kindle
#

yeah just use params

#

no reason to do select that many times

queen cargo
#

*hint* you can code just normal in code blocks

waxen tide
#

I need a bit of guidance. My mission scripts are growing a bit out of hand with more and more complex server<->client communication and various features i would like to switch on and off for debugging. So far i'm using whatever lends itself to trigger the next script in line. Is a task done? great, the next script can go do its thing. stuff like that. I lack structure, i lack a central place that gives me an overview of the mission state. I have a very complex story flowchart and lots of parallel things happening with various overlapping conditions and i don't want to dig this hole any deeper than i already have.

queen cargo
#
_soldier addAction [
    "<t color='#53BE5F'>Switch to Unit</t>",
    {
        if (side (_this select 1) != side (_this select 3)) exitWith {hint "You cannot control a unit that isn't on your side or dead!";}; 
        removeAllActions (_this select 3);
        selectPlayer (_this select 3);
        nul = [(_this select 3)] call BTH_fnc_PlayerSetupLocal;
        removeAllActions (_this select 1);
        nul = [(_this select 1)] call BTH_fnc_UnitSetup
    },
    _soldier,
    1,
    false,
    true,
    "",
    "true",
    4
];```
#

now i am happy

waxen tide
#

i need something robust that can universally handle whatever mission state i'm in with a lot of flexibility, with the ability to skip things, output debug info on demand, and some self-diagnostics in case something goes horribly wrong so my mission just doesn't entirely stall.

queen cargo
#

complex storyboard? different states in which your mission could be in?
check out FSM scripts

#

no idea why actual mission developers never use it ... state machines are great things especially for misions

#

with story flow etc.

waxen tide
#

i checked out FSM and considered it but so far i've nobody really seen using it which makes me very suspicious

queen cargo
#

no need to

#

most just simply do not use it

#

modders usually have no use for it

#

missions can benefit from it

#

or AI mods

#

but unless you do not have anything with different states, you have no need for a state machine

#

unless you lied with your story board etc.

#

you do have a need for states

#

thus you can put that story board into a state machine

#

transfer*

#

and youre done

#

FSM is actually quite easy to use too

#

nothing that complicated as long as you understood SQF

#

only that editor for FSM is ... nasty ...

#

ugly piece of s***

waxen tide
#

well i have someone who's tinkering out most of the storylines. because communicating this stuff is a pain in the rear, i found an online-collaboration-flowchart-tool and he went quite ballistic with it. story flow looks like this currently: https://i.imgur.com/zPub8Pg.png and probably you'll yell "FSM" at me for 10 minutes now.

#

i'm figuring most of what i need to do is just translate this straight to an FSM structure and then throw scripts in for each node

still forum
#

@peak plover less than with binarizing. Binarizing does all that and turns stuff like class from 5 bytes into 1.

waxen tide
#

what i liked about the FSM i looked at so far is the fact that you can pretty much just read it fine in an editor

#

not sure i would want to write it manually but i think i could.

queen cargo
#

use the editor
it is ugly as shit ... but it at least works

#

unless you make it crash

#

which can happen

#

so never forget to save

waxen tide
#

well i took a quick look at it and read a tutorial, doesn't seem to be that bad.

queen cargo
#

after youre done, execFSM is all you need to do

#

it rly isnt

#

also it does not shares performance with spawn

waxen tide
#

it has that win98 nostalgia going for it.

queen cargo
#

but got its own window of execution time

#

so, you might even get a little bit of performance out of that

#

anyways

#

im offline for now

waxen tide
#

okay. if it goes horribly wrong, i'll blame you.

still forum
#

also it does not shares performance with spawn
It does share the 3ms scheduler time. So... Not that true.. Also.. It has the same performance as spawn.. Same performance as any other script.

waxen tide
#

i mean worst case what does FSM do. check on a condition on each frame?

#

thats like one trigger, or one event handler, right?

still forum
#

yeah... kinda..

waxen tide
#

i don't quite understand the thing with global vars. i mean there is this one biki entry about using compilefinal and i kind of? get it, but it seems everyone is making at least a subtile effort of avoiding them altogether.

still forum
#

avoiding global variables? wut?

waxen tide
#

well so far i've avoided using them pretty much entirely.

#

maybe thats just me.

still forum
#

If you need them then you do.

waxen tide
#

well i've abused objects as namespace cause commy told me, i use task states to syncronize client/server side scripts, etc.

#

it seems a messy approach to me since its hard to track that centrally

#

sigh. i suck at this.

still forum
#

Take a ๐Ÿช and lean back a minute

#

then wipe all the cookie crumbs off and get a broom to keep the floor clean

waxen tide
#

i just realized don't have a perforated floor with an inbuild vaccum system. i felt like a savage for a second.

#

so an FSM can always only be in one state at a time

#

so if i want to have multiple things independently happen in parallel

#

i need some sort of master FSM that just checks conditions all the time and spawns sub-fsms i guess

#

somehow seems a bit silly to me

still forum
#

Yeah.. I don't think you can have parallel things in FSM.. But I never tried it

#

Maybe the CBA Statemachine can.. But probably also not..

waxen tide
#

i think fsm wouldn't really work out with multiple states.

#

it would add a whole new dimension of complexity

still forum
#

Btw. Scheduler time is 3ms normally. and 50ms(20 fps) in Loading screen. Might be worth to add that to BIKI. Whoever reworked the scheduled links on BIKI could do that.

waxen tide
#

isn't there someone to contact for wiki changes? or is there just a bunch of very busy devs who could edit the wiki but have no time to do it?

still forum
#

Everyone can edit wiki. Just like Wikipedia. By the community, for the community.

waxen tide
#

somehow i assumed the opposite by default.

still forum
#

Wiki registration is disabled to prevent spam. So you have to ask a Wiki Admin to create you an account

waxen tide
#

i don't feel competent enough to ask for that. but there is 2-3 pages which contain nothing more than the automatically created page from the functions config and i would have had 1-2 things to add to those when i found out how to properly use it i guess.

still forum
#

your choice. It's not that hard. And if you do something wrong somebody else will probably fix it ยฏ_(ใƒ„)_/ยฏ

#

Ask me and you'll have one in a couple minutes ๐Ÿ˜„ Don't you have an account? Could swear I saw your name on there

#

Don't see why they would be a loop. The AI loop runs through the next waypoint in the list when planning it's next move

#

I can tell you all the things about waypoints if you really want to know... But.. That takes so much of my time

#

AI's have a ordered list of waypoints. The next one on the top. They don't go through all waypoints after that. They only check the current next one every time they check.

#

If everyone can read out waypoints then everyone probably has them in memory. Meaning.. a 100 waypoints probably take up a couple KB of memory and nothing more

#

Adding them creates network traffic.. But.. That is negligible if you compare it to the AI's position updates that are sent anyway

waxen tide
#

i was actually surprised that my function that builds a database of map info generates ~1.5mb for altis

#

(i save it to the server profile) With everything being in the gigabytes these days i just assume every var i save is like bytes or kilobytes at most, but i guess it adds up.

#

so one of my issues is testing features separately. obviously i don't want to test the whole mission all the time, but just the feature i'm currently working on. issue with that is preconditions. a script that makes some AI do something won't work if that AI isn't spawned yet, etc etc. hence why i said a centralized approach for state management would be nice. but i don't see how FSM would provide that functionality. basically for that convenience i would only see the option to actually write some complex code just to debug things quickly and efficiently, and chances are i'll just end up debugging my debugging code. which seems silly.

atomic epoch
#
_agent = createAgent [typeOf player, position player, [], 0, "NONE"]; 
_agent setVehicleVarName "ai"; 
systemChat format ["%1", side ai]

Outputs "Side: 00000000023AFA50"

I'm curious if anyone has an explaination for " 00000000023AFA50"

still forum
#

It's the memory adress of that side.

atomic epoch
#

Hex, binary or something else?

still forum
#

Does that look like binary ๐Ÿ˜ฎ

atomic epoch
#

Im asking you, your the expert

graceful saddle
#

Its hex

still forum
#

binary can only be 0 and 1.

#

So it's obviously not binary.
decimal can only be 0-9. So it's obviously not decimal.. Only hex left

graceful saddle
#

To be fair, hex can be seen as a binary shorthand 8)

#

Then again so can decimals

#

Also an explanation codewise, I don't think the variable ai exists, try changing this line

systemChat format ["%1", side ai]

to

systemChat format ["%1", side _agent];
distant egret
#

Don't forget the extra "

graceful saddle
#

what are you talking about? 8)

still forum
little eagle
#

@atomic epoch
You discovered the string version of the SIDE type nil.

#

It's nil. No valid side, because vehicleVarNames don't assign global variables like the editor does when writing something in the name field.

#

ai is undefined

#

side ai is undefined

#

everything is undefined.

atomic epoch
#

Cool. Maybe someone will find it useful someday ๐Ÿค”

little eagle
#

If you incorporate this behavior into your scripts, then you deserve that an update breaks it.

#

00000000023AFA50 is a memory address where <side null> or something like it should've been.

still forum
#

Even restarting Arma changes that adress. Cuz ASLR

little eagle
#

ASLR?

still forum
#

Address space layout randomization

little eagle
#

Yee, googled it.

still forum
#

Arma is on a random Address (almost) everytime you start it

#

Meaning the memory offset is also different everytime.

little eagle
#

00000000023AFA50 could be an internal address pointing to the systems address.

still forum
#

It is an internal address. Pointing to where sideNull should be. Like you said

little eagle
#

Not sideNull, <side null> as in nil not null

kindred lichen
#

Anyway to get a Marker's grid ref?

#

Or any way to accurately change the results from a getPos call into the gridref displayed on the map?

subtle ore
#

@kindred lichen getMarkerPos

kindred lichen
#

That gives the world address, not the grid reff

#

Like, it gives distance from origin, not the 6 or whatever digit grid ref you'd see on a GPS or the map.

#

Trying to make it a little harder for players than just having a marker apear on the map. I'm trying to send players grid refs over sideChat.

distant egret
subtle ore
#

There you go, my bad. Did not know what you meant sorry

kindred lichen
#

thanks man

still forum
#

I just did a Intercept performance test with a real world example
Intercept code:

game_value redirectWrapNular() { //Intercept_loopTest
    types::auto_array<types::game_value> output;

    for (auto& unit : sqf::all_units()) {
        output.push_back(reinterpret_cast<game_data_object*>(unit.data.getRef())->get_position_matrix()._position);
    }

    return std::move(output);
}

game_value redirectWrapNularScript() {//Intercept_loopTestScript
    types::auto_array<types::game_value> output;

    for (auto& unit : sqf::all_units()) {
        output.push_back(sqf::get_pos(unit));
    }

    return std::move(output);
}

Results:
Function, time (diag_codePerformance), cycles
count allUnits -> 232
allUnits apply {getPosWorld _x}; 0.480077 ms 2083/10000
allUnits apply {getPos _x}; 0.619579 ms 1614/10000
Intercept_loopTest 0.229674 ms 4354/10000
Intercept_loopTestScript 0.398248 ms 2511/10000

Intercept_loopTest can also be multithreaded. So that could theoretically be 8x faster with a 8 core CPU.

halcyon crypt
#

I still don't get why diag_codePerformance doesn't just run the full 10000 cycles for all tests

#

anyway, neat stuff ๐Ÿ˜ƒ

subtle ore
#

I thought it did run 100,000 cycles...?

#

@still forum sweet. Looking very promising

still forum
#

I did expect more from the loopTest variant actually.. But.. Oh well. I won't try multithreading that because that would take too much time now. And it's not really worth it for 200 units

subtle ore
#

Still impressive

little eagle
#

I still don't get why diag_codePerformance doesn't just run the full 10000 cycles for all tests
So you don't have to wait while your machine freezes for 2 minutes?!

halcyon crypt
#

well then just lower the number of cycles ๐Ÿ˜›

indigo snow
#

i wonder if it internally checks the mean and sigma deviation values

#

and just stops when its 95% accurate enough

#

probably not

still forum
#

No. I think it has a time limit it will run.. Like.. a couple seconds

little eagle
#

It stops when the time is up.

indigo snow
#

seems to be ~1s

little eagle
#

It doesn't mention a standard deviation, so it probably doesn't record it.

#

Just the average time spend per iteration.

#

Ideally 10k if they're short enough.

chrome rain
#

anyone know of a script that will simulate a riot/uprising? thinking muslim country outside an embassy throwing rocks kinda style?

polar folio
#

i bet alive has it but soudns liek you are looking for a ready made independent plug and play script

chrome rain
#

well, havent been able to find anything in there really. But yes, a done script would be awesome!

polar folio
#

you should try make it yourself. more fun anyways. not sure if throwable stones are still in the game but should be possible to achieve relatively easy, if you ask the right questions here

subtle ore
#

There are throwable stones still in

polar folio
#

oh sweet!

#

good to know

subtle ore
#

Yeah, they are available as a throwable

peak plover
#

muslim countryside

Going after the religious, huh?

chrome rain
#

@peak plover well, you understood what i meant then, didnt ya ๐Ÿ˜‰

polar folio
#

burkal. do you already have civs spawning?

chrome rain
#

but, on the doing it myself, i would have no idea how to. only do small stuff in the init lines. beside from that im retarded