#arma3_scripting

1 messages ยท Page 306 of 1

median abyss
#

Thanks alot mate

silent coral
#

I can do so much except what I wat.

median abyss
#

It usually is that way

silent coral
#

I've air dropped submarines from helicopters with crew inside. I've set chain explosions, VBIEDs...I can't set a helicopter to hover lower than normal or hide a task

median abyss
#

Ooo, that's my next stop

#

I guess I'll have to work around that then

silent coral
#

It looks like you have to set scripts to make it by text.

#

For the tasks anyways

median abyss
#

I only needed the task to be hidden from the beginning of the mission and then unhide it, so I ended up just syncing the creation with my trigger

#

And thus creating it midgame

#

Not having it hidden from the start

rugged basalt
#

is there a way to get return value from function using spawn?

#

im always getting a handle

#

guess it's impossible as it's async

jovial ivy
#

Getting a return value from spawn itself? Or from a outer function.

mortal bobcat
#

well, if you don't mind the rest of your script waiting for it, you can use a global variable and waitUntil {scriptDone _handle};

#

oh, you can't just edit a precompiled function though...

rugged basalt
#

I did it by modyfing the script itself ๐Ÿ˜‰

#

but thanks for the help

jovial ivy
digital pulsar
#

whats ESP

jovial ivy
digital pulsar
#

how do you implement infinite ammo btw?

jovial ivy
#

I used EventHandlers.

tough abyss
#

this addeventhandler ["fired", {(_this select 0) setvehicleammo 1}]

