#arma3_scripting

1 messages ยท Page 252 of 1

jade abyss
meager granite
#

Your suggested approach will work like this

_array = [player, objNull, objNull, player, objNull, objNull, player];
_todel = [];
{if(isNull _x) then {_todel pushBack _forEachIndex}} forEach _array;
{_array deleteAt (_x - _forEachIndex)} forEach _todel;
#

Doubt its any fast though

jade abyss
#

Still better then " - "

#

:/

meager granite
#

Trying to find quickest method to do this, have to go through rather large array in single frame somewhat often

jade abyss
#

hm

austere granite
#
_deleteIndex = 0;
_array = [player, player, objNull, player, objNull, player]
{
    if (isNull _x) then {
        _array deleteAt (_forEachIndex - _deleteIndex);
        _deleteIndex = _deleteIndex + 1;
    };

} forEach _array;

not sure on speed, but can test

meager granite
#

Wish there was ++ command to increment number variable in single command

austere granite
#

yea i agree

jade abyss
#

0,018ms PerfTest

_Index = [];
_Arr = ["1","2","2","3","2"]; 
{ 
 if(_x == "2")then{_Index pushback _forEachIndex;};
}forEach _Arr;
_Index sort false;
austere granite
#

_deleteIndex ++ 1;

#

there's also

meager granite
#

_deleteIndex += 1; then

#

or ++ for single incrementation

austere granite
#

@meager granite will it be unique elements in the array or overlapping?

jade abyss
#

0,0155ms (no clue why faster WITH deleteAt)

_Index = []; 
_Arr = ["1","2","2","3","2"];  
{  
 if(_x == "2")then{_Index pushback _forEachIndex;}; 
}forEach _Arr; 
_Index sort false; 
{_Arr deleteAt _x}foreach _Index;
meager granite
#

Unique

#

Try it on bigger array, @jade abyss

austere granite
#
_array = [player, player, objNull, player, objNull, player];
{
    if (isNull _x) then {
        _array deleteAt (_array find _x);
    };
    nil;
} count _array;
#

I don't know how fast that is, but i've seen it get used quite a lot

jade abyss
#

Currently doing.

#

find, hmm. i doubt thats better.

dusk sage
#

What does your array contain @meager granite (types?)

austere granite
#

obviously it wouldn't work for non-unique

#

(IE my exammple... :D)

meager granite
#

list of entities, some of which become null over time and I need to clear them out while retaining same array

austere granite
#

well just check in arma and see what's faster.

meager granite
#
array = [];
for "_i" from 1 to 300 do {array pushBack (if(_i % 3 == 0)then{player}else{objNull})};

array of 300 elements for execution time checks

austere granite
#

that's not unique though, so keep that in mind obviously when testing

#

but yeah i think fasted loop through array is currently { /whatever/ nil; } count _array

dusk sage
#

0.095 ms, (for your 300 array)

#

Hows that?

meager granite
#

Using what approach, @dusk sage ?

dusk sage
#
array = array select {!isNull _x};

Assuming you only have objects etc, within your array

jade abyss
#

That works? oO

dusk sage
#

Ofcourse

austere granite
#

good point actually

jade abyss
#

Nice to know.

dusk sage
#

But if you have any other types, strings, scalars, w/e, it'll hit the ground like a truck on each frame, haha

austere granite
#

all the new usages of select are so nice

jade abyss
#

So its just usable for NullCheck?

meager granite
#

I creates new array, point was to retain original array

dusk sage
#

Why are you looking to retain your original array?

meager granite
#

It is referenced from multiple places through local variables

#

If it wasn't about keeping original array, I'd go for - [objNull] which times quicker than select {}

dusk sage
#

So you're relying on the local variables being pointers to your predefined array?

#

To change

meager granite
#

It is not predefined and changes dynamically with time

#

I guess we could use select code like command which modifies original array instead

#

For now I guess I'll stick to manual iteration with forEachs

#

Something like: _array extrude {isNull _x}

austere granite
#

well

dusk sage
#

Then it's a battle between the speed of find and incrementing a variable ๐Ÿ˜›

#

I'd imagine the latter

tough abyss
#

Whats wrong with array = array - [objNull]; performance reasons ?

dusk sage
#

I creates new array, point was to retain original array

slate vale
#

I got 2 question if someone would be able to help me. First question is about the magic variable _x (count). I don't really understand it basically, is there any way someone would give me an example of how it works and what it does? Second question is I have seen alot of like %1 and %2 in codes. Example: hint format ["%1" ]. I have seen them in alot of codes in hints, scripts etc. Have no clue what they do, maybe someone could explain it to me the easiest way? I have tried Google to search but I just don't understand.

dusk sage
#

Here's some examples for you to wrap your head around:

{
    hint _x;
} forEach ["hi","bye"];

_x will give you the current element as you iterate through your array. count would also work here (using _x).
So we would see, hi, then bye, hinted.

hint format ["Hi %1 %2","Marvin", "Putrus"];

Would hint 'Hi Marvin Putrus'

slate vale
#

Ah okay, makes some sense now, still gonna try stuff till I get it 100% but thanks anyways.

dusk sage
#

np

ivory nova
#

Is it possible to turn an object, like a UAV backpack, into a "prop"? I.e. Position it in the world and not have it automatically reposition itself on it's back when the mission/server initialises?

ivory nova
#

Have tried disabling simulation locally/globally, but seems to only affect some objects

austere granite
#

createsimpleobject command

#

You can make 'any' model into a prop with that command.

#

Run it on mission start and then use setVectorUp and so to position it

#

@ivory nova

ivory nova
#

@austere granite Thank you so much, noting this down now and will try ๐Ÿ˜ƒ

austere granite
#

Does anyone know if you can keep units in the ragdolled state originally caused by setUnconscious true? It's for a mod, so editting the configs is okay

#

Already tried class Unconscious: Default { ConnectTo[] = {}; }; but no luck

austere granite
#

Yeah so basically there's still no way to properly ragdoll people and keep them incapped like that. I was rewriting my medic system, because keeping units dead has some other issues (Mainly compatibility with every other mod out there) plus all the commands that include dead units are slower, so was hoping to just use setUnconscious but then keep people in that ragdoll state

#

Changed all the animation configs that showed up when using setUnconscious false; and nothing

#

When using setUnconscious true in vehicle you can also still drive them okay, 10/10 implementation

#

Can't rotate turret, but can fire it

#

Yep.

#

Actuially that's a lie

#

... you can go forward!

#

You can't steer / go backward though

#

Good job BIS

#

Yeah expect I don't want that

#

Because it's retarded.

#

I'll just keep units dead I guess :/

#

It's all working okay, but figured I'd make use of the amazing engine-side setUnconscious command yayyyyy

#

I don't use AI, so there's that.

#

I couldn't even deal with damage handling, which for some reason didn't manage to stop units dying on.... sahrani

#

Not even kidding. it worked a-okay and did exactly what it did, but when playing on sahrani it didn't stop units from dying

#

At least I can't circumvent the inability to steer by assinging left/right analog to my pedals

#

At one point before as a ragdoll'd incap state I spawned in a dead AI unit in place instead and then switched camear to that while hiding the other unit

#

You'd constantly hear helicoptersa and so flying around, even though there were none in the mission ๐Ÿ˜„

#

Also sometimes after respawn your character would speak talking in Czech radio messages

#

setUnconscious seems to be okay if you can live with those limitation

#

I still gotta test that. Lemme do it actually, although I got custom dragging animation configs because i was getting sick of it sometimes magically transsferring into a carry (instead of drag)

#

Well blocking the other inputs should be fine

#

Turret can't move, and blocking firing I can do with defaultAction as empty addAction shortcut

#

i guess i could just run enableSimulation false; on player to keep in ragdoll

#

HAHAHA FUIG

#

i dont need camera rotation

#

but... even when you turn it back on and setUnconscious false

#

.. the camera is still in the same spot

#

cameraOn still returns player

quiet bluff
#
if (!alive tower) then {
    //code
    hint "tower down";
} else {
    //code
      hint "tower up";
};

i dont get tower down when it destroy it why?

meager granite
#

when do you call this?

quiet bluff
#

init

meager granite
#

init executes once, on initialization

quiet bluff
#

ohhh

quiet bluff
#

@meager granite how can check it all the missions duration

#

?

austere hawk
#

its only usable for modelmakers

rocky cairn
#

Any advice for setting up an AI squad to hunt for players at the last position the players engaged AI at?

scarlet spoke
#

@quiet bluff do you want it to be displayed as soon as the tower changes its state or just at one particular point in time?

#

@rocky cairn you could use a "Fired" event handler and check whether the player fired in the direction of the AI. The you simply add a waypoint to the AI so that they will move to the player's current position

rocky cairn
#

Thanks

scarlet spoke
#

You're welcome

#

You might find a better EH for that though but I'm too lazy to browse the different EHs ^^

split coral
#

Creating simple objects is probably better.

meager granite
#

You can spawn lots of objects with disabled simulation far from camera and see how it affects framerate

quiet bluff
#

@scarlet spoke as soon it change

thin pine
#

Try embracing the string into an array

velvet merlin
#

send a tweet to killzone kid

#

@tough abyss

tough abyss
#

KZK is awesome.

scarlet spoke
#

@quiet bluff then you might want to to use a waitUntil: waitUntil {! alive tower} ; hint "Tower is down!" ;

#

If you want it to fire more than on e you could do `while {true} do {
waitUntil {!alive tower} ;
hint "Tower is down!" ;

waitUntil {alive tower} ;
hint "Tower is alive!" ;
} ;`

sterile ravine
#

Have you tried it when Arma is started with filepatching enabled? (Also available as parameter in launcher) @tough abyss

native hemlock
#

I don't think filePatching is the issue. I sent Killzone Kid a message about that command back in March and the response I got from him was

logNetwork might still be WIP. I will try to find out what its status after the Easter

