#arma3_scripting

1 messages ยท Page 415 of 1

subtle ore
#

My point is, don't get used to using init boxes and triggers

#

What happens is that there is zero ability to format and it's ugly as all hell to look at

#

Totally kills your workflow time

astral tendon
#

Not like some one going to see that during the gameplay i think.

subtle ore
#

No....but it's terrible practice

#

For your own benefit and prevention of confusion, you should just move the thing to a new script

astral tendon
#

My only consern is if the script works and the game does not crash and i can have the hight amout of FPS i can get.

subtle ore
#

Well if you're sloppy, then you won't get any better fps either way

astral tendon
#

Then, just give me better codes or tip to get the best fps i can get. Dont just trow salt on me like you are my superior or something.

subtle ore
#

I'm not your superior, and i have shown you in the past alternative methods. I have given you tips

astral tendon
#

80% of the time you are trowing salt at me and not giving any straight answer

subtle ore
#

"Throwing salt at me", what is that supposed to mean? I have given you a straight answer, i am not going to rewrite everything from your unit init myself. That's on you.

astral tendon
#

Look above on the createUnit issue.

subtle ore
#

Yep, i was trying to make sense of what you were doing. Didn't make sense at first

#

It's pretty simple though, pass the unit object into the script. Make a variable out of it, then replace your insane amount of this with _yourUnitObject

#

But yes, i was wrong about the syntax. Eyes skipped over it, my bad. But i certainly think this is something you still should learn

astral tendon
#

My only question was about why on that script i was testing the "" did not work but with '' or with out any of thet did.

subtle ore
#

Because you would be ending the string

astral tendon
#
this setUnitPos "UP";//not work
this setUnitPos 'UP';// work
this setUnitPos UP;//work
subtle ore
#
_stringThing = "Hello 'bob'?"; //correct
_stringThing = "Hello "bob"?"; //stops at hello
astral tendon
#

You could just have anser that.

#

it would have saved allot of time

subtle ore
#

No, i was trying to make sense of it all. Send you some of those tips you wish for.

astral tendon
#

You did not need to, you could anse that question straight then give the tip, that code was scraped anyway but i learn some things with it.

subtle ore
#

But, you're still using triggers and unit init boxes?

astral tendon
#

does this looks like can be done with triggers?

inner swallow
#

midnight, you know, if the biggest complaint about triggers and init boxes are "they're maybe unreadable sometimes" then i think you need to stop spreading things as doctrine

#

also "you're shooting yourself in the foot" or "you're crippling yourself" - less hyperbole and more explanation, please.

rich trout
#

Dose anyone know some code that can respawn a vehicle using the scroll wheel. like anything that you chuck in the init on a vehicle then boom its repsawns?

astral tendon
#

You mean just teleport is back to the base or atually respawn a new one at the base with full ammo, healt, and fuel?

forest cosmos
#

does anyone know how to open virtual arsenal when pressing a key?

still forum
#

Like init script box

indigo snow
#

that was not true in the past at least

still forum
#

What was not boolean ?

indigo snow
#

attributes executing globally like init boxes

still forum
#

What else? only local units?

indigo snow
#

(on every client)

#

they only execute where theyre local

#

or did in the past

jade abyss
#

Weren't the Attributes like "ordinary Anims", so they should report over the net natively

still forum
#

No. Attributes are just script backed stuff. They don't just do stuff natively

jade abyss
#

but animate/animateSource is

indigo snow
#

we had to broadcast setvariable in attribute expressions

#

either way @velvet merlin barring any non reported changes, expressions only execute where the object is local.

jade abyss
#

Of course, only on the client where it's executed. But result (when it comes to anims) is global.

indigo snow
#

im not sure where the animations part comes from

jade abyss
#

Was talking with Kju before in PM. I thought he mentioned that here too before ๐Ÿ˜„

velvet merlin
#

@indigo snow thanks

indigo snow
#

i see

velvet merlin
#

still suckz as locality can change

jade abyss
#

What specific case do you have in mind, where it would matter who the owner of it is?

velvet merlin
#

like worst case you have a JIP reset/change the state again

jade abyss
#

Nah, the state should be reported normaly

#

e.g. if a door is open or not

#

Only the SetVar stuff (as like it is for years) must be broadcasted

indigo snow
#

just treat them like an init eventhandler

jade abyss
#

Yeah

indigo snow
#

which might be what you meant earlier?

velvet merlin
#

lets see how it goes

rich trout
#

@astral tendon Like resapwn with full ammo and health.

astral tendon
#

So just repair and rearm?

#

then you can use this

this addaction ["Repair and Rearm",{
params ["_vehicle"];
_vehicle setDamage 0;
_vehicle setVehicleAmmo 1;
}];
ebon summit
#

Hey everyone. Im first time trying to make a custom scenario. How to script next things. Helicopter starts when player_1 and player_2 in cargo, it flys to position, hold there a minute and starts patrol

#

first problem with a start

fossil yew
#

huh?

#

can you elaborate - what is the problem?

#

who is driving the helicopter?

ebon summit
#

Im just knows nothing :D
I mean Im googling every porblem separately

fossil yew
#

AI?

ebon summit
#

AI

fossil yew
#

Ok -

  1. name that helicopter heli_1
  2. put that AI in helicopter and give them a first waypoint very close to the heli starting location (like around 1m). In the completion condition:

player_1 in heli_1 && player_2 in heli_1

  1. add other waypoints as planned
ebon summit
#

Oh nice, will try it

peak plover
#

Does in work like that?

lone glade
#

yes

#

unit in vehicle is an alternative syntax of it

peak plover
#

I usually do vehicle player iseequalto heli1

jade abyss
lone glade
#

out

peak plover
#

How expensive is in location check compared to inarea

jade abyss
#

Yes

lone glade
#

maybe

peak plover
#

Anyone ever compare?

jade abyss
#

That's also possible.

lone glade
#

location != area

peak plover
#

Location can be an area

lone glade
#

a location is a special data type

#

and no, unless you create a location nope

jade abyss
#

Alternative Syntax 2
Syntax: position in location
Parameters:
position: Array - format Position2D or Position3D
location: Location

still forum
#

Yes.

peak plover
#

I would make location with 100 distance

jade abyss
#

Just click the link i send before^^

lone glade
#

use markers...

peak plover
#

Compare to inarea with 100

jade abyss
#

Yeah

#

And don't forget the Bananas

peak plover
#

I try wen I get to pc

#

Markers is inarea

#

Sadly both markers and inarea kill fps on map

inner swallow
#

Are you running this in a loop?

#

I've never had either kill FPS

still forum
#

Because you can't kill FPS in scheduled

inner swallow
#

Oh. Yeah I mostly use scheduled so...

#

In my own scripts I mean

peak plover
#

running this in a loop

#

shit

#

I ment to say

#

location

#

markers and locations both kill fps on the map

#

I spawned 100k, had like <30 fps on map, both with location and markers

#

But it's fine until you open the map

rotund cypress
#

Np

cedar kindle
#

100k locations? ๐Ÿค”

still forum
#

500 million k locations \(O_O)/

peak plover
#

Go hard or go home

lone glade
#

the funniest way to "ruin perf" is finding one of those mass 0 items in ACE Arsenal, hold shift and press right arrow

cedar kindle
#

why would you possibly need so many

lone glade
#

and watch as your framerate hangs itself 10-15s later when they're in the thousands

still forum
#

Doesn't ruin perf though

peak plover
#

feature

still forum
#

except if you run TFAR 0.9.x

lone glade
#

even without TFAR 10 000 items hits fairly hard ๐Ÿ˜„

still forum
#

Some other mod iterating in a forEach loop over all items then D:

lone glade
#

I wonder how long it would take to add 1 / 10th of that with vanilla

peak plover
#

extract > edit > import

#

not that long

still forum
#

If I want to move the player into a camera then cameraObj cameraEffect ["internal","back"] would be the right thing to do right?

lone glade
#

yes

still forum
#

What now? ๐Ÿ˜„

lone glade
#

wrong channel ๐Ÿ˜„

still forum
#

I wrote a OOP Intercept cameraController that automatically takes care of creating and deleting the camera :3 Quite proud. Such a little thing and so neat.

lone glade
#

make sure to keep the camera mode / view consistent

still forum
#

What do you mean?

lone glade
#

camera views can differ from cam to cam, internal / 3rd person / gunner etc

still forum
#

I camCreated a "camera" and use internal and setPosASL + setVectorDirAndUp ยฏ_(ใƒ„)_/ยฏ

#

Never used cameras before

meager heart
#

