#arma3_scripting

1 messages ยท Page 562 of 1

still forum
#

someone made a thing such that you can use the BI FSM editor to create CBA statemachine scripts

#

basically some output format script that makes it spit out CBA SQF

hollow gate
#

so gentlemen lol

#

do you think this might work

#

for my pop up issue

#

activation:

"raisetargetgrp1.sqf" / JDM_trainingStarted = true; 0 = [] spawn { sleep 180; JDM_trainingStarted = false; "lowergroup1.sqf" };
or would it be
activation:

'"raisetargetgrp1.sqf" = true; 0 = [] spawn { sleep 180; "raise targetgrp1"= false; "lowertargetgrp1.sqf" };

winter rose
#

```sqf
/* your code */
```

fyi ๐Ÿ˜‰

#

wouldn't work , you are applying "stringValue" = true, cannot work

unique sundial
#

"lowertargetgrp1.sqf" this does precisely nothing

#

if you want to execute the script you have to use something like execVM

hollow gate
#

I know in activation I could do something like

unique sundial
#

take a bus to the BIKI, leave on the second stop

hollow gate
#

hah yea ill be right back i was just headed there lol

#

on activation:
execVM raisetargetgrp1.sqf";

could i use the deactivation to make it sleep then?
on Deactivation
'"raisetargetgrp1.sqf" = true; 0 = [] spawn { sleep 180; "raise targetgrp1"= false;

hollow gate
#

lol so we are now trying waitUntil { triggerActivated trigger2 };

shell ivy
#

hey guys

#

anyone know if ACE compat RHS is going to be updated?

#

i get a notification at the beginning of any mission that its outdated for some reason

still forum
#

it was updated the millisecond the last ace update was pushed

#

so...

shell ivy
#

when was that, i launched the game 30 minutes ago after a few months xD

#

i thought all workshop content updates immediately

still forum
#

a couple days ago that was

shell ivy
#

hmm it didn't update for me in that case

#

at least i know what's up, any way to force re-check or simliar?

still forum
#

if your normal ace has updated, then the compats have too

#

they are included in the ace item

shell ivy
#

oooooh

#

i had the separately

#

them*

#

so i just need regular ace and no separate compac?

#

i also get ace_tracers.pbo is outdated on every mission

#

not sure what that's about

still forum
#

ace tracers is a optional pbo

#

apparently you are not loading the optionals correctly

hollow gate
#

hey silly question gents but how would i define
a global variable

raisetargetgrp1.sqf=

if (JDM_area != 1) {
target1 animate etc...;
target1 animate ["terc", 0];
target2 animate ["terc", 0];
target6 animate ["terc", 0];
target5 animate ["terc", 0];
JDM_area = 1;
}

But I am told I need to define JDM_area as a global variable

winter rose
#

GlobalVar = value

hollow gate
#

@winter rose thanks for your help before

#

GlobalVar = JDM_area
if (JDM_area != 1) {
target1 animate ["terc", 0];
target2 animate ["terc", 0];
target6 animate ["terc", 0];
target5 animate ["terc", 0];
JDM_area = 1;
}

#

then in the trigger itself

0 = [] spawn {
execVM "raisetargetgrp1.sqf";
waitUntil { triggerActivated trigger2 };
};

#

honestly this should be so simple lol all I want it to do is not activate again until they get to trigger 2 lol

#

I am really sorry for asking so much but this thing has been driving me mad for 3 days

#

I have been building this mission for about 12hrs plus a day and this one thing is halting its progress ๐Ÿ˜›

#

So is there possibly a way if i set the trigger from repeatable to not repeatable to have it be "triggerable" so to speak after reaching the next tirgger?

ruby breach
#

GlobalVar = JDM_area ๐Ÿค”

winter rose
#
theNameOfMyGlobalVar = 1;

@hollow gate

ruby breach
#

You missed what he was trying to say there. By saying JDM_area = 1;, you make it global. Issue is likely that it's an undefined variable during your if (JDM_area != 1) check

#

Yeah, that ^

hollow gate
#

can I define the global variable in the init.sqf so it works with multiple scripts?

winter rose
#

Yes

hollow gate
#

ok so I want to try this then

#

I figure I can temporarily disable the trigger after it is activated

winter rose
#

ideally surrounded with isServer so not to define useless variables on clients (or put them in initServer.sqf, your call)

hollow gate
#

then have it reactivate when they hit the next trigger

#

so I would need to have this in the init.sqf?

JDM_area = 1;

and that alone would define JDM_area as a variable for use in multiple scripts?

winter rose
#

Yes

#

Express thyself, @grave lotus

hollow gate
#

also lemme just say you all blow my mind with your knowledge on this stuff

#

I felt happy just making an attachto script work

grave lotus
#

Thanks! I'm having a difficult time finding the class name for the assembled static automonous GMG and HMGs.. are those directly addressable?

hollow gate
#

have you tried the debug console?

#

sorry

#

the config viewer

#

if you place the object in the editor and right click on the config viewer

#

it will show you its classname and full path as well

winter rose
#

or the wiki ๐Ÿ˜‰

hollow gate
#

lol fair

grave lotus
#

found it. thanks. I was searching by term and it doesnt seem to called out witht he same same term for assembled/disassembled in the wiki... only the A is searchable

grave lotus
#

i placed one manually ๐Ÿ™‚

winter rose
#

dang, ninja'd

grave lotus
#

simple = best ๐Ÿ™‚

ruby breach
#

also lemme just say you all blow my mind with your knowledge on this stuff
Time, practice, and persistence. Take it from the accountant who learned some of this stuff on the side. You'll get there.

winter rose
#

oh, missed that - well yeah, practice makes it barely working ๐Ÿ˜…

#

we had time to practice, since 2001โ€ฆ

hollow gate
#

because it would be perfect

#

could you or someone walk me step by step how to do it from scratch?

#

I have two triggers down with

condition:

this && JD_checkpoint_active

on activation:

JD_checkpoint_active = false;
publicVariable "JD_checkpoint_active";

#

hand another trigger that executes a file that makes the targets pop up which works great

#

I guess what my question is would be what am i doing wrong because the targets pop up again even though i have triggered the //JD_checkpoint_active = false//

#

I get no errors though...It just doesnt work ๐Ÿ˜ฆ

winter rose
#

global var is not the same as public var โ˜๏ธ

still forum
grave lotus
#

Has anyone successfully attached one of the automated turrets to a vehicle or drone and had it aggro and fire? I think I got it in there, but not firing.

astral dawn
#

@grave lotus search how to add crew to drones... yes, drones have invisible units in them which are doing the gunning, driving, etc

#

@still forum I think the standard arma state machine also has some debugger functionality?

grave lotus
#

AH! Thanks for the heads up. those little guys wont have one by default ๐Ÿ™‚

still forum
#

don't know how, haven't seen that yet. Would sure assume BI has a tool for that internally atleast

astral dawn
#

Internally yeah I guess

grave lotus
#

Also, the loadimage now resizes into the small floating frame at mission start or server login.. is there still a way to a display fullscreen image?

dreamy kestrel
#

when you get an array corruption, i.e. [any, ...], how do you tell when you have that any? so far I figure typeName yields nil?

dreamy kestrel
#

Q: re: for and outer scope private variables. I have code in an apply that has private _L = _x, right, and then I have a for that tries to reference the outer _L, but this is being reported as undefined. the scope boundary on for is just that strong that it cannot see the outer scope?

astral dawn
#

@dreamy kestrel check if the value is nil with isNil

#

For your second question, could you provide example of your code structure?

dreamy kestrel
#

homing in on the issue, I've got a manager processing logistic state machine, into which change orders may be injected. the loop is picking up the next change order correctly, I see "processing" and "processed" log messages. but there is some sort of strange scheduling issue going on the call to the CO callback is out of sync somehow, so the response is never seen, or is "seen" as nil...

#

I do have a log entry for the CO itself, but it is out of sync with the manager before/after messages.

#
_changeOrder params ["_targetUuid", "_args", "_callback", "_cid"];
_M = [_L, _args, _logisticsCache, _cid] call _callback;
if (!isNil "_M") then {_L = _M};

I put the _M in to intercept any problems that might have been occurring, and which apparently are. is there a stronger guarantee than call that I can invoke a callback operating on _L and have it return immediately?

#

perhaps the outer loop should be using sleep instead of uiSleep? i.e. there is some strange scheduling snafu manifesting itself here?

astral dawn
#

I don't really understand the situation. What does CO mean?

#

Change Order?

dreamy kestrel
#

yes change order

#

hmm, well I am thinking of isolating the change orders, maybe that will help them to resolve prior to the next step, which is for the state machine to actually run. that would probably be safer than co-mingling the two anyway.

#

basically was doing this,

_cache = _cache apply {
_L = _x;
// apply change order callbacks
// apply state machine callbacks
};

For which the CO's were coming back well out of sync with the parent apply scope.

astral dawn
#

What are your Change Orders? Are they arrays? You know that arrays are passed by reference in SQF, right?

dreamy kestrel
#

yes, a CO is a "tuple", in the form, [targetUuid, args, callback, cid], the target UUID, the callback arguments, the callback itself (compiled code), and the client idenfitier.

#

where target UUID aligns with the _L, which is a tuple in the shape, [uuid, ...]

queen cargo
#

Tried reading and understanding that now like 10 times

#

Still have no clue what the issue, goal etc. Is

#

Or what is ment with sync

#

And changeorder

#

And... And... And...

dreamy kestrel
#

I think it is some sort of scheduling snafu going on. so I am trying to isolate the steps a bit further in their own apply or other looping structures.

queen cargo
#

Start at the very begining
Continue from then

astral dawn
#

Honestly I also tried to understand but it's quite hard. As I understand, Michael has some threads processing requests(messages), and sometimes the returned value is nil, so he suspects asynchronous behaviour to be the root of his issue.

dreamy kestrel
#

it seems to be a scheduler snafu, the change order callback not returning until another moment. so the calling context sees a nil "return" which is incorrect.

queen cargo
#

Your sentence makes no sense

dreamy kestrel
#

so I'm trying to isolate the steps a bit further.