He is probably a busy guy, so it probably wouldn't hurt to poke him about it again

tough abyss
#

Nice code: [] spawn {[] spawn {[] spawn {[] spawn {[] spawn {๐Ÿ’ฉ };};};};};

#

I like it

tough abyss
#

There is an oficial download source for Arma 3 KOTH?

meager granite
#

No

#

If you want to know how certain thing works I'm always open to explain

tough abyss
#

I was about to make a server, but i got it. Thankyou.

ivory nova
#

Hello ๐Ÿ˜ƒ Is it possible to include rotation position data in some way when using createVehicleLocal?

ivory nova
#

Follow up:

#

Is it the case that backpacks can not be used with createSimpleObject?

#

Can turn other objects into "props", but not a UAV backpack

vapid frigate
#

createsimpleobject takes a p3d.. it should work

#

maybe it's under the ground or something

ivory nova
#

@vapid frigate I see that it has been created, but not at the coords I entered ๐Ÿ˜ฆ I'll keep toying!

#

And it is still usable, etc

native hemlock
#
someObject = createSimpleObject [_theObjectPath, AGLToASL (player modelToWorld [0, 2, 0])];
#

That should spawn it in front of the player and not in the ground

shut fossil
#

How do I go about tracking down a sound that a boat uses when it's door opens? It's a mod, therefore looking in the Cfg viewer of the boat itself, I can see the script it uses to open and close the door on user action, however the problem is that the statement = is too long and I cannot view were it defines the sound. Poking around in anything that says sound on it has proved useless, any idea's? Then what command would I use in a script to trigger that sound? Thanks! -Soko

vapid frigate
#

you can push ctrl-c with the line selected and paste it in notepad or something

shut fossil
#

-_- โค why didn't I think of this ffs, I need to quit assuming, that's going to get me in trouble one of these days...

ivory nova
#

@native hemlock Thanks! I can get the backpacks to spawn, but not as simpleObjects, even with the createSimpleObject command

#

@native hemlock Can still pick them up and equip, and can't manipulate using vectorDir, setDir, setPitchBank, etc

#

Function I have works for other objects though

#

๐Ÿ˜ฆ

#

Guess backpacks can never be decorative objects ๐Ÿ˜ƒ

shut fossil
#

@ivory nova if you have @CUP There's the Rucksack pile from ArmA 2

ivory nova
#

@shut fossil Thanks man! Will keep that in mind! Trying to stay vanilla for this one ๐Ÿ˜ƒ

shut fossil
#

@ivory nova No prob, was just throwing it out there.

#

@ivory nova Possibly try to disable the objects simulation under the special states in the editor? Or have you already tried that?

ivory nova
#

@shut fossil Appreciate it!

#

Yeah I already tried that too

#

So far only bags won't become simple objects

#

(screenshot from editor)

shut fossil
#

Hmm, that is odd. There's probably a logical explanation out there somewheres for it. That's awesome, I love that you can hit backspace in 3Den, so awesome for screenshots! xD

ivory nova
#

๐Ÿ˜„

sand salmon
#

"extDB2: Error with Database Connection1" anybody know how to fix this issue

vagrant badge
#

are you have good config ?

#

ale you have mysql database installed ?

ivory nova
#

Is there any way to obtain PositionWorld in the editor? When I copy position to log for use in createSimpleObject the resulting position is always way off from its original position in the editor

#

I'm creating a temp object on the position I get from the editor and then using getWorldPos on the temp object to plug into createSimpleObject, but always very different

#

getPosWorld*

sand salmon
#

@vagrant badge Both are installed yes

vagrant badge
#

altislife or westland ?

sand salmon
#

Altis

vagrant badge
#

are you have in @extDB2\extDB\sql_custom_v2 ini file ?

sand salmon
#

Yes

#

I got all that setup I got a mate name BoGuu to set it up but we thought it was because the Redist wasn't installed but that is no longer the case

vagrant badge
#

"extdb-conf.ini" exist ?

#

and configured ?

sand salmon
#

Yes I have the username and password set etc

vagrant badge
#

are you check log in extdb folder ??

#

@extDB2\extDB\logs\2016\8......

sand salmon
#

The last log was last night but this issue occurred today

vagrant badge
#

check logs first and paste

sand salmon
#

So the log hasn't saved this error

#

The last one was saved on the 29th and I am on the 30th

vagrant badge
#

no logs - no server started

#

correctly

#

maybe password to mysql changed by owner ?

sand salmon
#

I am he owner

#

The

vagrant badge
#

try run server and chceck logs

sand salmon
#

I have, and it doesn't save the log

vagrant badge
#

if dont save log - @extdb dont start if dont create log

sand salmon
#

Well the database isn't connected so I mean the log won't be their

vagrant badge
#

install tads and run server corectly maybe you have error in commandline to start server

sand salmon
#

I will first thing in the morning; right now I have to go to sleep but I will keep it touch with you. But I am happy to show you via TeamViewer etc tomorrow

vagrant badge
#

hmm

#

4.4r3 ?

#

first try to connect to databes by external software not arma and chceck connection

#

maybe password changed

austere granite
#

Is there a way to return contents of RscHTML control?J

#

ctrlText doesn't work

thin pine
#

Without extension it doesn't seem possible

austere granite
#

๐Ÿ˜ฆ i did see that, was hoping someoune found another way

languid forge
#

Hello, which life.sql do i need to add on my Lakeside server? I used Captain Honda's tutorial.

lone glade
#

@tough abyss just use mine

lavish ocean
#

it was always said that load*commands works only within subdirectories of Arma 3 server root
absolute (full path) outside Arma 3 server folder for -servermod= , same with profile directories and cfg locations
it puts them out of reach by various load script command features which are limited (for logical security reason)
it's wrong to try put blame on the new performance build (atm. scripts.txt isn't working due to some changes in-need of BE update)
btw. fix filters to list addweaponcargoglobal is done too

#

just to avoid some 'i didn't knew' in near future ๐Ÿ˜‰

#

not much, just most of the leaks is because of those were ignored/misconfigured and so on ...

#

and you can ofcourse imagine if someone places .ini , .cfg and his .db / .sql files into arma 3 server root (or subfolders) how it ends ๐Ÿ˜‰

#

loadFile mysecret.ini , dump to variable, transfer over another command, laugh badly ... been there seen that, 2014 and so on ...

#

ironically this was exactly reason the alloweLoadFile settings were made for and why mod,servermod, profiles and configs supports full paths ๐Ÿ˜‰

jade abyss
#

mod/servermod full path? Didn't knew that

thin pine
#

Can anyone confirm whether remoteExec(Call) with target param set to an object is broken in SP eden editor preview? e.g. remoteExecCall ["someFunc",player]; is not executing in SP eden editor preview but remoteExecCall ["someFunc",0]; is

lone glade
#

if you put an object as target it will query the server for it

#

I guess that if the server isn't present it's going to fail :/

#

my revive system

lavish ocean
lone glade
#

nice job on adding a restart server command ๐Ÿ‘ and also the super useful firedMan event

thin pine
#

@lone glade makes sense....if that's true then it'd be an oversight on whoever made remoteExec

lone glade
#

not really an oversight, just a design flaw

buoyant heath
#

Thanks for updating the wiki Dwarden.

lavish ocean
#

what design flaw ? @lone glade @thin pine

thin pine
#

@lavish ocean e.g. remoteExecCall ["someFunc",player]; is not executing in SP eden editor preview but remoteExecCall ["someFunc",0]; is

#

alganthe was mentioning a possible reason why that could be

#

and if that was in fact the reason it'd be a design flaw

native hemlock
#

By eden editor preview, are you referring to when you actually it the preview button and load in? Or when you are still able to place objects?

thin pine
#

the first one

lone glade
#

so, SP testing

#

same issue happens in self hosted too since you're the server

#

if you use -2 as target you don't recieve the remoteExec

#

because, well, you're the server.

thin pine
#

Well yeah but my problem is with the 'object' type variant of the target parameter

#

"Object - the function will be executed only where unit is local"

#

in SP: local player returns true. but the function does not execute

lone glade
#

thing is, it checks serverside which ID has the object

native hemlock
#

Debug console uses this

//--- Local
case 0: {[[], _inputCode] spawn {_this remoteExec ["call", [player, clientOwner] select isNull player]}};
//--- Global
case 1: {[[], _inputCode] spawn {_this remoteExec ["call", 0]}};
//--- Server
case 2: {[[], _inputCode] spawn {_this remoteExec ["call", 2]}};
thin pine
#

yer

#

but that's all about the number target type. I'm talking about the one where you pass an object as parameter.

someFunc = { systemchat "hi" };

remoteExec ["someFunc",player]; comment "does not work";