better camSetRelPos

still forum
#

my camera doesn't have a target

meager heart
#

its like free ?

still forum
#

yeah

#

Custom controls to move that cam so that you can look at yourself and stuff

meager heart
#

also there was camSetPosto make it smooth

#

with commit

still forum
#

It has to be instant

#

I'll be doing 360ยฐ turns in FOV steps in about 5 frames or.. as much frames as needed for the FOV to add up to 360ยฐ

gaunt hamlet
#

Hia guys - I am trying to override the default winner and looser debriefings via description.ext - the wiki on the matter (https://community.bistudio.com/wiki/Debriefing) only shows for the loosing side, but my guess was "winner" would be the right work for winning side.
I also think they misspelled looser - so I added the two variants just to be sure.

However I still get the default one :-(

Here is my debriefing classes

`class CfgDebriefing
{
class winner
{
title = "You are victorious";
subtitle = "Yey!";
description = "Amazing work";
// pictureBackground = "";
// picture = "";
// pictureColor[] = {0.0,0.3,0.6,1};
};

class looser
{
title = "You have been defeated";
subtitle = "Buuhh!";
description = "Look at you now!";
// pictureBackground = "";
// picture = "";
// pictureColor[] = {0.0,0.3,0.6,1};
};

class loser
{
title = "You have been defeated";
subtitle = "Buuhh!";
description = "Look at you now!";
// pictureBackground = "";
// picture = "";
// pictureColor[] = {0.0,0.3,0.6,1};
};
};`

lone glade
#

noice

still forum
#

@lone glade is already on wiki

gaunt hamlet
#

sorry - not quite sure where to post my questions TBH - kind of n00b

lone glade
#

that was fast, I wonder if pixelPrecision got documented

still forum
#

nope

#

didn't see yet

#

Okey the code for my secret project is done. Now I just gotta get home. Compile it and test :3

peak plover
#

is it tfar

still forum
#

noo

#

You'll see it if it works. If not then.... Dunno

lone glade
#

GIB 1.0 ON WERKSHERP ALREDY

still forum
#

Get thrown in a bucket with the other snails and be left to die

#

OHHHHHHHH It's lookin good

lone glade
#

you already got it working @still forum ?

still forum
#

Yeah

peak plover
#

gimme gimme gimme

lone glade
#

NOICE

still forum
#

Was really as easy as I though

#

Not completly working tho and camera controls broken AF

#

But the basics are there

#

Ughhh.. I can make nice stereo 3D screenshots.. Looking 90ยฐ up into the air -.-

frosty cave
#

Anyone love optimizing mission code? Love Overthrow but the engine chugs after you are halfway into the campaign - how can I profile it?

still forum
#

If it's scheduled then there is nothing to profile

#

as scheduled code also don't hurt fps

#

And I don't think Overthrow is unscheduled.

#

I love optimizing code. But not mission code. Because that's 99% scheduled

lone glade
#

oh, scheduled DOES eat frames

still forum
#

It can only 3ms tho

lone glade
#

not when it breaks ๐Ÿ˜„

still forum
#

unless you have a single command that can run longer

lone glade
#

start a shitload of loops and watch your framerate

#

the performance degradation of the scheduler is insane

exotic tinsel
#

how do i set my mission to show all friendlies on the map?

lone glade
#

it's a difficulty setting

exotic tinsel
#

found it, thx mate

exotic tinsel
#

can i put these settings in the server.cfg or do i need to create a seperate file? class DifficultyPresets

lone glade
#

it's the server profile afaik

#

missions can also force a difficulty afaik, you'll have to look more into it

meager heart
exotic tinsel
#

found it thanks mate for link

muted parcel
#

Can I change the max load capacity of a player with a script?

exotic tinsel
#

because i heard this in a video, if i set my AI difficulty in my mission to 100 then set it 0.5 in the server ai difficulty it will drop the ai down to 50%?

candid jay
#

Is there an easy way to get the cfgMarker that is relative to a unit / vehicle?

#

for instance, a function that, given a vehicle, returns the appropriate marker (a BLUFOR plane would be "b_plane" for instance, and so on)

muted parcel
#

Can anybody help me please?

queen cargo
#

@muted parcel no, you can not

muted parcel
#

Ok. Thanks

candid jay
meager heart
#

@candid jay getMarkerType, markerType or store them in arrays based on types and then check from wich array that marker.... i dont think there is any "ez way"

candid jay
#

I don't get what you mean

#

if it's something like

if (_entity isKindOf "Helicopter") then { _vehicleType = "air"; };
if (_entity isKindOf "Plane")      then { _vehicleType = "plane"; };
if (_entity isKindOf "Ship")       then { _vehicleType = "naval"; };
if (_entity isKindOf "UAV")        then { _vehicleType = "uav"; };

sure, can do that

meager heart
#

Is that function will create marker on vehicle and marker type based on type/kind of vehicle ?

#

Maybe then just switch type/kind of vehicle/unit and then setMarkerType or just create it ?

little oxide
#

someone has already coded a script that allows sorting a array of dates ?

still forum
#

I'm sure someone did.

little oxide
#

Ho, the sort command working fine for this nvm

exotic tinsel
#

im running an arma 3 server. am i ment to copy the and paste the CustomDifficulty stuf in the server.arma3profile file? do i append it or over write the contents of it?

opal cloak
#

Are you using TADST to manage the server?

exotic tinsel
#

no

opal cloak
#

Hmm. TADST takes care of that for me... But yes I do believe that stuff goes in that particular file

#

if you're hosting on windows, tadst does a good job

dusk sage
#

:S

exotic tinsel
#

do i append the CustomDifficulty content to that file? or replace whats in there with it?

dusk sage
#

That class, inside the file

exotic tinsel
#

again do i append the CustomDifficulty content to that file? or replace whats in there with it?

dusk sage
#

I'm not a mindreader

#

Do you already have difficulty stuff in the file?

exotic tinsel
#

yes the stuff for regular, verteran, etc

dusk sage
#

CfgDifficulties?

exotic tinsel
#

file starts like this

#

version=1;

viewDistance=3000;
preferredObjectViewDistance=3000;
terrainGrid=12.5;
activeKeys[]=
{
};

class Difficulties
{
class recruit
{
class Flags
{

#

does that help

dusk sage
#

Refer to this:

fleet wind
#

A simple one ๐Ÿ˜‰ How do you do several ifs ? for example if I > 3 & x > 6 & z > 2 do ....

#

so all of those have to be true to run the code

dusk sage
#
if (I > 3 && x > 6 && ...) then {}
#

Can use

if (I > 3 && {x > 6}...}

for lazy-eval (see wiki)

fleet wind
#

Thanks i was kind of close ๐Ÿ˜‰

dusk sage
#

Or alternatively, you can just nest them

still forum
#

My brain is degrading...
I legit wrote if (ox == oy == 0) and wondered why it's not working

#

I mean if x = y = 0 works why not == too?

meager heart
#

๐Ÿ˜€

astral tendon
#

so, how do i count nothing? like this

(count (vehicle player_1 weaponsTurret [0]))

it returns nothing because player_1 is not in the slot

rancid ruin
#

count nothing ๐Ÿค”

astral tendon
#

Does JIP players keep their variable i set before?

subtle ore
#

no

strong shard
#

@still forum result of 1st == is BOOL, 2nd == will compare BOOL with NUMBER - this is FALSE or error (Because different data types)

#

@Roque_THE_GAMER#0266 store result of weaponsTurret in any variable and check isNil before the count and if isNil return TRUE, set empty array

fleet wind
#

Hello again people ๐Ÿ˜‰ How can i make an item in my I incentory? For example i want to be able to pick up rocks and i want them to end up in my I inventory (There is no rock item in arma so how do tou add that) And how do i make it so if i dubbleclick this item something happens ? Unable to find a wikipage for something like this.

still forum
#

Did you just explain to me how comparisons in Arma work? ๐Ÿ˜„ Thanks o7

#

@fleet wind #arma3_config But I don't think you can "double click" it to make something happen.

barren magnet
#

@fleet wind you need to make your own Inventory and handle arma items there too

#

You can make an ondblclick action actually. I think it's possible only on listnbox or listbox

fleet wind
#

Allright thats to complicated xD

still forum
#

@Arkensor#0120 Inventory is even more engine as in Arma 2. Making your own inventory == haaard

fleet wind
#

With the dialogs is there a command simular to _this select 1; to define who activated the dialog or a thing in the dialog?

lone glade
#

wat

#

you realize only the local client can do anything with dialogs right?

fleet wind
#

OOO wait thats right sorry

fleet wind
#

Lolz im dumb

loud python
#
_customization = [_new] call BIS_fnc_getVehicleCustomization;
...
[_new, _customization select 0 select 0, _customization select 1] call BIS_fnc_initVehicle;
#

any idea why this doesn't work?

barren magnet
#

@still forum actually not that hard but just alot to think about when doing it to not allow dupes

barren magnet
#

CanAdd command and all config Infos like size etc make it pretty, easy

astral tendon
#

Then how o i set the variable to a JIP player?

fleet wind
#

Hello once again people. How do i make it so that a combination of keys needs to be pressed for example shift+w ? (findDisplay 46) displayAddEventHandler ["KeyDown", "if (_this select 1 == 207) then {player setdamage 0}"];

austere granite
#

if (_this select 1 == 207 && (_this select 2)) then

#

check the wiki page for User interface event handlers. Shift/ctrl/alt state are passed as argument

#

@fleet wind

fleet wind
#

Thanks @Adanteh#0761

winter dune
#

why can't apply any sort of damange with setHitPointDamage after spawning a vehicle?

#
_vehicle setHitPointDamage["HitLFWheel",1];

This is the code, I can't set the damage to 1 if the vehicle didn't move after I spawned it with createVehicle

#

If I move the vehicle, works great

#

Or if a player enters the vehicle

meager granite
#

Locality issues I guess?

#

Make sure vehicle you're damaging is local

winter dune
#

ok, the vehicle is not local

#

are there any workarounds?

copper raven
#

remoteExec

peak plover
#
//inside nig_fnc_dmgW
//cursorObject call nig_fnc_dmgW;
params ['_vehicle'];
if (!local _vehicle) exitWith {
    _vehicle remoteExec ['nig_fnc_dmgW',_vehicle];
};
_vehicle setHitPointDamage["HitLFWheel",1];
#

Everything should be a function, but you can just use call to run code

#

if it's not

winter dune
#

my vehicle is spawned by a remoteExec on the server side, I execute the setHitPointDamage with a remoteExec for all clients

meager heart
#

do you set vehicle as target ?

winter dune
#
[_vehicle, _wheels] remoteExecCall ["xan_fnc_stealWheelEffect",_vehicle];
#

first script

#

inside that script

params [
  ["_vehicle",objNull,[objNull]],
  ["_wheels",[],[[]]]
];

_vehicle setHitPointDamage [(selectRandom _wheels),1];
peak plover
#

> I execute the setHitPointDamage with a remoteExec for all clients

winter dune
#

so I suppose that I should change from remoteExecCall to remoteExec?

#

found the problem

#

spawning a vehicle and hinting

local cursorObject

will result in a false

#

if I enter the vehicle

#

it will result true

#

the fuck?

peak plover
#

That's normal behaviour

winter dune
#

oh

#

never encountered

peak plover
#

That's the reason the vehicle you are driving does not rubberband when vehicles driven by others (that are not local to your client) do rubberband

winter dune
#

thanks

astral tendon
#

So, anywone knows how the set the variable back to the JIP player when he joins the slot?

copper raven
#

save them in profileNameSpace?

astral tendon
#

how?

copper raven
#
profileNameSpace setVariable ["myVariable",true];
saveProfileNameSpace;

etc, set it when player disconnects,or sth like that

astral tendon
#

In my case i have 4 slots, lets say the Host chose the 1ยฐ slot, start the game and played for a bit, then other player connects and joing the game, the variables are in order like [Player_1,Player_2,Player_3,player_4] so he chose the player_3 slot, that command you give seens like i need to add a new variable?

tough abyss
#

Does anyone know how to make a control on a Dedicated server? Like have the actual server have a control loaded? I'm trying to use htmlLoad on the server instead of on a client.

lone glade
#

....

#

you do realize server hosts don't have GUI / drawn frames right ?

fleet wind
#

Its me again.... Any idea why this dosent work ? all the cords are correct and the random thing all works he hint im getting is Keep in mind the variable name for my unit is Blue & cords at the and are random Blue setpos [7002,11602,0] ```sqf
_rNumber = random 6;
_Numround = round _rNumber;

_listOfSpawns = ["[7002,11602,0]","[6976,11625,0]","[6964,11652,0]","[6975,11680,0]","[6991,11700,0]","[7020,11663,0]","[7026,11609,0]"];
_actualSpawn = _listOfSpawns select _Numround;
hint format ["%2 setpos %1",_actualSpawn,_caller];
_caller setpos _actualSpawn;

inner swallow
#

this dosent work
what does this mean exactly? i mean, could you describe the "not working" part

subtle ore
#

why exactly are they all in strings may I ask?

#

positions aren't strings

#

so

_caller setPos "[7002,11602,0]";

doesn't work

fleet wind
#

Yes sorry @inner swallow what im trying to do is make it so that a random number generates _rNumber then just round that _Numround so that i get a whole number. What im then trying to do is take that number and select whatevr is in its pos in the _listOfSpawns and place that in the _caller setpos _actualSpawn to make the player spawn at any of the locations.

#

@subtle ore what would be a goood way of doing this then ?

inner swallow
#

You could probably use selectRandom instead

subtle ore
#

Rid of the strings

fleet wind
#

Ill try selectRandom Thanks

tough abyss
#

@lone glade What about a headless client?

lone glade
#

same

meager heart
#

@fleet wind

/*
_rNumber = random 6;
_Numround = round _rNumber;


_listOfSpawns = ["[7002,11602,0]","[6976,11625,0]","[6964,11652,0]","[6975,11680,0]","[6991,11700,0]","[7020,11663,0]","[7026,11609,0]"];
_actualSpawn = _listOfSpawns select _Numround;
hint format ["%2 setpos %1",_actualSpawn,_caller];
_caller setpos _actualSpawn;
*/

_caller setPos (selectRandom [[7002,11602,0],[6976,11625,0],[6964,11652,0],[6975,11680,0],[6991,11700,0],[7020,11663,0],[7026,11609,0]]);
fleet wind
#

Yup thanks @meager heart alrady figured it out ๐Ÿ˜‰

severe solstice
#

In General how does sqf behave when put into a trycatch does it terminate on logic Errors anyway ?

rancid ruin
#

pretty sure try/catch in arma is totally broken

#

or at least i've never seen it used

tough abyss
#

it works, exile codebase uses it alot

ruby breach
#

Offhand, is there a BE filter that would easily return code being executed in the watch fields of debug console? Anything through the actual menu itself can be caught with the remoteexec filter "BIS_fnc_debugConsoleExec [[0-2],{.*}]", but the watch fields don't utilize remoteexec.

rancid ruin
#

why isn't it used more?

unborn ether
#

For my opinion - in terms of SQF try catch throw should be used for like wrapping framework parts with no code/data access, like foreign API, Engine itself and stuff. Because if you script own framework, why would you create situations that must be handled? And as far as I know there's currently no point where you (for actual reasons) can stop modding RV for yourself.

tough abyss
#

Try catch in sqf isn't for catching exceptions really.
Its just anotherway to structure code and have it run another branch of code when you run sqf command throw + pass a variable with it.
Basically some code you can rewrite abit cleaner with it but its not really needed for anything.
Prob why its really not used, almost forgotten about etc

unborn ether
#

Yeah it could be cool if like calling some extension was able to result in something bigger than just nothing, if it fails, for example.

tough abyss
#

Don't really need it for exception handling in sqf for extensions.
Extension is only loaded once, just have it return something, so if its empty string you know it didn't load

willow haven
#

Hi, I've been trying to get this to work for awhile now, but I need some help. I thought I'd try here before posting on the subreddit

#

All I'm trying to do is have a script that when placed in an object's init spawns an explosive at the target when it gets hit.

#

I've been trying

this addEventHandler ["hit", "'R_TBG32V_F' createVehicle (getpos _this select 0)"];

and

this addEventHandler ["hit", "createVehicle ['R_TBG32V_F', getPos 'this', [], 0, 'NONE']"];

and variations on this, but it never works. Depending on how I word it I either get no error message or "Error getpos: type Array, expected Object,Location"

still forum
#

@severe solstice try catch in SQF catches SQF throw no script errors or whatever else

#

Intercept command calls can throw a SQF exception that can be caught with try/catch in sqf

#

I don't think that's very useful though. But maybe someone finds a use

fleet wind
#

Allright its me again ๐Ÿ˜‰ I have made a little script to run this code Blue setAnimSpeedCoef 0.6; But it onlt runs localt (To be expected) How would i go about too run it globaly to make this effect others in my MP game have been trying remoteExec But unable to figure it out. (Yes my player has the variable name of Blue)

peak plover
#

Anyone versed in acre here?

willow haven
#

hold up, it's possible I just forgot some brackets like an idiot

willow haven
#

yeah

#

I forgot a set of parenthesis

#

this addEventHandler ["hit", "'Bomb_03_F' createVehicle (getpos (_this select 0))"];

#

makes a pretty big explosion on hit

#

If I have "_onHit = "Hostage Shot";" in init.SQL

#

How would I go about making it work in this this addEventHandler ["hit", "hint '_onHIT'"];

small iron
#

Is there a way to detect a number of characters with SQF?

peak plover
#

What do you mean?

#

Like in a string?

small iron
#

Yes.

#

@peak plover

peak plover
#

alternate syntax 3

small iron
#

There we go.

#

Couldn't find the documentation, thank you!

peak plover
#

Np

peak plover
#

Anyone know how to do different side for acre propperly with the possiblity to mix sides?

meager heart
peak plover
#
[ (["ACRE_PRC343"] call getRadioByType), 1] call acre_api_fnc_setRadioChannel; 
#

not working on my machine

meager heart
#

Don't remember exactly but i think you need first initialize it with something_fnc_setupMission; and set presets...

#

Last time used it in alpha

astral tendon
#

How do i count units inside of s trigger?

meager heart
#

count thisList

astral tendon
#

i mean, outside of the trigger

#

like on a command

meager heart
#

just count them ๐Ÿ˜€

astral tendon
#

dont really work

#

like
count myTriggerName

meager heart
#

like that you count your trigger...

astral tendon
#

it returns nothing

meager heart
#

wow strange ....๐Ÿ˜„

peak plover
#
count (list myTriggerName)```
#

Seems like I can change acre if I run

["ACRE_PRC152", "default4"] call acre_api_fnc_setPreset; 

before I recieve the radio. But changing the 343 channel for ex. seems to not work with

[ (["ACRE_PRC343"] call getRadioByType), 5] call acre_api_fnc_setRadioChannel; 
astral tendon
#

I see the problem, it onlys counts the units that is on the side that the trigger is set to.

peak plover
#

If you want all units in that area then

#
allUnits inAreaArray myTriggerName;    // returns array of units inside the trigger
astral tendon
#

Nice, that one do it, thanks.

peak plover
#

np

edgy dune
#

so

#

question

#

is there away to check to see if a player has a object in their inventory?

#

basicly i wana check and see if a player has a grenade

meager heart
#

hasWeapon ?

edgy dune
#

are smoke grenades cnsidered weapons?

#

considered*

rancid ruin
#

what about just getUnitLoadout ?

#

that'll just give you an array with, i think, absolutely everything a unit's inventory contains

edgy dune
#

oh okay

#

im trying the getUnitLoadout and try to use find to see if it works

meager heart
#

"SmokeShell" in magazines player also

edgy dune
#

okay ill try that

thorn saffron
#

Started bashing my head against the dialogs and GUI. Failed pretty bad and can't really get it to work. I get the error popup that the resource was not found.

thorn saffron
#

Would anyone be willing to help me get it to work? I hate failing the entry steps when doing something.

mild pumice
#

guys i need your help. I don't know if there is a solution but check this :

#

I made a script to sit on some objects , but for benches for example, the position is too high and i can't change it

#

I use setPos and modelToWorld like this :

_pos = [0.5,0,-1];
player setPos (_chair modelToWorld _pos);
#

if i lower the -1 it doesn't change anything

copper raven
#

why dont u use attachTo ?

mild pumice
#

because if i use attachTo, the player can't rotate his head :/

#

that's not cool

peak plover
#

@mild pumice not sure if this will help but acex sitting:


//modelToWorld returns AGL
_player setPosASL (AGLtoASL (_seat modelToWorld _sitPosition));
thorn saffron
#

anyone good with dialogs? I can't get my basic stuff to work. I get a missing resource error. I checked everything, but I don't know where I made an error

peak plover
#

Pastebin it, I'm sure someone knows

thorn saffron
#

It's spread over couple of files

peak plover
#

comment out files 1 by 1 until you see where the problem is

thorn saffron
#

The problem is the game can't find the resource, so the elimination method isn't going to cut in this case

peak plover
#

What do you mean

#

Just remove dialogs until it works

thorn saffron
#

The problem is it can't find the whole thing

#

ie. removing anything/everything won't make it work.

peak plover
#

I don't get it. If you remove all your code. It still does not work?

thorn saffron
#

I'm talking about the dialog GUI stuff not character talking

#

I'm trying to create my own shop thing, but I can't get the simple base working

peak plover
#

you mean the GUI editor?

thorn saffron
#

Yeah, first time making the dialog windows. Made what I wanted using the GUI editor, exported it, made the description etc. but for some reason the game can't load my dialog and reports that the whole thing is missing. Not sure what I did wrong.

lone glade
#

using the GUI editor, made the description
that's your issue

#

"mission" GUIs are the fucking worst

thorn saffron
#

Hey, I was just following a tutorial

#

I need some help in getting it to work

peak plover
#

I just don't like the GUI editor. I just went without it and it payed of in the long run. I really dno :\

lone glade
#

it's just plain bad, too many issues with it.

thorn saffron
#

Yeah, but I'm just trying to get anything to work, to make a first step in GUI stuff.

peak plover
#

I learned from this

#

basics are pretty hard to grasp at first. But it has a working thing

thorn saffron
#

I just want to know where I messed up

lone glade
#

honestly it's trial and error at this point

peak plover
#

> where I messed up
gui editor ๐Ÿ˜„

lone glade
#

those controls are what you "can" do, but you can make much more complicated stuff by layering them

thorn saffron
#

Yea, but I can't even get a really basic dialog working. I messed up the config somewhere

#

I HATE failing at the entry steps

peak plover
#

Copy the config from the UI template and remove stuff you don't need. Reposition what you do need

#

Good for learning

thorn saffron
#

screams in caps

delicate totem
#

A few months ago I went through the same struggle. The tutorial was terrible. I found the export from the gui editor doesn't work with mission dialogs. The inheritance is broken, so you need to fully define the base classes . You can get good bases from the mission nigel posted, and then edit the gui editor export so it inherits from them.

Or do your dialog as a mod, the inheritance works properly then.

lone glade
#

there's no inheritance in "mission" GUIs

#

you have to redefine base classes

delicate totem
#

See, the tutorial skipped that part which lead to most of my pain.

thorn saffron
#

The one i followed did cover copying the common classes

queen cargo
#

@lone glade define*
You cannot redefine something that is not existing in first place

lone glade
#

true

warm gorge
#

Is there a scripting command or something to disable the ability to rearm at backpacks? So to remove "Rearm at Carryall Backpack (Coyote)" for example? Other than hooking into the Action event handler

peak plover
#

Hmm

#

You could look into lock backpack scripts

#

But that would mean no way to open it too

#

no clue if it's doable in arma 3 :S

unborn ether
#

@warm gorge setAmmoCargo might help at scripted level, but i'm not sure, since i never touched rearming with backpacks. The only thing i know for sure is that backpack is an actual vehicle and probably will react the same.

#

@warm gorge To return the backpack container use backpackContainer

warm gorge
#

Ill give it a go cheers

unborn ether
#

@warm gorge And yes, notice that backpack must be local, that means you need to be an owner of it.

warm gorge
#

Yeah I know

dim owl
#

hey guys, is it possible to make my init.sqf in another folder?

inner swallow
#

not afaik

peak plover
#

You can declare your script in the function library and run it in the postInit

dim owl
#

thx :D

peak plover
#

np

cedar kindle
#

for a deathmatch, what's the recommended group side?

#

using logic atm

peak plover
#

Why logic 'tho?

cedar kindle
#

friendly fire / score rating etc

peak plover
#

Just use resistance/independent and


addMissionEventHandler ["EntityKilled",{(_this param [1]) addPlayerScores [2,0,0,0,0]}];
#

ยฏ\(ใƒ„)/ยฏ

#

server only ^

#

rating shouldn't be a problem as long as you are using ace3

#
player addEventHandler ["HandleRating", {
    (_this select 1) max 0
}];
cedar kindle
#

was mostly thinking of ff messages on server with that enabled

#

don't really care about scores

peak plover
#

Ohh, no clue about that

still forum
#

friendly fire messages?

peak plover
#

difficulty setting

#

If you kill s1 on same side, it says killed by (freindly fire)

still forum
#

Oh.. yeah. I only play custom diff

#

You can mod your server and just remove it

peak plover
#

I got an idea, but it's a longshot

#

sideEnemy

#

Maybe it would think everyone enemy to everyone

still forum
#

Do you know if it still shows that message on english if you have your game on a different language?

#

If so then the server controls it and you can just edit the stringtable in the pbo

peak plover
#

That needs a mod 'tho ?

cedar kindle
#

that's useless for me, public mission

still forum
#

no not a mod. editing vanilla pbo

#

and yeah. wouldn't work then

unborn ether
still forum
#

Use addRating

cedar kindle
#

which i why i was wondering if there's a way around

still forum
#

to make everyone bad

cedar kindle
#

ye if i give negative and make all players ENEMY they might not show

peak plover
#

I think sideEnemy (negative rating <-2000) stopped showing friendly fire

#

But im not sure, that was in arma 2

tough abyss
#

howdy do you know if there's a hpp->sqf converter? Greetings

still forum
#

That doesn't make sense

tough abyss
#

just for dialogs

barren magnet
#

make sense

still forum
#

Well... Windows explorer can do that.

#

Just rename it

#

Ah you want to translate a UI config into a UI script

tough abyss
#

yeah

barren magnet
#

There is a converter and yes @still forum he wants that

jade abyss
#

*dadmom

still forum
#

I know he wants that. He just said so?

jade abyss
#

@barren magnet HL Noob

barren magnet
#

wtf this discord ... autocomplete

jade abyss
#

๐Ÿ˜„

tough abyss
#

Okay, so where can i find this tool? xD

barren magnet
#

you said it before i was finished typing ๐Ÿ˜ฆ

#

I think i saw it on the sqf.io converter thing

jade abyss
#

yyeeeaaaahhhhhhhhhhhhhhhhhh

barren magnet
#

But not as a standlone tool

tough abyss
#

yeah i knew that site, but its down i guess

dusk sage
#

That's a mirror according to Google

still forum
#

Where does that hpp == UI config idea come from? There is literally no reason why a ui config needs to be a hpp

tough abyss
#

great! Exactly what i've been searching for, thanks

fleet wind
#

Here i am again.... How can i make this command setAnimSpeedCoef run globaly? i have tried remoteExec But cant figure it out.

still forum
#

remoteExec is the answer

#

The wiki page has an example on how to run a command globally

fleet wind
#

The problem is i dont get what to put in the sections params remoteExec [functionName, targets, JIP]; Parameters i have no clue function name is the command and target is 2 im preatty sure ๐Ÿ˜ƒ

dim owl
#

is there a way to display a splash screen? like with cutRsc or something like that?

tough abyss
#

use target -2 @fleet wind

still forum
#

@fleet wind And? params is the parameters like shown on the wiki page. And all other things have accurate descriptions about what they do on the wiki page

unborn ether
#

@fleet wind

[unit,speed] remoteExec ["setAnimSpeedCoef",-2,unit]
meager granite
#

@dim owl startLoadingScreen endLoadingScreen ?

fleet wind
#

@tough abyss Why -2 i though 2 was the server

tough abyss
#

-2 is global

unborn ether
#

@fleet wind Because negative excludes the owner

tough abyss
#

Everyone but the server

fleet wind
#

allright

unborn ether
#

@fleet wind Server doesn't really need to know your anim speed unless you really need this.

tough abyss
#

@dim owl sqf 6969 cutRsc ["SplashNoise","BLACK"]; to start it and sqf cutText ["","BLACK IN"]; to remove

dim owl
#

@tough abyss Thanks i've searched for this like 2 hrs ^^

tough abyss
#

Np

normal steeple
#

Anyone well versed in getting the AI to do their bidding?

#

Trying to get ai to fire a rocket at a specific place based on a trigger but can't find the right script commands to pull it off

inner swallow
#

there's commandArtilleryFire

#

there's also a FIRE MISSION waypoint

meager heart
#

@cedar kindle Maybe will work for you player addEventHandler ["HandleRating", {0}];

cedar kindle
#

no

red anvil
#

Stupid question maybe.. but, its an Event Handler that is called in Config.cpp. run by every AI? or only that object runs it?

#

not the best scripter , learning

still forum
#

called in config.cpp?

#

Scripts generally don't run per AI or per object

#

they run per machine.

red anvil
#

ahh ok. yes called in config.cpp.

still forum
#

Define that

tough abyss
#

He is prob talking about init/killed eventhandlers etc

red anvil
#

yes, init eventhandler

still forum
#

CBA? Or vanilla?

red anvil
#

vanilla

still forum
#

That is called per unit of that class when it is spawned

#

on every machine that has that config entry

red anvil
#

excelent. thats a perfect answer. thanks you guys

normal steeple
#

@inner swallow Would that work with an infantry unit though?

inner swallow
#

oh, you meant infantry

#

no, probably not

#

but fire should?

normal steeple
#

Tried that along with a lookat command but never was able to get the unit to actually pull out the launcher

#

Also tried tedho's unitcapture script but had the same issue

#

Stubborn bastard just keeps it stashed every time

inner swallow
#

what are you trying to fire out of it?

#

what type of round?

#

and at what?

normal steeple
#

RPG7 at an APC set to roll into the center of a road

#

I'd just use a different method but its for a cinematic purpose so I need the rocket to go over the camera

inner swallow
#

what's the fire command's code you're using?

normal steeple
#

Right now? I changed it from ' forceWeaponfire ' to ' player4 lookAt a;player4 Fire ["launch_RPG7_F","launch_RPG7_F"]; '

#

(sorry I don't know how to do the formatting in discord)

inner swallow
cedar kindle
#

regarding the Supply140 / or similar issue, i checked at mission start today, ~40 players and there was instantly 500 objects at [0,0]. used the code in @still forum issue tracker to get the reference to them, but it turns out they can't be deleted locally nor on the server

normal steeple
#

Actually have that in the unit's init field

inner swallow
normal steeple
#

Let me give it a try

still forum
#

@cedar kindle how did you try to delete them?

inner swallow
#

you can use ` (tilde) for the code block btw

still forum
#

using the objectFromNetID

#

and then deleteVehicle?

cedar kindle
#

yea

inner swallow
#

one tilde or three tilde on each side

normal steeple
#

It have a space or something special? Trying to edit it into my first post

still forum
#

@cedar kindle Maybe every unit has a active object down there. That holds their backpacks inventory

normal steeple
#

Also I'm not sure what the muzzle variable value in this is?

cedar kindle
#

yea. something is up with it

still forum
#

So as long as the unit is alive you can't delete because it actually has a purpose

#

But after the unit dies/leaves. It stays and now is invalid

inner swallow
#

muzzle should be the weapon name in the case of launchers, i think

#

btw you're using ' not `i think

#

comma not tilde

normal steeple
#

aaah

#

player4 action ["SwitchWeapon", player4, player4, "launch_RPG7_F"];

#

So this?

#

If so no joy through the unit init field

inner swallow
#

hmm no

#

i think weaponIndex has to be determined for the unit

#

using weapon state

normal steeple
#

Not going to lie I have no idea how to use that command at all

inner swallow
#

look at the example on the switchweapon action for the output

#

copyToClipboard weaponState player4 should give you the output of that

#

place that in a text file

#

actually, never mind

#

Not sure how to combine the two

#

eh. Sorry.

#

Maybe someone else can help you... :/

normal steeple
#

Just tested the same command but to a pistol and it works fine...

#

I've no idea but thatnk you for all your time mate, you have a good one

inner swallow
#

cheers, good luck!

thorn saffron
#

Anybody good with GUI dialogs? I'm trying to get a basic one working, but I can't get it to load at all. First time dealing with GUI so I have no idea where I made a mistake.

river meteor
#

@thorn saffron Are you using cutRsc and if so, is your GUI within the RscTitles class?

thorn saffron
#

Got it working somehow.

thorn saffron
#

How do you read partially magazines from a box, so you get what magazines and how much ammo in them is left?

zenith edge
#

am I right in my understanding that all scripts run in unscheduled and scheduled are only sharing time with single core, yes?

thorn saffron
#

I would like to get this working. I get errors at the addMagazineAmmoCargo step.

_sellboxMags = magazinesAmmo sellBox;
//[["11Rnd_45ACP_Mag",3],["100Rnd_65x39_caseless_mag",74]]

{
shopInventory addMagazineAmmoCargo [(select 0) select _x, 1, (select 1) select _x];
} forEach _sellboxMags;```
meager heart
tough abyss
#

@thorn saffron

_sellboxMags = magazinesAmmoCargo sellBox;
{
  shopInventory addMagazineAmmoCargo [(_x select 0), 1, (_x select 1)];
} forEach _sellboxMags;
thorn saffron
#

thanks

zenith edge
#

so thats a yes

#

i was just confirming

still forum
#

Everything in Arma besides async/sync file reads are sharing time on a single core

cerulean whale
#

Is there a way to join a server via script? (For my custom main menu for a mate of mine and I want it just to be able to connect to his server so people don't have to direct connect)

outer fjord
#

Silly question

#

When making a simple object what does the false mean on this? ["Land_HBarrierWall6_F",[10765.6,10787.2,0],0,[[0,1,0],[0,0,1]],false],

still forum
#

create how?

#

You have an array with a syntax error there

outer fjord
#
_objs = [
    ["Land_HBarrierWall6_F",[10765.6,10787.2,0],0,[[0,1,0],[0,0,1]],false],```
still forum
#

Ugh.. private array.
Still don't know what that's supposed to mean

outer fjord
#

mmm

still forum
#

It's an array of unknown structure with stuff in it

#

Did you know you can do
private _objs =
instead of

private ["_objs"];
_objs =
#

The answer is probably that we can't know what it means because it's used for something in an unknown script somewhere and might not even mean anything

outer fjord
#

Derp, I found it >.>

#

obj = createVehicle [_x select 0, [0,0,0], [], 0, "CAN_COLLIDE"];

#

Thank you though. there was little documentation for this script and some how I was put in charge of messing with it >.<

thorn saffron
#

Ok, I dumb: how do you append/add arrays so you get 2D arrays?

_stuff = [];
[array1];
[array2];

//magic code
_stuff = [[array1], [array2]]```

```sqf
_stripedMagazines = [];
_stripedMagazines append [(_magazine select 0), 1, (_magazine select 1)];```
resulted in:
```sqf
["100Rnd_65x39_caseless_mag",1,88,"RPG32_F",1,1,"11Rnd_45ACP_Mag",1,11]```
I need it like this:
```sqf
[["11Rnd_45ACP_Mag",3],["100Rnd_65x39_caseless_mag",74]]```
#

derp

#

pushback

peak plover
#

append adds them together

lone glade
#

SYNTAX ERROR

peak plover
#

yse ๐Ÿ˜„

lone glade
#

still syntax error

peak plover
#

Just realized

#

really?

lone glade
#

yes

peak plover
#
_arr = []; 
_arr append [1,2,3];//[1,2,3] 
_arr append [[1,2,3],5];//[1,2,3,[1,2,3],5]
_arr
lone glade
#

finally fixed it

peak plover
#

๐Ÿ˜„

still forum
#

@thorn saffron _stuff = [array1, array2]

#

Can confirm. Dumb question

#

The bottom half of your code. Use pushBack and remove that one in there that doesn't make sense anyway

#

Oh you already solved it yourself. Yes. Stuff

peak plover
#

but is pushback faster than append?

still forum
#

yes

#

Because of the runtime array building when you make a nested array using append

thorn saffron
#

Oh yeah, changed my box scanner script so now all the mags will be read with their current ammo count, just so there is no way to cheat-fill mags.

#

I need a bit of clarification:
"_something" is a local variable that can be only called in script it was created
"something" is global one that can be called across scripts
So if I have my box scanner functions then I need to have it update global variables so those can be use someplace else, right?

taroContainerMagazines = _containerMagazines;
taroContainerItems = _containerItems;
taroContainerWeapons = _strippedWeapons;```
still forum
#

yes

#

Alternatively missionNamespace setVariable ["taroContainerMagazines",_containerMagazines] Some people prefer that style

#

Also keep in mind that if you have two containers they will then overwrite each others variables

thorn saffron
#

I might need to create my own little addon with a massive container. Everything in vanilla gets filled up surprisingly fast.

severe solstice
#
_player enableSimulation false; and _player enableSimulationGlobal false;

i try to freez player server-side. but this is not working. any idears?

thorn saffron
#

setanimationspeed 0?

peak plover
#

wait a minut

#

>; and

#

What did you mean by that

jade abyss
#

tion false; and _player ena

peak plover
#

That looks off

jade abyss
#

false; and _pla

peak plover
#

and

jade abyss
#

lse; and

still forum
#

:vla:

peak plover
#

@severe solstice isn't that the wrong syntax for and

jade abyss
#

either wrongly marked or wrong in the code

still forum
#

You are asking syntax if he is using the wrong syntax

peak plover
#

๐Ÿ˜‚

still forum
#

I think he means he tried both

#

or smth

jade abyss
#

prolly

#

Anyway: RemoteExec(Call) -> disableUserInput -> profit

peak plover
#

ohh good

#

God

#

Why

jade abyss
#

Why not you twat

#

He want's to freeze the player trollface

peak plover
#

๐Ÿ˜‚ ๐Ÿ‡พ ๐Ÿ‡ด ๐Ÿ‡บ ๐Ÿ‡ฒ ๐Ÿ‡ด ๐Ÿ‡ณ ๐Ÿ‡ธ ๐Ÿ‡น ๐Ÿ‡ช ๐Ÿ‡ท

cedar kindle
#

pls no

still forum
#

@jade abyss Please no break pattern ._.

jade abyss
#

partrumpams?

peak plover
#

un trump

#

Anyway

jade abyss
#

no

#

b2t:

#

Can you even disable a player with disableSim? thinkingsherlock

peak plover
#

But 'muh params

still forum
#

yes @jade abyss

peak plover
#

player enableSimulation false

still forum
#

Atleast you could about 2 years ago

peak plover
#

works

#

maybe the global one don't work

still forum
#

We all goofing around here waiting for answer from syntax

peak plover
#

๐Ÿ˜„

jade abyss
#

May i introduce you: Shrugjet

peak plover
#

@severe solstice

[_player,false] remoteExec ['enableSimulation',_player];
#

haha the shrugjet

#

do logics show up with units _group

subtle ore
#

@jade abyss Make it so

still forum
#

@peak plover I think logics are vehicles. Do vehicles show up in there?

peak plover
#

shrugjet dno

inner swallow
#

Who is this @ syntax and should I ping him for syntax related queries? ๐Ÿ˜„

still forum
#

@sqf-vm

#

:U

#

That is the guy for syntax questions I tihkn

peak plover
#

Can roleDescription be set somehow?

still forum
#

which one? where?

peak plover
#

The one that shows in the lobby

still forum
#

Yes

#

Mod

#

CBA does that

peak plover
#

How do I change outside of 3den with cba?

still forum
#

I think you can also manually edit mission.sqm

peak plover
#

I need to do it later

still forum
#

outside of Eden?

peak plover
#

like after mission start

still forum
#

Ohhh

#

no.

#

Scripted lobby Probably

peak plover
#

I need to change the actual role description

#

@commy2๐Ÿ’ฉ
Where are you

still forum
#

@little eagle

peak plover
#

That's funny

#

Commy can u change unit type with scripted lobby?

fringe yoke
#

Hey, wondering if anyone here has experience with creating a zeus module. I'm having a weird issue.

peak plover
#

What issue?

fringe yoke
#

I'm using this bit of code here exeucted on the server

if (isNil "SynixeCur_group") then {SynixeCur_group = creategroup sideLogic;};
    publicVariable "SynixeCur_group";
    SynixeCur = SynixeCur_group createunit["ModuleCurator_F", [0, 90, 90], [], 0.5, "NONE"];    //Logic Server
    SynixeCur setVariable ["showNotification",false];
    SynixeCur setVariable ["TFAR_curatorCamEars", true];
    SynixeCur setCuratorEditingAreaType false;
    //SynixeCur allowCuratorLogicIgnoreAreas false;
    unassignCurator SynixeCur;
    publicVariable "SynixeCur";
    _cfg = (configFile >> "CfgPatches");
    _newAddons = [];
    for "_i" from 0 to((count _cfg) - 1) do {
      _name = configName(_cfg select _i);
      _newAddons pushBack _name;
    };
    if (count _newAddons > 0) then {SynixeCur addCuratorAddons _newAddons};
    SynixeCur setcuratorcoef["place", 0];
    SynixeCur setcuratorcoef["delete", 0];
    unassignCurator SynixeCur;
    sleep 0.4;
    zeus assignCurator SynixeCur;

It works fine and the player with the variable name zeus can get into the Zeus interface.
The issue is that every interface (Like ACE Update Editable Objects) is displayed twice.

#

This causes all sorts of weird things, vehicles get locked just by clicking on them. All AI units are set to prone. And it is impossible to edit cargo of containers. After you click OK they become empty.

ornate quail
#

Hey, I've got a quite unprecise question. I've made a GUI and now I want others to be able to change specific parameters of my GUI via config. But I have no idea on where to start, I'm not good at scripting, just started learning cpp. This is my GUI:

class category_1_button: RscButtonMenu
{
    idc = 1103;
    text = "Category 1";
    x = 0.470381 * safezoneW + safezoneX;
    y = 0.184567 * safezoneH + safezoneY;
    w = 0.06 * safezoneW;
    h = 0.04 * safezoneH;
    ColorBackground[] = {0,0,0,0.627450};
    ColorText[] = {1,1,1,1};
    font = PuristaBold;    SizeEx = 0.1;
    colorFocused[] = {0,0,0,0};
    colorDisabled[] = {0,0,0,0};
    style = "ST_CENTER";
            
    action = "closeDialog 1100; createDialog 'aca_category_1';";
};

I want to be able to change the idc, text and action parameter, but how?

*edit
I'm not looking for anyone doing this job for me, don't understand me wrong. I just need some help to work myself in

peak plover
#
class my_button: category_1_button
{
    idc = 14141103;
    text = "my button";
    action = "player setDamage 1;";
};
#

Try that

ornate quail
#

well, that looks simple, haven't even thought about that. Thanks

still forum
#

Config is not scripting :U

peak plover
#

You can script text and action 'tho I think

still forum
#

But I guess it's too late now

ornate quail
#

I'm sorry, wasn't really sure where to post this, I thought I need an script for this

peak plover
#
private _idc = 999;
// Create a button
private _buttonCtrl = _display ctrlCreate ["menus_template_button", _idc, _controlGroup];

// change button size
_buttonCtrl ctrlSetPosition [(0 + (_x * _GUI_GRID_W)), (0 + (_y * _GUI_GRID_H)),(_w * _GUI_GRID_W),(_h * _GUI_GRID_H)];
_buttonCtrl ctrlCommit 0;

// Set button text
_buttonCtrl ctrlSetText _text;

// Run the code when button is clicked
_buttonCtrl ctrlSetEventHandler ["buttonClick",_code];
#

if you wanna do sth like this

    action = "closeDialog 1100; createDialog 'aca_category_1';";

#

That should be deleted

ornate quail
#

Thanks @peak plover I'm gonna try this as well.

peak plover
#

Np

#

@fringe yoke
why do you


    unassignCurator SynixeCur;
still forum
#

reassign curator is something I also often do

peak plover
#

Why?

still forum
#

When you rejoin it bugs out and you can't get into curator because game thinks you aren't although you are

peak plover
#

I also have a curator problem

#

maybe I gotta do that too

still forum
#

It does feel kinda weird that, that script looks exactly like my Curator script....

peak plover
#

clrealy you are not Synixe... ๐Ÿ˜„

still forum
#

My variables are DedmenCur and DedmenCur_group....

#

Soo.... Weird...

fringe yoke
#

It was originally your makemecurator gist.

peak plover
#

Whenever I use curator. I seem to have to press ok twice for all the dialogs

#

Like edit vehicle or waypoint

#

Weird

fringe yoke
#

That's the issue I'm having. It makes editing boxes impossible though

peak plover
#

I could 'fix' it by relogging right now

#

basically become zeus, ```sqf

_zeus = mission_zeus_group createUnit ["ModuleCurator_F", [0,0,0], [], 0, "CAN_COLLIDE"];
_zeus setVariable ["owner",_uid];

#

quit to lobby and rejoin

#

fixed

fringe yoke
#

I was hoping someone would know what was up. You'd think there'd be a better solution then relogging every mission

peak plover
#

@still forum did you ever get that issue?

severe solstice
#

i was talking about

_player enableSimulation false;

and

๐Ÿ˜

still forum
#

Hah so it was my script XD. Completly forgot I published that. I don't remember getting that issue

#

Especially since I just solve it by pressing F5 once.. So.. Not a real issue for me

#

Didn't know about that setVariable owner thing

#

Ohh.. Maybe I should read.. Stuff displayed twice.

#

Yeah I get that too. Dunno of a fix

#

@severe solstice The second one should work I guess

#

Otherwise the first one with remoteExec

#

All these not working? Did you try remoteExec too?

fringe yoke
still forum
#

Doesn't always happen though

fringe yoke
#

It's happened to me 100% of the time

#

So I'm not sure what's different then, considering 95% of the script I'm using is a modified version of yours

severe solstice
#

@still forum second is not working for me.

#

iโ€˜ll post the script later

still forum
#

As said before that might not work for players. And that sounds logical

severe solstice
#

ye k

edgy dune
#

if I use this in zeus,this should make a unit independet yes? ```sqf
_this join createGroup INDEPENDENT;

#

and I assume bluefor and opfor are WEST & EAST

peak plover
#
missionNamespace setVariable ["GUER",resistance,true];
_this join createGroup GUER;
tough abyss
#

Are editor object names synchronised globally?

edgy dune
#

oh

tough abyss
#

In multiplayer?

still forum
#

yes

#

kinda

#

not really. But it does what you are thinking about

peak plover
#

vehicleVarName?

tough abyss
#

The name field in the editor when you double-click an object

still forum
#

No it doesn't synchronize

#

but it's the same for everyone

#

The simple answer is "yes". But the real answer is "That not at all how it works"

tough abyss
#

I tried using a script that referenced an object by its name set in the editor, but it didn't work on clients

still forum
#

It didn't work because the script was just broken

#

or it didn't work because it didn't know the variable?

tough abyss
#

"Undefined variable in expression"

still forum
#

object name and variable name are different things btw

peak plover
#

I think he used name instead of vehiclevarName

tough abyss
#

It worked on the hosted server

peak plover
#

he used roleDescription

still forum
#

Can you show the script snippet?

tough abyss
#
if(!isserver) then {
cam1 = "camera" camCreate [5593.08,10471.7,14.691]; cam1 cameraEffect ["Internal", "Back", "cam1"];
cam1 camSetTarget [5577.25,10471.9,6.47546];cam1 camCommit 0;

cam2 = "camera" camCreate [5624.25,10493,36.036]; 
cam2 cameraEffect ["Internal", "Back", "cam2"];
cam2 camSetTarget [5628.88,10458,17.5516];
cam2 camCommit 0;
cam3 = "camera" camCreate [5652.5,10420.1,22.817];
cam3 cameraEffect ["Internal", "Back", "cam3"];
cam3 camSetTarget [5655.88,10449.3,22.4865];
cam3 camCommit 0;
cam4 = "camera" camCreate [5652.88,10524.4,42.092];
cam4 cameraEffect ["Internal", "Back", "cam4"];
cam4 camSetTarget [3648,1581.88,-1.125];
cam4 camCommit 0;
cam5 = "camera" camCreate [5680.25,10420,29.3539];
cam5 cameraEffect ["Internal", "Back", "cam5"];
cam5 camSetTarget [5682.88,10475.5,33.2416];
cam5 camCommit 0;
cam6 = "camera" camCreate [5680.5,10524.1,47.55];
cam6 cameraEffect ["Internal", "Back", "cam6"];
cam6 camSetTarget [5682.88,10475.5,33.2416];
cam6 camCommit 0;

screen1 setObjectTexture [0, "#(argb,512,512,1)r2t(cam1,1)"];
screen2 setObjectTexture [0, "#(argb,512,512,1)r2t(cam2,1)"];
screen3 setObjectTexture [0, "#(argb,512,512,1)r2t(cam3,1)"];
screen4 setObjectTexture [0, "#(argb,512,512,1)r2t(cam4,1)"];
screen5 setObjectTexture [0, "#(argb,512,512,1)r2t(cam5,1)"];
screen6 setObjectTexture [0, "#(argb,512,512,1)r2t(cam6,1)"];

screen1a setObjectTexture [0, "#(argb,512,512,1)r2t(cam1,1)"];
screen2a setObjectTexture [0, "#(argb,512,512,1)r2t(cam2,1)"];
screen3a setObjectTexture [0, "#(argb,512,512,1)r2t(cam3,1)"];
screen4a setObjectTexture [0, "#(argb,512,512,1)r2t(cam4,1)"];
screen5a setObjectTexture [0, "#(argb,512,512,1)r2t(cam5,1)"];
screen6a setObjectTexture [0, "#(argb,512,512,1)r2t(cam6,1)"];
};
still forum
#

the screens?

tough abyss
#

Yeah

still forum
#

did it error at screen1 or a other one?

tough abyss
#

Error goes off at screen1, and I imagine the rest wouldn't execute after.

It does work when I do:

screenWhatever = this; publicVariable "screenWhatever";
#

In the vehicle init

#

Otherwise it only runs on the server

still forum
#

You don't even need to run that script on the clients

#

setObjectTextureGlobal for the screens

#

you still have to create the cameras on the client but you don't need to set the texture

quartz coyote
#

Hello I nned help understanding the Biki :
I'd like to give an ID to my action. In the addAction Biki it is said :
script: [...]
Parameters array passed to the script upon activation in _this variable is: [target, caller, ID, arguments]
[...]
ID (_this select 2): Number - ID of the activated action (same as ID returned by addAction)

What I don't understand is how to fill-in the "parameters" array to say _id = 1001

still forum
#

myActionID = addAction....
whatever [target, caller, myActionID , arguments]

#

Ah

#

What

#

You don't fill the parameters array

#

it is filled for you

quartz coyote
#

my objective is to do a player removeAction ID

#

how do I know the ID of my Action

still forum
#

inside the actions code?

quartz coyote
#

...

still forum
#

So no?

quartz coyote
#

I don't understand ...

still forum
#

Ok

#

Inside the code of your action

#

or in some other script

quartz coyote
#

this is my action

#

player addAction ["<t color='#ff0000'>CAR</t>",{[] spawn SpawnUCar},[],-1];

still forum
#

Ah

#

yeah then like I wrote above

#

myActionID = player addAction....

#

and then you have the ID inside myActionID variable

quartz coyote
#

but ...

#

how does it detect I want the ID and not the name of the queen's sister ... ?

still forum
#

Because you use the variable and the ID is in there?

simple solstice
#

what

#

๐Ÿคฃ

quartz coyote
#

so myactionID is a var ?

#

wut ?

still forum
#

yes?

quartz coyote
#

I don't understand

still forum
#

Okey.

simple solstice
#

yes it's a variable

still forum
#

Maybe you should take the helmet off of your brain

simple solstice
#

something =

quartz coyote
#

Oh that is very nice thanks, it will really help me understand

simple solstice
#

creates a global var

#

that's accessible until you get out

#

of the game

#

and addaction returns the action id

quartz coyote
#

so ... do I define the number of myActionID of does it just happen to be inherited from some mystic place ?

simple solstice
#

the command is designed so it returns the action id

quartz coyote
#

shall I write it like this ?
50 = player addAction....

#

?

still forum
#

No

simple solstice
#

NI

still forum
#

variables have to be names

#

a number is not a name

simple solstice
#

THE COMMAND RETURNS THE ID

#

THATS IT

#

no mystic places

#

no magic

still forum
#

I thought SQF is based on pure magic? Why do so many people think it is if it isn't?

simple solstice
#

look at the return value

quartz coyote
#

Okay I understood :
You affect the addAction to a var. What is written inside of the var is an ARRAY, in the array there is the ID placed in 3rd position and I access it with this select 2

#

yes ?

still forum
#

WTF

simple solstice
#

what

#

dude

still forum
#

addAction returns the ID after you call it. You put that ID into a variable

simple solstice
#

stop complicating things

#

read the first note

#

and that's ir

still forum
#

The array stuff from the wiki page is completly unrelated to this

quartz coyote
#

omg ...

#

so how the FUCK does the var detect it's getting the ID and not the target or the caller ????????

still forum
#

Dude

#

It doesn't

#

addAction returns the ID

#

It returns the ID

simple solstice
#

the engine

still forum
#

The ID

simple solstice
#

the game

still forum
#

ID

simple solstice
#

knows what it creates

#

and it returns to you what it creates

still forum
#

There is only one thing. It's not possible for something else to be there. no need to detect anything

simple solstice
#

you don't get to set the id

#

the game does it for you

#

and returns it to you

#

so you can store it in an variable

quartz coyote
#

......... so why the fuck does the Biki talk about a caller, a ID and bla bla bla and then tells you you have to _this select 2 to get the ID ?????

#

who wrote this ???

still forum
#

it doesn't

#

That's for the code inside the action

#

completly different thing

simple solstice
#

are you writing in SQF or SQS

quartz coyote
#

okkkkkkkkk

simple solstice
#

that note is for SQS

still forum
#

No it's not?

quartz coyote
#

okay well I finaly understood

still forum
#

@quartz coyote Scroll down further

#

"Return Value"

#

That is what it returns.

#

As the name kinda says

#

and you put what it returns into the variable

simple solstice
#

activate_generator.sqs:_gen = _this select 0 _caller = _this select 1 _id = _this select 2 ; remove the action once it is activated _gen removeAction _id

#

he's talking about thst

still forum
#

what

#

No

#

parameters. script. arguments

simple solstice
#

i know but flash is taking about this

#

this is where the confusion came from

still forum
#

But not the thing you just posted

simple solstice
#

......... so why the fuck does the Biki talk about a caller, a ID and bla bla bla and then tells you you have to _this select 2 to get the ID ?????

still forum
#

Because they do?

#

What I linked

#

He cited that perfectly.

quartz coyote
#

what ever, I understood and that's good.
Please guys, keep in mind that if you wanna help ppl that don't understand, keep calm and keep it clear. I didn't learn this shit in school so I struggle. but i'll truggle even more I you don't enjoy helping me or put bad temper in it.

simple solstice
#

but that's for the script

still forum
#

Yes

#

exactly

#

that was the problem

simple solstice
#

so does he want it in the script or in a var

still forum
#

var

simple solstice
#

why would he even consider that

#

well

still forum
#

Brains

#

reading comprehension

quartz coyote
#

I'm considering that because I tryed _id = _this select 2;
player removeAction _id; inside my script but it said "Error zero divisor"

still forum
#

_this is a local variable

#

it doesn't magically know that you want something from a dozen scripts away that might or might not have happened a couple minutes or hours ago

#

And as the wiki also says

quartz coyote
#

but I executed it inside the script that was triggered in my addAction

still forum
#

That stuff is passed in _this to the script that you pass in there

#

_this are the arguments that are passed to a script

quartz coyote
#

yea... so I did write that in the so known script

still forum
#

in your script you ignored whatever was in _this and instead passed []

#

you ignored the arguments. And then you called your function via the spawn with an empty array

quartz coyote
#

omfg

#

that was my original question

#

how do I pass on this IDDDDDDDD

#

put pass on the Array

still forum
#

That's why I asked "inside the actions code?" But you didn't want to answer me

quartz coyote
#

Oh year sorry that was so clear

#

cristal bro

#

Each fucking time I ask you for help you KNOW i'm a Newbie dude

#

and you keep on talking to me as if was a pro

still forum
#

yeah my question was clear. But if you don't want to answer my question for whatever reason. What should I do?

quartz coyote
#

soory but not for me man ...

#

I don't understand your question

still forum
#

No it wasn't at all clear that you are in the actions code.

#

That's why I asked

#

Then tell me that you don't understand the question

#

and I'll try to formulate it differently

quartz coyote
#

I answered with what I had man ...
this is my action
player addAction ["<t color='#ff0000'>CAR</t>",{[] spawn SpawnUCar},[],-1];

still forum
#

You answered with "..."

#

I then just guessed that you mean that you don't understand the question

quartz coyote
#

so, now I do understand you question and I will formulate differently my own question :
How to I get the ID inside my executed script ?

still forum
#

I then asked again. If you are trying to do that inside the code of your action. And then you answer with a completly unrelated thing

#

Instead of yes/no

#

yeah. I would have understood that

quartz coyote
#

sorry, I was completely lost by your question so ...

#

so now, can I and how can I ?

still forum
#

what? Pass _this along to your script?

#

I already said "you ignored whatever was in _this and instead passed []"
So just. Stop passing [] and pass _this instead

quartz coyote
#

Id like to understand how to do a player removeAction ID; inside of my executed script once the player has pressed the action

#

I don't understand how I passed on []

still forum
#

pass _this along to your script. Read the wiki page for 'spawn' on how to do that.
Then use
player removeAction (_this select 2)

#

like The wiki says

#

Look at your addAction code

#

and search for the []

#

The left argument of "spawn" is the parameter that is passed along to the script and then put into the _this variable. As the "spawn" wiki page tells you

quartz coyote
#

Ah okay

#

So

#

I should pass on the ID inside the [HERE] spawn SpawnUCar; ?

copper raven
still forum
#

no

#

just pass _this

#

like I told you atleast 3 times already

#

@copper raven not helpful at all.

#

But thanks

quartz coyote
#

[_this] spawn SpawnUCar; ?

still forum
#

No

#

That passes [_this]