#arma3_scripting

1 messages · Page 428 of 1

still forum
#

@tough abyss Dude...

#

"I want to check if a unit is UAV"
"Here use unitIsUAV"
"No that's wrong. use shownUAVFeed"

tough abyss
#

Oh

still forum
#

Even just reading the command names already tells you

tough abyss
#

My bad

#

I misread he question lel

lusty canyon
#

thanks unitIsUAV works

little eagle
#

Haha.

lusty canyon
#

possible to modify the class HitpointsProtectionInfo armor/passthrough values of a vest/uniform/helm without touching the cfgs?

meager heart
#

you can try your magic skills

#

abra cadabra... etc

winter rose
#

Mod, or hit EventHandler

meager heart
exotic tinsel
#
this lockturret [[0],true]; 

what is the # for locking ghosthawk turrets? ive tried 0, 1, -1, and 2

young current
#

0,1

#

0,2

#

probably

meager heart
#

{_heli lockTurret [_x, true]} foreach (allTurrets _heli); also _heli lockDriver true;...

exotic tinsel
#

@meager heart once again you save the day

exotic tinsel
#

is there a way to prevent actionitems on scroll wheel from popping up on screen after you exit inventories?

young current
#

actionitems like what?

#

scroll menu should not open if you dont scroll

exotic tinsel
#

na i mean one of the items text appears in center of screen, like earplugs, when i exit and inventory

young current
#

so ace stuff

exotic tinsel
#

have to scroll, right click to get to go away

#

no ace

young current
#

earplugs are not vanilla tho so modded items?

exotic tinsel
#

yeah

young current
#

added with addaction?

exotic tinsel
#

yes

young current
#

not sure really. but maybe with this extra info someone does

#

remember to add details of your issue.

exotic tinsel
#

copy that, my bad. thx

meager heart
#

check wiki... you looking for "show window"

young current
#

👍

meager heart
#

hope that is correct name for it

exotic tinsel
#

yup showWindow thx mate

meager heart
#

np

fading burrow
#

anyone have a script for unlock vehicle with lost key? arma 2 dayz epoch

subtle ore
#

@fading burrow Cheating? You will find no one here to do that for you

fading burrow
#

cheating wtf? i need a script for my server to unlock vehicle on the map that have no key anymore

meager heart
#

more chances there

warm gorge
#

How come comments are prefixed with --- in BIS functions? Is there any specific reason or is it just a standard they use

still forum
#

"standard" they occasionally use

warm gorge
#

Ah I see, kinda strange but looks okay

little eagle
#

So you can find them easier while looking through the code. There is no technical reason for that.

warm gorge
#

Fair enough

#

Does anyone know what the BIS function is to get the type of item something is? For example you give it a weapon it will return that? Or if an item is an attachment. I swear there was one but cant find it

still forum
#

BIS_fnc_itemType

#

totally not obvious name

warm gorge
#

Perfect, thank you

ornate pawn
#

I need to create some towing system but i need the option only to appear with the 2 objects are within a certain distance between them.. i'm currently using attach to.

still forum
#

Cool

little eagle
#

¯_(ツ)_/¯

unborn ether
#

👍

ornate pawn
#

anybody knows ?

still forum
#

attachTo? yes.

#

I'm guessing it would help if you'd ask a question :D
Otherwise I could just ask you so you tell me what you want. Because I have so much free time

fossil yew
#

Is there a script command that changes individual soldier direction, but animated? setDir doesn't animate.

little eagle
#

No.

young current
#

Isnt there something that makes them look at direction

fossil yew
#

lookAt?

little eagle
#

Well, there's setFormDir for AI. Maybe that is what you want.

still forum
#

Otherwise onEachFrame with linearInterpolate ^^ to kinda animate it

young current
#

if you play the turning animation at the same time it could be ok

fossil yew
#

hehe, well, ok

young current
#

actually does playing the turning animation turn the character?

still forum
#

I don't think so.

young current
#

play turn animation and on stop setdir

still forum
#

I haven't see a animation that actually changes the units origin

fossil yew
#

well, walking animation moves it

still forum
#

are you sure? The unit is not getting back to it's origin when the animation is over?

fossil yew
#

no

young current
#

yeah those have the walk move step defined in them

fossil yew
#

it moves forward

warm gorge
#

Am I misunderstanding what the "apply" command does? According to the wiki, it executes the code on each element of the array, and I've tried to write something using this.

private _array = [[0], [0], [0]];
_array = _array apply {_x pushBack 0};

Shouldn't this push 0 into each of the sub-arrays?

still forum
#

yes

#

but you get an array of nil's back right?

exotic tinsel
still forum
#

apply creates a array out of the return value for each element.
you return nil. So it returns [nil, nil, nil] and then you overwrite _array with that array of nils

exotic tinsel
#

thx mate

still forum
#

Can you send me a example of what assignedItems returned? If there is any structure to it then that should be added to the wiki page

warm gorge
#
private _array = [[0], [0], [0]];
_array = _array apply {_x pushBack 0; _x};

Ahh I see now, just did the above and it now works. Cheers. @still forum

still forum
#

🤦

warm gorge
#

It doesn't say anything about that though, so that might become confusing to some

still forum
#
private _array = [[0], [0], [0]];
_array apply {_x pushBack 0;};

or

private _array = [[0], [0], [0]];
{_x pushBack 0;} forEach _array;
#

about what? That it returns the array of results?
and returns resulting array Like that?

#

It says that on the wiki and you can see it in the examples

warm gorge
#

Oh derppp, yep I understand now. Misunderstood what you said/and the wiki

exotic tinsel
still forum
#

So it just omits things that you don't have. Instead of printing empty string

exotic tinsel
#

i used hint str assignedItems player;

still forum
#

Like with getUnitLoadout or weaponAttachments the structure is very clear
[X, Y , Z] and if you don't have something it's just "" meaning if you want something specific you always know where it is.
assignedItems doesn't have that structure. It might be sorted though

#

Do you think that would be important enough to write on the wiki? How it's sorted?
I don't think that's really important

exotic tinsel
#

wait one, doin a quick test on it

warm gorge
#

Considering it states it for other similar commands like primaryWeaponItems/handgunItems etc I dont see why not

still forum
#

yeah but as I said these have a structure. As with primaryWeaponItems the 3rd element is always optics. And the first is always the muzzle attachment.
assignedItems doesn't have that structure.
Map is first if you have one. If not then compass might be first. Or any of the other items

exotic tinsel
#

no structure

#

when i removed gps it just pulled next item, so just an array. i used

_temp = assignedItems player select 4;
 hint _temp;
#

when the slots are full its odd, map 0, watch 1, compas 2, radio 3, gps 4, nvg 5

still forum
#

Okey got it.
Order is
Map, Compass, Watch, Radio, GPS, NVG

#

Wait.. compass/watch?

#

Your screenshot also shows watch first

exotic tinsel
#

yeah i said its odd

#

it doesnt go left to right or right to left, just map is 0 then starts left to right

still forum
#

Oh and binocular at the end. apparently. But no Terminal? Or is the terminal a GPS?

exotic tinsel
#

yeah gps terminal

#

but if no terminal then nvg is 4

#

so just an array, not solid structure

still forum
#

Does it show binoculars too?

exotic tinsel
#

wait one

unborn ether
#

If you willing to get a solid structure for that items:

(getUnitLoadout player) select 9 // ["ItemMap","","ItemRadio","ItemCompass","ItemWatch","NVGoggles"]
still forum
#

That is a different order than assignedItems 😄 BI! Consistency!

#

If BI was more consistent. They would be called BB.

exotic tinsel
#

there

still forum
#

Okey.. Added to wiki

exotic tinsel
#

cool, i finally contributed to this channel. i dont feel so bad about sucking all the smarts from your brains. nice

unborn ether
#

Im wondering how getUnitLoadout and setUnitLoadout actually looks like. Hope its not a series of headgear|addHeadgear|removeHeadgear style.

still forum
#

well in engine it is

exotic tinsel
#

i do this for getting it all

_playerloadout = [];
_playerloadout = backpackItems _player + primaryWeaponItems _player + secondaryWeaponItems _player + uniformItems _player + vestItems _player + handgunItems _player;
_playerloadout pushBack primaryWeapon _player;
_playerloadout pushBack secondaryWeapon _player;
_playerloadout pushBack headgear _player;
_playerloadout pushBack binocular _player;
_playerloadout pushBack vest _player;
_playerloadout pushBack uniform _player;
_playerloadout pushBack handgunWeapon _player;
_playerloadout pushBack assignedItems _player;
still forum
#