remoteExec ["someFunc"]; comment "does work";```
#

now anyway, I think i'll just post this on the tracker or sumn

lone glade
#

oh and also (I feel like i'm repeating myself) remoteExec mode 1 is broken and increases bandwith use by a pretty massive amount, especially when a player connects

#

increase which will create desync and server crashes.

lavish ocean
#

thanks @lone glade @native hemlock @thin pine the issues is now investigated there might be bug

worthy spade
scarlet spoke
#

@worthy spade as far as I know there should be some global variables holding the current role... But you have to dig through the sources yourself as I don't remember what's the name of them is.
If I'm wrong then you might have successfully with the metaData array used inside the respawn script...

lone glade
#

use getUnitTrait for that, it might not work with CfgRoles tho

broken forge
#

Just found something very curious/odd, I guess my texture for the water fountain/waterfall reacts to the weather in the game? If it's a stormy day/night the water will actually become rough. Hmm I wonder what it'll do if I were to set the waves to max?

lavish ocean
#

fixed @lone glade @native hemlock @thin pine see today's dev branch changelog

thin pine
#

Brilliant @lavish ocean

lone glade
#

๐Ÿ‘

tough abyss
#

Is it possible to get a custom role from cfgroles in an if (condition)?
Something like "if (role Player = "xyz") then ..."

#

Sry, just realised @worthy spade asked the same question before.
Got it?

vagrant badge
#

if (RolePlayer="Driver") ?

#

in UAV is Driver or Pilot ?

#

๐Ÿ˜›

tough abyss
#

getUnitTrait/setUnitTrait just give a Unit a Trait like Medic, so he can use MedKits :/

lone glade
#

You can define custom ones too

#

but it doesn't work like you think it works C7

tough abyss
#

but this is not what i need. ๐Ÿ˜ฆ

#

but i guess i can use uniform as well... good enough for my intentions :]

vagrant badge
#

@lone glade whats ?? i dont understand whats you write i english language

tough abyss
#

nope. everything i tried checked the editor unit, not the actual loadout -.-

vapid frigate
#

maybe there's a variable set on the unit for the role? (not sure)

#

allVariables player

dim terrace
#

is there way to force handgun flash light on?

#

like GunLightOn but for sidearm

flint summit
#

Hello, i want to ask for a help. Depending on wiki, there is command ctrlSetAngle for 2D controller in A3, but seems that it exists only in VBS. So, is there any alternatives to rotate gui elements? (link https://community.bistudio.com/wiki/ctrlSetAngle )

native hemlock
#

Are you on 1.62? It should be available

jade abyss
austere granite
#

dank

buoyant heath
#

does that mean leftPad is coming soon?

austere granite
#

As in _value = leftPad [15, 4, 0]; // "0015" ?

#

pls

buoyant heath
#

๐Ÿ˜›

worthy spade
#

What should I use now that camera.sqs is no longer...

jade abyss
#

arghs... what was the command to get the Terrain Slope/Vector... i can't remember -.-

#

nvm, found it surfaceNormal

thick ridge
#

If anyone has a need for a 3rd person view, 360 deg orbital camera (mouse controlled + zoom in out with mouse wheel let me know) let me know. Can attach to any object.

#

Essentially the same as the 3rd person free look mode

tough abyss
#

I would love to make a Squad'ish style game mode for Arma, capturing flags and building FOB's, get money buy more equitment. Anyone know if this game mdoe exists?

tough abyss
#

How do I skip an optional argument number?

native hemlock
#

For what command? The wiki should state a default value for that argument so you can use that

native hemlock
#

If you are in game you can look at the code of that function from the function viewer. If you have the game data unpacked it is in a3\functions_f\gui\fn_dynamicText.sqf

tough abyss
#

I'll have a look, thank you!

native hemlock
#

It's actually pretty ugly, but you should be able to see the default values

tough abyss
#

thank you, any idea why Bohemia decided not to allow to pass something like null, or None?

vapid frigate
#

you can pass nil

#

@tough abyss

#

and just use params

nocturne bluff
lavish ocean
#
โ€ขAdded: A new "FiredMan" Event Handler 
โ€ขAdded: A new "PlayerViewChanged" Event Handler 
โ€ขAdded: A new BIS_fnc_attachToRelative function 
โ€ขAdded: A new BIS_fnc_vectorDirAndUpRelative function 
โ€ขAdded: A new BIS_fnc_weaponDirectionRelative function 
โ€ขAdded: A new setConvoySeparation script command 
โ€ขAdded: A new toFixed script command ```
velvet merlin
#

PlayerViewChanged and setConvoySeparation werent mentioned, are they?

shadow sapphire
#

Both were in that last message.

austere granite
austere granite
#

Does anyone know how to get reliable icon scaling with drawIcon? Using 25 icon size on different terrains gives different effect. In the past I used (worldSIze / 8192) as a modifier, but that doesn't seem to be reliable

#

Actually nvm, i accidentally used it in two spots.
((getNumber (_vehicleCfg >> "mapSize")) * 0.075) / (worldSize / 8192) seems to work for scaling icons

lone glade
#

the firedMan and PlayerViewChanged weren't on the main post @lavish ocean so I suppose they were added later

#

anyways i'll finally be able to finalize my base protection system, before it didn't pick up properly who from the vehicle fired (but still deleted the projectile), should be good now.

meager granite
#

@austere granite Icon sizes had something to do with screen size constant of 640 x 480

#

I looked into this few years ago and had it figured

#

Found it, drawIcon size formula was: (480 / (getResolution select 5))

lone glade
#

FiredMan not in 1.64 T.T

meager granite
#

This size is entire screen's height

austere granite
#

I'll take a look later. Seems to work okay already though.

#

Any got a clue on how to loop a sound while fading in / out it's sound level by any chance?

#

or not possible?

rocky marsh
#

So I'm trying to spawn a zombie via the debug menu and I've got my code here "http://pastebin.com/t23Ld71t" and it spawns but it doesnt move, any ideas?

halcyon crypt
#

You're spawning the zombie at the player location making the move command pointless

#

I guess

rocky marsh
#

Nope, I removed that and they still just stand there :/

halcyon crypt
#

removed what?

rocky marsh
#

the move bit

halcyon crypt
#

try unit move [0,0,0];

#

also, setting them to careless will make them ignore pretty much everything

tough abyss
#

Hello, I have a vehicle issue. Simulation disabled and damage disabled in editor, init this lock 2; this addAction ["Unlock", "Unlock.sqf"]; this addAction ["<t color='#FF9900'>Push</t>","scripts\BoatPush.sqf",[],-1,false,true,"","_this distance _target < 8"];

#

_boat = _this select 0; _id = _this select 2; _boat enablesimulation true; _boat lock 0; sleep 2; _boat allowdamage true; _boat removeaction _id; unlock.sqf

#

when entering the vehicles on dedi you cannot get out

#

as if they were locked again

halcyon crypt
#

SP or MP?

tough abyss
#

MP dedi

halcyon crypt
#

check if _boat is local in unlock.sqf since lock requires the object to be local

#

actually, doesn't matter since you're able to enter the vehicle ๐Ÿ˜ƒ

tough abyss
#

was about to say that

halcyon crypt
#

I do feel like it's something locality related though

tough abyss
#

it does seem that way, the boats will move just a tiny bit after unlock then seem to be stuck again

#

hmm

#

would the simulation and damage flags being set in the editor instead fo teh init have anything to do with it?

halcyon crypt
#

I'd suggest testing it without the simulation and damage stuff and just the locking

tough abyss
#

Fixed it by unlocking the vehicles and moving unlock.sqf to an eventhandler

tender root
#

@here Some vehicles have hitpoints in their config although they don't really have them physically. (for example the Hunter has the same eight wheel-hitpoints as the HEMMT although he only has four wheels) Is there a way to determine whether these hitpoints are just "fake"

tulip summit
#

how much usage of global setVariable is too much?

#

I just looked at exile and they only call it 95 times on client.

tender root
#

PS: I'm not really sure if this question fits more in the config-editing channel soo..... ๐Ÿ˜„

tulip summit
#

Mine calls it FAR more than that, and I'm wondering if it is affecting performance

native hemlock
jade abyss
#

They are beeing returned, since they are pre-defined in the Config.

tender root
#

yes

jade abyss
#

"Car" iirc

#

+What Penny wrote.

#
  • add a check, if the Dmg of that Hitpoint is > 0 . If not -> Ignore/Skip that one.
tender root
#

Yes they are beeing returned

#

Yeah but i want to get a average wheel damage of the vehicle to do that i would just sum them up and divide by the amount of wheels

jade abyss
#

get the current Cfg Entry and count it

#

iirc, there are just the "active ones" in it

#

with false, instead of true ( "true" stays!)

tender root
#

ill try