jovial ivy
#
                _evc = _target addEventHandler ["Fired", {
                    _ply = _this select 0;
                    _ply setVehicleAmmo 1;
                }];
                _target setVariable ["dy_fnc_infammo", _evc];
                player sideChat Format["Infinite Ammo Enabled For %1", (name _target)];
            } else {
                _ev = _target getVariable "dy_fnc_infammo";
                _target removeEventHandler ["Fired", _ev];
                player sideChat Format["Infinite Ammo Removed For %1", (name _target)];
                _target setVariable ["dy_fnc_infammo", nil];
            };```
#

Probably could shave mine down but it works.

digital pulsar
#

it looks useful

#

but a tad big to my liking, a lot of empty space

#

like, what's up with that right hand side empty block

jovial ivy
#

Huh? The UI itself?

digital pulsar
#

yeah , thats what u wanted opinions on ๐Ÿ˜„

jovial ivy
#

I thought you were mentioning the code ๐Ÿ˜› - That was for a command description, but I left it there maybe for a map. For leftclick teleport.

blissful fractal
#

Hi everyone :), So I had made a magazin as FirstAidKit. How do I made it useable like a firstaidkit? ๐Ÿ˜ƒ Thanks.

blissful fractal
#

Or able to dobbelt click on a magazine and call a fnc.

polar folio
rancid ruin
#

he left

#

one of those "ask a question, wait 30 seconds, leave" guys

peak plover
#

soo, FSM

#

Does it run "slower" or have the risk of costing more performance than a regular sqf

#

From what I've seen 'til now it's a great way of visualizing things, but other then that, same things can be done with SQF

still forum
#

AFAIK FSM is a statemachine that checks every frame or every few frames if the condition needed to get to the next state is true. Don't know much about fsm. just assuming.
My recommendation. Stay with SQF.

rancid ruin
#

doesn't FSM outperform SQF for things it's designed for? i.e AI routines

dusk sage
#

Once a condition is met (which it tries to evaluate / frame), all code is executed at the same time (scheduled)

vapid frigate
#

if it's scheduled, it's not necessarily at the same time?

dusk sage
#

@vapid frigate It proceeds to run all the code - in a scheduled env

peak plover
#

I really don't see how FSM is different from a waitUntil loops etc. Is there anything that can be done with FSM that cannot be done with SQF? I reckon using it for ai to move through a building will work, but it will also work with waitUntil etc.

rancid ruin
#

it's designed for a specific purpose, managing states of things

#

if you don't need to use it, or prefer SQF, there's no need

#

but FSM has it's own editor, and you see FSM used in a lot of different mods, so it's clearly useful

still forum
#

If you feel the need for a statemachine. You may use FSM. Otherwise stay with SQF

#

Btw FSM is basically just a bunch of SQF

peak plover
#

So there's no difference between FSM and

waitUntil{
    if (condition1)then{};
    if(condition2)then{};

    (condition3)
};
#

Thanks

still forum
#

It's not that simple... But if you don't know what a statemachine is and what it's used for stop asking about FSM ๐Ÿ˜‰

tame portal
#

Imagine scripting being an office you have to manage

#

SQF is how the different zones of your office work and what they do

#

You can manually connect them with once again SQF and manage projects that undergo many zones in your office like that

#

Or you create a general plan for how projects should be worked on more correctly where and under what conditions your project switches to a different zonw

#

*zone

#

SQF is the work done to the project, FSM is the management

queen cargo
#

looks to me like the worst explaination for a finit state machine i ever have seen ๐Ÿ™ˆ

tame portal
#

I tried lol

#

@X39#2180 You try now :P

queen cargo
#

assuming you got 3 states
A, B, C
A is where you start
to get from A to B, the unit has to be alive --> B is our "alive" state
to get from B to C, a unit has to be dead --> C is out "dead" state
transition from A to B will be instant and equals a waitUntil {alive <UNIT>};
the rest however, is where the actual fun starts

A, B and C all can have their own code running whilst being the active state in a way more effincent and logical way then doing it in pure SQF
the best example for this would be AI
AI, having multiple states of "what to do", requires such things due to complexity
doing theese things in SQF makes creates WAY too much room for mistakes

states range from "IDLE" where the actual SQF behind would do ... well .. nothign to "SEEK COVER" where SQF would search for cover randomly up to "RUN COVER" where the cover found needs to be reached
this obviously is just a small portion but it should give you a rough idea

can the same be archived via SQF? yes
will it be simpler? no, as the SQF file will fastly grow to a size that is simply not maintainable anymore

#

in regards of performance: FSM is faster in certein situations as for example AI

#

unless you fuck up

#

but in that case all is horrible and unusable in performance terms

rancid ruin
#

alright, now what about turing machines?

queen cargo
#

turing machines are FSMs

tame portal
#

Okay well to my defence

#

I was in the bathroom and had a minute to type it up because otherwise I would have missed my bus

vague hull
#

That's no defense..

tough abyss
#

@tough abyss Multiple nested If-else should be replaced for switch

#

Even if it is slower. I love and hate ArmA 3, but if the game were to suddenly be no longer bottlenecked. I would elated.

vapid frigate
#

why?

#

switch doesn't have the some function as nested if/else unless you recheck some conditions

#

or have nested switches

cedar kindle
#

nested elif in sqf are a pain for the eye

jade abyss
#

But sacrificing ALOT of performance for a visual acceptable state?

simple fiber
#

Hey, imo in Arma performance > 'clean' code. You can make it look not that bad tho.

vapid frigate
#
switch(true) do {
    case(_cond1 && !_cond2 && !_cond3) : {  }
    case(_cond1 && _cond2 && !_cond3) : {  }
    case(_cond1 && _cond2 && _cond3) : {  }
    case(_cond1 && !_cond2 && _cond3) : {  }
    case(!_cond1 && _cond2 && _cond3) : {  }
    case(!_cond1 && !_cond2 && _cond3) : {  }
    case(!_cond1 && !_cond2 && !_cond3) : {  }
    case(_cond1 && _cond2 && _cond3) : {  }
    case(_cond1 && _cond2 && !_cond3) : {  }
    case(!_cond1 && _cond2 && _cond3) : {  }
}
#

much easier on the eye!

#

/sarcasm

jade abyss
#

Yeah and it checks absolutely everything, just to be sure to waste alot of time, checking for stuff =}

tough abyss
#

switch (true) do is purely bad programming style

#

@vapid frigate

vapid frigate
#

i agree, but don't see how else you do the equivelent of nested if/elses with switch

tough abyss
#

Make the conditional check into a function

#

with the boolean operators within it

#

Doesn't switch check all cases even if one matches? As in, if case1 matches, it will also check if case2, case3, etc match?

vapid frigate
#

yeh thats why my example does 3 checks for each

tough abyss
#
fnc_checkCondition = { 
    params ["_conditionA","_conditionB"]; 
    _returnedCondition = _conditionA || _conditionB;
    _returnedCondition;
};
vapid frigate
#

maybe not if you break though? can't remember

#

and what do you do with that bool?

#

switch(_returnedCondition) ?

tough abyss
#

Checks if the given parameter matches any case. If so, the code block of that case will be executed. After that the switch ends so no further cases will be checked.

#

Seems like I was wrong.

#

But people do dirty things like switch (true) do {}

#

only place I've seen that as acceptable in the programming world. Was networking loops

#

, or input loops

vapid frigate
#

k.. i still don't get what you mean by GeekyGuy5401: @Quiksilver Multiple nested If-else should be replaced for switch

tough abyss
#

Well. I also have read if you can't get away with not using multiple nested if-else.

#

Then you should rethink your codes functionality

#

or how it works.

jade abyss
#

๐Ÿคฆ

tough abyss
#

Don't think so @jade abyss ?

#

I know for a fact I actually replaced multiple if-else, then switch do with a single array

#

and simply selected the indexes of the array

jade abyss
#

Using "switch" just because of astethic reasons is just... no.

tough abyss
#

In C++ world it's acceptible... though..

#

violently stabs arma code

jade abyss
#

C++ != sqf

#

+its just another "fact" you state here

tough abyss
#

Yet the parser is using C++...

vapid frigate
#

it doesn't compile or run anything like c++

jade abyss
#

Not even close.

#

Stop stating stuff you don't know as a fact, thx.

tough abyss
#

Does it actually compile?

vapid frigate
#

only similar thing might be the preprocessor

tough abyss
#

Does ArmA 3 use bytecode or some other translation?

vapid frigate
#

i think it uses text, not certain

tough abyss
#

So it is an expression parser?

vapid frigate
#

yeah

#

afaik

tough abyss
#

Which is implemented in C++?

vapid frigate
#

you could say it's implemented in every language.. in arma i think it runs the script with an expression at a time rather than compiling it

#

but i could be wrong

tough abyss
#

So it takes verbal word's parses the expression then uses the equivalent C++ operation internally within it's own namespace?

vapid frigate
#

it uses an operation internally in C++ code obviously, yeah

#

but that doesn't mean SQF switch = C++ switch

tough abyss
#

Some of the things ArmA 3 does....

#

A block of code should evaluate to the condition becomes true, and not even bother evaluating after that.

#

But no...

vapid frigate
#

it does if you use A && { B }

tough abyss
#

What happens if you use multiple expressions?

#

A || B && !C || D ?

vapid frigate
#

(A || { B }) && {! C || {D} }

jade abyss
#

also: If you need an statement like that... urgs...

tough abyss
#

I have seen the need for it...

jade abyss
#

Yeah, i forgot. You know everything "for a fact" ๐Ÿ˜‰

tough abyss
#

So many un-written SQF rules....

#

Weird ones too.

split coral
#

check the wiki for them

tough abyss
#

@jade abyss I remember where I read it now.

#

Bi's own wiki. About the complexity of scripts

#

Funny this line.

#

** Be careful: Scripting isn't a solution to everything. **

#

Yet, we a lead to believe this...

#

True @vapid frigate

#

?

simple fiber
#

"Scripting isn't a solution to everything." Most of the things can't be done without scripting tho

jade abyss
#

Whats your point?! I don't get it.

vapid frigate
#

i dont recall being lead to believe that

tough abyss
#

Comes full circle... How can you expect a game of this scale to work with the limitations it has....

#

?

vapid frigate
#

sorry you lost me

jade abyss
#

Do you have any clue what he is talking about, Lecks?

tough abyss
#

Whats advertised on the box... is false advertisement?

vapid frigate
#

no

jade abyss
#

Okay, i am not alone then.

simple fiber
#

Do you mean the sandbox limitations ?

tough abyss
#

I am confused about how this game, was allowed to be developed with the banner on the box...
** True combat gameplay in a massive military sandbox" "Experience a variety of singleplayer missions","Scenarios and challenges, or Teamup in multiplayer battles online authentic, Diverse, Open.

and yes...

#

@simple fiber I loved ArmA 3 and that love turned to hate.

#

When I micro-optimized every mission to run as best as I could get it.

#

Then hit both on the client side and server-side that performance wall

simple fiber
#

Ikr it's frustating sometimes but hey, it's the game. By optimizing again and again you acquire more experience.

#

There is always an end even in C++

jade abyss
#

"I loved ArmA 3 and that love turned to hate."
Then why are you still here?

#

That confuses me^^

tough abyss
#

Help other people with scripting issues? I do do it...

jade abyss
#

I haven't seen it yet, tbh. Only seeing you, stating facts you can't back up or just make up. Sry, but thats what i read the last days.

simple fiber
#

If you are frustated by the engine limitation you should probably try another sandbox game or make your own ๐Ÿ˜‰

tough abyss
#

At least all the work I put in learning the SQF engine won't go to waste. And I am sorry if it looks like I don't know anything, but when you come across a language, that just is a mess, because it really is, that goes against anything and everything you learn or continue to learn can you see how frustrating it is?

jade abyss
#

And again... just ranting ranting ranting

#

And if frustrates you -> Why do you still bother? Carry one and don't let you bother with it oO

#

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

tough abyss
#

No I want change... thats all I ask for...

simple fiber
#

Sad thing is that BI can just fix 2-3 things to make it really good but I think it's quite ok as it is rn. Of course it can be messy sometimes with all the HC stuff, weird syntax, heavy functions. But hey, it's what it make it's charm

jade abyss
#

Won't happen until Enfusion, you know that, yet you still rant around like 80Year old Grandma with no Garndkids that is frustrated

#

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

tough abyss
#

sigh microsoft WDS server is less frustrating than ArmA 3...

jade abyss
#

๐Ÿคฆ and again

simple fiber
#

@jade abyss The guy who clipboards "ยฏ_(ใƒ„)_/ยฏ"

thick oar
#

Imagine how frustrating Arma3 would be without any scripting language available...

soft crest
#

Hey Guys can someone help me please im trying to get a script to wait for the other to finish before executing but i cant seem to get it right i have this so far

#
_video = execVM "video.sqf";
waitUntil {scriptdone _video};  

_intro = execVM "intro.sqf"; 
waitUntil {scriptdone _intro};
tough abyss
#

Is Enfusion even happing for Arma? Wasn't that a DayZ thing?

jade abyss
#

@soft crest It probably starts right after its done calling "video.sqf". Add a sleep N at the end.

soft crest
#

its starting at the same time

jade abyss
#

Or add a Var to the beginning like: Dis_ExecDone = false; and after video.sqf was finished -> "Dis_ExecDone = true;" (changing the waitUntil to: waitUntil{Dis_ExecDone}; )

#

or both together

soft crest
#

That sounds like a plan can u give me an example on the one of the lines i sent

jade abyss
#

no?

#

I already wrote above, what to do. I won't write that whole thing for you ๐Ÿ˜‰

soft crest
#

ill try then and then maybe will u cehck it ?

jade abyss
#

Try it and check it for yourself.

tough abyss
#

@jade abyss doesn't particularly like to hold hands... ๐Ÿ‘€

soft crest
#

will do

jade abyss
#

You won't learn anything, if somebody else would do it for you, everytime :/

soft crest
#

100%

tough abyss
#

True.

jade abyss
#

I give hints, for easy stuff, but i won't make it for them ๐Ÿ˜›

blissful fractal
#

@polar folio thanks ๐Ÿ˜ƒ I will take a look. @rancid ruin I had been in here in long time. I live in denmark so when I wrote the message it was 01.52 and I waited 30 min and I was going in bed.
Next time think before you make a conclusion. We all here do not live in the same time zone and country ๐Ÿ˜ƒ Have a great day

soft crest
#

@jade abyss I did this is this on the right track ? it still plays together though

#
video_Done = false;
video_Done = execVM "video.sqf";
video_Done = true;
waitUntil{video_Done = true then execVM "intro.sqf" }; 
turbid thunder
#

You are setting video_done to true right away?

soft crest
#

ok what did i do wrong there

turbid thunder
#

video_done = false is obsolet because you overwrite it right after that

#

WaitUntil is obsolet because you set the condition to true just a line before it

#

Use scriptDone if you need to wait until the script is done

soft crest
#

i did that above with no luck

#
_video = execVM "video.sqf";
waitUntil {scriptdone _video};  

_intro = execVM "intro.sqf"; 
waitUntil {scriptdone _intro};
#

ill try understand what u mean in the above and try again

turbid thunder
#

Content of the video.sqf?

soft crest
#

its a ogv file ran like this

#
[] spawn {
scriptName "initMission.hpp: mission start";
["rsc\ARMA_3.ogv",0,0,1920,1080,true] spawn BIS_fnc_titlecard;    
waitUntil {!isNil "BIS_fnc_titlecard_finished"};

};
#

so the video plays as aintro to my mission then i have a camera script wich i want to run directlly after

#

but yea they running together

turbid thunder
#

If you want both to run together why even using waitUntil?

soft crest
#

i want the intro.sqf to run after

#

now the video is skipable wich is bad

#

and the intro is playing at the same time as video

turbid thunder
#

And using spawn in an SQF where there is only one scope is kinda pointless. Well how big is the delay between intro and video supposed to be?

soft crest
#

35 second i can use sleep but if they skip the video they wait pointlesslly

#

so i can either make the video unskipable

#

butr dont know how

#

or have the one script wait for the other to finish

turbid thunder
#

Get rid of spawn

soft crest
#

ok

turbid thunder
#

Spawn creates basically a "new script"

#

So the video.sqf spawns the thing and says its done. You could give the spawned scope a name too though

soft crest
#

yea i ran a main.sqf in the INIT wich has the video and intro script in

#

but i just need to fogure out how to let the intro wait for the video

#

if i take out the spawn should that fix the skipable option ?

turbid thunder
#

No but then the intro can wait for the video

soft crest
#

ahhh isee then should i use the code i had the scriptdone

turbid thunder
#

Yup

#

Because

soft crest
#

ok ill try thanks amillion

#

it wont be a spawn script then right it will just be normal

turbid thunder
#

Somename = [] spawn {CODE}; waitUntil {scriptDone somename} is a thing

soft crest
#

ok let me try thanks

turbid thunder
#

Np

soft crest
#

Working perfectlly the intro runs after the video

#

๐Ÿ˜ƒ

#

but the issue is the video is still skipable can i turn that off

#

@turbid thunder

turbid thunder
#

I dont know. Never used the videoplay option before

soft crest
#

mmmm

turbid thunder
#

Lemme research

soft crest
#

thanks for the trouble

simple fiber
#

Be sure tho to have a timeout on the cmd in case it crashes

turbid thunder
#

That command is dangerous D:

simple fiber
#

It is

turbid thunder
#

@soft crest if you use the command above, make sure that you have a way to re-enable the input

soft crest
#

๐Ÿ˜ณ

#

im not that good hahaha

#

lemme try then ill post here

turbid thunder
#

You wont be able to do anything in arma if you disable the input, not even ESC sooo yeah

soft crest
#

i like this hahaha

simple fiber
#

You can just do something ugly like

[] spawn {
    sleep approxtimeoftheintrominusfewsecs;
    disableUserInput false;
};
soft crest
#
disableUserInput true

_video = execVM "video.sqf";
waitUntil {scriptdone _video};  

_intro = execVM "intro.sqf"; 
waitUntil {scriptdone _intro};

disableUserInput false
#

hows that ?

simple fiber
#

It's ok

#

But dont forget my code at the top

rotund cypress
#

missing ;

turbid thunder
#

^

soft crest
#

the timout ?

rotund cypress
#

userInput

#

Also

#

Why not set a variable in the script

turbid thunder
#

First and last line dont have ;

rotund cypress
#

And do waitUntil {globalvar_script_done};

soft crest
#
//--------------------------------------------------------------
//------------------------Distinct Video -----------------------
//--------------------------------------------------------------

disableUserInput true;

_video = execVM "video.sqf";
waitUntil {scriptdone _video};  

_intro = execVM "intro.sqf"; 
waitUntil {scriptdone _intro};

disableUserInput false;



rotund cypress
#

Yes

simple fiber
#

Because global vars are the root of all evil ?

rotund cypress
#

But why execVM it? Is this not in a established mission?

soft crest
#

Be sure tho to have a timeout on the cmd in case it crashes(edited) ????

#

how do i do this

jade abyss
#

๐Ÿฟ

rotund cypress
#

@soft crest

simple fiber
#

^ this guy

rotund cypress
#

Is this not in a established mission?

#

Where you would use cfgFunctions?

soft crest
#

no its custom one i built from the ground up

jade abyss
#

But not from you.

rotund cypress
#

Why use execVM?

soft crest
#

recreating 13 hours

jade abyss
#

What kind of mission is it?

turbid thunder
#

Sorting stuff is fun

soft crest
#

capture and defend mission with 2 zeus

#

how do i do the timeout guys ?

rotund cypress
#

Unless this is one script you would use only for this function, I don't see a point of using execVM, either you have your own function with compiling scripts or you use cfgFunctions. Why ever use execVM?

turbid thunder
#

Sleep YOURTIMR:

jade abyss
#

You should start with something basic first, but... meh, why do i even say something^^

turbid thunder
#

@rotund cypress to run sqf files?

jade abyss
#

Ill continue eating ๐Ÿฟ omnomnom

soft crest
#

what u mean @jade abyss ? ive created plenty missions before

rotund cypress
#

Make it a function, then spawn it

#

@soft crest surely doesn't look like it

jade abyss
#

@soft crest Sry, thats what i 10000% NOT BELIEVE

soft crest
#

i send u one

#

๐Ÿ˜‰

jade abyss
#

You don't even know what "sleep" is. Or how to make an if Statement

rotund cypress
#

^^

soft crest
#

oviouslly i know sleep

turbid thunder
#

Plenty of missions =/= plenty of scripts

soft crest
#

but still learning others

rotund cypress
#

This is one of the most basic things to make @soft crest

jade abyss
#

Distinct - Today at 12:35 PM
"how do i do the timeout guys ?"

#

Yeah...

rotund cypress
#

๐Ÿคฃ

soft crest
#

sleep 10:

#

easy

rotund cypress
#

no

#

;

turbid thunder
#

*;

rotund cypress
#

hahah

simple fiber
#

๐Ÿ’ค

soft crest
#

i mlol

jade abyss
#

๐Ÿฟ

soft crest
#

hold on

#

lemme show u one

jade abyss
#

Why can't ppl just be honest and say, that they got no idea.

soft crest
#

i dont do scripts but i like making missions

jade abyss
#

I don't wanna see one, tbh.

rotund cypress
#

Ye ๐Ÿฟ ๐Ÿคฃ

soft crest
#

last week we made black hawk down

simple fiber
#

Dscha vs Discord

rotund cypress
#

Okey @soft crest do you know the difference between spawn and call?

#

I'm not throwing a piss at you, just you might as well be honest while we're trying to help you

unique inlet
soft crest
#

Spawn is new

#

learnt earlier

rotund cypress
#

What do you mean spawn is new?

jade abyss
#

@plucky beacon -> @unique inlet

rotund cypress
#

What is the difference between the two?

soft crest
#

creates new script

#

call im not sure probally retrieves a script if i had to guess

unique inlet
#

Oh nice thanks

turbid thunder
#

Spawn = code. Call = function? @rotund cypress

jade abyss
#

dfgdfsibg dfsb gdfsg

rotund cypress
#

wtf

jade abyss
#

๐Ÿคฆ

rotund cypress
#

Spawn = scheduled

simple fiber
#

Spawn = Creates a new thread

rotund cypress
#

Call = unscheduled

simple fiber
#

Call = Run in current thread

turbid thunder
#

Good thing I dont know the difference between those two :x

jade abyss
#

[]spawn{hint "i am done here, i give up"};
!=
[]call{hint "i am done here, i give up"};

soft crest
#

thanks for the help earlier

jade abyss
#

[]spawn{hint "i am done here, i give up"; sleep 1;}; //will Work
[]call{hint "i am done here, i give up"; sleep 1;}; //Error

#

(if called from unsheduled (not spawned/execVMd before)

scarlet spoke
#

Not true @jade abyss

#

Only if xou call from un-scheduled..

#

At least that is how it should be...

rotund cypress
#

No @scarlet spoke

jade abyss
#

true, unsheduled. I mix those words always^^

rotund cypress
#

If you call a function in scheduled, you still can't sleep in that function

scarlet spoke
#

but call itself does not change the script environment

jade abyss
#

I never said it does.

rotund cypress
#

No

soft crest
#

so if arma crashes after u disable user inputs and they come back in what happens nothing ?

turbid thunder
#

@soft crest they'll have input again

rotund cypress
#

๐Ÿคฆ

jade abyss
#

No, its locks the game forever. You can never play again

#

๐Ÿคฆ

soft crest
#

lol

jade abyss
#

of course, it resets back to normal.

soft crest
#
//--------------------------------------------------------------
//------------------------Distinct Video -----------------------
//--------------------------------------------------------------

disableUserInput true;

_video = execVM "video.sqf";
waitUntil {scriptdone _video};  

_intro = execVM "intro.sqf"; 
waitUntil {scriptdone _intro};
sleep 1;

disableUserInput false;
scarlet spoke
#

But if it doesn't why shouldn't sleeps be possible when calling from scheduled environment?

soft crest
#

this good ?

rotund cypress
scarlet spoke
soft crest
#

will do

rotund cypress
#

It doesn't make any sense @scarlet spoke I might be incorrect, but from what I remember still when I have called from a scheduled environment I've still gotten errors

turbid thunder
#

The wiki isnt always correct

rotund cypress
#

^^

jade abyss
#
[] spawn
{
call{sleep 2;};
};
#

works....

rotund cypress
#

๐Ÿ˜ญ

scarlet spoke
#

There you go ๐Ÿ˜‰

rotund cypress
#

My bad...

scarlet spoke
#

@turbid thunder not always but this time ๐Ÿ˜›

turbid thunder
#

Spawn to call a sleep

jade abyss
#

pretty often, tbh.

soft crest
#

ok i can see why that input is so dangerous i can get past map screen

polar folio
#

you mean "can't"?

soft crest
#

The scriprt is diabling the inputs before i can click continue

#

so will need to move it

polar folio
#

you could just go and copy the titlecard function and make your own version of it without the skipping functionality and call that. might be a bit backwards but maybe easier after all. dunno.

tough abyss
#

You can nest call within spawn? That's pretty cool.

jade abyss
#

Sure, why not oO

[] spawn
{
    [] spawn
    {
        [] call
        {
            [] spawn
            {
                [] spawn
                {
                    sleep 1;
                    [] call
                    {
                        hint "Hi";
                    };
                };
            };
        };
    };
};```
tough abyss
#