or _playerloadout = getUnitLoadout _player 😄

exotic tinsel
#

does that get everything?

still forum
#

yes

#

different format though

little eagle
#

Yes, and more. Including the binoculars magazine for example which you can't get with other commands.

still forum
#

binocular magazine?!

#

wtf

little eagle
#

Rangefinder battery.

exotic tinsel
#

nice

little eagle
#

I call it "binocular magazine", because it's the magazine of the binocular slot. As opposed to the magazine of the primary slot for example.

still forum
#

You can't even see that in inventory right?

little eagle
#

You can't.

#

Just like you used to be unable to see the grenade launcher muzzles magazine for the primary/secondary/handgun.

#

Or tertiary magazines still if you make a weapon like that.

#

Mags for tertiary muzzles.

unborn ether
#

Theres a list of what you get from that, not sure if its 100% accurate now

still forum
#

Not aware of changes since it was added.
Also WTF is that TFAR comment down there. Total bullshit 😄

unborn ether
#

¯_(ツ)_/¯

exotic tinsel
#

@unborn ether yup thanks mate, already adjusting my code.

little eagle
#

Now I missed the comment.

#

Does not work with Task Force Radio Modification due to dynamic Classes of Radios and Backpacks.

#

"Does not work"?!

still forum
#

getUnitLoadout does not work because some mod uses some classname. Sure!

exotic tinsel
#

im still good to use it.

little eagle
#

Yes, that comment was weird and is now deleted.

exotic tinsel
still forum
#

when you remove stuff? Or when you add stuff?

exotic tinsel
#

remove stuff

strange urchin
#

Probably an inheritance issue

exotic tinsel
#

im using a load out restriction script.

strange urchin
#

Does it check the configs of your items?

exotic tinsel
#

uh just now reading a thread that is addressing that. i don't have any soo I'm gonna have to set it up. sorry asked before properly googling.

unborn ether
#

@exotic tinsel

class RscMsgBox {
    onLoad="if (!isNull (findDisplay 46)) then {(_this select 0) closeDisplay 0};";
};

class RscMsgBox3 {
    onLoad="if (!isNull (findDisplay 46)) then {(_this select 0) closeDisplay 0};";
};
#

Works if findDisplay 46 is present (mission running). Simply closes itself, since it anyways logged to an RPT.

exotic tinsel
#

awesome, thanks mate, thanks alot

strange urchin
#

Uh...isn’t that just suppressing the warning?

unborn ether
#

Its suppressing the dialog pop-up

lone glade
#

....

#

are you serious?

little eagle
#

Yeah, fixing the underlying issue is what you should do instead of suppressing the message that tries to help you.

strange urchin
#

Yeah...unless it’s not your mod, and you don’t want to drop it.

little eagle
#

You should drop a mod if it breaks the smoke grenades.

unborn ether
#

What about BIS problems?

#

Such as something related to no entry on missiles of a helicopters.

#

Which was present recently poping up for everyone, once someone shoots from a heli

little eagle
#

The base game has no such problems. It's a broken mod you've been using.

unborn ether
#

It's ofc properly not to use bad addons or to fix is possible, but still.

little eagle
#

This is not a fix. It just supresses the error message. The game is broken anyway.

unborn ether
#

Not like broken, if for example some weapon/vehicle entry is missing, its just that vehicle/weapon not working the way it should.

#

the game in general stays fine

little eagle
#

No, it's broken.

#

The game not crashing doesn't mean it's not broken.

unborn ether
#

I won't argue on that. Guy wanted that, I gave him the solution to his exact purpose

little eagle
#

There's no point in arguing with me about this anyway. I know I'm right and I'm so stubborn, I will repeat the same thing for 10 years if needed.

sinful sky
#

hey peeps, I'm trying to get a player to spawn with what they died with. if I have this as an sqf onPlayerKilled.sqf: player setVariable ["Saved_Loadout",getUnitLoadout player];

#

do I need to activate that with a !alive trigger

unborn ether
#

Respawned EVH will help or scripted onPlayerRespawn.sqf

sinful sky
#

thanks but that just confused me more.

#

so "respawned" in a trigger

little eagle
#

onPlayerKilled.sqf and onPlayerRespawn.sqf are files you create inside your mission folder.

#

And the script inside is executed when the player dies or respawns respectively.

sinful sky
#

that what I'm asking how does it know when to do that because its not working

#

I don't know what I'm missing atm

little eagle
#

The idea is to save the loadout of the player when killed in a variable, and to reapply it when he respawns.

sinful sky
#

yup., that what I'm going for

#

does the file name onplayerkilled do it for it with no triggers?

little eagle
#

The method with setVariable can fail if the respawnTime is set to 0.

sinful sky
#

ok

little eagle
#

It's a bit complicated but essentially a bug in the game where a unit is respawned before the script of the killed thingy ran.

unborn ether
#

Well Killed EVH seemed to never let me down on this.

little eagle
#

respawn runs before killed if respawnTime is 0, Demellion, and there is nothing you can do about it except set the respawnTime to like 0.1

sinful sky
#

what's EVH?

unborn ether
#

Oh christ...

little eagle
#

EVentHandler.

sinful sky
#

look

#

you guys are thinking too much about this lol

little eagle
#

A script executed when a certain "event" happens. Like a unit being killed or respawning.

sinful sky
#

...

#

how does it know too exicute

little eagle
#

you guys are thinking too much about this lol
Not really. I'm on auto pilot discussing this.

sinful sky
#

usualt that would have to call a SQF

#

*usualy

little eagle
#

how does it know too exicute
Some internals that shouldn't matter to you.

sinful sky
#

OK Thankyou

#

so it just will is the answer.

#

the name of the file I guess?

little eagle
#

You really need to know? I can look it up.

sinful sky
#

its just not working how I've read it on some forums and I'm trying to see what I'm missing.

little eagle
#

Checked the RPT file? A script will not be executed if it contains a syntax error and fails to be compiled.

#

-showScriptErrors should show that too, but not necessarily.

#

Could also be an error that causes it to fail silently. Like a missing closing curly bracket.

sinful sky
#

ok, il make sure that's on.

#

Great I thought the bad module was a problem others were having 😦

lusty canyon
#

along the same line i have a player killed EH but it seems to trigger on the HC player as well (somehow a mission killed the hc player entity)

quasi thicket
#

Guys, got something weird with a trigger:

Activation
"Anybody" / "Present" / "Repeatable"

Condition:
player in thislist

On Act:
player setDamage 1;

Purpose to kill the player who enters the triggerzone. But since they enter it with boat, it will punch the boat to like 300kmph and sent it flying

sinful sky
#

I know you guys are trying to help but I'm so confused lol

#

you want to set damage level

lone glade
#

it doesn't "punch the boat" it kills it and instead of sinking it's moving too fast and physX magic happens

#

also, if you use player it shouldn't damage the boat

still forum
#

it doesn't kill the boat

#

player is player. not the boat

quasi thicket
#

yea but the boat doesnt explode or get destroyed

lone glade
#

so I have very high doubts that's the trigger on act code

quasi thicket
#

and players dont die :p

sinful sky
#

_soldier1 setDamage 1;

lone glade
#

then why the hell do you say it' goes flying?

quasi thicket
#

because it does that :p

#

if the boat enters the trigger, it suddenly flies around franticly

sinful sky
#

oh hmm

#

half of you post just came through lol

#

do you not want to damage the boat?

#

you could just damage the boat not the player

quasi thicket
#

i want the players to DIE!

#

<insert evil laugh>

sinful sky
#

well the boat will explode I think

#

don't use boats much

knotty mantle
#

but if you use "player setDamage 1" wouldnt that kill all players? regardless of zone or not? Cuase every client thinks its "player" is meant? or did you actually use a var?

quasi thicket
#

doesnt "player in thislist" prevent that?

knotty mantle
#

nah afaik that is only the activation.

#

That should check if "a" player is in this trigger

#

But you want to refer to the list in the activation otherwise i THINK every player would be affected.

#

No reason why they dont die though

#

Or the boat is flying

sinful sky
#

what about this bomb = "Bo_GBU12_LGB" createVehicle

knotty mantle
#