jade abyss
#
_HitPoints = [];
_GetCfgProp = configProperties [configFile >> "CfgVehicles" >> (typeOf cursorTarget) >> "HitPoints", "_HitPoints pushBack configName _x; true", false];
{diag_log _x}forEach _HitPoints;```
Try this one
tender root
#

Yeah seems to work

#

thx @jade abyss and @native hemlock

#

didn't know that command exists

jade abyss
#

And if all breaks loose -> getAllHitpoints -> forEach (getAllHitpointsArray select 0)-> if _x in ["Wheel1","wheel2"] (define all Wheels you wanna check) then ((GetAllHitpointsArray select 2) select forEachIndex)
something like that

#

erm... messy up there, but i think you get what i mean ๐Ÿ˜„

tender root
#

actually no ๐Ÿ˜‚

jade abyss
#

then... i can't help you^^ I am too tired

tender root
#

no problem

#

the solution with configProperties seems to work so i will go with that one

#

im tired as hell aswell ๐Ÿ˜ด

jade abyss
#
_Dmg = []
_GAHTPArr = getAllhitpoints cursortarget
{if(_x in [PredefinedArrayWithTheNamesOfTheWheels])then{_Dmg pushback _GAHTPArr select 2) select _foreachIndex}; }forEach (_GAHTPArr select 0);
_Dmg_Tot = 0;
{ _Dmg_Tot + _x;}foreach _Dmg;
_Dmg_Tot = (_Dmg_Tot / count(_Dmg_Tot));
hint str _Dmg_Tot;

don't think its clean, but gives you a hint ๐Ÿ˜„
(Means: Messy and (for sure) not the best way, but it should work like that :D)

tender root
#

ahhhh now i get it

#

thx for the help

tulip summit
#

i see exile does this to compile it's code

#

_code = compile (preprocessFileLineNumbers _file);

missionNamespace setVariable [_function, _code];
#

wait...nevermind, answered my question. ๐Ÿ˜›

#

wait, no i didn't. haha. why do they set the variable too? shouldn't _code = compile do it?

austere granite
#

global versus local vars, read up on them

#

_code compiles it, but there's no way for other functions to access it like that, that's why it's saved under missionNamepsace, which really just means _function = _code, except inthis case it'll be accesible everywhere

mint frost
#

Mh why doesn't they use compileFinal for the function variable?

tulip summit
#

I changed it just to compile so that I can edit it in the debug console without having to restart mission.

#

it is normally compileFinal

mint frost
#

Ah good

meager granite
#

entities "WeaponHolderSimulated" is much faster than allMissionObjects "WeaponHolderSimulated"

#

yes

#

Yes, allMissionObjects for GroundWeaponHolder, entities for simulated ones

#

Also (allMissionObjects '') select {_x isKindOf 'WeaponHolderSimulated'} works just fine

nocturne bluff
#

its pretty slow

meager granite
#

Your example should work fine too, problem must be from elsewhere

#

But yeah its better to let engine do class-dependent selection in entities and allMissionObjects for you, it is times and times quicker than scripted checks for larger number of entities in the world.

nocturne bluff
#

he means feeding the command the class and let it do the sorting in C++ land

meager granite
#

second might be better since amo goes through each and every entity in the game each time you call the command

jade abyss
#

if (typeOf _x isEqualTo 'weaponholdersimulated') <- Just stood up, so don't judge me if wrong ๐Ÿ˜„

#

Yeah, its typeOf

thin pine
#

You should try to get into more config stuff......once you're able to combine config work with scripting no-one can stop you :D except hard engine limitations

halcyon crypt
#

if ruins is a parent class of whatever object you're testing then it works fine

#

isKindOf goes through all of the parent classes of the object

jade abyss
#

gnah... arma! y u no update damage when u setHitpointDamage someone arghs... -.-

zenith bramble
jade abyss
#

Nah, can't use that

tough abyss
#

Anyway to set a custom GPS window position in the mission file or in a mod? I want to move the GPS windows a little bellow.

worthy spade
#

The position is user defined, so I don't think it can be moved by a script.

tough abyss
#

@worthy spade I believe it have a default position, when you are in the Arma 3 Hud profile, where everything is default.

tough abyss
#

okay so apparently I am using the wrong bikey even tho I directly copied the keys from my PC to the server, and all I get is session lost. Before I would get the exact addon that was causing problems. How can I find that out now?

halcyon crypt
#

if it's related to keys it should also be reported to the RPT I think

#

session lost usually indicates a crashed server though

jade abyss
#

#server_admins <-- There they are talking. He posted that in several chans

rocky cairn
#

Is there a way to get the location of a marker that a player has placed?

tulip summit
#

Performance wise, is it a bad practice to compile all the functions on the server and then PV them out?

jade abyss
#

It's stuff, that needs to be transported over the Net, each time a client connects, sooo...

robust egret
#

If you are going to do that. Just do parts of files. I'm assuming your doing it to keep stuff secret...

jade abyss
#

short: Keep the script as simple and short as possible.

#

OR: Let the server handle the stuff and send requests over with remoteExec(call)

tulip summit
#

yes, both secret and to help prevent those who would try and exploit the files to their advantage. Such as if I make a mistake that allows them to do something on the server.

tulip summit
#

comes with my career. ๐Ÿ˜›

#

put the functions into a pbo for clients, and call them from the server?

#

ahhhh, ok, gotcha

#

thanks. ๐Ÿ˜ƒ

meager granite
#

I guess there is no way to switch throwable muzzle?

meager granite
#

Interestingly SwitchWeapon action does change to throw muzzles but only if this muzzle is empty.

#

Yeah, there is no way

meager granite
#

Is it me or explosiveSpecialist trait (setUnitTrait) doesn't actually do anything?

elfin bronze
#

Hey, I have a problem, when exec my script i go "Error Undefined variable in expression: _vehicle" and i dont know why ...
My params are ok in my rpt : "50065600# 3: offroad_01_unarmed_f.p3d 10 50 1234"

params [
["_vehicle", objNull,[objNull]], //This return the current vehicle
["_armSpeed", 0, [0]], //Retrun 50
["_activateSpeed", 0, [0]], //Return 70
["_disarmCode", 0, [0]] //Return 1234
];
diag_log format ["%1 %2 %3 %4", _vehicle, _armSpeed,_activateSpeed,_disarmCode];
private ["_vehicle"];

[_vehicle] spawn {

    waitUntil {speed _vehicle >= _armSpeed};

    _vehicle say3D "bombarm";
    hint "Bom armed";

    waitUntil {speed _vehicle < _activateSpeed};
    if (_vehicle getVariable "speedBombSet") then {_vehicle setDamage 1};
}; ```
indigo snow
#

When you spawn, you dont reassign _vehicle

#

Add params ["_vehicle"] after you spawn your code

elfin bronze
#

omg -_- thank you !

meager granite
#

Nevermind, explosiveSpecialist requires Toolkit just like engineer

quiet bluff
#

how can i put the map(live with drwing and marker) on object like whiteboard?

thin pine
#

Can't...not live

quiet bluff
#

ok

plucky beacon
#

Is it more effecient for enemies to be spawned in with scripts, or have them in the mission sqm itself?

tough abyss
#

Having a trigger issue. Type: none activation: BLUFOR Activation type: Not Present not repeatable server only. Condition vehicle player isKindOf "Air" The trigger fires as soon as the player enters an air vehicle instead of being in an Air vehicle and outside the trigger zone.

plucky beacon
#

What's the onAct

tough abyss
#

script that ends the mission

plucky beacon
#

is it single or multiplayer

tough abyss
#

multi

plucky beacon
#

One group or multiple groups of players

tough abyss
#

one group

plucky beacon
#

try syncing the trigger to the group, and you'll get new conditions instead of (Blufor,Opfor....) and get ones like (This vehicle, any of group, all of group)

tough abyss
#

Ahhh didnt think of that

plucky beacon
#

make sure you use "thislist"

#

acutally if it's set up properly I think you can get away with using "this"

indigo snow
#

try this && {vehicle player isKindOf "Air" }

tough abyss
#

@indigo snow That worked thanks

indigo snow
#

this contains the BOOL value of the trigger conditions. Adding it back in means the conditions apply again.

tough abyss
#

AH ha

steep matrix
#

how to sqf:cmd sort config data type?

candid abyss
#

Let me guess: There is no way to retexture a BagBunker_Small that isn't debinarizing the p3d model, or is there?

austere granite
#

@candid abyss your guess is correct

candid abyss
#

did they create cutom p3d files?

halcyon crypt
#

they're probably warfare construction models

candid abyss
#

and therefore they should available in the samples?

halcyon crypt
#

if they included them then sure

#

I'm not 100% sure since it's been a while since I've played A2 warfare but I think it had those preview models

candid abyss
#

Going to search through the sample data, maybe I find some stuff.

candid abyss
#

@halcyon crypt you are right, it is indeed from the warfare construction thing. That also explains why in the video only some have the outline. But that is already a huge step forward

tough abyss
#

@Quiksilver#5042 agree with you. I had backup each 5 minutes on my high populated A2 Epoch server.

#

About don't worry too much about hackers.

#

The more you worry the more you get problems.

native hemlock
halcyon crypt
#

+1 @lavish ocean ๐Ÿ˜ƒ

velvet merlin
#

yeah this should be made available in diag.exe finally

#

there is also draw modes for AI

austere granite
#

Yes pls

native hemlock
elfin bronze
#

I want to have a "dynamic" text in my dialog so the I do it with sleep, but it's not clean I have 150 lines ... Anyone know how to optimize this ?

_text ctrlSetStructuredText parseText "<t size='0.8' font='PuristaLight'>Dรฉmarrage de la procรฉdure de dรฉsamorรงage en cours<t/>";
            sleep 1;
            _text ctrlSetStructuredText parseText "<t size='0.8' font='PuristaLight'>Dรฉmarrage de la procรฉdure de dรฉsamorรงage en cours .<t/>";
            sleep 1;
            _text ctrlSetStructuredText parseText "<t size='0.8' font='PuristaLight'>Dรฉmarrage de la procรฉdure de dรฉsamorรงage en cours ..<t/>";
            sleep 1;
            _text ctrlSetStructuredText parseText "<t size='0.8' font='PuristaLight'>Dรฉmarrage de la procรฉdure de dรฉsamorรงage en cours ...<t/>";
            sleep 2;
            _text ctrlSetStructuredText parseText "<t size='0.8' font='PuristaLight'>Dรฉmarrage de la procรฉdure de dรฉsamorรงage <t color='#26b026'>OK</t><br/>Chargement du code<t/>";
            sleep 1;
            _text ctrlSetStructuredText parseText "<t size='0.8' font='PuristaLight'>Dรฉmarrage de la procรฉdure de dรฉsamorรงage <t color='#26b026'>OK</t><br/>Chargement du code <t color='#26b026'>OK</t><t/>";
            sleep 0.5;
            _text ctrlSetStructuredText parseText "<t size='0.8' font='PuristaLight'>Dรฉmarrage de la procรฉdure de dรฉsamorรงage <t color='#26b026'>OK</t><br/>Chargement du code <t color='#26b026'>OK</t><br/>Anaylse de l'architecture systรจme .
            <t/>";
            sleep 1.5;
            _text ctrlSetStructuredText parseText "<t size='0.8' font='PuristaLight'>Dรฉmarrage de la procรฉdure de dรฉsamorรงage <t color='#26b026'>OK</t><br/>Chargement du code <t color='#26b026'>OK</t><br/>Anaylse de l'architecture systรจme ..
            <t/>";

Demo : https://www.youtube.com/watch?v=sYt6PnGO_9g&feature=youtu.be

velvet merlin
#

well the really useful ones are like AI view, AI roadmap, AI cost map, AI danger map, etc

#

its kinda weird also that they dont share the diags used for the pathfinding eventhough they want repro missions

lone glade
#

I fucking wish I had access to them

velvet merlin
#

dont we all?

halcyon crypt
#

@elfin bronze setup an array with the string and the time it should wait and go through that?

#
{
    _text ctrlSetStructuredText parseText (_x select 0);
    sleep (_x select 1);
} forEach _yourArray;
#

something like that I guess