queen cargo
#

What is the snafu?

#

Scheduler works fine

dreamy kestrel
#

the callback does not return when it should.

queen cargo
#

What callback?

dreamy kestrel
#

the change order callback, read above, I described the tuple.

astral dawn
#
_changeOrder params ["_targetUuid", "_args", "_callback", "_cid"];
_M = [_L, _args, _logisticsCache, _cid] call _callback;
if (!isNil "_M") then {_L = _M};

Yes we have a _callback here ๐Ÿค”

#

Okay are you sure that the callback is not nil itself?

queen cargo
#

Your whole scenario is incomplete and requires knowledge of your Code
Long Story short: check how to ask questions please and come back then

dreamy kestrel
#

yes I did check that, and I have a log entry from within the callback itself, so pretty confident it is being run.

astral dawn
#

ok, so where do you put the return value to investigate that it's nil or not?

dreamy kestrel
#

fair enough @queen cargo if I can elaborate at all I will.

#

originally was doing this,

_changeOrder params ["_targetUuid", "_args", "_callback", "_cid"];
_L = [_L, _args, _logisticsCache, _cid] call _callback;

and this yielded nil or any in the debugger view, which raised red flags with me.

#

so I put some guards in to see whether I got a return and guard the original,

_changeOrder params ["_targetUuid", "_args", "_callback", "_cid"];
_M = [_L, _args, _logisticsCache, _cid] call _callback;
if (!isNil "_M") then {_L = _M};

and here we are.

astral dawn
#

Why do you not do private _M by the way?

#

Regardless of your current issue, it is strongly advised to use private whenever you can

dreamy kestrel
#

private ["_M"]; is elsewhere, but it could be there, you're correct.

astral dawn
#

if it's elsewhere then ok

#

also, it's better to use private _var = 123; syntax

#

Anyway... yeah... why would a plain call of a _callback jsut return nil then? ๐Ÿคทโ€โ™‚๏ธ

dreamy kestrel
#

I could try that, isolate a debugger invocation and see what happens.

queen cargo
#

At what point are you using spawn?
What is supposed to be returned by the callback Code?

#

Where is _L privated

astral dawn
#

What do you mean 'debugger'? Are you using a debugger? ๐Ÿค”

dreamy kestrel
#

not using spawn anywhere in there. the callback operates on the target _L and returns the same, or a mutated same.

#

using the in game debugger, yes.

astral dawn
#

What do you mean by the in game debugger? Do you mean your debug console? Or you are using Dedmen's debugger?

queen cargo
#

So no scheduling involved plus you are using the debug interface

dreamy kestrel
#

it is not a dedicated server if that's what you mean, local hosted, debugger in game.

#

which is awkward at times in client/server since client and server are both 2.

astral dawn
#

So no scheduling involved plus you are using the debug interface
Looks like it yeah, if you just click the 'local execute' button in the debug console, it is not scheduled, all the code is run in the context of the button event handler most likely

dreamy kestrel
#

perhaps to debug any root cause issues, sure. but eventually it must land in the server, manager, contexts.

astral dawn
#

I am totally confused by now ๐Ÿ˜ฎ

#

๐Ÿค”

queen cargo
#

You really have to stop assuming we have the same knowledge of what you are trying to do as you have ๐Ÿ˜… ๐Ÿ˜… ๐Ÿ˜…

#

Scheduler has nothing to do with Client and Server comminication

astral dawn
#

Okay, so the problem you are currently observing does not involve any { ... code ... } which is created by spawn command, right?

dreamy kestrel
#

put that to pasture, I am not spawning anything. the closest I get to that is the manager itself was kicked off with execVM. everything else is "scheduled" using call.

#

in this particular context anyhow

astral dawn
#

execVM "123.sqf" is same as spawn compile preprocessfilelinenumbers "123.sqf" so scheduler is involved yeah

queen cargo
#

Call is not scheduler related on the other Hand

#

Do you have any Prior coding knowledge @dreamy kestrel ?

dreamy kestrel
#

@queen cargo kindly, if you do not have anything constructive to add do not waste my time. I will not dignify that with any other response.

astral dawn
#

Hey calm down guys

dreamy kestrel
#

and to be clear, my log of the issue would indicate otherwise, that apparently there is some sort of scheduling snafu going on.

#

@astral dawn perfectly calm and civilized here.

#

anyway done banging on the issue tonight, appreciate the feedback. I'm going to try those couple of isolation techniques and see if that improves things.

astral dawn
#

Well I assume you have to show more code then...
what does your _callback look like, maybe callback itself does not return anything, it is also possible in SQF and can be destructive and annoying.
How do you add your 'requests' to the (I assume) queue of requests for the thread. Maybe something is not atomic there. Also from which context do you add it - from unscheduled or from scheduled context.
It's quite hard to tell.
Also you can use isNil to make critical sections and see if it changes anything.

queen cargo
#

"waste your time"... You are wasting time of people trying to help automatically the Moment you ask a question ๐Ÿคฆโ€โ™‚๏ธ

At nรถ point I have been hostile or anything else
Having Prior knowledge in coding however leads to false expectations while nรถ Prior experience leads to rookie mistakes

Explain your issue clear, if you fail to do that then create a minimum example of your Code and Post that instead

#

Sparker and I are currently playing the guessing game, unless you provide proper presentation of your Problem
That is why I sent you the "how to ask a question" Stackoverflow link....

#

@astral dawn the latter Part should be detectable with sqf-vm quite easy Btw ๐Ÿค”๐Ÿค” gonna try to implement it in a few hours I think

astral dawn
#

You mean which part, sorry?

queen cargo
#

Missing return

astral dawn
#

ah that, cool

#

Actually how can you do that?

#

This would be very helpful, this has caused me to waste a lot of time in my various frameworks

#

The frameworks which had no unit-testing I mean

queen cargo
#

Question is only how to implement it ๐Ÿ˜‚
Always assuming that Code snippets should return something is Bad
Comment annotating is currently not possible... Sooo... But the Moment that is clear, one can Start just checking if some endpoint is having something

astral dawn
#

So many ways to make a code-variable in SQF...

#

I guess that it's quite hard to implement

jade abyss
#

@queen cargo Not the first time, that this guy acts rude... no idea, what his problem is ยฏ_(ใƒ„)_/ยฏ

queen cargo
#

๐Ÿคทโ€โ™‚๏ธ๐Ÿคทโ€โ™‚๏ธ

unique sundial
#

The guy just thinks loud in this channel and you guys think he actually asking for help. Just ignore

covert walrus
#

Does anyone know if its possible to get the position a bullet would impact before it would be fired?
wondering if arma has anything like this or would i have to build a custom CCIP script?

jade abyss
#

"Theoraticaly", it should be possible to calculate the trajectory (Mass of bullet, speed, etc.)

covert walrus
#

i'll be honest, i've not really got much experience with arma3 scripting, aside from little things in the editor.
Me and my friends wanted to build a dope chart for the .408 and i was thinking there might be something in vanilla arma.
I've used BIS_tracedShooter before to help filling in the data but its not perfect.

I've made a CCIP type of script in different game engines before and its very interesting.
however i've never been able to make a CCIP and leading system like the anti air guns in arma have though. The only way i've managed to do target leading is with a system that does not simulate drag. If Armas AA cannons on the Cheetah and Tigress have bullet drag and target leading im lost for words as to how they actually do it.

astral dawn
#

im lost for words as to how they actually do it
Well... definitely not with SQF

covert walrus
#

is such a thing not possible with SQF then?
i see that some mods do have custom CCIP scripts but idk much about SQF

astral dawn
#

CCIP if the thing which calculates impact point of your bullet and moving enemy, right

#

?

covert walrus
#

yeah i believe so. "constantly computed impact point" is what i think it means

astral dawn
#

Well... I assume that for an anti-air gun which in arma has range of ~2km and a pretty big cone of fire it's quite possible... depends on accuracy I guess?

#

No it should be quite possible with SQF I think

#

I assume the thing needs to integrate/simulate how bullet would fly, calculate some 3D transforms, project the impact point onto some plane, or something like that

#

SQF has a bunch of commands to work with vectors and some general conversions

covert walrus
#

most CCIP systems I've seen so far stay far away from any complicated math/physics stuff.

what they mostly seem to do in my experience is simulate a "bullet" in the script, and return it's impact point.

depending on the environment its fired in, drag and gravity and muzzle velocity are taken into consideration and then in a loop, the bullet is simulated over a "time step".

astral dawn
#

You can definitely try to write it in SQF, profile how fast it works, and decide if you want to optimize it. If you want to optimize it, you can make an addon which performs this calculation fast in C++/C#

#

I guess it will take like... 1ms or less on each frame, but I might be wrong by 1000% ๐Ÿ˜„

#

Also if you don't calculate your simulation on each frame, the perf. impact will be amortized

covert walrus
#

there are ways to optimize the process. as it can easily do 1000s of iterations and i'd imagine that might cause a fair bit of strain on sqf.

there is a process called RK4 that can take the iterations down from 1000s to less than a hundered with the relative accuracy.
If i'm honest, the maths involved is way above my understanding.

astral dawn
#

In SQF really the biggest performance impact is the operator count

covert walrus
#

its probly been asked 1000s of times, but any good resources on arma3 scripting and such? looks fun

jade abyss
#

check pinned msg, command overview incl. examples

covert walrus
#

tyvm

still forum
#

@dreamy kestrel

the change order callback not returning until another moment
no thats not at all how scheduling works.
private ["_M"]; is elsewhere
stop using private array, the performance is terrible, and its better for readability if you place it, where you need it.
and this yielded nil or any in the debugger view
that means either the _callback was nil, or the callback returned nil.
using the in game debugger, yes.
there is no ingame debugger. The only publicly available debugger is mine, and i doubt you are using that.

@queen cargo you can clearly see he has tons of other programming knowledge, and tries to apply other concepts that are VERY FAR away from SQF, directly to SQF and fail at that, like above mixing up scheduling, with out of order execution of modern cpu's, which are completely different and unrelated concepts.

queen cargo
#

Can also be some confused dude who read something at stackoverflow and used the words from there
Hence the question