Although does seem pretty self explanatory looking back at it...

#

Fixed ๐Ÿ˜ฌ ```SQF
[] spawn {
[] spawn {
[] call {
[] spawn {
[] spawn {
sleep 1;
[] call {
hint "Hi";
};
};
};
};
};
};

meager granite
#

you forgot to wrap it all in remote exec

jade abyss
#

True! totaly missed that

#

also: execVM'd

vague hull
#

more over no "[] call compile str {}"
this makes it 10x better ... at least!!!1!!

jade abyss
#

10000% !!

simple fiber
#

This is pure rape

vague hull
#

You wouldnt believe the things I have seen

jade abyss
#

*call compileFinal <-- this is

vague hull
#

true

#

also why not format the string of code with some constants?

brazen reef
#

this addeventhandler ["fired", {(_this select 0) setvehicleammo 1}]

#

Would this cause a lot of lag with the tracer module?

jade abyss
#

[] call compile format["",{}];

brazen reef
#

IF I have like 20 or so down?

vague hull
#

will you use that on AI?

brazen reef
#

No it's the tracer module.

#

Which spawns an invisible AI.

#

As far as I understand

vague hull
#

ahh ok

brazen reef
#

You know the one that fires a few rounds randomly into the air.

vague hull
#

well, if thats true it also resets the fire delay, so that there is nearly no RPM limit

brazen reef
#

Ah, that's bad.

vague hull
#

however, I dont think it causes lag

brazen reef
#

I just want it to fire forever, because right now they run out of ammo.

vague hull
#

you can just use the reloaded EH

brazen reef
#

Reloaded EH?

vague hull
#

if they are units

brazen reef
#

Ah.

brazen reef
#

this addeventhandler ["Reloaded", {(_this select 0) setvehicleammo 1}]

vague hull
#

its Local Exec only too

#

I would rather give them 2 Mags in advance and give them another new mag

brazen reef
#

I don't even know if they operate on the principle of mags.

#

Or if they just have one big.

#

And if they even reload automatically.

#

Gotta try that out.

vague hull
#

If they are units the need magazines

#

I dunno if the reloaded eh works correctly on vehicles tho

brazen reef
#

It's an dude.

#

Not a vehicle.

vague hull
#

regarding the mags, but for your case it should be fine

#

I used that way to give my AI inf ammo without them shooting 1000 bullets in a row without reloading ^

brazen reef
#

Wait.

#

Shouldn't I just use setammo then

#

Since that sets the ammo in the current mag.

vague hull
#

you could

#

it will however set ammo to all mags this weapon uses

brazen reef
#

this addeventhandler ["Reloaded", {(_this select 0) setammo 30}]

#

Well, I will try it.

#

Speaking of, since I never done that.

#

Can I just copy that line into the module init and it should work?

vague hull
#

"this" must be changed to the unit the module refers to

brazen reef
#

Ah damn.

tame portal
#

@vague hull yes that was a defence

#

I was under time pressure

vague hull
#

By doing so you question nearly all western countries exam system..
Time pressure is no point for invalid answers

tender fossil
#

What am I doing wrong here?

#

["You have played in opposing team earlier during this round and you've been locked to that side. Teamswapping is not allowed to keep the game fair. Please join the opposing team.", "PLAIN", 10] remoteExec ["cutText", _player];

vague hull
#

well what do you expect it to do?

tender fossil
#

Showing the player that text when he tries to join the game

#

But it doesn't

vague hull
#

the args must be in another array I think

#

Let me have alook sec

vapid frigate
#

you calling it late enough?

#

not when the client is in the loading screen?

tender fossil
#

It's called when client is in the custom loading screen (shown by mission)

#

Should I add some waitUntil clause?

vague hull
#

normally should work with that syntax

#

make sure to add it to your remoteExec filters

jade abyss
#

If send from Server -> No Filter needed

tender fossil
#

Well, it doesn't work. RPT is clean as well

#

Shouldn't I be able to send multiple messages on the screen with cutText instead of titleText?

vapid frigate
#

from memory if you use different layers you can

vague hull
#

@jade abyss you never know ^^

jade abyss
#

i do ๐Ÿ˜„

vague hull
#

Ahh yeah sorry forgot about that ๐Ÿ˜„

jade abyss
#

You can send everything from the Server. No Restriction ๐Ÿ˜›

vague hull
#

What I was trying to say: You never know where its coming from

jade abyss
#

I added everything to the RE Whitelist before, then forgot it once, still worked, ignored it from now on for ServerSended stuff.

#

Ah, yeah. Thats true.

tender fossil
#

What's the syntax for adding this command with remoteExec?
layer cutText [text, type, speed, showOnMap]

#

Where do I place that "layer" variable?

vapid frigate
#

[layer, [text, type, speed, showOnMap]] remoteExec ["cutText"..

tender fossil
#

So the engine knows automatically where to place the arguments? Nice, thanks ๐Ÿ˜ƒ

vague hull
#

nope, dont think so

vapid frigate
#

unless u need brackets around the last part maybe

tough abyss
#

Its alternative syntax if anything

vapid frigate
#

that edit should work

[<params1>, <params2>] remoteExec ["someScriptCommand", targets, JIP];```
#