#
_yourArray = [
    ["<t size='0.8' font='PuristaLight'>Dรฉmarrage de la procรฉdure de dรฉsamorรงage en cours<t/>", 1],
    ["<t size='0.8' font='PuristaLight'>Dรฉmarrage de la procรฉdure de dรฉsamorรงage en cours .<t/>", 1],
    // etc
];
#

it's probably better to append the periods instead of having separate strings though.. ^^

elfin bronze
#

Oh thank i test this tomorow

elfin bronze
#

Ok i try it it's work but le text is whipe each time :/

I try this but it's still whiped

            {
                _text ctrlSetStructuredText parseText format ["%1%2", ctrlText 36901,_x select 0];
                sleep (_x select 1);

            } forEach _textToShow;

austere granite
#

36901 isnt anything

grizzled cliff
#

lol @ people trying to hide SQF code from prying eyes

#

just GIVE UP

#

seriously, every solution you can think of is easily countered.

#

Trust me, I know more than you about SQF and how it works.

ionic aurora
#

greetins gentlemen , how would i impliment a sound feed back when i kill enemy ai or anyone in my missions ?

#

if AI or player kill ,play sound ?

#

wat event covers both ai and player death ?

velvet merlin
#

need your support guys

velvet merlin
#

well i guess you are right to large parts; however the AI code is probably in the worst state of all engine parts; and there is only limited AI programmer talent on the market; finally to switch to another solution is not feasible I'd assume; the thing VBS decided to use didnt seem to "explode" either

#

however i would assume they still wand and will reuse most AI parts for the new engine

#

maybe merge it somehow/somewhat with the ToM/CC AI engine parts

halcyon crypt
#

I think VBS has a 3rd party AI system

#

@grizzled cliff is intercept still on your radar or is it abandoned?

velvet merlin
#

a few high level questions:

  1. how does one best cache the content of a text field in a dialog - save to profileNamespace?
  2. is there a functionality/framework in A3 already to have a history for a text field (last 10 entries)?
  3. can one verify the input of a text field for correct sqf to avoid errors on execution?
native hemlock
velvet merlin
#

cheers

little eagle
#

yes, the expressions from the extended debug console are stored in the profile. this is the only way to keep them persistent between game starts

#

i know you all know this, but this is how I think about it:
missionNamespace... persistent during mission, deleted after mission restart
uiNamespace... persistent during session, deleted after game restart
profileNamespace ... persistent across game restarts

velvet merlin
#

would you limit the amount of entries to store? also when to store - on execution or when no longer focusing the field?

little eagle
#

I think it's all in one variable ... array

#

on execution

#

note that enter key is bugged atm. only pressing the "exec" button(s) works

velvet merlin
#

also i guess it would be useful to have also to select from the list of saved entries, rather to step through them one by one (probably that list should be unique entries only and sorted)

little eagle
#

maybe. that's not what it does atm. atm it just goes backwards (or forwards) in history

#

I think it would be usefull to have a "exec scheduled" button

#

so you don't have to write 0 spawn { .... }; all the time when testing if your function actually works in it's intended environment

#

But generally debugging with the console isn't helpful imo. Just set up a proper dev environment and reload the mission

#

I guess that is due to the debug console obviously not understanding macros, which I usually use

#

limit is 50 statements in the array, apparently

#

githu lies. this function is from nou. I just put it in one file instead of having all this in the general pre/postInit function directly

sly mortar
#

Does anyone know of a way to script the creation of players? I would like to have a script that creates the playable units so I don't have to do it manually in the editor everytime I create a mission.

halcyon crypt
#

NOTE: Currently in Arma 3 this command does nothing.

#

it's kinda expected because the host/server needs to know how many slots are available

sly mortar
#

That's a shame, I was hoping there was a way to execute some code prior to the lobby to create the units and just define the player numbers in description.ext

#

I suppose I could just do it manually in the editor and make it a composition that I can add in when I start a new mission.

velvet merlin
#

"exec scheduled" button
@little eagle good point. will consider it

#

@sly mortar open sqm in text editor

#

use (regex) search and replace to mass add the attribute to the desired units

sly mortar
#

I tend to not edit the sqm file manually as it seems to get rewritten each time I open it in the editor.

velvet merlin
#

what i am unsure about is convenience functions for mission testing or AI debug

halcyon crypt
#

@sly mortar you're doing it wrong then... ^^

#

if you edit the (unbinarized) sqm file and reopen the mission in the editor it will have your changes

little eagle
#

yeah. reopen the mission before saving it again ingame. otherwise you overwrite your changes with the temporary files which don't have them

#

save -> alt tab, edit, -> load

torn jungle
#

player SetPos [(getMarkerPos _dest select 0)-10*sin(_dir),(getMarkerPos _dest select 1)-10*cos(_dir)];

#

hey can anyone tell if theres anything wrong with this?

little eagle
#

the array after setPos requires 3 elements, xyz

#

so there must be a second comma somewhere

#

also you might wanna use the alternative syntax of getPos

#

origin getPos [distance, heading]

#

so:
player setPos (getMarkerPos _dest getPos [10, _dir]);

#

looks way less confusing (if you get used to the alternative getPos syntax)

fallen skiff
#

just a quick question... what is the arma 3 scripting language? I am a sort of advanced beginner programmer, learning to program with Python, btw

halcyon crypt
#

SQF

#

nothing "mainstream"

fallen skiff
#

ok thanks

#

actually one more question ... would it be possible to adjust the brightness of helicopter gauges via scripting? They are too bright when night flying

little eagle
#

no

fallen skiff
#

that's what I suspected

halcyon crypt
#

you could overlay them with a semi-transparent image .. ๐Ÿ˜›

fallen skiff
#

that's an idea!

little eagle
#

do you mean those 2d things from advanced flight model?

fallen skiff
#

yes, there are 4 of them near bottom of screen in advanced flight

little eagle
#

you actually can change them

fallen skiff
#

you can move them in Layout I think

little eagle
#

you have to edit the "controls"

#

that's what they call ui things

fallen skiff
#

really the only problem is the brightness, and as I say, only when night flight... i like this transparent overlay trick idea

#

can you give me a hint how to start learning how to do that?

#

I can program like a beginner ๐Ÿ˜ƒ

little eagle
#

it's best done via config

#

but you'd have to create a mod for that, not scripting

fallen skiff
#

dearie me

#

I wonder if i could use an always-on-top prog totally outside the game and just stick it on

little eagle
#

maybe I can figure something out, but getting the controls only via scripting...

#

using CBA?

fallen skiff
#

cba = already-existing mod?

little eagle
#

yes

fallen skiff
#

if i were to make a mod, does that mean I couldn't play on any Mulit server that didn't also run that mod?

little eagle
#

everyone would have to have that mod

fallen skiff
#

hmm perhaps not the best approach then

ionic aurora
#

hey guys how come this doesnt spawn the weapon "arifle_Mk20_GL_plain_F" createVehicle position player;

little eagle
#

createvehicle uses objects, not weapons

#

you have to create a "ground weapon holder"

#

it's basically the same as a ammo box. you can add the weapon to it via addWeaponCargoGlobal

#

@fallen skiff the display can be found using uiNamespace getVariable "igui_displays"

#

but it shows a bunch, so you have to figure out which one it is. The position can change though depending on what you do

#

you also have to adjust the controls every time they are created.

#

basically every time you enter the helicopter or a savegame is loaded while sitting in one

fallen skiff
#

just checking game options/layouts and colors...

#

I found uiNamespace getVariable "igui_displays" in binary game save files, is that where I should be looking?

little eagle
#

nope. they never adjust it via scripting

austere granite
#

It's added to by initDisplay

little eagle
#

not really. initDisplay is just a function that runs after the display is created via engine magic

#
class RscInGameUI {
    class RscUnitInfoAir;
    class RscUnitInfoAirRTDBasic: RscUnitInfoAir {};
    class RscUnitInfoAirRTDFullNoWeapon: RscUnitInfoAir {};
    class RscUnitInfoAirRTDFull: RscUnitInfoAirRTDFullNoWeapon {};
    class RscUnitInfoAirRTDFullDigitalNoWeapon: RscUnitInfoAir {};
    class RscUnitInfoAirRTDFullDigital: RscUnitInfoAirRTDFullDigitalNoWeapon {};
};
#

it's one of these if you wanna go with config

fallen skiff
#

what file is that found in?

little eagle
#

no idea. I got it from the all in one config

#

ui_f ?

#

Yup A3_Ui_F, so add that to requiredAddons in CfgPatches

fallen skiff
#

I'm afraid this is a bit over my head -- what do i need to study first to eventually do this?

#

am I making a mod for my own testing purposes?

halcyon crypt
#

Don't say that it's over your head.. ^^

#

Having a goal in mind is a great way to actually learn real stuff ๐Ÿ˜ƒ

#

"I want to reduce brightness on the AFM dials" is way better than "I want to learn SQF"

#

but yeah, everything related to configs will have to be done with a mod

fallen skiff
#

yes I'm just trying to find where to begin.... I found the Config lists in the debug editor thing

#

so I will be creating a mod?

halcyon crypt
#

yep

fallen skiff
#

ok

#

so i should begin with 'how to create a3 mods'

halcyon crypt
fallen skiff
#

yes I understand that

halcyon crypt
#

there's everything related to modding arma ๐Ÿ˜ƒ

fallen skiff
#

awesome

#

in one sense what i want to do may be simple -- i'll make a mod using everything that exists already, with one little helicopter, but I'll try to change the AFM dials only

halcyon crypt
#

^ that's mostly about scripting though

fallen skiff
#

I see he makes things like '3D Compass' in Arma -- I'll contact him and see what he thinks about chaning dial brightness

tough abyss
#

There is a way to know if a vehicle can be destroyed? For exampe, sand bags can't be destroyed, and i need to detect it.

tough abyss
#

Found: Need to check for the existence of classes inside the vehicle class DestructionEffects. The sandbag have an empty class DestructionEffects.

