#arma3_scripting

1 messages · Page 531 of 1

coarse plover
#

so I get what the code is, I just wanna know where to put it

#

i.e. putting it in a trigger in mission would be silly

#

but might work

#

wanted to see if there were alternatives that were file based

#

i.e. init.sqf

tranquil shoal
#

idk im learning arma 3 scripting at the moment, as far as i know init is Executed when mission is started (before briefing screen)

peak plover
astral dawn
#

How can I temporarily hide the listbox at the top-left of the map display (the one with briefing and such things)???
I have found their IDC, but if I try to ctrlShow false they appear back at the next frame?

#

😮

chilly wigeon
#

Did you ctrlCommit as well?

astral dawn
#

yeah

chilly wigeon
#

Hmm

astral dawn
#

well, ctrlSetPosition seemed to do the trick xD

#

but it was amusing as hell

cosmic lichen
#

@coarse plover Don't do that. Use ```
if (isServer) then {setTimeMultiplier 0.1;}; //In init.sqf !!!Stopping time entirely isn't possible with this command!!!

coarse plover
#

Ok

#

What's wrong with the loop?

#

also, thanks 😃

cosmic lichen
#

The loop is wrong with the loop

coarse plover
#

well it works

#

I thought you'd say something like it being taxing performance or something but no issues are apparent. I prefer your method though as it's more graceful

jade abyss
#

+You just have to execute that command once. Not constantly

tough abyss
#

Don't do that. Use
check up the wiki, the minimum multiplier is 0.1

cosmic lichen
#

Guess it's because Eden that timeMultiplier is 0

tough abyss
#

I don't understand you. setTimeMultiplier script command is capped. You suggested to use script command.

cosmic lichen
#

Nevermind.

#

@coarse plover M242 is right. setTimeMultiplier can only slow it down to 1/10 of the original speed. Stopping isn't possible.

coarse plover
#

then I'll do as I was! thanks!

cosmic lichen
#

Just make sure setDate is executed on every client because its effect is local.

coarse plover
#

ahhh fantastic ty

tribal stump
#

If I wanted to start my mission a certain way. Would I place a script inside the init.sqf or ?

#

Looking to start a mission so the screen is black and fades to the player few.

coarse plover
#

@cosmic lichen I'm fine to use the loop, the command is fine to execute server wide as long as you're not changing the year

#

just a heads up

#

I did some tests and it works for me and 3 others

#

init.sqf would work for you

tribal stump
#

ok thank you!

tough abyss
#

what happens if you change year?

coarse plover
#

if you modify the year the effect is only server side

#

clients continue to see the same year

tough abyss
#

are you remoteexecuting it?

coarse plover
#

That's what I'm talking about, there's no need to if you don't change the year

#

and I'm not changing the year

#

so remoteexec is not required

#

so, nadda

tough abyss
#

the effect of setDate command is local. The fact that it syncs for clients is not intended behaviour

#

it is the result of some other syncs

#

thus not guaranteed to work

tribal stump
#

@coarse plover Not sure what that link tells me. I think I should give more info.... Im trying to make a mission where both players were in a helo crash. And have the screen fade from black(Maybe with a blur, if possible.) Or fade in and out of black a couple of times until the player is given control.

tribal stump
#

Nevermind. I got. The init.sqf only fires when the mission is started right. It wont fire every time a player dies?

tribal stump
#

Still can't this script to work right. Just fiddling around with the numbers. This is what I'm working with.

0 = [] spawn
{
[1,"BLACK",3,1] call BIS_fnc_fadeEffect;
sleep 15;
[0,"BLACK",3,1] call BIS_fnc_fadeEffect;
sleep 5;
[1,"BLACK",3,1] call BIS_fnc_fadeEffect;
sleep 5;
};

#

I would like the screen to remain black for a good 20 seconds, then have the black fade away for a few seconds. And then repeat a couple times. Until the player is "conscious"

kind marsh
#

hey, i'm pretty new to making missions in arma 3 but i was wondering if there was a way to only have the ai enabled when the player is inside a certain area? (is this the right channel btw?)

tribal stump
#

When you say enabled, do you mean spawned?

kind marsh
#

i have placed ai around the map but i assume that's pretty heavy on the game to have a ton of ai active all the time so i wanted to have them spawned but do nothing until the player is nearby.

#

i'll check it out thanks

tribal stump
#

From my experience in MP. I'd say yes. If you've ever played on servers that are like an insurgency based. A lot of people don't like to have multiple AO's active at the same time. It bogs the server/game down.

#

You could do a wave type system. Just like Nazi Zombies.

#

So when you kill X amount of players, more AI spawn/move into towards the player(s)

kind marsh
#

it will probably just be single player or co op with 1 friend. the thread you linked helps a lot thanks!

zinc rapids
#

I need to change the texture of an object that returns [] when I call getObjectTexture object. I know there is no way to use setObjectTexture so now I'm looking for an alternative solution

tough abyss
#

Make a mod, inherit from the object and apply own texture

young current
#

if the object is configured for changeable textures to begin with

tough abyss
#

Presumably

young current
#

sounds like its not

#

if getObjectTexture returns nothing

#

@zinc rapids what object is it

tough abyss
#

Not all objects that have config textures can be tweaked with scripts

zinc rapids
#

It's a concrete peir

young current
#

those are not set up for texture changing

#

so you cant do it

cosmic lichen
#

@dire star The reason time is synced between players with setDate is most likely due to the reason that the time was set on the server. From there it's automatically synced with all clients by the engine. At least that's how I remember it. I am not sure how often it's synced though.

#

Not sure if that solves the issue.

quartz coyote
#

getMissionLayerEntities did the trick

tough abyss
#

@cosmic lichen Not long ago setDate was not getting synced. And then it did. Nothing was done specifically to it. My guess it happened after weather attempted sync, but in any case it is a byproduct and there are no guarantees

high marsh
#

I thought the sync issue was just with the year?

tough abyss
#

that was never synced and is still not synced. At least now it is JIP compatible

high marsh
#

So JIP clients will have a different date?

tough abyss
#

do you understand what JIP compatible means?

high marsh
#

Yes I misread sorry

tough abyss
#

no worries

tiny wadi
#

Is it possible to check for two event handlers simultaneously?
I want to check for a listbox change as well as an ALT + Left mouse click

#

so a combination of LBSelChanged and MouseButtonDown

#

Possibly I could record the time that the listbox selection occurs and check the time difference in the mouse event?

#

Maybe there is a better way though?

peak plover
#

What time difference?

#

Why are you trying to do

dim kernel
#

How can i load a website on a button click?

spice axle
#

Open your browser. Type a website. Press enter

dim kernel
#

dude

#

on RscButton Click

spice axle
#

Where do you wanna open a website? Give some informations what do you want to do

astral dawn
#

I assume he wants to open a web site with MS Edge when a player clicks a button in arma

brave jungle
#

function called via [this, 0.2] spawn ...functionName...

dim kernel
#

I have a Btn Called "Go To Website" so i want the function of it to open a browser and open the website

brave jungle
#

I don't think you can open websites via button for security reasons.

#

You can open YouTube videos via the command however.

Alternatively, you can have text be clickable via the parseText command

tough abyss
#

@tiny wadi if you add (on)MouseButtonDown EH to the same control, regardless of the order it should fire before the selection EH so you can capture Alt key status from there

#

Or you could use an extension, but that is more complicated

brave jungle
#

the URL fetch by KK right?

tough abyss
#

No, it doesn't open browser

#

has to be custom extension launching browser instance with given URL, could be quite simple but the whitelisting will make it complicated

brave jungle
#

Ahhh

knotty arrow
#

how can i do a WeaponHolderSimulated and players can't take weapons from it

#

?

winter rose
#

disableSimulation I think?

knotty arrow
#

i try it, can i have action too

winter rose
#

I… don't get it?

knotty arrow
#

i have the action and i can pick it

winter rose
#

well then I don't know, why would you need that?

knotty arrow
#

i am doing a csgo case on arma 3

#

and, the animation include an weaponholdersimulated with a rotating weapon

winter rose
#

why not spawn the p3d with simpleObject? I would believe it is possible with the p3d path

knotty arrow
#

because rotating is so weird

#

like jumping rotating

#

and its look weird

#

i use weaponholder rotating weapon from kk

winter rose
#

ah yes, simple object's simulation cycles are more spaced
well, then I don't know

knotty arrow
#

😦

winter rose
#

someone else here may have the answer though

knotty arrow
#

yes, sure

#

i will wait 😦

#

i will try another thing

crisp turtle
#

Gentlemen i'm a complete newb in regards of scripting, but i'm running a small aliens inspired op, and i would like to have a little thing to simulate what is seen in the movies. I'm trying to add an action so that a specific role can move up to a terminal, execute a script that shows the hacking in progress bit, and then unlocks the door.
The door i'm using is an OPtre door, which doesn't have door animations that i can just activate, so i was just thinking of spawning it in with simulation disabled and having it enabled by the end of the action.
The script i'm trying to use to show the hacking is https://www.reddit.com/r/armadev/comments/7gubtp/customisable_keypad_cracker_script/
Any help or pointers on how to do this?

knotty arrow
#

fixed @winter rose
i created an Land_Can_V3_F and attach it the local vehicle, and rotate local vehicle 😃

#

thanks u turn on my light bulb

#

and what do u want to do the script @crisp turtle

calm bloom
#