we used that back in the old days when we wanted to quickyl repair a bug-damaged vehicle "vehicle player setDamage 0" and tadaaa all vehicles with players inside were repaired.

sinful sky
#

well you could just spawn an explosion where the boat is

quasi thicket
#

here's an old Arma 1 script i'm trying to simulate (partly)

if !((vehicle player) in _this) exitwith {};

titletext ["Extraction successful. You'll be able to spectate remaining players in a few seconds.", "BLACK OUT"];

sleep 1;

if (((vehicle player) distance EndPoint) > 200) then {vehicle player setPos getPos EndPoint;(vehicle Player) lock true;vehicle player setFuel 0;vehicle player setDir (random 360);vehicle player setVelocity [0,20,0]};

sleep 15;

player setDamage 1; // Kill the player to prevent them from talking to live players and give them spectator script ... wait 15 seconds first, to give "mission success" a chance to be detected.

sleep 1;
titletext ["Extraction successful. You'll be able to spectate remaining players in a few seconds.", "BLACK IN"];
still forum
#

@knotty mantle player is "the" player. Not "a" player.

#

Yes that trigger only activates when player enters it.

#

and only damages the player

knotty mantle
#

So that trigger would only activate on one client? The one that entered?

still forum
#

yes

knotty mantle
#

oh. i thought triggers were global or server only. Didnt know they could be client only aswell...

still forum
#

triggers are not global

#

they just exist on every machine

knotty mantle
#

yeah but isnt the activation executed globally if not set to server only?

still forum
#

no

sinful sky
#

how do you do that?

still forum
#

It's executed locally on every machine. Which you might call global but it isn't.

sinful sky
#

... so if I walk into a trigget to move a marker

#

will it move for everymody else?

knotty mantle
#

yeeeeeeah. But if it is executed local on every machine. How does the activation know which player is the one that entered the trigger?

#

*if you dont refer to him as a variable?

still forum
#

player is always the local player

knotty mantle
#

yeah okay. so why exactly does the activation player setDamage 1; then only kill the player that entered the trigger?

still forum
#

because it only executes if the player enters the trigger

#

other players are different units. So their player doesn't enter it

knotty mantle
#

ahhh. that is the difference between global and local on every machine...

quasi thicket
#

wait, i didn't seem to have checked " repeatable" when i tested it

#

so maybe because a group of 5 players in a boat entered the trigger, and one died causing the boat the freak out?

#

i mean... it's Arma

knotty mantle
#

^Dedmen could that be the issue? Cause if the trigger didnt acitvate for the others it should still be available? No need for repeatable?

still forum
#

dunno

little eagle
#

Triggers ¯_(ツ)_/¯

inner swallow
#

doesnt "player in thislist" prevent that?
it should, assuming non server-side triggers

#

hmm things to keep in mind -

  • i think anybody gets triggered by animals etc too
  • if people are in a vehicle, only commander of vic will show up in thisList
#

@quasi thicket

dry owl
#

Hey anyone have an idea how to fix this, it is throwing me the error "0 elements provided, 3 expected"

#

{ systemChat str(getpos _x);
} forEach (nearestobjects [_pos,["Land_fs_feed_F","Land_FuelStation_Feed_F"], 25000]);

still forum
#

_pos is probably empty

subtle ore
#

@dry owl Can you paste the entire piece of code relating to this? Formatted if you could

dry owl
#

@subtle ore one second

#
} forEach (nearestobjects [_pos,["Land_SignRestrict_01_speedLimit_30_F"], 25000]); ```
#

thats literally it lol, basically trying to get XYZ of all 30Km/h signs on the map

ruby breach
#

You have to define _pos

young current
#

whats _pos

#

👆

molten yacht
#

player maxSoldierLoad = 5000; (in OnPlayerRespawn.SQF)
is for some reasong saying

Error Missing ; ```
#

I don't think the syntax is wrong, but there's zero documentation, so who knows.

little eagle
#

That syntax is wrong.

molten yacht
#

