#arma3_scripting

1 messages · Page 576 of 1

slim oyster
#

hopefully there is some EH for special check they put in so we can have overrides

exotic flax
#

compileFinal can not be compiled again, so no matter when you try to override it, it will return an error and only the first will work (if at all).

#

Loadorder of Arma is based on "requiredAddons" and mod name (eg. @aaa is loaded before @bbb)

slim oyster
#

Hmm so defining a particular ui namespace var/function def as compilefinal in a __name addon would prevent the subsequent compilefinal from the original addon

#

Or however the load ordering works with symbols and special chars

#

say, @aCBA compileFinal'ing a function that @CBA compileFinals, it would just spit out a log but the function would be @aCBA's

exotic flax
#

let me correct myself:

class CfgPatches {
   class ZZZ {
      // loads last
   };
   class AAA {
      // loads first (after A3)
   };
};
#

but again... using compileFinal twice on the same variable will return errors, if loading at all

slim oyster
#

works with the name ordering

#

thank you

torpid glacier
#

I just need help with scripting with teleporters anyone care to help?

gritty zodiac
#

hey guys im currently having an issue i want to only add this code to a certain side (Example) player setVariable ['copLevel',1]

wouldnt the correct code be
if (side _Player == west) then player setVariable ['copLevel',1]

tough abyss
#

is it possible to disable penetration on objects

still forum
#

@slim oyster their script file that does the compiles, is probably called from config. Config you can modify, you can just replace the whole file that contains all the compiles. Thats the way to do it with ace for example

rough trail
#

any good scripting tutorials on youtube I haven't found any yet

#

?

still frost
#

Hi, I'm seriously brainless. I'm a basic editor that makes simple but fun scenarios but I still don't know to to make customChats appear? I know how to use sideChat and groupChat, I can't figure out how to make the Unit's name White to make it look like he's talking directly because if I use globalChat, would come up like 'BLUFOR (unit name): "Text here."' In short, is there I way I can make it like, 'Jackson: "Job's done Sir, what's next?"' and also make Jackson a custom colour? Thanks 🙂

winter rose
#

hi seriously brainless, I'm dad!
you could use directSay, but this would require CfgRadio definitions

#

or create a custom chat…

#

much better 🙂

still frost
#

I'd love to create a custom chat but it seems too hard for me.

#

Or maybe I'm just that unexperienced.

#

Cause like my mission works perfectly, this stuff is the only issue that's bothering me.

winter rose
#

is BIS_fnc_showSubtitle ok to you?

still frost
#

I don't even know how to use it 😦

winter rose
#

it's easy, it's explained on the page

#

e.g```sqf
["Jackson", "keep your hands up!"] spawn BIS_fnc_showSubtitle;

still frost
#

Do I insert it into a trigger or?

winter rose
#

the same place you used globalChat

still frost
#

Well I put it in my trigger and comes up with, "On Activation: Type Script expected Nothing"

winter rose
#

oh
then use the old trick of 0 = -yourscript-

#
0 = ["Jackson", "keep your hands up!"] spawn BIS_fnc_showSubtitle;
still frost
#

BEAUTIFUL!

#

It won't be consistent with the groupchat and side chat as they will appear on the side and this appears in the middle but I guess it's better than nothing. Thanks @winter rose !!!

winter rose
#

you're welcome! well this is for direct chat only; if you wanted a special colour for each person a customChat is needed and can be tricky in MP

still frost
#

Thing is my Scenarios are only made for myself haha, Singleplayer so I guess customChat won't work?

winter rose
#

customChat works in single player yes

still frost
#

Oh, is it hard? I don't want you to spend too much time on me haha

winter rose
still frost
#

Already checked it out, it's all foreign language for me 😦

winter rose
#

in initServer.sqf:

redChannel = radioChannelCreate [[1,0,0], "", "", allUnits];
whiteChannel = radioChannelCreate [[1,1,1], "", "", allUnits];

then you can use in your triggers

jackson customChat [redChannel, "hello there!"];
#

@still frost

still frost
#

Where's this initServer.sqf? Sorry.

winter rose
#

you simply create a file at the root of your mission, named initServer.sqf (make sure it is not initServer.sqf.txt)

still frost
#

I'll give it a go right now.

winter rose
#

(maybe use "%UNIT_NAME" as the second "" parameter though - so the unit's name would display)

#
redChannel = radioChannelCreate [[1,0,0], "", "%UNIT_NAME", allUnits];
whiteChannel = radioChannelCreate [[1,1,1], "", "%UNIT_NAME", allUnits];
still frost
#

Some issues happening but the text did come up on the side.

winter rose
#

which issues?

still frost
#

May I dm you the screenshot?

winter rose
#

yup, sure!

#

oh! my bad, indeed it's RGBA

#
redChannel = radioChannelCreate [[1,0,0,1], "", "%UNIT_NAME", allUnits];
whiteChannel = radioChannelCreate [[1,1,1,1], "", "%UNIT_NAME", allUnits];
#

try this and it should be fine

still frost
#

I actually don't know how to thank you man!

winter rose
#

1 bitcoin should be enough 😁

still frost
#

Hehe, seriously, this is legit what I've been after! Thank you for spending your time on a newbie! 😁 ❤️

#

I shall save all of this on a document before I forget!

winter rose
#

You're welcome! that's why we're here 👍

still frost
#

Last thing I promise, vehicleChat isn't working properly so how would I make the channel orange as I don't know the numbers.

winter rose
#

for info, the [1,0,0,1] is [red, green, blue, alpha]

so
[1,0,0,1] is red
[0,1,0,1] is green
[0,0,1,1] is blue
[1,0.6,1,1] should be orange

still frost
#

Beautiful, thanks!

surreal peak
#

if you want to make any other colour combinations, you can also use an online RBG table

#

and the alpha should be the opacity of the colour

still frost
#

@surreal peak thanks!

surreal peak
#

np

shadow sapphire
#

Does anyone know off hand a way to set a trigger to activate if a player slot isn't filled, or if a unit just plain doesn't exist?

I'm using !alive unitName; at the moment, but that of course only works if the unit spawns, and then I kill the unit. I need the condition to activate if the unit never spawns.

Alternatively, if there is a way to detect if the unit DID spawn and cancel an action based on that.

Any advice is appreciated. Thanks!

winter rose
#

@shadow sapphire try maybe```sqf
isNil "unitVariableBetweenQuotes";

shadow sapphire
#

Oh! Thanks a ton! Will try right now!

#

YES! That worked perfectly! Thanks so much!

lean furnace
#

I have the following condition and was surprised when it returned true considering the profileNameSpace variable I'm using is nil