meager granite
#

Look at destrType

#

Also I think you might need to look at "armor" as I think some objects can be destroyed but practically impossible due to extremely high armor value.

#

Pretty much you need to check for DestructNo or 0 values in there

#

There is also DestructDefault case which takes destruction type off p3d, you'll have to guess it by model name and purpose in such case.

grizzled cliff
#

@halcyon crypt Yea, kinda dead. Wish someone would take it up in my absence. Too busy building satellites now.

tough abyss
#

@meager granite thanks for the tips.

#

To avoid the case where some building explode and others not i'm using deleteVehicle on everything that is not motorized and setDamage 1 in everything that is motorized (cars, tanks, Heli, planes...). This is part of the player properties management, where he can destroy his stuff anytime.

steep matrix
#

how to sort configFile data type fastest?

#

array sort true doesnt work for it

#

toString with configName; sort the array of strings; determine the position of the elements with find and reshuffle the original array that way?

vapid frigate
#

sort by the configName?

#

(array apply {[configName _x, _x]} sort true) apply { _x select 1 };

#

which is pretty much what you said i think

steep matrix
#

thanks! let me check how it goes

vapid frigate
#

not sure if that's enough brackets.. might need ((array apply {[configName _x, _x]}) sort true) apply { _x select 1 };

steep matrix
#

hm

#

it doesnt like to have sort applied on the array returned by apply directly as far as i can tell

#

e =(c apply {[configName _x, _x]}); e sort true;

#

i dont get this part though: array apply { _x select 1 };

#

ah nvm

#

<- stupid

#

ok speed test now

vapid frigate
#

the apply x select 1 is to convert it back from [configName _x, _x] to just _x

steep matrix
#

yep i got it ๐Ÿ˜„

#

unfortunately its not that much faster to the other approach

#
        _cfgEntries = (_cfgEntries apply {[configName _x,_x]});
        _cfgEntries sort true;
        _cfgEntries = _cfgEntries apply {_x select 1;};

probably the double array creation slows it down a lot

vapid frigate
#

yeah

steep matrix
#

previous:

{
    if (count _this < 2) exitWith {};

    private ["_array1", "_array2", "_tmp", "_isSorted"];

    for "_inc" from 0 to (count _this -2) do
    {
        for "_dec" from _inc to 0 step -1 do
        {
            _array1 = toArray(toLower(configName(_this select _dec)));
            _array2 = toArray(toLower(configName(_this select _dec +1)));
            _isSorted = false;

            for "_i" from 0 to (count _array1) do
            {
                if (_i >= count _array2 || {_array1 select _i > _array2 select _i}) exitWith
                {
                    _tmp = _this select _dec;
                    _this set [_dec, _this select _dec +1];
                    _this set [_dec +1, _tmp]
                };
                if (_array1 select _i < _array2 select _i) exitWith {_isSorted = true}
            };

            if _isSorted exitWith {};
        };
    };
};```
vapid frigate
#

would be nice if you could put a custom predicate on sort.. something like 'array sort { configName _this > configName _other }'

#

for now i think doing it manually is the best performance though

steep matrix
#

well ive asked KK if they could make sort work with configFile data type ๐Ÿ˜ƒ

wispy kestrel
#

Would it be possible to override the function call of the Spectate button on the respawn menu? Meaning, I'd like to call my own function instead.

austere granite
#

Make something that triggers once (findDisplay 49) exists (the menu)

#

Then look up the IDC of the spectate button and add from there

velvet merlin
#

Tweaked: Vehicle-in-Vehicle Transport vehicles now have their side set when loaded with another vehicle
Tweaked: It is now possible to load a vehicle into an enemy vehicle by script or editor
Added: The ability to load data from a config class using unit setUnitLoadout config

tough abyss
#

BRPVP Tip: You can make custom buildings appears on map easily with draw rectangle and getting bbox x and y sizes. The "artificial rectangle" match perfectly the map native buildings.

crimson hawk
#

i have a question why do my characters never enter the incapactitated state even after i enable there attibutes throught the editor

#

am i doin something wrong?

agile pumice
#

Question about saving profile namespace, does clearing the user profile saved/usersaved folder not clear it properly?

fallen skiff
#

I want to make an in-game overlay using scripting, is this a reasonable scripting thing?

meager granite
#

yes

tough abyss
#

BRPVP Tip: Programing + Cooffee + Cheese is good.

fallen skiff
#

hurray i just made my first ever functioning script, here it is: sleep 5; hint "hint says hello";

#

it works

#

I hope you will all subscribe to my new YouTube channel, "Vicious Lee -- Postdoctoral Scripting."

#

I'm watching video tute on beginning scripting, the guy tests his scripts with something called "Model Viewer." How do i do that? Right now I'm just testing by restarting the mission from Eden Editor

vapid frigate
#

testing scripts or models? I think that'd be buldozer

fallen skiff
#

made progress, got Arma 3 tools running correctly

quiet bluff
#

i want to create a dialog that will be open and user will be still able to play

#

and then the dialog name?

#

_screen = createdisplay "monitor";?

safe forum
#

What a maximum value of a variable where type "number"?

safe forum
#

Nice, thanks

hasty pond
#

Any ideas on making objects that are attached to players not collide with players in multiplayer missions? I've been thinking this for a day now and can't come up with a JIP friendly and good solution in terms of performance

buoyant heath
#

Carrying objects? Will they be carried long enough to justify worrying about JIP?

scarlet spoke
#

Disabling the simulation should also disable collision...

tough abyss
#

^

#

Just disable simulation. You should be good.

little eagle
#

I don't think position updates will be made if you disable their simulation. maybe attachTo overrules that though. the command causes constant position updates (and therefore constant traffic)

hasty pond
#

I'll try it out. Thanks.

tough abyss
#

@little eagle constant position updates like to use setPos each frame?

#

@crimson hawk hey, was able to enable incapacitated state? I also have interest in this one.

crimson hawk
#

@tough abyss i was somehow it worked and im not sure how but i enabled the revive and respawn ability throught the missions attibutes page and when i uploaded the mission to my dedicated server it worked but did not work in the editor so im not sure

#

@tough abyss but i would just try it throught the editror

tough abyss
#

@crimson hawk thankyou, i will try that.

little eagle
#

disableCollisionWith does not work with PhysX objects

#

constant position updates like to use setPos each frame?
kinda, but not each frame

fallen skiff
#

Can someone tell me how to get this bit of code working in editor --

#
    private "_private";
    _playerPos = getPosATL player;
    drawIcon3D [
        "\a3\ui_f\data\IGUI\Cfg\Radar\radar_ca.paa",
        [0,0,1,0.5],
        [_playerPos select 0,_playerPos select 1,2.3],
        5,
        5,
        direction player,
        "COMPASS",
        0,
        0.03,
        "PuristaMedium"
    ];
};```
#

where do i put it? init.sqf didn't seem to work

#

I see it references the P drive, I have that mounted and all the correct folders and files seem to be there

#

other little statements and commands in init.sqf DO work for me now

#

so i know the basic scripting routine is working

little eagle
#

Don't use onEachFrame It's deprecated obsolete and replaced

fallen skiff
#

ok

little eagle
#

addMissionEventHandler ["EachFrame", { ... }];

#

But if you do this for drawIcon3D then you should use Draw3D instead of EachFrame

fallen skiff
#

well the game is seeing it now, but I have an undefined variable, would it be 'player'?

#

I think I need to declare some variables before this block?

zealous solstice
#

player dont exist in this context

#

but why you will call this in the editor?

fallen skiff
#

I mean that I write this in init.sqf, then I 'Play Scenario

#

from the Eden Editor

#

perhaps I should not have said "call this in the editor"

#

Here let me paste my entire init.sqf, it is very small:

#
Draw3D {
    private "_private";
    _playerPos = getPosATL player;
    drawIcon3D [
        "\a3\ui_f\data\IGUI\Cfg\Radar\radar_ca.paa",
        [0,0,1,0.5],
        [_playerPos select 0,_playerPos select 1,2.3],
        5,
        5,
        direction player,
        "COMPASS",
        0,
        0.03,
        "PuristaMedium"
    ];
};```
#

that's all I have in init.sqf so far. I must be missing something?

zealous solstice
#

Draw3d dont exist

#

read commy2 commt exacly

fallen skiff
#

yes I'm trying to understand

little eagle
#

you write

#

addMissionEventHandler ["Draw3D", { ... }];

#

and put your script into the curly brackets

#

instead of "Draw3D { ... }"

fallen skiff
#

like this?

#
{
    private "_private";
    _playerPos = getPosATL player;
    drawIcon3D [
        "\a3\ui_f\data\IGUI\Cfg\Radar\radar_ca.paa",
        [0,0,1,0.5],
        [_playerPos select 0,_playerPos select 1,2.3],
        5,
        5,
        direction player,
        "COMPASS",
        0,
        0.03,
        "PuristaMedium"
}];```
#

that can't be what you meant

little eagle
#

exactly like this

#

but you're missing a ] bracket

fallen skiff
#

got it, works

steep matrix
#

๐Ÿ˜

#

that list is insane compared to whats available in arma

thin pine
#

Military simulator vs military game

split coral
#

I'm sure they're looking over everyone's shoulder, just like everyone does in the same industry.

#

Or do you mean something specific they've blatantly copied from modders?

thin pine
#

That's a good thing...bohemia does it too

#

It'd be bad if companies didn't look at ways to improve their product through a possible modding community

#

First two very noticeable examples that popped up in my head happen to be Gluck's work. Firing from vehicles and more noticeably and recently the squad radar

#

But yeah i get that the vbs team's looking at arma modders' ideas...:P

velvet merlin
#

are they doing it well though?

split coral
#

Well, modders do it for free, VBS designers do it for money. ๐Ÿค”

#

And BIS does share a lot of their ideas publicly on their website and videos