i think.. it's not real clear for something with _obj command _array

vague hull
#

@jade abyss do you know by any chance if publicVariableClient'd variables are received in the order they were sent?

jade abyss
#

puh, good question. No clue, sry.

#

Never used publicVar

vague hull
#

well same thing for remoteExec I guess

jade abyss
#

iirc, RECall is instant

#

RE can have a delay on the Client

#

(not 100% confirmed - just logical thinking - 1 is "spawn" one is "call")

vague hull
#

yeah, thats what I remember too

#

but for some init stuff, it would be good to know if I have to check for all varibles to be there or just for the last one

jade abyss
#

Why not sending them at once via remoteExecCall?

#

Or even Obj setVariable PubTrue

vague hull
#

That didnt work out for me somehow

jade abyss
#

It should oO

vague hull
#

Yeah I was wondering too

jade abyss
#

You can even go the nasty way and create something like: (one moment)

#
Sen_fnc_MyVars = 
{
    {
        missionNameSpace setVariable [_x select 0, _x select 1];
    }forEach _this;
};

[[_Var1,true],[_Var2,false]] remoteExecCall ["Sen_fnc_MyVars",(owner _player)];```
very nasty
#

OR:

#
[[_Var1,true],{ missionNameSpace setVariable [_this select 0, _this select 1]; } ] remoteExecCall ["call", (owner _player)];;```
#