!((profileNamespace getVariable ["ZKB_PVP_ProfileOwner",["",getPlayerUID player]] # 1) isEqualTo getPlayerUID player)

So I started to break it down on what might be wrong with it and I narrowed it down to the way I was using # was messing it up but I still can't figure out why exactly. No matter what profileNameSpace variable I used it returned the same results.

//Default returns
profileNameSpace getVariable ["ProfileVar",["0","1"]] // ["0","1"]

The following returns something other than what's expected

//If index 0 of default is an empty string
profileNameSpace getVariable ["ProfileVar",["","1"]] # 1 // [884099,96500,0,0,11,0,0,3660,[]]
profileNameSpace getVariable ["ProfileVar",["",""]] # 1 // [884099,96500,0,0,11,0,0,3660,[]]

//If index 0 is NOT a string
profileNamespace getVariable ["ProfileVar",[0,""]] # 1 // Error Type Number, expected String
profileNamespace getVariable ["ProfileVar",[0,1]] # 1 // Error Type Number, expected String
isNil {profileNamespace getVariable ["ProfileVar",[0,"1"]] # 1} // True with RPT Error Type Number, expected String
//Selecting index 0
isNil {profileNamespace getVariable ["ProfileVar",[0,"1"]] # 0} // True with no RPT error

//But works with select
profileNamespace getVariable ["ProfileVar",[0,"1"]] select 1 // "1"

//and index 1 works as long as index 0 is NOT an empty string
profileNamespace getVariable ["ProfileVar",["0",1]] # 1 // 1

The following returns as expected

//Works as expected when # is outside parentheses
(profileNamespace getVariable ["ProfileVar",["","1"]]) # 1 // "1"

//If index 0 of default is NOT an emtpy string
profileNamespace getVariable ["ProfileVar",["0","1"]] # 1 // "1"

//Works as expected with select
profileNameSpace getVariable ["ProfileVar",["","1"]] select 1 // "1"
#

If someone could shed some light on why the way I was using # caused issues it would be much appreciated.

still forum
#

has higher precedence

#

profileNamespace getVariable ["ProfileVar",[0,""]] # 1
->
profileNamespace getVariable (["ProfileVar",[0,""]] # 1)
->
profileNamespace getVariable [0,""]
error varname is a number, should be a string

lean furnace
#

ah so it's returning [0,""] from ["ProfileVar",[0,""]] then getting variable

still forum
#

You are just repeating what I said.. uhm. yes.

steady galleon
#

I think I need an ELI5 at this point for an issue with locality.

If I run this code:

test = { 

    params ["_text"];
    systemChat _text;

}; 
 
["test"] remoteExec ["test", 0, false];

Locally, for example through an addAction, why does it not execute on all clients despite the remoteExec targets being 0? I'm sure it's something simple that I'm just not grasping atm...

winter rose
#

because test is only defined locally

#

when you use e.g remoteExec ["BIS_fnc_ambientAnim"], the target has BIS_fnc_ambientAnim in CfgFunctions

here, you define locally a function in the global variable "test" that the other computers don't have.
what you could do is publicVariable "test", but… it's not great

also (maybe you know), your simple example can be simplified as ```sqf
["test"] remoteExec ["systemChat"];

steady galleon
#

Thank you. Yes I knew about the simplified version, I was trying to represent the fact I was trying to use a custom function. If that's the case, I could define the function in cfgFunctions and be good. I may just try getting away with publicVariable since this is for a single mission. Thanks for the clarification!

#

@winter rose

winter rose
#

you're welcome

restive leaf
#

I would say GG Dad but apparently you are no longer our dad 😭 I miss you dad!!!

devout brook
#

Did the RHS documentation get moved? I can't seem to get to the class documentation.

bright flume
restive leaf
#

No... Unless you are doing it very mission specific in which case you could filter for certain classes... You can get the list and check whether each one is a player though

bright flume
#

well thre man air car... bla bla but no core list which should exist.. right?

#

I mean is there a player type? I only need to search for players within 300m and kinda not wise to do that given there gonna be ai everywhere

#

re-read what you said so like i could use B_Survior_F? as in ?

restive leaf
#

No... because the type is, at least I assume, the same as the result from isKindOf... so you can list a class in the hierarchy above the classes you use for players... going up to "Man", "Air", etc... If all your players are, for example BLUFOR then yes, you'd search for the lowest inherited class shared by each class of player

#

My last comment was written before I saw you last one

bright flume
#

yeah they all gonna be same side but are enemies doing something with Alive

restive leaf
#

Yes... if the players are all subclasses of that and AI are not then that should work...

bright flume
#

sweet yeah Im trying to make random teleporters for spawning into the combat area, but I dont want players jumping on top of others in a immediate area. so wanna put a check in if the random spawn object name pick is safe to go to.

restive leaf
#

Let me know whether that works @bright flume

bright flume
#

heh just seen that when I jumped out lemme go back in and finish up

#

yep totally does. so just like you suspected likely using isKindOf @restive leaf

restive leaf
#

👌

restive leaf
#

IsKindOf inheritance rules we should point out for viewers 🙃

still forum
#

@steady galleon

I may just try getting away with publicVariable since this is for a single mission.
Or you could remoteExec "call" and pass the function along. thats less efficient when you call it multiple times though, but more efficient than calling publicVariable everytime

old adder
#

@lean furnace evo server best server

velvet merlin
#

how to detect destroyed buildings best?
and if there is units inside that were not killed be the collapsing structure?

winter rose
#

attach first to the "normal" building, then not alive _building

#

and on this, setDamage mweheheee

#

@velvet merlin

steady galleon
#

Thanks @still forum I'll give that a shot too

velvet merlin
#

@winter rose attach?
this is about generic monitoring - not just one building

still forum
#

afaik there is a EH telling you about buildings being destroyed?

winter rose
#

Mission EH yep

velvet merlin
#

ty

velvet merlin
winter rose
#

not that I know of? it may only impact Conversations though, not radio

velvet merlin
#

these arent available in A3, are they?

#

its the tech from A2 talking to units asking for weather, enemies nearby, etc

winter rose
#

the conversations themselves are not present, but I wonder if it doesn't still disable the chatting option in A3 (conversation EH)

winter rose
#

@velvet merlin I can test it rn if you need

velvet merlin
#

enableSentences false = disable all but KBTell? (friendly and hostile) or only AI voice chat but not text? player chat also ignored? (for MP only for local AI)
showSubtitles false = disable all but player chat?
enableRadio false = disable "radio" completely (only text?) - (in MP player chat and status messages remain?)
_unit setSpeaker "NoVoice" = mute AI radioprotocol - text still shown? (for MP needs to be applied on each client)
showChat false = hide all text display of the "radio"
0 fadeRadio 0 = mute AI radio protocol - text still shown?

(all: friendly and hostile AI radio reports, system messages, scripted chat messages, player chat, kbTell)

player auto spotting - cant be disabled?

#

this is my research without testing so far

winter rose
#

so yep, disableConversion disables the Conversation EH

#

and it goes both ways: disabling the "talker" or the "talkee" will remove the speech action option

#

maybe we can put all that you collected in one Wiki page @velvet merlin

velvet merlin
#

once confirmed yes

#

what does the Conversation EH pick up?

winter rose
#

only tested disableConversion
I should try enableSentences too

west grove
#

is it just me or is createMine working weird? i'll use it to spawn a mine on the character that walks into a trigger, but the mine won't trigger. it triggers if you walk away a bit and return

#

now i'm trying to just spawn the mine explosion, but finding the right ammo is... ugh

winter rose
#

@west grove it take that the mine has a timer before activating, so have the mines you place

west grove
#

so how do i get around that

velvet merlin
#

updated the overview about a bit. will try to do SP and MP testing in coming days

west grove
#

i would just spawn an explosion, but i want to have the bounding mine bleep ... pew ... boom

winter rose
#

@west grove can't you setDamage the mine?

west grove
#

then it'll explode without the bleep ... pew ... boom

winter rose
#

(result not guaranteed)

west grove
#

did a workaround. i spawn it at 0,0,0 and run a sleep for a few seconds, then move it to the target

#

the explosion timing isnt crucial, so that works for me

winter rose
#

@velvet merlin enableSentences doesn't hide Conversation (direct comm)

#

nor radio

velvet merlin
#

again what is "Conversation"? 👼

winter rose
#

it internally uses kbTell

velvet merlin
#

well this was ditched from A3 (relevant fsm and data), no?

#

ok i see. well the terminology can be misleading

#

in A2 this was used for the small talk stuff (greeting, weather, soldier nearby, etc)

#

whereas "Conversations" is actually the term for the underlying mechanic of KBTell

#

but yes enableSentences doesnt block KBTell - thats known. the open question what it does really

winter rose
#

it blocks the conversation system, but doesn't prevent kbTell no (just tested)

velvet merlin
#

sorry still dont quite get the difference - blocks means what exactly? the EH no longer reacts, anything else?

winter rose
#

it means that I can use kbTell as I wish, but initiating the conversation is not possible

#

the Conversation Event Handler menu doesn't show. I will see if AI still reacts to sentences though

#

the player answers menu still pops up in reaction to a sentence

ripe sapphire
#

Hey guys, do you know how in the official zues missions, the players’ characters are not present until they join in and after they actually spawn in, the player’s character automatically gets added to the zues editable objects list?

Can someone show me how to do that on a custom zues mission so that we dont have to add editable objects everytime someone joins? Thanks !

winter rose
#

too many macros, can't help

lapis ivy
#

Sorry, I can’t insert the code correctly

surreal peak
#

also stylise it

lapis ivy
#

I Deleted "/*", because I need so that the markers could not be put without a walkie-talkie, but the script starts to throw an error.

winter rose
#

see pinned message

surreal peak
#

MFive look at pinned to see how to style it

lapis ivy
#

I insert a ", but it does not work

#

Im Sorry

#

Can I give a link to the Bohemia forum?
I created a topic there with this question.

winter rose
#

plz delete, post in sqfbin.com and post link (or forum link, yes)

winter rose
#

you deleted /*, but not */ ? there is your error

lapis ivy
#

Can you make it work? I don’t understand how. I deleted everything, even there is the same script of version 9, this version 11 with a changed interface. I even copied and installed at version 11 from version 9, but still the script refuses to work and gives an error.

winter rose
#

it would help if we had the actual error

lapis ivy
#

After changing the script, it throws an error stating that the script was not found.

cosmic lichen
#

Well, than a path in wrong or you renamed something.

#

That has nothing to do with the code of the script.

lapis ivy
#

As soon as I redo it, it gives an error. If you don’t touch it, everything works fine. But there is one thing but, I need that this part, which is located in the "/ *", should work, but not be disabled.

shadow umbra
#

hello my preties

#

on the wikipedia it says its more performance friendly if you don't pass anything to a function
but does that mean that
[] spawn function
is more optimized than
spawn function

or will it make no difference

still forum
#

uh

#

one works, and the other is a script error and won't execute your code

#

so yes, there is a difference

#

also where on wiki does it say that?

cosmic lichen
#

spawn is also more performance friendly if you don't execute something within it 😄

shadow umbra
#

I meant call

#

but under the call section

#

but would [] call {}
be quicker than call {}
So i'm wondering if i could optimize my scenario by removing all the empty arrays

still forum
#

if you don't need to pass parameters with call, then ofc it doesn't make sense to pass parameters

#

no [] call { is slower than call {

shadow umbra
#

does an empty array count as passing parameters?

#

ok

#

thanks

still forum
#

I don't see why you would pass parameters if you don't need any

#

yes, an empty array as parameter is also a parameter

mighty vector
#

...is there something like "current player index" that returns index position the current player has in allplayers?

#

allPlayers[this]

#

xD

still forum
#

allPlayers find player

#

but allPlayers ordering is not guaranteed afaik

#

every player could have a different ordered array

shadow umbra
#

I just ended up passing an empty array all the time because thats how they do it on the AsYetUntitled framework, just empty arrays being passed everywhere, and that got me into the habit of doing

#

Also I believe allPlayers is listed in the order that they joined, but that is not reliable enough to base off of in practice

mighty vector
#

remoteexec requires CfgRemoteExec and i prefer to avoid that

#

on the other hand, find player implies a O(n) algorithm

still forum
#

remoteexec requires CfgRemoteExec
no, by default everything is allowed

mighty vector
#

and O(1) would be wornderful

still forum
#

unless you have a CfgRemoteExec already, that forbids it

#

I'm quite confident you are overcomplicating your thing alot.

mighty vector
#

lol

still forum
#

so, as I said before why not playerUID?

#

why is that not an option

#

or ownerID

#

you can also setVariable onto the player object from the server, with public flag and give ID that way

#

instead of my remoteExec setVariable

mighty vector
#

hence, each time a user disconnect i would need to loop again

#

or i will end with gaps xD

cosmic lichen
#

Maybe tell us what you actually want to do?

still forum
#

have a marker for each player

mighty vector
#

print a line for each player(including serverm and hc)

#

to display fps and other info

cosmic lichen
#

Why would you need the position of the player in allPlayers then

mighty vector
#

to my surprise, liberation script is quite buggy

still forum
#

You'll need remoteExec for fps anyway

#

the server doesn't know the fps of other clients, you have to grab it

mighty vector
#

unless i run global and each player invoke setMarkerText

#

with a position/line

#

ç

#

(this is similar on how liberation does it)

cosmic lichen
#

Why not run the script locally?

still forum
#

Ugh, Whatever. I have you multiple solutions that work just fine. Have fun

bright flume
#

ding.

mighty vector
#

you gave a few, but they doesnt look efficient

#

looping all players each second to remoteexec -> O(n)

bright flume
#

listen Dedmen wouldnt be telling ya bs. nor would any other non white named player in here... suggest you take their suggestions seriously.

cosmic lichen
#

If you look for efficiency then don't even print fps and stuff on screen.

still forum
#

If you know better solutions, why not just take them instead of asking here

bright flume
#

exactly revo that action alone is the anti-thesis of perf.

still forum
#

looping all players each second to remoteexec -> O(n)
That actually is none of my ideas.

mighty vector
#

mmm...another aproach:
global array of players[uid], each client writes his result to that array, server loops on array and prints.

#

but O(n) for printing

mighty vector
#

...what about clientOwner?

#

that could probably do the trick...

meager zodiac
#

I've spawned a group of squad replacement units as cargo into a spawned crewed truck using moveincargo. I then create a waypoint move and the truck moves with the assigned units to a marker. On arrival at the WP I then do an unassignvehicle for each unit in the group and the units get out. However they keep getting back in the truck , then out again then back in. How best do I ensure that the units get out and stay out on reaching the WP? Note that the vehicle crew are a separate group. Its the squad replacements that are assigned as cargo that keep getting in and out at their destination.

still forum
#

...what about clientOwner?
I told you that a couple hours ago

#

but you just ignored me

dreamy kestrel
#

help my P drive contents appears to have vanished. not sure if this was to do with development A3 tools instead of release version?

#

this seems like the right track, if I edit the Tools settings.ini? whatever happened with that, seems to have either replaced the old one? or was not properly setup somehow.

young current
#

wrong channel.

#

but also what on earth are you doing

#

use PMC wiki tools and P drive setup guides

mighty vector
#

@still forum i didnt see you mentioned clientOwner...perhaps to another folk 😉 nevermind, im testing that atm

cosmic lichen
surreal peak
#

exposed

mighty vector
#

Didnt notice. my bad

coral mesa
#

Does anyone have any experience with grad-persistence?

#

having trouble with something related to saving

serene timber
#

Hello

#

If anyone is still around i need some help. So i want to make the script of the USS Freedom Deck Crew that launches you. I tried searching everywhere and i found nothing at the end. So if anyone knows how to do this and is willing to help, thank you. I just really want this to work. (Trying to make the crew launch you off the Freedom like in the showcase) I'm terrible at scripting, that's why i asked for help.

spring vigil
#

Is there a scripting command that makes visible zone . ie like a trigger but will show in game where I can adjust the size/shape

harsh vine
#

@spring vigil do u mean makers??

spring vigil
#

Im looking for a 100mx100m visible box . maybe a marker my google skills are lacking today

#

think PubG

harsh vine
#

its in already in the editor just click on marker (f6) then areas

#

oh i see ...so u want it to keep updating?

spring vigil
#

we have a marker on the map, I wanted to have the players be able to see it in 3d space so they know if they are in the zone or not

#

i dont think drawIcon3D is what im looking for

acoustic abyss
#

Hey @serene timber ! @dense tendon might have some tips about carrier launchers.

#

Hey everyone,

Before asking the next question, I give feedback on my last one (how wide can a briefing picture be?). Turns out that, regardless of resolution or .paa filetype, the maximum width is 360 pixels. Appreciate the inputs.

Now another question: I'm dropping off my players with a helicopter. For effect, I'd like the sound to start completely mute, except for the music.

Problem is that although fadeSound ( 0 fadeSound 0; 30 fadeSound 1; ) is affecting the weather and engine sounds, it doesn't change the volume of the helicopter rotors. Is there a different command I should be using? Or another way to remove the rotor sounds?

harsh vine
#

well maybe its possible but i have never seen that 🤞

sacred slate
#

why isn't this working? ```sqf
DIK_RWIN 0xDC /* Right Windows key */ = (findDisplay 46) displayAddEventHandler ["KeyDown","_mjk_scripts\mjk\mjk_jeep.sqf"];

#

the script path is in the arma 3 root folder and reachable for me

bright flume
#

leading \ ? and where/how you running that? debug console? mission coded?

jade abyss
sacred slate
#

syncholic, i have some stuff in my root folder, i add it via: player addaction ["Jeep","_mjk_scripts\mjk\mjk_jeep.sqf"];

#

at least that works, dunno if its correctly formated.

#

there are some slashes missing wtf

#

player addaction ["Jeep","_mjk_scripts\mjk\mjk_jeep.sqf"];

bright flume
#

yeah thought maybe the leading / was the issue but wasnt it

sacred slate
#

ok they get removed by discord

jade abyss
#

```sqf
code
```

code
sacred slate
#

i thouht i need the leading trail to be able to reach my script at arma.exe level

bright flume
#

use triple ` for blocks. and a single for one liners.

jade abyss
#

nope, it needs a function to execute the code

sacred slate
#

well yeah, this example works `player addaction ["Jeep","_mjk_scripts\mjk\mjk_jeep.sqf"];

#

damn 😄

#

ok

#
player addaction ["Jeep","\_mjk\_scripts\mjk\mjk_jeep.sqf"];
#

is this wrong?

jade abyss
#

Regarding Keyhandler:
Best way, is stuff like that:

My_fnc_JeepSomething = compile preprocessFileLineNumbers "\_mjk\_scripts\mjk\mjk_jeep.sqf"; //To make the function final -> just exchange "compile" with "compileFinal", so it can't be edited/changed during the mission.
my_fnc_KeyHandler =
{
  //insert the codestuff from the example here.
  //Instead of systemchat bla -> call/spawn My_fnc_JeepSomething;
};
MyKeyHandlerIDisStoredInThisVar = (findDisplay 46) displayAddEventHandler ["KeyDown","_this call my_fnc_KeyHandler;"];
#

+addAction supports calling files, wich is okay.

sacred slate
#

thx

whole plinth
#

Trying to get a list of markers cords without having to go to each one and copy each cord down.Is their a simpler way to do that?Would really appreciate it if someone could help me with this.

jade abyss
cosmic lichen
#

What's the best way to convert sqf "[""test"",0,WEST]" back to an array without touching the side?

#

call compile does execute the side command and parseSimpleArray does not support sides.

still forum
#

what do you mean? executing the side command is fine because west returns west?
or do you want it as string or what?

cosmic lichen
#

I would need it as string, as call compile would return ["test",0,WEST]where WEST is a variable, not a string.

still forum
#

I'd say use stringReplace to replace WEST with "WEST" and then parseSimpleArray. but stringReplace is not a thing yet.
you could use the cba function for it

cosmic lichen
#

Thanks, gonna check that out

dusky pier
#

is possible to get all items from uniforms, backpacks and vests from container?

still forum
#

yes

dusky pier
coral mesa
#

Does anyone have any experience with inidb2?

#

Having issues with it where it used to save vehicles to the database in the mission i'm using but 6 months later it dosn't save any vehicle data

#

but is still saving character data just fine

modest temple
#

in the description```
onLoadName = "TOB ZGM Template Mission";
briefingName = "TOB ZGM Template Mission";

respawnTemplatesVirtual[] = {};

cba_settings_hasSettingsFile = 0;

/*
class CfgMusic
{
tracks[] = {};
class stalker
{
name = "stalker";
sound[] = {"stalker.ogg", db+0, 1.0};

};

};

*/

in activation of a trigger

!alive trg

in the trigger 

playMusic "stalker"

What am i doing wrong?
#

no error message , it just doesn't play

winter rose
#

it's commented out

#

better seen with syntaxic color:

onLoadName = "TOB ZGM Template Mission";
briefingName = "TOB ZGM Template Mission";

respawnTemplatesVirtual[] = {};

cba_settings_hasSettingsFile = 0;

/*
class CfgMusic
{
    tracks[] = {};
    class stalker
    {
        name = "stalker";
        sound[]    = {"stalker.ogg", db+0, 1.0};
        
    };
};

*/
``` @modest temple
modest temple
#

ah

#

fuq

#

thanks

mighty vector
#

Hi.

Why running this on server:

myVar = 1;  
publicVariable "myVar";  

while { myVar = 1 } do {  
 diag_log format ["in: %1", myVar]; 
 sleep 1;  
};  
diag_log format ["out: %1", myVar];

results in:

17:34:05 Error in expression <ublicVariable "myVar";

while { myVar = 1 } do {
 diag_log format ["in: %1">
17:34:05   Error position: <= 1 } do {
 diag_log format ["in: %1">
17:34:05   Error Generic error in expression
17:34:05 "out: 1"
Setting invalid pitch 0.0000 for L Alpha 1-2:1 REMOTE

?

still forum
#

your while condition is invalid

#

you compare variables with ==

mighty vector
#

oks

mighty vector
#

Can I add a disconnect handler for new players at runtime?
ie: from debug console, run on server the following:

addMissionEventHandler ["PlayerDisconnected",
{
    diag_log...
}];

?

still forum
#

yes

old adder
#

For better preformance, If I have 3 functions and all of them have 3 of the same lines of code in the end, would it be better to create another function and call it instead? Or does it not matter since the functions only run when called?

still forum
#

the functions only run when called

#

duplicate code is just duplicate code. the usual rules apply. duplicate code is generally bad but not for performance

old adder
#

ty

devout brook
#

@winter rose
I had placed an ALiVE Player Multispawn module down to look at it and never deleted it. That's why my respawn wasnt working.
The tl;dr of that whole thing was me being an idiot.

winter rose
#

@devout brook oh ok! Glad you sorted it out 🙂

devout brook
exotic flax
#

It's all the information needed... name of file, when it's called, and which parameters are send to it... Not sure what else is to tell about it 🤔

#

Personally I prefer the Respawn Event Handler, although that doesn't have respawn settings in the params (although usually also not needed).

devout brook
#

Is there documentation for that?

#

I was expecting to have to write out what was to happen when the player respawned

exotic flax
#

again, very limited but enough to know when and how it triggers

#

in short; when a player respawns, the script/EH gets triggered and the code you place there gets executed

devout brook
#

I'm not super familiar with the syntax here -- where is "there"? And where would this go?

exotic flax
#

"there" is in the onPlayerRespawn.sqf file (part of mission), or within the event handler (either in mission or mod scripts).

devout brook
#

Hmm okay

exotic flax
#

some basic understanding of programming is needed before diving into Arma, and the wiki is probably the best source of information you can get.

devout brook
#

I've got a bit 😛

dull bridge
#

hi folks

foggy hedge
#

Having some trouble with create marker, what's the syntax for using it to place a new marker at location of old one?

#

Current code (in trigger):

#

_markerstr = createMarker ["BLU_Airfield", 2160, 5610];
_markerstr setMarkerShape "b_hq";
deleteMarker "IND_Base";
hint "The airfield is now available for BLUFOR use and man/vehicle spawner has been setup at the flag's location!";

#

I want to create the marker w/ variable name "BLU_Airfield" at either the position of marker "IND_Base" or failing that, at 2160, 5610

#

Neither way works, not the # of expected arguements

copper raven
foggy hedge
#

@copper raven Can I use "createMarker ["BLU_Airfield", position IND_Base]"? If so, should I have quotation marks around IND_Base? And if not, how can I use getMarkerPos within the createMarker line?

#

While we're at it, should I add "Server Only" to my triggers that are triggered by radio codes? they're used for playing music and grouping units if players want to be in the same group

#

Nvm the groups, gonna try to add dynamic groups

exotic flax
#

the second parameter is an array or object... so

// use position to get location
createMarker ["marker_name", position player];
// use position array
createMarker ["marker_name", [123, 456]];
foggy hedge
#

Oh ok, thanks

#

Learning a lot these past couple of days

exotic flax
#

it's written out on the wiki...

rustic plover
#

Is fovTop param constantly equal to 0.75 on all (hardware) displays?

copper raven
#

no, user can change them if he wants to

rustic plover
#

I mean without user's changing

foggy hedge
#

@exotic flax Actually, none of the examples mention using a set location in the world as an array. They're all "position player" which was not what I was looking for

copper raven
exotic flax
#

position: Array or Object - format position: Position2D, PositionAGL or Object (object's PositionWorld is used)

copper raven
#

@foggy hedge position takes location or object, it doesn't take any strings

#

use getMarkerPos if you want to get position of a marker, getMarkerPos "my_marker"

foggy hedge
#

Ok and thanks for the help, new to scripting and some terms fly over my head

exotic flax
#

@rustic plover

The engine default value for fovTop is 0.75 in case it is needed to calculate difference with custom FOV.
So it's not a constant, just a default

rustic plover
#

It's default on all displays? Cause some people send me fov's params and fovTop is not 0.75. They are say that it's without any changes

exotic flax
#

It should be default on all displays, and only fovLeft should change based on the screen resolution (afaik)

dusky pier
#

is possible to prevent put item to container?

#

but it working when item is already in container

#

i try'ed make a rule - when on uniform, vest or backpack items or magazines - player can't put them on the ground\container

sand nest
#

So im brand new to this whole thing and dont know how it really works

#

//initPlayerLocal.sqf
TAG_fnc_captiveCheck = {
params ["_unit"];
_unit setCaptive true;

waitUntil {currentWeapon _unit != ""};

_unit setCaptive false;
{_x reveal [_unit,4]} forEach (_unit nearEntities 25);

};

player spawn TAG_fnc_captiveCheck;

#

im trying to get this to work in game

tough abyss
#
//--- Took a weapon - turn into enemy
player addeventhandler [
    "Take",
    {
        if (primaryweapon player != "" || secondaryweapon player != "" || handgunweapon player != "") then {
            unit1 setCaptive false;
            bis_hasWeapon = true;
            bis_isTarget = true;
            terminate bis_isTargetTimeout;
            };
    }
];

//--- Dropped the weapon - turn back to civilian, unless he killed someone
player addeventhandler [
    "Put",
    {
        if (alive player && bis_hasWeapon && {!(primaryweapon player != "" || secondaryweapon player != "" || handgunweapon player != "")}) then {

            bis_hasWeapon = false;
            unit1 setCaptive true;
            };
    }
];````
exotic flax
#

@sand nest try

[player] call TAG_fnc_captiveCheck;
sand nest
#

@exotic flax what exactly do i do with that like im very new at this, I got COS to work with dumb luck but cant get this one

tough abyss
#

How to define the player without giving him an name, when the player is blufor and enemy opfor! I use it now so that i give the player an name and put "this setCaptive true " in the init. field?

sand nest
#

the script that i have seems to be fine but (if not then idk) but how do i make an init for it to work in game

#

okay so i see what you changed its the lats text right

exotic flax
#

@tough abyss all players can be accessed through player and checked by isPlayer _unit (along with a lot of other functions to find and check players).

#

@sand nest the code you posted even has a filename in the comments... so make that file, put it in your mission and it should work

tough abyss
#

I had change "unit1" to "_unit" , without giving an name and did`nt put the code in the init., but this did´nt works!

exotic flax
#

both the Take and Put EH's have parameters which you can access (including the unit)

sand nest
#

@exotic flax So odd question bc i have no idea, So the code makes it so when not shot or having a weapon out they don't shoot what about once they are shot does it make only the people around hostile or all oppfor hostile on sight now? (sorry for all of these bothersome questions I'm just trying to learn

exotic flax
#

it will make the enemy doesn't see you as an enemy the moment you don't hold a weapon in your hands

sand nest
#

so i changed what you said then do i make a game logic and just put the samw thing in it?

exotic flax
#

first line of what you posted: // initPlayerLocal.sqf
meaning it should be in that file, which is part of a mission

sand nest
#

// initPlayerLocal.sqf

#

so i put this in the game logic?

still forum
#

🙃

exotic flax
#

meaning it should be in that file, which is part of a mission

tough abyss
#

Thanks get it now to work

#
player  setCaptive true;

//--- Took a weapon - turn into enemy

player addeventhandler [
    "Take", 
    {   params ["_unit"];
         _unit  = player;
        
        if (primaryweapon player != "" || secondaryweapon player != "" || handgunweapon player != "") then {
            player setCaptive false;
            bis_hasWeapon = true;
            bis_isTarget = true;
            terminate bis_isTargetTimeout;
            };
    }
];

//--- Dropped the weapon - turn back to civilian, unless he killed someone
player addeventhandler [
    "Put",
    { params ["_unit"];
     _unit  = player;
        if (alive player && bis_hasWeapon && {!(primaryweapon player != "" || secondaryweapon player != "" || handgunweapon player != "")}) then {

            bis_hasWeapon = false;
            player setCaptive true;
            };
    }
];
rotund hatch
#

I got a Bootstrap mod in my server because I want to run/setup something in the preinit. My mod Config.cpp it's ```class CfgPatches {
class DEF.Bootstrap {
units[] = {};
weapons[] = {};
requiredVersion = 1.0;
requiredAddons[] = {};
};
};

class CfgFunctions {
class PreInit {
preInit = 1;
};
};

#

And Inside the mod I got a fn_PreInit.sqf with some code that could be replaced by a

#
diag_log "## INITIALIZING DEFROCKED'S FRAMEWORK ##";
diag_log "########################################";```
#

For example

#

This script is not running when the mod get's loaded and neither in the preInit, does anyone know why is this happening?

crude vigil
#

Are you checking this when main menu is loaded or when you start a game?

rotund hatch
#

Hmn no, because it'a server-sided mod

#

That mod it's only in the server and it's objective it's to run a script server-side

crude vigil
#

Ok, my bad I missed that part.

rotund hatch
#

I didn't say that, you don't missed anything xd

crude vigil
#

I just wondered if u mixed preInit with preStart, but I dont know how they work in the case of dedicated server.

rotund hatch
#

Is there a way of running a script on the mod init?

#

The point of this is that I don't want any trace on the mission files because If the Kernel files are leaked I am fucked

#

So I just need to run a script in the mod on the load

bright flume
#

anyone possibly have a script or proper settings to script into a smoke module/generator to create ground effect smoke? Ive tried for few days now I just cant get it to look right so figured I'd ask if someone maybe knew some trick or had code/settings laying around that might help out. thanks ahead of time if anyone does.

viscid crescent
#

is there any way to get the number of player slots from the server config from a script?

mortal wigeon
#

Is there any limit (or other considerations) to the total number of missionNameSpace variables you can create?

#

Thinking in terms of tens of thousands

bright flume
winter rose
#

@bright flume unrelated
@mortal wigeon… why?

winter rose
#

@bright flume no I think he means "how many public variables" 🙂

#

It's me who didn't make the connection 😅 my bad!

viscid crescent
#

ye that's the wrong slot number, i want the server.cfg one, not the mission one, oh well

#

funny how you can get that outside of arma but not in the scripts :P

mortal wigeon
#

@winter rose I'm drawing 100m^2 rectangles all over a 16000m^2 map for a frontline visualization script. That creates 25,600 markers.

I did some performance testing. It takes ~1s to create variables for all those points. So I don't think total variable numbers is a problem. However it takes 130s to create all the markers as well.

What's interesting is that the first 10-15k markers are created very fast, but it continuously slows down so that by the end it's creating markers at a fraction of the original speed.

#

The majority of that 130s is in the last third of the map.

winter rose
#

I believe it has to do with the full list of markers, the more you add the more the game has to check if such a name already exists in the already existing ones, hence increasing the process

Buuut 25600 markers is a bit too much, innit? 😅

still forum
#

@mortal wigeon no limit Maybe int32 max

bright flume
#

re: stringvars sounds like an 'acid test' situation....
@viscid crescent why I said think thats close as you can get. sadly actual slots can be higher then actual server cfg'd max players... Im still digging

mortal wigeon
#

Testing in seconds:

Create variables only: 0.8
Create variables & markers: 40.2
create variables, markers, and give markers standard attributes: 135.4
#

I don't particularly want 25600 markers, but I don't know how else to color over the map with a decent resolution

#

in realtime

#
    for "_horiz" from JST_size to JST_mapSize step JST_gridSize do
    {
        for "_vert" from JST_size to JST_mapSize step JST_gridSize do
        {
            // this code block is "inside" each square, _pos being dead center of square
            private _pos = [_horiz, _vert, 0];
            private _posStr = _pos joinString "_";
            missionNameSpace setVariable [("JST_FL_" + _posStr), createMarker [format ["JST_FL_%1", _posStr], _pos]];
            private _mkr = missionNameSpace getVariable [("JST_FL_" + _posStr), objNull];
            _mkr setMarkerColor "COLORWEST";
            _mkr setMarkerAlpha JST_FL_alpha;
            _mkr setMarkerShape "RECTANGLE";
            _mkr setMarkerSize [JST_size, JST_size];
            // debut time testing:
            if (((_pos select 0) > 15300) and !(JST_limitReached)) then
            {
                JST_limitReached = true;
                JST_currentDiagTime = diag_tickTime;
                JST_timeElapsed = JST_currentDiagTime - JST_diagTime;
                systemChat format ["%1 elapsed to limit", JST_timeElapsed];
            };
        };
    };
bright flume
#

how 'small' is a one of these squares? o.O

mortal wigeon
#

100m^2

#

I suppose the upside is I only have to do it once, then updating a specific existing marker is much faster

#

I don't need to manipulate the entire map at once

bright flume
#

prob dont even need that just virtualize the positions and spawn the marker on demand when you need to update it? use a exclusion ideal, only use what you have to change. dont think ya gonna be happy coloring every 100m grid block.

mortal wigeon
#

I'm coloring the whole map based on who controls the territory, so it all needs to be drawn at least once. Then I update sections as territory changes hands.

bright flume
#

could just look at how alive, KP and many other insurgency type mods do it... what you describing has been done already. just not a fan on of a global blanket method not in a MP setting.

#

not saying ya wrong either just not view of looking at programing something like that. unless you got live entities in every grid, they all arent controlled... if you needed some thing more broad use a larger grid. like 300m or 1/2km?

mortal wigeon
bright flume
#

well okay thats easier. is this gonna be a 'fixed shape' that I would do something with a overlay on the map itself ignore the radar.

#

sounds like you looking more more of a live front line take over as you progress... maybe use lines and draw out a polygon map markers on map? ie use some kind of outline vs 'fill' ? then you can just update the position of the lines end points

mortal wigeon
#

yeah I want to update the map as the mission progresses. not using fill is an interesting idea. I would have to figure out how to do geometric drawing which sounds mathematically hard

bright flume
#

no use the line drawing tool I think you can call that from code it just has two points you can use. also you dont gotta update everything only the individual lines that make up that small part of the poly you need to change.

#

lemme dig

mortal wigeon
#

the challenge I think would be I'd need a way to dynamically create new lines if e.g. there's a pocket of enemy behind friendly front lines

#

i'd need to calculate if a position is inside the existing lines

bright flume
#

small pocket you could make it really stand out and use the poly ones which I think have fill effects would work nicely for pockets.

#

actually hell I didnt even know there is draw triangle? where that come from?

#

even that isnt likely a best solution apparently can kill frame rate.. dunno ya got a good idea/question just implemention dunno...

mortal wigeon
#

wow I have 3000hrs in Arma and I didn't even know you could draw a polygon

bright flume
#

I had no f'n clue Im at 8k

#

why I was no joke... 🤯 cuz I already know the math to make simple n-sided polys not even needing the drawPolygon part I could do it with the core square and now knowing of triangles would let me easy make like any poly <= 8 sides

tough abyss
#

Hey, so I'm trying to make a CBA_fnc_registerChatCommand call that gives the command to specific players that aren't necessarily the admin. How would I do this? I'm willing to use another function that's not CBA to accomplish this if needed

still forum
#

specific player how?

#

slot, steam uid?

solar abyss
#

if (hasInterface) then {

_spawn_pos = ["respawn_west", "respawn_west_1", "respawn_west_2", "respawn_west_3", "respawn_west_4", "respawn_west_5", "respawn_west_6", "respawn_west_7", "respawn_west_8", "respawn_west_9", "respawn_west_10", "respawn_west_11", "respawn_west_12", "respawn_west_13", "respawn_west_14", "respawn_west_15", "respawn_west_15", "respawn_west_16", "respawn_west_17", "respawn_west_18", "respawn_west_19", "respawn_west_20", "respawn_west_21", "respawn_west_22", "respawn_west_23", "respawn_west_24", "respawn_west_25", "respawn_west_26", "respawn_west_27", "respawn_west_28", "respawn_west_29",, "respawn_west_30"] call BIS_fnc_selectRandom;
waitUntil {!isnull player};
player setPos (getMarkerPos _spawn_pos);
};

#

is this correct for random spawn points?

still forum
#

BIS_fnc_selectRandom
no

#

but close enough

solar abyss
#

also for the point names do i use the variable name?

still forum
#

no

#

markers are strings

solar abyss
#

so what do i put for that section

still forum
#

see wiki page i linked

solar abyss
#

i am

#

not really understanding it

#

im trying to set up random respawn points on death

still forum
#

_spawnPos = selectRandom [...]

solar abyss
#

ok, so how do i then have it select the spawn markers i have?

#

is it the variable name then or do i need to find another field to base the agrument off of

still forum
#

you write them down

#

like you did above

solar abyss
#

ok

#

so basically just change the start of the command line?

#

ok that worked

#

now how to set up initial spawn to be random?

#

got it

#

thank you so much for the help =^w^=

quick venture
#

Is there a copy/paste script to make a BLUFOR / IND Zeus only be able to edit that side/faction?

I’m good with either a BLUFOR/IND or NATO/AAF, if there is

If not a script, is there a feature somewhere?

New to scenario editing, please excuse my timidity

velvet merlin
#

whats the most efficient way to clean up dead bodies and weaponHolders - when the player is no longer close?

cosmic lichen
#

Probably the BI garbage collection @velvet merlin

velvet merlin
#

is it any good?

cosmic lichen
#

It's handled by the engine. So I'd say it's fast.

bright flume
#

believe you can tweak the settings on the built in GC question is what you consider close. misjuding distance with cleanup can be tricky keep that in mind.

unreal scroll
#

Have some issues with AI behaviour.
I spawn soldier at static weapons. The first one is the leader, and it is ok.
But all the others exit their guns and try to reach the leader.
I tried doStop + disableAI "MOVE" commands with no effect.
The gunner doesn't move if he becomes a group leader, but I don't want to change the group leader all the time the gunners are spawned, cause it can cause some inperdictable behavior for on-foot garrison soldiers.
Also I can't create a new group, as one garrison should keep only one group.
Is there any other way to make them not to exit guns/move to leader?

bright flume
#

could try making a order for that specific unit in the team to have a move cmd where the static weapon is? think some mods do add a method for statics like that I believe. try searching thru some of the eden/zeus mods.

viscid crescent
#

thx for the loadFile tip sycholic, I'm gonna try that 👍

bright flume
#

worth a shot atleast its not massive should be manageable to get the string out for what you need.

velvet merlin
#

@cosmic lichen did some reading and people reported issues (like weaponHolders and MP). however cant tell if the system is solid by now or not

cosmic lichen
#

I'd just give it a try.

silver mauve
#

@unreal scroll if you want them too stay on the weapon until they die try this


this disableAI 'PATH';

silver mauve
#

Question. To make something fly in at a specific height i would say


this flyInHeight "20";

#

correct?

runic quest
#

how to Use "if" to judge whether the variable is a string or a number?

unreal scroll
#

@silver mauve Thanks, it works 🙂

silver mauve
#

@unreal scroll Your Welcome

runic quest
#

@unreal scroll tks bro

flat elbow
#

hello, i am trying to get the list of submarine actions out of Hellenic Armed Forces mod but i'm finding unable to, i basically want the script to upper the periscope, the action is the 3rd from top (array index 2 so) but i am unable to run it in any way, any hint?

still forum
#

@unreal scroll isEqualType is the new and more efficient way to do that

jolly bone
#

Hello.
I have a mission where I assign loadouts through the player units init-field: if (isServer) then {this setUnitLoadout [loadout-array];};, this works perfectly for players joining from mission start but JIP-ing players don't receive any loadout and instead are left only with the helmet and rifle of the original unit loadout. Does anyone know what might be the cause of this? Thanks in advance.

wispy cave
#

put it in initplayerlocal.sqf

jolly bone
#

I feared that the solution would be actually require me having to put in work and implement a switch-case or something of that nature 😅 . Thanks, I'll do that.

winter rose
#

Question. To make something fly in at a specific height i would say


this flyInHeight "20";

@silver mauve 20, not "20"

silver mauve
#

ohh ok thank you

flat elbow
#

anyone have any idea for my issue?

jolly bone
#

@wispy cave That worked brillianty. 👍

unique sundial
#

@unreal scroll isEqualType is the new and more efficient way to do that
@still forum pretty old TBH

candid cape
#

Hi , I need help with an script . The script has an executor . It's this : ["generarmisionesINIT"] spawn ica_fnc_misionesLaEmpresa;

#

Where have I to put it ?

winter rose
#

in your b—… in your initServer.sqf file @candid cape

candid cape
#

Life server or Mpmission @winter rose

winter rose
gilded ferry
#

hi, i have some questions with editing the BIS_fnc_respawnBackpack script and adding it to a mission. I'm super new to scripting 😦

#

I wanted to add to the backpack script to spawn an object composition around it

#

around the tent*

#

and how I would implement that in the mission.

#

would I run a line in the init.sqf to call the function?

silver mauve
#

Can someone help me i want to make a trigger loop because im using the alarm SFX can someone help me

obsidian violet
#

Tick the repeat box

devout brook
#

When using class CfgRespawnInventory is it possible to specify where (uniform, vest, pack) the items you define show up?

silver mauve
#

@obsidian violet done that but it doesn't repeat

gilded ferry
#

another question, im editing a GF script and want to have the script equip magazines belonging to the weapon from the array. how would i go about that?

GF_ARL_secondaryWeapon_array = ["launch_NLAW_F"];
GF_ARL_handgunWeapon_array = ["hgun_ACPC2_F"];    
GF_ARL_Magazines_array = ["100Rnd_65x39_caseless_mag","16Rnd_9x21_Mag"];```
nimble raven
#

Wondering if someone could help me, looking for a script or something to limit the range which thermal goggles can be used. E.G. I want people to be able to use them to see targets 200m away but anything past that it doesnt appear on thermals?

twin steppe
#

Is there a command to turn on the AN/MPQ-105 Radar and leave it on? For some reason it's off and it doesn't actually lock on to targets. Very weird.

jade abyss
#

Wondering if someone could help me, looking for a script or something to limit the range which thermal goggles can be used. E.G. I want people to be able to use them to see targets 200m away but anything past that it doesnt appear on thermals?
@nimble raven Limit your questions to 1 channel pls, thx ( #rules - means: delete the other one)

#

Regarding your question: No, not rly possible, without some trickery like reducing the viewdistance to 200m, if they turn on/use their Thermal stuff.

winter rose
#

which would be the "only" way to do it properly, unless you want to play with hideObject for enemies (but terrain and objects would still be visible)

unreal scroll
#

There are many ATMs on Altis. Is there a way to add some actions/ACE actions to it (like "Take money")? Does it support adding actioins?

bright flume
#

there always via eden 'edit terrain object' module that lets you inject code onto them. addaction def possible.

unreal scroll
#

Thanks. I thought simple objects doesn't suport it.

spark rose
#

hey all, trying to make a counter to count the number of completed tasks, which will be used to feed a trigger

winter rose
#

terrain objects are not (all) simple objects @unreal scroll

spark rose
#

tried just using the onActivation block of the flag which sets tasks to completed to read taskscore = (taskscore +1) with taskscore = 0 in the missions init.sqf. But this hasn't worked

#

using a trigger with taskscore == 2; as the condition to give a hint "trigger is working"

#

but no worky... 😦

#

anybody?

winter rose
#

do you use -showScriptErrors, and did you have any?

spark rose
#

Lou - I have not. How would I use it?

#

is it a cmd line argument?

winter rose
#

it is a checkbox in the launcher

#

maybe in advanced, "Show script errors"

bright flume
#

wtb copy to clipboard option on that text popup kind alike how you got the option to dismiss missing cfg messages one/all

winter rose
#

wtb…? gib $$?

bright flume
#

someone did that I'd drop a Grant on them.

winter rose
#

a grand* and Dedmen does it :p

spark rose
#

thanks Lou

bright flume
#

wtb == want to buy. GRANT as in president. 😛

spark rose
#

I'll let you know

winter rose
#

@bright flume I got "grant" as subvention, but I think a grand is a good thing for the dev too 😄

bright flume
#

I got $ not like that though to just throw at something. rather build a new 3800 AMD rig with that.. I'll stop here kinda off topic. 🙂 but yeah a copytoclipboard on that message would be sweet. (that or just flat out not cut off full error messages would be nice)

spark rose
#

Lou, doesn't return any script errors. Just doesn't work.

winter rose
#

place your variable ZAP_TaskScore in the initServer.sqf (create the file if needed)

where the task is activated, use ZAP_TaskScore = ZAP_TaskScore+1;
if it is a trigger, make it Server only, no need to do that on clients too

#

@spark rose

#

and of course, condition to ZAP_TaskScore == 2

spark rose
#

works now. thanks Lou

#

you the man!

solemn lichen
#

does anyone know how to increase loot in the Ravage mod.

#

for better loot and guns

winter rose
#

Better ask on the Ravage Discord I think

viral basin
#

Is it possible to get the exact 3DEN Editor Position of an object?

Currently i've got an object with following 3DEN Position values:
[3593.180,13384.058,0.062]

But getPosWorld returns:
[3593.18,13384.1,5.20777]

For me the Y value is the most important one, but its imprecise ...

ruby breach
#

Though you can't pull that outside of the Editor workspace

viral basin
#

yeah i also tried that but it returns [3593.18,13384.1,0.0615325] 😄 so the Z value is very precise but the other values are still rounded

winter rose
#

@viral basin getPosWorld and getPosATL are different

viral basin
#

yes i know, the Z value is not the problem. its the Y value. i tried every getpos command even the ModelToWorld and Visual ones, there is none which gives the position with the exact same values of the 3den editor position. :/

still forum
#

is 4.2cm difference really that important?

#

I don't even know if you can move by such small steps in arma

viral basin
#

yes it is 😄 we placed some objects in a house and after exporting they moved into the wall

still forum
#

they move 5cm into the wall?

viral basin
#

paintings on the wall, yes

still forum
#

are you getPos'ing them inside 3den?

#

or in preview

viral basin
#

yes inside 3den

still forum
#

have you tried the copy position thing from 3den enhanced?

viral basin
#

not yet, is that a mod? the main thing is that i wrote a little script which exports the placed objects in sqf - with a little less information than the official sqf export does.

young current
#

use E2TB

#

the official export does not do rotations correctly

#

in short 3DEN is not proper terrain making tool. But with enough hacks it works.

#

Also some objects, if they are not done correctly have different center points in game and TB

#

@viral basin try E2TB out though

#

Or use PLOPPER

#

thats the latest tool for in game placement

viral basin
#

okay i will look into these 2, thanks in advance

velvet merlin
#

is there a reliable way to detect if a player is in a cutscene (camCreate) via sqf?

winter rose
#

maybe cameraOn

viral basin
#

I managed to find a way to get more precise Position Values. i just added toFixed 4 at the top of the script. 🙂

unreal scroll
#

Need some advice.
There is a event which is called on some conditions (i.e., one code for loosing battle, and another for winning it).
The process look like:

  1. Starting the battle via calling the fnc_NATOCounterTown function. It holds the code that must be executed on the battle end, and call another function for battle, passing this code as arguments.
  2. On battle end, an appropriate code is called.
    The example of called code:
    params ["_tskid","_town"];
    somecodehere
    };```
And calling the battle script with:
```[_atwin,_atloose] remoteExec ["OT_fnc_NATOQRF",2];```
Then, after the battle ends, on appropriate conditions:
```_someparams call _success (passed code in _atwin);```


But there is a persistent error in log, saying about local variables in a global namespace, pointing at that line: ```params ["_tskid","_town"];```
How to correctly pass _atwin code to OT_fnc_NATOQRF function?
crisp cairn
#

Hello all, I was hoping you can solve a query off mine. Simply I want to use a variable e.g. _i in an array like this _myArray[_i] to use that position in a variable. How do I go about doing this?

surreal peak
#
_myArray select _i;
spark rose
#

Hey all. I'm trying to spawn groups (1 of 6) on a trigger with switch do, but can't get it to work. The script gives no errors, but nothing happens except the trigger hint.

#

I liberated the code from a kindly soul online.

#

not sure how to post it in a nice format

#
_RandCorp = floor (random 6);
switch (_RandCorp) do {
case 0: {
_grup1 = [SafePos2, EAST, (configfile >> "CfgGroups" >> "East" >> "OPF_T_F" >> "Mechanized" >> "O_T_MechInf_AT"")] call BIS_fnc_spawnGroup;
_wp1 = _grup1 addWaypoint [position player, 0]; 
_wp1 setWaypointType "SAD";
};
case 1: {
_grup1 = [SafePos2, EAST, (configfile >> "CfgGroups" >> "East" >> "OPF_T_F" >> "Motorized_MTP" >> "O_T_MotInf_Team"")] call BIS_fnc_spawnGroup;
_wp1 = _grup1 addWaypoint [position player, 0]; 
_wp1 setWaypointType "SAD";};
case 2: {
_grup1 = [SafePos2, EAST, (configfile >> "CfgGroups" >> "East" >> "OPF_T_F" >> "Motorized_MTP" >> "O_T_MotInf_GMGTeam"")] call BIS_fnc_spawnGroup;
_wp1 = _grup1 addWaypoint [position player, 0]; 
_wp1 setWaypointType "SAD";
};
case 3: {
_grup1 = [SafePos2, EAST, (configfile >> "CfgGroups" >> "East" >> "OPF_T_F" >> "Mechanized" >> "O_T_MechInf_Support")] call BIS_fnc_spawnGroup;
_wp1 = _grup1 addWaypoint [position player, 0]; 
_wp1 setWaypointType "SAD";
};
case 4: {
_grup1 = [SafePos2, EAST, (configfile >> "CfgGroups" >> "East" >> "OPF_T_F" >> "Armored" >> "O_T_TankSection")] call BIS_fnc_spawnGroup;
_wp1 = _grup1 addWaypoint [position player, 0]; 
_wp1 setWaypointType "SAD";
};
case 5: {
_grup1 = [SafePos2, EAST, (configfile >> "CfgGroups" >> "East" >> "OPF_T_F" >> "Motorized_MTP" >> "O_T_MotInf_Reinforcements")] call BIS_fnc_spawnGroup;
_wp1 = _grup1 addWaypoint [position player, 0]; 
_wp1 setWaypointType "SAD";
};
default { hint "default" };
};```
ruby breach
#

Have you tried putting this into anything that shows syntax highlighting at all?

#

Because that gives a huge hint ("" != ")

runic quest
#

if(getPosATL player isEqualTo [438.765,8220.86,0.00140715]) then{hint"123123";}else{hint"1231231231"}; getPosATL =[438.765,8220.86,0.00140715] why not work?

wicked merlin
#

What code and where do you call initPlayerLocal.sqf, initPlayerServer.sqf, and initServer.sqf? I'm trying to setup whitelisting for certain roles, it works in editor but not on dedicated. Any ideas? I have already checked out the available resources for knowledge, I'm just not understanding how those files are supposed to be called

young current
#

Those sqf run automatically. Their names describe when.

wicked merlin
#

dont they need to be called in the init.sqf? as like [] execVM "initServer.sqf"? does it need to be under isDedicated or isServer or something along those lines?

#

I guess im just confused between [] call compileFinal preprocessFileLineNUmbers and [] execVM

still forum
#

@spark rose
If you get your syntax highlighting correct
```sqf
code
```
->

SafePos2 = [getPos player, 50, 100, 20, 0, 0.3, 0] call BIS_fnc_findSafePos;
_RandCorp = floor (random 6);
switch (_RandCorp) do {
case 0: {
_grup1 = [SafePos2, EAST, (configfile >> "CfgGroups" >> "East" >> "OPF_T_F" >> "Mechanized" >> "O_T_MechInf_AT"")] call BIS_fnc_spawnGroup;
_wp1 = _grup1 addWaypoint [position player, 0]; 
_wp1 setWaypointType "SAD";
};
case 1: {
_grup1 = [SafePos2, EAST, (configfile >> "CfgGroups" >> "East" >> "OPF_T_F" >> "Motorized_MTP" >> "O_T_MotInf_Team"")] call BIS_fnc_spawnGroup;
_wp1 = _grup1 addWaypoint [position player, 0]; 
_wp1 setWaypointType "SAD";};
case 2: {
_grup1 = [SafePos2, EAST, (configfile >> "CfgGroups" >> "East" >> "OPF_T_F" >> "Motorized_MTP" >> "O_T_MotInf_GMGTeam"")] call BIS_fnc_spawnGroup;
_wp1 = _grup1 addWaypoint [position player, 0]; 
_wp1 setWaypointType "SAD";
};
case 3: {
_grup1 = [SafePos2, EAST, (configfile >> "CfgGroups" >> "East" >> "OPF_T_F" >> "Mechanized" >> "O_T_MechInf_Support")] call BIS_fnc_spawnGroup;
_wp1 = _grup1 addWaypoint [position player, 0]; 
_wp1 setWaypointType "SAD";
};
case 4: {
_grup1 = [SafePos2, EAST, (configfile >> "CfgGroups" >> "East" >> "OPF_T_F" >> "Armored" >> "O_T_TankSection")] call BIS_fnc_spawnGroup;
_wp1 = _grup1 addWaypoint [position player, 0]; 
_wp1 setWaypointType "SAD";
};
case 5: {
_grup1 = [SafePos2, EAST, (configfile >> "CfgGroups" >> "East" >> "OPF_T_F" >> "Motorized_MTP" >> "O_T_MotInf_Reinforcements")] call BIS_fnc_spawnGroup;
_wp1 = _grup1 addWaypoint [position player, 0]; 
_wp1 setWaypointType "SAD";
};
default { hint "default" };
};

There, can clearly see your mistake. I recommend you use a real code editor with syntax highlighting when writing your scripts

#

@runic quest floating point

#

@wicked merlin call compileFinal is bullsh* it makes no sense, I don't know which idiot came up with that. Someone clearly thought he can be extra intelligent, and then showed how not intelligent he actually is.
call compile preprocessFileLineNumbers if you need it to be synchronous, but the init scripts are already async so I don't get why.
For a simple call once a execVM is just fine.
Really you should be using CfgFunctions for everything you execute more than once, for the rest execVM is probably sufficient

jade abyss
#

What code and where do you call initPlayerLocal.sqf, initPlayerServer.sqf, and initServer.sqf? I'm trying to setup whitelisting for certain roles, it works in editor but not on dedicated. Any ideas? I have already checked out the available resources for knowledge, I'm just not understanding how those files are supposed to be called

dont they need to be called in the init.sqf? as like [] execVM "initServer.sqf"? does it need to be under isDedicated or isServer or something along those lines?
Answering with no insults here...
@wicked merlin Just simply place them in the same folder as the mission.sqm is in. They will be executed (as Goat already said) automatically. By just add something like diag_log "initServer.sqf loaded" to it, you can check it for yourself in the .rpt files.

This said, that call compileFinal preprocessFileLineNUmbers-stuff isn't needed for init-files. For normal (your created) functions you should stick to cfgFunctions.
Although, while testing normal functions ingame, this is fine to use:

my_fnc_finalyFunctionName = compile preprocessFileLineNumbers "Path\To\file.sqf";

When done, finishing your script -> Add it to the CfgFunctions and remove or disable the code.

still forum
#

call compileFinal is absolutely useless nonsense
I know the guy above just copy pasted it from somewhere and doesn't actually understand what it does.
The problem is with whoever came up with that idea

jade abyss
#

Haven't said it would be useful ¯_(ツ)_/¯

#

Maybe it's time for a page like do's and don'ts in Arma

round scroll
#

wasn't there a page on performance and speed of certain commands, though it's probably aged by now

still forum
#

We have a optimization guide yes

round scroll
#

seems updated, cool

warm spade
#

is there a difference between 'call' and 'spawn' on how they handle parameter?
Because the second call 'ignores' the offset '32' and spawns on '_roadCenter' one meter in the air.
But when i use 'spawn' the objects spawn correctly
https://imgur.com/a/hvm8RkA

[_roadCenter, -32] call fnc_wealthy_plot;
[_roadCenter, 32] call fnc_wealthy_plot;

fnc_wealthy_plot

_road = _this select 0;
_offset = _this select 1;
_pos = getposATL _road;
_centerPos = _road modelToWorld [0,_offset,0];
_center = createVehicle ["Sign_Arrow_Large_Pink_F", _centerPos, [], 0, "NONE"];

Only this part realy matters since everything that spawns is based on '_center' and _center itself spawns above ground

i know i could fix this by checking the offset and changing to position accordingly.
But why does this happen?

still forum
#

is there a difference between 'call' and 'spawn' on how they handle parameter?
no

warm spade
#

could there be another reason why it there are two different outcomes?

winter rose
#

You are not using private on your variable, it may come from this

still forum
#

you should use params.
It can't come from that, if the code he posted is exactly the same code he's running

warm spade
#

i changed the variable from _center to _roadCenter in discord to make it more clear which one i was talking about. Turns out they conflicted in my code since both scripts had the same variable name.

#

i always assumed that underscore variables would be automatically private 😫

winter rose
#

you should use params.
😉

#
_road = _this select 0;
_offset = _this select 1;
```no

```sqf
params ["_road", "_offset"];
```yes

```sqf
params [
  ["_road", objNull, [objNull]],
  ["_offset", 0, [0]]
];
```best
warm spade
#

thanks, i have some scripts to overhaul 👍

still forum
#

and ofc private keyword everywhere where you intend "create" a new variable

lyric pasture
#

anyone ever use an aws ec2 instance to run arma?

winter rose
lyric pasture
#

where else would that fit in

winter rose
lyric pasture
#

ill ask in there 👍🏻

winter rose
#

if the command is broken, no can do?
no way I know of at least.

ornate marsh
#

i'm having some difficulties. I'm wanting a light cone (added in Contact) to attach turret, so that the light moves with the turret. I'm using this to add it to the scope Memory Point:

this attachTo [turret1,[0.026,0.035,-0.028],"otochlaven"];
this setVectorDirAndUp [[0.361,0.932,0],[0,0,1]];

it attaches, but does not move with the turret. Does anyone know why?

winter rose
#

what is "turret1"?

it attaches to the object's (selection) location, but not to the rotation @ornate marsh

ornate marsh
#

Turret1 is the turret I'm trying to add it to, it's the AI CSAT turret I'm trying to add to. Would I have to have some sort of script to constantly update the rotation then?

winter rose
#

most likely, but I can't help with 3D stuff
try maybe playing with various selection's positions difference and setPos/setVectorDirAndUp

ornate marsh
#

Ok, will do

gloomy aspen
#

Im having a bit of a brain fart today, just wanna spawn an active smoke grenade on a marker pos using add action ...

This is what ive got, although its not working atm, pretty sure its completely wrong 😆 Would appreciate any advice

this addAction ["Target 1", "_smoke = "SmokeShellRed" createVehicle (getPos pos1)];

sage dawn
#

first, you don't need the _smoke = part, it's doing nothing in this case

#

and what is pos1?

#

is it the var name of a marker?

gloomy aspen
#

Got it to work with help from @warm hedge in the Arma 3 Hub server used

this addAction ["Target 1", {_smoke = "SmokeShellRed" createVehicle (markerPos "pos1")}]

Thanks for the input @sage dawn

sage dawn
#

ah it was a marker

gloomy aspen
#

Aye mate

sage dawn
#

the _smoke = part is still not really needed there

#

it doesn't hurt but it isn't necessary either

gloomy aspen
#

Ah okay, wonder why its there, I got that part from a BI Forums thread

random loom
#

It would be useful if you'd go about expanding the script, but you aren't so it isn't necessary.

gloomy aspen
#

`this addAction ["Target 1", {_smoke = "SmokeShellRed" createVehicle (markerPos "pos_1")}];

this addAction ["Target 2", {_smoke = "SmokeShellOrange" createVehicle (markerPos "pos_2")}];

this addAction ["Target 3", {_smoke = "SmokeShellRed" createVehicle (markerPos "pos_3")}];

this addAction ["Target 4", {_smoke = "SmokeShellOrange" createVehicle (markerPos "pos_4")}];

this addAction ["Target 5", {_smoke = "SmokeShellRed" createVehicle (markerPos "pos_5")}];

this addAction ["Target 6", {_smoke = "SmokeShellOrange" createVehicle (markerPos "pos_6")}];

this addAction ["Target 7", {_smoke = "SmokeShellRed" createVehicle (markerPos "pos_7")}];

this addAction ["Target 8", {_smoke = "SmokeShellOrange" createVehicle (markerPos "pos_8")}]`

Thats the full init line on the object that gives the addaction, not sure if its useful in that context?

#

Its for teaching Target Acquisition to a milsim unit, so needed to spawn a variety of colored smokes at different markers

sage dawn
#

in that situation the _smoke would only be useful if that execution script was then also doing something else with that grenade

gloomy aspen
#

Ah that may make sense then, the original thread was for stopping the smoke once a target had been hit

faint spruce
#

Hey, was just wondering how I can make this script limited to a certain range so that people cant snipe pickup intel or stuff this addAction ["Seize",{ deletevehicle (_this select 0); hint "You've seized an item."; }];

exotic flax
#

check the parameters of addAction

faint spruce
#

figured it, thanks

ornate marsh
#

so regarding this

this attachTo [turret1,[0.026,0.035,-0.028],"otochlaven"];
this setVectorDirAndUp [[0.361,0.932,0],[0,0,1]];

The getDir/setDir doesn't work because the object itself doesn't rotate, it needs to get the direction of the barrel and not the base of the turret. So no idea on what to do

#

regarding the above point Lou made

surreal peak
#

think that might work

ornate marsh
#

i'll give it a look

viral basin
#

Hey guys is it possible to remove the hardcoded arma actions like "Open Door" etc.? or to get the ids from them?

winter rose
#

No, beside simple objects

viral basin
#

hmm okay :/

normal abyss
#

Hi, started working on a map centred RTS mode, whilst marker movement have been simple enough to create I'm wondering if anyone would possibly know of any way to select markers on the map and run an event based off of that, similarly to Vindicta?

young current
#

whats vindicta?

#

and you would need to create the logic behind such selection system

#

possibly something tied on mouseClick events

#

that checks if marker is under the cursor and then does stuff to it if it is

shadow sapphire
#

Is there a way to change the NATO symbol that's seen in high command over subordinate elements? I've got some mechanized infantry, and they show up as tanks from high command. Anyone know an easy fix?

winter rose
shadow sapphire
#

Both links are quite helpful! Thanks so much!

winter rose
#

with pleasure; I admit I was at first "hm, easy 1s google sea— wait a minute" 😄

runic quest
#

How to use code to determine whether a player is male or female?

young current
#

there is no native female charaters

#

if you have modded characters you can proabably compare the character type

#

or if you mean what gender person sits at the computer playing, then Id say there is no script for that.

runic quest
#

tks ,bro

faint fossil
#

hi so im back with my dumb questions

#

i'm doing a radio trigger like this to spawn a neo to practice shooting on

#
planething1 = [[1000, 1000, 1000], 180, "O_Plane_CAS_02_F", EAST] call bis_fnc_spawnvehicle;  
wpdataplane1 = [a very very long thing of flight data];
[(planething1 select 0), wpdataplane1] spawn BIS_fnc_Unitplay;  
(planething1 select 0) addEventHandler ["Killed", {  
 params ["_unit", "_killer", "_instigator", "_useEffects"];  
 deleteVehicle _unit;  
}]; 
#

how do i disable the ai or remove all pylon weapons? because the ai kept hardlocking my rhino with an atgm

#

and second question, is there a way to make the 120mm cannons of a rhino, per se, reload faster?

winter rose
#

… oh! A Syntax error 😋

#
private _planeData = [[1000, 1000, 1000], 180, "O_Plane_CAS_02_F", EAST] call BIS_fnc_spawnVehicle;
private _flightData = [a very very long thing of flight data];
private _plane = _planeData select 0;
  removeAllWeapons _plane;
[_plane, _flightData] spawn BIS_fnc_Unitplay;
_plane addEventHandler ["Killed", {  
  params ["_unit", "_killer", "_instigator", "_useEffects"];
  { _unit deleteVehicleCrew _x } forEach crew _unit;
  deleteVehicle _unit;  
}];
``` @faint fossil
#

you could also not use BIS_fnc_spawnVehicle and just use createVehicle and engineOn

winter rose
#

@faint fossil

meager ember
#

he won't stop pinging you until you recognize his pun

faint fossil
#

sorry i was watching youtube and its also 2 am >_>

#

but thank you so much for the help! i'll try this

young current
#

I wonder did Lou get any sleep because of that xD

faint fossil
#

and yes lol syntax error I get it hehe please end me ive heard this too many times

#

jk love you

#

what time zone is lou in?

winter rose
#

UTC+1

#

I forgot I pinged you once with the quote, and seeing you posted your issue @ 6am (for me), I pinged you to be sure you would see the reply

faint fossil
#

ah lol

#

all good

#

also it's april fools day... i just realized

#

happy april fools

winter rose
#

that does not prevent me from joking around!
at least less people will do jokes in these days

faint fossil
#

... i dont get it what is the significance of "not" and "do"

#

just spent good 30 seconds thinking

#

i might be too tired lol

winter rose
#

"I am the one who jokes here!"
I usually do bad/dad jokes, that's why

and due to lockdown, you won't suffer many jokes besides told ones

faint fossil
#

ah

#

i see lol

#

sorry to ruin your joke

#

okay that makes sense im not sure why i didnt see it the first time

#

while you're here uh... how to make cannon fire faster? e_e

#

google searches are coming up with anything i can understand

winter rose
#

which cannon?

faint fossil
#

120mm cannon of a rhino, and thank you ill read through it

#

oh jesus okay

#

big code

#

so

#

i put this in the init field of the rhino

#
this setWeaponReloadingTime [gunner (vehicle player), currentMuzzle (gunner (vehicle player)), 0.1];
#

doesnt work of course, what am i doing wrong?

#

oh so

#

according to reddit

still forum
#

vehicle player is probably not your rhino

faint fossil
#

this doesnt work for 1 shot cannons

#

oh

#

okay um i found a copy-paste solution it seems

#

not sure exactly how it works but ill post it here in case anyone needs info

#
this addEventHandler ["Fired",{
    _this select 0 setAmmo [currentMuzzle gunner (_this select 0),999];
    _this select 0 setWeaponReloadingTime [gunner (_this select 0),currentMuzzle gunner (_this select 0),.01];
}]
#

^ very fast firing vehicles

vernal sedge
#

Sorry mate. I did say my reasoning for doing so though as I am not sure if it is a "scripting" or a "GUI" issue.

#

Oke. No worries, I'll banish that message from here and watch for responses over there. Thanks.

#

Yea yup. Fully understand :))

young current
#

thanks

flat elbow
#

how can I detect when a certain action (default, not added via script) is executed? the action is on the mouse wheel and is baked-in by the mod itself

winter rose
sage dawn
#

maybe you can detect it based on what that action is doing?

#

so, detect not the act of trigger the action, but whatever triggering that action actually does

#

what kind of action is it?

rugged acorn
#

Hello everyone... I am really new (and noob) in scripting and I need some help.

Do I have to set a public variable that "contains" an object (I publicVariabled the variable so I can make changes to the object from different machines) to nil after I delete the object with deleteVehicle command or it automatically deletes the variable too? Thank you all in advance!

still forum
#

variable won't be deleted

#

it will be objNull when the object is deleted

rugged acorn
#

so I have to set it to nil and then use publicVariable again to broadcast the deletion right?

still forum
#

not sure if publicVariable broadcasts nil too

#

but yeah, you have to do something to delete the variable, if you want it gone

winter rose
#

it does, but you don't "have" to

still forum
#

but I don't see a reason why you want to delete it

rugged acorn
#

Free some memory space????

still forum
#

16 bytes.. really?

#

all the effort for that

#

don't think thats worth it

#

you waste more memory space by just having that deletion inside your script code, which is also loaded into memory

rugged acorn
#

Alright! I just thought that it is a good tactic to free as much memory as you can especially since you do not need it occupied anymore!

still forum
#

if you have hundreds of variables, with dynamically generated names that you'll never reuse, then that might be a good idea

#

but not for one, or half a dozen variables

rugged acorn
#

I believe that in a persistent environment I may have about 35-60...

still forum
#

yeah doesn't matter

rugged acorn
#

Is that too many?

still forum
#

no

#

Arma uses 4+gb of ram, most people have 16+gb stop worrying about a few kilobytes

rugged acorn
#

Plus what ALiVE and some other mods will need! But, tbh I didn't know that deletion does occupy memory! Thought that it happens (probably will use some memory for that) and after that, it empties the memory space!

#

Ok mate... Cheers. Thanks a lot for the help! 🙂

still forum
#

deletion doesn't occupy memory, the script code that does the deletion does

#

all your script code is loaded into memory, longer scripts -> more memory usage

#

if you want to save memory, write smaller scripts, strip all comments and whitespace... (Thats a joke, don't do that, its stupid)

rugged acorn
#

Scripts occupy memory when they are called right? and when they are completed they "empty" the memory space? Am I wrong here?

still forum
#

when you compile and store them in a function, they occupy memory too

#

the script code itself is stored in memory such that it can be executed. Execution itself uses more on top of that

rugged acorn
#

Alright. I believe that I got the idea! Thanks a lot @still forum ... Really appreciate the help!

winter rose
#

« Premature optimization is the root of all evil. » – Donald Knuth

#

make it work first 😉

flat elbow
#

I did this in the end:

player setVariable ["timeStarted", 0];

ringTheBell = '
    params ["_target", "_caller", "_indexOfAction", "_action", "_localizedAction", "_priority", "_showWindow", "_hideOnUse", "_shortCut", "_isMenuVisible", "_event"];
    player getVariable "timeStarted";
    if (str _target == "campanellaPercorso") then {
        if (player getVariable "timeStarted" == 0) then {
            player setVariable ["timeBegin", serverTime];
            player setVariable ["timeStarted", 1];
            hint "Run!"
        } else {
            hint format ["You took %1 seconds to do the run", serverTime - (player getVariable "timeBegin")];
        };
    };
    false
';

inGameUISetEventHandler ["Action", ringTheBell];
#

basically there's a bell the guy will ring, timer start, he do the obstacles run and ring it again in the end and it tells how much time it took

winter rose
jade abyss
#

if you want to save memory, write smaller scripts, strip all comments and whitespace... (Thats a joke, don't do that, its stupid)
@still forum Just made it a bit more obvious 😂

flat bane
#

I have just bought a server so my clan can play ops more smoothly im getting these messages in the web console
15:44:48 SteamAPI initialization failed. Steam features won't be accessible!
15:44:49 Error context {
15:44:49 ErrorMessage: File ServerRPT\server.cfg, line 59: '.': ';' encountered instead of '='
15:44:49 Application terminated intentionally
ErrorMessage: File ServerRPT\server.cfg, line 59: '.': ';' encountered instead of '='

Im getting these error messages this is what line 59 to 61 look like

// SCRIPTING ISSUES
onUserConnected = ""; // command to run when a player connects
onUserDisconnected = ""; // command to run when a player disconnects
doubleIdDetected = ""; // command to run if a player has the same ID as another player in the server

still forum
#

That's not #arma3_scripting
What the message says, you have a semicolon where a = should be. Probably right before L59

woeful sundial
#

someone knows a way to draw a polyline (the line i can draw in the map with the mouse) via script? and also get it's parameters to save it?

young current
#

I dont think there is a ready logic for such

winter rose
#

@woeful sundial there is drawPolygon, but no "free-hand drawing" though.

#

this ^ being a map-control command

flat elbow
#

you can perhalps create polygons when the map is open and the button is pressed and it would be kind of drawing i guess?

dim owl
#

Hi guys, I've come to a point where im just clueless. I want to receive data from the server. I call the function on the server with remotexeccall and my idea is, that I could set a global var on the client and wait until it's received via publicVariableClient. Would a remoteexeccall from the server to the client more efficient?

winter rose
#

wait - what do you want from the server?

flat elbow
#

assign a variable to the scope of mission/object/unit?

#

like:

player setVariable ["timeStarted", 1];
still forum
#

Would a remoteexeccall from the server to the client more efficient?
probably

dim owl
#

wait - what do you want from the server?
@winter rose
I want to retrieve informations from a database

#

probably
@still forum Is there any offical documentation on that topic?

still forum
#

the wiki

dim owl
dim owl
#

I know that link but I think it does not help me with my initial question

winter rose
#

can I ask what is the data that should be sent?
if it must be done on connection, use on player connection EH?

dim owl
#

The client sends an id which is stored in the database and the function should give me an array back with detailed information

#

This happens not on a connection but mid-game

winter rose
#

you could use remoteExec a server-side script yeah

dim owl
#

Yeah I know but what is the best way to send the data back to the client?

#

I think I have two options: 1. remoteExec back to the client and populate my dialog and other stuff or 2. use publicvariableclient while using a waituntil to wait for the data on the client

winter rose
#

what will you do with this data?

#

just fill a dialog?

dim owl
#

Populate a listbox

#

yeah

winter rose
#

I am no UI expert, both can do I think

jade abyss
#

remoteExecCall to server, he sends the variable via remoteExecCall back. Not sure where the problem is 🤔

queen cargo
#

@dim owl search for promise in here

dim owl
#

Thanks I will have a look

smoky ravine
#
class CfgSounds
{
 sounds[] = {};
 class WailAlarm 
 {
 name = "WailAlarm";
 sound[] = {"sounds\RedAlarm.ogg", 100,1};
 titles[] = {0,""};
 };

 class IncomingAlarm
 {
 name = "IncomingAlarm";
 sound[] = {"sounds\IncomingAlarm.ogg",db1,1};
 titles[] = {0,""};
 };
};

class CfgSFX
{
    class Wail
    {
        sound0[] = {"\sounds\RedAlarm, -10, 1.0, 1000, 1, 0, 0, 0};        
        sounds[] = {sound0};
        empty[] = {"", 0, 0, 0, 0, 0, 0, 0};
    };
    
    class Incoming
    {
        sound0[] = {"\sounds\IncomingAlarm, -10, 1.0, 1000, 1, 0, 0, 0};        
        sounds[] = {sound0};
        empty[] = {"", 0, 0, 0, 0, 0, 0, 0};
    };
};```

Whats wrong here?
winter rose
#

your indent?

smoky ravine
#

Hmm?

winter rose
#
class CfgSounds
{
    sounds[] = {};
    class WailAlarm
    {
        name = "WailAlarm";
        sound[] = {"sounds\RedAlarm.ogg", 100,1};
        titles[] = {0,""};
    };

    class IncomingAlarm
    {
        name = "IncomingAlarm";
        sound[] = {"sounds\IncomingAlarm.ogg",db1,1};
        titles[] = {0,""};
    };
};

class CfgSFX
{
    class Wail
    {
        sound0[] = {"\sounds\RedAlarm, -10, 1.0, 1000, 1, 0, 0, 0};
        sounds[] = {sound0};
        empty[] = {"", 0, 0, 0, 0, 0, 0, 0};
    };

    class Incoming
    {
        sound0[] = {"\sounds\IncomingAlarm, -10, 1.0, 1000, 1, 0, 0, 0};
        sounds[] = {sound0};
        empty[] = {"", 0, 0, 0, 0, 0, 0, 0};
    };
};

so, what is your error? it is missing ending quotes in CfgSFX

smoky ravine
#

Ohh thats just discord xD

#

The error is something along the lines of end of line

#

1 sec

#

The end quotes are probably the issue

winter rose
#

"probably" yes

still forum
#

look at the highlight and you'll see the error 🙃

smoky ravine
#

😄

#

Another quick question

still forum
#

denied

smoky ravine
#

D:

winter rose
#

a quick answer it will be

smoky ravine
#

Do I have to reload the scenario for it to take effect?

winter rose
#

to restart it only

smoky ravine
#

And theres a zeus module, called play Sound
I've noticed all the sounds in there are SFX, not sounds.
So would this add those sounds to the Play Sound module?

dim owl
#

I made a test and found out that the publicvariableclient approach is quite faster than the remoteexec approach:
21:41:29 "Started 1" -> Publicvariable
21:41:29 "Debug - Benötigte Zeit: 0.0830078"
21:41:29 "Started 2" -> Remoteexec
21:41:30 "Debug - Benötigte Zeit: 0.104492"

still forum
#

you are measuring the network latency

#

not the speed of pubvar/remoteexec

#

also I hope you don't actually mean "publicVariable" but instead "publicVariableClient"?

#

because sending the data to all clients, while just one requested it is pretty bad

#

and remoteExec makes it much easier to just send back to remoteExecutedOwner

dim owl
#

also I hope you don't actually mean "publicVariable" but instead "publicVariableClient"?
@still forum Yeah of course

#

and remoteExec makes it much easier to just send back to remoteExecutedOwner
@still forum I only use publicvariableclient in combination with remoteExecutedOwner to send the data back to the client which makes my script easier

queen cargo
#

Just use the promise methods I sent ya basti
They work perfectly fine and are pretty much what you want

dim owl
#

Ok I will try

#

Thx

fair lava
#

is there a wiki page that explains server / client separation?

#

trying to figure out where to execute this

#

i would assume clientside?

winter rose
#

is there a wiki page that explains server / client separation?
yes

cerulean cloak
#

Does anyone know how I'd increase the number of magazines for the prowler HMG variant? I found the addMagazineTurret [magazineName, turretPath, ammoCount] command but was having difficulty finding the magazine name and turret path.

flat elbow
#

So i am most definetly missing something, I defined a function inside a file that is inside a folder called scripts under the mission folder, then in my initServer.sqf I prepare it:

TOV_fnc_SimpleConvoy = preprocessFileLineNumbers "scripts\simpleConvoy.sqf";

the file contains:

hint "AA";

Then I start the server, enter the mission, open the debug console and call it:

[] spawn TOV_fnc_SimpleConvoy;

And i get a generic error expression about the spawn call

What I am doing wrong?

#

Same with

TOV_fnc_SimpleConvoy = preprocessFile "scripts\simpleConvoy.sqf";
#

oh right, i have to call compile

#

dumb me

bright flume
#

whats the script/fnc/event? for automatically adding access to object for zeus? sworn seen a biki but cant find it now

round scroll
#

@flat elbow I'd suggest to make simpleConvoy.sqf a function in CfgFunctions and use that one

faint fossil
#

Hi I'm here with more stupid questions

#

how would one make a functional VR target vehicle like the one in the virtual testing place?

faint fossil
#

and, to add on, how do you get the little vr circle target to work? i'd assume its a similar process

#

_>

still forum
#

The vanilla arsenal mission, is in the game files, you could open it and look into it

#

what vr circle target not sure what you mean.
what do you want to do? Detect when someone walks into the circle? or is it a shooting thing?

faint fossil
#

thanks, its a bit late so ill go to bed but ill definitely try it tomorrow

#

and uh

#

the vr circle is like

#

a placeable thing thats under targets

#

its a floating white disc with some sectors

#

if you shoot it whichever sector gets hit will light up

#

its like a more sophisticated shooting target

#

but if you just put it in editor it doesnt do anything when you shoot it

bright flume
#

The vanilla arsenal mission, is in the game files, you could open it and look into it
-- Dedmen

#

Sorry for the ping. @faint fossil look at the scripting parts.

still forum
#

If the circle is used in a training scenario or smth. you could extract that and look at it

#

they are usually in a missions_f pbo, probably in bootcamp

vague geode
#

Is there a way to check all warlords sectors on whether they are targeted by either side once someone requests a fast travel and if they are disable fast travel for that sector entirely?
I tried to achieve this by putting the following code into the Init section of every sector but that obviously costs a lot of server performance and thus is no viable solution.

while { true } do 
{ 
    waitUntil { 
        (this == BIS_WL_currentSector_WEST || this == BIS_WL_currentSector_EAST) 
    }; 
        this setVariable ['FastTravelEnabled',false,true]; 
        waitUntil { 
            (this != BIS_WL_currentSector_WEST && this != BIS_WL_currentSector_EAST) 
        }; 
            this setVariable ['FastTravelEnabled',true,true]; 
};

Is there any other/better way to do it?

flat elbow
#

@round scroll I can do that but i want the server and only the server to use that function

vagrant urchin
#

Hello, I have an array I in a script that I want to run on all clients connecting to the server. Right now it runs only locally on each machine.

#

How can I make it run and sync on all machines connecting?

winter rose
#

@vagrant urchin you don't run an array? What are you doing with it

vagrant urchin
#

It's an array of units. Everytime a player connects to the server the unit the player occupies should be added to the array

#

But it works only locally

#

So if two players connect to the server, they can only see themselves in that array

winter rose
#

use "on player connected" event handler, server-side, and publicVariable this array

#

else, there is allPlayers

#

@vagrant urchin ^

vagrant urchin
#

I'll try that and update. Thanks

unreal scroll
#

I use the fast travel function for travelling across the map. How can I retrieve the fuel flow and fuel capacity to calculate the overall consumption?

winter rose
#

you can use fuel and make a delta

unreal scroll
#

That is the idea, fuel 1 indicates the full fuel tank already... But is the returned value precise enough?

winter rose
#

…what do you mean?

unreal scroll
#

So, to calcuate the maximum travel distance, I should get the fuel consumption time, returned by the monitor script, and multiple it by max speed? Is it the optimal way?

crisp cairn
#

I have a 2 part question regarding ACE Framework. Part 1 - Can I execute a FNC within a condition statement? Part 2 - If so, how can I get an answer from the FNC to show the action.

vagrant urchin
#

@winter rose how can I get the unit that the player connected to the server posses?

#

I'm executing the script with the OnPlayerConnected event and OnPlayerConnected is executed in initServer.sqf

winter rose
#

@unreal scroll no
you take fuel at time 1, you take fuel at time 2 (usually 1s later), you make the difference
then you divide the current fuel amount by the difference, and you have your fuel lifetime in seconds

vagrant urchin
#

I thought OnPlayerConnected returns the unit

#

this is the log I'm printing
Added new player to IL array - PlayerID: any, JIP: any, Unit: <NULL-object>

winter rose
unreal scroll
#

"then you divide the current fuel amount by the difference, and you have your fuel lifetime in seconds"
...and then I should multiple it by max speed, as I said, to get the distance. It is the long way, and it is not good enough, because I need to run time-depedent scrip to calculate it - but the teleport script doesn't have tiem for it.
I asked about calculating the average fuel consumption rate. I.e., _distance = (fuel _veh)/_somevalue

winter rose
#

why would you multiply fuel consumption by speed? 🤔

vagrant urchin
#

oh wait I didn't user the mission event handler

#

Should the MEH be executed in initServer?

winter rose
#

not "executed" but added yes

vagrant urchin
#

yes

#

okay I'll try that

#

Also, what is _this in the example in the link you provided?

#
handlercon = addMissionEventHandler ["PlayerConnected",
{
    diag_log "Client connected";
    diag_log _this;
}];
winter rose
#
addMissionEventHandler ["PlayerConnected",
{
  diag_log _this;
  params ["_id", "_uid", "_name", "_jip", "_owner", "_idstr"];
}];
#

_this is the parameter provided to the code

#
[1,2,3] call { systemChat str _this; }; // outputs "[1,2,3]"
vagrant urchin
#

so would I use it like this?

addMissionEventHandler ["PlayerConnected",
{
    [_uid, _jip] execVM "scripts\arrays_handler.sqf";
}];
#

arrays_handler.sqf

playerID = _this select 0;
isJIP = _this select 1;
winter rose
#

don't forget to add params ["_id", "_uid", "_name", "_jip", "_owner", "_idstr"];

you can also use ```sqf
params ["_uid", "_isJip"];

vagrant urchin
#

what is the importance of params

#

oh wait nvm

#

Parses input argument into array of private variables

unreal scroll
#

"why would you multiply fuel consumption by speed?"
To calculate the overall fuel consumption at given distance :)
The algorythm:

  1. Player select distance point
  2. Script calculates the fuel consumption
  3. Vehicle teleported to new position
  4. Vehicle fuel decreasing by calculated value
vagrant urchin
#

so it would be
so would I use it like this?

addMissionEventHandler ["PlayerConnected",
{
    params ["_id", "_uid", "_name", "_jip", "_owner", "_idstr"];
    [_uid, _jip] execVM "scripts\arrays_handler.sqf";
}];

arrays_handler.sqf

params ["_uid", "_isJip"];

diag_log format ["Added new player to US array - PlayerID: %1, JIP: %2, Unit: %3", _uid, _jip, player];

winter rose
#

@unreal scroll fuel is not linearly consumed
it depends on your actual speed / engine RPM

#

you would need to make a delta of pos2 - pos1 and divide remaining distance by this

#

"more or less"

unreal scroll
#

Engines are my specialty 🙂
There is always an average fuel consumption, for cruise speed. I don't need a very precise calculation, of course.

vagrant urchin
#

this is what it prints now
Added new player to array - PlayerID: 76561198736551323022, JIP: false, Unit: <NULL-object>
It still returns null-object

winter rose
#

yes, the player joined the server

vagrant urchin
#

The problem is that OnPlayerConnected does not return the unit of the player

winter rose
#

yeah, it does not

#

it is a -connecting- player, not a player entering the mission

#

computer connects to server, but e.g player still in lobby

vagrant urchin
#

Perhaps the respawn event would work if I listened to it instead of the PlayerConnected event?

winter rose
#

why don't you use allPlayers? or BIS_fnc_listPlayers?

copper raven
#

allPlayers apply {[getPlayerUID _x, didJIPOwner _x, _x]} on server would produce what you want i guess

vagrant urchin
#

That can work, but how can I make it run everytime a player connects

#

or rather spawns with a unit because connect doesn't seem to work in this case

copper raven
#

init player local and RE to the server or something, entityrespawned or whatever might work too if u have respawnonstart enabled

smoky verge
#

using an Hit eventhandler mixed with a particle effect to spawn a small VR cube where a player gets hit
but I'm getting an error on line 1

bob addEventHandler ["Hit", {_this select 0 execVM "effect.sqf"}];

"",
"spaceObject",
 0.5,
 1,
 [0,0,0],
 [0,0,0.5],
 1,
 0.2,
 0,
 [0,0,0.5],
 [0.75,0,0,1.0],
 [0, 1, 0],
 0.01,
 0.08,
 "",
 "",
 bob,
 [0.75,0,0,1.0]
 ];```
exotic flax
#

what is line 1, and what is the exact error?

smoky verge
#

line one is
Drop ["\A3\Structures_F_Bootcamp\VR\Blocks\VR_Block_04_F.p3d",

the error is
Error type Array, expected number

winter rose
#

so at some point, you are providing an array instead of a number
see drop arguments

smoky verge
#

I might have messed up the order of the arguments

#

the last one for example
is an emissive parameter marked as optional
if I want it does it mean I should have empty slots for every optional parameter before it?

winter rose
#

yes, of course

smoky verge
#

I'll check that
but probably something else is in error aswell

winter rose
#

it will throw another error once this is solved then

winter rose
#

@smoky verge any update?

smoky verge
#

might have messed up the order because I was using an outdated set of parameters
I'm remaking it from scratch as we speak

winter rose
#

okido, GL

vagrant urchin
#

Okay I'm using allPlayers

#

with a foreach loop

#

and it works

#
usPlayers = ["74234198002438570"];
publicVariable "usPlayers";

ilPlayers = ["765611980658345454"];
publicVariable "ilPlayers";

{

  if((getPlayerUID _x) in usPlayers) then
  {
    [_x, ""] call BIS_fnc_setUnitInsignia;
    [_x, "BI"] call BIS_fnc_setUnitInsignia;
  };

  if((getPlayerUID _x) in ilPlayers) then
  {
    [_x, ""] call BIS_fnc_setUnitInsignia;
    [_x, "MANW"] call BIS_fnc_setUnitInsignia;
  };

} forEach allPlayers;
#

except for the part where when a player respawns, everyone but that player get the insignia

#

We are 3 players in the server, when one respawns, the other two get their insignias, but the one who respawned doesn't

#

sleeping between the removing and adding seems to work

#
    [_x, ""] call BIS_fnc_setUnitInsignia;
    sleep 3;
    [_x, "MANW"] call BIS_fnc_setUnitInsignia;
winter rose
#

Just… why remove then set?

vagrant urchin
#

because if you had an insignia and you set it again

#

it doesn't work

#

others had the same issue

winter rose
#

is this the only code you execute in the allPlayers code?

vagrant urchin
#

yes

#

the block above the last one

winter rose
#

no need to publicVariable the uid lists (if they are only used here)

vagrant urchin
#

yeah i forgot them there

#

i just wonder how unoptimized it is to sleep like this

winter rose
#

it's not, it just "waits"

#

but if the thing is to get the proper insignia, you could do it player-side (init and respawn), as BIS_fnc_setUnitInsignia is not server-only

smoky verge
#

what was the way to write stuff in sqf coloring?

vagrant urchin
#

I know it's not. As far as I understand in order to get insignias work properly in the multiplayer environment, you'd need to set it for every machine connected to the server

restive linden
#

hi, Anglais
Do you know how to display the player name in dialogs plz ?

smoky verge
#
Drop [
"\A3\Structures_F_Bootcamp\VR\Blocks\VR_Block_04_F.p3d", //shapeName|String
"",                                                      //animationName|String
"spaceObject",                                           //type|String
 0.5,                                                    //timerPeriod|Number
 1,                                                      //lifetime|Number
 [0,0,0],                                                //position|Array
 [0,0,0.5],                                              //moveVelocity|Array
 1,                                                      //rotationVelocity|Number
 0.2,                                                    //weight|Number
 0.3,                                                    //volume|Number
 0,                                                      //rubbing|Number
 [0.03,0.03,0.03,0],                                     //size|Array
 [0.75,0,0,1.0],                                         //color|Array
 [0, 1, 0],                                              //animationPhase|Array
 0.01,                                                   //randomDirectionPeriod|Number
 0.08,                                                   //randomDirectionIntensity|Number 
 "",                                                     //onTimer|String
 "",                                                     //beforeDestroy|String
 bob,                                                    //object|Object
 0,                                                      //angle|Number
 false,                                                  //onSurface|Boolean
 -1,                                                     //bounceOnSurface|Number
 [0.75,0,0,1.0]                                          //emissiveColor|Array
 ];```
Now I have a Number where there is supposed to be an Array
but as you can see from there there is no problem
winter rose
#

as you can see
no can see, what seems to be the error?

vague geode
#

Is there a way to check all warlords sectors on whether they are targeted by either side once someone requests a fast travel and if they are disable fast travel for that sector entirely?
I tried to achieve this by putting the following code into the Init section of every sector but that obviously costs a lot of server performance and thus is no viable solution.

while { true } do 
{ 
    waitUntil { 
        (this == BIS_WL_currentSector_WEST || this == BIS_WL_currentSector_EAST) 
    }; 
        this setVariable ['FastTravelEnabled',false,true]; 
        waitUntil { 
            (this != BIS_WL_currentSector_WEST && this != BIS_WL_currentSector_EAST) 
        }; 
            this setVariable ['FastTravelEnabled',true,true]; 
};

Is there any other/better way to do it?

still forum
#

Add a 5 second sleep to the wait until?

#

Is there no "current sector changed" event maybe?

#

Bis scripted eventhandler

smoky verge
#

@winter rose the errors says there is a number where there is supposed to be an array
if you check on the right I've marked what each line is and what there is supposed to be written in it
all arrays have arrays in them so not sure what I'm doing wrong

winter rose
#

ah yes

#

color is Array of Array

#

@smoky verge

smoky verge
#

oh right it is
what does that mean exactly? 😅

winter rose
#

[
[1,1,1,0.5],
[1,0,1,1]
]

#

if you have only one value, [[0,0,1,1]]

smoky verge
#

so the first is RGBA
and the 2nd?

#

emission?

winter rose
#

all of them are RGBA

smoky verge
#

oh
why 2?

winter rose
#

it is a transition for the whole lifetime

smoky verge
#

oh got it

winter rose
#

you can have only one, or 10e10

smoky verge
#

so if I want 1 color I just copypaste it

winter rose
#

just one = one value

#
[[1,1,1,0.5]]
#

(same goes for emissiveColor btw)

smoky verge
#

got it
thanks

winter rose
#

you got me searching for it D:

smoky verge
#

thanks for the help
it doesn't give me any error now
even though its not spawning the object 😞