#arma3_scripting

1 messages Β· Page 320 of 1

vapid frigate
#

didn't know arma 4 was officially recognized at all

pliant stream
#

idk c++ is pretty easy... who doesn't know c++

#

and if the only language you know is sqf then chances are you're such a shitty programmer that you should go learn a couple real languages anyway

vapid frigate
#

yeh it's pretty disorientating going from any other language > sqf

thick sage
#

@vapid frigate and @pliant stream, both true.

But C++ is not really a scripting language. Unless there is support for the std, etc, it is not really pleasant to script on it.

vapid frigate
#

i'm guessing that's the point.. it can be compiled

#

so you don't have all the overhead of sqf reading your scripts constantly

pliant stream
#

scripting is dumb anyway... static typed compiled is much better

dusk sage
#

If it is C++/CLI as speculated (and seen), that may serve help for those wishing to have a more comfortable introduction, despite the views of C++ programmers on it

thick sage
#

"scripting is dumb anyway... static typed compiled is much better" no

pliant stream
#

""scripting is dumb anyway... static typed compiled is much better" no" yes

thick sage
#

ok

pliant stream
#

I don't get this fascination with dynamic typing... moving something that could be done at compile time to runtime and for what? Better performance? Think again. Easier development? I don't think so... if your compiler doesn't know the types of objects all it can really do is spell check.

thick sage
#

"It ain't what you don't know that gets you into trouble. It's what you know for sure that just ain't so." - Mark Twain.

You know for sure that static typing is better; it just ain't so. To disprove a positive statement, I only need to give you one counter example. Python or R for statistical analysis.

Neither static or dynamic is better; they are used to leverage different tradeoffs.

hoary sentinel
#

short question can i give a building some thing like a "laser marked " emission? its for a simple MP mission

pliant stream
#

@thick sage go on then, explain how python is objectively superior for statistical analysis to any conceivable statically typed language.

the fact is the more the compiler knows about your code the better it can analyze and optimize it and help you.

indigo snow
#

@hoary sentinel IIRC theres a laserTarget object you could spawn for example on top of the house

hoary sentinel
#

as I understood the docu. the laserTarget is for a unit the shall mark tagets, or am i wrong?

indigo snow
#

theres the command, but i think theres also an object with a similar name you can create with a script

thick sage
#

LOL, sorry Untelo, but I will not lose my time on that.

pliant stream
#

okay then

rancid ruin
#

why are you trying to look at languages like X is superior to Y

#

languages are tools. choose the right one for the job

#

and as far as statistical analysis goes, R is the one to use. and it's not statically typed

pliant stream
#

i have no clue.. hes the one that started bringing up specific languages

#

i was just talking about static vs dynamic typing in general

thick sage
#

well, that was my point from the start, @rancid ruin, "Neither static or dynamic is better; they are used to leverage different tradeoffs"

rancid ruin
#

i agree

#

and i know it's fun to bash SQF, but if the end goal is to script for arma 3, then SQF is the best language to use πŸ˜„

#

right tool for the job, etc

pliant stream
#

only by virtue of being the only tool available

halcyon crypt
#

soon you can theoretically code in whatever language you want once Intercept is done 😁

rancid ruin
#

wait and see what happens with dayz and arma 4....there will be a severe lack of mods because people will have to learn a more difficult language

halcyon crypt
#

and/or better quality ^^

rancid ruin
#

maybe, maybe not

pliant stream
#

yes but it will also weed out the idiot script kiddies

rancid ruin
#

if the end goal is for people to make things to enable them to have FUN in a video game, who cares how it's achieved? i think there is real value in something like SQF

#

you're not working at google, you're making missions for a fucking game lol

thick sage
#

totally agree @rancid ruin, great comment

pliant stream
#

so fuck quality of code then eh

rancid ruin
#

no need to be all elitist and protective over your code

#

we're here to have fun, are we not?

#

yes fuck quality of code, doesn't matter if the end result is fun

pliant stream
#

personally i don't find either dealing with shit code, or playing a buggy/laggy game very fun but to each his own i suppose

rancid ruin
#

i remember people going through rocket's dayz mod code and ripping in to him. but he's driving a maserati and those nerds aren't.

pliant stream
#

so you're commending a guy that makes a mod and when it becomes popular makes big promises only to take the money and gtfo?

rancid ruin
#

i'm saying there's a man who brought fun to millions of people, using SQF and arma 2, that's all

pliant stream
#

i thought the point was for us all to have fun and not try our hardest to rip each other off

#

and anyway... how is writing or learning to write good code not fun?

rancid ruin
#

i'm talking about the end result. players don't give a fuck how well something is coded if they're having fun, and rightly so.

pliant stream
#

in my experience they do give a fuck about how well the game works though, and that's a direct result of how well it's programmed

rancid ruin
#

well, the grass is greener on the other side. i've had like 10 years of fun out of arma games, played 100s of mods made using a shonky scripting language. maybe if they'd used java i'd have played more fun mods, maybe not.

#

years of collective SQF knowledge will be made obsolete as soon as they change language. maybe for the best, maybe not. but we're still here enjoying the game so it's OK πŸ‘ŒπŸΏ

pliant stream
#

tbh there's not that much to sqf

still forum
#

Not that much? In theory maybe... But not in reality.. There are many quirks and weirdnesses/bugs

pliant stream
#

and most don't even seem to know or understand them

modern snow
#

How can I do it correct: _SomethingRandom = a specifically map maker;

pliant stream
#

wat

tough abyss
#

yeah, what?

#

@modern snow can you elaborate

#

or put that into english

vapid frigate
#

maybe just _marker = "your_marker_name";

warm gorge
#

@tough abyss No unfortunately

bleak schooner
#

Is there a way to access a file throug a script wich is somewhere on the arma server and not in the mission.pbo ?

queen cargo
#

@bleak schooner remoteExec for requesting, publicVariableClient for sending the file back to the client requesting

#

alt. remoteExec for sending it back too

bleak schooner
#

Actually call compile preprocessFile "ID_Admin.txt"; was, what I was looking for

pliant stream
#

ID_Admin.txt is a script? πŸ€”

still forum
#

Plus filePatchign enabled

#

alternatively loadFile

pliant stream
#

honestly if it's on the server why not just use an extension?

thin pine
clear carbon
#

my script with trigger isnt working on my server

cerulean whale
#

Elaborate please @clear carbon

clear carbon
#

when i walk in that specific area nothing happens

cerulean whale
#

Lemme get on my pc so that I can actually read those. Gimme a bit

clear carbon
#

πŸ˜‰

steep gazelle
#

Is there any script that can teleport player from place A to place B, just like BF4 elevators.

indigo snow
#

setPos

steep gazelle
#

thx

pliant stream
#

what a complex script

clear carbon
#

got help from 7erra

queen cargo
#

@bleak schooner assuming that you want an admin panel ... you are doing no good and one will abuse it
client-side checking if one is admin or client-side execution of stuff is a horrible thing that you should not do
rely on server safety above client safety
always expect the player to be a hacked client

tough abyss
#

Hi there, is there any command or way to disable the drone radar and sensors? I tried: _vehicle setVehicleRadar 2;

_vehicle setVehicleReportRemoteTargets false;

_vehicle setVehicleReceiveRemoteTargets false; but enemies are marked on the radar :/

agile pumice
#

does anyone know how the "reveal marker" map function works in the campaign?

#

like when you zoom in the map at camp maxwell

rotund cypress
#

Hey guys, does anyone know of any other way of getting variables active in missionNamespace other than allVariables?

vapid frigate
#

why do you need another one? allvariables does exactly what you asked?

still forum
#

You could detour all functions that can set variables by making your own hack and record these calls... You could use intercept and just call hookFunction("setVariable",detour) ... You could find the offset of missionNamespace in memory and manually traverse the hashmap...You could use getVariable with default value to bruteforce all variable names... But why would you do such a thing if you can just call allVariables...

cerulean whale
#

Yeah... what's the point? @SimZor#5644

modern snow
#

In my description.ext I want to #include a file from a pbo file. But it's not working : #include "\pbo_file\test.hpp" Do you know why?

pliant stream
#

either the path is incorrect, or the pbo is not loaded

rotund cypress
#

@vapid frigate, @still forum, @cerulean whale; Well I wanted to know if that would be sufficient enough to use that in CfgDisabledCommands so a hacker won't get my secret variables

vapid frigate
#

ah ok, i don't know of any other way, but i imagine it wouldn't be too hard to find the list in memory

rotund cypress
#

Ye that of course

delicate lotus
#

Is there a dance animation in arma?

#

cant find any in the animation browser

warm gorge
#

Theres taekwondo

dim notch
#

The A2 dance animations aren't in 3 at least

#

Great loss

cedar kindle
#

does anyone know how to find nearby ladders? nearestTerrainObjects/nearObjects/nearEntities gives me nothing

indigo snow
#

Arent they part of the actual building?

cedar kindle
#

probably

#

they're in the config but i'd like to distance check

#

using it with action just teleports the ai

still forum
#

@rotund cypress With battleye enabled?

rotund cypress
#

What do you mean? @still forum

still forum
#

If you have battleye enabled on whereever you want to protect your variables?

rotund cypress
#

Of course I have battleye enabled

still forum
#

Then CfgDisabledCommands should surfice

rotund cypress
#

You mean since it will be harder for them to hack memory?

still forum
#

yeah

#

Well.. going KernelMode is the only BE workaround that I know atleast. And people who can do that... Can do whatever they want not just fiddle with your variables

delicate lotus
#

do players in spectator slots count to allPlayers?

quasi rover
#