Nasty, but works

vague hull
#

the second one is missing the forEach tho

jade abyss
#

Nah, i forgot to remove the 2nd Array

vague hull
#

Thanks first of all

#

I've already been trying out something like this

#

but as I said somehow didnt work out

jade abyss
#

The code above works. Feel free to use it =}

#

or... even easier, when i think about it:

vague hull
#
[missionNameSpace,[_Var1,true]] remoteExecCall ["setVariable", (owner _player)];
#

would that work?

#

I mean, idk if the missionnamespace can be broadcasted in that way

jade abyss
#

Yep, was about to write that^^

vague hull
#

^^

#

I will test it later on

vapid frigate
#

could be laggy if it does work

#

send the whole mission namespace over the network

vague hull
#

not really

#

its about if the reference would work

jade abyss
#

No Lecks, it only sends the info over, wich one to select

vapid frigate
#

yeah it's unlikely to do that

jade abyss
#

But possible

vapid frigate
#

yeah it doesn't say what it'll do with a namespace

#

it seems sort of like sending a 'createvehiclelocal' object

vague hull
#

if it wouldn't work, then even the codeexample above shouldnt work.
I guess you would need to str the missionnamespace setVariable part and compile it on client first

jade abyss
#

(haven't done much with setVariable in RE. Maybe just works with Objects.

vague hull
#

gonna do some tests

#

but not before tomorrow

tough abyss
#

Anyone know at what damage level a helicopter is unable to fly?

#

If no fuel.

vague hull
#

depends on the hitpoints

#

and if no fuel, well ๐Ÿ˜›

tough abyss
#

Ya... I am trying to have an AI operated helicopter transport other AI around until it gets shot down or the pilot dies. Pilot dying is easy. But sometimes it gets damaged and it just lands and sits there indefinitely.

#

I need to be able to detect that =/

#

Not sure how atm

polar folio
tough abyss
#

Good catch. I will have to test it

#

Also, is it possible to place a zeus "missile strike, CAS, fire support" module via script?

#

I've never tried it before.

vapid frigate
#

no fuel shouldn't be able to accellerate at least.. no main rotor will drop a lot faster

tender fossil
#

What was the Discord syntax of adding SQF properly formatted again?

tough abyss
#

~```sqf

tender fossil
#

_test = true;
#

lol

tough abyss
#

Use close `

#

boom

tender fossil
#

Ah, thanks ๐Ÿ˜ƒ

tough abyss
#

๐Ÿ‘

tender fossil
#

The feeling when a script is being called every five seconds and you have no idea why

tame portal
#

@tender fossil Jesus take the wheel

tender fossil
#

I've searched the whole mission file and I've no idea what calls it repeatedly

tame portal
#

What exactly is being called every 5 seconds

tough abyss
#

Use notepad++ search in files feature to search for what is being called. It has to be coded...

tame portal
#

@tough abyss maybe not [T]/

#

It's magical

tough abyss
#

Oh ya, I forgot Arma has a new feature. The call random function every 5 seconds...

tame portal
#

That's righr

#

Thanks phone

tough abyss
#

haha

tame portal
#

Thanks for nothing Obama

tough abyss
#

Those obama phones I tell you.

tame portal
#

It auto corrected right to righr

#

This is more suspicious than Illuminati spelled backwords

#

itanimullI

tender fossil
#

The whole mission file is on GitHub, I've searched it through with the search

tame portal
#

*backwards

dusk sage
#

Send us the link then ๐Ÿ™ƒ

tender fossil
#

It's private repo unfortunately, I can't/don't have the right to share it

dusk sage
#

If you know the function variable, just search for it

tough abyss
#

Well it needs to be somewhere to be run.

tender fossil
#

I've searched with the function variable, still no results... I don't really understand what's happening here ๐Ÿ˜„

tough abyss
#

Is the mission file binarized? Maybe it is in there.

dusk sage
#

Did you only try GitHub search?

tender fossil
#

@dusk sage Yes

dusk sage
#

Maybe try locally, GH search is crap

tough abyss
#

I would try using notepad++. Gets the job done

#

Maybe the function is within a script and that script is being called every 5 seconds........

tender fossil
#

Yeah, it was fault of shitty GitHub search

#

We found it by manual search

#

@dusk sage @tough abyss

tough abyss
#

Glad you found it.

tender fossil
#

I don't understand the GitHub search... It tells you it searches through the code in repository but still doesn't

scarlet spoke
#

It does only search the master branch @tender fossil

tender fossil
#

Well, that explains a lot (and makes sense) @scarlet spoke

tough abyss
turbid thunder
#

ewww, pastebin

tough abyss
#

Well pasting 170 lines of code (even though impossibru) is highly frowned upon here in discord

turbid thunder
tough abyss
#

Looks nice. May have to use it then ๐Ÿ˜ƒ

#

bookmarked

turbid thunder
#

Well I actually forgot what was wrong about pastebin again, probably the ads because someone literally kept telling me "eww pastebin use github" and such things >_>

tough abyss
#

lol

turbid thunder
#

but github is actually pretty good although I havent used more than pasting my code in there so I can share it, I do know that it has more functionalities than that

still forum
#

The feeling when a script is being called every five seconds and you have no idea why use a debugger and see what's calling it ๐Ÿ˜‰ advertising

plucky beacon
#

lol dedmen

#

So is there a place for important display IDs I'm missing or am I just a goof

still forum
#

Config. I have my all-in-one config and just search for idd and then I look through all of them till I find the correct one.

plucky beacon
#

I mean, I know I'm a goof regardless but I'm looking for the one with curator interface

still forum
#

Or generally you can use the Ingame config-viewer and just look for RscDisplay

#

I can give you that one sec

plucky beacon
#

sweet

still forum
#

RscDisplayCurator .. idd=312

plucky beacon
#

thanks

still forum
#

To find that yourself you would just go to the config-viewer and scroll down to RscDisplay and then look through each of them till you find what you need. RscDisplayCurator is quite obvious when you are searching the Curator Display

plucky beacon
#

good to know

#

I remember finding the interface for rsc spectator by making a hint that output active displays, and finding the one that wasn't there before spectator

#

also it was easy because the spectator display is lik 6 digits

polar folio
#

@plucky beacon just came up with this. any ideas on the best way to format it nicely so it can be copy pasted into a text document for reference?

_idds = "!isNull (_x >> 'idd')" configClasses (configFile);

_idds = _idds apply {[getNumber (configFile >> configName _x >> "idd"), configName _x]}
#

good point

#

so i guess copytoclipboard will not be able to have line breaks?

#

sweet. thx

plucky beacon
#
    while (isNull ( findDisplay 312 ) ) { //312 is zeus interface
        sleep 5;
    }; 

this should keep someone in the loop until they open zeus correct?

#

will waituntil check every frame?

dusk sage
#

Optimally, yes

plucky beacon
#

oh you CAN sleep in a waituntil

#

okay

#

gotcha, the last thing you want to do is return the bool

#

I see

#

well besides it just not having a semicolon ya

#

I think you're onto something there

dusk sage
#

who needs each frame

#

when you can execute 1000000000 per frame with while true

#

๐Ÿ™ƒ

still forum
#

@plucky beacon Do you use CBA? You can just use a DisplayLoad eventhandler if you need to know when a player opens the interfae

plucky beacon
#

staying away from CBA, want it to work with vanilla

#

#noDependencies

still forum
#

Key. Then you have to stay with that crappy script way to detect it ^^

plucky beacon
#

lol

#

crappy script way

#

I'll have you know I like my crappy script way

#

HAHA

#

you going to ask me if I've heard the good word of XEH?

still forum
#

It's just bad that there is no better way than having a scriptVM that checks every frame if something happened. Instead of having an eventhandler for that

plucky beacon
#

Im surprised there wasn't an event handler for opening curator interface

#

I thought that was only the assignment

#

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

#

note taken

dusk sage
#
thats the whole point of scheduled, so you can suspend
without the ability to delay execution, scheduled is useless

That's a funny way to look at it

#

Or just wish to run non-blocking code

#

You said without suspension, it's useless

#

hm?

#

thats the whole point of scheduled, so you can suspend

#

Even if you don't wish to suspend, of course there is reasons to run code scheduled

#

You've lost me ๐Ÿคฃ

thin pine
#

What are those reasons?

#

Waituntil while and sleep all count as suspension so without using those, what reasons for scheduling are left?

still forum
#

offloading heavy tasks.

#

Because scheduled only runs for 3ms a frame. If you have some heavy code that runs 30 milliseconds. Unscheduled would cause massive framedrop. Scheduled would automatically spread it over 10 frames

thin pine
#

Not if those 30 ms are caused by the use of heavy commands

still forum
#

no heavy command takes 30ms

#

there may be some commands that take 3 ms.. But that means the scheduler will just stop right after that heavy command

thin pine
#

Writing a script that is useful and takes 30 ms to execute without using suspension is questionable on it's own

#

Sounds too unlikely

still forum
#

Still happens. For example spawning a bunch of vehicles. createVehicle takes quite some time

thin pine
#

In other words scheduling is good for loops and suspension

dusk sage
#

Anything you don't want to be blocking ๐Ÿ˜„

still forum
#

Basically if you don't care about when something executes. Main reason for using unscheduled is that you know it will be executed right there and then till it's done.

dusk sage
#

Did someone say race conditions ๐Ÿ™ƒ

#

There is no argument

still forum
#

True

jade abyss
#

Remember: We talk about Milliseconds!

#

๐Ÿ˜„

simple fiber
#

@tough abyss Like in every programming language many people just don't care and 'make it run'

thin pine
#

Render scope stuff

dusk sage
#

shh commy will come and talk about the scheduler

jade abyss
#

but some people use per-frame for everything,
Exactly...

#

like with Trigger -> Do you rly need the command every 0.5s / each Frame?

turbid thunder
#

@jade abyss Since after my massive trigger spam, I'm fairly certain that it doesnt hit on performance very hard at all

still forum
#

Funfact. I removed all scheduled code besides one spawnin TFAR and turned everything into unscheduled.

turbid thunder
#

So what creates unscheduled environments anyways?

still forum
#

Eventhandlers, isNil and... Some other script commands.

jade abyss
#

@turbid thunder Do you even read, what i write? Just once?

turbid thunder
#

@jade abyss Yes

jade abyss
#

Doesn't seem so

dusk sage
#

EVHs/calling from an unscheduled environment/remoteExec & remoteExecCall for commands (and execCall for functions)/isNil

#

Maybe some others

jade abyss
#

I said -> " Do you rly need the command every 0.5s" You said -> "It doesn't hit performance"
You see.... thats like me saying: "I like Trains" and you say: "Yeah, but on Mars is Sand".

#

It just doesn't connect to eachother.

#

Call expecting return? Not rly. A call is a call.

#

Not necessarily (i fkn hate that word)

still forum
#

What kind of trigger spam are you talking about @turbid thunder I once looked at a mission that only had 5 fps... Turns out one guy had some trigger duplicated. Deleted all the duplicates and got up to 20 fps. Depends on how long the trigger condition takes to execute

dusk sage
#

Blocking the sending client, and returning to that exact point in execution to return

turbid thunder
#

The thing is it doesnt matter if it executes the check every half a second because triggers are way easier to set up than making your own SQF that does the same thing with a result that is not different from using the easier way

jade abyss
#

@still forum Useless to argument^^

#

Oh btw.: Beeing alone in a mission doesn't count. ๐Ÿ˜„

turbid thunder
#

@still forum A simple "Any present" trigger, 100x100x20

dusk sage
#

Imagine the deadlocks ๐Ÿ˜„

turbid thunder
#

with like 40 - 60 other AI's

jade abyss
#

^^

still forum
#

100x100 okey.. yeah.. Thats not big enough to matter much

turbid thunder
#

You'd wish

#

๐Ÿ˜„

jade abyss
#

I hope not

dusk sage
#

Who needs triggers pff

turbid thunder
#

@still forum Well I'm usually never using triggers bigger than that

dusk sage
#
while {true} do {
    if (player inArea "..") then {}
}

we need to check 1000's of times per second

jade abyss
#

sush!

#

Don't misslead him with arguments

#

and facts ๐Ÿ˜„

turbid thunder
#

Thats what I thought today too

jade abyss
#

We told him that... idk... no clue how often.

dusk sage
#

oh lord

turbid thunder
#

You never explain your original point against triggers to begin with

still forum
#
isNil {
    while {true} do {
        if (player inArea "..") then {}
    };
};

10k times per frame!

dusk sage
#

yes, that's better

jade abyss
#

(if you remember Mason, the Discussion started as i mentioned "There is no reason to use Triggers anymore, since inArea exists)

#
The German Mason - Today at 7:47 PM
You never explain your original point against triggers to begin with```
Excuse me??
turbid thunder
#

@still forum I don't think you should've given that to me ๐Ÿ˜„

dusk sage
#

do it

#

It's good for perf

still forum
#

I don't have to play your missions ^^ I don't care

jade abyss
#

โ˜ *time

You clearly never read, what i wrote, Mr. Mason. tztztz.

turbid thunder
#

@jade abyss ยฏ_(ใƒ„)_/ยฏ

jade abyss
#

Okay, i quote a text from roughly 5min ago:
like with Trigger -> Do you rly need the command every 0.5s / each Frame?

halcyon crypt
#

@jade abyss that's what you get for advocating braces on a new line ๐Ÿ˜

jade abyss
#

NO!

turbid thunder
#

I don't get why it would matter

jade abyss
#

๐Ÿคฆ

#

And thats why i answere with "w/e" ๐Ÿ˜„ hf

#

@halcyon crypt But it looks so much cleaner!

dusk sage
#

I use new lines before brace in everything but SQF

#

Just seems line the norm to inline in SQF

jade abyss
#

peasants

#

pff... no Newliner. Bad habits... bad habits everywhere

#

๐Ÿ˜‚

dusk sage
#

Heresy

jade abyss
#

!

turbid thunder
#

Then I assume that it literally doesn't matter ๐Ÿ˜„

hollow lantern
#
_meme = {call _meme};
call _meme;```
#

๐Ÿ˜„

still forum
#

better Idea

#
_meme = {spawn _meme};
spawn _meme;
hollow lantern
#

pff lets combine that into a nightmare.sqf

jade abyss
#

We already did before

#

~6hrs ago. Spawn/Call/CallCompile(final) of hell. For a hint.

vague hull
#

It was great

turbid thunder
#

Sounds like someone wants his FPS drained to 1 and below. And yeah, that Distinct guy

#

He actually sent me a private message because, quote "but these guys will rip me apart if i ask on general"

tough abyss
turbid thunder
#

and I saw the spawn inside spawn inside spawn inside spawn inside spawn inside spawn inside spawn with a hint

#

Hellcats are useless when used by the AI xD

tough abyss
#

LOL the AI went up unto the tower to get into the heli and now it is taking off like nothing happened.

#

#win?

#

#halffail?

turbid thunder
#

@tough abyss I forgot which channel it was on, either here or general but scroll up about, 8 hours from now and you'll find it. (Or search his name)

#

halffail

#

Depends

#

How many died?

tough abyss
#

All units accounted for

turbid thunder
#

huh.... well, #halffail

#

you know thats weird because if you use the "LAND" waypoint, the helicopter will be somewhat forced to look for a helipad nearby and land there

#

thats why invisible helipads are a mission makers best friend for AI heli landings

tough abyss
#

Ya, its been a bitch to get the AI to work the way I want them to. To transport other AI from where they spawn to the appropriate sector. But it works pretty nice.

turbid thunder
#

Did you also manage to make them ignore enemy fire?

tough abyss
#

Yep.

turbid thunder
#

yey

tough abyss
#

I think this does the trick:
_wpMove setWaypointBehaviour "CARELESS";

turbid thunder
#

setFleeing 0 works too

#

depends on if you care for the light

tough abyss
#

Ya

turbid thunder
#

I'm currently thinking of a way to optimize the custom AI for my horror missions

#

Its so performance heavy that 10 AI's is the absolute maximum I can go to before their reaction times are significantly reduced

jade abyss
#

You have to use more trigger
๐Ÿ˜‚

turbid thunder
#

Fun fact: The mission actually doesnt have a single trigger

#

Instead, it has a massive gamelogic spam because, well, even the pathfinding in that is custom

jade abyss
#

then add some

turbid thunder
#

๐Ÿค”

hollow lantern
#

@jade abyss

if (name player == "Dscha") then {player addTriggerLoveRating 9000}
turbid thunder
#

addTriggerLoveRating

#

dafuq

hollow lantern
#

ikr

simple fiber
#

Made this in the morning

jade abyss
#

@hollow lantern "okay" ๐Ÿ˜•

turbid thunder
#

@simple fiber It misses something

#

Me getting Triggered

#

But yeah that pic is, a masterpiece

#

not rly but heyyyy

hollow lantern
#

I mean hey lets stop handwriting, there are computers available, there is no need for handwriting lol

#

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

simple fiber
#

Btw does everyone has "ยฏ_(ใƒ„)_/ยฏ" in a notepad always open or what lel

hollow lantern
#

--> /shrug

turbid thunder
#

Ehm

hollow lantern
#

@simple fiber

turbid thunder
#

I actually do

jade abyss
#

Noob ยฏ_(ใƒ„)_/ยฏ

turbid thunder
#

Notepad with like 5 files open I always need

#

Third file, second line, is ยฏ_(ใƒ„)_/ยฏ

#

Filename: "D.txt" (Dont ask why I dunno ;_;)

dusk sage
#

( อกยฐ อœส– อกยฐ)

turbid thunder
#

I have that one too

simple fiber
#

lmao

turbid thunder
#

and thats about it

#

xD

simple fiber
#

fliptable ?

dusk sage
#

(โ•ฏยฐโ–กยฐ๏ผ‰โ•ฏ๏ธต โ”ปโ”โ”ป

#

โ”ฌโ”€โ”ฌ๏ปฟ ใƒŽ( ใ‚œ-ใ‚œใƒŽ)

turbid thunder
#

xD

jade abyss
#

okay okay okay okay okay, guys. Too much offtopic #offtopic_arma <-- =}

dusk sage
#

(โŒโ–ก_โ–ก)

jade abyss
#

#triggered

turbid thunder
#

Alright, my txt has three more additions

simple fiber
#

Dem jokes

turbid thunder
#

I need to stop that before I get kicked xD

simple fiber
#

We should probably stop before @open vigil just kick us all out

hollow lantern
#

hmm caller (_this select 1) do I need the select or can I just say params["caller"]; ?

simple fiber
#

But I can easily trigger you so hard guys : Altis Life

#

^

turbid thunder
#

@tough abyss LMAO

dusk sage
#

The real question is

#

When will the channel description be fixed

simple fiber
#

AHAHAH

dusk sage
#

Seeing as it's telling us to never talk about 'script' here

turbid thunder
#

That will improve my scripts by a lot now

simple fiber
#

Holy shit @tough abyss make an obfuscator with this syntax

turbid thunder
#

I wonder if ( อกยฐ อœส– อกยฐ ) will look good in hint, like, Hint "( อกยฐ อœส– อกยฐ )"

bitter bough
#

would this be the right place to ask about how to path a config.cpp so I can replace textures for interiors? o.o

dusk sage
#

hacks!!!!!1

simple fiber
#

You forgot to delete the watermark ui

#

๐Ÿ˜„

turbid thunder
#

Watermarks are the worst

#

Problem is, even if you are just a passenger you still get the ad that you can buy it like, right now

dusk sage
#

will you make a release for jets dlc plz? @tough abyss

#

๐Ÿ‘ฎ

#

I saw people talking about a way to get the DLCs free the other day

#

Some tool or something

#

Lame

turbid thunder
#

@tough abyss People with that logic are countered by "You don't want it? Then dont pirate it"

#

Except it isnt really pirating and the content is right in your face and arma has countless ways to still equip all that stuff but also countless ways of it preventing you from enjoying it

simple fiber
#

KNOWLEDGE

#

It has no point if you can use the content with ingame commands

jade abyss
simple fiber
#

This is scripting

bitter bough
#

does anyone here know how to set up a config.cpp for textures?

jade abyss
#

@bitter bough

bitter bough
#

ah

#

thank you

simple fiber
#
if (@The German Mason) then {
    hint "You are right my dud";
}
turbid thunder
#

I wonder if you get those watermarks in karts and helis aswell though

simple fiber
#

Yea

#

Sorry

#
answer = "Yea";
turbid thunder
#

it isnt

#

Not touchable by scripts :/

#

I think that we once looked for that

#

actually, I forgot

#

But I doubt they would make it that easy

#

I've always seen the Arma 3 DLC more as a "Donation with small reward" because they are doing so much for the game just for free that there simply is no other way for them to earn money

#

Well lets hope it doesnt take up until Arma 4 to get it fixed

#

Arma just has certain habits of bad things that never go away despite being reported so lets hope that the 3 FPS bug isnt going to be one of those

#

Like, the hellcat not engaging targets or the crane destruction animation being somewhat broken (Fun fact: In CUP, the animation plays just fine)

#

Yeah

#

Unless TFAR and ACRE work with x64, they'll have to use 32 bit --> 3 FPS bug?

still forum
#

TFAR and ACRE work with x64

turbid thunder
#

guess that solves it

plucky beacon
#

lol

hollow lantern
#
/*
    author: @Aebian
    description: Entrance script
    returns: nothing
    // _null = this addAction ["Area 69","itsAebian\lab_gate.sqf",toLab] 
*/

 params["_state","_caller"];

 A_Caller = _caller;
 A_State = _state;

 if (rank A_Caller isEqualTo "SERGEANT" && A_State isEqualTo "toLab") then
   {
    A_Caller setPos [10623.1,7409.35,16.1496];
    GateBunker animate ["TurnDoor",1];
    sleep 3;
    GateBunker animate ["MoveDoor",1];
   };


 if (rank A_Caller isEqualTo "SERGEANT" && A_State isEqualTo "toBase") then
   {
    A_Caller setPos [7541.05,7392.53,0.43043];
   };``` Anyone can point me in the right direction? I'm not able to get the caller. I don't get any script errors but I don't get teleported
jade abyss
#
GateBunker animate ["TurnDoor",1];
    sleep 3;
    GateBunker animate ["MoveDoor",1];```
animateSource is awesome, when model is configured to it
hollow lantern
#

yeah but this specific model isn't ๐Ÿ˜ƒ

turbid thunder
#

Question

#

if isEqualTo is basically just an optimized version of ==, then why ever use ==? Whats the difference? Or why isnt == just doing the isEqualTo operation for the sake of performance?

peak plover
#

Area 69. hahaa

#

fucking great

hollow lantern
#

@turbid thunder isEqualTo is slightly faster then ==

turbid thunder
#

@hollow lantern if isEqualTo is basically just an optimized version of == That's what I already said

#

Wasnt my question D:

hollow lantern
#
Some differences between isEqualTo and ==:
It performs case sensitive comparison on Strings
It doesn't throw error when comparing different types, i.e. ("eleven" isEqualTo 11)
It can compare Arrays, Scripts and Booleans (alive player isEqualTo true)
It can compare non-existent game objects (grpNull isEqualTo grpNull)
It can compare Namespaces (As of Arma 3 v1.47)
It is slightly faster than ==, especially when comparing Strings```
#

@turbid thunder

jade abyss
#

Yep

hollow lantern
#

well then just write B_MRAP_01_F as it is written in the editor and its also true. But yeah it depends on the use case.

little eagle
#

setVariable public doesn't work inside the init eventhandler

#

Value is not synched.

#

Only defined on the machine that created the object.

turbid thunder
#

Ok thx

#

Hmmm, I guess if one had an ingame password system, case sensitivity could be good ๐Ÿ˜„

#

You guys know if exessive line of sight checks take long to process?

dusk sage
#

That's ambiguous

#

But considering you said excessive, I'm going to say they take longer than non-excessive ones

little eagle
#

If they are excessive, then they by definition take long to process, no?

#

Why else would they be "excessive"

turbid thunder
#

Well I need line of sight checks for custom AI and for faster response time, the code needs to run faster

#

in a loop

#

aaaaaaand I think that line of sight check + direction unit is looking check + distance check +, ehm, let me see real quick

#

basically point is: I managed to achieve what I wanted but not on the level of performance I would like to

dusk sage
#

This is still really ambiguous

#

We have no idea where you're running code, how you're running it, what code you're running, how often

#

Anything

turbid thunder
#

executed via execVM

#

And I'm pretty sure that line 123 is the bottleneck that causes highly noticable slow reaction when I have multiple of those guys wandering around

dusk sage
#

I tried to read that, but indentation!!

still forum
#

wparraysort = wparraysort + [[_distance, _x]]; use pushBack

dusk sage
#

Makes it 100 times harder to read

still forum
#

Fix your indentation

#

why are there about half a dozen _this select 0

turbid thunder
#

good question

still forum
#

nul = [_freddy] spawn why save that in a variable if you don't need it

turbid thunder
#

That script is from 19.08.2016 ๐Ÿ˜„

#

Ah yeah

still forum
#

why do you have a spawn inside a spawn inside a spawn inside a execVM ?

turbid thunder
#

nul = [_freddy] spawn That was because I was too big of a dummy to get animspeedcoef global

still forum
#

Agreed there might be a real reason for doing it like this. But it looks bad

dusk sage
#

Dedmen, don't argue with infallible logic

turbid thunder
#

Aaaaaaaaand also, you know the issue with sounds having an insane distance?

dusk sage
#

Either way @turbid thunder This is also run scheduled, this isn't going to cause any noticable perf issues

turbid thunder
#

Well, this is what I had to do before they added a third parameter for sounds in the description to have a audible distance defined so I had to figure smth out

still forum
#
{
if (_freddy distance _x <= 2 && _mode != 0) then
{
_victim = _x; 
_selected = true;
};
} foreach _targetlist;

You are iterating through all targets. But only use one in the end. Why not stop after you found one?

dusk sage
#

Unless you are relying on it being quick

turbid thunder
#

@BoGuu#1044 Yup. Problem is that the slow response time makes them miss their waypoint or take too long to react

#

@BoGuu#1044 test

#

ok....

#

@still forum How can one exit a forEach?

dusk sage
#

exitWith

#
{
    if (found the right one) exitWith {};
} forEach balloons
still forum
#
{_reldir = _freddy getRelDir _x;
if ((_x != _freddy) && (side _x == west || side _x == east) && ((!lineIntersects [eyePos _x, eyepos _freddy, _x, _freddy]) || (!lineIntersects [getPosASL _x, eyepos _freddy, _x, _freddy])) && ((_reldir > _fov1 || _reldir < _fov2) || (_freddy distance _x < 20 && _x isFlashlightOn (currentWeapon _x)) || ((speed _x < -0.1 || speed _x > 0.1) && _freddy distance _x < 5)) && !isObjectHidden _x) then 
{_targetlist = _targetlist + [_x]};
} foreach allUnits;

why allUnits? don't you only need the units in range? use nearEntities or something. Also use lazy eval for the condition

dusk sage
#

omg

#

delete delet

#

my eyes

#

๐Ÿ˜„

#

so much red

turbid thunder
#

Ikr

dusk sage
#

I like the syntax highlighting

#

Red with a splash of yellow

turbid thunder
#

Blame the fact people can lean their head inside walls

little eagle
#

@barren stone

Reposting here, because it's pretty important:

["B_MRAP_01_F", "init", {(_this select 0) setVariable ["test1", true, true]}] call CBA_fnc_addClassEventHandler;
_v = "B_MRAP_01_F" createVehicle position player;
_v setVariable ["test2", true, true];
missionNamespace setVariable ["v", _v, true];

On local machine: test1 and test2 are defined
On remote machine: test1 undefined, test2 defined
-> setVariable public doesn't work inside the init eventhandler

We have initPost, which solves this for editor placed objects (init artificially delayed until postInit eventhandler), but it fails for objects created mid mission, which is a pretty nasty inconsistency.
I plan to fix this in the next CBA update by delaying initPost one frame artifically if postInit already happened.

This is the reason the texture sync of the licence plates doesn't work too. setObjectTextureGlobal also has the same problem -> no texture, no variable.

still forum
#

That is probably your problem right there. Even if first condition is false you are still checking if any of the other conditions is true. Although it doesn't matter. And then you run that on all Units. Although you only want units in a certain distance

#
if (((lineIntersects [eyePos _freddy_target, eyepos _freddy, _freddy_target, _freddy]) && (lineIntersects [getPosASL _freddy_target, eyepos _freddy, _freddy_target, _freddy])) || isObjectHidden _freddy_target) then {_mode = 2; _busted = false} else {_lastpos = getpos _freddy_target};

Lazy eval again

turbid thunder
#

nearEntities you say

#

I guess that'll help

#

You also mentioned smth about pushBack

still forum
#

You are using the slowest known method of appending elements to an array

turbid thunder
#

Because I didnt research ๐Ÿ˜„

#

Though that is only ever used once the AI loses their target and need to return back to a waypoint

still forum
#
wparraysort = wparray apply {[_freddy distance _x, _x];};
wparraysort sort true;

There you have a better sorting thingy

turbid thunder
#

huh

still forum
#

Your todo list:
Indent your code properly
Remove unused variables
Improve your waypoint sorting thingy (Which I already solved for you)
Lazy eval in your conditions
Don't iterate over allUnits.

turbid thunder
#

Because "apply" is unknown to me and just reading the wiki didnt help me understand what exactly it does

still forum
#

You are first checking if the AI has line of sight to a unit. And after that you check if that unit is even in range

turbid thunder
#

Not the other way around?

still forum
#

there are examples on the wiki

turbid thunder
#

Like, first distance then LOS?

still forum
#

Thats what you should do. But you are doing the opposite as far as I see

jade abyss
#

You forgot to use Trigger!!111oneoneoneeleven

still forum
#

Now just fix all these issues. And then come back and we might find more

turbid thunder
#

There is one unit that uses the trigger on his gun

#

does that count?

jade abyss
#

no, add more trigger

turbid thunder
#

@still forum Will do. Tomorrow

dusk sage
#

Did anyone ever get any quantitative comparison between pvar vs remoteExec (with whitelisting enabled)?

little eagle
#

jokoho did something back when it appeared to bugged and was like twice the traffic and 200 times the processing time.

#

But that was years ago

#
  • BS numbers from vage memory
dusk sage
#

In favour of pVar I assume?

little eagle
#

Yes.

#

And only with white listing

#

Which also increased the traffic, which must be a bug

little eagle
#

Yeah. Someone should test.

#

Although.

#

We did some testing with setVariable public on init eventhandler recently and found having lots of these is not so bad.

#

And now it turns out that they don't even work.

jovial ivy
#
   _null = [] execVM "client\init_client.sqf";
} else { 
   _null = [] execVM "server\init_server.sqf";
};``` would be how you execute with the difference of a client and server on init yes?
little eagle
#

No. A server is not necessarily a dedicated server.

#

"init_server.sqf" would never be executed in SP or in local hosted MP, which makes this script very hard to debug.

#

And the names of the files are technically wrong too.
Technically they would have to be named:
init_dedicated
and
init_notDedicated

jovial ivy
#

Would that technically affect any scripting(via init itself)?

little eagle
#

Well the script would be potentially executed on the wrong machine or init_"server".sqf not on the local hosted server

#

But if this is for Exile or Altis Life then you might get away with this, since they don't recognize this difference either and makes their missions/mods impossible to be played in SP or on a local hosted Server anyway.

jovial ivy
#

Ah. Currently its just a little locally hosted gamemode.

little eagle
#
if (isServer) then {
   execVM "server\init_server.sqf";
};

execVM "client\init_client.sqf";
jovial ivy
#

Gotcha.

little eagle
#

This would be "correct", but it obviously also depends on the contents of these script files.

#

oops, mixed up the folders. fixed*

#

Sometimes you don't want to execute stuff on machines that don't have a player sitting behind the monitor

#

E.g. dedicated server or headless client

#
if (hasInterface) then {
   ...
};
#

isDedicated isn't that useful generally in my opinion.

jovial ivy
#

Hmmm. I've never really messed with init that much so its good to know. (As in executing whatever on the init and server)

little eagle
#

It's always important to know which script runs on which machine.

#

Step 2 is to know in which order ๐Ÿ˜

jovial ivy
#

Indeed.

#

I haven't coded too much since the arma 2 days so its been a while.

#

I mean currently im just executing the really basic stuff (PreprocessLineNumbers, setVariables....)

little eagle
#

The "bread and butter"!

jovial ivy
#

Yup.

jade abyss
#

I mean currently im just executing the really basic stuff (PreprocessLineNumbers, setVariables....)

Thats advanced, for most of the ppl here ๐Ÿ˜„

#

You know how to make an if-statement and knows how to set sleep? -> Advanced.

#

๐Ÿ˜„

jovial ivy
#

Haha

little eagle
#

You know the difference between sleep and uiSleep -> Expert
You know the actual difference between sleep and uiSleep -> Ascended

jade abyss
#

(You laugh, i rly mean it^^)

jovial ivy
#

I can suppose. (scratches head at commy2, googles uiSleep) never even heard of it lol.