(I mean, obviously, or it wouldn't throw an error.)

#

Do you know how it's wrong?

little eagle
#

maxSoldierLoad is a config entry in class CfgInventoryGlobalVariable. The whole thing is from a config and not a script.

#

So very wrong.

molten yacht
#

Okay. Hmm.

#

So, class CfgInventoryGlobalVariable { maxSoldierLoad = 9000; }; ?

little eagle
#

You can't set the load of a soldier with a script. You need an addon config for that.

molten yacht
#

in description.ext ?

little eagle
#

Won't work.

#

The config entry is read from addon space only.

#

What are you trying to achieve?

molten yacht
#

I was thinking about casually boosting my playerbase's stamina/load cap, because they're noobs, but I probably won't bother if it's from addon space only

little eagle
#
// initPlayerLocal.sqf
params ["_unit"];
_unit setUnitTrait ["loadCoef", 1000/9000];

Note that due to a bug in 1.78/1.80, setUnitLoadout might make a script error pop up complaing about some weird "enum" shit. Just ignore, it works fine despite the message.

#

This also will not work with ACE fatigue, obviously.

molten yacht
#

Huh. Cool.

#

How much does this boost it by?

little eagle
#

89%?

molten yacht
#

Wow.

#

Noice. Thanks.

#

Any ideas on how to make a hind patrol very slowly?

little eagle
#

1000 is the original value, 9000 is what you wanted to set it to.

#

So I just divided them and it should be what you wanted.

molten yacht
#

Hmm. And I just realized that you can't init on a zeus-spawned helo, anyway, so, bleh

meager heart
#

@dry owl

systemChat str ((nearestobjects [_pos,["Land_SignRestrict_01_speedLimit_30_F"], 25000]) apply {getPosWorld _x});
little eagle
#

@molten yacht

Hmm. And I just realized that you can't init on a zeus-spawned helo
Sure you can:

// init.sqf
{
    _x addEventHandler ["CuratorObjectPlaced", {
        params ["_curator", "_entity"];

        if (_entity isKindOf "<heli-classname>") then {
            _entity limitSpeed 100;
        };
    }];
} forEach allCurators;
molten yacht
#

Mmm, right, but that's no good if I only want it on the Designated Stupid Chopper For New People

#

I guess I could be really specific in what I place...

#

hmmmmm

#

Regardless, commy, you're fuckin' great and I love you.

#

Thanks for the help.

little eagle
#

Thanks.

#

yw

uncut sphinx
#

is there an easier way of checking if an object is (or isn't) within some distance of a road than with nearRoads?

molten yacht
#

@little eagle would

player setUnitTrait ["loadCoef",9000];

work?

uncut sphinx
#

how do I get code blocks working in here?

inner swallow
#

two sets of three of those ☝🏽

uncut sphinx
#

ahhh

#
    if (!((_x select 0) nearRoads _roadDistance isEqualTo [])) then {
        _places deleteAt _forEachIndex;
    };
} forEach _places;```
#

ok here's what I have

#

_places is an array from selectBestPlaces which is why the weird (_x select 0) is there

#

I'm trying to go through the array and throw out positions that are too close to a road (distance defined by _roadDistance)

#

when I run the script it throws out something but definitely not positions near a road

#

is there something super obvious I am missing? I haven't really scripted in a while

winter rose
#

You are editing the array you are going through, which is not a good thing

uncut sphinx
#

so I shouldn't use forEach?

#

that's fucking with it?

ruby breach
#

You shouldn't delete from the array you're looping through

#

Make a new array, add the positions you want to keep to it

winter rose
#

Copy an array with +array

ruby breach
#

(See the discussion from a few days ago on the use of apply for this)

uncut sphinx
#

okay, that makes sense

#

so instead of throwing out positions that don't fit my criteria, I'll just build a new array with the positions that do

ruby breach
#

Right. Or do the same thing you're doing here with a copy of the original array. Not sure which would have better performance

#

You could test both

uncut sphinx
#

Thanks

meager heart
#

```sqf
code
```

#

🙂

subtle ore
#
if(_coolGuySyntaxHighlightingThing) then
{
    player setVelocity[500,500,500];
};
meager heart
#

🚀

hushed minnow
#

Hey everyone, Just want to ask, with global variables, where do you personally declare them? In-file, or it's own dedicated file?

unborn ether
#

@subtle ore Tonic, is that you?

subtle ore
#

??

#

No?

#

Tonic threw in the towel years ago man

unborn ether
#

looks at strange setVelocity

#

suspects

subtle ore
#

🤔

unborn ether
#

@hushed minnow Anywhere that is SQF.

hushed minnow
#

Hmm, while i'm not one for lettings tools dictate my workflow, it annoys me to no limit when sqflint warns me that I may have undefined globals

inner swallow
#

you could also use misisonNamespace getVariable ["globalVarName", <default value>];

#

that should solve sqflint's problems

#

(that could also save you from possible issues if the variable is querried when it's null)

hushed minnow
#

Would it be an issue if I quite a few globals that are also publicvariables

#

to be put into the missionNamespace

meager heart
hushed minnow
#

@meager heart Not helpful to me mate.

meager heart
#

hmm 🤔

inner swallow
#

Would it be an issue if I quite a few globals that are also publicvariables
probably not

hushed minnow
#

Is the missionNamespace persistent between missions, i.e. If i edited and repackaged the same mission, those variables would still exist?

inner swallow
#

er it should not be persistant

#

it's no different than using thisIsAGlobalVariable = "value";

hushed minnow
#

Ah, I was just about to ask that, if global variables were essentially the same as declaring it in the missionNamespace

inner swallow
#

to my knowledge yes

#

btw varspace setVariable [name, value, public]

#

can make it public through this directly

#
The variable space of the object is local to each client and by default changes are not broadcast. 
Since Arma 2: If the public parameter for supported types is true, the value will be synchronized also for a JIP player.```
#

if you want persistance then write to profileNamespace

hushed minnow
#

So I can essentially replace a ??

myPubVar = "someValue";
publicVariable "myPubVar";

//with
missionNamespace setVariable[myPubVar, "someValue", true];
native siren
#

Hello. Is there anything I could use to "ping" the server? I'm trying to create some lag switch solution and I'm looking for some command that returns values only when is able to establish connection with the server.

inner swallow
#

ultranoob yes

#

what i don't know is, whether sync is handled automatically after that with setVariable

#

since with publicVariable you have to use it every time you want to sync

#

by sync i mean broadcast

hushed minnow
#

mmhmm, I would wager that the broadcast is done as part of the setVariable

inner swallow
#

the first time yeah, but i don't know about each subsequent modification

unborn ether
#

@native siren CLIENT: remoteExec -> 2 | SERVER: remoteExec-> remoteExecutedOwner (response)

inner swallow
#

like, if you said missionNamespace setVariable[myPubVar, "someValue", true];

unborn ether
#

Will give you exactly a ping

inner swallow
#

and then myPubVar = "something else"

#

I don't know if that will automatically sync

native siren
#

@unborn ether thanks

inner swallow
#

if you repeat the setVariable with the public flag then it should ofc

hushed minnow
#

@inner swallow Oh, that, I believe you have to do manually, since regardless of how you modify it, it shouldn't propagate until you call publicVariable, or the like

inner swallow
#

yeah, that's what i was thinking too

unborn ether
#

@native siren Specified more, take a look

hushed minnow
#

@inner swallow Thank you for your help!

inner swallow
#

cheers!

meager heart
#

variables in missionNamespace already global...
publicVariable will just sync var with all machines, including jips

cedar kindle
#

yes mission namespace is cleaned every mission. only UI namespace (session) and profile namespace (hdd) can persist between missions

unborn ether
#

@cedar kindle parsingNamespace too 😉

cedar kindle
#

used alot

#

my favorite namespace

hushed minnow
#

whats parsingNamespace for?

unborn ether
#

parsingNamespace holds data until the binary is destroyed, which means until your server/client goes down.

hushed minnow
#

Oh, so it's like the executables own namespace

cedar kindle
#

it's for preprocessor __EXEC, config parser namespace

unborn ether
#

Well in terms of BIS .. yes ^

cedar kindle
#

don't worry about it tbh

hushed minnow
#

so if i were as devious as to put a wasTempBannedRecently = true in a bunch of servers, then they could check for that and not be able to join my servers until they restarted arma?

unborn ether
#

@hushed minnow In that way you better use profileNamespace with some timestamp

hushed minnow
#

mhmm, Yes, I was just trying to think about how anyone would actually use it?

cedar kindle
#

you'd use UI namespace instead

#

e.g cba/ace stores functions in UI NS

hushed minnow
#

Is there a wiki page describing the different namespaces and their uses?

cedar kindle
#

so they don't have to be recompiled between missions

unborn ether
#

@hushed minnow In short
missionNamespace exists while mission is on
profileNamespace exists until user/server loose its profile storage
uiNamespace|parsingNamespace exists until binary is destroyed, they've just used for different purpose.

meager heart
#
sldt1ck - Today at 03:25
@UltraNoob 
Check this http://killzonekid.com/tag/variables/
and this https://community.bistudio.com/wiki/Variables
UltraNoob - Today at 03:26
@sldt1ck Not helpful to me mate.
#

😀

#

Is there a wiki page describing the different namespaces and their uses?

#

gg well played

hushed minnow
#

I've been played. 😄

#

KZK, variables pt2.

dark swallow
#

I have been trying to map map Icons for a Life server but some reason its not working I packed it up as a PBO and everything but it isn't showing up this is my config.cpp class CfgMarkers
{
class Flag
{
name = "A3PAL MapIcons Shop";
icon = "\A3PAL_MapIcons\data\shop.paa";
color[] = {1, 1, , 1};
size = 32;
shadow = true;
scope = private;
};
};

unborn ether
#

Is there any getter for current scripted volume, fadeSound for example?

subtle ore
#

@unborn ether

unborn ether
#

oh really

#

😄

subtle ore
#

😉

unborn ether
#

gonna link it from fadeSound for dummies like me

subtle ore
#

👍

ornate pawn
#

So i got this from BOOTCAMP mission: this creates a camera and it renders that camera to the monitor

#

["initialize", [BIS_timeTrial_monitor_1, 0, [14335.75,16223.96,1.77], [-80557.67,47698.36,-2121.23], 0.35, "rendertarget0"]]

#

can somebody explain to me how to get cords ? i wanna use this for a CQB facility that i'm working on

subtle ore
#

@ornate pawn Right click an area in the eden editor -> Log -> Log position to clipboard

#

it'll copy an array [x,y,z]

ornate pawn
#

I see

#

i'm still trying to figure it out the numbers order

hushed minnow
#

hey guys, which channel would be more appropriate for a code-review?

rancid ruin
#

this one if it's sqf

hushed minnow
queen cargo
#

Uhm... Ask the maintainers?

hushed minnow
#

I am the maintainer 😫
This is actually the first time i've asked anyone to review my work since its sooo new.
All the other devs are gone

#

@queen cargo, Where do I know you from? are you a dev too?

queen cargo
#

Ohh ok

#

Yup I do develop

#

May know me from sqf-vm, arma.studio or xmedsys

hushed minnow
#

Woah! amazing, I remember talking to you about a bug with arma.studio now

cyan pewter
#

Is there a way to get ai to call up a bi support module? I'm thinking helicopter transport in particular

cyan pewter
#

Nevermind, i think i can do this with a waypoint spider web

little eagle
#

@molten yacht That would make the players load affect stamina/fatigue 9000 times as much. I wrote 1000 divided by 9000, which is 0 point 1 period 1. So a reduction to about 11%. This value is not the same as the max load of a soldier. It's a multiplier (hence "Coef") for stamina/fatigue only. The maximum load can only be changed by addon config as I already said.

cyan pewter
#

Okay, I'm back. Now i can't figure out the selection syntax for addWaypoint. All the examples i can find have _wp = _grp, but substituting the group name in any way just seems to produce errors (total scripting noob, bear with me)

inner swallow
#

@cyan pewter _grp is the name of the group.

#

_grp addWaypoint [position player, 0]; is the command bit

#

which returns an array as described in the wiki

#

which gets stored in _wp, in the example

#

i.e. general syntax is groupName addWaypoint [center, radius, index, name]

#

so if you have something like _grp = group player; before you use _grp with addWaypoint, then it'll work

#

but you could also do (group player) addWaypoint [position player, 0];

#

if that makes sense.

#

this will make a waypoint on the position of the player for the player's group

#

(which will probably be completed almost instantly)

cyan pewter
#

must have made a typo... could have sworn i tried that already

#

okay, now i want to define the position using a command. ive got th1 addWaypoint [_position = getPosATL a1ftl findEmptyPosition [50,1000,"O_T_VTOL_02_infantry_dynamicLoadout_F"]];, which im sure is filled with syntax errors

native siren
#

Hello I try to run one of the examples from remoteExecutedOwner wiki but it doesn't want to display anything. What am I missing?

#
{
    // in this scope, the remoteExecutedOwner equals clientOwner of the sender
    // so using it as target in remoteExec will send response right back at him
    [
        time, // mission time value on the server
        {
            hint format
            [
                "Request recieved!\nMission time value on the server is: %1", 
                _this
            ];        
        }
    ]
    remoteExec ["call", remoteExecutedOwner]; // server response to the sender
} 
remoteExec ["call", 2]; // send request to server```
inner swallow
#

_position = getPosATL a1ftl findEmptyPosition [50,1000,"O_T_VTOL_02_infantry_dynamicLoadout_F"]
that's not ... no 😄

#

put this in a separate line and then just use _position here

#
_position = (getPosATL) a1ftl findEmptyPosition [50,1000,"O_T_VTOL_02_infantry_dynamicLoadout_F"];
th1 addWaypoint [_position, 0];```
#

although it's interesting, the LAND waypoint should be doing this automatically

cyan pewter
#

it has to be a load waypoint, otherwise the helo takes off before everyone gets in

little eagle
#

_position = (getPosATL) a1ftl findEmptyPosition [50,1000,"O_T_VTOL_02_infantry_dynamicLoadout_F"];
Questionable.

cyan pewter
#

...addWaypoint _position - "0 elements provided, 3 expected", ...addWaypoint position _position - "generic error in expression"

little eagle
#

@native siren Did you test this on a dedicated server or local hosted MP?

cyan pewter
#

also causes a major fps drop

native siren
#

@little eagle dedicated

little eagle
#

Well, the script SuicideKing posted has a syntax error. There can never be parenthesis enclosing getPosATL without any argument on the right side.

#

SEM, do you use CfgRemoteExec in your mission?

native siren
#

yes

little eagle
#

Then you have to white list call command.

cyan pewter
#

oh, i didnt even see that. i was still using it without parentheses, like the example on the wiki

little eagle
#

Remind me, what did you try and it errors?

cyan pewter
#

_position = getPosATL a1ftl findEmptyPosition [50,1000,"O_T_VTOL_02_infantry_dynamicLoadout_F"]; th1 addWaypoint _position error = "0 elements provided, 3 expected"

#

_position = getPosATL a1ftl findEmptyPosition [50,1000,"O_T_VTOL_02_infantry_dynamicLoadout_F"]; th1 addWaypoint position _position error = "generic error in expression

little eagle
#

The syntax of addWaypoint is
groupName addWaypoint [center, radius, index, name]
according to the wiki, not
groupName addWaypoint center

#

Radius is mandatory, index and name are optional.

meager heart
#

also if you need just move group _group move _position; 😉

native siren
#

@little eagle Like this?

#
class Commands {

    mode = 1;

    jip = 0;
    F(addHandgunItem,ANYONE)
    F(addMagazine,ANYONE)

    F(addPrimaryWeaponItem,ANYONE)
    F(addWeapon,ANYONE)

    F(setFuel,ANYONE)

    F(call,ANYONE)

};```
little eagle
#

No idea. This is macros from some mission I'm not familiar with. But it looks good to me.

#

If you actually white list call, might as well get rid of CfgRemoteExec alltogether though.

#

lol

cyan pewter
#

im also missing brackets

native siren
#

should I just put this code into separate file and whitelist it instead?

#

and then just call that function

little eagle
#

You mean make a function out of it and whitelist that function instead of the call command? Sounds good. Less network traffic and you don't have to white list call.

native siren
#

yeah

#

I will try that then thank you @little eagle

little eagle
#

@cyan pewter

private _position = getPosWorld a1ftl findEmptyPosition [50,1000,"O_T_VTOL_02_infantry_dynamicLoadout_F"];
th1 addWaypoint [_position, 0];
#

It lagging is to be expected, because you search a one kilometer radius.

cyan pewter
#

uhh, actually i think i got it

meager heart
#

findEmptyPosition with range 50-1000, will slightly ruin your fps lol

little eagle
#

Not really. It's one command. All it does is freeze the game for one frame to then return to normal fps.

cyan pewter
#

out of curiosity, what does making it private do?

little eagle
#

Sets the home scope of the variable, so the game has to not go through all previous scopes to look for a variable named "_position" to potentially overwrite.

cyan pewter
#

okay, thanks. now to add landing and wp synchronization

meager heart
#

glhf

#

May the fps be with you!

cyan pewter
#

well thats interesting

#

i turned down the search radius and it failed to find a position, causing the rest of the script not to fire either. is there a way to loop it while expanding the search radius each time, but get it to stop once it finds a suitable lz?

still forum
#

@hushed minnow I didn't comment again that I already commented. So if you did the same thing in a later file I didn't comment it again but my older comment still applies

hushed minnow
#

@still forum Just soooo much of it is legacy code that I don't even know who wrote it, but all are valid points!

still forum
#

Seeking execVM everywhere already screams legacy code at me 😄

hushed minnow
#

whats the new way to do it?

#

It's spawn isn't it

still forum
#

yeah.

#

It's not really a new way

#

You just shouldn't execVM scripts that you run more than once. Because they are recompiled everytime. And compiling scripts is expensive

hushed minnow
#

I kinda had a hunch about that too, but since this wasn't a script that would regularly run (once every 10 minutes), the benefit would've been negligible.

strange urchin
#

ExecVM is the same as spawn afaik

#

But if it isn’t, then you need to update the wiki or something you madman.

still forum
#

It does somewhat the same. But differently.

#

Exec VM preprocesses and compiles a script and spawns a new instance.
spawn takes a already compiled script and spawns a new instance

cedar kindle
#

kind of a shame we don’t have a short command for ccppfln

#

the heck is VM short for anyway

inner swallow
#

virtual machine?

cedar kindle
#

doesn’t make any sense tho in this regard

still forum
#

What?

#

It does actually

#

If you know the backend

cedar kindle
#

explain

still forum
#

Each script "instance" as I call it is a VM

#

A scriptVM

cedar kindle
#

alright

#

isnt it more like execution context for the script engine ?

#

how is it a vm by vm definition

still forum
#

VMContext is a different thing 😄

cedar kindle
#

is it short for virtual machine tho

still forum
#

I think it doesn't fit the wikipedia definition of a VM

#

Yes it is

cedar kindle
#

lame 😒

still forum
#

There is also the Java Virtual Machine. Which is also not according to wikipedia's VM definition Virtual machines are based on computer architectures and provide functionality of a physical computer.

cedar kindle
#

I’d buy the script engine being referred to as vm proc but why each script instance

still forum
#

Because each of them is a VM

#

If you run system VM's you also call them VM's. And not system instances running on a VM (host system)

#

because the host system is not a VM

cedar kindle
#

exactly

still forum
#

The SQF engine is not a VM. It runs VM's

strange urchin
#

Well update the wiki you madman

#

Tell the world

still forum
#

Why?

#

The wiki already says that. What should I change?

strange urchin
#

Does it?

still forum
#

yes?

strange urchin
#

Oh

#

Huh.

little eagle
#

Name is pointless though. May aswell call it spawnVM.

strange urchin
#

There’s an exec thing though

little eagle
#

Yes, and it creates a sqs vm.

still forum
#

For consistency it should be named like that.
I would prefer without the VM though. But they had to name execVM differently because exec already exists

#

There are no SQS VM's

little eagle
#

execSQF

still forum
#

👍

#

Or just get rid of SQS and call it exec 😄

little eagle
strange urchin
#

Already an ingame exec command

little eagle
#

Yes, and it creates a sqs vm.

still forum
#

They aren't called VM's internally though

strange urchin
#

Would be bad design if you ask me to have them be called the same thing

little eagle
#

How are they different?

still forum
#

They are not compiled

little eagle
#

exec could decide by file extension wheter to use sqs or sqf.

still forum
#

👍

#

Or maybe spawn with string argument?

#

Just put everything into one command

strange urchin
#

Sqf is gonna be gone by a4 no point spitballing

subtle ore
#

🤔

little eagle
#

Or maybe spawn with string argument?
this

still forum
#

Please tell me more about A4. You seem to have more information that anyone else.

strange urchin
#

Pls

#

You telling me that there is still going to be sqf?

little eagle
#

That is a very weak argument.

still forum
#

So far it is speculated that we will get Enscript. And Enscript still supports SQF to this day.

strange urchin
#

Huh

still forum
#

Ofcause you can further speculate what will happen with the language that we speculate to get in a speculated Arma 4 game that might exist or not.

split coral
#

How do you know Enscript supports SQF?

still forum
#

Enscript documentation has a enscript command to execute SQF code

split coral
#

oh, I see. But isn't that like years old already? From Dayz, right?

still forum
#

yes

strange urchin
#

Haven’t seen much for documentation of it

cedar kindle
#

dayz is using it, yes

#

and take on mars

split coral
#

And lucie

cedar kindle
#

what's that

split coral
#

VR game

#

Incubator project

cedar kindle
#

oh ok

inner swallow
#

Interesting, since in the dayz dev interviews they said SQF won't be compatible with Enfusion/Enscript 🤔

#

or wait, i think he's saying there's no automatic conversion

#

not that it can't run it or whatever

tough abyss
#

I think he is saying it is a different thing and there is no way to use one in place of the other. He goes on to also say that modding is also exceptionally difficult to do safely in Enfusion and they haven't determined how they will go about doing that yet. This matches what I have suspected and have felt all along unfortunately. If you fix the multithreading issues then you also introduce complexity and rules on the modding and scripting that limit what can be done and make it harder to mod.

#

Really interesting video I'll definitely get deep into it as it says a lot of what the future is likely going to hold and those two tidbits are already pretty dramatic impacts were it to come to the Arma series in that way.

inner swallow
#

there's a part 2 as well

#

and a couple of others

still forum
#

What I've seen from enscript so far is singlethreaded

#

there are "threads" but they are equivalent to SQF

inner swallow
#

I do remember them implying that a lot more stuff will be scripted instead of hard-coded, so in some ways modding will be easier

still forum
#

Yep.

#

Already seen that being the case in DayZ

#

Depends on how fast enscript actually is though. The faster it is the more stuff we will see in open-source Enscript rather than closed source engine code

peak plover
#

Will DayZ standalone support mods

subtle ore
#

Yes 🙄

still forum
#

Yes. Mod support is supposed to come out together with beta

peak plover
#

When is that happening

still forum
#

Was supposed to happen end 2017

#

but was pushed back

peak plover
#

XD

still forum
#

I think next target was Q1 2018. But dunno

split coral
#

I've only heard 2018, but it might also mean 2019.

still forum
#

It was planned for last year. So I don't think 2019

split coral
#

It was planned 2016 too... 😃

still forum
#

really? Oh.. Well..

#

(╯°□°)╯︵ ┻━┻

young current
#

2142

#

then you can live it

split coral
#

┬─┬ノ(ಠ_ಠノ) Calm down please

peak plover
#

Yeah seems to take a lot of time I feel like Butter Lord will come out before this

inner swallow
#

Yeah their video just said 2018 iirc

unborn ether
#

Can someone tell me if setVariable with public argument as client ID number reliable or not?

still forum
#

Last info that I got about that is that it's not working

#

But I don't know if whoever said that actually tried it

unborn ether
#

Need to check it

little eagle
#

@unborn ether @still forum
Quiksilver has been using setVariable clientId successfully in the past.

still forum
#

write faster

little eagle
#

It's unrelated to what I was telling you.

#

If you fix the multithreading issues then you also introduce complexity and rules on the modding and scripting that limit what can be done and make it harder to mod.
But the community already made more complicated things than Arsenal or Zeus. If this were true, then it'd also mean no more scripts like those. Also, the campaign etc. is all scripted. Something has to replace that.

#

I don't see how multithreading would be a problem really. You have the same issues already with SQF pseudo threads, except none of the benefits.

still forum
#

multithreading makes everything harder. And makes things that actually don't care about multithreading slower

little eagle
#

It sounds ridiculous to me that some silly scripts even need actual multithreading.

peak plover
#

Wud St enscript b fst

subtle ore
#

@peak plover you gotta cut the cool kid slang man, no one can understand you and your lifer talk

little eagle
#

rekt

peak plover
#

STFU!!!!!!

subtle ore
#

😉

little eagle
#

Angry reaction confirms the accusation.

peak plover
#

ok now on pc

#

Would singlethreaded enscript be fast?

#

Multi threading is out of the question, right?

little eagle
#

Don't think anyone knows without trying.

peak plover
#

Would it be possible to make a dll extension for a3 that is a new sqf thread?

little eagle
#

Like intercept?

subtle ore
#

Apparently you can utilize the editor in dayz already, it's very hacky though. Bi doesn't endorse it

still forum
#

Intercept gives you multithreading. But I haven't found a real use for it yet

#

enscript is faster than SQF for sure. So yes it will be fast

peak plover
#

okay

still forum
#

multithreaded code isn't any faster. If anything then it's slower

subtle ore
#

Like, place a packet lf scripts and resources in the root and dayz picks right up on it.

peak plover
#

okay

subtle ore
#

So i fear it may be too easy to modify things

peak plover
#

-filePatching

little eagle
#

"too easy"

#

Can't be too easy.

still forum
#

Arma also does that

#

place a pbo with scripts and a config in addons folder and it automatically loads it

little eagle
#

True.

subtle ore
#

Right, but this isn't a mod

#

it's unpacked enforce script

still forum
#

I'm sure they'll protect it properly

subtle ore
#

Eventually, but as of right now people are still utilizing it.

peak plover
#

lol

#

I can think of stuff for intercept to do

#

Can I make sqf script and intercept use it?

still forum
#

yeah

#

But.. Why not just use SQF completely 😄

peak plover
#

too slow

#

cluttered thread

still forum
#

If you call SQF from Intercept it will execute the SQF

#

which is slow

peak plover
#

hmm okay

#

It's just like using unscheduled

still forum
#

yeah

peak plover
#

and PFH

subtle ore
#

Wouldn't calling SQF from intercept be like using a regular command? Or how does that work?

still forum
#

calling SQF from Intercept call's the script in unscheduled using isNil

peak plover
#

k

still forum
#

basically. Except fastCall is enabled. In which case it does more complicated stuff but the speed of the actual script won't increase

strange urchin
#

Does an event handler have any performance impact when it is not being fired?

still forum
#

no

strange urchin
#

Nothing that's even supposedly negligible?

still forum
#

What?

#

It doesn't have any performance impact. 0.

#

If the event doesn't happen then nothing happens at all

little eagle
#

Yeah, that's the point.

#

The cost is maybe like 50 Bytes in memory.

subtle ore
#

How are event handlers handled in the engine? Are they sort of like loops waiting for a condition to be met?

still forum
#

@subtle ore You can answer that yourself

#

Just read what I wrote 3 minutes ago

#

then use your brain properly.

little eagle
#

They're an array in memory that is iterated over when the engine does certain stuff. Like firing a weapon.

subtle ore
#

🤷

still forum
#

Eventhandlers themselves if they fire are stupidly expensive. But that's just because their implementation is stupid

subtle ore
#

Alrighty then.

little eagle
#

Well, unless you use like BIS_fnc_addStacked or CBA_fnc_addClass, because those are not stored as strings and need no compiling.

#

So this only applies to add(Mission)EventHandler ctrlAddEventHandler and displayAddEventhandler.

inner swallow
#

but even then it's not all or nothing

meager heart
#

lol

still forum
#

You have to sync at some point in Arma. But your code won't run faster in a seperate thread.

#

You'll just be able to run more of your slow code at once

inner swallow
#

oh yeah, of course

#

having MT in user scripts sounds like a niche use case

#

but i'd assume stuff like radio simulation (TFAR/ACRE) could benefit?

still forum
#

There is only one guy who uses Intercept to run properly multithreaded scripts.

#

Yeah. They could benefit slightly I think

inner swallow
#

I was thinking more in terms of their physics engine, etc

still forum
#

Not really then

#

TFAR's most time is spent harvesting peoples positions

#

ACRE does their "physics" calculations in the Teamspeak plugin.

inner swallow
#

ah, er. So by "their" i meant BI's physics engine for the world 😄

still forum
#

They use PhysX

#

They might aswell push it to the GPU

inner swallow
#

Not with Enfusion though?

#

Afaik they're dropping PhysX for enfusion

subtle ore
#

nigel was talking about bullet

inner swallow
#

idk they said they want to avoid third party

meager heart
#

alganthes greates quotes update >"but even then it's not all or nothing" 😄

subtle ore
#

An inhouse solution would be great

peak plover
#

Can we get enscript on GPU? XD

#

Gotta go fast

still forum
#

No. GPU not GGF

subtle ore
#

Sanic fast?

little eagle
#

I don't think that is how this works, nigel.

peak plover
#

Ohh

inner swallow
#

what i meant, sldt1ck, is that there will probably some algos that'll benefit, and some that won't, and MT implementations usually give you ways to have serial blocks inside MT blocks

#

or switch between modes

#

so there will probably be opportunities to use it if they find that it's worth it

#

maybe even AI pathing could be sped up, idk

meager heart
#

no..you was on point there 👌 ... just funny little conclusion, SuicideKing 😀

still forum
#

multiple AI's pathing in parallel is a good idea

peak plover
#

Graphics cards a lot faster so why don't we use that to do all the expensive stuff

still forum
#

They aren't tho

meager heart
#

afaik it depends on algo

peak plover
#

So you be sayin CPU be faster

inner swallow
#

in serial tasks, yes

#

(not to mention the latency involved in transferring stuff to VRAM and back)

peak plover
#

Alright alright alright you talked me out of it

inner swallow
#

might be good for physics though

peak plover
#

Well I think there could be a reason they stopped either it wasn't selling enough or it wasn't you know good enough nowadays

inner swallow
#

but i'd hope the GPU is busy rendering 😄

#

although they could use the IGP for compute, theoretically 🤔

peak plover
#

Exactamundo

#

What are usually the most expensive things in Arma and are they all are running on like the same CPU cores

still forum
#

95% of Arma is singlethreaded

peak plover
#

But did uses all of my course I mean this going to be an explanation

still forum
#

Basically everything runs on the "same core" (It doesn't at all. But doesn't matter)

peak plover
#

Is it just like virtually using the like possibility of having 8 cores or

still forum
#

That sentence is gramatically invalid

meager heart
#

bulli

peak plover
#

Maybe everything goes to like a bottleneck and then from the bottleneck to the CPU cores

still forum
#

Uh..

#

not really

peak plover
#

But how does it do it

still forum
#

As I said 95% runs serially in one thread

#

one thread might run across all CPU cores though. But that doesn't make it run in parallel

peak plover
#

Yes yes yes one thread using many cores

#

That's what I mean it's thread is the bottleneck through which it gets to the course

still forum
#

Everything is the bottleneck

#

the entire engine is one bottleneck

peak plover
#

I played a little with DayZ standalone with the latest version and I think it rained really good considering it has like Dynamic Shadows for like the F layer and stuff and it looks a lot good

#

I wonder how good does infusion script run

still forum
#

Enfusion*

peak plover
#

I'm using the Google talk to keyboard on my phone

austere granite
#

Lazy

peak plover
#

Hell yeah I'm lazy is there something like that for commuters

subtle ore
#

Yes there is.

#

Don't drive and text

still forum
#

just text

inner swallow
#

the entire engine is one bottleneck
:enginelimitations:

little eagle
#

Why do bottles have bottle necks anyway?

peak plover
#

I don't text and drive I'm just practicing for the inevitable robot takeover of the world I just want them to understand me

inner swallow
#

makes it easier to pour i guess

#

they don't need to understand you

#

haven't you seen terminator

little eagle
#

They'll harvest your brain electricity for some reason though.

peak plover
#

For sure they do

little eagle
#

I've seen that movie.

subtle ore
#

@little eagle Do you have a throat large enough to swallow all that water the neck stops?

little eagle
#

Ever drank from a cup?

#

Those don't have cup necks.

#

And you can drink just fine.

peak plover
#

Yeah try pouring from a cup homie

subtle ore
#

Well you sip from those

#

homie , you really are a lifer nigel

peak plover
#

Everything has a purpose stop trying to reinvent the wheel

little eagle
#

I'm trying to destroy all wheels, because they're stupid.

subtle ore
#

Well the wheel in the sky keeps on turning, you out to destroy that too?

peak plover
#

I hate the Wheel in the Sky but at least it's some proof that Earth is flat

meager heart
#

🤔

shut flower
#

No Sitrep since 2 weeks

#

What's going on there? 🤔

subtle ore
#

@meager heart thankong

peak plover
#

Crunch time for the tanks TLC baby

shut flower
#

hopefully

peak plover
#

Big party afterwards tho

subtle ore
#

🎈 🍰

peak plover
#

I'ma happy for them

subtle ore
#

Going out with a bang

peak plover
#

With that t72

subtle ore
#

🤞

peak plover
#

Dude they have to drive that tank into hooking DLC video it's the tanks DLC and t-72 is a dank

#

Damn I've misrepresented my words because of the robot misunderstood me

inner swallow
#

I really hope they don't need to crunch 😦

#

Even if it means taking more time

peak plover
#

Me 2

half inlet
#

I need some feedback on how I should approach the following problem:

#

I'm trying to come up with a fast and reliable way to generate pseudo-random numbers (from 0 to 1, for now) using a given seed

#

I tried using random with the syntax that uses a seed and a X and Y coordinate, but with ArmA's number accuracy (or inaccuracy rather) it doesn't produce good enough results

#

the 2 options I see at this point is to either implement an existing PRNG algorithm in SQF (fuck me if I have to do this) or writing an extension, which means I most likely won't be able to use it in an MP environment (and definitely need an addon for it at that point)

#

does anybody else here see a 3rd option? if not, which one of the 2 would you pick?

subtle ore
#

@half inlet Extentions alone can be loaded via server or client root, no need for an addon necessarily

half inlet
#

that's good news, though there's still the problem of finding a server provider that lets you upload custom extensions

#

from my experience most providers don't allow this, some do provided you send them the source code (so they can compile it)

subtle ore
#

Yeah not sure the whole deal with that. I've always done my own installation. Your provider should be reasonable and allow you to upload it (like you said) given source and it's functionality

half inlet
#

in my specific case, an extension would be the last resort - ideally everything should be handled in-mission so as to have few to no requirements (since this would be for a group I play with)

#

I think I'll go with an SQF implementation of one of the many algorithms then, see how well that goes

#

I'm just concerned about the performance, but I might be able to work around that eventually

hushed minnow
#

the only real SQF language bug in existence?

halcyon crypt
#

no clue what the actual bug is but to "solve" whatever it is:

_art = [player,"fob_support"] call BIS_fnc_addCommMenuItem;
_art;
#

with or without the semicolon at the end doesn't matter 😛

hushed minnow
#

Yeah, it works and its been like that since I took over the project.
As I understand, the last statement is what is returned, but we discard the return anyway.

halcyon crypt
#

¯_(ツ)_/¯

spark phoenix
#

Any fans of genetic algorithms here?

peak plover
#

genetic?

#

Wait a minute

meager heart
#

sqf natural selection problems ? 😀

peak plover
#

😂

spark phoenix
#

Ah yes its done

#

Where can I upload this pointless work of art to share with you guys?

peak plover
#

pastebin / github

#

can you elaborate?

spark phoenix
#

Genetic Algorithm for generating a specific string written in sqf

#

the most pointless thing ive ever written, sqf can't process quick enough to do machine learning, but it was fun for my first time writing one from scratch.

peak plover
#

What does it mean

spark phoenix
#

I wanted to prove to myself that machine learning could be done in sqf, so i did this

peak plover
#

But what do you get from this?

spark phoenix
#

literally nothing of value

#

It creates a random pool of strings

#

and uses genetic-like programming to generate

#

I ❤ ArmA

peak plover
#

I don't understand machine learning

spark phoenix
#

I hardly do

peak plover
#

So what does this do Try to generate I love arma by doing random until it gets close?

spark phoenix
#

it treats each character in each string as a peice of dna

#

just like how all the characters make a string, each character makes a "dna" strand

peak plover
#

Why call it dna

#

It should be called string reproduction sequence

#

I don't understand dna as well btw

spark phoenix
#

I really don't understand enough of it myself to explain it well to be honest

#

I used this as a way to help teach myself it

peak plover
#

Cool stuff non the less

spark phoenix
#

Yeah I learn from doing something vs reading/watching something

#

and I was like "why not use arma"

#

and all the reasons for why to not use arma made me want to use arma more

peak plover
#

The easiest and most well thought out language - SQF

spark phoenix
#

lol

peak plover
#

But in layman's terms, it's string reproduction through randomness?

#

I wonder now, how to utilize this

meager heart
#

bookmark it...

#

you can ask later somewhere "Any fans of genetic algorithms here?"...

unborn ether
tough abyss
#

Can someone please tell me how to get the vcom ai menu back in game?

unborn ether
little eagle
#

Run Vcom ai.

#

This channel is also for mods, Dismal.

meager heart
#

how to get the vcom ai menu back in game
press escape > vcom menu

#

option 2: read what commy said ^, press escape > vcom menu

tough abyss
#

@meager heart I don't have the vcom menu in the escape menu

#

Hence why I asked

meager heart
#

i know there is vcom ai tutorials on youtube, might be helpful for you, DavidNickisson

#

also check forum

still forum
#

@half inlet To the pseudo random number generator... You say Arma's Number accuracy isn't enough. You won't get any better with a SQF algorithm or an extension. Floats are floats. Every number in SQF is a float. You can't change that. (okey.. Theoretically you could... But I don't think you want to go that route)
@hushed minnow If you discard the result and you are 100% sure no one in the world who might use that function might try to store the result (0 = call ... also counts. And some Idiots do that everywhere.) then it's okey.
Otherwise you will kill any script that tries to store your return value because you return nothing. You don't even return nil. There is nothing there. Pure nothingness.

compact galleon
#

There is nothing there. Pure nothingness. - The description of a Flat Earther's head

hushed minnow
#

@still forum So your point is, that in the event of someone doing something stupid, I shouldn't leave that as the final line, just in case someone does something stupid just like saying nil = true

#

So does that mean the last line should just be nil

still forum
#

Most performance efficient would be a number. Because nil is a full command that would get called.
Most people just put nil at the end. I guess you could also just return the variable you just assigned at the end or whatever

compact galleon
#

Or just return SKDFJDSKJEYGIJFJRSIKJSEFKADJFG

hushed minnow
#

@still forum So just 0 then, like unix zero

still forum
#

yeah. Or 1337 or whatever 😄

#

If 3 microseconds for a call to nil are not too much for you you might aswell use nil

compact galleon
#

@still forum Is nill faster than nil?

still forum
#

😮

#

I don't think I made a direct comparison of variable vs command yet

hushed minnow
#

Preferable i think ill call noop to the cpu /s

still forum
#

Fastest way would be to use my SQF optimizer and just let it add a push instruction automatically if a function ends with a variable assignment ¯_(ツ)_/¯

compact galleon
#

nil is 0.3 microseconds on my PC. So is nill

still forum
#

How fast is 1 ?

#

That should be faster. Otherwise that might be the limit of diag_codePerformance

#

Which means that my 0.3 microsecond for every command call might be wrong 😮

compact galleon
#

0.2micro

still forum
#

Puh... 😄

hushed minnow
#

😮

compact galleon
#

nil alternates between 0.2 and 0.3 microseconds

#

nill between 0.3 and 0.4 microseconds

#

0 stays at 0.2 microseconds

meager heart
#

true ?

hushed minnow
#

Does true/false have similar time?

compact galleon
#

0.3 microseconds

#

And alternates between 0.3 and 0.4 when accessing a variable assigned true/false

#

So looks like commands are faster than variables

hushed minnow
#

You know who the real winner at the end of the day is?

compact galleon
#

Me

hushed minnow
#

damn it, I was trying to be all shocking and stuff

still forum
#

true/false are SQF commands. So about same as nil

compact galleon
#

right

still forum
#

Though nil has one less memory allocation. But that's a pool allocator anyway. Atleast on Windows

#

private local variables are faster than both though

#

Well. I guess depends on how balanced the hashmap is...

#

I should do more micro benchmarks 😄 \(o_o)/

little eagle
#

How about not assigning the return value at all. 🤔

still forum
#

I think in his case he was assigning a global variable

#

And the script isn't supposed to return anything

little eagle
#

So the function ends with an assignment?

still forum
#

assigning a local variable on the end of a script is ofcause a different thing :D
Yes

little eagle
#

Ending a function with an assignment makes the game bug out when you call the function and assign it's return value to another variable.

still forum
#

As I already explained an hour ago

little eagle
#

Just put a nil at the end. Using an undefined variable like "nill" or "noop" makes it complain in scheduled enviroment.

#

Dedmen, any progress on that blog thingy?

still forum
#

Need someone who can design stuff to make a main page

#

I guess we could copy ACE stuff? Or bux could?

little eagle
#

Don't ask me. If I made a site, it'd look like Stallman's.

still forum
#

Same for me

compact galleon
#

I think mine looks okay

warm gorge
#

Good to finally see confirmation of a new Arma on Enfusion

compact galleon
#

Eh?

warm gorge
#

Seems like confirmation of a new Arma by the looks of it

#

Not sure if this is old news to some

#

I think @still forum said something about an engine last night

compact galleon
#

They've been talking about Enfusion for a while. First time they've officially absolutely said they ARE working on a new Arma

#

Although, I'm not too excited

#

They said they'd make it less ARMA so they can put it on consoles

#

At least that's what it sounded like: "Arma 3 was designed for PC and a port would not do it justice. It would need to have been considered from the start. Our new Enfusion engine has better multi-platform support, so it will be more feasible for potential future Arma games."

#

The way I see it, the only way ARMA can be ported to console, is to remove all that makes it ARMA

warm gorge
#

I don't see how. Of course their going to keep PC compatibility as a main priority in terms of making it the most feature packed and moddable

little eagle
#

"pc compatibility" is a very low bar for "all that makes it ARMA".

#

Oh well. If it'll suck, it'll suck. Can always leave the sinking ship and play something else.

meager heart
#

i hope "crossplatform" never happens for arma

little eagle
#

You were tonking of this.

still forum
#

👍

queen cargo
#

shouldn't param also work with any value? i mean ... params is also not complaining if it gets passed non-arrays

still forum
#

Yes. They both take ANY

queen cargo
#

meaning the [...] is just adding useless overhead

still forum
#

one makeArray instruction in a postInit script yeah

#

like 2 microseconds in a 20ms+ total postInit

#

Wow. Just checked a RPT from exile I had lying round. Total >15 seconds of postInit

queen cargo
#

could somebody check what

missionNamespace setVariable ["foo", 1];
missionNamespace getVariable ["foo"]; //this outputs
missionNamespace getVariable []; //this outputs
missionNamespace setVariable ["foo"]; //this outputs
missionNamespace setVariable "foo"; //this outputs
missionNamespace setVariable []; //this outputs
missionNamespace setVariable [1, "foo"]; //this outputs
little eagle
#

The [] are not useless.

private _vis = _object getUnitTrait "camouflageCoef" param [0, 1];
private _vis = nil param [0, 1];
private _vis = nil;
#

nil as input of any command fails. This is also true for param (unless _this is undefined and you were using the unary version, because _this was not really the true input).

#

This means _vis would still be undefined and the whole thing is unnecessary overhead that doesn't fix the bug.

#

Really disappointed to read this here. I thought we went over this years ago.

queen cargo
#

but that is true for commands that acceppt any too?

#

like .. rly?

little eagle
#

Yes, any command fails if the input on either side was nil. Even if it accepts type ANY. That has nothing to do with it.

queen cargo
#

hah ... always thought ANY would actually acceppt nil ...
was logical for the others ... though ... silence fail is still stupid

#

but for ANY i expected different as NOTHING is also an actual type

little eagle
#

Yeah. Anyway,

[<expression-potentially-reporting-nil>] param [0, <default-value>]

is the fix for it.

queen cargo
#

you got arma running @little eagle ?

little eagle
#

Any if construction is slower.

#

Not atm.

#
missionNamespace setVariable ["foo", 1];
missionNamespace getVariable ["foo"]; //this outputs
missionNamespace getVariable []; //this outputs
missionNamespace setVariable ["foo"]; //this outputs
missionNamespace setVariable "foo"; //this outputs
missionNamespace setVariable []; //this outputs
missionNamespace setVariable [1, "foo"]; //this outputs

You want the error messages?

queen cargo
#

yup
and if they work

little eagle
#

L1 works, the rest will fail.

queen cargo
#

but error msg and is it just a warning or an actual terminating error

#

missionNamespace getVariable ["someundefined"]; you know if this will error? there is no default afterall

compact galleon
#

2 expected, 1 provided

little eagle
#

Yes ^

queen cargo
#

but no error if it is defined?

#

fuck SQF wtf

still forum
#

No

#

it errors before it checks if the variable exists

compact galleon
#

Always error

still forum
#

Actually...