I created static weapon with "creteVehicle" and gunner with "createVehicleCrew" command, but createVehicleCrew has no return value. Is there a way the crew get no damage?

rotund cypress
#

Its not actually a playable unit, but allPlayers should include yes @delicate lotus

#

set allPLayers in debug console while someone is in a slot and try

delicate lotus
#

okay ^^

halcyon crypt
#

@quasi rover mortar doesn't have "crew" defined

#

just spawn a whatever faction unit and move him to crew position

#

oh didn't read it properly.. apparently the crew thing is working fine

quasi rover
#

The static weapon was HMG and GMG. and when I use the createVehicleCrew, the crew is gunner of the weapon.

halcyon crypt
#
{ _x allowDamage false; } forEach (crew _vehicle);
#

something like that

delicate lotus
#

yup it works like that

halcyon crypt
#

almost.. allowDamage instead of enableDamage 😁

quasi rover
#

thx, I'll try it.

still forum
#

@fallow radish

this addEventHandler["Respawn",(group this) setVariable ["GAIA_ZONE_INTEND",["2", "MOVE"], false];
(group this) setVariable ["mcc_gaia_cache",true, true];

Eventhandler accepts CODE or STRING.. you passed neither of those.. CODE is wrapped in {} and STRING is wrapped in ""
You passed the return value of setVariable. Which is nothing

indigo snow
#

@cedar kindle you could try scanning the buildings for ladder climbing addactions

#

I forgot the specifics but it should be possible

#

Look around their config, youll get a modeloffset and apply that with a modelToWorld

quasi rover
#

I created USS Freedom, its turrets and crew with creteVehicle, attachTo and createVehicleCrew command by script, but the turret head is moving without imtermission. so the fire accuracy rate is low. what did I do wrong? https://youtu.be/Vuif9cd3ks4

cedar kindle
#

thanks nick

fallow radish
#

ok thanks for that @still forum

nocturne basalt
#

Hi. I am making two different variations of the same aircraft. 1 with fueltanks and the other with missile pods. I know of two ways to do this.

  1. include both(fueltanks and missilepods on top of eachother) and use a script for each variation to hide a selection.

  2. make them as seperate objects and use a script with attachTo for each of them.

which solution is best performance wise? or is the difference insignificant?

rotund cypress
#

Hey guys, does anyone know if there is any big difference between using ctrl or rsc? as in ctrlMap or RscMap

still forum
#

Rsc is a Display. ctrl is a control inside the display

rotund cypress
#

I mean like

#

some bohemia displays has

#

ctrlText

#

some have rscText

#

I.e. eden just uses ctrlText, ctrlStatic etc etc

#

Other displays mostly use RscText, RscMap etc etc

unkempt spire
#

Anyone succesfully disabled teleporting on mcc? module doesnt work, ```SQF
MCC_t2tIndex = 0;
MCC_teleportToTeam = false;
MCC_alwaysAllowTeleport = false;

little iris
#

Anyone know how to set a cooldown for a repeatable trigger after activation?

indigo snow
#

I mean did you try the cooldown attribute?

little iris
#

there is only timeout and countdown

#

i did an easy fix but not what i really wanted

#

just made the trigger huge and gave it a time out. problem is its repeatable and every player that enters will set it off

#

if there is a cooldown attribute im not aware of it

indigo snow
#

depending on what you understand with cooldown, either timeout or countdown does the trick

#

(likely timeout)

little iris
#

either way those two functions will activate the trigger once conditions are met. The problem is once the trigger activates(after conditions met) there is no way to delay a repeated activation of the trigger via cooldown or sleep unless you script it in. I just don't know how to do that.

delicate lotus
#

is there no timestamp function or something like that?

#

can you reset a trigger using a script?

#

because then you could place a second trigger with a countdown which activates the other one

halcyon crypt
#

just script it

#

set a global var with the time and check if x time has passed since last activation

#

might even be able to set the var locally on the trigger object/logic/thing

delicate lotus
#

I know what he could do

#

he could do a check for a variable which gets reset by a script which uses sleep

halcyon crypt
#

no πŸ˜›

delicate lotus
#

um why not?

halcyon crypt
#

because sleep is sleep

#

Β―_(ツ)_/Β―

delicate lotus
#

and?

#

nothing wrong with the sleep function

halcyon crypt
#

do whatever works 😁

#

personally I'd rather do time checks than sleeps

#

opinions and stuff

delicate lotus
#

the problem with time is that its not always correct

halcyon crypt
#

wut

delicate lotus
#

See comments below

halcyon crypt
#

which one?

delicate lotus
#

All of them

halcyon crypt
#

they are irrelevant in this case

delicate lotus
#

ofc they are

#

but humans like to hate things for no reasons

halcyon crypt
#

I don't hate them but in this case I prefer something time based

#

πŸ˜„

delicate lotus
#

is there a script function to get the real world time?

still forum
#

No.

delicate lotus
#

:/

#

wait wasnt there a script wich syncs ingame daytime with reallife daytime?

still forum
#

There are Extensions for that

delicate lotus
#

oh okay

little iris
#

so extensions. alright ill try browsing through the libraries. thanks guys

rotund cypress
#

will lbData index start from 0?

halcyon crypt
#

@little iris don't, the extensions mentioned above are completely unrelated to what you wanted ^^

#
[thisTrigger, thisList] call {
    private _trigger = param [0, objNull];
    private _list = param [1, []];

    if (diag_tickTime >= (_trigger getVariable ["trigger_time", 0])) then {
        _trigger setVariable ["trigger_time", diag_tickTime + 30];

        // do your stuff
    };
};
#

put something like that to the activation field

#

30 is your cooldown in seconds

#

didn't test it so it might have some errors ^^

#

I guess you could also add it to the condition field Β―_(ツ)_/Β―

austere hawk
#

holy shit, addForce and addTorque commands!

oblique spoke
#

probably not what you're hoping they are for, but maybe.

#

i hear rumors of 'canopies'

austere hawk
#

also that would seem awefully contrived to use addForce and addTorque for something that is not force and torque related ...

oblique spoke
#

Β―_(ツ)_/Β―

#

guess we'll see

still forum
oblique spoke
#

i would imagine like most things, it can be used for a number of things.

#

lol, unless it ends up being one of those things you can't. because it's 'purpose' built. πŸ‘€

dusk sage
#

The toFixed alt. syntax is neat

rotund cypress
#

Anyone know if onMap mission eventhandler will trigger when GPS is opened?

halcyon crypt
#

it won't

jade abyss
#
Added: New directionModelToWorld, directionModelToWorldVisual, directionWorldToModel, and directionWorldToModelVisual script commands ```
Neat!
#

setforce/settorque ?

#

hm, alternative to setVelocity? oO

oblique spoke
#

reyhard mentioned it being used for canopies, i assume the ejection cycle. hinted at things perhaps also working for turret popoffs. so meh, i'd like to think it'll work elsewhere. i haven't even had a chance to look or tinker with the latest update.

jade abyss
#

I got alot of ideas, what to do with it

oblique spoke
#

this is what i was hinting at earlier, but im fairly optimistic this time around.

jade abyss
#

Β―_(ツ)_/Β―

cedar kindle
#

yeah there was only setVelocity so no way of adding pitch / yaw velocity without doing it instantly with setVectorDirAndUp / setDir

austere hawk
#

seems the second point array in addForce is the application coordinate in world space and the first one is the amount of force in world space

royal abyss
#

someone awake? πŸ˜„

subtle ore
#

Definitely not

quasi rover
#

Any ideas about turret's head banging? Aircraft carrier was create by "createVehicle", turret created by "createVehicle" and "attachTo" and crews created "creatVehicleCrew". https://youtu.be/Vuif9cd3ks4 😬

halcyon crypt
#

that is very weird

#

does it do the same thing if you place the turret(s) through eden?

#

also post the full script I guess

austere hawk
#

its caused by "attach to" script. For some reason the static turret AI spazzes out when attaching their weapons to something

fiery lynx
#

Is is possible to make a player auto run without mods?

delicate lotus
#

well I think thats a bit hard but you could always set a desired velocity

warm gorge
#

That doesnt trigger any animations though, including the running animation. Its virtually impossible to do in vanilla properly

cedar kindle
#

play the walk/running animation and use animchanged to repeat it

warm gorge
#

That could work actually, ill give it a test later

cedar kindle
#
player addEventHandler ["AnimChanged", {
 player playMove "amovpercmrunslowwrfldf";
}]
#

this works

#

just make it interruptable

fiery lynx
#

Cheers mate!

quasi rover
#

Here is the simplifed code, turret's head banging on USS Freedom. Actually no crew by "createVehicleCrew", no head banging. and it's okay, no head banging if I place the turrets through Eden. @halcyon crypt
Any ideas?

_carrier = createVehicle ["Land_Carrier_01_base_F",getMarkerPos "uss_freedom_marker",[],0,"None"];
_carrier setPosWorld getMarkerPos "uss_freedom_marker";
_carrier setDir 90;
[_carrier] call BIS_fnc_Carrier01PosUpdate;

_turrets = ["B_SAM_System_02_F","B_AAA_System_01_F","B_SAM_System_01_F","B_AAA_System_01_F","B_SAM_System_02_F","B_SAM_System_01_F","B_AAA_System_01_F"];
_turretsData = [
    [[30.3,175,21.47],0],
    [[47,-0.05,19.81],90],
    [[24.8,-115,18.39],90],
    [[-29.3,-105.5,19.35],270],
    [[-29.3,-100.8,21.11],270],
    [[-39.3,178.5,21.62],0],
    [[-16.85,188,12.96],0]
] ;
    
{
    _x params ["_pos","_dir"] ;
    _class = _turrets select _forEachIndex ;
    _turret = createVehicle [_class,[0,0,0],[],0,"CAN_COLLIDE"] ;
    _turret attachTo [_carrier,_pos] ;
    _turret setDir _dir ;
    createVehicleCrew _turret ;
} forEach _turretsData ;
halcyon crypt
#

@austere hawk mentioned above that attachTo is the cause

quasi rover
#

Yes, any other solution?

halcyon crypt
#

hmm I guess you could just spawn the object at the correct position

#

without attachTo

#

since the carrier doesn't move anyway

#

_carrier modelToWorld _pos

#

for the position

#

I think

vapid frigate
#

_turret setPosASLW (_carrier modelToWorld _pos) should be it i think

quasi rover
#

Thanks, it'll be a clue for coding. @vapid frigate @halcyon crypt @austere hawk 😁

tough abyss
#

I need help with an Arma3 Altis life server. Is there anyone out there ?.

jovial ivy
#

@tough abyss Whats up?

hollow lantern
#

I attached to MK49 Spartan to a C-130J but for some reason they are behaving dump and not shooting like they do on the ground. Does attachTo affects the AI in any way?

indigo snow
#

yea they dont like it too much

#

especially being mounted upside down

hollow lantern
#

thats what I did πŸ˜„

hollow lantern
#

ah I know why @indigo snow If I enter the uav terminal I'm not able to target the enemy shikra, instead the c-130 is targeted where attached. I guess thats the problem

compact current
#

How would one get the offset of object 1 based off of object2 (Center / [0,0,0] ) I tried modelToWorld on both objects and then going through a process to subtract the values and that didnt work unless im doing it wrong ?

#

Im pretty sure i had the wrong idea on how to do it.

indigo snow
#

The alternative getPos syntax?

compact current
#

Ill take a look now one sec, Thanks

#

Dont think that would work as i need the offset of obbject1 in relattion to object2 to give the attachTo offset

#

i found somthing KillzoneKid posted awhile back which i think is what im looking for

indigo snow
#

Tried (OBJ1 modelToWorld [0,0,0]) vectorDiff (OBJ2 modelToWorld [0,0,0]) ?

compact current
#

Thats what KK did so yea think thats my solution Thanks πŸ˜ƒ

#

would require more work though as it gives the same effect as my method but instead not 18 lines its 1 lol

#

But hey now atleast i know about vectorDiff for the future xD

polar folio
#

when a client disconnects, will units spawned on his machine be always handed to the server or to someone else? maybe closest other client?

cedar kindle
#

units disconnecting will not spawn and if he had previous units they have to transfer

polar folio
#

can you elaborate? "have to transfer" - do you mean they will because they need an owner or you mean it has to be done manually?

#

i mean spawned ones using createUnit or createAgent

#

ok thx. that makes sense. saves me some debugging

delicate lotus
#

Is the clientID of the server hosting the mission 0?

cedar kindle
#

yes

#

well , owner is

subtle ore
#
[(random 60),(random 1)] remoteExec["setGusts",0,true];
[(random 60),(random 1)] remoteExec["setRain",0,true];
[(random 60),(random 1)] remoteExec["setOvercast",0,true];
#

is this anything wrong with this code?

#

Nevermind πŸ™„

#

Yep, that's why I said nevermind. My brain is so wack - no sleep πŸ˜›

#

Wow, that's serious mind fuck.

#

So, in theory. I could make super stringy looking rain? πŸ˜„

#

I'm telling you: it's all mindfuck. That's interesting, time to test! πŸ˜„

warm gorge
#

@tough abyss I've heard you say that setOvercast can be quite buggy at times. How would you recommend using it properly? Does it work okay with transitions? Or does forceWeatherChange need to be used with it for it to take effect properly. From my experience the transitions arent usually very accurate

warm gorge
#

Cheers for the detailed response. @tough abyss I might just us use forceWeatherChange for setOvercast but for the other commands such as setRain/setFog/setWind etc use transitions. Im sure that would work fine?

warm gorge
#

Has anyone used the instigator argument in HandleDamage? Not sure if I should use it over the source parameter for detecting who the killer is

rancid ruin
#

isn't that parameter new? so yeah probably not many people have used it yet

#

you could do some pioneering research right now bro, make a name for yourself

cedar kindle
#

afaik they added it just for that cause, finding out the killer

warm gorge
#

Yeah I might as well just do some testing with it.

pliant stream
#

it's pretty easy to stitch all the related handleDamage events back together... a set always begins with part "" and each event is raised synchronously and back to back

#

what you can do is give the object which damage you're tracking two array variables: dmgsets and curset

dmgsets stores all damage sets. curset stores the current damage set

on each "" event you add curset to dmgsets and start a new curset. then at at the end of the frame you can handle all sets in dmgsets as well as curset, and clean both

delicate lotus
#

can you use #define in sqf scripts?

dusk sage
#

ofcourse

delicate lotus
#

cool

pliant stream
#

it's pretty limited compared to CPP though

#

also can cause crashes at least in A2 if used wrong

#

dunno if they fixed it later

delicate lotus
#

I only play A3 ^^ and I also dont mod

vapid frigate
#

how is it limited?

#

thought it was near identical.. only things i've had not work was fine in sqf but not cpp

pliant stream
#

iirc you can't pass function macros as parameters

#

passing too few or too many parameters (can't remember which) would crash the game without any clear errors

#

no variadic macros

#

# in macro expansion i think had some issues

#

also, while it's not directly related to macros, #ifndef and #else are horribly broken

rancid ruin
#

commy the MacroMasterβ„’ will appear soon if you carry on like this

pliant stream
#

macro master eh? i wonder...

cedar kindle
#

they're literally not broken and is used often

pliant stream
#

really? maybe they fixed it in A3

cedar kindle
#

how are they broken?

pliant stream
#
#ifndef X
    #ifndef Y
        systemchat "1";
    #else
        systemchat "2";
    #endif
#else
    #ifndef Z
        systemchat "3";
    #else
        systemchat "4";
    #endif
#endif```
#

let me go and try see what happens

vapid frigate
#

nested #ifs don't work anyway

#

in CPP or SQF

pliant stream
#

what are you high

still forum
#

The only broken macro thing I ever noticed was TFAR stuff. But that's also kinda macro hell. creating 1k classes using nested macros

pliant stream
#

of course they work in CPP

vapid frigate
#

i mean arma CPP

#

not real CPP

pliant stream
#

what does that even mean? arma C preprocessor?

still forum
#

Arma only has one preprocessor

vapid frigate
#

config.cpp / description.ext

pliant stream
#

well when i say CPP i obviously mean C preprocessor

vapid frigate
#

i don't

#

yeh nested #ifs don't work in arma's preprocessor in cpp files or sqf files

pliant stream
#

i don't know where you're getting your information but nested #ifdefs work perfectly fine...

vapid frigate
#

it says IFDEFs cannot be nested, as the preprocessor will generate an error if the outer definition doesn't exist.

#

and is correct

#

so they'll work.. but only if the outer one is true πŸ˜ƒ

still forum
#

Mikero also reported nested ifdefs broken

pliant stream
#

hmm

#

you're right

#

i thought it was only nesting inside #ifndef and #else blocks that was broken

#

so it's even more broken then

thick sage
#

well, crap. I have been spending my time parsing nested #ifdef...

still forum
#

nested ifdefs are not a problem. If you pack your addon with Mikero

pliant stream
#

they are in sqf

#

this is the scripting channel after all

still forum
#

And not use them in sqf. Which armake will probably also fix. I hope.

#

So.. Depends on packer.

pliant stream
#

can't fix the game with tools... they'll be broken in sqf no matter what

#

i guess 1999 czech republic had no internet to download libcpp with

#

Β―_(ツ)_/Β―

still forum
#

No. Tools that preproc SQF before packing.. would fix the sqf.

pliant stream
#

you mean break the sqf?

still forum
#

no.

pliant stream
#

sqf being preprocessed at runtime is very useful though

#

so in my view preprocessing at build time is breaking it

still forum
#

Well.. defines in includes packed into the pbo are not gonna change after packing

pliant stream
#

no, but the pbos can change

still forum
#

Invalidating bisigns. And.. stuff

pliant stream
#

what are you on about

#

why would the signatures be invalid?

#

i can sign two different versions of a pbo with different defines can't i?

still forum
#

If you change the pbo after packing and repack it. You would invalidate the old bisigns

#

Yeah.. At build time. Meaning sqf's being preprocessed at buildtime is not a problem

pliant stream
#

jesus... in pbo A i include from pbo B a file with a bunch of macros... A doesn't know what kind of macros it's going to get from B at build time

still forum
#

You can't statically preproc the sqf in pbo A then ofcause.

pliant stream
#

exactly

still forum
#

But again that's packer/ pbo file specific.
So defines that stay in the same pbo might be preproced at buildtime

pliant stream
#

if you preprocess sqf at build time you're essentially statically linking it to an exact version of the other pbo. it's essentially the same difference as static vs dynamic lib

#

except it breaks if you use a different version of the pbo

#

it would be like statically linking to offsets in a to a specific dll, but at runtime any version of the dll might be used

#

in other words it would break horribly

still forum
#

As I said you can only preproc defines that are known to be static at buildtime. So defines that come from other pbo's shouldn't be preproced at buildtime

pliant stream
#

still doesn't fix #ifdefs

#

unless you only preprocess those, but leave the macros intact

#

i doubt such a tool exists though

#

i suppose it would be pretty neat

still forum
#

Might fix some though
For example it would fix all the macro issues in TFAR as the broken stuff is all locally defined

#

Armake could do it. Would require some work but is actually no problem.
I planned to use it for Arma.Studio. So you can set build-time global defines. To for example have debug builds and such

pliant stream
#

i'm using a separate my_debug addon that only has macros to enable or disable different debug features in sqf

#

you can just switch it out with a signed one that provides the debug features that you want

#

and no need to distribute debug versions of other addons for each release

still forum
#

You generally don't distribute debug builds anyway

delicate lotus
#

is there a way to solve this problem with little scripting?
I dynamically spawn units near players but I want to replace that system with truck delivery which means that I spawn trucks full of infantry which are moving to the players to deliver the infantry. But players also have the ability to move around on the whole map so is there a way to make the AI go back into the trucks and move them again to the players?

pliant stream
#

perhaps, but with my setup you can disable all logging with 0 performance hit because they're all macros, and you can enable them again by just switching out the small debug addon

digital pulsar
#

does allPlayers include people in lobby?

delicate lotus
#

no because they arent a entity at that moment

digital pulsar
#

ok

delicate lotus
#

Wow I just wrote my own object grapper function until I realise that BIS has already one ...

rancid pecan
#

Hello

#

all

#

my problem one

queen cargo
#

was created back in mantis time

pliant stream
#

No doubt but it's not like they'll fix it

#

I got the impression that no one from 15 years ago even works on arma anymore, and knowing what the code looks like i dont blame them for not wanting to touch it

#

I guess using actually working open source libs was too mainstream for them

rancid pecan
#

The infistar closes the "fired event handler" and the safe zone does not work. How to fix it?

tough abyss
#

@delicate lotus is it better than BIS', though?

delicate lotus
#

I dunno if it even works

#

I just made it export

#

still need to do import stuff

#

I hope the worldToModel and modelToWorld stuff works like I think it works

#

revealing objects to all players speeds up the rendering process right?

halcyon crypt
#

what? πŸ€”

subtle ore
#

@delicate lotus why don't you take a look at the wiki? 🀦

rancid ruin
#

@delicate lotus re: trucks + AI, i would just delete both and create new ones when players move far away

delicate lotus
#

mmh yeah sounds like a good idea

rancid ruin
#

you could be waiting for any amount of time for the AI to get their shit together

delicate lotus
#

true

subtle ore
#

🀦

rancid ruin
#

i also wrote an object grabbing script before i found the BI one, welcome to the club!

delicate lotus
#

@subtle ore stop with that. You are like a 12 year old who only answeres shit to all questions

subtle ore
delicate lotus
#

well stop replying then

#

not that I need a reply from you anyways

subtle ore
#

Oh god forbid I could help cries

delicate lotus
#

you and help. Funniest joke ive ever heard xD

#

but I thought youd like to stop replying to me?

indigo snow
#

please, ladies

delicate lotus
#

yes

subtle ore
#

πŸ˜ƒ

rancid ruin
#

is one of you a Life developer or something?

delicate lotus
#

me? no

subtle ore
#

@rancid ruin Not a chance.

rancid ruin
#

then you should both be above this petty squabbling

subtle ore
#

That was a ongoing conversation, ignore it. End.

tough abyss
#

group object, what happens if the object has no group? grpNull returned?

indigo snow
#

every unit has a group

tough abyss
#

k

#

thanks

indigo snow
#

brainless objects, like empty vehicles, will return grpNull

tough abyss
#

the group object returns an array of objects within the group correct?

indigo snow
#

no, it returns the group of the unit

#

units returns an array of units within a group

tough abyss
#

units group object?

#

ye

#

thanks

indigo snow
#

or just units _unit

tough abyss
#

done, and thank you.

delicate lotus
#

I totally forgot to get the direction of the objects I am trying to save

#

well lol

#

the result was quite funny tho

polar folio
#

will a "local" eventhandler reliably fire even if the original owner client does alt+F4 or will i need to apply the EH on the server not matter what?

halcyon crypt
#

it wasn't reliable in the past (A2) and I doubt much has changed

polar folio
#

k. better be safe then. thx!

pliant stream
#

after a client disconnects, the objects owned by them are always acquired by the server and when that happens the eventhandler should execute

#

it's not like the client sends some message to the server saying "hey i'm going away now, take these objects"

still forum
reef grove
#

Can I get help writing a money script that works with extDB?

rancid ruin
#

what kind of money script?

#

you are best off trying your best, writing something really basic, or something which doesn't work, then ask here for help @reef grove

reef grove
#

I can do money, but I want it to work with extdb

#

Just something I can build off of

rancid ruin
#

e.g you can just forget the extDB part for the time being. that will make it much easier. add DB stuff when it's working 100%

reef grove
#

As in I can eventually add shops, etc

#

Don't I need to start with extDB though?

rancid ruin
#

depends how you want to approach it

#

you could just setVariable a "money" var on to each player, then sync that to your DB every now and again

reef grove
#

Yeah, I dont know how to sync with extdb, insert info, etc

#

Essentiall I want to:

rancid ruin
#

what i did for one of my missions is make custom money inventory items, that way it just ties in to my inventory saving system, for example

reef grove
#

Start with 0 cash. You get 10,000 cash, leave, come back it will stay

#

I dont know how to query, insert, and sync using extDB

rancid ruin
#

which version of extDB are you using?

reef grove
#

3

#

latest

#

extDB3-1028

rancid ruin
#

and you already have it running successfully in a mission?

reef grove
#

in terms of extDB

#

or the money?

#

Because I haven't started working on cash because I feel like I need to start working on that while extDB is setup

#

I feel like I would have to do setVariable "EXTDB:QUERY:###:###:###:ETC"

rancid ruin
#

i mean do you have extDB running properly already. but yeah you should write the money system first and worry about extDB later imo

reef grove
#

Yeah I got extDB working

#

dont have an sql_custom.ini yet

rancid ruin
#

well i've some experience with SQL but never used this addon. you've read the documentation right?

#

are you adding this to a mission which is already using extDB successfully or are you building one from the ground up?

reef grove
#

Nope. Im essentially creating a new RP framework for my community

#

I can script, I just don't know how extDB works.

#

The documentation isn't very understandable

zenith edge
#

mmm, when I looked at it, there are 2 ways to use it

#

there are provided functions which are just generic sql commands

#

or you write your own sql and use their custom wrapper

reef grove
#

I don't know why, I just can't understand anything with extDB even though it seems simple. I understand MySQL

zenith edge
#

and then you are running against a remote/local DB like mysql or mariasql

#

I'm going to be trying to use it in a while and I looked at it, was going to run the custom sql

rancid ruin
#

oh, life, i'm out then πŸ˜„

reef grove
#

I don't know how to sync a variable with the database

#

Alright lol

zenith edge
#

Function

 "extDB3" callExtension "0:sql_custom:addKill:ofps_rhs_tank,deadlydays" ```
INI
```C
 [addKill]
SQL1_1 = INSERT INTO tableName(className, killedByName) VALUES (%CUSTOM_1%, %CUSTOM_2%);
SQL1_INPUTS = 1-string,2-string ```
as I understand it, something like that
#

you create a function in INI with the custom SQL code

#

and you create your DB connection in a conf file

#

all of which you reference in your function

#

and you put the values you are passing that the end, which you descript the order of in the INI

reef grove
#

So wait a minute

#

is 1-string = to ofps_rhs_tank and 2-string = to deadlydays

zenith edge
#

yea, the 2 in the custom

#

ties it it looks like

reef grove
#

hmm

zenith edge
#

inputs is the order related to the function, and the 1-datatype, the 1 ties it to the %CUSTOM_1%

#

is how I read it

#

I just guessed at how it works, but that is what makes sense

#

when I looked at it

reef grove
#

and className would %CUSTOM_1%?

#

and killedByName would be %CUSTOM_2%

#

So basically

#

this logs that an ofps_rhs_tank was killed by deadlydays?

zenith edge
#

yea

#

that is how I read their documentation

reef grove
#

So I can essentially loop every minute on the client:

"extDB3" callExtension "0:sql_custom:syncData:uid,cash,bank,health,hunger,thirst"

#

I really don't know. I've been trying to get help specifically with extDB and haven't had any luck.

vapid frigate
#

you probably don't run extdb3 on the client at all

#

would have to be on the server

zenith edge
#

you found the documentation page right?

#

yea, if you run it from client more vulnerable to hacking I'd think

#

so you have the db connection info in extdb3_conf.ini

#

in SQL_CUSTOM INI you create the function with your custom SQL code

#

then u need to init ur DB connection

#
9:ADD_DATABASE:a3w
9:ADD_DATABASE_PROTOCOL:a3w:SQL_CUSTOM:sql:a3wasteland.ini
0:sql:existPlayerInfo:123123123123
#

their example code

#

so the add the DB, which is defined in their conf.ini file of db's, a3w

#

a3wasteland.ini is just a <SQL_CUSTOM_FILENAME>

#

so it has a bunch of functions I assume

#

they tie the DB to a protocol name

#

sql

#

and then they run the command using protocolname:functionname:value

#

the number in the beginning are the connection type to db

#

listed there

#

of course I haven't done it, all supposition

#

based on documentation

reef grove
#

I got the database connection working

#

however, I think I just need to find someone to handle extDB for me

#

It'd be more efficient

zenith edge
#

gl

reef grove
#

ty

warm gorge
#

Would the easiest way to set object positions compatible over both water and land be through using ASLToATL (getPosASL player) and setPosATL? Rather than checking if their position is over water or land, and then using either setPosATL or setPosASL?

still forum
delicate lotus
#

Is there a way to make a object only destroyable by certain weapons (explosives)?

#

like I want to have a radar tower but only infantry with Explosive Charge should destroy it

tough abyss
#

the HandleDamage EH would be a way to do it

delicate lotus
#

really? Guess Im going to take a look at it ^^

#

I hope its not too complicated to do it for all the explosives added with ace

tough abyss
#

you can probably check if the ammo is typeOf "Explosive" or something

delicate lotus
#

how can I return stuff?

delicate lotus
#

no why

#

I already bookmarked the last page

vapid frigate
#

whatever the last line of code is gets returned

thick sage
#

With an example:

_y = {
    if (_x == 2) exitWith {
        100    
    }
} forEach [1,2,3];

_y becomes 100.

#

_y = call {100}

delicate lotus
#

ah okay

#

the function BIS_fnc_taskCreate can take a side, a group, a object and a array as task target but also a boolean

#

I dont understand the boolean

#

is the boolean for mission wide creation?

delicate lotus
#

Is there a way to remove the watermark people get by not having a dlc using a script?

indigo snow
#

buy the dlc?

arctic veldt
#

^^ The DLC is legitmate adblock (with the exception of Tanoa)

tough abyss
#

Does it only show up when they are in one of the jets without owning the DLC?

#

If so, then the watermark is justified. Purchase the DLC if you wish to use it.

pliant stream
#

pay to win πŸ‘

delicate lotus
#

I have all dlcs except jets

forest ore
#

I'm getting a Error missing ; error with this
_x hint "Spawn protection enabled";
Is that even close to being correct to begin with?

still forum
#

hint only accepts one argument on the right side. What is that _x doing there?

forest ore
#

well I was thinking it would only display the hint to those players that are inside a trigger area

dusk sage
#

You'll have to execute it locally to the client (you want to hint on)

forest ore
#
                _x allowDamage false;
                _PlayerInAreas set [count _PlayerInAreas, _x];
                hint "Spawn protection enabled";
            };    ```
#

that's the whole thing. I'd like that to be so that the "Spawn protection enabled" hint would only be shown to the players that actually are inside the area

#

as it is with the current form of that script the hint is broadcast to every player

dusk sage
#

Take a look at remoteExec

forest ore
#

that seems to be broadcasting as follows: on each connected client, on first connected client, everywhere but server and so on

still forum
#

targets parameter Object - the function will be executed only where unit is local
That is exactly what you are trying to do here.
Combined with Array - array of any of types listed above to save performance

forest ore
#

How would I go on referencing these objects in this case?

#

Do I need to type in all of the player name variables or can some common denominator handle that?

still forum
#

well.. you have _x right? so you already know how to get the objects inside the trigger

#

just use them

forest ore
#

went with this but no positive result was given (as in no hint was shown)
['"Spawn protection enabled" remoteExec ["hint",_x];',[],100];

still forum
#

wtf are you doing? ^^

forest ore
#

this (also) achieved what I was going after.
"Spawn protection enabled" remoteExec ["hint",_x];
Can I ask, is there any actual difference what style to use? Why in the first place there is so many possibilities?

#

what's with the <text> or 'text'

#

these all are as good?

indigo snow
#

No, <> is generally meant as a <fill in blanks here>

forest ore
#

kk, and it can be used in scripts apparently then(?)

#

and Thank you @dusk sage @still forum @tough abyss πŸ‘

indigo snow
#

what no

#

<> isnt valid anywhere for variable types in sqf

reef grove
#

Anyone with experience with extDB able to help me setup some stuff?

runic surge
#

how can I check what uniform type a unit is wearing?

indigo snow
#

uniform UNIT

runic surge
#

oh

indigo snow
#

yea sometimes its easy like that

quasi rover
#

I'm trying to find direction for AI vehicle spawn at random place with the area(_rad), but I got error msg, not alway but sometimes.: undifined variable: _direction. that's because the number of "_roadconto" (count _roadconto) is zero. so how to select "_roadsel" until count _roadconto > 0" ? 😬

_roads =  _marker nearRoads _rad;  //_rad = 300

if(count _roads > 0) then {
   _roadsel = selectRandom _roads;
   _roadconto = roadsConnectedTo _roadsel;
   _direction = [_roadsel, _roadconto select 0] call BIS_fnc_DirTo;
};
#

Yes. Tanoa map.πŸ˜‚

#

Thanks, Quiksilver. I'll give that a try. 😁

quasi rover
#

It works well, I actually spent a whole day to find this error and tried to solve it. but you did. thanks again. @tough abyss 😘

#

Wow, numbers and dot are displayed. I'll save it and study this code.

grizzled spindle
#

Is there a way to see the hpp file for the endgame spectator?

subtle ore
#

So uh. Seems like setVelocity in combo with ai has quite the interesting result. The plane hits the ai before they start falling πŸ€” 15,000 km/h

vapid frigate
#

@grizzled spindle if you've extracted arma to your P:, it should all be in P:\A3

jovial ivy
#

How would I go about getting all of the items in the game? Such as gps, map, attachments, etc.

#

But not weapons, vehicles , etc.

indigo snow
#

there are commands to get the items of units and the cargo of vehicles

#

just count them and add them together

jovial ivy
#

Huh? Im talking about using configFile to extract the items lol. Similar to how you would setup a vehicle spawner and extracting the vehicles out of CfgVehicles. I've done this with weapons, just cant figure out items.

jade abyss
#

@jovial ivy Play around with that.

_Class = "Air";
_ClassList = "true" configClasses (configFile >> "CfgVehicles");  
{
    _CfgName = (configName _x);
    _IsClass = _CfgName isKindOf _Class;
    if(_IsClass)then
    {
        _Scope = getNumber(configFile >> "CfgVehicles" >> _CfgName >> "scope");
        if(_Scope == 2)then{diag_log _CfgName;};
    };
}forEach _ClassList;```
#

You should adjust the CfgVehicles before using it πŸ˜›

jovial ivy
#

Thats basically what I have. Do you happen to know the class for items?

jade abyss
#

CfgItems / CfgMagazines?

vapid frigate
#

CfgWeapons

#

everything that can go in inventories is in CfgWeapons, CfgMagazines, CfgVehicles (backpacks), and CfgGlasses

#

gps, etc are in CfgWeapons

jade abyss
#

ah, yeah. CfgWeapons not CfgItems 🀦

vapid frigate
#
"getNumber(_x >> 'scope') == 2 && getNumber ( _x >> 'Type') == 131072" configClasses (configFile >> "CfgWeapons");```
#

that should get all non handgun/rifle/launcher/binocular items

#

then you can check if _x >> 'InfoType' >> 'Type' is equal to one of these:

#
#define IIT_SUPPRESSOR 101
#define IIT_SCOPE 201
#define IIT_RAIL 301
#define IIT_BIPOD 302
#define IIT_HEADGEAR 605
#define IIT_UNIFORM 801
#define IIT_VEST 701
#define IIT_NIGHTVISION 616```
#

you can also check _x >> 'simulation' for "itemmap", "itemgps", "itemradio", "itemcompass" and "itemwatch"

#

medical/misc/grenades/explosives are entered manually though (mainly for random stuff from mods)

still forum
#

Does anyone know what the undocumented variant of getUnitLoadout that takes array as argument does?

weak tiger
#

any way to get the currently set shift-click waypoint?

nocturne iron
#

Hmmmm

#

Use the keyDown eh to detect shift+lmb

#

Have that pass a variable and record a time, then use onMapClick to get the data and record the time of the onMapClick

#

If the times are within a small period of time, say 0.01 seconds, it's safe to assume that onMapClick has recorded the shift click

#

Only problem is that you'll have to run it from the start of the mission

#

EDIT: just use onMapSingleClick's check for shift capability to record the waypoint

warped fractal
#

I'm trying to get this to execute across all players on a dedicated server when a trigger is activated.
Currently have

"scripts\python.sqf" RemoteExec ["ExecVM"]

on the trigger
The script is to add a weapon to every player when activated

if (isServer) then {
    cutText ["DRAW!","PLAIN",4];
    Playsound "Draw";
    {_x addWeapon "RH_Python"; _x addMagazine "RH_6Rnd_357_Mag"} forEach allUnits + playableUnits + switchableUnits;

};

Nothing works on a dedicated server annoyingly, any help?

nocturne iron
#

Tried changing the locality to all connected clients?

warped fractal
#

What do you mean exactly? As in using allPlayers?

nocturne iron
#

When you execute remoteExec, point it at allPlayers

delicate lotus
#

write a 0 as target. That will execute on all clients

warped fractal
#

so something like

"scripts\python.sqf" RemoteExec ["ExecVM",0]
#

?

delicate lotus
#

yes

warped fractal
#

That doesn't work either, and reading upon the wiki for RemoteExec it says that 0 is default anyway

delicate lotus
#

mmh

#

maybe put [] around the string and write execVM instead of ExecVM?

nocturne iron
#

Toss a hint before the isServer check to see if it's firing

warped fractal
#

What i don't understand is that i've used

"scripts\scriptname.sqf" RemoteExec ["ExecVM"]

before on multiple times for many missions now and it's worked, so what would be different this time?

I'll add the hint just to see if it is actually going

nocturne iron
#

Sure you put the script in the right place?

warped fractal
#

it executes all fine in the editor, no errors

#

so it's not a pathing issue

warm gorge
#

Do you happen to have a CfgRemoteExec set up for your mission

warped fractal
#

Not entirely sure, I'm helping a friend out by adding this script to his mission, it appears to use the F3 framework, which i have no experience in so maybe that's fucking it up

warm gorge
#

Id suggest finding out because it may be configured to block un-whitelisted functions/commands

warped fractal
#

Yeah i'll strip out the F3 framework and give that a shot

warm gorge
#

Id check in the description.ext of the main mission first

#

See if theres any references to CfgRemoteExec

warped fractal
#

i did that, didn't show anything about CfgRemoteExec

vapid frigate
#
    cutText ["DRAW!","PLAIN",4];```
#

with a dedicated server, that text won't be shown anywhere

#

the other part should run (on the server only)

warped fractal
#

If cutText doesn't run on dedicated servers then would it skip that part and carry on with the script to give all players the revolver?

vapid frigate
#

yeah, afaik

warped fractal
#

I tried it but none of the script executes

vapid frigate
#

is it just meant to work on players, not AI?

warm gorge
#

You must be doing something wrong. Try executing it in the debug console with the mission to see if it does anything

#

Probably something to do with how the trigger is set up

warped fractal
#

All players inside the server yeah, I did try Allplayers before but that didn't work, gonna try all other options

#

I'll use a hint to see if it is the trigger

vapid frigate
#

"scripts\python.sqf" RemoteExec ["ExecVM", 0]
with python.sqf as

    Playsound "Draw";
    player addWeapon "RH_Python"; 
    player addMagazine "RH_6Rnd_357_Mag";```
#

should work

warped fractal
#

That was what my original script looked like, that didn't work either, the wiki mentions that player is different for every client on a dedicated

#

"In MP this value is different on each computer and on dedicated server this value is null"

vapid frigate
#

yeah player = your client

#

yep.. so those lines wouldn't do anything on the server

#

so you could use "scripts\python.sqf" RemoteExec ["ExecVM", [0, -2] select isDedicated] to skip it running on the server (since it won't do anything anyway)

#

but doesn't really matter

warped fractal
#

Okay, it's not the trigger, just put

inside the script, it's def the script then

#

before it does the isserver check

vapid frigate
#

the script looks like the first part is designed to be run on clients, the second part on the server

warped fractal
#

yeah gonna check if there's a global command to make text appear

vapid frigate
#

if you use the script i pasted it should work?

#

(if a hint worked)

#

no if(isServer)

warped fractal
#

right, so just remove the isserver, lemme see

vapid frigate
#

and also change it so it's not a loop

#

or leave the loop in if(isServer)

unkempt spire
#

are self made funtions preloaded into the mission? ie. if I have 1000 scripts and make them all class funtions will that be more strain than having a folder of 1000 scripts and the mission can access each as it needs?

vapid frigate
#

functions are compiled at runtime.. but i don't think it's slow enough to be an issue

#

i think it's more efficient than loading/compiling them while the game's running

warped fractal
#

Yep, it was the if isserver fucking it up, thanks lecks, and thanks to everyone else who helped

delicate lotus
#

wait you put isServer in a script which is execute on all clients on purpose

#

?

#

does that make any sense atall?

vapid frigate
#

just make sure u change it to the player addmagazine instead of the loop too harry

#

otherwise it will run it 'from' all clients 'for' all players

#

(with 20 players, everyone would end up with 20 mags)

warped fractal
#

Am I trying to execute things globally twice by doing that, further? i'm not sure what you mean by that, @vapid frigate will do

warm gorge
#

If you're remote executing the script globally, it would be running the following on all players: {_x addWeapon "RH_Python"; _x addMagazine "RH_6Rnd_357_Mag"} forEach allUnits + playableUnits + switchableUnits;

warped fractal
#

Oh I see, I could of just executed it locally, right?

vapid frigate
#

that loop could/should just run on the server

#

the other 2 lines need to run on clients

warm gorge
#

^ Or just this:

#
cutText ["DRAW!","PLAIN",4];
Playsound "Draw";
player addWeapon "RH_Python"; 
player addMagazine "RH_6Rnd_357_Mag";
vapid frigate
#

yeh i pasted that earlier, just less colourful

warm gorge
#

yeah lol

warped fractal
#

God i'm fucking dumb

#

Thanks for the help

warm gorge
#

πŸ‘

vapid frigate
#

np

delicate lotus
#
if(!(isNil "unitspawned")) then {
    if(unitspawned) then {
        terminate _thisScript;
    };
};


_markers = allMapMarkers;

_vmarker = [];
_imarker = [];

{
    if(_x find "vehicle" == 0) then {
        _vmarker = _vmarker + [_x];
    };
    if(_x find "infantry" == 0) then {
        _imarker = _imarker + [_x];
    };
} forEach _markers; 

_lclass = "I_C_Soldier_Para_4_F";
_rpgclass = "I_C_Soldier_Para_5_F";
_rclass = "I_C_Soldier_Para_2_F";

{
    _pos = getMarkerPos _x;
    _grp = createGroup independent;
    _veh = "I_G_Offroad_01_armed_F" createVehicle _pos;
    _grp createUnit [_lclass,_pos,[],5,"NONE"];
    _grp createUnit [_rclass,_pos,[],5,"FORM"];
    _grp createUnit [_rclass,_pos,[],5,"FORM"];
    _a = _grp createUnit [_rclass,_pos,[],5,"NONE"];
    _a moveInAny _veh;
    _a = _grp createUnit [_rclass,_pos,[],5,"NONE"];
    _a moveInAny _veh;
} forEach _vmarker;

{
    _pos = getMarkerPos _x;
    _grp = createGroup independent;
    _grp createUnit [_lclass,_pos,[],5,"NONE"];
    _grp createUnit [_rclass,_pos,[],5,"FORM"];
    _grp createUnit [_rpgclass,_pos,[],5,"FORM"];
} forEach _imarker;

hint format ["%1 -    |- %2", count _imarker, count _vmarker];
unitspawned=true;

I have a problem with that script. it spawns somehow all units twice. Like there are two infantry groups per one marker but there should be only one. Why is that so?

#

Marker count is right because I already checked that. (There are 6 inf markers and 3 vehicles markers but 12 inf and 6 vehicles)

#

Also I execute the script in initServer.sqf but because I am trying to play the map in singleplayer too I add this to the init.sqf.

if(!isMultiplayer) then {
    execVM "initServer.sqf";
    execVM "initPlayerLocal.sqf";
};

Nothing wrong with that right?

#

Also the second vehicle which is spawned is not filled with units. They are outside of the vehicles.

#

this seems really strange

rancid ruin
#

init scripts run automatically, you don't have to tell them to run

delicate lotus
#

yeah but I thought the initServer and initPlayerLocal are MP only

cedar kindle
#

nop

delicate lotus
#

really?

#

lol then

cedar kindle
#

in SP you're both player and server

rancid ruin
delicate lotus
#

I did

rancid ruin
#

read it again

delicate lotus
#

maybe I shouldnt read stuff like that at 35Β°C

#

yeah I just tested the mission in MP. works like a charm

#

was obviously my compensating error lmao

rancid ruin
#

basically, just never execute any scripts on that page manually

#

that's not the point of them

delicate lotus
#

yeah

#

I never really scripted for SP. I only scripted for MP only xD

vapid frigate
#

are both of those the script you pasted?

delicate lotus
#

one is the script. the other one is the init.sqf

#

but my problem is already solved

vapid frigate
#

k

rotund cypress
#

Would anyone here know why createDialog "RscDisplayOptionsAudio"; doesn't create a working dialog. Only shows a few options that doesn't really change any audio. πŸ€”

#

It shows the dialog as usual, but any of the options does not work

#

Same goes for RscDisplayOptionsVideo

subtle ore
#

@rotund cypress how are you creating it exactly?

rotund cypress
#

With the snippet above

subtle ore
#

Disregard

#

🀷 never used it. So i was curious

jovial ivy
#

Is there any way to filter the find the difference between a say Lmg and Sniper from the config class?

subtle ore
#

@jovial ivy CfgWeapon config entries have parents.

#

Look in the config viewer, they are all along the bottom. You can identify them

jovial ivy
#

Got it working with some interesting code to say the least. Thanks πŸ˜›

frank marsh
#

showGPS false; does not work anymore. Is there a new command to disable left/right panel/minimap?

rancid ruin
#

that's not a script though is it

#

i'm pretty sure they broke some of the map and GPS commands a few updates ago. they weren't working properly when i tested them a couple of weeks ago @frank marsh

frank marsh
rancid ruin
#

nice, it was that connor dude who i tested it for earlier this month

#

i feel like i've contributed something now

subtle ore
#

Or use switch to the preset @tough abyss πŸ€”

rotund cypress
#

Possible anyone would know anything of what I wrote above?

rancid ruin
#

i'd guess it's a child display of the main options display. something like that

rotund cypress
#

The same is with createDialog "RscDisplayPause";

subtle ore
#

@rotund cypress " i'd guess it's a child display of the main options display. something like that" - @rancid ruin

rotund cypress
#

Main Options Display?

rancid ruin
#

yeah i'm pretty sure some dialogs/displays are children, e.g you would need to create it's parent first

rotund cypress
#

hmm

#

The audio options is created by default through pause menu

#

But the pause menu buttons does not work either when creating it

#

It doesn't even have an IDC @rancid ruin Not even RscDisplayOptions

#

So your theory probably is right

#

However that begs the question what the main display is

rancid ruin
#

dig through the config and try to find it?

#

although i can't think of any reason why you'd need to open the options menu via script

#

you're not the same guy who was fucking with people's UI colour preferences via script are you?

rotund cypress
#

Well this worked _display = (findDisplay 46) createDisplay "RscDisplayInterrupt";

#

What do you mean? @rancid ruin

rancid ruin
#

some guy a while back thought he was clever cos he was changing the colour of people's UI to "fit in with my mission" or some shit

#

thought you might be trying to fuck with people's audio settings or something

#

that kind of stuff is out of bounds for mission makers even if it's possible, imo

rotund cypress
#

I am not messing with peoples audio...I am making a custom interrupt menu...

rancid ruin
#

aight i was just wondering. people try and do some crazy stuff in this channel

rotund cypress
#

well, certainly not me...

subtle ore
#

it's not documented? I thought there was

#

loadScripts

#

@tough abyss loadScripts

#

Yep yep πŸ˜ƒ

thick sage
#

Has anyone used UPSMON before? Is it still maintained?

stable wave
#

Before 1.70, I used the following code to give Kajman and Xi'an pilots the ability to fire Skyfire rockets.

_vehicle removeWeaponTurret ["rockets_Skyfire",[0]];
_vehicle removeMagazinesTurret ["38Rnd_80mm_rockets",[0]];
        
_vehicle  addWeaponTurret ["rockets_Skyfire", [-1]];
_vehicle addMagazineTurret ["38Rnd_80mm_rockets", [-1]];

However, afther the dynamic loadouts was introduced, it stopped working. Now there are two magazinesTurrets for the rockets, instead of one. How should I rewrite the code to make it work?

delicate lotus
#

um... use both?

stable wave
#

I tried the following code:

vehicle player removeWeaponTurret ["rockets_Skyfire",[0]];
vehicle player removeMagazinesTurret ["PylonRack_19Rnd_Rocket_Skyfire",[0]];
        
vehicle player addWeaponTurret ["rockets_Skyfire", [-1]];
vehicle player addMagazineTurret ["PylonRack_19Rnd_Rocket_Skyfire", [-1]];

The pilot can now fire all 38 rockets from both pylons. But the ammo count still shows 19 on the HUD.

subtle ore
#

@stable wave Consider it may be only able to load 19 rounds?

stable wave
#

It loads 38 rounds. When click the fire button, 1 rocket is fired from both pylons. But the ammo count is only reduced by 1. On default loadout, the ammo count is 38. One click recuces it by 2.

subtle ore
#

@stable wave Right, the max it can load would be 19. But it just allows for more to be loaded because it's forced

stable wave
#

OK. I'll push the pbo to the server then.

delicate lotus
#

looks great but I dont use It. It is maybe a bit overdosed for just some city occupied by a terrorgroup ^^

jade abyss
#

Anybody knows, where getCargoIndex gets its number from?

#

nvm... action ["getInCargo" seems to be borked/broken

still forum
#

Anyone know if passing a Nil variable to isNil will create a scriptError? I would expect isNil to return true in that case.. But knowing SQF weirdness I guess it just errors out...

warm gorge
#

Its meant to check for a nil variable, doesnt error out with nil variables

still forum
#

Yeah.. But you check nil variables by passing a string containing the Name of the variable

#

not the variable itself

vapid frigate
#

i think isNil _var = error, isNil {_var} or isNil "_var" = true

still forum
#

That's also what I expected... Maybe Nil isEqualTo _var works...

vapid frigate
#

i'm guessing that would error

vapid frigate
#

you making a linter or something? isNil {_var} or "_var" works fine

still forum
#

No checking for a way to detect if Intercept initialized. And I'm guessing compile returns Nil when it failed to compile

still forum
#

I use it. For TFAR and my new LUA binding

still forum
#

Yes. Performance. Easier to code. Multithreading (to a degree).

#

I rewrote bis_fnc_ItemType to Intercept. 3x performance.
I rewrote bis_fnc_exportFunctionsToWiki in Intercept. Arma game would freeze for 10 minutes. Intercept is done in under half a minute.

warm gorge
#

I can barely run some of those export commands on my PC. It curhses it

#

crushes*

delicate lotus
#

What is Intercept

still forum
#

A big perf problem of SQF is the control flow. If statements and such. There is where the big improvement lies. The C++ Optimizer can do a lot on these.
Also SQF is looking up which function to call everytime you call something at runtime. C++ does this at compileTime and the Optimizer also goes into there and does stuff

warm gorge
#

πŸ‘

still forum
#

wrong link

#

There

#

That's my test repo. In main.cpp there is also a bunch of TFAR code. That TFAR code is 1.6ms sqf versus 0.3ms Intercept

delicate lotus
#

Now make java

still forum
#

No.

delicate lotus
#

why

still forum
#

I don't like Java. ACE Team want's to do python. So they are probably gonna do that. If anyone want's to do Java they can also do that. But I doubt anyone will ^^

delicate lotus
#

I like java. It was the programming language which introduced me into scripting and programming

warm gorge
#

Yeah I like Java as well

still forum
#

Then get someone who likes Java and also knows C++ to make a Intercept->Java binding

jade abyss
#

Downside of Intercept -> Opens up a biiiigggggg hole, regarding security.

still forum
#

You mean like. Any Arma Extension does?

jade abyss
#

Difference -> Most of those extensions are ServerSide only and restricted to specific commands.

still forum
#

Yeah. You can also run Intercept Serverside only.

#

Intercept extensions still need to be Battleye whitelisted if you run Battleye. Which you do anyway in high-thread environments

#

oops. ^^ Typorino

#

Intercept doesn't actually make it easier for cheaters. Yeah Intercept scripts don't go through Battleye script filters. But Intercept "scripts" need to be whitelisted by Battleye in that environment. So I'd call that even more secure than BE script filters.

#

Or what kind of security do you mean @jade abyss?

jade abyss
#

Wasn't Intercept whitelisted by BE? iirc you said something like that.

#

+Yeah, thats more or less what i thought. If it works like that (Whitelisting of the commands) -> okay, i was wrong =}

still forum
#

No. They whitelisted my script debugger. Which is much worse.

jade abyss
#

Not the same?

still forum
#

Yeah.

#

Script debugger debugs SQF. Intercept replaces SQF

jade abyss
#

aye, kk

little eagle
#

Now that Intercept is "done", dedmen can release TFAR 1.0-

still forum
#

I will release TFAR 1.0 when devestating bugs like "All of the sudden I can't hear someone anymore and it happens quite often" are fixed.

rotund cypress
#

Hey guys, anyone know what would be the best method to find a random position on map where there is no water?

tough abyss
#

findEmptyPosition

#

or something like that

#

you can also check for isWater

nocturne basalt
#

Hi guys. How can I check if one of the gunnerpositions in my vehicle is manned or not?

jade abyss
#

Commands: allTurrets + TurretUnit

rotund cypress
#

If I want to search whole map with findEmptyPosition it seems to be very very slow and hang my computer πŸ˜„ @tough abyss

#

To be honest, I'm not quite sure findEmptyPosition is even the command I'm looking for

#

Its not random at all

little eagle
#

pick a random position

#

check if it's water

rotund cypress
#

``[random 14700, random 16200, 0] findEmptyPosition [0, 10];

_x = random 14700;
_y = random 16200;
_z = 0;
_randomPos = [_x, _y, _z] findEmptyPosition [0, 10];

if !(surfaceIsWater _randomPos) then {

};``

#

Ye did something like this

little eagle
#

if yes, pick another random position

rotund cypress
#

Ye

rotund cypress
#

Okey, so I have made this function ```sqf
for "_i" from 0 to 1 step 0 do {
scopeName "loopGetRandomPosition";

    private _randomPos = [(random 14700), (random 16200), 0] findEmptyPosition [0, 10]; 
    if !(surfaceIsWater _randomPos) exitWith { 
        player setPos _randomPos; 
    }; 
};``` However, sometimes it fails and gives me an error
#

Says, 3 elements expected, 0 provided

#

Which is strange

copper raven
#

where can i find vehicle icons? like emblems , the ones that show in group hud when you have a member in any vehicle?

rotund cypress
#

Hmm, I guess I just figured it out, πŸ˜„

#

So it returns empty array if not found πŸ˜„

delicate lotus
#

@copper raven you mean like small icons of things like a tank or a apc or a jet?

copper raven
#

check my screenshot, so you see what i mean, like exact emblem of it the model of a vehicle

#

iam making a shop, thats where i want the emblems

#

@delicate lotus

warm thorn
#

Is there a way to play music for only one user? So that only one specified user can here the music, so that I can start different tracks for different people?

delicate lotus
#

@copper raven I dont know how but I know a script that can show you exactly how

#

its called VVS

copper raven
#

i might just download a random vehicle shop/spawner from forums , and i should check the codes there

delicate lotus
#

Virtual Vehicle Spawner

copper raven
#

ye exactly

delicate lotus
#

I use that script in my zeus templates

vivid quartz
#

run a different track for each machines @warm thorn

delicate lotus
#

getText(configFile >> "CfgVehicles" >> _class >> "picture"); @copper raven

warm thorn
#

@vivid quartz Yeah, I have already tried that. I used playMusic inside my ClientInit, as i thought this will play the music for this client. Unfortunately, every time when a new user is joining it will stop the track... playMusic "LeadTrack01_F";

delicate lotus
#

wait why should it stop the music if somebody new joins?

#

does not make sense for me as it is local after all

warm thorn
#

@delicate lotus I will investigate this again πŸ˜„ Thats also my mind... Dont now why. If I test it alone - everything works smooth ^^ I will run some more tests πŸ˜‰

unkempt spire
#

I put this addItemToUniform "ACE_EarPlugs"; in the init box of every player, but when anyone joins everyone gets another pair of earplugs

warm thorn
#

So, I have investigated this issue further. For the first player, everything is fine. He is able to listen to this awesome music. The other players are unable to hear the music. I use playMusic "LeadTrack01_F"; in my client init. It seems so, that the first user reserves the track and all the other users are unable to play the same track. Is there a way to solve this?

rotund cypress
#

If I use move command to move a unit from a to b, but it sprints, how could i make that jog?

rancid ruin
#

use a waypoint instead?

#

move and moveTo are more low level commands i believe

rotund cypress
#

Ah alright, Ill use that

delicate lotus
#

setSpeedMode?

#

forceWalk?

#

setSpeed

vivid quartz
#

@unkempt spire you need to run code locally

#

@warm thorn if there are 2 clients on server and if you playmusic different tracks does it work then?

#

i think i only see this working in 1way, idk if its possible, but getting the track time played, then using playmusic again with the played time

rancid ruin
#

pretty sure there's no way to play a sound from X point, you can only trigger it from the beginning

#

i made an audio preview tool ages ago and couldn't find a way to accomplish that

nocturne basalt
#

@jade abyss Thanks

icy mauve
#

Is there a way to detect when a certain function (in this case playMove, so maybe even an animation) ends? I want to create a file with a function and an array and a boolean as parameter and the function should either randomize the animations given in the array or play them in the given order.

jade abyss
#

simple example:

player playmove "AnimName";
waitUntil{animationState player == "AnimName"};
player playmove "AnimName2";
waitUntil{animationState player == "AnimName2"};

gl hf

vivid quartz
#

@rancid ruin playMusic [name,time]

icy mauve
#

@jade abyss thanks!

icy mauve
#

Wait, how do I loop through an array while retrieving each element?

#

I'm sorry for all the questions, I'm quite new to this.

rancid ruin
#

that only works for one type of audio though @vivid quartz

#
_array = ["a", "b", "c"];

{
diag_log _x;
} forEach _array;

//logs:
// a
// b
// c

@icy mauve

rancid ruin
icy mauve
#

Bookmarked.

#

May someone review my code with me please?

#

This is "animatron.sqf": ```sqf
params ["_unit", "_animations", "_randomize"];

if (randomize) then {
while (true) {
_element = selectRandom _animations;
_unit playMove _element;
waitUntil {
animationState _unit == _element;
};
}
} else {
{
_element = _animations select %1;
_unit playMove _element;
waitUntil {
animationState _unit == _element;
};
} forEach _animations;
};

rancid ruin
#

_randomize not randomize

icy mauve
#

And this is the "on activation" of a Trigger: sqf animatron = compile preprocessFIle "animatron.sqf"; animatron [crewman1, ["Acts_CivilTalking_1", "Acts_JetsCrewaidLCrouch_in_m"], true];

rancid ruin
#

_randomize is local, randomize would be global

icy mauve
#

indeed, and _x instead of %1

jade abyss
#
_animations select %1``` %1 ?
#

btw:
```sqf
CODE
```

icy mauve
#

awesome

rancid ruin
#

%1 is for format commands, like

_name = "john";
_age = 25;

diag_log format ["hello my name is %1 and i am %2 years old", _name, _age];
icy mauve
#

oh okay,

#

I get "general error in expression" in the triggercode

indigo snow
#

animatron [crewman1, ["Acts_CivilTalking_1", "Acts_JetsCrewaidLCrouch_in_m"], true]; your second line looks whack

icy mauve
#

Is stuff like this not allowed in Arma?

rancid ruin
#

well we'd need to know what's in animatron.sqf

#

but if it's a function you're trying to call, that's not how you'd do it, no

icy mauve
#

animatron.sqf is a little higher up, where you said "_randomize, not randomize"

rancid ruin
#

oh yeah my bad

indigo snow
#

That is not the syntax for calling a function

#

Look up spawn

rancid ruin
#

[crewman1, ["Acts_CivilTalking_1", "Acts_JetsCrewaidLCrouch_in_m"], true] call animatron

indigo snow
#

Hell need to spawn, he suspends

rancid ruin
#

good point

icy mauve
#

Oh yes, I also don't get any errors in the Editor now anymore.

rancid ruin
#

you should at least stick your functions in init.sqf because managing this will get out of hand quick

#

alex_fnc_animatron = {contents of animatron.sqf here}

icy mauve
#

So I moved everything now into the init.sqf

#

This was probably the most awesome tip I ever got.

rancid ruin
#
_blah = [crewman1, ["Acts_CivilTalking_1", "Acts_JetsCrewaidLCrouch_in_m"], true] spawn alex_fnc_animatron

to call it if you've set it up like that

icy mauve
#

Self-explanatory yes, thanks.

indigo snow
#

im a fan of setting 0 = ...

#

also no _private variables in init boxes

icy mauve
#

I just get an error for missing a Semicolon somewhere

rancid ruin
#

yeah i'm rusty, listen to nick

icy mauve
#
if (_randomize) then {
        while (true) {
            _element = selectRandom _animations;
            _...```
"Error Missing ;
indigo snow
#

while {true}

rancid ruin
#

don't you need a "do" as well?

indigo snow
#

also yes

icy mauve
#

there are so many words in sqf

indigo snow
#

its a keyword based language

#

so yea

#

just keep the wiki on hand at all times

#

missing semicolon or generic errors typically point to syntax mistakes or typos

rancid ruin
#

that page on control structures explains the most important bits. once you understand those, you can fuck around with all the other functions

icy mauve
#

undefined variable in expression? Is that an error while calling or in the function?

#

This becomes weirder every second

rancid ruin
#

same error when _randomize is true and false?

icy mauve
#

I removed all the underscores and I get a "missing semicolon" again

rancid ruin
#

don't remove the underscores, they denote variables as private

#

post your full current scripts again

#

with the underscores back in

icy mauve
#
alex_fnc_animatron {
    params  ["_unit", "_animations", "_randomize"];

    if (_randomize) then {
        while (true) do {
            _element = selectRandom _animations;
            _unit playMove _element;
            waitUntil {
                animationState _unit == _element;
            };
        }
    } else {
        {
            _element = _animations select _x;
            _unit playMove _element;
            waitUntil {
                animationState _unit == _element;
            };
        } forEach _animations;
    };
};```
rancid ruin
#

alex_fnc_animatron =

#

you're defining your function as that code block

#

also
while {true} do {}

indigo snow
#

perhaps its easier if you remember functions are just a type of variable

rancid ruin
#

the while needs a code block which returns true or false. if it's true, it does the thing that it "do"s πŸ˜„

icy mauve
#

Sorry I didn't get the last one.

rancid ruin
#

while is a control structure which does:
while {this code block returns true} do {this thing in this code block}

#

so, while {true} do {...this stuff...}

icy mauve
#

makes sense, wasn't different in Java.

#

So while-true-do is completely fine right?

rancid ruin
#

yeah, just will never work if you use (), the condition needs to be in {}

icy mauve
#

ohhhhhhhh

#

faceplant

#

So I can even use functions inside the while-statement?

rancid ruin
#

yeah so long as the function returns true or false

icy mauve
#

obviously. That's still kinda cool.

rancid ruin
#

by the way, i don't know if you want the function to do this, but it will constantly change the unit's animation. it won't wait until each animation is complete

icy mauve
#

This is not what I intended, no.

#

I wanted the second option, waiting untl each animation is complete

rancid ruin
#

i think maybe using switchMove instead of playMove might work

#

if not you could just add another waitUntil, waiting until the unit's animation is not equal to the one you just played

icy mauve
#

I get another error. COme on Arma.

#

I mean, I created this but still....

#

Whatever

#

"General Exception in Expression" at

#

wait is the "|#|" the part where stuff is wrong?

rancid ruin
#

ah, just noticed

#
        {
            _element = _animations select _x;
            _unit playMove _element;
            waitUntil {
                animationState _unit == _element;
            };
        } forEach _animations;
#

in that, the _x IS the animation name

#

doing _animations select _x is saying "select Acts_JetsCrewaidLCrouch_in_m index from array" which will not work

#

select wants a number

#

so remove the _element line and just do _unit playMove _x

icy mauve
#

awesome

#

it works

rancid ruin
#

no problem bro, keep at it. it will come naturally the more you do it

icy mauve
#

except the same animation just repeats

#

it doesn't change

rancid ruin
#

try it with switchMove instead maybe

icy mauve
#

and keep the "animationState _unit == _element;" the same?

rancid ruin
#

maybe this

alex_fnc_animatron = {
    params  ["_unit", "_animations", "_randomize"];

    if (_randomize) then {
        while (true) do {
            _animation = selectRandom _animations;
            _unit switchMove _animation;
            waitUntil {animationState _unit == _animation};
            waitUntil {!(animationState _unit == _animation)};
        }
    } else {
        {
            _animation = _animations select _x;
            _unit switchMove _animation;
            waitUntil {
                animationState _unit == _animation;
            };
        } forEach _animations;
    };
};
#

i renamed _element to _animation so it's a bit more readable

icy mauve
#

That gives me another "general error in exception"

#

at the part you gave me

#

the two waitUntils

rancid ruin
#

sorry, i mixed up playMove and switchMove

#

you should be using playMove

#

also, from wiki notes:
This command must be executed after mission start. If you place it into init.sqs / init.sqf or in the Init field of some unit, it will not work. Just add a little delay (~0.001) and then place the command.

icy mauve
#

just found that out the hard way lol

#

Thank god there is AutoSave

#

There seems to be an "general error in exception" at waitUntil {animationState _unit |#|== _animation}; but I didn't change anything there.

#

And it plays the same Animation over and over again. A Randomized one indeed, but still the same one.

mild pumice
#

Hello guys, do you know why sometimes when you open the debug console you have the 2 buttons Previous and Next, and sometimes you don't have it ?