velvet merlin
#

ehm like what?

#

do you have an example

#

BIS does share a lot of their ideas publicly on their website and videos

meager granite
#

So turns out Tanoa objects are physically unavailable if you don't have DLC bought and will be invisible if placed in the game.

velvet merlin
#

the classes are present but empty p3d assigned, right?

#

or dummy p3ds used?

split coral
#

@velvet merlin I'm not exactly sure what kind of ideas are we talking about, but they have a bunch of youtube videos for example. I assume there's a lot of ideas there...?

meager granite
#

Probably just no p3d, I guess it calls error on clients too

#

Didn't test, but it sure does happen with pillboxes

#

Actually fire geometry is bigger than visible hole

#

So there are some threshold where you can shoot through the wall

thin pine
#

Uhhm tanoa classes are present?

#

I thought they weren't

meager granite
#

Just tested, no error on client, just invisible

thin pine
#

Nice

meager granite
#

isClass(configFile >> "CfgVehicles" >> "Land_PillboxBunker_01_hex_F") => false

#

on client without apex

#

So none of these green repainted buildings are available or visible on clients without apex

meager granite
#

Why do you need doors anyway?

#

Waste of time if you ask me

thin pine
#

If you know the selection names use selectionPosition with a distance check in the condition of the addactions

#

If close to left door show option

#

Saves you UI work and stays closer to native controls

austere granite
#

Is it possible to instantly stop any gestures currently playing?

austere granite
#

in this case I'm playing gestureHandFreeze, but I'd like to switch to some other (Make some custom ones) but it entirely depends on whether I can stop them whilst playing

wind heron
#

Is there a nice way to select a specific digit of a number?. Ie if i have 12 in a variable then i get split it into 1 and 2

buoyant heath
#

Grey, one of the alternate select syntaxes will work.

wind heron
#

Couldnt see a number syntax for select. Closest was the string but i didn't fancy messing with converting strings. Ill see if the basic syntax works

split coral
#

@wind heron
(str 12) select [1,1]
or
parseNumber ((str 12) select [1,1])

native hemlock
#

Do you know how many digits there will be, and can there be decimals?

little eagle
#

count, find "."

#

1.65

lime tangle
#

Whats the difference between preprocessfile and loadfile for loading a function in an external file

#

also whats currently the best texteditor + addons for development?

fallen skiff
#

stridey i'm very new to sqf but the doc pages for those two commands suggest that loadfile simply reads and returns the content of its target file, whereas preprocessfile actually executes any commands and functions in it

#

loadfile returns a string containing the contents of the file

lime tangle
#

Yeah. I was just looking at the different ways

#

Both need to be compiled so eh

#

ill stick to loadfile

tough abyss
#

I have 2 vars that needs to be changed together, or before anything else executes, to maintain consistency on others scripts that use then. There is a way to garantee that?

little eagle
#

Whats the difference between preprocessfile and loadfile for loading a function in an external file
with preprocessFileLineNumbers, the file will be preprocessed, which means that all comments (// comment, /* comment */) are removed and all macros are resolved.
With loadFile, the file is directly converted into a string.
loadFile is a nieche command and not very usefull outside a few edge cases. Never use preprocessFile, as the lineNumbers version is more powerfull, in that it adds the line numbers to error pop ups, which greatly helps debugging.

#

I have 2 vars that needs to be changed together, or before anything else executes, to maintain consistency on others scripts that use then. There is a way to garantee that?
Execute the script that sets these two variables before the other scripts and IN UNSCHEDULED ENVIRONMENT. Either via preInit, or you force unscheduled environment with one of the various tricks out there.

rocky marsh
jade abyss
#

@meager granite

So turns out Tanoa objects are physically unavailable if you don't have DLC bought and will be invisible if placed in the game.```
I told you a few weeks ago ๐Ÿ˜‰
thick ridge
#

Anyone know off the top of their head what happens if you use the localize script command and the key doesn't exist?

little eagle
#

""

thick ridge
#

perfect

little eagle
#

might cause RPT logging

thick ridge
#

oh nice

#

yeah that's what I'm looking for

little eagle
#

: )

tough abyss
#

@rocky marsh the z's you're making are civilian themselves. it won't target its own faction.

#

civilian setFriend [civilian, 0]; <--- this would set all civlians against each other.

#

I guess don't arm non-zombies

rocky marsh
#

ive made them east, west, independent, etc etc but it wont work?

#

i tried that

#

but it still didnt work :/

tough abyss
#

"Have effect only when called on server" ... fyi. shouldn't matter if you tried in the editor.

rocky marsh
#

I was on a server doing it..

tough abyss
#

[ civilian, [ civilian, 0 ] ] remoteExec [ "setFriend", 2 ];

lime tangle
#

@little eagle thanks

thin pine
#

Brendan, although we don't really support zombies on the civ side, try enabling the "Allow zombies to attack civilians" options in the zombie settings or abilities module

#

Odds are that'll attack fellow zombies tho

nocturne bluff
#

BIS

meager granite
#

Because BIS campaign missions don't need it

velvet merlin
#

^ +1

austere granite
#

So anyone knows waddap with selectionNames on a house showing "door_handle_1" but when using selectionPosition "door_handle_1" it returns [0, 0, 0]

#

Is there another way to get the position of that memory point?

#

Is there some actually good reaosn that it's impossible to retrieeve thse points that obviously exist? I also checked the rotation sources and so already, but none of those give me a position either.

dim terrace
#

I guess that selection exist in visual lod only

#

and selectionPosition returns pos from special lods only

austere granite
#

Yep tried all of them

#

The Door_Handle_N_Axis does return a position... ofcourse that one isn't shown through selectionNames though ๐Ÿ˜„

#
                // -- Try to get the door handle position -- //
                private _splitPosition = _memoryPoint splitString "_";
                private _trySelection = format ["%1_Handle_%2_Axis", (_splitPosition select 0), (_splitPosition select 1)];
                private _doorPos = _building selectionPosition _trySelection;
                private _realTime = false;
                if (_doorPos isEqualTo [0, 0, 0]) then {
                    _doorPos = _building selectionPosition _memoryPoint;
                } else {
                    _memoryPoint = _trySelection;
                    _realTime = true;
                };

extremely elegant, but it works

tame portal
#

Are there other ways to enable the new revive system other than the module on the map?

#

ah so its not a module, its a EDEN setting hm

chilly surge
#

Hey Guys!
Is there any option to add a big radio (tfar) to a civilian car/the police car?

scarlet spoke
#

@tame portal you can use the description.ext to activate the revive system

tame portal
#

So, the same "old" commands?

scarlet spoke
#

Old?

#

Just look up the different commands for the description.ext and there should be some listed in order to configure the revive system (what I know for sure is that you have to use the "revive" respawn template)

tame portal
#

There are in fact commands but they are listed as "old"

#

Overhauled by the new system, no indicator whether the old commands still have their functionality though

tame portal
#

Urgh

#

Okay so the old method via template Revive doesnt work apparently for me

fallen skiff
#

How do I make the simplest possible overlay? I just want to start with drawing a black rectangle which covers part of screen (later I will make it transparent to filter brightness of some HUD elements)

tough abyss
#

I added this on description.ext to enable revive:

#

respawnTemplates[] = {"Revive","Counter","Base"};
reviveDelay = 6;
reviveForceRespawnDelay = 3;
reviveBleedOutDelay = 120;

#

But was unable to test it because i continue to die without a incapacitated stage.

#

Any help please? ๐Ÿ˜„

tough abyss
worthy spade
#

Well, if you actually read that page you will notice that you configure revive in the editor nowadays. ๐Ÿ˜ซ

tough abyss
#

Yes. Still not work, not sure because i'm alone on server and there is no one to revive... but will keep testing.

worthy spade
#

I believe it only works in multiplayer.

tough abyss
#

Thankyou for the help. I noticed my mission.sqm is a little screwed... i will try do to it 100% the Eden editor and then put it in my mod.

#

I did it manually.

humble frost
#

When setting multiplayer settings is it better to do it manually or use the editor?

worthy spade
#

You have more control in the configs. 3den multiplayer settings works just fine though.

tough abyss
#

If you can figure out what was changed in the sqm by Eden editor, you can change your sqm file manually. I will go for trying to do it 100% at Eden editor.

humble frost
#

I'm having issues opening the sqm I use notepad++ and downloaded a config for it but it still is encoded

tough abyss
#

a program called unRap can convert it to txt

humble frost
#

awesome thanks ๐Ÿ˜ƒ

tough abyss
#

๐Ÿ˜„

#

@humble frost on the general atributes you can uncheck the last option "binarize mission" and i believe it will be saved as text.

humble frost
#

really? Awesome thans @tough abyss

jade abyss
#

If the Wiki is missing a Syntax -> Check the Debug Console:
logNetwork [filename, filter]

velvet merlin
#

does it even work?

jade abyss
#

No clue

meager granite
#

I wish there was case-insensitive in command, toLower'ing strings or doing count check with == comparison is so much slower than single command when dealing with large arrays

jade abyss
#

Isn't isEqualTo doing that?

meager granite
#

== is already case-insensitive

#

but it means you'll have to execute code block for each array element while in command is fully handled by engine but case-sensitive

#

Or you meant that in command does isEqualTo check?

#

It does indeed, but I was looking for case-insensitive fast solution

jade abyss
#

Fast != Arma =}

broken mural
#

new to scripting, quick question.

with Params;

#