compact maple
#

Hello, do objects in game have a unique identifier (like weapons, vehicles, etc) ?

winter rose
#

not weapons

compact maple
#

Thats sad :[

#

(vu que t'es fr, j'en profite, donc il n'y a aucun moyen de diffรฉrencier deux armes identiques en jeu ?)

winter rose
#

(#rules English only though)
nope, no way / pas moyen

compact maple
#

ok ! ty ๐Ÿ™‚

winter rose
#

what are you trying to achieve?

compact maple
#

I was thinking about a simple serial number system for weapons

winter rose
#

hmyep, nope

tough abyss
still forum
#

not true

#

not walking through walls != more expensive

winter rose
#

more collision, less AI

tough abyss
#

Okay, thanks!

unique sundial
#

Weapons do have unique ids just not exposed to scripts

#

Could anyone please link me to a FB ticket or forum thread where it mentions that when you create object as simple object in 3den and give it a name, the variable with this name is nil on remote machines

tough abyss
#

It's on the wiki page for simple objects at least.

still forum
#

never heard of that ๐Ÿค”

tough abyss
#

I've also had issues in the past with CBA_fnc_addClassEventHandler and simple objects.

unique sundial
#

I was hoping there was a ticket

dreamy kestrel
#

I have some feedback from my dilema last night. the function/callback change order in question does in fact compile, but any attempt to log anything does not log anything. it is as though I've hit a hard limit on the number of compileFinal code I can have? is this possible?

#

Let's assume for the moment that it is. I could run with ad hoc function variables instead in this instance? seems like a less robust, less secure way to stand this thing up, prone to hacks, etc, but what other recourse do I have?

still forum
#

is this possible?
no
Let's assume for the moment that it is.
no.

#

I could run with ad hoc function variables
whats that supposed to be?

#

but any attempt to log anything does not log anything
if your log line doesn't log, its not being executed

dreamy kestrel
#

I assure you it is being executed. it's not rocket science. but it does seem like a hard A3 engine ceiling on the number of compiled fucntions.

#

literally along the lines,

_confirm = compileFinal preprocessFileLineNumbers "path\to\confirm.sqf";
_L = [1, [], [], 2] call _confirm
isNil "_L"; // returns true, expecting _L == 1

I have a diag_log in confirm.sqf and literally the only other thing it does is, if (true) exitWith {_this select 0};, yet here we are.

still forum
#

but it does seem like a hard A3 engine ceiling on the number of compiled fucntions.
doesn't exist.

#

give me the content of your confirm.sqf

#

try diag_log'ing diag_log _confirm before you call it

dreamy kestrel
#

is that the same as _confirm; in the debugger?

still forum
#

"in the debugger"?
You still haven't said what "debugger" you are talking about

#

I assume diag_log is not the same as whatever you are using there

dreamy kestrel
#

yes I have, a dozen times. the in game debugger.

still forum
#

what "in game debugger"

#

there is no ingame debugger

dreamy kestrel
#

when you host and/or are the admin... press escape, etc. what is that?

still forum
#

Debug console

#

thats not a debugger

dreamy kestrel
#

okay, that.

still forum
#

if you just write _confirm; there, then no. local variables are local, you cannot just see them by writing there name somewhere

dreamy kestrel
#

I run it on the "server", however, when you host, client is the server... anyway, I get code listed there.

cunning crown
#

If he exรฉcute the code in the console and put _confirm at the end, it should return the content

dreamy kestrel
#

yes, that is exactly what I see, the compiled code.

still forum
#

As X39 beautifully said

You really have to stop assuming we have the same knowledge of what you are trying to do as you have
You are giving basically no details at all, besides some code that you modified before showing us (potentially removing your errors in the process), and some cryptic description using some fancy words that make no sense.
We cannot see what you might be doing wrong, without seeing your code

dreamy kestrel
#

whether I diag_log it or not, same result. the issue is not whether the code is compiled. A3 is not executing it. when I [...] call _confirm.

#

returns nil when I expect if (true) exitWith {_this select 0};

still forum
#

you are telling us what you expect, and what happens.
Okey but we cannot see the code...

tropic thunder
#

I have some inline functions I've defined in one file, that I'd like to initialize during a pre-init. Should I #include those files, or should I execVM them?

dreamy kestrel
#

I just told you.

#

it is returning nil, but I expect if (true) exitWith {_this select 0};

still forum
#

@tropic thunder include is probably easiest variant

tropic thunder
#

I suppose with execVM I might run into some scheduling and timing issues?

still forum
#

@dreamy kestrel you expect it to return a piece of code? but you said you expect it to return 1, and you also said you added logging, but there is no logging in there.
Stop modifying and abbreviating stuff, just show the code

tropic thunder
#

Thanks!

still forum
#

@tropic thunder potentially, but unlikely to cause issues, but its a waste of performance/effort to spawn it when it doesn't need to be

#

This "I know better than you, I know I'm doing everything correctly" but still asking other people here for help mentality is really annoying. If you know better than us, and don't want to provide the info needed for people to help you, why come here and waste peoples time?

unique sundial
#

give me the content of your confirm.sqf

here:

selectRandom [nil, 1];
dreamy kestrel
#

no we are not passing any nil in. we are returning _this select 0 from a legit parameter.

#

literally I compile one and we see nil, nothing happens, nothing returned. we do not compile the other, and we get the expected result.

ruby breach
#
_confirm = compile { if (!isServer) exitWith {}; if (true) exitWith {_this select 0}; };
dreamy kestrel
#

which to me beggars the question what is the A3 engine limitation around compiled code? along the same lines as with the while loop? i.e. that there are limits? under what conditions?

ruby breach
#

compile

Description:
    Compiles String expression into Code.


Syntax:
    compile expression 
Parameters:
    expression: String - expression to be compiled 
Return Value:
    Code - compiled expression 
#

Running compile code probably will lead to some screwery

still forum
#

apparent-hard-ceiling-on-number-of-compiled-functions/
seriously? how often do you want me to repeat that thats not the case

#

which to me beggars the question what is the A3 engine limitation around compiled code?
are you serious right now?

restive leaf
#

Doesn't compile take a string input?

still forum
#

it does

restive leaf
#

LOL

still forum
#

He: My confirm doesn't execute
Me: I think it just returns nil, show me the code
He: Here is what i expect if (true) exitWith {_this select 0};

over an hour of refusing to show the actual code later, here is the ACTUAL code that I asked for all along
if (!isServer) exitWith {};๏ปฟ if (true) exitWith {_this select 0};
mh..
if !isServer then return nil.
MHHHHHHHH..... I WONDER...

cunning crown
#

And he compile the code, not the string (well accordingly to his post). No wonders that it doesn't work

ruby breach
#

Honestly, we should likely just get better at ignoring people who refuse to show their code and keep asking dumb questions

still forum
#

Wow I love this sentence from the forum

We know, for instance, [...], for instance, under certain conditions, for starters
uh... wat.

winter rose
#

not exactly on-topic but _L? that's not a really helpful identifier ๐Ÿ˜…

ruby breach
#

And not even private _L ๐Ÿ˜„

winter rose
#

oh, don't get me started on private

forest ore
#

Testing/trying to learn with the following switch-do construction. Am thinking that either of the cases should fire depending on what's been pushBack'd into the _selected array but nothing happens when onMapSingleClicking between the two vehicles.
Got something wrong with the switch-do but don't really see what it could be

onMapSingleClick
{
    _vehicles = [Civ_1, Civ_2] select {(_pos distance2D getPos _x < 10)};
    selectedVehicle = _vehicles select 0;

    _selected = [];
    _selected pushBack selectedVehicle;
    systemChat str _selected;

switch (_selected) do {
    case (Civ_1): {
        systemChat "This is civilian vehicle #1";
        };
    
    case (Civ_2): {
        systemChat "This is civilian vehicle #2";
        };
    };
};```
still forum
#

cannot work

#

_selected is an array, your switch looks for an object

winter rose
#

case [Civ_1], nah? unless there is array reference

still forum
#

array cannot equal object

#

also why put it into an array at all, if you only have one element in it?

winter rose
#

can array equal array though, in switch?

still forum
#

It might use isEqualTo internally

ruby breach
#

That's assuming someone updated it after isEqualTo was implemented though, correct?

still forum
#

no

#

isEqualTo was a thing since the start

#

just not exposed via script command

ruby breach
#

Ahh, gotchya

forest ore
#

The onMapSingleClick fills the array with the selected vehicle (or empties the array) so I thought I could get something out of that. Sort of "do this if in the array there is this particular vehicle" and "do that if there's some other vehicle or no vehicle" ๐Ÿคท๐Ÿผโ€โ™‚๏ธ

ruby breach
#

You can still do that; just drop the array (make _selected an object reference), and add a default switch case for "no vehicle or not a specified vehicle"

winter rose
#
switch (_array select 0)
```too
forest ore
#

Thank you Lou for that. Stuff started going forward though naturally just to come to an abrupt halt.

OR should work in above case? At least if given in correct format?
This is giving Generic error in expression

case (Civ_1 || Civ_2): {
winter rose
#

yep, || only works on boolean, not objects

#

you also don't check if no vehicle is returned โ˜๏ธ

forest ore
#

I try to get to that at some point ๐Ÿ™‚

winter rose
#
onMapSingleClick
{
    private _possibleVehicles = [Civ_1, Civ_2]; 
    private _vehiclesCloseBy = _possibleVehicles select { _pos distance2D getPos _x < 10 };
    if (count _vehiclesCloseBy == 0) exitWith {};
    
    private _selectedVehicle = _vehiclesCloseBy select 0;

    switch (_selectedVehicle) do {
        case (Civ_1): {
            systemChat "This is civilian vehicle #1";
            };
        
        case (Civ_2): {
            systemChat "This is civilian vehicle #2";
            };
        };
    };
};
#

I felt generous ๐Ÿ˜‹

#

@forest ore โ†‘

forest ore
#

Oh so that's one way to check if no vehicle was select ๐Ÿค”
I would have probably tried to hammer another case for that ๐Ÿ™„

winter rose
#

[] select 0 would have returned nil iirc

([] select 1 would throw an error though!)

still forum
#

if you only want the first anyway, you probably wanted findIf anyway

winter rose
#

2ร— anyway Combo!

forest ore
#

No, not the first always. Either of the two or if there's more (to come) then any of those

winter rose
#

why switch though?

forest ore
#

That is even beyond me heh. Like I said in the initial question "Testing/Trying to learn"

winter rose
#

oh okay, I thought you had something specific in mind

#

but yes, findIf is the way to go - if you want to get them sorted by distance, it's another thing (BIS_fnc_sortBy for example)

forest ore
#

There's always at least two ways to achieve something and thus far I had stumbled on switch ๐Ÿ™‚

plain current
#

Is there a way to sleep exactly one frame? Would uiSleep 0.0001 or uiSleep 0 work?

cunning crown
still forum
#

@plain current no

restive leaf
#

uiSleep 0.0001 Wow... ARMA can run at that fps??????? ๐Ÿ˜ฑ

still forum
#

you can sleep atleast one frame with 0.01
but.. might also sleep for a few minutes

restive leaf
#

Or EachFrame, which is apparently stackable

young current
#

Some sort of variable index could be used to skip a frame too?

winter rose
#

sleep in Arma is like an IRL nap without an alarmโ€ฆ depending on the stress, you may go for longer than expected ๐Ÿ˜„

plain current
#

what if i do a spawn, eg

diag_log diag_frameNo;
[] spawn {
  diag_log diag_frameNo;
};
restive leaf
#

Diagfps gives you average of last 16 frames. Could be better if you really need that

#

As for a previous poster. We are just guessing at stuff cause we don't know what you are trying to do

plain current
#

^^ spawning seems consistent in editor, but so seems uiSleep 0.001
it's a bit difficult to simulate a real scenario with +20 script threads, 80 players and a ton of props

still forum
#

consistent in editor with a single spawned script running yes.

#

as its checked every frame

knotty mantle
#

hey guys, i need a bit of help with a gui eventhandler. I am having a mission here where players start at random positions and they have to find out where they are and how to get to the point they should meet at. The problem is that the arma map is centered on the current position upon the first opening of the map. Therefore i would need a method to make the map center on something else. Another random spot or something simple like the lower left corner. Apart from the fact that i currently dont know how to move the map via script i cant even get a gui eventhandler working on the map. Anybody giving me a bit of insight would be really appreciated

ruby breach
#

I'd assume that would be sufficient anyway.

knotty mantle
#

Nice thank you. Gonna learn about GUI eventhandlers another day then.

jade abyss
#

@knotty mantle Also keep in mind: There is a button in the Map-Screen, that centers on your player.

restive leaf
#

Meh... only for plebs who don't use ACE ๐Ÿ˜‰

jade abyss
#

ace, meh

restive leaf
#

lol

jade abyss
#

๐Ÿ˜‰

knotty mantle
#

Nice thanks for the info Dscha. Using ace so it should be fine but i guess that is the end of my plans for a possible vanilla version of the mission ๐Ÿ˜„

jade abyss
#

You could try to disable the buttons, via eventhandler and ctrlShow / ctrlEnable, when the Map is opened.

knotty mantle
#

Nice had to do some adjustments but i got it working. Thanks for the provided links Gnashes ๐Ÿ™‚

#

Yeah i could dscha. But i dont think the interest in the mission is big enough for that ๐Ÿ˜„

restive leaf
#

Yet...

restive leaf
#

@knotty mantle Add this map event handler for basic functionality to remove the "centre map on player position" button (h/t a snippet of code from Larrow on the BI forum): sqf myMapEH = addMissionEventHandler ["Map", { _display = uiNamespace getVariable "RSCDiary"; _ctrl = _display displayCtrl 1202; _ctrl ctrlEnable false; _ctrl ctrlsettextcolor [0,0,0,0]; _ctrl ctrlSetTooltip ""; _ctrl ctrlCommit 0; }];Obviously you'll need to handle respawning players and some other cases

mortal nacelle
#

Question, I am checking for nearest objects and hinting it, and the boolean it hints is correct however when I put it into a if exitwith statement it feels like i am mkaing an error

#

if (_check = false) exitWith {hint "test"};

jade abyss
#
if (_check = false)```
No! Just, NO!

```sqf
if (!_check)``` for example
#

1: _var = false defines a var
2: _var == false check a var
3: if(_BoolVar)then executes, when _BoolVar == true
4: if(!_BoolVar)then executes, when _BoolVar == false

mortal nacelle
#

That helps a lot of my mistakes, thank you Dscha

jade abyss
#

๐Ÿ‘

mortal nacelle
#

@jade abyss how would i check if an array is empty or not?

jade abyss
#
_arr = [];
if(_arr isEqualTo [])then{}```
still forum
#

_array isEqualTo []

if array equals empty array, its empty

mortal nacelle
#

ah right

still forum
#

could also
count _array == 0
if array has 0 elements in it, its empty too

mortal nacelle
#

so you cannot use == when checking array im guessing

#

oh

#

okay

jade abyss
#

iirc, you can, it's just slower

still forum
#

according to wiki, correct you can't

jade abyss
#

Or was that the limitation of ==? i can't remember

#

Never used it after isEqualTo

#

Ah, count _arr, then check if 0, was the way before

#

Long long time ago

restive leaf
#

Dedmen. Any difference in performance between your two examples. I use isEqualTo all the time

still forum
#

isEqualTo faster

jade abyss
#

isEqualTo is faster

restive leaf
#

Good

#

Phew ๐Ÿ˜Š

jade abyss
#

Ah, count _arr, then check if 0, was the way before
Long long time ago
The time before isEqualTo

restive leaf
#

I remember going through all the scripts I used in the move to selectRandom

mortal nacelle
#

hmm, in relation to my question above, i'm checking a variable and if the variable is not set, it is returned as nothing, i thought isnil would do the trick but apparently not? E.g. isnil "_var" exitwith

winter rose
#

my FavPart
heh =)

mortal nacelle
#

oh wait i have to use _var = isnil _check

#

got it

still forum
#

as with everything read the wiki

winter rose
#

@mortal nacelle isNil works

if (isNil "_myVar") exitWith {};

hint str _myVar;
jade abyss
#

yep

winter rose
#

BUT:

if (!isNil "_myVar" && _myVar) // WRONG
if (!isNil "_myVar" && { _myVar }) // CORRECT
jade abyss
#

hu?

winter rose
#

_myVar would be evaluated in the first case, which would throw an error

jade abyss
#

why would someone doublecheck the same var?

winter rose
#

no, for example if _myVar is a boolean

jade abyss
#

uhm

#

hu?

#

ah

winter rose
#
if (not isNil "_theUnit" && alive _theUnit) // buzzz
jade abyss
#

took a while, its late.

winter rose
#

don't use daytime as an excuse, we know who we are talking to :p

jade abyss
#

dumdidum

winter rose
#

(but it's 2am here too, and I have to triple check that I don't write stoopid stuffz)

jade abyss
#

like as usual? ๐Ÿ˜‚

#

(dadjokes)

winter rose
#

triple check for the wiki, -1 check here :p

jade abyss
#

๐Ÿ˜‚

restive leaf
#

Just use Nvidia's built in daytime at night hack and you'll be back up and frosty ๐Ÿ˜ก

jade abyss
#

?

winter rose
restive leaf
#

Don't want to post it here @jade abyss can I PM you?

#

Basically zero point in doing PvP servers with night time for any game at this point...

winter rose
#

on public servers* โ˜๏ธ

restive leaf
#

Doesn't matter... it's what Nvidia does on your GPU

#

Oh... I see what you mean... even private servers if you have someone who is crap

winter rose
#

Don't play with stupid people yeah ;-)

jade abyss
#

Ah, that autogammaadjusting thingy

#

That's pretty old, tho... a friend of mine had that stuff in his monitor >5 Years ago

restive leaf
#

Did it work for games that had done things to mitigate the gamma rubbish that people were doing...

#

Because nvidia have blown that apart... though OT...

jade abyss
#

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

restive leaf
#

Lot of games had adjusted lighting to reduce the impact of gamma changes... the new stuff just makes it look like a crap daylight... even shadowed areas at night

hollow thistle
#

if (not isNil "_theUnit" && alive _theUnit) // buzzz
Error if nil, both are evaluated at same time, needs lazy eval.
@winter rose

winter rose
#

@hollow thistle excuse me, but "no sh*t Sherlock" ๐Ÿ˜†

See 7 messages above ๐Ÿ˜‰

hollow thistle
velvet merlin
#

is there a way these days to check what object/target the player/vehicle gunner/commander has locked? (assignedTarget is sth else and even doesnt work for the player vehicle if effectiveCommander)

winter rose
#

cursorTarget , but it also works when nothing is locked >_>

velvet merlin
#

yeah no ๐Ÿ™‚

unique sundial
#

that post you linked has max distance of 25m, why is this relevant?

sonic linden
#
fnc_spacePressed={
    if ((_this select 1)  == 57 ) then {
        (findDisplay 46) displayRemoveEventHandler ["keyDown",keydown_ev];
        systemChat "this should only runn once";
    };
};

waituntil {!(IsNull (findDisplay 46))};
keydown_ev = (FindDisplay 46) displayAddEventHandler ["keydown","_this call fnc_spacePressed"];  

hi can someone explain me why i cant remove the event handler ?
I want to only runn it once and then remove the event

still forum
#

you mean it continues running even after youve removed it?

sonic linden
#

yes it triggers multiple times but i want it to trigger only once and then remove it self

still forum
#

for one, you shouldn't need findDisplay, as _this already contains the display

#

second you use "keydown" in one, and "keyDown" in the other, that shouldn't matter, but they should still be the same

#

maybe your script executes multiple times? you add multiple handlers, but only remove the one that was added last?

sonic linden
#

after mission restart it still heppens

winter rose
#

Yep, remove it from inside the EH

velvet merlin
#

@unique sundial the issue is that checkVisibility is sticking to 1 even when no longer in VD - multiple reports on this discord about the issue

jagged hazel
#

Anyone have a good guide/tutorial on how to connect ARMA with a database? I an also looking for a banking and shopping script to connect with it... anyone know any good frameworks or scripts?

cunning crown
#

Extdb3 for the database

jagged hazel
#

@cunning crown Ok, is it possible to use for example MongoDB with Arma?

cunning crown
still forum
#

you can use anything with arma. But you have to program it yourself if there isn't already a mod for it

jagged hazel
#

@cunning crown Ah, nice...gonna look through it.

#

@still forum Yes, thus I am asking if anyone already have tested and have some experience with existing mods for such.

#

The idea is to use js-based stuff, and connect with NodeJS for a lightweight server..

#

This nosql-link seems interesting... going to give it a try.

austere granite
spice axle
#

This is insane!

forest ore
#

How to remoteExec the following?
triggerName attachTo [Vehicule, [0, 0, 0]];
This is not the way {triggerName, [Vehicule, [0, 0, 0]]} remoteExecCall ["attachTo", -2];

winter rose
#

@forest ore remoteExec takes Array

#

So [ ], not { }

#

also, -2 is "for everyone but the server". Don't forget that a server can be a playerโ€ฆ

forest ore
#

Hey Lou,
I'm just now using debug console on a dedicated server to exec [triggerName, [Vehicule, [0, 0, 0]]] remoteExecCall ["attachTo", -2]; with the SERVER option and the debug console is showing "". triggerName is not attaching to the Vehicule but stays in its current position

winter rose
#

Use 0 instead of -2

#

Yet I don't know if an attached trigger would still work

forest ore
#

Did test with 0 (instead of -2). It occurred that triggerName wanted to budge only with Global/Local Exec but not with Server Exec

winter rose
#

what

#

First check if an attached trigger works

mortal nacelle
#

How would I refresh a function every X seconds? That made no sense, let me make an example. I got a GPS dialog here, it works but it doesn't refresh when the player moves, how could I do that?

winter rose
#

GPS display* , I guess

mortal nacelle
#

Hmm? No, I mean it is a custom GPS inside of a new GUI, but it doesn't track the player, it is just a static map, so what I'm asking is, how can I make it track the player like an actual GPS

winter rose
#

dialog means "clickable interface and player can't move until closed"

#

(more or less)

mortal nacelle
#

Oh sorry I didn't mean dialog then

winter rose
#

make it that on opening, while display is open then refresh, wait 1s, refresh etc

mortal nacelle
#

so i'd use finddisplay to check if its open, right?

winter rose
#

well, how do you open it

mortal nacelle
#

Haven't got there yet, just a question i been thinking about for ages, how to refresh every few seconds etc, so i'll just use while

winter rose
#

@forest ore so:
a trigger attached to a vehicle works and moves with the vehicle.

now: is it a server-only trigger?

forest ore
#

The trigger should be local to the player considering how it is created. But having read about triggers in general from here and there I can't say for sure.

hollow lantern
#

is there any solution to make an AI chopper stay in the "GUARDED BY BLUFOR" trigger? The chopper has a guard waypoint, but well also flies outside of it

winter rose
#

how is it createdโ€ฆ?

#

no way to "force" it no, but it should fly in and around to cover the are @hollow lantern

hollow lantern
#

well yeah it does indeed

forest ore
#

function called from InitPlayerLocal where-in a createTrigger made

winter rose
#

triggers can be created locally on clients setting optional param makeGlobal to false

forest ore
#

and by default triggers are global yes, yes
and what then

winter rose
#

well you have (numberOfPlayers) triggers then

#

unless you create them locally?

#

and if they are created locally, they cannot be remoteExec'ed since they don't exist on remote machines

forest ore
#

was trying to find a way to reattach the already created trigger to the destroyed vehicle

#

Was beginning to slowly figure out what you typed there Lou

#

THOUGH, the trigger is created as Global

#

but that doesn't apparently make it available to the server anyway

winter rose
#

either you have "one" global cross-machines trigger (then make it dealt with by the server)
or have one local trigger on every machine where the local script deals with it.

#

the simplest way would be to start from scratch, and tell me what you want to do ๐Ÿ˜„

forest ore
#

haha ๐Ÿ˜…

winter rose
#

if all local triggers are created only to have the same behaviour, better have only one trigger (it all depends on what you want to do)

forest ore
#

Having spend time hammering around with this trigger stuff it sort of came back to me that these days it should be possible to check if an object is inArea of a marker. Since I already create local markers for players to do "some stuff" maybe if I just create one more marker to do what I'm trying to achieve with a trigger.
Will certainly be easy as everything else in this world

winter rose
#

wait. stop. don't.

#

what are you trying to achieve

#

tell me now, or I execute every hostage at hand

forest ore
#

Let me just.. try once (or maybe a few more times) if I just create a handfull of global triggers instead of every player creating their own. And see if that would lead anywhere.

hollow lantern
#

or explain your goal and maybe there is a better way of doing it

#

also I wonder if the GUARDED BY trigger is reasonable or rather a small point should be selected https://i.imgur.com/tKT8qZD.jpg My hope was that the chopper that provides support sticks to the airbase instead of flying miles away from it lol

#

but Arma

#

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

winter rose
#

you could maybe add it a "circle" waypoint, with a disabled pilot AI

hollow lantern
#

hmmm fair point

forest ore
#

Aebian,
I've noticed that if a unit has been given a GUARD waypoint it will go on its way to find some action if info about enemy presence gets relayed to this guarding unit somehow (no idea what the logic behind that is). In my opinion you'd be better off with some other waypoint, HOLD perhaps, if you want to make the unit stay in place

hollow lantern
#

it's a chopper (AH-64) so hold is no option. It just should patrol the airfield like they do in Bagram e.g. I probably do the Lou approach. Just force the pilot to fly a specific path.

winter rose
#

@forest ore , how is (are) your trigger(s) doing? ๐Ÿ˜„

forest ore
#

I will see juust now ๐Ÿ™‚

forest ore
#

@winter rose
'Stuff' began to get in working order after moving the triggers to be created by the server. Saves the trouble of having to think how to reattach the (local) triggers back to destroyed vehicles

hollow lantern
#

@winter rose the LOITER wp with it's "CIRCLE" seems ok so far and the chopper sticks to one point. However it is sadly to round to be useful. I think I need to create a rectangle myself and lower the speed of the chopper :D

drowsy axle
jade abyss
#

looks like it's "falling", constantly. Is the model setup correctly?

#

Have you tested it on normal terrain?

drowsy axle
#

I believe normal terrain would work.

winter rose
#

@drowsy axle unitPlay "teleports" or "drags" the unit, so it is really only useful for air vehicles and nothing else in mind (e.g vehicles will constantly be braking and not turning wheels)

drowsy axle
#

Ah okay.

#

Thanks for the clarification

mortal nacelle
#

@winter rose In regards to my question earlier about using while to fresh my gps, im using cutrsc to open it, any pointers?

winter rose
#

I would do ```sqf
while { not isNull (findDisplay _returnedDisplay) } do {
/* refresh */
sleep 1;
};

or something like this (again, I am not a UI pro)
#

@mortal nacelle ^

jade abyss
#

set and getVariable, when opening/closing the RscDialog

winter rose
#

not a dialog though, a display?

jade abyss
#

Yeah, Display

winter rose
#

can you detect when a display "closes"?

jade abyss
#

Example:
displayFile:

class yourDisp
{
    idd = 123;
    duration = 10e10;
    movingEnable = 0;
    fadein = 0;
    fadeout = 0;
    name = "yourDisp";
    onLoad = "uiNamespace setVariable ['yourDisp', _this select 0]";
    onUnload = "uiNamespace setVariable ['yourDisp', displayNull]";
    objects[] = {};
    controls[] =
    {
        ctrlA,
        ctrlB
    };
};```

In the Script:
```sqf
waitUntil{!isNull (uiNamespace getVariable ["yourRSC", DisplayNull])};
_display = uiNamespace getVariable ["yourRSC", DisplayNull];
//doStuff```
mortal nacelle
#

yeah already set

#

that dscha

#

you can refresh with uinamespace?

jade abyss
#

refresh?

mortal nacelle
#

well i made a custom gps and a gui with it, but it doesn't refresh the players location on the map, it is just a static map, i can use lou's method, but you on about uinamespace

jade abyss
#
waitUntil{!isNull (uiNamespace getVariable ["yourRSC", DisplayNull])};
_display = uiNamespace getVariable ["yourRSC", DisplayNull];
while {true} do {
//doStuff
_ctrl = _display displayCtrl 123;
_ctrl ctrlDoSomething;
uisleep 1;
};```
#

Instead of checking for the display over and over again, in the whileLoop

#

expanded

winter rose
#
while {not isNull uiNamespace getVariable ["yourRSC", DisplayNull]}
```nah?
jade abyss
#

nah

winter rose
#

b-b-but why?

jade abyss
#

Why constantly check for the rsc?

winter rose
#

won't the script keep on running, if the display gets closed?

jade abyss
#

Will it be closed?

winter rose
#

@mortal nacelle ?

#

(Question Combo ร— 5 ๐Ÿ˜„)

mortal nacelle
#

1 sec, reading msgs

jade abyss
#

๐Ÿ˜„

mortal nacelle
#

Will what be closed?

#

No

#

It is open 24/7

jade abyss
#

see, Lou ๐Ÿ˜›

mortal nacelle
#

๐Ÿ˜‚

winter rose
#

nya nya nya!

#

You win this timeโ€ฆ

jade abyss
#

Otherwise: Yeah, that would be okay ๐Ÿ˜„

#

I give you that much credit

winter rose
#

heh

jade abyss
#

You could also go with abusing the WaitUntil

winter rose
#

I am allergic to non-justified while { true }

jade abyss
#

sometimes, it's just not needed to constantly check for something over and over again

#

e.g. when you know, the state of something won't change

#

also, some butchery like this should also be possible:

waitUntil
{
    _display = uiNamespace getVariable ["yourRSC", DisplayNull];
    _ctrl = _display displayCtrl 123;
    _ctrl ctrlDoSomething;
    uisleep 1;
    isNull (uiNamespace getVariable ["yourRSC", DisplayNull])
};```
winter rose
#

PER-FECT! ๐Ÿ‘Œ

mortal nacelle
#

ctrldosomething

#

what on earth

#

๐Ÿ˜‚

jade abyss
#

Couldn't think of a command there ๐Ÿ˜‚

mortal nacelle
#

Am I missing a defines.hpp class?

jade abyss
#

Seems like

#

one sec

winter rose
#

one sec expired

mortal nacelle
#

widthRailWay = 1; ?

jade abyss
#

Inherit your map from

class RscMapControl;
class GPS_MAP: RscMapControl
{
//defineSizes, idc
};```
#

This should set all the needed values automaticaly

mortal nacelle
#
        class GPS_MAP: RscMapControl {
            idc = 23539;
            x = 0.0514062 * safezoneW + safezoneX;
            y = 0.819 * safezoneH + safezoneY;
            w = 0.144375 * safezoneW;
            h = 0.154 * safezoneH;
            
        };```
#

Like this?

jade abyss
#
class RscMapControl;
class myMapCtrl: RscMapControl
{
    idc = 123;
    
    x = 0.1;
    y = 0.1;
    w = 0.1;
    h = 0.1;
};```
#

Yeah

mortal nacelle
#

Wait

#

I don't need class RscMapControl; above my class?

#

Ah

#

๐Ÿ˜‚

#

I seen that sneaky edit

jade abyss
#

You need, just edited ๐Ÿ™‚

mortal nacelle
#

Ok cheers bud, testing it now ๐Ÿ˜“

jade abyss
#

class RscMapControl;
Loads it

and:
class myMapCtrl: RscMapControl{};
would literaly be the same as RscMapControl, all config entrys inherited*

#

So

class RscMapControl;
class myMapCtrl: RscMapControl
{
    idc = 123;
    
    x = 0.1;
    y = 0.1;
    w = 0.1;
    h = 0.1;
};```
So this is technicaly a copy of RscMapControl, with changed values for idc, x,y,w and h
mortal nacelle
#

Oh, now my map has completely disappeared ๐Ÿ˜‚

winter rose
#

@jade abyss Qualitรคt ๐Ÿ‘Œ ๐Ÿ˜‚

jade abyss
#

๐Ÿ˜„ ๐Ÿ–•

winter rose
#

I am laughing out loud right now ๐Ÿ˜„

jade abyss
#

@mortal nacelle Check the xywh stuff

#

also check your .rpt

mortal nacelle
#

Nothing in .rpt regarding GPS, everything else is working, except the map

#

just a blank box lol

#

only since i done that .hpp mapcontrols thing tho, let me revert it

jade abyss
#

๐Ÿค”

#

missing ; or } ?

mortal nacelle
#

dont think so

#

nope

jade abyss
#

try exchanging rscMapControl with RscButton

mortal nacelle
#

Its fixed now, map is back, it is rather weird though, my gps just goes to grid coordinates 0,0 and doesn't even come to my player anymore pepelaughs

jade abyss
#

what was the problem?

mortal nacelle
#

idk, i added widthrail or whatever to my rscmapcontrols class in defines and that error isn't there anymore

jade abyss
#

๐Ÿค”

#
_ctrl_map = _display displayCtrl blabla;
_ctrl_map ctrlMapAnimAdd [0, 0.15, getPos player];
ctrlMapAnimCommit _ctrl_map;
#

idk, i added widthrail or whatever to my rscmapcontrols class in defines and that error isn't there anymore
Somethings strange there

mortal nacelle
#

What is better for performance, oneachframe or animadd?

#

could refresh it oneachframe too i guess

jade abyss
#

animAdd

#

I wouldn't even exec it each frame

#

Maybe every 0.25-0.5 as min. value

#

(personaly, i would go for ~1s)

mortal nacelle
#

yeah that works great for me, now i have to draw my icon on

#

lol#

jade abyss
#

use a marker

#

createMarkerLocal etc.

#

Also check Additional Informationin there

#

iirc, when you use setMarkerPos, instead of setMarkerPosLocal the marker becomes visible for everyone

mortal nacelle
#

yeah i got my own little arrow here for the gps

jade abyss
#

Ah:
Local markers have own set of local commands "xxmarkerxxLocal" to work with. If you use global marker command on a local marker, the local marker will become global marker.

mortal nacelle
#

hmm yeah i can add my marker in cfgmarkers and then use it with createmarkerlocal right

winter rose
#

only if you don't use already available marker shapes

mortal nacelle
#

yh got a custom.paa here

#

@winter rose Am I using these in the correct order??

#

_marker = createMarkerLocal ["gpsMarker", position player]; _marker = "gpsMarker" setMarkerTypeLocal "gpsMarker"];

jade abyss
#

Yep

mortal nacelle
#

Hmm It isn't spawning a marker

#

lol

jade abyss
#

but

winter rose
#

]

#

one too much

jade abyss
#

Yep

mortal nacelle
#

oh

#

crap

jade abyss
#

Did you enable scriptErrors?

winter rose
#

@mortal nacelle please use -showScriptErrors :-)

jade abyss
#

๐Ÿ˜„

#

two idiots with the same idea

winter rose
#

"great minds", yadda yadda ๐Ÿ˜‰

jade abyss
#

yadda yadda

mortal nacelle
#

yeah that'll probably be very helpful ๐Ÿ˜‚

exotic flax
jade abyss
#

Yeah

#

showScriptErrors might need an update with the Launcher Settings

winter rose
#

it's written there ๐Ÿ‘€

jade abyss
#

Be sure to use -showScriptErrors startup parameter to display the error on-screen when it happens

#

Doesn't say A3-Launcher, or?

#

Ah, some lines earlier

exotic flax
#

Make sure you enable Show Script Errors in the Launcher (for Arma 3) or set the corresponding -showScriptErrors startup parameter.

jade abyss
#

damnit lou

winter rose
#

huehuehue

jade abyss
#

stop correcting me, when i am wrong

winter rose
#

sowwyyy

jade abyss
exotic flax
#

everyone learns something, even the strange blue people on this Discord ๐Ÿคฃ

winter rose
#

I was worried I forgot to mention the launcher, you made me check @jade abyss ๐Ÿ˜„

jade abyss
#

Not "learning", just not reading the page properly ๐Ÿ˜›

exotic flax
#

learning to read is also learning ๐Ÿคฃ

mortal nacelle
#

this damn marker is causing me problems

#

(not giving any errors b t w )

#

just not coming through my gps!

jade abyss
#

debug it.

_mpos = getMarkerPos "gpsMarker";
systemchat str [getPos player, _mpos];```
#

If those are the same -> check with a standard Marker

#

When this works, change to yours.

#

I just assume, your marker is there, just doesn't find it's "texture"

mortal nacelle
#

it is on my map apprently

#

just no where near me

#

lol

exotic flax
#

_gps = (findDisplay 12 displayCtrl 51);

jade abyss
#

It's not the standard GPS

winter rose
#

IDD_CUSTOMINFO_MINIMAP (311) I believe

jade abyss
#

Not when he creates his own ctrl

winter rose
#

yep

mortal nacelle
#

marker is defintely working as its following me, I just cannot see it ๐Ÿ˜‚

winter rose
#

following you on the map, not showing on your GPS then?

mortal nacelle
#

yeah the debug is following me

#

grid ref like

winter rose
#

does it follow you in the "normal Arma Map"?
if so I would then tend to believe it's a config issue then, like a "showCustomMarker = true" or something, in map definition

mortal nacelle
#

im using a default arma marker to test

#

'warning'

winter rose
#

yes, but do you see it in the normal Arma map

mortal nacelle
#

I do not

winter rose
#

then it's your marker that has an issue ๐Ÿ˜‚

mortal nacelle
#

Ugh

vital surge
#

Anyone know how I can hint a player a list of admins that are currently online on an altis life server? I added an admin button into my Y menu and I want it to either open up a dialog with a list of active admins or just hint the player a list of active admins?

mortal nacelle
#

OH lou i made progress

#

the marker is ingame!

#

however, it doesn't follow me

#

๐Ÿ˜‚

winter rose
#

\o/ oh wait /o\

#

@vital surge hint

vital surge
#

Yeah I know, but I'm figuring out how I can hint a list, I know I can use the adminlevel >1 and stuff but I'm wondering how I can make a list with the hint

#

Currently I'm clueless how I can make a list with it that lists active admins

winter rose
#

this is not L*fe support though, as this is very L*fe specific
try their Discord

vital surge
#

Aight, I'll have a look

mortal nacelle
#

I'd have to use foreach to track a player with a marker right

winter rose
#

forEach , createMarker, getPosATL , plenty of commands yes

mortal nacelle
#

hmm but i am only looking to track one object (the player) so what would the foreach array be?

winter rose
#

for your test only?

#
[_myMarker, _myUnit] spawn {
    params ["_marker", "_unit"];
    while { sleep 1; true } do {
        _marker setMarkerPosLocal getPosATL _unit;
};```
vital surge
#

I've scrapped that admin thing, now I'm just wondering if there is a way of checking if a player is online? I'm using a hint script that displays text in a list, but I'm wondering how you can check if a specific player is online?

winter rose
#

get all players, check if name corresponds (or better, player UID)

vital surge
#

So if I put a list of player uid's, then I would be able to make a script to check if they are currently active on the server?

winter rose
#

Yes

#

Because names can be changed ; UIDs cannot

mortal nacelle
#

Lou was I ment to close that spawn after entering params or? It is saying _marker is not defined

winter rose
#

@mortal nacelle why would you change my code ๐Ÿ˜…

mortal nacelle
#

i didnt change it

vital surge
#

Yeah I know that, now it's just getting the uid's in a list and being able to find that specific uid on the server

#

Ty

winter rose
#

replace _myMarker and _myUnit with what fits @mortal nacelle

mortal nacelle
#

๐Ÿ˜•

winter rose
#

?

mortal nacelle
#

so confused ๐Ÿ˜‚

jade abyss
#
[_myMarker, _myUnit] spawn {
    params ["_marker", "_unit"];
    while { sleep 1; true } do {
        _marker setMarkerPosLocal getPosATL _unit;
};```
uisleep. instead of sleep
getPosATL doesn't matter, ordinary getPos works fine (just for the sake of keeping it simple)
winter rose
#

if you want a marker to follow a unit, you need:

  • a marker
  • a unit

once you created the marker, pass its name to this function

#

getPosATL is fffaster

jade abyss
#

0.000001ms? ๐Ÿ˜‚

#

As i wrote, just to keep it simple.

winter rose
#

Negative; check performance

exotic flax
#

and I would use addMissionEventHandler ["EachFrame", {}]; instead of while... since the map needs to be updated on every frame

jade abyss
#

what?

#

no

mortal nacelle
#

so _myMarker needs to be gpsMarker?

exotic flax
#

every time you open the map, it will rerender...

jade abyss
#

No

#

It's a marker

mortal nacelle
#

:x

exotic flax
#

a marker which needs to move ๐Ÿ˜‰

jade abyss
#

And it's not a "map", it's a cutRSC

#

Yeah, how many meter do you move per frame?

#

(rhetorical question)

mortal nacelle
#

yeah dscha i havent even got the marker on my cutrsc yet, i'll leave that till last, trying to understand what i have just been fed ๐Ÿ˜‚

jade abyss
#

tbh, moving a marker is pretty easy :/

mortal nacelle
#

Do I actually need to change _myMarker? i've never used spawn

exotic flax
#

jumps in tank and have someone drive a bike against me

lightspeed!

jade abyss
#

๐Ÿ˜‰

#

using forEach EH for this, is like... erm... putting a Jetturbine on a Bike. Looks nice, but it's overpowered

#

wayyyyyyyyyyyyyyyyyyyyyyyyyyyyyy overpowered.

#

So, @mortal nacelle does the marker appear on the map?

#

(just starting from scratch)

mortal nacelle
#

well it did

#

yeah

#

its static though

#
    _marker = createMarkerLocal ["gpsMarker", position player];
    _marker = "gpsMarker" setMarkerTypeLocal "mil_warning";
    _marker = "gpsMarker" setMarkerAlphaLocal 1;
    _marker = "gpsMarker" setMarkerColorLocal "ColorRed";
    _marker = "gpsMarker" setMarkerDirLocal _dir;```
jade abyss
#

position player = getPos player

mortal nacelle
#

So in relation to that spawn bit you sent, is any of what i wrote relevant

jade abyss
#
"gpsMarker" setMarkerPosLocal (getPos player);
"gpsMarker" setMarkerDirLocal (getDir player);
#

this needs to be addedto the "while" loop

mortal nacelle
#

and what about the params?

jade abyss
#

wich params?

mortal nacelle
#

[_myMarker, _myUnit] spawn {

params ["_marker", "_unit"];<<
while { sleep 1; true } do {
_marker setMarkerPosLocal getPosATL _unit;
};

jade abyss
#

Ah marker is basicaly just a string

#

```sqf
code
```

mortal nacelle
#

yeah i know because its in "", but _unit, what am i actually using that for

jade abyss
#

"" = string

#

_unit = player

#
["markerName", player] spawn {bla};
[STRING, OBJECT] spawn {bla};
mortal nacelle
#

ok makes more sense now

#

but params doesn't ๐Ÿ˜‚

#

wait

#

yes it does

jade abyss
#
["markerName", player] spawn
{
  params["_marker","_unit"];
  while { sleep 1; true } do
  {
    _marker setMarkerPosLocal (getPos _unit);
    _marker setMarkerDirLocal (getDir _unit);
  };
}; ```
mortal nacelle
#

so in this case, param [0] or _marker is slecting 0 from the spawn arguments array right?

jade abyss
#

use paramS, when using/defining multiple entrys

mortal nacelle
#

yeah i know but im trying to simplify it

#

so i can understand it

#

๐Ÿ˜‚

jade abyss
#

That's simple ๐Ÿ˜„

#

and easiest

mortal nacelle
#

ok so params["_marker"] is selecting "markername" that i just spawned in, correct?

jade abyss
#
[0,1,2] params["_index_0","_index_1","_index_2"];
systemchat str _index_0; //"0"
systemchat str _index_1; //"1"
systemchat str _index_2; //"2"
mortal nacelle
#

ok i think i understand it now

jade abyss
#

adjusted

#

if there is nothing infront of params -> it takes _this as argument

#

So the stuff that was in [HERE] spawn {}

#

So taking the example from before:

["markerName1", player] spawn
{
  params["_marker","_unit"];```
`_marker` is `"markerName1"`
```sqf
["LouIsOld", player] spawn
{
  params["_marker","_unit"];```
`_marker` is `"LouIsOld"`
```sqf
["DschaIsTheBest", player] spawn
{
  params["_marker","_unit"];```
`_marker` is `"DschaIsTheBest"`
etc.
mortal nacelle
#

pmsl

#

I love the examples ๐Ÿ˜‚

jade abyss
#

Gesundheit.

#

Just an example, that it could be anything in there

mortal nacelle
#

yeah, ok i understand that now

jade abyss
#

๐Ÿ‘

mortal nacelle
#
    _marker = "gpsMarker" setMarkerTypeLocal "mil_warning";
["gpsMarker",player] spawn {
    params["_marker","_unit"];
    while {sleep 1; true} do{
        _marker setMarkerPoslocal (getPos _unit);
        _marker setMarkerDirLocal (getDir _unit)
    };
};```
#

๐Ÿ˜„

#

Now dscha. all i need to do is get it on my cutrsc

vital surge
#

private _myArray = [76561198864557712]; if (_myArray == 76561198864557712) then {hint "That UID is Valid"}; I got this to hint me the message it was supposed to hint me but now it doesn't hint me anymore when I execute the script?

#

There is really nothing much to this simple script, it's just that it doesn't display it whenever I execute it the second time

jade abyss
#

@mortal nacelle
Where do you open the gps?

mortal nacelle
#

its opened on server start

jade abyss
#

init.sqf?

mortal nacelle
#

no server_start_function

exotic flax
#

_myArray == 76561198864557712 is wrong...

First of all == doesn't exist in SQF, and second... an array is never the same as an integer

mortal nacelle
#

just where i exec all my stuff

#

well

#

i tell a tale

jade abyss
#

== does exist @exotic flax oO

#

It's just not what he wanted to use

exotic flax
#
if (_value in _myArray) then {
mortal nacelle
#

that is where i am going to do it, right now I am executing it in debug

#

73673 cutRsc ["Dialog_Hud_GPS", "PLAIN"]

jade abyss
#

for testing:

myljc_fnc_superDuperStuff =
{
  _marker = createMarkerLocal ["gpsMarker", position player];
  _marker = "gpsMarker" setMarkerTypeLocal "mil_warning";
  ["gpsMarker",player] spawn
  {
    params["_marker","_unit"];
    while {uisleep 1; true} do
    {
      _marker setMarkerPoslocal (getPos _unit);
      _marker setMarkerDirLocal (getDir _unit)
    };
  };
};

73673 cutRsc ["Dialog_Hud_GPS", "PLAIN"];

In your .hpp file for the UI, there should be something like onLoad, correct?

#

add this, at the end:

onLoad = "uiNamespace setVariable [""Dialog_HUD_GPS"", _this select 0]; call myljc_fnc_superDuperStuff";
mortal nacelle
#

uiNamespace setVariable [""Dialog_HUD_GPS"", _this select 0]";

jade abyss
#

Before you executed the cutRsc part

#

adjusted

mortal nacelle
#

if i call the function will it put all the markers on there??

jade abyss
#

Only those, who are named "gpsMarker"

#

And since it's beeing executed on the client, and is local to them, it only moves the marker for the player himself.

mortal nacelle
#

yeah which is what i want

#

as its a gps

#

haha

jade abyss
#

Also mean: The other players don't see the marker of other players

#

Yep, that's why i mentioned createMarkerLocal in the very beginning ๐Ÿ˜› I thought so

mortal nacelle
#

yeah

#

Curious to the code snippet above Dscha

call myljc_fnc_superDuperStuff";

Whats up with the random speech marks?

#

Accident or?

jade abyss
#

speech marks?

mortal nacelle
#

' '

jade abyss
#

"

#

?

mortal nacelle
#

Yeah ๐Ÿ˜‚

jade abyss
#

fixed above, missed to remove one

mortal nacelle
#

got it, thank you

jade abyss
mortal nacelle
#

Okay, thank you. I asked this earlier, but could I use oneachframe instead of ctrlMapAnimAdd, because it is prettylaggy even at 0.15,

#

GPS would be nicer smooth

jade abyss
#

Adjust the time, according to your uisleep time
[time, zoom, position]:

#

e.g.

uisleep 0.15;
_ctrl ctrlMapAnimAdd [0.15, 0.1, getPos player];```
mortal nacelle
#

for some reason when i execute 73673 cutRsc ["Dialog_Hud_GPS", "PLAIN"]; in a script it is crashing my game

#

is it ment to go above or below all my gps stuff

jade abyss
#

below

#

Oh, you might exchange call myljc_fnc_superDuperStuff with [] spawn myljc_fnc_superDuperStuff in the hpp

mortal nacelle
#

is that what crashing my game?

jade abyss
#

possible

mortal nacelle
#

only happens when i try to load the gui so i guess it is

jade abyss
#

There are some quirks and borks with the UI stuff

mortal nacelle
#

ugh

#

back to 0,0 again

#

๐Ÿ˜‚

#

works fine on the main map though

#

how weird

#

i ran this in the script and spawneed it like you said, the gui comes up now fine, but doesnt show any info, if i remove the script and run 73673 cutRsc ["Dialog_Hud_GPS", "PLAIN"]; on debug it gives me all the info, but not the markers

#

๐Ÿง

jade abyss
#

As mentioned in the early beginning: I assume somethings wrong with the mapCtrl. iirc, you switched back to your own one.

mortal nacelle
#

Using the one you gave at the start ```sqf
_control = _display displayCtrl 23539;
_control ctrlMapAnimAdd [0,0.15,getPos player];
ctrlMapAnimCommit _control;

jade abyss
#

RscMapControl

mortal nacelle
#

Oh

#

Reverted back to what you said, trying again

#

Nope adding that class above mapctrl class just removes the map completely

#

This is pretty annoying

jade abyss
#

exchange with RscButton

#

something's odd with your stuff ๐Ÿค”

mortal nacelle
#

class RscMapControl;

#

to class RscButton;

#

?

jade abyss
#

Yeah

#

also changing the inherited one

mortal nacelle
#

okay

jade abyss
#
class RscMapControl;
        class GPS_MAP: RscMapControl```
-> 
```cpp
class RscButton;
        class GPS_MAP: RscButton```
mortal nacelle
#

yeah changed both and still same

jade abyss
#

you broke something ๐Ÿ˜‚

mortal nacelle
#

Looks good to me ยฏ_(ใƒ„)_/ยฏ

willow rover
#

Does ropeCreate have a limit to length?

astral dawn
#

I have a file which has a bunch of characters, nothing special, just 123, no newline at the end.
I want to use preprocessor to craft something like this:
varName = "123";
So I want to include file contents and then wrap it into quotes. Is it possible?

#

It's not for SQF so I can't format it, it's for config.

queen cargo
#

#include?

astral dawn
#

Yes but file contents have no quotes, just 123 characters

#

Anyway I have made my build tool thing produce the needed file which I just include entirely in config, thanks for trying to help

covert inlet
#

@tough abyss On the object you want the scroll wheel action put this in it's init field
this addAction ["Skip Time", "skipTime.sqf"];

Make a new .txt file in your mission folder called skipTime.sqf make sure your replace .txt with .sqf, inside that file write this
skipTime 2;

If this is for MP you might have to add a global argument, but we will see or the blue mafia will point out my error ๐Ÿ˜‰

heavy lichen
#

hello

#

lol i meant script wise

#

ok

#

np

#

thx

tough abyss
#

@covert inlet thanks buddy i really appreciate it

#

can i get the one with the global argument?

#

honestly man tysm i would have spent sooo much time otherwise

covert inlet
#

try it first, i cant remember how of that top of my head, it might not even need one

tough abyss
#

can you put the fade out and fade in effect?

covert inlet
#

fairly sure that is default behaviour of the skipTime function

winter rose
#

@covert inlet skipTime command doesn't do the fadeout/fadein

tough abyss
#

im sorry man im so clueless i have no idea what im doing

covert inlet
#

see i said the blue mafia would point out my dumb dumb ๐Ÿ˜‰

tough abyss
#

snake how do i combine it with the time skip effect

winter rose
#

by adding it before and after the skipTime command in your script

tough abyss
#

aight thanks homie

#

wait before and after?

covert inlet
#

in and out

#

wait 1

winter rose
#
cutText ["", "BLACK OUT", 1];
sleep 1; // wait for the black to apply
skipTime 6; // will skip 6 hours
cutText ["", "BLACK IN", 1];
covert inlet
#

sniped

winter rose
#

Does ropeCreate have a limit to length?
@willow rover I don't know, but there might be a hardcoded limit
if you find it, I will add it to the wiki

covert inlet
#

@tough abyss You can also add 2 Hours Later inside the empty quotes, to the left of the BLACK OUT/IN param

tough abyss
#

@winter rose @covert inlet thanks you two, i really appreciate it.

covert inlet
#

I think it would be best added to the BLACK IN one

winter rose
covert inlet
#

He only wants 2 hours so prob easier via text

#

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

winter rose
#

with setDate you can set the time to 25h 70min and it will still compute properly ๐Ÿ˜„

covert inlet
#

lol wot

winter rose
#

but there was an A2 function that displayed the 16:30 โ†’ 18:30 time, I am looking for it

#

ah no, just BIS_fnc_showTime shows, but doesn't skip

tough abyss
#

says invalid number in expression

#

oh and i want to be able to do it repeatedly is that possible

winter rose
#

```sqf
/* your code here */
player setDamage 1;
```

โ†“โ†“โ†“

/* your code here */
player setDamage 1;
#

paste your code here?

tough abyss
#

what?

winter rose
#

copy-paste your code so we can see what's wrong

tough abyss
#

cutText ["", "BLACK OUT", 1];
sleep 1; // wait for the black to apply
skipTime 6; // will skip 6 hours
cutText ["", "BLACK IN", 1];

#

the one you sent me lmao i literally just copy pasted it

winter rose
#

where did you paste it, I want context

#

also, ```sqf to format your code

tough abyss
#

i put it in the init

#

and where to put the ''' sqf?

winter rose
#

which init?

tough abyss
#

of an object, a laptop to be specific

winter rose
#

```sqf
cutText ["", "BLACK OUT", 1];
sleep 1; // wait for the black to apply
skipTime 6; // will skip 6 hours
cutText ["", "BLACK IN", 1];
```

gives

cutText ["", "BLACK OUT", 1];
sleep 1; // wait for the black to apply
skipTime 6; // will skip 6 hours
cutText ["", "BLACK IN", 1];
#

@tough abyss yeah, don't put that code in an init. put it in your script file

covert inlet
#

You need to put it in the myskipTime.sqf file i told you to put in your myMissionname.mapName folder

tough abyss
#

ohhh

#

okay hang on

winter rose
#

myMission.Altis
myMission.Altis\myScript.sqf

yes

covert inlet
#

On the object you want the scroll wheel action put this in it's init field

this addAction ["Skip Time", "myskipTime.sqf"];

Make a new .txt file in your mission folder called myskipTime.sqf make sure your replace .txt with .sqf, inside that file write this

cutText ["", "BLACK OUT", 1];
sleep 1; // wait for the black to apply
skipTime 6; // will skip 6 hours
cutText ["", "BLACK IN", 1];
tough abyss
#

gosh where would i be without this discord xD

winter rose
#

on the biki, hopefully!

covert inlet
#

To be fair the biki examples are usually terrible for someone just starting out, i found its confusing AF even when i had just done a year of Python at uni

tough abyss
#

i cant find the mission file, im supposed to export it right? but even if i click do not binarize its still a pbo

winter rose
#

do not export it until you finished it

hollow lantern
#

it should reside in c:\Users\%username%\Documents\Arma 3\missions\

winter rose
#

it should be in %USERPROFILE%\Documents\Arma 3\missions\ indeed

#

or "Arma 3 Other Profiles" if you didn't use the default profile

covert inlet
#

%USERPROFILE%\Documents\Arma 3\missions\myMissionName.mapName to be precise

tough abyss
#

and i put the text doc right under mission.sqm

covert inlet
#

yep

winter rose
#

beside it yes

tough abyss
#

alright im gonna test it now

covert inlet
#

and make sure you change the file extension from .txt > .sqf

tough abyss
#

i did

#

script myskipTime.sqf not found

hollow lantern
#

is it in the root folder and named like myskipTime.sqf ?

tough abyss
#

yeah

hollow lantern
#

it's not a txt is it

tough abyss
#

i think its cus i put it in after i booted the game though so im restarting it rn

#

no its an sqf

covert inlet
#

you only have to restart the editor not the game

winter rose
#

you don't even need that

#

but if you didn't see the file extension, just adding .sqf won't do

hollow lantern
#

you only need to launch the misison. Only for description.ext a reload of the misison need to be done

forest ore
#

There might be a possibility that filename extensions (.txt, .exe and so on) are hidden? Which could make the file myskipTime.sqf.txt

winter rose
#

new text file(.txt) โ†’ rename โ†’ new text file.sqf(.txt)

#

in Windows Explorer, activate "view file extension"

covert inlet
#

when you first add a new script you do dont you, i know edits dont need a restart

hollow lantern
#

nope

#

only when changing the description.ext a editor reload of the mission is needed. Otherwise not

winter rose
#

description.ext doesn't even need that (maybe a "save")

tough abyss
#

wow whoa hang on

#

myskipTime.sqf or sqf.txt

winter rose
#

myskipTime.sqf

willow rover
#

@winter rose from all my testing 100 meters is the biggest I can create.

covert inlet
#

then you have your answer ๐Ÿ˜‰

winter rose
#

@willow rover thanks! I will add it to the biki ๐Ÿ™‚

tough abyss
#

hmm it still says its a text document

winter rose
#

@tough abyss BUT
when you create a file, do you see "new text file**.txt**" or only "new text file"?

tough abyss
#

i see it with the txt

covert inlet
#

doesn't it start getting really wack in MP when its that long

tough abyss
#

wait wait no

#

i dont

winter rose
hollow lantern
#

so it is a 2D relict

winter rose
#

@hollow lantern 2D editor yes; in Eden a simple Ctrl+S reloads it

covert inlet
#

get to work Lou *cracks wip

tough abyss
#

IT WORKED! IT WOOOOORKED

winter rose
#

Additionally, many attributes can also be set via the Eden Editor, where changes are automatically refreshed upon scenario preview

#

I don't need to work, I already did

covert inlet
#

haha

tough abyss
#

๐Ÿ˜„

covert inlet
#

Good Work Hawky, getting your first script working is always a good feeling even when it was spoon fed to you

tough abyss
#

@covert inlet loooool

#

dude

winter rose
#

but yeah, it's good it works ๐Ÿ˜‰

#

after all, an expert is someone that made all the possible errors in his field!

tough abyss
#

I have to start somewhere right guys?

#

plus this is good experience, i always wanted to learn how to code

covert inlet
#

SQF is a terrible language to learn, its backwards and stupid, but learning coding via a game is much more fun than doing "Hello world" exercises

hollow lantern
#

does the CYCLE waypoint needs a certain distance to the first wp in order to form a "loop" ? I'm currently scripting a loop made out of 4 waypoints to form a rectangle loop

tough abyss
#

@covert inlet yeah your so right

covert inlet
#

One of the guys in are unit showed some SQF to the OG coding wizard at is work and the guy just got angry and kept saying "That is wrong and stupid!" ๐Ÿคฃ

winter rose
#

@tough abyss we are "joking" a bit but we are not mocking, don't you doubt about that ๐Ÿ™‚

tough abyss
#

ah no dont worry lol

#

snake, lou

#

i got another problem and google couldnt fix it, i mean they did but there HAS to be an easier way to fix this