Hey, guys, im trying to get why exactly my hotkey blocking do not work fine with shift+key combo. May be you get an idea?
As i see in the keydown handler output when you press the shift +key it returns two keydown events - one for shift and one for key with shift combo bool
[[Display #46,42,true,false,false],[Display #46,58,true,false,false],
so, i wonder why doesent it block any key among them?

kka3_reload_handler = {
    disableSerialization;
    _display = (findDisplay 46);
    private _handler = _display displayAddEventHandler ["KeyDown",{
        hintsilent str _this;
        justsee pushback _this;
        [_this select 1,[_this select 2,_this select 3,_this select 4]] in pzn_radiokeybinds;
        // (_this select 1) in pzn_firstradiokeybinds;
    }];
    pzn_transmit_handlers pushback _handler;
};```
crisp turtle
#

@knotty arrow From what i gather the script itself doesn't do anything other than just show a hackign in progress thing and the string getting filled, but at the end of that script exec i'd like to have the door switch to disable simulation to enable simulation, so that they can actually go and open it

knotty arrow
#

maybe u are not using the correct params @calm bloom

#

with shift or ctrl

#

@crisp turtle try with a simple hint to try to work, why u want enable enablesimulation or disable it?

calm bloom
#

holy cow, you are right

knotty arrow
#

😃

calm bloom
#

probably the cba keybinds and keydown event have different order

knotty arrow
#

maybe

crisp turtle
#

@knotty arrow The door i'm using is from OPTRE, and i don't see or know what the animation is to have the door open. But if i disable simulation the player cannot open the door, so if i enable it after they've done the "hacking" they can open it.

knotty arrow
#

try this

#
{
_building setVariable[format["bis_disabled_Door_%1",_x] ,0 ,true];
 } forEach [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20];
crisp turtle
#

uuh, how? I'm sorry, i'm really don't know how to use this 😛

knotty arrow
#

just, the door is on a building right'

#

?

crisp turtle
#

The door is an object itself

knotty arrow
#

ah ok

#

what variable do u use to refer to the door

#

_door?

crisp turtle
#

That has an action "open door", that when used lowers the door

knotty arrow
#

ajam

crisp turtle
#

I sorry for being this dumb kek

knotty arrow
#

no problem

young current
#

look up the doors config in config viewer to see the user actions script

knotty arrow
#

replace _building for ur _Doorvariable

young current
#

it shows what part you can animate

knotty arrow
#

its new goat, i don't think that he know how to do it

young current
#

good time to learn 😄

knotty arrow
#

😃

crisp turtle
#

Perfect, the config viewer won't open.

#

But i'll try, thanks

tough abyss
#

type utils 2 in debug console

crisp turtle
#

Thanks, worked

#

statement = "this animate [""Door_rot"",1];";
Apparently this is what "open door" does

jade abyss
#

try using animateSource

#

Some buildings (e.g. CUP Hangar) use the "source" to animate the whole gate segments as one action.

crisp turtle
#

Oh good lord that worked

wispy cave
#

On the subject of animating doors, I'm currently using sqf fish animateDoor ["Door_1_source", 1];
Which successfully opens the ramp of a blackfish fully. However I want to level out the ramp instead of opening it, is this possible?

tough abyss
#

what do you think 1 does?

wispy cave
#

I tried 0.8 and rad(0.8) to open it halfway

#

Neither worked

tough abyss
#

then you did it wrong

#

because it is the animation phase and it should animate up to it and stop

wispy cave
#

Tried a few more things, values equal to and lower than 0.5 close the ramp fully, values equal to and greater than 0.6 open it fully

tough abyss
#

I apologise, it seems the command is broken and the phase is rounded

crisp turtle
#

Memlegen, i managed to do the thing i wanted to do with
hacker init

this setVariable ["allowhack",true];```
keypad init

```sqf
this addAction 
[ 
 "Hack Keypad",
 { execVM "keypad.sqf"; sleep 15; blastdoor animatesource ["source_door_1",1]},
 nil,
 6,
 true,
 true,
 "",
 "(_target distance _this) < 4 && _this getVariable ['allowhack',false]" 
];```

And it works in SP.
Put it on my Server, doesn't work anymore. The keypad bit shows up, but when the timer hits 15 the animation doesn't start. Anyone has any idea how to fix this?
winter rose
#

@crisp turtle please use ```sqf ``` around your code

crisp turtle
#

Was trying to fix that yeah

winter rose
#

as in
```sqf
hint "hello world";
```

hint "hello world"; ```
crisp turtle
#

Fixed it, thanks

tough abyss
#

(_target distance _this) < 4 you can set it in action params

quartz coyote
#

Hello all.
Question :
if I set public as true in varspace setVariable [name, value, public] will all varspaces be updated with the same value or will the value still only be related to the varspace but all varspaces will know that this particulare varspace has a variable holding this particular value ?

#

In what is it different from a simple
name = value; publicVariable "name"; ?

still forum
#

one varspace

#

your second code will be the same if varspace is currentNamespace

#

"but all varspaces will know that this particulare varspace has a variable holding this particular value" varspaces don't know anything about eachother

quartz coyote
#

I meant clients

#

so...

#

if playerA has : player setVariable ["MyVAR", true, true];
It don't necessarily mean that playerB has MyVAR = true right ?

still forum
#

corrrect

quartz coyote
#

ah great

still forum
#

if you set a variable on objectA it won't suddenly appear on objectB

quartz coyote
#

okay be ojectB will still know that objectA has that var holding that value right ?

#

that's why it's made public

tough abyss
#

if varspace is currentNamespace
currentNamespace can be not missionNamespace and so it will fail

still forum
#

objects can't "Know" anything

#

"currentNamespace can be not missionNamespace and so it will fail" what?

#

default namespace is mission.

#

so currentNamespace will be missionNamespace

tough abyss
#

currentNamespace is currentNamespace

still forum
#

No it's not

tough abyss
#

yes it is

still forum
#

No

#

Test it

#

Or read the wiki page

quartz coyote
#

Hold on, you can argue on that later.
Don't loose me in my learning

still forum
#

there is no "current" namespace

tough abyss
still forum
#

currentNamespace is a command, that returns the, current, namespace

tough abyss
#

currentNamespace is whatever namespace your script is running in

still forum
#

Yes

#

which is normally missionNamespace

tough abyss
#

and could be uinamespace which is not broadcastable

still forum
#

except in UI eventhandlers or config scripts

#

Well in that case what I said is still true

#

publicVariable won't work in uiNamespace either

#

@quartz coyote all "machines" will see that variable on that object

#

machine can be a player or server or headless client

quartz coyote
#

that's what I meant with my non-expert language.
Thanks for understanding me 😉

still forum
#

Many people miss the difference between player and a player and machine

#

all are different things, kinda

astral tendon
#

how to get the vehicle actual name, not it class or variable?

still forum
#

what do you consider a "name" ?

astral tendon
#

Dedmen

still forum
#

Vehicles usually don't have names

#

Humans give names to living things usually

astral tendon
#

Like the gorgon?

still forum
#

Tell me what you mean by name

#

a variable name and a classname are both names

#

but if that's not what you want, what do you want instead

#

The name displayed in editor? when you try to place the vehicle

astral tendon
#

Im looking at a gorgon, hes variable is IFV so im using CursorObject and returns IFV, but I want hes name that he is called as "Gorgon", so how do I get that?

still forum
#

I think you might be talking about the displayName?

#

the name displayed in 3DEN on the right side in the unit panel

astral tendon
#

but how do I get that in game and in a script?

still forum
#

from the vehicles config

#

and you get the config using the vehicles classname

#

which you get via typeOf

#

getText (configFile >> "CfgVehicles" >> _classname >> "displayName")

astral tendon
#

So it will look like this

_classname = typeOf cursorObject;
getText (configFile >> "CfgVehicles" >> _classname >> "displayName");

Returns "Pandur II" (because of ACE)

still forum
#

yeah

astral tendon
#

Thats what I need, tanks.

fleet hazel
#

Guys. I have a horizontal scroll bar. how to make the mouse wheel turn this strip?

digital jacinth
#

the side of thep player can differ from the side of the group the player is in. You are probably setting the player captive.

#

so instead of side player use side group player

winter rose
#

isn't there a playerSide somewhere?

digital jacinth
#

playerSide will not show correct side if player joins a group that was not his original side.

#

something like this normally does not happen, but eh.

#

side group _unit works for AI as well, so i recommend it over the other command

exotic tinsel
#

Would anyone be willing to Talk to me about options available to prevent client side hacking. We are planning to start a server with a server side addon that is not required for down load on the client. We have been told that this will prevent us from enabling validation of signatures and file patching which will make us vulnerable to client side hacking and script bunnies.

We really need some positive advice/direction on things we can do the minimize this, because as it stands I may not host the server at all if we cant find anything. Please private message if your willing to talk about it or tag me here with your thoughts.
Thanks

hollow thistle
#

You should either remove this msg or one in #arma3_config , crossposting is not allowed here. @exotic tinsel

exotic tinsel
#

@hollow thistle done

shut torrent
#

Truth be told you can’t prevent it @exotic tinsel

#

Well you can attempt to prevent it but you can’t stop it...

hollow thistle
#

Also you can enable signature validations with server only addons, not sure where you got information that you can't do that.

shut torrent
#

Also, to help you have a little bit of a better understanding, when you use client side saves, this means, somehow, somewhere the users save will be stored on their own computer. Which of course means at any moment they can find it, edit/modify it to their liking, and do as they wish. That’s why you should have server sided saves instead, this enables the save to be saved to their computer, however when they connect to your server there is a server check between the save they have and the save your server has and it autocorrect whatever variables to the ones that were saved upon previous logouts/server restarts

dim kernel
#

anyone knows the displayname for the settings?

#

because i reworked the Escape Menu but i dont know the settings name

astral dawn
#

Is there some SQF command that provides good resolution timer? diag_tickTime provides only 1ms resolution 😢

#

or is it Intercept time again 😄

dim kernel
#

anyone knows where i can find them?

astral dawn
#

@dim kernel you mean the display's class name?

dim kernel
#

ye

exotic tinsel
#

@shut torrent is it possible for players to modify mission files once they join the server for example the onRespawn file?

dim kernel
#

for example this is the escape menu RscDisplayMovieInterrupt

#

but i want the video settings and audio etc

shut torrent
#

As long as you continuously run server checks upon login/logout no

#

Not that I know of at least

exotic tinsel
#

@shut torrent where do i enable that? do you got a link or something?

shut torrent
#

You have to create the server checks yourself as far as I’m aware

#

And usually you have to be running your own server

exotic tinsel
#

@hollow thistle thanks for the info that reassures me, ill set it up. thanks

shut torrent
#

And run checks through a “link”

#

I’d help you if I could but unfortunately that’s way above my pay grade which is why I don’t run dedicated servers of my own lol

exotic tinsel
#

@shut torrent we have a dedicated server. ok, any other things we can do? ill have to do some research on what you mean by creating server checks

shut torrent
#

Okay, what do you run the server with?

#

A droplet?

exotic tinsel
#

not sure another guy deals with that. i just write the code for the server.

shut torrent
#

Server checks would go through your serverinit I believe

exotic tinsel
#

is it some kind of process for checking their files or something?

shut torrent
#

Somewhat

#

Not checking files

#

Just their saves

exotic tinsel
#

we dont have saves enabled.

shut torrent
#

Assuming they save when they exit and it remains the same when they log back in

#

Ahhh okay

#

So as they log out you wipe the character

exotic tinsel
#

we dont do anything on our part, but we dont have saves enabled on the server. when they connect they spawn at a default location with a kit and go do missions then disconnect and repeat next time they log on. sever restarts every 24 hours we dont use DB. its not progressive server just quick access to combat action

shut torrent
#

Oh, then your main focus will be script bunnies

exotic tinsel
#

yes! def

#

any suggestions on measures we can take when using server side only addons

shut torrent
#

Well what are you trying to prevent? Start up “hacking” or in progress “hacking”

exotic tinsel
#

both, we are not knowledgeable of this side of arma configuration and research is limiting on the topic.

shut torrent
#

Well, usually if you’re looking to prevent that kinda stuff you’re running a dedicated “life” server so to speak which progresses as time goes on. In terms of a quick mission, I mean besides reiterating the checks I was talking about earlier there’s really no quick fixes... Even with the checks it’s not always guaranteed to prevent. Hence why you have programs like battleeye anticheat software etc

#

Besides if people wanted to hack a quick mission then that’s on them. I personally don’t think it’s worth putting all that time and effort into that when they can still technically bypass these things. Besides who would wanna hack anyways, it destroys the fun in missions that were created with the intent of providing it.

#

Just my two cents

exotic tinsel
#

much appreciated

shut torrent
#

No problem, best of luck to you!

tough abyss
#

Hey, sorry to butt in, I'm experimenting around with scripting and the editor a bit and have been trying to use documentation to the best of my abilities and could figure a few problems out myself, but this has me stumped.
What I'm basically trying to make an AI do is

  1. wait until player enters their vehicle (a helicopter, in this case)
  2. then navigate to a waypoint and drop them off
    My code 'til now looks like this: sqf [] spawn { _group = group (_this select 0); _pos = getMarkerPos ["Marker1", true]; waitUntil {sleep 1; player in (crew heli1)}; _wp = _group addWaypoint [_pos, 0]; _wp setWaypointType "TR UNLOAD"; }However, I seem to not quite grasp scopes well? I found out that I would need this [] spawn { } structure to use waitUntil and sleep in the unit's Init, but I can't figure out why the variables I define seem to not stay that way. The error in specific I'm getting is Undefined variable in expression: _group. If anyone could help me out with this or point me in the right direction, I'd gladly appreciate it!
shut torrent
#

There’s multiple YouTube videos on insertion/extraction

#

Give me a sec and I’ll link you one

#

That I found most helpful starting off

#

@tough abyss

tough abyss
#

Thanks, I'll check it out and report back

shut torrent
#

👍🏾

#

Reconvert into an mp3

#

Oh

#

That not sure

tough abyss
#

The method in the video does seem easier, though I'd like it to choose randomly from a group of markers, once I get to that point, can I incorporate that into the method shown in the video somehow? Perhaps by moving the existing waypoint?

shut torrent
#

So essentially you want it to randomly choose a path and then have it insert upon waypoint of the chosen path?

#

@tough abyss

tough abyss
#

well, basically I have, say, five markers, so five potential places for landing/insertion

#

I don't really care much for the path as they're all around the same general area, placed around a town

shut torrent
#

Okay

#

That is a topic that I created a while back

#

Take a look and use what you’re after

tough abyss
#

Will do, thanks

shut torrent
#

No problem

still forum
#

@exotic tinsel
We are planning to start a server with a server side addon that is not required for down load on the client. good idea.
We have been told that this will prevent us from enabling validation of signatures and file patching First one is bullcrap, second one.. Well yeah, filepatching is disabled by default, and should be left disabled (though you can enable it only on server and still stay save)
which will make us vulnerable to client side hacking and script bunnies if you really disable signature verification then yes, sure.
@astral dawn diag_tickTime provides only 1ms resolution where did you get that from? It provides time since game start in seconds, with the max resolution a float can do, which is about 7 decimal places I think? That's more than microsecond precision, not millisecond.

Might be intercept time yes, depends on what you are actually trying to do

@carmine oak with a script command no

tough abyss
#

@astral dawn if you need better time make extension

astral dawn
#

Does your profiler has a timer lying around maybe?

still forum
#

profiler has no script command to report time

#

how have you confirmed it?

#

you know that converting numbers to string without toFixed will truncate them?

astral dawn
#

Well we have a function wrapper that measures execution time and logs it. So I hit the 'measure performance' button in the console, and it reports that my function is taking like 200 microseconds. I check my logs, they report 1ms time difference (from the wrapper).

#

But i didnt convert seconds to milliseconds, I will try that maybe

still forum
#

again, logging numbers truncates and rounds them, unless you use toFixed

astral dawn
#

But if it says on wiki that resolution is 1ms?? :/

#

Am I supposed to not believe it?

still forum
#

Wiki is written by the community

#

toFixed script command is newer than that note on the diag_tickTime page

astral dawn
#

Ok I will see if my issue is a conversion problem

still forum
#

The wiki is usually right, but not always

#

You might also check time. I don't think there is a command to get uiTime?

astral dawn
#

Nah I couldnt find uitime

#

Time gets accelerated unfortunately, but might divide it by acc factor

still forum
#

I remember some time command that directly takes system clock 🤔

astral dawn
#

Anyway, floating point is only like 6 decimal places? After 1hr it will be 1ms anyway

still forum
#

I've added a command to my profiler todo list
will return
[seconds, microseconds, nanoseconds] since game start.
With a 3 element array you can nicely use vectorDiff too

astral dawn
#

Yeah it would be cool. I have thought of something like 2 commands to start and stop measurements, and return the results. But it would need to work with scopes 🤔 probably would need to be wrapped in variables somehow

still forum
#

If tickTime is really only 1ms then SQF-VM is broke 😄

#

Well you can just grab time at start and end, and then vectorDiff them

#

Will only use rounded whole numbers. Which means precise up till 16777216 seconds. 4660 hours. Should be enough

#

Biggest microsecond value would be 999999 which is still well within the precision.
And nanoseconds only go up till 999.

still forum
#

@astral dawn ^ derp
Please tell me when you tested diag_tickTime. If the 1ms precision is correct, SQF-VM needs to be fixed

astral dawn
#

oh wow, I just got up and you have already done it and built it :D
Yes I will test diag_ticktime now!

still forum
#

I thought I couldn't build because I don't have the certificate at work, but turns out I have 🤔

astral dawn
#
_dummyLoad = {
_size = 60;
_a = []; _a resize _size;
_b = []; _b resize _size;
_a = _a apply {666};
_b = _b apply {666};
private _i = 0;
while {_i < _size} do {
_b set [_i, (_b select _i) + _i*(_a select _i)];
_i = _i + 1;
};
};

private _diffs = [];
private _nExp = 10;
for "_i" from 0 to _nExp do {
private _tStart = diag_tickTime;
call _dummyLoad;
private _tEnd = diag_tickTime;
private _tDiff = (_tEnd-_tStart)*1000000; // Convert to us
_diffs pushBack _tDiff;
};

_diffs

On my computer it gives: [0,976.563,0,0,0,0,0,1007.08,0,0,0]

#

So yes it is 1ms

#

Why would sqf-vm need to be fixed though?

still forum
#

because sqfvm is not limited to 1ms precision

#

And again, you are not printing with toFixed

#

so the numbers get truncated :U
But converting to µs fixes it? But the numbers you printed don't look like µs

astral dawn
#

1000us is 1ms and we get roughly 1ms 🤷

#

I could do round and it would be ok for this case

still forum
#

If it were 1ms precision, you would get exactly 1ms.
🤔

astral dawn
#

Maybe it's artificially limited to 1ms? I don't know

still forum
#

Ah now I see, it flips between 0 and roughly 1ms.
It should be exaclty 1ms tho 🤔 wtf
Unless your precision is already so far off... But it should be exact for atleast a couple hours

astral dawn
#

I ran the game for a few minutes 🤷

#

so last two elements are 0 always, first one seems to be nanoseconds

quartz coyote
#

Hello all. i'm having trouble with the select command. I'm obviously miss understanding something.
I'm trying to return true if the nearest man within 25m of my marker is of type b_soldier_f and false if not

nearestObjects [getMarkerPos "spawnLoc5", ["Man"], 25] select {typeOf vehicle _x isEqualTo "b_soldier_f"}```
Can't understand what i'm not doing wrong
winter rose
#

why not use nearestObject ?

still forum
#

🤦 crap, brain no worky

quartz coyote
#

because there might be more than one

#

and the end objective is to count the number of them

#
count (nearestObjects [getMarkerPos "spawnLoc5", ["Man"], 25] select {typeOf vehicle _x isEqualTo "b_soldier_f"}
)```
still forum
#

Then use count?

winter rose
#

if the nearest man within 25m of my marker is of type b_soldier_f
^ it's a one man request?

still forum
#

Your isEqualTo will never return true, as isEqualTo is case sensitive and your classname is wrong.

#

use
{condition} count (nearestObjects [...])

quartz coyote
#

ah

#

okay

still forum
#

Also nearestObjects takes classnames, if you want to filter by classnames, why don't you just do that in there?

#

nearestObjects [getMarkerPos "spawnLoc5", ["b_soldier_f"], 25]
done?

quartz coyote
#

oh I didn't realise it took classnames I thought it took only "type"

#

okay thx

still forum
#

The description on wiki page says "Classname"

quartz coyote
#

i'm not gonna argue on the pedagogic level of the wiki...

#

Is there a way to delete the "" around a value ?

#

for example :

#

I have an array in which I have values like "value"

#

is there some sort of !str

winter rose
#

select

quartz coyote
#

oh ?

still forum
#

What is the value

#

Where did you get it from?

winter rose
#
"myString" select [1, 4] = "yStr" ```
quartz coyote
#

I defined the value

still forum
#

are you sure there are " around the value? Or just around where you display the value? strings get quoted in debug console, but contain no quotes

quartz coyote
#

wait. lemme be a bit more clear

#

array = ["value1", "value2", "value3", "value4"]
in this array, my _x is going to be "value1" and so on.
But in some specific cases I want my _x to be value1 and not "value1"

still forum
#

what would value1 be

#

a variable name?

quartz coyote
#

it's a marker name

still forum
#

marker names are strings

quartz coyote
#

and i'm trying to use it as namespace

still forum
#

markers have no namespaces

quartz coyote
#

fak

#

So if I want to be able to use my var in any namespace i'd use missionNamespace ?

#

yes. I already knew the answer here.

#

sorry

still forum
#

@astral dawn ^
My mistake never happened 🙊

astral dawn
#

Will try that!

quartz coyote
#

I have multiple vars format [string, number].
Is it possible to sort all those vars (in an array maybe?) only on index 1 of each var ?

astral dawn
#

if you can convert it into [number, string] then sort command can sort it

quartz coyote
#

sure

#

ok i'll look into it

#

Ah I see

#

nice

#

that'll work

astral dawn
#

@still forum It's alive!!

private _tStart = profilerTime;
_a = atan 90 + cos 90 + sin 0 + 1 atan2 1;
private _tEnd = profilerTime;
private _tDiff = _tEnd vectorDiff _tStart;
// Convert to microseconds
private _us = 0.000001*(_tDiff#0) + (_tDiff#1) + 0.001*(_tDiff#2);
_us
still forum
#

If you add them all back together you're loosing precision :u

astral dawn
#

well if I aim for microseconds then I'm good but yes

still forum
#

Well seconds will mooooooooost likely always be 0, so it won't matter

astral dawn
#

I just hope you don't disable it in scheduled >_>

still forum
#

+ 0.001*(_tDiff#2) did you mean *1000 ?

#

Nah that command works everywhere

astral dawn
#

1000 nanoseconds is 1 microsecond

#

so if I get 999... then I must convert it to 1 microsecond.... by dividing it by 1000

still forum
#

Okey, the seconds things is wrong then

astral dawn
#

ah yeah lol

#

xD

still forum
#

Didn't know which, just knew one must be wrong

astral dawn
#

when I first made this I had both wrong 🤦

quartz coyote
#

I'm struggling with my arrays :
I have arrayA = [var0,var1,var2,...] in which each var is format [number, string].
I'd like to create an arrayB only holding the vars from arrayA that have a matching string in index 1.
How would I do that ?

still forum
#

arrayA select {_x select 1 == "string you wanna have"}

#

select all values where condition is true

quartz coyote
#

😮

#

that simple

#

it seams I always overthink things.

spark turret
#

Hello i have ran into an issue: I spawn crates and fill them with material from an array, always checking if theres enough space in the crate befor ethe next item gets added. Now, with rocket launchers, if i take one out of the crate by hand, and place it back in, it suddenly takes up 3 times the amout of "space". any idea why that is?

if (_crate canAdd [_SanMatActual,_numberAdd]) then
{_crate addItemCargoGlobal [_SanMatActual,_numberAdd];};

#

it only seems to affect the rocket launchers

still forum
#

I remember some mass problem with rocket launchers, also from normal inventory

#

Something about mass of ammo being counted twice

spark turret
#

is there a way to fill the crate using the same "sized" launchers that the player will experience?

#

so if i take one out, im able to put it back in

quartz coyote
#

is there a nameSpace for a "Side" ? west / East ...

spark turret
#

yes

#

its west and easy

#

east*

quartz coyote
#

you mean if I do WEST setVariable ["myVar", true] it'll be available only for Blufor sided ?

spark turret
#

um

still forum
#

no

spark turret
#

no, afaik declaring a variable west doesnt do anything.

still forum
#

it'll be available only for Blufor sided that is in general not at all how namespaces work

spark turret
#

flashranger are you trying to unlock something for one side only?

quartz coyote
#

i'm just trying to make a variable available and defined only on one side

#

please @still forum you know I can't put the correct words on what I mean.

spark turret
#

make 2 variables, one for east one for west?

quartz coyote
#

right ... but how would I do that 😄

still forum
#

You can call setVariable via remoteExec and give it a side as target
and just set in missionNamespace

quartz coyote
#

that's what i'm asking

#

ah

spark turret
#

_BooleanWest = false; _booleanEast = true

#

something like that

quartz coyote
#

@still forum but I thought missionNamespace was a namespace available to all "machines"

still forum
#

I don't think you understood namespaces

quartz coyote
#

probably not

still forum
#

All namespaces (Except local only locations or local only vehicles) are available everywhere

quartz coyote
#

so ... when I do player setVariable ... don't I define a variable only for player ?

still forum
#

You do

#

on the object that the player script command returns

#

But everyone can access that objects namespace

#

But if you don't make the variable "public" the others won't know that it exists

quartz coyote
#

AH !

#

okay

#

so what is missionNamespace ?

still forum
#

It's just a pre-defined namespace that everyone has

#

just like uiNamespace and profileNamespace

#

but missionNamespace get's cleared at mission end

quartz coyote
#

so when I do myVar = true, what namespace is it sent to ?

still forum
#

I think you can imagine it like emails.

On your computer you store emails in multiple folders, the namespaces.
missionNamespace setVariable ["test", "value"]
You store a E-Mail named "test" in the folder "missionNamespace" and with the content "value"

Now your friend in another country has the same folders. But if you didn't send the E-Mail to him, he can't see the email that you stored in your folder.
If you do
missionNamespace setVariable ["test", "value", true]
You create a E-Mail, and send it to all (true) your friends. So all your friends will now also have a "test" email in their "missionNamespace" folder.

#

what namespace is it sent to currentNamespace, which is generally missionNamespace.

quartz coyote
#

I understand

#

more or less

#

still syfy but it'll blur out eventually

#

so, back to my first issue : if I want send a variable only to blufor side i'd remoteExec it.

remoteExec [myVar, WEST]``` ???
still forum
#

Read again what i wrote

#

I didn't say to remoteExec a variable.

#

Which btw makes no sense if you read the wiki page

quartz coyote
#

ooooh

#

lemme try again

#
[missionNamespace, ["myVar", value]] remoteExec ["setVariable", WEST];```
#

cool

quartz coyote
#

if I have arayA = [var0, var1, var2] (values would be [1, 6, 5])
and I do a array sort false it'll return [6, 5, 1].
Is there a way for it to return [var1, var2, var0] instead ?

still forum
#

but.. that's equivalent?

#

what are you trying to do

quartz coyote
#

yes but i'd like it to return the name of the variable and not it's value

still forum
#

That doesn't work

quartz coyote
#

shit

still forum
#

You can't put variables into an array

#

it resolves th variables, and then puts the value into the array

#

and the value doesn't know which variable it came from

quartz coyote
#

I see

#

okay i'm stalling. I'm trying to do something which is probably very simple but not thinking it the right way and trying stupid things like this.

#

I'm trying to create a respawn system that would take into account, the number of friendlies, the number of enemies of each locations, and select the safest one.

#

so for now i've done this but don't know how to exploit it ...

tdmSpawnLocations = ["spawnLoc0", "spawnLoc1", "spawnLoc2", "spawnLoc3", "spawnLoc4", "spawnLoc5", "spawnLoc6", "spawnLoc7"];
{
    if (count nearestObjects [getMarkerPos _x, ["b_soldier_f"], 25] > count nearestObjects [getMarkerPos _x, ["o_soldier_f"], 25]) then
    {
        missionNamespace setVariable ["spawnLoc"+ str _forEachIndex, [count nearestObjects [getMarkerPos _x, ["b_soldier_f"], 25],"blufor"], true];
    };

    if (count nearestObjects [getMarkerPos _x, ["o_soldier_f"], 25] > count nearestObjects [getMarkerPos _x, ["b_soldier_f"], 25]) then
    {
        missionNamespace setVariable ["spawnLoc"+ str _forEachIndex, [count nearestObjects [getMarkerPos _x, ["o_soldier_f"], 25],"opfor"], true];
    };

    if (count nearestObjects [getMarkerPos _x, ["b_soldier_f"], 25] isEqualTo count nearestObjects [getMarkerPos _x, ["o_soldier_f"], 25]) then
    {
        missionNamespace setVariable ["spawnLoc"+ str _forEachIndex, [count nearestObjects [getMarkerPos _x, ["b_soldier_f"], 25] + count nearestObjects [getMarkerPos _x, ["o_soldier_f"], 25],"allOrNone"], true];
    };
} forEach tdmSpawnLocations;```
#

in a loop it'll update every variable (corresponding to every marker) with the amount of friendly and the side that dominating

still forum
#

Why are you executing the same code 4 times, instead of just doing it once and storing it in a variable?

quartz coyote
#

probably because I don't know how to do it, or if I do, I can't think of a way to write it down ?

still forum
#
tdmSpawnLocations = ["spawnLoc0", "spawnLoc1", "spawnLoc2", "spawnLoc3", "spawnLoc4", "spawnLoc5", "spawnLoc6", "spawnLoc7"];
{
    _nearBlufor = count nearestObjects [getMarkerPos _x, ["b_soldier_f"], 25];
    _nearOpfor = count nearestObjects [getMarkerPos _x, ["o_soldier_f"], 25];

    if (_nearBlufor > _nearOpfor) then
    {
        missionNamespace setVariable ["spawnLoc"+ str _forEachIndex, [_nearBlufor,"blufor"], true];
    };

    if (_nearOpfor > _nearBlufor) then
    {
        missionNamespace setVariable ["spawnLoc"+ str _forEachIndex, [_nearOpfor,"opfor"], true];
    };

    if (_nearBlufor isEqualTo _nearOpfor) then
    {
        missionNamespace setVariable ["spawnLoc"+ str _forEachIndex, [_nearBlufor + _nearOpfor,"allOrNone"], true];
    };
} forEach tdmSpawnLocations;
quartz coyote
#

oooh

still forum
#

where do you have variables in there who'se names you need to get?

quartz coyote
#

right I understand what you meant

#

what ?

quartz coyote
#

"spawnLoc"+ str _forEachIndex

still forum
#

Wait...

#

Why?

quartz coyote
#

will correspond to all the markers in tdmSpawnLocations

still forum
#

Just use _x

#

you are iterating through marker names

#

the name will be in _x

#

just use the name instead of building it with forEachIndex 🤔

quartz coyote
#

mmmh, wait one. brain processing.

#

true.

#

but that's just righting my script correctly. I'm still not getting how to move forwards from there

still forum
#

You want to find the marker which has the least enemy units?

quartz coyote
#

yes

#

or the most allies

#

what ever, same to me

still forum
#

Why even set variable to missionNamespace, that just makes it more complicated

#

Can the player be blufor and opfor?

quartz coyote
#

I understand that. That's probably why I'm lost

still forum
#

does it need to automatically choose the right side?

quartz coyote
#

this code is executed server-side. i'd like it to do all the calculation and publish the two markers (one for blufor and one for opfor) that are the safest

#

so that the client can simple do a teleportation on his side's safest location (marker)

still forum
#

Can just sort to have the most blufor marker at one end, and the most opfor marker at other end

quartz coyote
#

how ?

still forum
#

If there are more blufor than opfor.
Take the blufor number but make it negative (so it will always be at the low end)
if more opfor, take opfor number at keep it positive (so it will always be at high end)
Then if you sort, you'll have the biggest blufor numbers at the start, and biggest opfor numbers at the end

quartz coyote
#

right but how do I link the numbers I have to the name of my marker

#

that's what I don't get

still forum
#

Put the marker name into the array

#

You already have array with number and "blufor" string, just add the marker name to the end of it

#

I'll show you

quartz coyote
#

oh ... smart

#

hadn't thought about it

#
missionNamespace setVariable [_x, [_nearBlufor,"blufor", str _x], true];```
#

like this ?

still forum
#

No that makes it still hard, as you have to check all the marker variables and then filter it somehow

#
tdmSpawnLocations = ["spawnLoc0", "spawnLoc1", "spawnLoc2", "spawnLoc3", "spawnLoc4", "spawnLoc5", "spawnLoc6", "spawnLoc7"];
_sortedSpawnLocations = tdmSpawnLocations apply {
    _nearBlufor = count nearestObjects [getMarkerPos _x, ["b_soldier_f"], 25];
    _nearOpfor = count nearestObjects [getMarkerPos _x, ["o_soldier_f"], 25];

    switch true do {
        case (_nearBlufor > _nearOpfor): {[-_nearBlufor, _x]};
        case (_nearOpfor > _nearBlufor): {[_nearOpfor, _x]};
        case (_nearBlufor isEqualTo _nearOpfor): {[0, _x]};
    }
};

//Array contains [unit count, markername] where unitcount is negative for blufor, and positive for opfor.

_sortedSpawnLocations sort true; //Sort ascending, negative blufor values will be at front, high opfor values will be at back, 0 values for equal or empty will be in middle.

_bluforMarker = _sortedSpawnLocations select 0; //Select first element, highest number of blufor units
_opforMarker = _sortedSpawnLocations select (count _sortedSpawnLocations - 1); //Select last element, highest number of opfor units
quartz coyote
#

okay

still forum
#

Btw you don't need nearestObjects I think. nearestObjects sorts by distance, but you don't care about sorting.
nearObjects is probably cheaper

quartz coyote
#

ah yes

#

true

#
_nearBlufor = count (getMarkerPos _x nearObjects [["b_soldier_f"], 25]);
_nearOpfor = count (getMarkerPos _x nearObjects [["o_soldier_f"], 25]);``` ?
still forum
#

Yeah. Looks correct

quartz coyote
#

I've got a question that has no connection with the previous :
for local variable, often I see that they are declared with private _myVar but it works the same with a simple _myVar so what's the point of the private ?

still forum
#

makes sure you are not overwriting anything

#
_myVar = 5;
call {
_myVar = 6; //Overwrites _myVar from above
}
quartz coyote
#

I see

#

I'm getting an error

missing ;```
still forum
#

oops. one ] too many

quartz coyote
#

oh found it

#

yeah

plucky schooner
#

Hello! I am encountering an issue with dialogs. The issue is that the eventhandler im adding is running, but not executing the function im giving it. I can verify this by adding diag_log _this; to the event handler. it will log the control and the index (when using LBSelChanged with ctrlSetEventHandler). but wont execute the function.

disableSerialization;
createDialog "RscMUGKit";
waitUntil { !isNull (uiNamespace getVariable ["RscMUGKit", displayNull])};
_display = (uiNamespace getVariable ["RscMUGKit", displayNull]);
_listCombo = _display displayCtrl 99350;
_listCombo ctrlSetEventHandler ["LBSelChanged", "diag_log _this; _this call MUG_Kit_onLCSelChanged"];

The dialog gets created and will add stuff to the ListComboBox but when I click on something thats inside the ListComboBox, it will not execute MUG_Kit_onLCSelChanged, but WILL execute diag_log _this;.

Any help would be appricated!

still forum
#

And you are sure that MUG_Kit_onLCSelChanged is correct?

jade abyss
#

Are you sure that MUG_Kit_onLCSelChanged is correct?

#

looooooooool

still forum
#

functions usually have _fnc_ in the name

#

👋

jade abyss
#

Dude, thats scary

plucky schooner
#

I am using missionNamespace setVariable with the function name and code

jade abyss
#

And when you call the function via console, it works?

still forum
#

uiEventhandlers might run in uiNamespace

jade abyss
#

Cause sometimes a missing } can bork up everything, without giving you an ErrorMsg

still forum
#

not missionNamespace

#

Use CfgFunctions :U (not sure if description.ext CfgFunctions puts into uiNamespace, but mod CfgFunctions does)

plucky schooner
#

Found a missing " inside MUG_Kit_onLCSelChanged

jade abyss
#

😉

plucky schooner
#

Had a few other mistakes, thankfully they got reported in the RPTs , seem to be running now

keen bough
#

i made a cfgSounds.hpp and included it in my description.ext. But, since i cant see some forum entrys? hm... but what do i write in the .hpp file now to get my test.ogg sound and test1.ogg sound working?

tough abyss
#

Any clue why createVehicleCrew _veh; isn't returning the Group of the crew, as it claims to in the documentation?

_veh = _type createVehicle _spawnPointBLUFOR;
_group = createVehicleCrew _veh;
_wp = _group addWaypoint [_waypointPosition, -1];```
`Undefined variable _group`
`_wp = |#|_group addWaypoint [_waypointPosition, -1];`
#

Is there a delay perhaps?

still forum
#

You gotta read the whole documentation

#

Since Arma 3 v1.93.145652 this command will
Return Value: Group - the group of the created crew (since Arma 3 v1.93.145652)

tough abyss
#

I suppose I can get 1.93 through a beta?

still forum
#

dev branch yes

tough abyss
#

then I'll at least have all the stuff mentioned in the docs, hopefully

#

thanks

cosmic lichen
#

What would be the easiest way to transform [1,1,1] to {1,1,1} ?

still forum
#

inside a string you mean?

cosmic lichen
#

yep

#

"[1,1,1]" to {1,1,1} or "{1,1,1,1}"

still forum
#

select to cut off first and last character

#

then add {} back

cosmic lichen
#

Alright

#

That's what I planned to do.

swift yacht
#

Do the Arma 3 dev team want to add setObjectTexture for Vests and Headgear too?

keen bough
#

How do i approach a while-loop with an addaction to wait that you used an action to determine an effect. Like changing a variable so an ied would explode or anything?

I cant return something with an addAction.

So how could i approach it that an ied waits (we say that it doesnt explode because the guy knows what he is doing) until someone starts to cut wires.

wispy cave
#

Use while {someGlobalVar} do [] and in the addaction set that var to false

keen bough
#

mh, cant do. Its a general function. Currently i call a function that spawns, after creating an object, a check if a player runs too fast and so on. I would know how to do it complex but i try currently to do it all in one.

wispy cave
#

Use setVariable on the object the action is assigned to and have the condition in that while check for that var with getvariable

keen bough
#

_myIed setVariable ["whateveriwant", thisisinit, false];
In the addAction i can then getVariable that data, change it again with setVariable and with an if-statement i can say then "Yup, i got the new stuff. Done"?

And it wont be a public global variable so i can do this for 100 ieds spawned in with the function? (just for understanding)

wispy cave
#

It's possible yes, don't know how you're doing stuff so I can't say if you will be able to

keen bough
#

I start the function, and do
_iedObject setVariable ["bombDefusal", "Neutral", false];

Then i spawn the check if a player is near the ied and yadda yadda. Within the spawn i have the addaction that runs through once (to be added) and within the code-part in the addaction i do

_iedObject setVariable ["bombDefusal", "Red", false];

And within the while i hafe
_getInformation = _iedObject getVariable "bombDefusal";

With if (bombDefusal == "Red") go full boom. ? Would that be kind of correct?

wispy cave
#

I guess so, also I typically use getVariable ["name", "defaultValue"] just to be safe

keen bough
#

thought so, yes. I will try around with the basic 'hello world' thing haha ^^ Lets see if i get it running. Thanks for the info! That helped me

fluid wolf
#

Does anyone know if its possible to loop a function inside a SQF until a condition is met without leaving it? EG Create an explosion every 5 seconds until a variable is changed?

tough abyss
#

How to add/ remove itemes from uniform? I want remove and add money ( GM DLC) but it didnt do nothing, only the hint works! Its useing as "addAction" from a box!

#

´´´´´´´´´

#

player removeItemFromUniform "gm_placeableItem_gc_money_71_100_bill";
player addItemToUniform "gm_placeableItem_gc_money_61_20_bill";
hint "Works";

#

´´´´´´´´

keen bough
#

@wispy cave

[_ied] spawn
{

  _object = _this select 0;
  _script = _this select 1;
  _done = true;
  _object setVariable ["bombDefuse", ["Neutral",], false];
  while {true} do
  {
    if (_done) then
    {
      [_object,
      [
          "Remote Wire",
          {
              params ["_target", "_caller", "_actionId", "_arguments"];
              _object setVariable ["bombDefuse", "Red", false];
          },
          [],
          1.5,
          true,
          true,
          "",
          "true", // _target, _this, _originalTarget
          2,
          false,
          "",
          ""
      ]] remoteExec ["addAction", 0, true];
      _done = false;

    };
    _info = _object getVariable ["bombDefuse", "Nothing"];
    "I just wait for Action." remoteExec ["systemChat", 0];


    if (_info == "Red") then
    {
      systemChat "IED: May i go boom? I go boom!";
    };
    sleep 2;

  };
};

Sadly i seem to do something wrong. I get an error that the variable is undefined.

wispy cave
#

probably because _object isn't known inside the addaction

#

I believe _target is the object the action is assigned to but you better check the documentation

keen bough
#

AH! yeah!

tough abyss
#

The Box, has the name "box1" and in the init. field i have this

#

´´´´´´´´´

#

box1 addAction [Pay 20, "scripts\addAction\pay.sqf"]

#

´´´´´´´´´´

#

And the class names are correctly!

winter rose
#

@tough abyss
```sqf
hint str player;
```

to format properly

#

hint str player;
keen bough
#

_target was what i needed. Sweet.

tough abyss
#

@winter rose How can i do this?

winter rose
#

… as I said, ```sqf etc

#

```sqf
hint str player;
```

tough abyss
#
box1 init

box1 addAction [Pay 20, "scripts\addAction\pay.sqf"]

´´´´´´´´
pay.sqf

player removeItemFromUniform "gm_placeableItem_gc_money_71_100_bill";
player addItemToUniform "gm_placeableItem_gc_money_61_20_bill";
hint "Works";
´´´´´´´´
#

Can someone help me out with script that would activate animation on demand

winter rose
#

@tough abyss "Pay 20", not Pay 20

tough abyss
#

@winter rose Sorry, i forget it here, but in game its in! The "Pay 20" is selectable and the hint works, but it did´nt get and remove the money!

keen bough
#

animations dont like me, so i dont try to use them <chuckles>

tough abyss
#

there is this one from global mob.

#

if i call for it at start it works

#

but if i want to bring it out with addaction yeah it fails

#

@tough abyss it can that its works only for looping animation, like this

#
player1 switchMove "Acts_ExecutionVictim_Loop";
keen bough
#

if i do addAction with remoteExec like
_id = addAction with remoteExec

I get back like _id = "2_1234"; and if i parse it to a number i only get 2". Am i missing something?

#

I get the JIP ID and if i turn off JIP i get the real id.

#

Workaround: On an Object, the IDs are in chronological order. Can be worked with. First action is 0, second is 1 and so on. So i know how to work with it in my functions.

tough abyss
#

Please, can i increase the lift capacity of a helicopter without using a mod?

still forum
#

you can make the object that you wanna lift lighter

#

setMass or setWeight

tough abyss
#

@still forum thanks. Decreasing the mass of a tank can make it behave erroneous?

still forum
#

probably yes

#

should reset it once you drop it

quartz coyote
#

Hi again !
is there a way to execute code via control ? I know how to add a link to a button with ctrlSetStructuredText parseText but what about executing code ?
triggering a script for example
I tried controlName ctrlSetEventHandler ["onButtonClick", "[] execVM 'myScript.sqf"]; but didn't work

tough abyss
#

"[] execVM 'myScript.sqf"
something is missing?

#

"onButtonClick"
there is like big red writing on UI EH page about this

quartz coyote
#

can't see no red writing ...

tough abyss
#

yeah sorry orange

#

shoudl be red

#

and bigger

#

much bigger

quartz coyote
#

oh got it

#

okay i'll try

#

oh well do detective !

#

thanks it works !

tough abyss
#

👍

quartz coyote
#

Executed locally on a client, will this hide the player from all other players or am I wrong ?

thisPlayerInMenu = player;
thisClientID = clientOwner;
[thisPlayerInMenu] remoteExec ["hideObject", -thisClientID, true];```
tough abyss
#

@still forum i had set the mass of a tank to 200 kg and tried to lift it with a Taru. Not worked. I believe tanks are denied to lift, right?

austere hawk
#

setting mass has limits

#

you cant just make a tank 200kg. It would fuck up physix. Game stops you from doing it

tough abyss
#

@austere hawk no problem, i want to lift the tank with a heli. After that i recover the mass.

#

But it's not working, tank can't be lifted even with 200 kg. Any way to do that?

jade abyss
#

btw: _helicopter setMass 1000000
hf

#

(PhysX fun)

tough abyss
#

i will make the lift system with attachTo like in Arma 2.

jade abyss
#

Lemme guess: The Rope selection doesn't appear?

#

iirc, it was a config Entry, that allowed the Vehicle to be slingloaded.

tough abyss
#

@quartz coyote no, hideObject is binary command not unary

winter rose
#

@tough abyss it is both

tough abyss
#

Ah yeah, true, but from that code it looks like it is only temp hiding

#

Unary cannot unhide

winter rose
#

Yep

quartz coyote
#

just wanted to know if it worked.

[thisPlayerInMenu, true] remoteExec ["hideObject", - thisClientID, true];```
#

the player executing code will not see him self hidden but all other player will see him disappear.

median aspen
#

hi does someone have a script or tip for the wasteland modus ( for starter money ?) so what i mean is when someone is joining the server only the first time he must have atleast some amount of money on the bank. Too gear up
Pls help.

tiny wadi
#

For the command buttonSetAction, I need to set the action of a button I created with a script but the wiki says it only allows SQS and not SQF. What should I do to be able to call the function I need?

#

Can I just call it regularly?

still forum
#

Just do a call to a function

tiny wadi
#

okay cool, thank you

#

Also one final question, if I create a GroundWeaponHolder at the position of the player and put an item in it. How can I make it so it shows up as a container in the players inventory automatically?

#

It is created while the inventory is already open

still forum
#

When you open your inventory, you specify the container to open at the start. Cannot change in the middle

#

need to close and reopen, but you can do that with script

tiny wadi
#

ah okay

#

Yeah Ill do that then

#

perfect.

winter rose
#

@quartz coyote it should

keen bough
#

Ivan now has IED. Ivan has Vodka to Spawn under IED as a Test. Ivan not happy, because Vodka lets fall big chest filled with Vodka! Not acceptable! Help Ivan. Tell Ivan how spawning Vodka does not throw big Chest around where Vodka is spawned under.

#

Bleh... The object is quite nice behaving. But when i spawn in, for the training version, a smoke-effect/grenade, it spawns only right under sigh I think i try it with 'attachTo' but if someone has another solution, please tell me.

tough abyss
#

How does one make addaction to work with animations and only can be used by player that options is given. i am hitting the wall here.

astral dawn
#

Execute addAction on the computer of player that needs to have it

#

Also I am not sure what you mean about the animations part

tough abyss
#

I am trying to give Lmg users hipfire option

#

GM offers it so i am smashing my head on trying to make the roles have that option to toggle on and off at awill

#

So far managed to make it toggle on and off but its broken and other player if they walk up to gents with this script they can actiavet of the mg dude

jade abyss
#

Could it be, that inPolygon is not rly accurate?

quartz coyote
#

Hi.
BIS_fnc_saveInventory : delete: Boolean - (Optional, default false) Whether or not to delete the loadout
What does that mean ?
Delete when ?

still forum
#

I guess it means delete rightnow

quartz coyote
#

where is the logic in this ?

#

oh maybe delete is from the player. not delete the save

still forum
#

Example 1 shows it

#

if you set delete to true, then it will delete instead of save

quartz coyote
#

okay

#

don't see the logic in this but at least I know I need to set it to false

still forum
#

No you don't

#

just leave it out

#

it has a default value

keen bough
#

Okay, serously... i have an IED-Object and when i spawn a grenade (live grenade) the object is catapulted into the air in worst case and wobbles in best case.

attachTo does not work and i dont know any command that would help me. Except, is there one that only spawnes the actual effect instead of the object that causes the effect?

quartz coyote
#

How do I pass my local argument in the executed code ?

_websiteButton ctrlSetEventHandler ["MouseEnter", "_websiteButton ctrlSetBackgroundColor [1,1,1,1];"];```
still forum
#

you don't

#

setVariable on the control

#

But you don't need to

#

read the wiki page and see what arguments you are getting

quartz coyote
#

Ah true

#

mybad

#

controlName

next lily
#

Does triggerAmmo work for mines and satchel charges, or only flying ordinance?

still forum
#

supposed to work for all

next lily
#

Nifty.

keen bough
#
[_object] remoteExec ["ied_fnc_iedActionRemoveAll", 0, true];
 _beep = [_object] spawn ied_fnc_iedBeep;
 waitUntil {_beep == "Yes"};

Does not work and i dont quite understand why it is. It says now it expect bool/number and before it says too but _beep should return True. Now it returns "Yes" ...

#

<sighs> going crazy. Dont want to use sleep -.-

astral dawn
#

spawn returns a handle to script

#

you are waiting until _beep is "Yes"

#

maybe you expected whatever the spawned script returns to be put into the variable you assign from a spawn command call? no it doesn't work like that

still forum
#

waitUntil {_beep == "Yes"}; that will never work

#

You are never updating _beep, so it can never change it's value

keen bough
#

i used call before, no result either.

#

but i use sleep now.

grim coyote
#

You can only get a return value from a function with using call

#

What you need to do is to forget beep and use:
__
WaitUntil {[object] call function}_

still forum
#

@fading trench #rules no crossposting

fading trench
#

Ok

#

I posted it here because I thought the other was the wrong place

#

but nevermind 😛

cedar heart
#

why if in this code

    box1 AddAction [localize "STR_Talk",{
    hint "ok";
    }, [], 6, false, true, "", "", 3];

parameter on hideOnUse is true - it must hide the action menu after selecting that action
but i can using all the time. didnt work for me
Also command "box1 removeAction 6;" - doesn't help.

#

6 is priority value of the action

still forum
#

"hide the action menu" not "hide the action"

cedar heart
#

aaaa ok

tough abyss
#

If you want to remove action after you selected it, you can add _this select 0 removeAction (_this select 2), to your action code

cedar heart
#

thanks a lot 🙂

keen bough
#

<scripts a "simple" ied script>
<after 3 days>
"Well, my 'simple' ied script has now 4 different difficulty-ratings, training mode, shit-ton of objects to choose from, placed facing in random directions, complete random wiring-mechanism with timed set-ups and instant-setups as well as some other stuff."

"Hmm. Well. How can i make this from a simple to an more advanced script"

And now i am thinking of pictures, recogniton where you have clicked on it and do "real" ied-stuff XD Come on, cant my brain stop on just the simple thing ^^ And with that the Question: Is it possible to use a picture and reckognize where on the picture a user has clicked?

next lily
#

If you know the picture coordinates on screen (relative to a set point of the picture), and the mouse coordinates at time of click, wouldn't it just be an arithmetic problem?

keen bough
#

Kind of, plus, technically you could to it with dialog-buttons spawned on the picture itself - and the buttons are cable-pictures. That, i think, should work too and would be probably a lot easier to do i think

#

i swear, if that scripted monstrosity of an epic sandbox is in alpha and anybody put stuff in patroen i freaking hire someone that can take some workload off of me ... soooo freaking much to script.

#

i still dont understand dialoges at all, and the "dialog editor" of arma never loads the freaking dialog i saved... its totally hillarious.

tawny geyser
#

Hello everyone, is there any framework to create a random task that will be generated in-game like in Antistasi/DUWS?

#

Tried to find some by myself, but they all generating all mission, not tasks

obsidian violet
#

Good evening, im working on a script thats gonna make a AI surrender if they have more than two wounds with ace.

example arm and leg is wounded then he will surrender with a call function.

problem is that I cant find anyway of getting the damage into a if statement.

basicly what I need help with in the script is to define _wounded so it explaines that a _unit have more than two ace wounds. either two arms, two legs or a leg and a arm etc...

ex..
_wounded = ????????
"have more than two ace wounds"

if (_wounded ) exitwith { _unit call my_fnc_surrenderfunction;};

Thanks in advance 😃

Edit, gave it a try like this to simply check the pain level of the AI:
_acelowHealth = _unit getVariable [QEGVAR(medical,pain), 0] > 0.1;

But im getting a error message, and it doesnot work.. any suggestions?

keen bough
#

@tawny geyser I am not aware of a task-generator. The demand for 'just tasks' is, i guess so, not high enough so you find plenty of mission-generators but not task-generators.

#

Blergh... i am going crazy why the freaking add-actions arent not working on the server. I remoteExec the function which contains all the effing actions globally and with JIP!... they no show

keen bough
#

Found out why... gosh, ARMA! you ... f.... grah... It did not export to multiplayer anymore and i uploaded the same pbo file over and over again on my server...

exotic tinsel
#

how do i make it so the syndicate vehicles count as positive vehicle kill? with out adding event handlers to all of them.

#

and independent side is friendly in the mission

quartz coyote
#

Hello and good morning.
I have

myVar = [object1, object2, object3];
myVar = selectRandom myVar; publicVarible "myVar";```
I want to ``player setDir myVar`` (which is not working, obviously) how can I do it another way ?
still forum
#

publicVarible "myVar" typo and space at end

#

setDir takes direction

#

not object

#

What are you trying to do

#

You cannot look "car-wards"

#

you look north-wards or east-wards

quartz coyote
#

oh... sorry player setDir (direction myVar) ?

still forum
#

what are you trying to do

quartz coyote
#

randomly selecting an object server-side, publishing it to everyone, setting the direction of the player same as the one of the selected object.

still forum
#

player setDir (getDir myVar) then I guess

quartz coyote
#

oups. okay I mistaken direction from getDir

pseudo kernel
#

Can isNil be used to check if function is existing?

still forum
#

isNil can be used to check if a variable is undefined

#

functions are variables

#

if a variable is undefined it doesn't exist

quartz coyote
#
if (isnil "myVar") then 
{
    myVar = "Hello";
};```
still forum
#

Don't see much to make better

quartz coyote
#

that's satisfying to read !

#

thanks for your time man

cosmic lichen
#

Not much would imply there's still something to make better 😄

quartz coyote
#

@cosmic lichen about my script ? i'm open to suggestions

cosmic lichen
#

I have no idea. Looks fine to me.

quartz coyote
#

then I didn't understand Not much would imply there's still something to make better :smile:

cosmic lichen
#

Dedmen said he doesn't see much to improve. Not much != nothing.

#

Sorry for the confusion.

still forum
#

can return array from switch case, instead of always assigning two variables

quartz coyote
#

thank you i'll see how i can adapt it

tawny geyser
#

@keen bough Okay, thank you for that.

cosmic lichen
#
if (!(isNil "VALUE") && {!(_defaultValue isEqualTo VALUE)}) then
{
    _attributeValues pushBack [_section,_attributeName,VALUE];    
};
#

How can I make sure to only check the second condition when VALUE is not nil?

#

Currently the second condition is not checked if value is nil.

still forum
#

() && (() && {})

cosmic lichen
#

Alright, thanks.

quartz coyote
#

is there an equivalent of worldToScreen for mapToScreen ?

#

that would be useful

inner swallow
#

also, does the volume parameter for sounds in CfgSounds even work? it doesn't feel like it's having much effect

astral dawn
quartz coyote
#

amazing thanks !

compact solar
#

im looking for a way to create random spawn/respawns for a pvp style gamemode is this possible?

astral dawn
#

so player doesn't choose where he respawns? Or he has a set of 'random' spawn points with the BIS spawn selection dialog?

#

anyway, answer is yes to both

compact solar
#

no choice on respawn and the markers are picked on random

astral dawn
#

well, you just setPos player that has respawned

#

from the server

#

can also do it on client

compact solar
#

where would the best place to find the commands etc as i am still pretty new to this ?

astral dawn
#

depending on how much server cares where the player respawns, probably you want to do such calculation on server

#

and do something there

#

it will be called each time player respawns

#

also you need to setup proper parameters in description.ext, must set the proper respawn type, otherwise the game will end with 'mission failed' screen by default, or maybe not, I am not sure

#

see everything related to respawn there

compact solar
#

ive set the respawn type already and set a load of markers it was purely just getting a respawn set randomly, thanks i will have a browse

astral dawn
#

I am not sure if arma 3 respawn configurations in description.ext allow you to make it select one of the random markers instantly, without the menu

#

But I didn't read it for very long time

#

I would probably just setPos player somewhere :/

compact solar
#

so i can use setpos to select a random respawn marker? it doesnt have to be instant respawns but just has to be random

astral dawn
#

do you specify in your mission.sqm file the markers where you want the player to respawn? or does the position depend on some complex calculation?

#

in other words, are these positions fixed at mission start and are fixed for all players, or do you need to compute a new position every time?

compact solar
#

the markers will are fixed

astral dawn
#

Ok I would approach it this way:
set name of the markers in such a way that you can filter them with a script (for instance, "respawn_west_0", "respawn_west_1", etc)
inside onPlayerRespawn.sqf iterate through all markers, find the markers where player can possibly respawn, select a random marker from them, get pos of that marker, set pos of player

turbid thunder
#

Is there a way to turn off the siren for the ambulance while the beacons are on?

tough abyss
#

@compact solar this is how it works by default already, respawn markers are chosen at random and if marker is a rectangle or ellipse respawn position is randomly selected within marker in addition

compact solar
#

Thanks for the help everyone @quartz coyote talked me through it over teamspeak

quartz coyote
#

Guys, how should I know when to disableSerialization ? i'm new to displays and controls

tough abyss
#

When you are working with displays and controls in mission namespace

#

And by this I mean when you assign them to a variable

#

All variables in mission namespace are serialised when you save game

quartz coyote
#

I see

tough abyss
#

But controls and displays cannot be serialized hence the warning if you do not disable it explicitly

quartz coyote
#

okay

keen bough
drifting frigate
#

I imagine it would need to be executed in the backpacks locality.

#

Player backpack, local. Backpack on the ground, server.

#

Player client I should say.

keen bough
#

Yeah, thats the question. Since arma is so nice to spawn backpacks prefilled, that i like so much that i clear the backpacks via script ^^

jade abyss
#

uhm, what?

#

iirc there are prefilled and non-prefilled Backpacks

keen bough
#

we found viper backpacks from units in our merc-scenario, and, of course, we stole em and put them into our system. Now they get filled everytime with the respective soldier-loadout that we looted the backpack from.

sullen pulsar
#

last i remembered whoever had it last has control over it and the code would have to execute on their client

jade abyss
#

The one where the "Vehicle" is local to

keen bough
#

the backpacks are spawned on the server and are in a box. So, their locallity is on the server. Should work and, if not, i can of course make it work. Just thought maybe someone could say where the command should be executed ^^ its not... too clear (for me)

jade abyss
#

Check the *Classname of the Backpack, i bet it has some _tag at the end

sullen pulsar
#

if it's in a box then yeah it's owned by the server till someone yoinks it.

keen bough
#

dont wanna start arma now, but i guess it will have that. I guess i can avoid it with getting the base-class of the backpack?

jade abyss
#

Yeah

sullen pulsar
#

wasn't there a command to check locality ownership

jade abyss
#

But it's a config thing @sullen pulsar

keen bough
#

the backpacks are created with addBackpackCargoGlobal on the server, so yeah, server ^^

jade abyss
keen bough
#

where was the "look into the config for basename" thing on arma wiki again?

sullen pulsar
#

owner, that's the one i was thinking of

jade abyss
#

There is also clientOwner now, Ton

sullen pulsar
jade abyss
#

Yeah 😄

sullen pulsar
#

oh clientowner just returns the players own ID

jade abyss
#

On Clients also

#

Yeah, alot of stuff was added since you borked us all with Life :angrypepe:

sullen pulsar
#

only been 4 and a half years, no big deal.

jade abyss
#

Yeah, not much changed *cough*

keen bough
#

<whisper> we will have a command to add weapons... and configure the attachments on it VIA SCRIPT!

sullen pulsar
#

dw im coming back to grace you with more life stuff but with aliens @jade abyss

jade abyss
#

I spam you with TrapPics!

#

Ask Yuka/Hide! He knows that feeling!

#

Always in fear

keen bough
#

trap in trap or trap?

jade abyss
#

Yes.

keen bough
#

"Which one of the effects you want to have?"
"Yes."

jade abyss
#

exactly

keen bough
#

okay, i can go back to my function and look for the base name, or write a new function to delete all items in backpacks. The lazy version is second since i dont have to do any much else... first one would be neat and clean.

jade abyss
#

@keen bough

keen bough
#

ah, perfect! Thanks Dscha. This one i always forget because i dont use it often.

winter rose
#

@quartz coyote split this into many smaller variables or your head will explode

sullen pulsar
#

Thinking about it, very tempted

fringe yoke
#

I have a weird script issue I'm probably just not seeing something on

#
if (isServer) then {
  GVAR(loadouts) = true call CBA_fnc_createNamespace;
  publicVariable QGVAR(loadouts);
  
  addMissionEventHandler ["HandleDisconnect", {
      params ["_unit", "_id", "_uid", "_name"];
      GVAR(loadouts) setVariable [QGVAR(_uid), getUnitLoadout _unit, true];
  }];
};

if (!hasInterface || {!isMultiplayer}) exitWith {0};

player setUnitLoadout [GVAR(loadouts) getVariable [QGVAR(getPlayerUID player), getUnitLoadout player], true];
#

This is supposed to save someones loadout when they disconnect, then load it back when they rejoin

#

Instead when someone rejoins they got someone else's gear, but it was always the same specific person who's gear they got

#

that script is in postInit

digital jacinth
#

QGVAR and GVAR are used to define constants. You are search for the key "getPlayerUID player" instead of what the command getPlayerUID returns.

fringe yoke
#

ah right

#

yup, thanks

digital jacinth
#
if (isServer) then {
  GVAR(loadouts) = true call CBA_fnc_createNamespace;
  publicVariable QGVAR(loadouts);
  
  addMissionEventHandler ["HandleDisconnect", {
      params ["_unit", "_id", "_uid", "_name"];
      GVAR(loadouts) setVariable [_uid, getUnitLoadout _unit, true];
  }];
};

if (!hasInterface || {!isMultiplayer}) exitWith {0};

player setUnitLoadout [GVAR(loadouts) getVariable [getPlayerUID player, getUnitLoadout player], true];
fringe yoke
#

Yeah that's what I am using now

#

Just completely forgot about GVAR for a second

#

I don't know why I had put it there to begin with

quartz coyote
#

Hi all
If I understand the wiki : addAction in a forEach can take _x in the condition argument because it's string and not code ?

digital jacinth
#

_x can be anything. so yeah as long _x is a string it can be used as a condition in an addAction

quartz coyote
#

thx

fringe yoke
#

Does anyone know if it is possible to save weapon and magazine info from a crate. I know about getMagazineCargo and getWeaponCargo but that will cause magazines to be refilled and everything from weapons (optics, acc, magazine) to be lost

digital jacinth
#

Not possible, I tried something similar in a persistent mission. You are either forced to make your own implementation or tell players so detach attachments

quartz coyote
#

Is there a way to have an action (addAction) from inside a Camera scene (camCreate) ?

fading dust
#

Hello ... I m looking for help to make my small Mod Zeus compatible so that can be played online

#

I tried following tutorials but failed

cunning crown
#

Can you be more specific?

fading dust
#

I want my mod to be used with Zeus like in the zues unit list

still forum
#

@tough abyss @quartz coyote disableSerialization is for local variables, because spawned scripts are saved. Not for missionNamespace stuff. So you basically want disableSerialization everywhere where you work with displays in scheduled scripts. Don't need it in unscheduled. And if you are storing display/controls in missionNamespace, you'll get warnings and you have to think about the fact that they may become null at any point in the script.
QGVAR and GVAR are used to define constants. No, normal missionnamespace variables are not constants @digital jacinth

@fringe yoke @digital jacinth
Does anyone know if it is possible to save weapon and magazine info from a crate.
https://community.bistudio.com/wiki/weaponsItemsCargo

tough abyss
#

@still forum you don’t need it in uiNamespace and it is not limited to local vars

fringe yoke
#

weaponsItemsCargo works, just missing addWeaponsItemsCargo :p

#

still better than losing it

still forum
#

We have that

fringe yoke
#

there is?

fringe yoke
#

That's a mouthful

#

Nice, hope that will be soon then

still forum
#

Yep. I came up with that beautiful name and am proud of my baby

#

It's still a bit broken tho. But I already submitted the fixes

fringe yoke
#

It looks like it works with weaponsItemsCargo, is that correct?
So I could just do { _container addWeaponWithAttachmentsCargoGlobal _x} forEach _oldItems once it is out

fading dust
#

Any help

still forum
#

I don't think the syntax is the same. Might be. Haven't checked

fringe yoke
#

ah, ugl ammo is handled differently it looks like

#

so wouldn't work

still forum
#

@fading dust you have already been asked to be more specific.
In what way is your mod #arma3_scripting replated

fading dust
#

U know Zeus is used to spawn units in match

still forum
#

You are not providing ANY helpful information at all.

#

Just tell us what your actual problem is

fringe yoke
#

Right now it is

weapon, muzzle, side, top, bipod, [mag1, mag1count, mag2, mag2count], count

if it isn't finalized it would be nice to switch it to

weapon, muzzle, side, top, bipod, [mag1, mag1count], count

weapon, muzzle, size, top, bipod, [mag1, mag1count], [mag2, mag2count], count

that would make it directly compatible with weaponsItems format

still forum
#

"if it isn't finalized" that part of it is finalized

fringe yoke
#

damn

fading dust
#

I need a script that can make my mod Zeus compatible

still forum
#

But it's not alot of work to convert that

fringe yoke
#

No, it still would've been nice if it just used the same format though

still forum
#

@fading dust that cannot be scripted. That's config stuff

fading dust
#

Someone tell me ask here

still forum
#
 {
    _x params ["_weapon","_muzzle", "_side", "_top", "_bipod", "_mag1", "_mag2", "_count"];
    _mag1 append _mag2;
     _container addWeaponWithAttachmentsCargoGlobal [_weapon, _muzzle, _side, _top, _bipod, _mag1, _count];
} forEach _oldItems
fringe yoke
#

Yeah, it's not hard at all

#

just would've been nice

fading dust
#

So I have to ask again in config

still forum
#

@fading dust you were not told to post here. You were told to post here if you need scripting help, which you don't

fading dust
#

Maybe I understand him wrong

tender fossil
#

Is there a command/way to lower the amount of space that the game objects/items take in inventory?

still forum
#

no

tender fossil
#

Dang

still forum
#

You can maybe use some commands to force items in inventory, even if there is no space

tender fossil
#

Such as...?

still forum
#

dunno

#

Some of the commands to add items to inventory

#

I know you can overfill boxes with script

quartz coyote
#

@still forum do you know if there a way to have an action (addAction) from inside a Camera scene (camCreate) ?

still forum
#

no idea

#

never tried nor heard

quartz coyote
#

okay thx

tender fossil
#

Ok

cosmic lichen
#

@tender fossil Use player setUnitTrait ["loadCoef",0.1];

#

That will increase the amount of weight a unit can carry.

tender fossil
#

@cosmic lichen Oh wow, thanks! 😄

#

This helps me more thank you'd guess 😛

cosmic lichen
#

Side effect is that I also increases stamina.

tender fossil
#

We have stamina disabled anyway

still forum
#

weight, but not space in uniform/vest/backpack?

#

Yeah no. Only affects fatigure/stamina

#

affects weight, not volume

cosmic lichen
#

Ah yeah, he could carry more but would still be limited by the volume of the vest/backpack/uniform.

tender fossil
#

I see, thanks anyways 😃

fringe yoke
#

Is there a way to do addMagazine on a crate? addMagazineCargo works but I can't add half a mag

still forum
fringe yoke
#

ah thanks, missed that

cosmic lichen
#

So much work put into that screenshot 😄

tough abyss
#

Not enough arrows

cosmic lichen
#

There should be an arrow pointing to the arrows just to make sure.

fringe yoke
#

hm, doesn't look like there is a getMagazineAmmoCargo then

#

unless I'm missing something obvious again

jagged field
#

Anyway to increase a specific units health?

astral dawn
#

setDammage ?

#

#define setHealth(h) setDemmage(1-h) 😄

#

just setDammage health to zero

#

ah wait, you mean that character can get more damage before he dies?

jagged field
#

yeah

#

e.g. can take more rounds before dying

astral dawn
#

I guess you would need to use handleDamage event handler

jagged field
#

I can just disable damage for the unit

#

I tried, this addEventHandler ["HandleDamage", {(_this select 2)*0.25)}];

#

but it works well with vehicles

#

not so much with infantry, but I suspect thats to do with ACE

astral dawn
#

Did you try without ACE?

#

Because ACE has its own handleDamage

spring stone
#

Is there a way to get an the object name of a unit with a specific Player ID? (Basically I want to attach an action to a unit with a specific Player ID)

still forum
#

Can't pin

jade abyss
#

@lavish ocean ? ☝

still forum
#

@spring stone iterate through allPlayers

spring stone
#

Makes sence sometimes my brain is a bit to slow 👍 (Since I already look that code up but was unsure how to iterate it @.@)

#

Oh wait no I rember why I asked. The thing is, with this I can get the PlayerID of a specific Object. But what I want is the other way around. I want the object name of a specifc player ID (when in game).

#

or can the player ID possibly be used as an object in e.g. an addaction?

astral dawn
#

Player ID? Which player ID do you mean? Maybe you mean clientOwner?

jagged field
#

@astral dawn I'll test it without, cheers for the help

spring stone
#

Sorry, should have clarified: I mean a steamID64

astral dawn
#

as Dedmen said, you must iterate through allPlayers to find the one which has the required uid
Or you can create a namespace and use it as a hashmap to map the string to player object / clientOwner