params [["_mode", "", [""]] what does that third value mean? the [""]

#

I see that the _mode value is set to "" (or whatever param I send to it), but what is the [""] saying? Wiki suggests it's.. expecteddatatypes, expectedarraycount but none of that makes sense lol

meager granite
jade abyss
#

check Param

meager granite
#

[""] means that only strings will be accepted

jade abyss
#

["",[]] means: String AND Array is accepted

broken mural
#

+1 sa-matra! that also explains the other half of the param values; I assume [0] means only ints

jade abyss
#

like when you expect a number:
_res = [0] param[0,-1,[-1]];
hint str _res; //0

_res = [""] param[0,-1,[-1]];
hint str _res; //-1

broken mural
#

Thanks to you both!

jade abyss
#

yw

tough moth
#

Anyone know of a way to have dedicated server save container contents between sessions and persist?

jade abyss
#

db

lime tangle
#

MySQL hell

#

What would be the best way to write a mission that extends the default exile one? I don't want to have to edit core files because then when I want to update exile it will be living hell

meager granite
#

profileNamespace is sufficent enough since you don't need to share it between servers

lime tangle
#

eh having done research looks like my only choice is to edit the core files

#

kek

#

why cant this be more like gmods modding api

meager granite
#

Well you can create your addon for server which registers your CfgFunctions and then simply add in calls (instead of code itself) to your functions in exile server side

sharp jay
#

Anyone know how i can remove all items from a player?

austere granite
#
removeAllWeapons _unit;
removeAllAssignedItems _unit;
removeAllItems _unit;
removeAllContainers _unit;
removeHeadgear _unit;
sharp jay
#

oh, would this work in a trigger?

austere granite
#

seeing triggers don't do anything magical special things.. yes

sharp jay
#

Thank you.

austere granite
#

Obvoiusly you'll have to make sure that _unit actually refers to whoever you're trying to remove from

sharp jay
#

yeah'

tough abyss
#

I have a code statement i want to add in BE script.txt filter, but this statement is from Arma 3 vanilla code and is splited in 4 lines. How i add it to script.txt if it is 4 lines?

#

For example:

#

[
"B_CAR_F",
100
] someFunction;

rancid ruin
#

@native hemlock please post more gists on your github

#

i've had it in a stack of tabs for months but you haven't posted anything new in months ๐Ÿ˜ข

native hemlock
#

lol of what though? I've run out of ideas for debug type stuff

rancid ruin
#

RTS camera please

velvet merlin
#

AI debugs

jovial nebula
#

Hi guys, may I ask you if anybody knows if this

while { (hour < 12 && hour> 00 ) && (count >playableUnits < 10) } do {};

Is more resource-heavy than this

while {true} do { if ((hour < 12 && hour> 00 ) && (count playableUnits < 10)) then {}; sleep 1800; };

Thank you all

little eagle
#

it is, because the first one evaluates multiple times in a frame

#

So it's running all the time

#

also the first one has a script error

#

the second one too. pseudo code?

jovial nebula
#

Pseudo code yeah.

#

Thank you, i'll stick with 2nd solution

little eagle
#

you can also put the sleep into the while code field

#

while {sleep X; <CONDITION>} do {<STATEMENT>};

tough abyss
#

Is there any way to freeze the current time in Arma?

#

I want the environment to stay at a particular light level.

little eagle
#

setAccTime 0

tough abyss
#

At the very least, slow it down as much as possible.

#

Thank you!

#

I can put this in the initserver safely, yes?

little eagle
#

it only works in SP mode

tough abyss
#

Oh, well, then it won't work for what I need

#

That will, though

little eagle
#

this works in MP, but it's only the daytime, not the speed things move

tough abyss
#

Yeah, that's what I want.

#

Thank you so much~!

humble frost
#

Does anyone know how to track terrain objects getting destroyed? For example destroying a radar tower that has already been placed onto the map?

little eagle
#

you add a "killed" event handler

#

a piece of code that will be executed when the assigned object dies

humble frost
#

How can I track a preplaced object though?

little eagle
#

hmm, you probably can't

humble frost
#

I could have sworn there is a way but okay thanks though ๐Ÿ˜ƒ

little eagle
#

I mean, you can try adding the event handler anyway

humble frost
#

It's what I think im going to do

little eagle
#

I was told BI did stuff with streamed objects

humble frost
#

Oh okay if this makes it easier I managed to find the object id for the tower

little eagle
#

nah

humble frost
#

okay guess im placing an invisible object that will get destroyed lol

little eagle
#

just place a game logic on the tower and get the object with nearestTerrainObject or some command like that

humble frost
#

okay

little eagle
#

these map ids might change

#

it's a bad method

humble frost
#

oh really how come?

little eagle
#

when BI changes the map, the ids are completely different

#

e.g. when they add a rock on the other end of the map

humble frost
#

oh okay this is for thirsk from arma 2 though so I don't think that there are going to be any updates to it

little eagle
#

maybe. do what you want. just warning you about what might happen

#

a "killed" event handler is the solution

humble frost
#

Yeah i get that ๐Ÿ˜ƒ thanks for the help there though commy ๐Ÿ˜ƒ

jovial nebula
#

@little eagle cool! didn't think about that

little eagle
#

you should always put the sleep in the condition. otherwise you still have a death loop if the condition is false

#

imo

tough abyss
#

Oh, another question. Is there anything I can do to prevent players from picking up enemy equipment?

little eagle
#

hmm

#

maybe don't let the players open the inventory on them as containers?

#

return true to overwrite

#

You have to somehow figure out that the container is from an enemy

#

it will be ugly and finicky. no easy way unfortunatly

tough abyss
#

Damn, alright

#

Thank

jade abyss
#

Is it AI only?

tough abyss
#

The enemies? Yes.

fallen skiff
#

In a name like "A3_Characters_F" -- what does the F indicate?

tough abyss
#

iirc futura the original name of arma 3

fallen skiff
#

oh so it's probably not too important

#

just vestigial

mint frost
#

@tough abyss [\n"B_CAR_F",\n100\n] someFunction;

tough abyss
#

@mint frost thankyou!

jade abyss
#

anybody got an idea to disable ONLY PhysX? (enableSimulation falseis not an option, since i need it enterable (seats))

tough abyss
#

hello, I'm trying to give a trigger a statement by a code but it seems not to work.
_newTrigger setTriggerStatements ["this", "_newObject animate ["Door_1_rot", 1]", "_newObject animate ["Door_1_rot", 0]"];

#

11:00:48 File C:\Users\***\Documents\Arma 3 - Other Profiles\***\missions\***\***\***\***_charlie.sqf, line 44 11:00:48 Error in expression <atements ["this", "_newObject animate ["Door_1_rot", 1]", "_newObject animate ["> 11:00:48 Error position: <Door_1_rot", 1]", "_newObject animate ["> 11:00:48 Error Missing ]

vague hull
#

_newTrigger setTriggerStatements ["this", "_newObject animate ['Door_1_rot', 1]", "_newObject animate ['Door_1_rot', 0]"];

#

should work

tough abyss
#

oh you changed " to '?

vague hull
#

you used " iside a string started by "

#

if you do that the string would end there leaving the rest as unknown syntax

tough abyss
#

so it disabled the first "

#

right

vague hull
#

strings in strings must always be mentioned in another "style"

#

if you start with " use double " or '

#

for any string inside

tough abyss
#

does it matter if I start with " or '?

vague hull
#

be aware this must be the case for each "childstring"

#

the highest depth is therefore 3 afaik

#

and would look like: "blaaa ' bhasd "" blahh "" ' "

#

however, you problem is solved isnt it?

tough abyss
#

no errrors but the trigger's still not working

#
 _newTrigger setTriggerArea [4.588, 8.851, 0, true, 4];
 _newTrigger setTriggerActivation ["WEST", "PRESENT", true];
 _newTrigger setTriggerStatements ["this", "_newObject animate ['Door_1_rot', 1]", "_newObject animate ['Door_1_rot', 0]"];```
#

it should work isn't?

jade abyss
#

Info: You can also start strings with '

systemchat '"Test"'; // "Test"
systemchat "'Test'"; //'Test'
tough abyss
#

yeah so it can be both ways

jade abyss
#

Should work, as you wrote it up there

tough abyss
#

it's weird because in my case the gate won't move

jade abyss
#

try animateSource

#

_newObject animateSource ['door_1_source',1]

#

(wich is also better in MP)

tough abyss
#

the code is working I checked it in the editor now

jade abyss
#

still: You should switch to animateSource, it has the fancy doorknob anim in it ๐Ÿ˜›

tough abyss
#

I'm using a gate ๐Ÿ˜

jade abyss
#

It is recommended that animateSource command is used instead of animate whenever is possible, as it is more efficient and optimized for MP

tough abyss
#

still not working :/

#

["WEST", "PRESENT", true]; means the activation key is BLUFOR, it's present and repeatable, right?

jade abyss
#

No clue, i don't use trigger anymore^^

tough abyss
#

ok I debugged the trigger with hints and it's working so it's something about the door anim code

night void
#

Guys, remember me please addon / mod name where u can deformate gound by explosions

#

in real time

#

Arma support it

#

or how to do it by self?

turbid jolt
#

that was DBO Afghanistan or something

night void
#

its not Afganistan, it was standalone addon

turbid jolt
#

well it was by DBO anyway

little eagle
#

you have to escape the quote marks

#

dammit discord

#

_newObject is undefined in the triggers scope, @tough abyss

#

god damit ####### discord

halcyon crypt
#

seems like it's a terrain that's generated during the mission

jovial nebula
#

Hi guys, just a quick question

Would you use the callExtension command in a while condition or it would need too much resources?
I'm trying to use the "9:LOCAL_TIME" command with extDB
So it would end up like this

while { (((extDB2 callExtension "9:LOCAL_TIME") > 0) && ((extDB2 callExtension "9:LOCAL_TIME") < 12)) } do {};

#

(Pseudocode)

vague hull
#

why dont you use missionstart (add it up with servertime

#

delivers the exact real life date and time

night void
#

@halcyon crypt i seen same thing for Arma 3

jovial nebula
#

@vague hull so i should setup a clock using those values?

#

I mean, mission start is a static array

vague hull
#

yep its like missionstart and set the hour/minute/second value + (floor time/3600)/floor(time/60)/(floor time%60)

#

just like that

#

should work just fine