#arma3_scripting

1 messages · Page 470 of 1

shy musk
#

"HandleDamage" allows you to override the damage being applied to the object, so in this case you're essentially limiting the damage to 0.9. "_this select 2" is the current damage, so "(_this select 2) min 0.9" is saying apply the normal damage if it's less than 0.9 otherwise return 0.9.

gleaming cedar
#

Thank you worked 😃

shy musk
#

tough abyss
#

@still forum yeah sure, when it doesnt take four or five asks to get an answer instead of snappy complaints.

languid fable
#
_randomUnit = (selectRandom _unit);
fnc_aiSpawn = {
_squad = ["rhs_msv_emr_sergeant", "rhsgref_cdf_b_reg_rifleman", "rhsgref_cdf_b_reg_rifleman", "rhsgref_cdf_b_reg_rifleman", "rhsgref_cdf_b_reg_rifleman", "rhsgref_cdf_b_reg_rifleman", "rhsgref_cdf_b_reg_rifleman"];
_grp = [getmarkerpos "aiSpawn", WEST, _squad,[],[],[],[],[],180] call BIS_fnc_spawnGroup;

sleep .5;
while {count units _grp > 0} do {
  _grp setbehaviour "AWARE";
  _grp setSpeedMode "FULL";
  _wp = _grp addWaypoint [getPosATL _randomUnit, 20];
  sleep 10;
  if {count units _grp < 1} then {call fnc_aiSpawn};
  deleteWaypoint ((waypoints _grp) select 0);

};
};```
Why does  ``` if {count units _grp < 1} then {call fnc_aiSpawn};``` give generic error in expression?
#

Everything else works in the script but that part, and that is just meant to check if everyone in the group is dead

winter rose
#

Parenthesis for the if, not brackets 😉

#

@languid fable

languid fable
#

_wp = _grp addWaypoint [getPosATL _randomUnit, 20]; now that has generic error in expression 🤔

digital jacinth
#

So there was someone who asked how to disable fall damage for ace medical, that got me thinking and i had some fun time trying to get that done
https://streamable.com/okvku

Any idea how to improve it technical wise?

[{
    params["_unit"];
    _unit removeAllEventHandlers "HandleDamage";

    _unit addEventHandler ["HandleDamage", {
        params ["_unit", "_selection", "_damage", "_source", "_projectile", "_hitIndex", "_instigator", "_hitPoint"];
        private _ret = damage _unit;
        // Handle falling damage
        private _vehicle = vehicle _unit;
        private _impactVelocity = (velocity _unit) select 2;
        if ((_impactVelocity > 0) || {(_vehicle != _unit ) || {!((_source == _unit) || {isNull _source}) || {(_projectile != "")}}}) then {
            _ret = _this call ace_medical_fnc_handleDamage;
            systemChat format["vel %1, veh %2, src %3, proj %4",_impactVelocity,_vehicle != _unit,_source != _unit,_projectile != ""];
        };
        _ret
    }];
},[player],1] call CBA_fnc_waitAndExecute;
nocturne basalt
#

Hi guys. With playSound3d I can use a mempoint for location of sound with soundPosition. Is it a hackish way of doing the same thing with say3d? Id rather use say3d cause the script is runned using execVM. With playSound3d the sound is played double

digital jacinth
#

playsound3d is propageted to all machines and only should be ran once. also the sound will be staying at the same location if you play it.

#

say3d requires a description.ext cfgsound entry

#

and needs to be remote exec'd

nocturne basalt
#

Yes but if you remote exec playSound3d its broadcasted twice it seems. Since the function itself broadcasts on network

digital jacinth
#

correct, you should never remotexec playsound3d

nocturne basalt
#

Yeah that why Im leaning on say3d, but the position thing is a nice feature

#

My script playing the sound needs to be remotely executed

digital jacinth
#

say3d also has a drawback that it needs an alive object to be played on

#

if a unit dies the sound will stop instantly

nocturne basalt
#

Thats not really a problem

digital jacinth
#

also playing multiple sounds at the same time on that object is not possible, it will stakc up and play after each other

nocturne basalt
#

I wish I could disable broadcast on playSound3d 🤔

#

Guess I could create an object on the location I want the sound to be played using say3d, but that seems like alot of hassle

digital jacinth
#

why not just not remotexec playsound3d?

#

is there anything else to it

nocturne basalt
#

The sound is part of a bigger code that is running remotely. It is triggered when certain conditions are met. It makes it hard to playSound from another script not runned remotely

#

Wait a minute.. What happens if I use exec inside of an execVM? Would that work?

#

Exec a script that runs playSound3d

digital jacinth
#

uh. so that script is running on all machines or just one? if it is just one, then it is easy. Right now i do not really understand the whole construct you are trying to achieve.

tough abyss
#

I have creation rights to a mod on the workshop, but the Publisher tool isn't giving me an option to update it. Anyone know a fix?

nocturne basalt
#

Im telling each Client to animate the legs of a mech. I want to play the walking sounds from the correct positions in the legs

hollow thistle
#

@tough abyss afaik only owner can update mod. Other creators can only moderate comments etc.

nocturne basalt
#

@digital jacinth that basically it. And the mech that is animated is a local object so I dont spam the network with animation packets. They are runned very frequently

tough abyss
#

Really? I havent been able to find that answer a anywhere. Thats a terrible system if so

digital jacinth
#

@nocturne basalt how frequent? depends now if broadcasting that throught he system is worth it or not

nocturne basalt
#

I have another mod already that broadcasts everything and it causes desync in mp

#

To solve that Im using an invisible tank with a local object attached to it

#

Works perfectly

#

My only issue is the sound positions. Dont want them double and dont want them all to be played from the center of the object

digital jacinth
#

best would then spawn a local object attach it to the mem point, hide it and say3d on it.

#

delete it with the mech itself

tough abyss
#

So far as im aware 3d sounds dont follow objects though, right?

digital jacinth
#

say3d does.

tough abyss
#

I’m going to write that down then, thanks

nocturne basalt
#

@digital jacinth ok thanks maybe thats the way to go here

queen cargo
#

in case somebdoy ever needs it, take it

still forum
#

@tough abyss for real now? I just told you to stop cross-posting. And just one hour after you read it. You cross post a question that I already answered you. Cross-posting is against #rules
Next time I'll directly forward it to a moderator instead of trying to be friendly and informing you about it.

gleaming oyster
#

🤦

still forum
#

How can i get fps higher on client side by scripting
Here:
{deleteVehicle _x} forEach allUnits

hollow thistle
#

What's your pc spec? and you cant magically bring more fps via scripting xD

#

Also I'm not sure if this is correct channel.

verbal otter
#

hmm, understand thanks

still forum
#

and you cant magically bring more fps via scripting That's where you're wrong kiddo

#
startLoadingScreen ["Increasing FPS"];

Run that. And look at your fps counter before and after

hollow thistle
#

👍🏽 maybe my 1080 will finally get some work. 😄

still forum
#

Nah. Don't thank me

#

these things will 100% improve your FPS

#

But... They will make the game alot less fun

gleaming oyster
#

🤣

still forum
#

I also have a thingy to get your FPS onto exactly your monitors refreshrate guaranteed. But I'd have to find that in my stash somewhere..

hollow thistle
#

😈

queen cargo
#

instead of making fun of him @still forum you could have told @verbal otter that such things are not possible

still forum
#

they are though

#

lower view distance is a start already and should definetly improve fps

#

could disableSimulation on all local objects out of view

#

or hideObject some less important things

hollow thistle
#

but if his game is barely playable with 1000 view distance...

queen cargo
#

Makes the community as a whole Look Bad if some rookie asks such questions and gets made fun of

still forum
#

why though?

tough abyss
#

@still forum if you have an issue with me, you're welcome to discuss it with me privately. I've also only cross posted two things within the last few weeks, one of which was across two separate discords, so I don't think that counts. You also cross-posted, while quoting the rule against cross-posted? You did not answer my question, either, you just complained about cross-posts. I did, however, finally get my answer, which I appreciate.

still forum
#

startLoadingScreen is a legit way that I too use to increase FPS.

#

Because scheduled scripts run faster inside loading screens

#

ChewDev didn't say why he wanted better FPS. So I could just guess

meager heart
#

also params -gibFPS and -noLags /s

tough abyss
#

I guess you did, I just saw the flurry of @ notifications and the complaining, so I skipped the rest of it ¯_(ツ)_/¯

still forum
#

If you are seeing a flurry of complaints about you. You might be doing something wrong 😉

hollow thistle
#
startLoadingScreen ["gib fps"]; // still not 120 fps ;<<
tough abyss
#

Again you're welcome to message me privately, but you're the only one complaining, and you're pretty infamous for it 😉

still forum
#

How many?

hollow thistle
#

117 😄 (i ran it in running liberation tho)

#

oh i cant use debug console now. alt+f4 😄

#

well maybe he Is the only one complaining but rules are rules.

still forum
#

117 != 120.. awww comeon

meager heart
#
0 spawn {
    while {true} do {
        hintSilent format ["Client FPS:%1", 120 + (random 100)];
        sleep 0.025;
    };
};
#

ez

gleaming oyster
#

Hax

digital hollow
#

more performant

_handle = [{addFrames (120-diag_fps);}, 0, []] call CBA_fnc_addPerFrameHandler;
still forum
#

I can actually legit make a Intercept SQF command that will increase your fps.. Does that count?

digital jacinth
#

do it and bundle it in a command called "createFPS"

tough abyss
#

Put it in a modpack called Doawnlad Mor RAM for the cherry on top.

peak plover
#

@meager heart that's some top notch lifer code 😄

meager heart
#

😬

peak plover
#

Is dis idea bad

#

I will remove the normal inventory

#

And do like battlefield 2, so you can pickup a kit from the ground by pressing g

#

Because inventory is cluncky

still forum
#

uhh :3

#

interesting

#

Rearming then also like in BF?

tough abyss
#

removes player choice but isn’t inherently bad.

digital jacinth
#

MAGIC AURAS

tough abyss
#

As long as you dont kill the net by sending 100 strings every time someone picks up a kit

meager heart
#

nigel, why not the "config inventory" ? i mean with templates

peak plover
#

Yes @still forum

#

Well. Because I want to get into the game and shoot people and play with my squad instead of picking up magazines

#

Also the inventory is so slow in arma 3

#

I know it's to prevent duplication bugs.
But I imagine going up to a dead guy and looting him for extra ammo(hold to loot) or pressing invetroy key to take the kit

tough abyss
#

Dupe still happen though. But there is a way to change what it grabs when you hit 'rearm.' Been a loong time since I've done it though.

still forum
#

Have an idea how to make dupes impossible though

peak plover
#

🤔

still forum
#

same as TFAR does to generate really unique radio id's without duplicates

#

just do the inventory replacing on the server.

peak plover
#

hmm, yes

still forum
#

More traffic sure.. But still alot less than the player taking each item seperately

peak plover
#

If I do kits, it's a lot simpler, I can just save the kit class and amount of mags(

#

And yea on the server is like a must. I wonder about dayz SA

#

How do they do it there? Duplication avoidance has to be high on their list

still forum
#

I'd say they generally go more into the "server is authority" direction.

#

instead of client does everything like in Arma

#

atleast they should

meager heart
#

i've heard there is some server side "modular system" ? 🤔

peak plover
#

What have you heard ?: D

meager heart
#

hmm... there was some info on dev diaries or tweets or streams... friend of mine told me something like that, he just following and checks every single dayz report/dev updates info... but it could be bogus/his own version lol

#

@peak plover

austere hawk
#

simpler inventory sounds neat. I'm fantasizing about a version that is not quite BF2, but more restrictive than A3.
E.g. you can drop and add stuff in your inventory, but if you pick up a different weapon from somebody you must change vest as well and stuff like that.

#

(because my vests are basically just webbing kits with different pouches fitted to the role of the weapon in use)

peak plover
#

I'd imagine there could be an option to restrict only friendly uniform/vest/helmet.
ex.
pick up enemy kit, get the enemy gun, but appearance of a the player faction of the picked up class

austere hawk
#

yeah, that would be neat

tough abyss
#

Is anyone familiar with the ace-style development environment? I am attempting to use it to create a retexture mod, however the build release (using make.py) still points to my local texture files. IE, it won't work for someone else.

I'm also curious how to use external objects, say if I wanted to in a config use model = "rhsusaf\something", rather than having to directly inherit from it a class.

mint kraken
#

What exactly is JIP?

tough abyss
#

Join in progress

mint kraken
#

In progress of?

#

When the player is joining?

robust hollow
#

its when a player connects after the mission started.

meager heart
#

just tried first time to press escape, back, ok, back, close... to close the game and was error message about unusual exit...

#

usually i just alt f4 and then close the error message about unusual exit...

#

😔

mint kraken
#

Will this work in functions? Basically I want to do Test_life_fnc_function

class Mission_Modules {
    tag = "Test";

    class life {
        tag = "life";
        file = "modules/life";
        function {};
    };

     class menu {
        tag = "menu";
        file = "modules/menu";
        function {};
    };
robust hollow
#

no, you would need to define the tag as test_life

mint kraken
#

Ah ok

#

thanks

austere hawk
#

hmm ... i'm trying to force an AI tank to turn towards a target (fairly precisely). He starts turning with
_tank sendSimpleCommand "LEFT";
when i stop him with
_tank sendSimpleCommand "STOPTURNING";
he keeps turning for a random amount (somewhere between 10-100 degrees) before he stops. Anybody got an idea how to make him stop more precisely? Is it possible to freeze the vehicle in place in some way for a short period , without resorting to setDir every frame?

meager heart
#

doStop ?

austere hawk
#

does not work for tank that is told to turn left permanently

#

it just keeps spinning

meager heart
#

also you can try move and orient that tank with setDriveOnPath

austere hawk
#

hm that seems to work once, but after i command doStop once it refuses to repeat it

#

or maybe i goofed somewhere...

#

ah yes indeed, forgot an abs()

austere hawk
#

got it now, used setDriveOnPath, and use a position behind the vehicle and then check until the right orientation is achieved. Gives me 10-15° accuracy, and with some finetuning i got within 4°

austere hawk
#

next problem: doStop works without problem if the unit is on it's own. If it's in the player's group it also works but only until the player gives the first move order. After that it no longer works. Is there a way to fix that?

peak plover
#

uhh

#

huh_

#

So they are returning to formation?

austere hawk
#

I pick position behind vehicle (or 150° specifically, so i know which way it turns) and then use setDriveOnPath. As soon as the desired orientation is reached it is supposed to stop via dostop

#

if required rotation is > 120° i use simpleCommand "LEFT" a bit, to get below 100°, so i know it will turn in the right direction with setDriveOnPath, and not drive towards the position

meager heart
#

afaik move that is almost the same as doMove waitUntil{unitReady _unit}; doStop

winter rose
#

@austere hawk try maybe tankD stop true, that's a real stopper (AI won't turn around to shoot at an enemy)

cosmic lichen
#

Can anyone quickly explain the difference between ControlsBackground and Controls class inside a display class to me?

#

I always used ControlBackground for controls which the player can't interact with

meager heart
#

"ControlsBackground" aka the very first one will be placed behind the "Controls"

cosmic lichen
#

Alright, so I was doing it right.

quasi rover
still forum
#

yes.

quasi rover
#

Thx Dedmen.

still forum
quasi rover
#

I see, thx. 😀

austere hawk
#

@winter rose tried it, "_vehicle stop true" did nothing either (also tried "_commander stop true")

austere hawk
#

hm weird. I think i may have broken AI some way that carried over even after mission starts (was unable to command anybody) which may have influenced this - so i guess i can repeat all tests now -.-"

#

ok again, if a player orders his AI to Move to somewhere, doStop does nothing.
If player orders his AI to stop, it cant start moving with doMove

tough abyss
#

The only way I know is to use disableAI to turn off movement, that works but you also need to enableAI to undo the stopping to get them to move again and it is a bit of a pain keeping track of it.

austere hawk
#

for a vehicle, can i just turn off AI for the driver, or does it need to be the effective commander or the entire vehicle?

steady terrace
#

how would I make

[ this ] call BIS_fnc_initIntelObject;

play nice with an sqf file?

it say this not defined

intel.sqf

params ["_title", "_text", "_imagebool", "_imagepath"];
[ this ] call BIS_fnc_initIntelObject;

if ("imagebool" == "true") then {
  this setVariable ["RscAttributeDiaryRecord_texture", _imagepath, true];    
  } 
  else {
  [this,"RscAttributeDiaryRecord",[_title, _text,""]] call bis_fnc_setServerVariable;    
  this setVariable ["recipients", west, true]; }
digital hollow
#

this doesn't mean anything in an sqf. What do you actually want to put there?

still forum
#

should be an object. You don't have an object anywhere in your code

grave brook
#

Im having a problem thats appearing in the RTP log of my server, would anyone be able to help me out/would this be the right place to ask?

still forum
#

If it's script error then this is indeed the correct channel

#

whether anyone can help you with that I don't know.

grave brook
#

I believe to be a script error

steady terrace
#

so instead of [ this ] call BIS_fnc_initIntelObject; it should be [ intelobject ] call BIS_fnc_initIntelObject;?

still forum
#

if intelobject is a variable that you previously set then yeah

grave brook
#
12:59:41 Warning Message: '/' is not a value
12:59:41 Warning Message: No entry '.ace_gestures_warningstandlowered'.
12:59:41 Warning Message: '/' is not a value
12:59:41 Warning Message: No entry 'bin\config.bin/CfgMovesMaleSdr/Actions.'.
12:59:42 MovesType CfgMovesMaleSdr load time 4637 ms
12:59:43 Global namespace not passed during: false
12:59:43 Error in expression <false>
12:59:43   Error position: <false>
12:59:43   Error Local variable in global space
12:59:43 Global namespace not passed during: false
12:59:43 Error in expression <false>
12:59:43   Error position: <false>
12:59:43   Error Local variable in global space
12:59:43 Global namespace not passed during: false
12:59:43 Error in expression <false>
12:59:43   Error position: <false>
12:59:43   Error Local variable in global space
12:59:43 Global namespace not passed during: false
12:59:43 Error in expression <false>
12:59:43   Error position: <false>
12:59:43   Error Local variable in global space
#

Not sure if that means anything to anybody

still forum
#

corrupted profileNamespace

#

Shouldn't break anything. Can be ignored

grave brook
#

Ok

#

I would usually ignore any error

#

however

#

the server isnt running

#

If I fixed the namespace do you think that might solve the issue?

still forum
#

Upload the full RPT somewhere

grave brook
tough abyss
#

Presumably the driver but potentially the commander may work as well.

#

Have never used it for vehicles, mainly use it in garrison of troops in buildings

still forum
#

-noPause -noSound -exThreads=7 useless.
-ranking="" -par="" empty parameters make no sense
"-servermod=" empty parameters...

#

You are running some seriously broken mods

grave brook
#

What mods are seriously broken?

still forum
#
12:59:33 Error in expression <ace\addons\fastroping\XEH_preStart.sqf"
ý|«à›ÀLËúßõø{ÿcŸz|þ#~qÿ÷ $!‹ß+>
12:59:33   Error position: <ý|«à›ÀLËúßõø{ÿcŸz|þ#~qÿ÷ $!‹ß+>
12:59:33   Error Invalid number in expression
12:59:33 File z\ace\addons\fastroping\XEH_preStart.sqf, line 1
grave brook
#

I can probably get rid of them

still forum
#

That looks......

#

Not okey.

grave brook
still forum
#

Redownload your ACE

grave brook
#

Ok

still forum
#

Tell the author of that thing to fix that then. Empty parameters are useless. The tool shouldn't add them

grave brook
#

Will do, do you know if the command line has a physical location I could remove them?

still forum
#

no

cosmic lichen
#

@grave brook No need to allow 3den Enhanced on your server

grave brook
#

Ah yeah someone mentioned that to me

#

Ill take it off now

#

Thanks

austere hawk
#

@tough abyss just driver is ok. But once i enableAI again it resumes the players move command, so it can't make the AI stop. Also, if the player issues STOP command it won't react to scripted move commands it seems. The only case where i can controll the unit is, when player tells them to regroup first.

tough abyss
#

Good to know, I'll keep in mind I don't have the same level of control with AI in vehicles then

austere hawk
#

cant even commandFollow or doFollow to interrupt the move order given by player - it just keeps doing his move, and only after that will regroup

#

Stop given by player has same effect - ignores all commands

tough abyss
#

We had a classic on Sunday. The APC refused to move to its waypoint and one of the technicals crashed into the only tree in the area and the second technical crashed into the first technical 30 seconds later. 100% of vehicles didn't do anything past a couple of minutes of moving around. Someone at BI looked at that implementation and said "perfect, works as intended, ship it"

austere hawk
#

guess i need to take away the AI from the players group to do anything...

#

or teleport the driver somewhere else and replace him with AI of own group, until i'm done. Any ideas where and how to "store" the player's driver AI unit ?

winter rose
#

setPos [0,0,0] ^^'

grave brook
#

@still forum I reinstalled the whole of ACE, exactly the same error

#

Any other ideas

#

Thanks for the help so far by the way

still forum
#

something is wrong with something doing something with ace

#

try just launching the server with ACE and CBA

grave brook
#

testing that now

#

15:37:36 InitSound ...
15:37:36 InitSound - complete
15:37:36 PhysX3 SDK Init started ...
15:37:36 PhysX3 SDK Init ended.
15:37:40 [0,24.134,0,"XEH: PreStart started."]
15:37:40 [CBA] (settings) INFO: Userconfig: Ignored.
15:37:41 Error in expression <"z\ace\addons\goggles\XEH_preStart.sqf"
�8ƣ�FI�$I� Y�MkUZI�$I2 Y�iJU�jИ>
15:37:41 Error position: <�8ƣ�FI�$I� Y�MkUZI�$I2 Y�iJU�jИ>
15:37:41 Error Invalid number in expression
15:37:41 File z\ace\addons\goggles\XEH_preStart.sqf, line 1
15:37:41 Error in expression <"z\ace\addons\goggles\XEH_preStart.sqf"
�8ƣ�FI�$I� Y�MkUZI�$I2 Y�iJU�jИ>
15:37:41 Error position: <�8ƣ�FI�$I� Y�MkUZI�$I2 Y�iJU�jИ>
15:37:41 Error Invalid number in expression
15:37:41 File z\ace\addons\goggles\XEH_preStart.sqf, line 1
15:37:46 [0,31.074,0,"XEH: PreStart finished."]
15:37:48 Warning Message: You cannot play/edit this mission; it is dependent on downloadable content that has been deleted.
a3_characters_f

#

Still got that broken text

#

and its a fresh ace and cba off armaholic

still forum
#

I'll be back in 40 minutes

grave brook
#

alright

meager heart
#

maybe that is just broken default mission on your server

grave brook
#

tested with 2 seperate missions

#

one exact mission file that I have had working before

austere hawk
#

is it possible to 'warp' units from inside one vehicle to another directly?

still forum
#

@grave brook armaholic is not a official ACE mirror afaik.

#

Use the official github download

#

Are you hosting the server yourself or via a external hoster?

obsidian kiln
#

killed eventhandler is stackable on the player ?

#

or it overwrites?

still forum
#

both mh... thought there was a setEventHandler
addEventHandler always stacks

grave brook
#

Im using a external hoster, host havoc to be specific

#

I had to go out but ill get a official mirror once im home

still forum
tough abyss
#

If I have a variable is there a way to determine whether it is a string or an array?

grave brook
#

I think I found the problem

still forum
#

@tough abyss

tough abyss
#

Excellent thanks

grave brook
#

"15:41:36 Warning Message: You cannot play/edit this mission; it is dependent on downloadable content that has been deleted.
a3_characters_f"

still forum
#

unrelated

grave brook
#

a3_characters_f is a part of default arma?

still forum
#

happens regularly. Known bug. Doesn't many anything

grave brook
#

Ah, I ran it without any mods though then still got that error and it wouldn't launch

#

Might just reset my server

peak cliff
meager heart
#

with your favorite text editor

peak cliff
#

Hahaha

#

Editor is check

meager heart
#

😃

austere hawk
#

@tough abyss the limitations for move/stop orders that apply to vehicle AI when under player move orders seem to extend to infantry as well

tough abyss
#

Rip my phone doesn’t actually have tilde. Deleting that.

And that code was terrible anyways lol.

@austere hawk ace or achillies had a zeus module that teleports with vehicles, if that doesnt work for you you can ghetto it with

log vehicles, teleport everything with a black screen, unblack, move players back in vehicles

I am on mobile and not home and not familiar with teleporting sorry

austere hawk
#

not players, just AI. But i dont want them to have visible ejection sequence and then disappear into thin air

tough abyss
#

Theyd disappear anyways if its teleporting tho right?

#

You know I totally missread it in the first place. Sorry.

So if you teleport a unit by the default way, it doesnt take their vehicle. So hide the unit, teleport them away, then move them into the second vehicle’s cargo, unhidr. You may be able to just force eject them then move them into the next vehicle-and skip the teleport

jagged narwhal
#

How do I make a custom song (which I have already ported in with classes and all) loop whilst I am in the trigger area?

#

and is it possible to make an ai flown helicopter fly like it's on rails?

cosmic lichen
#

For your music

edgy halo
#

Can you exit a loop using any scripting command or external program. while {true} do {}; note: a loop that already exits. Just asking for ah purposes

austere hawk
#

exitWith

#

but only from within loop code not "i want to exit this loop of that other script that i didnt write"

winter rose
#

breakTo too (ugh)

snow pecan
#

Or breakout

edgy halo
#

I'm not asking that, the loop already exists as I said.

inner swallow
#

you've received two responses answering that, above.

half monolith
#

has anybody had the occasion to play with optics enough to know whether or not its possible to default an optic to the rmr position instead of the bottom zoomed position ?

limpid pewter
#

Anyone up for a camera challenge? Because i've got a difficult problem.

Basically i want a camera to follow a moving target like a vehicle or player with a certain offset (this can be done using code example #1), however i also want to do this whilst not having the camera follow the target's direction (which is what occurs with example#1).
I have have tried example#2, which should work logically, however this generates severe stuttering with the camera. I assume the stuttering is caused by the performance of the setPos or camSetPos command or something.
Does anyone have any suggestions to make this run more smoothly?

Example #1:

showCinemaBorder false;
sp_followingCamera = "camera" camCreate [0,0,0];
sp_followingCamera cameraEffect ["Internal", "BACK"];
sp_followingCamera camSetTarget _camTarget;
sp_followingCamera camSetFov 1;
cameraEffectEnableHUD true;
sp_followingCamera camCommit 0;

waitUntil {
    if (!sp_followCam) exitWith {true};

    sp_followingCamera camSetRelPos [-2,1,3];
    sp_followingCamera camCommit 0;

};

Example#2:

showCinemaBorder false;
sp_followingCamera = "camera" camCreate [0,0,0];
sp_followingCamera cameraEffect ["Internal", "BACK"];
sp_followingCamera camSetTarget _camTarget;
sp_followingCamera camSetFov 1;
cameraEffectEnableHUD true;
sp_followingCamera camCommit 0;

waitUntil {
    if (!sp_followCam) exitWith {true};
    _targetPos = getPos _camTarget;
    _camPos = [(_targetPos select 0) + xCoef,(_targetPos select 1) + yCoef,3];
    sp_followingCamera camSetPos _camPos;
    sp_followingCamera camCommit 0;

};
meager heart
#

Does anyone have any suggestions to make this run more smoothly?

_camera camPreparePos _position;
_camera camCommitPrepared <delay>;
sleek token
#

does a extension gets closed after calling ?

limpid pewter
#

@meager heart Unfortunately that didn't work.

waitUntil {
    if (!sp_followCam) exitWith {true};
    _targetPos = getPos _camTarget;
    _camPos = [(_targetPos select 0) + xCoef,(_targetPos select 1) + yCoef,3];
    sp_followingCamera camPreparePos _camPos;
    sp_followingCamera camCommitPrepared 0;

};
``` if this is what you meant. It is still stuttering each time the cam target moves.
silk sparrow
#

Hey guys, I've got a little question, i'm trying to combine two scripts on my server, is there only one stringtable.xml? and if yes, do I just have to copy paste <project> from the first stringtable.xml to the second?

limpid pewter
#

@sleek token I'm not sure what is meant by this. What extension?

sleek token
#

using custom librarys via callExtension

meager heart
#
sp_followingCamera camCommitPrepared 0;

-->

sp_followingCamera camCommitPrepared 0.5;
```👌
limpid pewter
#

Ok, not at the moment. I'm running this as a simple, vanilla vr mission

#

@silk sparrow Sorry, not too sure about the use of stringtables in arma

#

@meager heart Ok will try this.

#

@meager heart Yes that works perfect. It makes sense too i guess, because it is smoothing the transition between the camera movements. Thanks for the help. you're a legend.

meager heart
#

here is example

player spawn {
    disableSerialization;
    params ["_unit"];
   
    private _camera = "camera" camCreate eyePos _unit;
    _camera cameraEffect ["internal", "back"]; 
    _camera camPrepareTarget _unit;
    _camera camPrepareFOV 0.1;
    _camera camCommitPrepared 0;

    waitUntil {camCommitted _camera};
    showCinemaBorder false;
    cameraEffectEnableHUD true;
    
    [_camera, _unit] spawn {
        params ["_camera", "_unit"];
        while {!isNull _camera} do {
            private _position = _unit getPos [200, (_unit getDir _camera) + 0.1];
            _position set [2, 100];
            _camera camPreparePos _position;
            _camera camCommitPrepared 0.05;
        };
    };
    
    sleep 10; 
    _camera cameraEffect ["terminate", "back"];
    camDestroy _camera;
};
```paste it into debug console ^ @limpid pewter
limpid pewter
#

Wow, that's cool. i love the way you've used getPos and getDir in the loop there. I've always wondered how people do a spinning camera like that.

meager heart
#

so yeah.. just play with that commit delay... and use camPreparePos

still forum
#

@edgy halo if you store the script handle (returned by spawn/execVM) then you can terminate that script by it's handle from anywhere

#

@sleek token no

sleek token
#

@still forum thx

edgy halo
#

@still forum Would it be possible for hackers to stop loops using external programs?

still forum
#

sure

#

hackers can do anything and you can't do anything against it

meager heart
#

unless you are cool hacker too 😃

edgy halo
#

Yeah, [] spawn { while {true} do {}; diag_log "loop stopped"; };

still forum
#

That won't work. Atleast I would just kill the script

#

ending the loop and letting the code after that run is waaaay more complicated

#

you can as I said store the script handle

#

and then periodically check if the script behind that handle is still running

#

if it isn't then you know something is wrong

edgy halo
#

Well im executing code to client on join

#

I will try it out, thanks for decent answer

still forum
#

It's about 1 click for me to kill all scheduled scripts and let isTerminated (I mentioned before to check if the script is still running) still return true...
You just can't be secure on clientside

quartz coyote
#

Hello !
Can someone explain why this is not correct ?

[[player, [(_vel select 0) + (sin _dir * _speed),(_vel select 1) + (cos _dir * _speed),(_vel select 2) + 10 ]],"setVelocity",nil,false] spawn BIS_fnc_MP;```
still forum
#

you should be using vectorAdd

#

Why don't you just use addForce to push it forwards?

quartz coyote
#

I don't know this function, i'll look it up thx

still forum
quartz coyote
#

Okay thx

#

oh and it's Global aswell

#

thx

#

nah, not good for what i'm trying to do.

#

but that wasn't my problem

#

my problem is that i can't get my player to get the animation in MP

#

it only works in SP

#

found a way ! cya !

still forum
#

there is nothing about any animations in your code ^^

meager heart
#

also BIS_fnc_MP > remoteExec 👍

quartz coyote
#

Yes I did that instead lol

#

Why would I get a Generic Error on a Sleep 5; :OOOO

#

???

gray thistle
#

Hm I ask myself why can't i use

_obj = allmines select 0;
_obj setVariable ["EditorObjectID", "5", true];

on Mines?

#

It is not the first problem with Mines i also can't use AddEventhandler on them if i do i get an -1

#

Has anyone encounterd that problem too?

#

if a code can't suspend then you can't use sleep, waitUnitl, uiSleep.

quartz coyote
#

@gray thistle ooh .... thanks ...

gray thistle
#

@quartz coyote had the same problems 😄

quartz coyote
#

So how did you pause your script ?

gray thistle
#

it depends on the script really. spawn, execVM and exec are the keywords. You will find all information in this article

#

Read under the headline "Threads"

quartz coyote
#

It's a remoteExec lol ...

still forum
#

remoteExec spawn then

#

or remoteExec a script.. remoteExec'd scripts are scheduled by default I think

#

just don't remoteExecCall

quartz coyote
#

it's a strang situation, i'm remoteExecing a script that sends a displaySetEventHandler on a keyboard press

#

so the script i'm trying to pause is in the _keyActivate variable

still forum
#

so it has nothing to do with remoteExec at all but you are trying to pause inside a eventhandler?

quartz coyote
#

that would be it I guess

still forum
#

spawn your script inside the eventhandler then

quartz coyote
#

Inception xD

#

i'll try it

#

sorry @gray thistle I smashed you asking your own question, go ahead budd

gray thistle
#

I am still investigating

still forum
#

afaik ACE guys also had something with Mines

gray thistle
#

could be since vanilla has some problems with it it could also hit ACE.

still forum
#

I think ACE has a workaround though

#

I think they have a mineDetonated eventhandler

gray thistle
#

probably i know there is some workarounds. But i think with setVariable it will get harder. Bohemias Mine system in comparsion to vehicle and units is a big mess.

still forum
#

duplicate reports would be duplicates though

gray thistle
#

ähm a secound diffrent one a subtask which relates to this. If it wasn't clear what i meant ^^
The existing one is for Eventhandler and the secondary one is for the setVariable problem

#

I searched for other Bug reports regarding that problem with no result.

still forum
#

There are some terrain objects which cursorObject returns, but which can't have variables or eventhandlers

gray thistle
#

sure this is why i set one lookup on cursorobject last lookup line to be sure to have the right object in the selection

sleek token
#

@still forum does arma allow a _x64.dll extension to use another 3party 32bit dll?

#

as reference

still forum
#

Arma does

#

but windows doesn't

queen cargo
#

gah ... csharp ... anyways .. should kind of be the same

still forum
#

That wouldn't make sense

limpid pewter
#

@meager heart Hey, is there a difference between camPreparePos and camSetPos. They both seem to do the same thing, is the prepare version just faster or something?

still forum
#

camPreparePos uses camCommitPrepared. camSetPos uses camCommit

#

you can have 2 set's of changes ready. And only apply one and later the other

meager heart
#

^

limpid pewter
#

So if i understand correctly, if you have two camPreparePos commands, but then only execute 1 camCommitPrepared command, the first camPreparePos called with be the position the camera will move to? and then if a second camCommitPrepared is called the second will be run even if both are called like this ```sqf
camPreparePos _pos1;
camPreparePos _pos2;

camCommitPrepare 0; //will only commit to _pos1
camCommitPrepare 0; //will only commit to _pos2

Essentially they will not over write each other?
#

or is it you can have 1 prepared and as many normal camSetPos and them commit to the single prepared one anytime in the future? <----Feel like it is this one after reading what you've said again

still forum
#

no

sleek token
#

@queen cargo yeah c# stuff..

still forum
#

camPos and camPreparePos are seperate.

queen cargo
#

@sleek token reasoning should be roughly the same

sleek token
#

guess have to build my own x64 version then?

still forum
#

then*

queen cargo
#

either that, or you start using the x32 version

sleek token
#

that would lead me to use arma32bit soooo first one

meager heart
#

also iirc with prepare/preload camera commands all textures and models around that position will be "preloaded" to avoid glitches/visual artifacts... after camera will be moved

#

btw there are no proper docs about "cameras things"

limpid pewter
#

^ Yeah, tis a bit that way

#

Makes sense though.

sleek token
#

aren't MSIL libraries not usable by either 32or64bit? talking about c#

silk sparrow
#

Did someone know a good script with a grappelling Hook and the possibilities to climb the rope?

quartz coyote
#

Is there a way to test if player is performing an action like boarding cargo or other

#

?

tough abyss
#

You could use an animation event handler and detect the specific animation assuming it is unique enough to the action.

long hatch
#

Hello, i try to write a function to add some Teleport points to vehicles with given Names, but it won't work. Can some one give me a hint to the right direction?

params ["_tpbase","_type"];
_obj = missionNamespace getVariable ["_tpbase", objNull];

if (_type == 1) then {
    _obj addAction["BUS -> SB2", {player setPos (getMarkerPos "tp_sb2");}];
    _obj addAction["BUS -> SB3", {player setPos (getMarkerPos "tp_sb3");}];
    _obj addAction["BUS -> SB4", {player setPos (getMarkerPos "tp_sb4");}];
    _obj addAction["BUS -> SB18", {player setPos (getMarkerPos "tp_sb18");}];
} else {
    _obj addAction["BUS -> Kaserne", {player setPos (getMarkerPos "tp_kaserne");}];
    _obj addAction["BUS -> Camp", {player setPos (getMarkerPos "tp_camp");}];
    _obj addAction["BUS -> Flugplatz", {player setPos (getMarkerPos "tp_airfield");}];
};
still forum
#

_obj = missionNamespace getVariable ["_tpbase", objNull]; What is that supposed to do?

#

A local variable in a global namespace can work. But doesn't make much sense

long hatch
#

Transform the String back to an Object

#

because when i use _tpbase it says "Error Type String, expected Object"

#

_tpbase should be the Object where the Actions would be attached to

still forum
#

so you are passing a variable as a string to that function?

#

why?

#

Why not just pass the object directly?

#

and you are not getting a variable by the name of what's inside _tbase. You are getting the variable "_tbase"

#

which is probably undefined

long hatch
#

how can i make this? Sorry i am really new to this kind

still forum
#

how are you calling that script?

long hatch
#

[Objekt,1] call my_fnc_teleport

still forum
#

really?

#

did you copy paste that from what you are actually using

#

or did you just type that down

long hatch
#

i type that down

still forum
#

Good

#

you fixed your bug while typing it down

#

How am I supposed to find your problem. If you fix your problem while typing it down?

meager heart
#

😃

still forum
#

I actually expected to now get a copy paste of what's actually being used.. But I guess the problem solved itself?

digital jacinth
#

by any chance does anyone here know the particle effect class that is spawned when a tank fires its main gun?

thorn saffron
#

Is it possible to kill a unit with a script, but properly "award" a kill to a different unit?

tough abyss
#

How often can you make new waypoints?

#

for the ai using scripts

#

i tried 0.01 but they just got into an endless stream of "MOVE TO POSITION X" and didnt move

#

ok reducing it to 1s they start moving

#

@thorn saffron do you mean like a kil in the chat (X killed Y) or in the debriefing like : Your Kills or do you mean score? Or the leaderboard?

winter rose
#

@thorn saffron I believe you can create a bullet and set "parent" (origin) a specific unit

#

I don't have much more info though

thorn saffron
#

eh, I think I will just add a simple kill with set damage. I'm making a simple ACE action that will let you kill enemies if you get close enough to actually use it. You can actually get that close, if the stars align that is, but the enemy will not sense you even if you are right behind him, he will if you bump into him though.

winter rose
#

ta-daaa

tough abyss
#

I added some code to make markers, and now my code is broken?? (No error, code just doesnt execute)
If I remove the marker code it works

#

What did I do wrong that makes it stop working? heres the marker code: ( i know its ugly )

#

_mrk = createMarker [("Mrk" + str(_this select 0)), (groupAmbush select (_this select 0))];
("Mrk" + str(_this select 0)) setMarkerText ("GRP:" + str(_this select 0));
("Mrk" + str(_this select 0)) setMarkerShape "RECTANGLE";
("Mrk" + str(_this select 0)) setMarkerSize [1, 1];
("Mrk" + str(_this select 0)) setMarkerColor "ColorEAST;
("Mrk" + str(_this select 0)) setMarkerBrush "Cross";
("Mrk" + str(_this select 0)) setMarkerAlpha 1;

#

Should I rework the code?

#

Or just abondon the markers completely?

winter rose
#

you should store the marker name in a variable, to be honest

#

try to systemChat it, and see what it returns

still forum
#

He is already storing the markername in a variable

#

just not using it

#
_mrk = createMarker [("Mrk" + str(_this select 0)), (groupAmbush select (_this select 0))];
_mrk setMarkerText ("GRP:" + str(_this select 0));
_mrk setMarkerShape "RECTANGLE";
_mrk setMarkerSize [1, 1];
_mrk setMarkerColor "ColorEAST;
_mrk setMarkerBrush "Cross";
_mrk setMarkerAlpha 1;
#

...

#

Well..

#

I guess I can see why it's not working @tough abyss

winter rose
#

createMarker 2nd parameter not being a position?

still forum
#

for real?

winter rose
#

(on mobile right now)

still forum
#

does highlighting not work on mobile?

winter rose
#

nope

still forum
winter rose
#

oh, indeed 😄

meager heart
#

cough " _cough _

#

btw was digging the "right icons" in ui_f folders and found that we have commy2 special variant for the vehicleIcons - iconManCommander2 lol

edgy dune
#

ohh dedmen how did u get that syntax highlighting 😛

still forum
#

Real question?

edgy dune
#

oh rip I thought that was in notepadd++ oooff

meager heart
#

oooff > oop /s

dim owl
#

hello, is it possible to create a parsetext and put an image as background and a text above it?

#

it would be used for a structuredtext control

fair drum
#

how can i make it so AI is faster and more confident in landing?

lament grotto
#

alright quick q for people using the vehicle respawn module on a plane for when it gets shot down, I have it spawn with new crew with a code in the expression box _newVeh = _this select 0; createVehicleCrew _newVeh; However it just falls ace first to the ground on respawn. Is there something I can add that will make start flying.

lament grotto
#

Fixed it if anyone else has the problem this is the new expression code _newVeh = _this select 0; createVehicleCrew _newVeh; _newVeh setVelocity [60 * (sin (getDir _newVeh)), 60 * (cos (getDir _newVeh)),50]

chilly surge
#

Hello, I´m currently working on a mission for my group. A team of divers has to go through a tunnel and cut a gate with this addaction this addAction "Gitter durchtrennen","teleport.sqf",["exit_sea"]];
When using this one on land it works fine and the player gets teleported to a marked location. But if I try to use it underwater, the addaction doesn´t pop up. I wasn´t able to find anything related to it on google. Any Ideas? Thanks in advance.

tough abyss
#

does anyone know a return value to check if you are in the editor?

peak plover
#

@chilly surge I've never used addaction under water, but you could try adding the action to the player itself and then putting distance to the gate as a condition

#

@tough abyss is3DEN

tough abyss
#

thank you

peak plover
#

@fair drum Place an invisible helipad, or several, you can also set the ai to careless

meager heart
#

also courage high value

peak plover
#

ohh

#

I didn't think of that

#

But yeah

#

Mite help 🤔

meager heart
#

and i always set behaviour to 'combat' for helis or door gunners will be too shy...😃

#

combat mode "red" behaviour "combat" and "courage" close to 1 ^

#

and no waypoints

#

just commands

#

move, land...

velvet merlin
#

is it possible to swap between to weapons via scripting without the ugly empty hands animations these days?

meager heart
#

maybe with eh "AnimChanged" speed up the animations with setAnimSpeedCoef (never tried it, just thoughts) 🤔

winter rose
#

selectWeapon + switchMove?

velvet merlin
#

switchMove to what exactly though?

meager heart
#

to...
to something like that > "🔫😐 or 😐🔪"
😄

winter rose
#

well the anim you want?
you want to switch from rifle to handgun? selectWeapon should do the trick, with a clean anim
if you want an instant transition, you would have to switchMove to handgun animation adapted to your stance

meager heart
#

afaik they're different for every gun/type of weapon...

#

also custom variants from addons

velvet merlin
#

if you swap one rifle to another

digital jacinth
#

short question about missionNameSpace, doing this

missionNamespace setVariable [_key + "activeGroups",_activeGroups,true];

is the same as

myVar = "asdasdasd";
publicVariable "myVar"

Right?

still forum
#

can't be

#

missionNamespace setVariable ["myVar", "asdasdasd",true];
That would be the same as your publicVariable

hollow thistle
#

😄

digital jacinth
#

🙄

#

thanks for clearing that up

astral tendon
#

Is there a way to remove VR entitys mark on the map?

quartz coyote
#

Hello, I have an error on this, it's telling me it is bool and not a number...

if ((0 <= _X1 <= 1) && (0 <= _Y1 <= 1)) then```
still forum
#

correct.

#

you can't use <= to compare bool to number

#

That's why you should always set all the paranthesis.

#
if (((0 <= _X1) <= 1) && ((0 <= _Y1) <= 1)) then

This is your code

quartz coyote
#

Ohhh.....

still forum
#

After executing the first part.

if ((bool <= 1) && (bool <= 1)) then

You can't compare bool to number.

quartz coyote
#

Still not working

#

I want it all to be considered as Number and not Bool

#

I don't want bool here

still forum
#

then don't put bool there

#

just write different code

quartz coyote
#

...... what am I writing as bool ???

#

I want 1 to be 1

still forum
#

I just told you like.. 2 minutes ago

quartz coyote
#

not true

#

then I don't understand ...

#

So... what is the system not understanding when I say 1 is 1 and not True

#

how can I adapt my code ?

still forum
#

You understand that 0 <= _X1 returns bool right?

quartz coyote
#

no... for me in maths i learnt that <= was "Smaller or equal to"

still forum
#

Yeah...

#

And what is the result?

quartz coyote
#

Oh... right

#

so what can I do ....

still forum
#

Just say out what you want to test

#

you want to check if _X1 is bigger or equal to 0 and that _X1 is smaller or equal to 1. Right?

quartz coyote
#

Yeah

still forum
#

So write that down as SQF code then

#

You can literally one to one translate that to SQF and it'll work.

quartz coyote
#

if ((0 <= _X1) && (_X1 <= 1) && (0 <= _Y1) && (_Y1 <= 1))

#

??

still forum
#

yes.

quartz coyote
#

Stupid code bool system .

#

thanks man

still forum
#

Yeah. Maths is so stupid.

#

It's totally the bool system that's stupid here ...

quartz coyote
#

being sacastic ?

hollow thistle
#

Dedmen!? Sarcastic!? Never. 😄

quartz coyote
#

tss

peak plover
#

:heavy_math;

meager heart
#

math sucks, man... use calculator /s

hollow thistle
#

What type of position is used by camSetPos

#

I'm doing

private _camera = "CamCurator" camCreate (eyePos player);

_camera cameraEffect ["internal", "back"];

and it opens wayy above player (~10m)

sour saffron
#

PositionASL

hollow thistle
#

I know what type is returned by eyePos.

#

I want to know what type of position is used by camCreate / camSetPos as I could not find this information on wiki.

sour saffron
#

XYZ

#

what i was thinking maybe the eyepos isnt right for your input

meager heart
#

veteran29, agl afaik

hollow thistle
#

ty.

meager heart
#

btw there ^ (posted few days ago) example with camera positions, maybe that will helps somehow

nocturne basalt
#

Not sure if this is the right place to ask, but..

am I right about these values when talking about vehicle damage?

white = 0.00 -> 0.29
orange = 0.30 -> 0.59
red = 0.60 - > 1.00

quaint turtle
#

Hey guys, how would i go about setting multiple TFR Freqs on different channels that are pre-defined in an array? I was going to do [(call TFAR_fnc_activeSwRadio), 1, "142.2"] call TFAR_fnc_SetChannelFrequency; over and over (but changing the freq and channel), but i know there's an 'easier' way to do it, is it possible to do it in a foreach (i don't know much about this, but i'd think it would go something like this) private _freq = [[1,"142.3"],[2,"142.4"],[3,"142.2"],[4,"142.5"],[5,"124.1"],[6,"52.1"]]; { [(call TFAR_fnc_activeSwRadio), _x, _x] call TFAR_fnc_SetChannelFrequency; } forEach _freq; - is it possible for anyone to help me out?

still forum
#

The mod is called TFAR.

#
private _freq = [[1,"142.3"],[2,"142.4"],[3,"142.2"],[4,"142.5"],[5,"124.1"],[6,"52.1"]];
{
    [(call TFAR_fnc_activeSwRadio), _x select 0, _x select 1] call TFAR_fnc_setChannelFrequency;
} forEach _freq;
quaint turtle
#

thank you

tough abyss
#

Edit: Solved. Issue was scope = 2 forces it as an ingame marker, and to the top of the list.

I have a Custom Flag that is showing up as the 'default' marker when you open the map. That is, instead of the black dot, it is the flag icon.

I am unsure why this is happening and am having trouble finding information about it, does anyone know a fix?

I implemented it this way in an addon:

class CfgMarkers
class flag_Spain;
    class flag_Spagistan : flag_Spain
    {
        scope = 2;
        name = "Spagistan";
        icon = QPATHTOF(gui\Spag_Flag_Square_ca.paa);
        texture = QPATHTOF(gui\Spag_Flag_ca.paa);
        size = 32;
    };
};
winter rose
tough abyss
#

probably. always forget that section exists

icy light
#

so whats the proper way to do more than 1 line of code in a switch block?

fringe yoke
#
switch (side player) do {
  case west: {
    hint "West";
    player addItem "Something_West";
  };
  case east: {
    hint "East";
    player addItem "Something_East";
  };
};
icy light
#

hmm i thought you couldnt add a ; at the end of the line? thought it had to be like case "blue": { _color = "blue" };

#

?

fringe yoke
#

The last line doesn't need a ; if you want to return something

#
_color = switch (side player) do {
  case west: { 
    hint "West";
    "ColorBlue"
  };
  case east: {
    hint "East";
    "ColorRed"
  };
};
#

_color will then have either ColorBlue or ColorRed as the value

icy light
#

ty

jagged narwhal
#

this addMagazineTurret "8rnd_SPG9_HE";

#

alright

#

What exactly am I messing up about the syntax

#

should I use the vehicle's class instead of this

#

also where do I find the turretpath.

#

seeing as how it's the mainturrret would 0,0 suffice?

jagged narwhal
#

this addMagazineTurret ["8rnd_SPG9_HE",[0,0]]; doesn't seem to work

winter rose
#

@fringe yoke the semicolon is optional but it can work with it @icy light

meager heart
#

What exactly am I messing up about the syntax

still forum
cosmic lichen
#

is there a case insensitive alternative to find?

still forum
#

no.

hollow thistle
#

AFAIK no but you can always do apply with toUpper

still forum
#

Intercept CBA has findCI.
Are you searching in a string or an array?

#

findIf might be an option for array.

cosmic lichen
#

@hollow thistle to upper might work, although I hope it won't slow down my incremental seach too much

#

Iam not using cba

#

and it's a string =/

still forum
#

yeah. toUpper/toLower then...

#

depending on how long your thing is that you are searching for. you could also run many finds with all permutations of upper/lowercase 😄

#

but just toLower is probably the fastest/easiest approach

cosmic lichen
#

works fine, thanks!

still forum
#

Uhhh... Dynamic search... @alganthe do!

cosmic lichen
#

ähm what?

still forum
#

Want that too for ACE Arsenal

#

but @alganthe said too slow

cosmic lichen
#

I see 😄

still forum
#

Is that a Music UI thingy?

cosmic lichen
#

Yes

still forum
#

Is it possible that I can get that as Zeus Module? My group does alot with music in missions. Currently we use a modified version of the normal Zeus module UI that also has a slider for a offset of when to start the track and I keep fixing that every month cuz it keeps breaking 😄

#

will you release that mod?

cosmic lichen
#

3den Enhanced

#

Just unpack it and abuse it

still forum
#

I will o7. We use that anyway

cosmic lichen
#

😃

still forum
#

I think our mission maker/zeus will do backflips when he sees that

#

We have a couple GB big music pack with hundreds of titles that we play mid-mission

cosmic lichen
#

If you can get it to work in Zeus 😉

#

But actually, it should it's not bound to eden in any way

#

I am just using my own music pack

#

With music from older arma titles

still forum
#

Just need to add a button that remoteExec's the music. And a second slider under the volume slider to select the start offset.

cosmic lichen
#

Easy enough

#

No sorting doesn't work anymore -_-

#

I hate it, fix one thing, break 2 other

still forum
#

can you sort/search by Theme?

cosmic lichen
#

yes

limpid pewter
#

Hello . Anyone got a quick script i can borrow to extract all weapon classnames?

#

I just need to be able to dump an array of all weapon classnames to the .rpt file so that i can then import then to excel for some stuff

still forum
#

Only weapons?

#

like rifle/pistol/launcher?

limpid pewter
#

Yeah

#

Yup

#

It would be good to sort by type if possible aswell, but just dumping all weapon classnames will be fine

#

i found BIS_fnc_geCfgSubclasses, but it just gives me bin\config.bin/CfgWeapons

still forum
#
private _weapons = [];
{
if (isClass (_x >> "WeaponSlotsInfo") && getNumber (_x >> 'type') != 4096) then {
_weapons pushBack configName _x;
}
} forEach configProperties [configFile >> "CfgWeapons", "isClass _x && {(if (isNumber (_x >> 'scopeArsenal')) then {getNumber (_x >> 'scopeArsenal')} else {getNumber (_x >> 'scope')}) == 2} && {getNumber (_x >> 'ace_arsenal_hide') != 1}", true];

gobble gobble gobble https://github.com/acemod/ACE3/blob/master/addons/arsenal/functions/fnc_scanConfig.sqf

limpid pewter
#

Thanks mate.

#

Will try this

#

Amazing 😃

cosmic lichen
#

Stupid arma

#

Seems like onkeyDown and onKeyUp are not properly triggered by the backspace key

peak plover
#

it's probably sth that cannot be rebound

cosmic lichen
#

you mean a control?

peak plover
#

I'm slightly sure that whenever you hit backspace

#

It always shows the same menu

#

Maybe it cant be rebound

#

@cosmic lichen onKeyDown and onKeyUp mite not work

#

but did u trey any alternatives?

cosmic lichen
#

I tried onChar, but that obviously doesn't fire at all for backspace since it doesn't create a character

#

Alright, I know the issue.

peak plover
#

hmm

cosmic lichen
#

The keyDown and up Ehs, fire before backspace deleted the character

#

that's why the filter is sometimes not updating

peak plover
#

ooooh

#

I see

#

I see now

cosmic lichen
#

Questions is how to fix that

peak plover
#

I didn't get it before the video

#

You need to update the list when the text in the box changes

cosmic lichen
#

But there's no event for that

peak plover
#

one way to do it is to make a loop, which checks if the text has changed

#

or you can try experimenting with doing the key down EH

#

Then spawning the function which checks if the text has changed( on the next frame )

#

You can still keep it kinda loop less

cosmic lichen
#

That's what I was t hinking

#

a small delay between keyDown and returning the text from the edit control

cosmic lichen
#

Sometimes the solution is quite easy

#

If onKeyDown is too fast, then why not use onKeyUp.

#

Works like a charm now

peak plover
#

aah, that's good

#

Glad it worked out

cosmic lichen
#

Yeah, thanks alot for your help!

winter rose
#

hmmm quick question, is it valid?

while { alive enemyTank } do
{
    ["myMarker", 1] call BIS_fnc_moduleFDFadeMarker;
    ["myMarker", 0] call BIS_fnc_moduleFDFadeMarker;
};```
#

call will make the code "wait" if there is a sleep in there right? :3

#

also, does call still accept string as parameter?

still forum
#

call accepts ANY as parameter

#

call will execute the code synchronously

#

it will continue when the code inside the function is done

winter rose
#

danke schön, mein herr

meager heart
#

btw we have setMarkerAlpha Lou 😀

winter rose
#

I know? this one gradually does the change 😉

#

FD = Firing Drill

meager heart
#

oh... i see 😉 (through you're using it somewhere... question was not for the wiki examples lol)

peak plover
#

uhh

#

is diag_log limited?

gleaming oyster
#

What?

still forum
#

yes

#

as biki already says

gleaming oyster
#
 patch 1.59 there is a limit of 1044 characters to be printed, no error or crash but diag_log line will simply end at character number 1044.
peak plover
#

ahh, darn didn't see the comment

surreal peak
#

is it possible to use while loops like while {CONDITION == 1} do {

#

or does it always have to be like while {CONDITION} do {

#

I'm quite new to coding and was just wondering how it has to be

hollow thistle
#

while { ... } do { ... }; Both are blocks of code.

#

If the first one returns true the second one is evaluated.

#

So you can put almost anything here.

surreal peak
#

lovely

#

just realised the reason why it wasnt working was because I was doing == instead of =

#

too much python coding 😐

hollow thistle
#

? == is correct way to compare.

surreal peak
#

is it

#

shit

#

ok

#

thanks

gleaming oyster
surreal peak
#

Thanks!

meager heart
#

is it possible to disable sector notifications somehow ? 🤔

#

(lost/captured)

hollow thistle
#

What sectors? You mean vanilla module?

meager heart
#

yep, but scripted... customized a bit lol there are nothing on map

#

with bis_fnc_mp lol

#

probably better option will be..."custom sector function" from scratch, with less... crap stuff and more options...

zealous dragon
#

how to unattach object after using attachTo?

zealous dragon
#

wow thanks

civic canyon
#

hi if ((_container getVariable ["trunk_in_use", ""]) != "") exitWith {hint localize "STR_MISC_VehInvUse"}; ı edit this for vehicle container
just useing 1 player
but trunk_in_use this wrong

lean estuary
#

I always wondered if there was a way to immediatly know the filepath of a config file for a default arma 3 addon by just having the classname. Is this something that's possible?

gleaming oyster
#

@civic canyon Yes, because executing local to that player will only execute for that player.

#

@lean estuary how do you mean "filepath" ?

#
_isVehicleClass = isClass(configFile >> "CfgVehicles" >> "BlahClassName");
charred steeple
#

Hey, wondering if there is a way to extract coordinate data for buildings, ai spawns, item spawns, etc, from Arma/DayZ maps, for use in a web interactive map.

#

I've been Googling the hell out of it, and asking on forums, with no luck yet.

peak plover
#

Buildingpos

civic canyon
#

@gleaming oyster if ((_container getVariable ["trunk_in_use", ""]) != "") exitWith {hint localize "STR_MISC_VehInvUse"}; this is not working

queen cargo
#

to those developing extensions for arma in here and never bother to look into #arma3_tools , yes all 3 of you, you maybe want to check my post in there so you can debug your extensions easier and without the need to start arma

arctic veldt
#

Can't teach an old dog new tricks 🤣

queen cargo
#

@arctic veldt just trying to convince him to use sqf-vm to test his extension instead of arma 😛

tough abyss
#

Where in the source files of Arma can I view the code for scripts? As an arbitrary example, say, setRank.

queen cargo
#

uhm ... setRank is no script but an operator

#

unless you know how to reverse engineer the game, you are out of luck to know how the backend implementation works

tough abyss
#

Ahh, okay. I've found a few /scripts under the Functions and Module pbos and was wondering if there was a dump of them somewhere. Thanks

robust mountain
#

Hello, community. I desperately look for a script to make drop in helicopter in multiplayer !!?

winter rose
#

You can use an "unload" waypoint, it's shipped with the game ;-) @robust mountain

robust mountain
#

It does not work in multiplayer on a server normally. It's already tested.

winter rose
#

is the group leader an AI?

still forum
#

@tough abyss Debug console has a "function viewer" button where you can view all the functions.

#

Script commands you can see on the wiki. And most functions are also on the wiki

tough abyss
#

Functions are easy to find, yeah, but the source code for some script calls seems to be difficult to find or unavailable.

still forum
#

show example.

gleaming oyster
#

What script calls? You mean commands?

tough abyss
#

setRank, for example. Some functions in arma 3 use hardcoded strings for ranks, and some check CfgRanks.

gleaming oyster
#

Both acheive the same thing

#

CfgRanks you can't add more entries to use with setRank

tough abyss
#

i can't find the source code for most Pre-Arma 3 stuff in general really

gleaming oyster
#

the method is different, doesn't mean the effect is different. Maybe with a custom rank system it might

#

publicly there is no source code for the command setRank

tough abyss
#

which is the bummer part, as setRank is more of an example

gleaming oyster
#

I don't understand your intentions to begin with. What are you trying yo acheive??

#

You wouldn't be able to modify the command with the raw source as it is.

tough abyss
#

look at commands/scripts/whatever that are not explicitly labeled as functions, as sometimes, such in this case, its unclear what is modifiable and what isn't.

#

i'm not trying to modify the source though...

peak plover
#

Who is grpNull local to in multiplayer?

#

I'm guessing server

still forum
#

setRank is a engine command. Not a function.

#

@peak plover local grpNull -> false

#

always

#

You can edit setRank command if you really wanted to.. But why ^^

#

@tough abyss setRank supports:
PRIVATE
CORPORAL
SERGEANT
LIEUTENANT
CAPTAIN
MAJOR
COLONEL

And that's it. Just as the wiki says.
and some check CfgRanks Yeah.. CfgRanks (If you'd look at config viewer you'd see that) contains these Rank names and also icons and additional info that can be used for display purposes

#

So if they use CfgRanks they prooobably are doing that to get the icon

tough abyss
#

probably, yeah. just one of those things that's partially config, partially hard coded I suppose. gave the CfgRanks an addition, and setRank will only accept those hard-coded values. Which is weird as the... set Rank Module, I think it is, or another rank call, checks CfgRanks. ORBAT does too.

#

although it was still mostly meant as an example to find source code, it is something i was fiddling with. i'll have to do ranks manually for my group then, ripperoni.

peak plover
#

ohh okay thanks

still forum
#

Interesting.. CfgRanks has GENERAL but setRank doesn't.

gleaming oyster
#

😑

meager heart
#

will be "unknown enum value" ©

tough abyss
#

General rank was added with the arma 3 campaign, I think, since as far as I know only ORBAT references it. when i'm well versed enough, i'd like to submit a tweak to Ace's Nameplates about it.

#

speaking of the above, I'm pretty green on multiplayer scripting. What would be a clean, non-bandwidth destroying way to add a string to all player units, that can then be accessed clientside to avoid nuking bandwidth (as it will be accessed with a draw3d handler)?

still forum
#

Strings don't destroy bandwidth anyway

#

unless you update a static string every frame over the network on every client....

#

just generate the string clientside and keep it there.

#

no networking involved at all

tough abyss
#

i'll give it a go, thanks

peak plover
#

🤔

#

Thanks, delicious

#

Great idea. Ill give it a go, thanks

meager heart
#

also 🥒 < after milk 👌

still forum
#

wanted broccoli. But no broccoli available

meager heart
#

:sad:

digital jacinth
still forum
#
private "_param1";
_param1 = {if (_forEachIndex == 0) exitWith {_x};} forEach _this;
private "_param2";
_param2 = {if (_forEachIndex == 1) exitWith {_x};} forEach _this;

uhhh

peak plover
#

I found a way to edit cba wait and execute que

#
cba_common_waitAndExecArray = cba_common_waitAndExecArray select {(str(_x select 1)) find 'advanced_fatigue' == -1}
#

I wanted to remove ace advanced fatigue and replace with a mission specific version of that

still forum
#

make sure to execute that code in unscheduled

#

you might crap things up big time if you do that in scheduled

peak plover
#

Ohh , yes good point

quartz coyote
#

@still forum do you think this would work ? The objective is to make the weapon spin in circle...

while {true} do
{
    // Make the weapon spin
    if ((0 <= _X1) && (_X1 <= 1) && (0 <= _Y1) && (_Y1 <= 1)) then
    {
        _w1Launcher setVectorDir [_X1, _Y1, 0];
        _X1 = _X1 + 0.1;
        _Y1 = _Y1 - 0.1;
    };

    if ((0 <= _X1) && (_X1 <= 1) && (-1 <= _Y1) && (_Y1 <= 0)) then
    {
        _w1Launcher setVectorDir [_X1, _Y1, 0];
        _X1 = _X1 - 0.1;
        _Y1 = _Y1 - 0.1;
    };

    if ((-1 <= _X1) && (_X1 <= 0) && (-1 <= _Y1) && (_Y1 <= 0)) then
    {
        _w1Launcher setVectorDir [_X1, _Y1, 0];
        _X1 = _X1 - 0.1;
        _Y1 = _Y1 + 0.1;
    };

    if ((-1 <= _X1) && (_X1 <= 0) && (0 <= _Y1) && (_Y1 <= 1)) then
    {
        _w1Launcher setVectorDir [_X1, _Y1, 0];
        _X1 = _X1 + 0.1;
        _Y1 = _Y1 + 0.1;
    };

    sleep 0.1;
};```
still forum
#

that looks a bit overcomplicated

#

don't see any errors on first look

quartz coyote
#

at least it's basic lol

#

would you have wrote it otherwise ?

still forum
#

I don't know exactly what you are trying to do.. Do you just want to rotate it around it's own axis?

quartz coyote
#

Yes

#

It'll be a levitating weapon, spinning on it's own axis.

still forum
#

For one you could do

while {true} do {
    // Make the weapon spin
    if ((0 <= _X1) && (_X1 <= 1) && (0 <= _Y1) && (_Y1 <= 1)) then {
        
        _X1 = _X1 + 0.1;
        _Y1 = _Y1 - 0.1;
    };

    if ((0 <= _X1) && (_X1 <= 1) && (-1 <= _Y1) && (_Y1 <= 0)) then {
        _X1 = _X1 - 0.1;
        _Y1 = _Y1 - 0.1;
    };

    if ((-1 <= _X1) && (_X1 <= 0) && (-1 <= _Y1) && (_Y1 <= 0)) then {
        _X1 = _X1 - 0.1;
        _Y1 = _Y1 + 0.1;
    };

    if ((-1 <= _X1) && (_X1 <= 0) && (0 <= _Y1) && (_Y1 <= 1)) then {
        _X1 = _X1 + 0.1;
        _Y1 = _Y1 + 0.1;
    };
    
    _w1Launcher setVectorDir [_X1, _Y1, 0];
    sleep 0.1;
};
#

you are rotating it horizontally and vertically. I would only rotate horizontally. Like on a turntable

quartz coyote
#

Indeed, that would be better

still forum
#

And why not just use setDir?

quartz coyote
#

Oh ... I hadn't thought that basic ... good point indeed

still forum
#
while {true} do {
    _X1 = (_X1 + 0.1) % 360;
    _w1Launcher setDir _X1;
    sleep 0.1;
};
quartz coyote
#

could you explain ?

_X1 = (_X1 + 0.1) % 360;```
still forum
#

The % 360 is modulus

#

If number is >360 then it cut's 360 off

#

so it goes 359.9 -> 360.0 -> 0.1

quartz coyote
#

Ooooh ! Great

#

thanks so much

#

I really should go back to math school lol

limpid pewter
#

Does anyone know of an eventhandler that will allow me to tell when a vehicle is disabled (tracks or engine). I wasn't able to find one on the Wiki's EH page, but maybe there is another way to detect this?

still forum
#

HandleDamage

astral dawn
#

Yeah if there's no event handler for something then you must periodically poll it

still forum
#

Don't know how a vehicle could damage it's tracks without HandleDamage

limpid pewter
#

Yeah ok, was trying to avoid handle damage. I would just get it from the hitpart parameter i assume then?

#

It might still work anyway, so thanks again.

tulip hare
#

what's the command to add items to containers? addCargoGlobal and addCargo won't work
trying to add a set amount of magazines and weapons into a supply box

tulip hare
#

do I need to specify in the script what box i'm going to use

still forum
#

How else is it supposed to know which box you want?

tulip hare
#

ok. sorry for the stupid question. thanks

#

how about this?

[[[],[],[],[]],[[[],[]],[[],[]],[["rhs_mag_30Rnd_556x45_M855_Stanag"],[80]],[[],[]]]]

I got it from the Ares Achilles copy clipboard, but it doesn't work if I paste it directly, any way to manipulate this so that I can directly paste it on cargo nets?

still forum
#

dunno what that's supposed to be

#

not a valid parameter for any of the commands linked above

#

You probably want to use addMagazine for that. SO
_box addMagazineCargoGlobal ["rhs_mag_30Rnd_556x45_M855_Stanag", 80] I guess

tulip hare
#

ohh so that's how you do it, thanks, i got confused with the first part "box" since Cargo Net [NATO] B_CargoNet_01_ammo_F wouldn't work

still forum
#

you need the actual box

#

not it's name

tulip hare
#

error: undefined variable in expression "_box"

still forum
#

There again is the question "How else is it supposed to know which box you want?" There are a dozen boxes with same name on the map. The game can't read your mind

#

where are you executing that code?

tulip hare
#

zeus, modded, noteable mods, rhs and ares achilles

#

trying to add the items to the CargoNet [NATO] since it has the largest capacity AFAIK

still forum
#

Didn't ask that question...

#

where are you executing that code

#

aka in which text box or file

tulip hare
#

"where are you executing that code?" sorry I'm stupid, what did you mean by this?

#

as zeus, when I double click on containers, a window pops up with execute on it, I usually just paste the scripts there
is this what you meant?

still forum
#

yeah..

#

But I don't know that thing so it's probably from a mod

#

you could try _this instead of _box

tulip hare
#

yeah it worked..... so now, how to add a different type of mag?
_this addMagazineCargoGlobal ["rhs_mag_30Rnd_556x45_M855_Stanag", 80],["the other mag",10]
will this work?

still forum
#

no

#

run addMagazineCargoGlobal a second time

tulip hare
#

so I can't pile them up in a single script/ at once?

still forum
#

yes you can.

#

That's what I just told you to do ^^

#
_this addMagazineCargoGlobal ["rhs_mag_30Rnd_556x45_M855_Stanag", 80];
_this addMagazineCargoGlobal ["the other mag", 10];
tulip hare
#

_this addMagazineCargoGlobal ["rhs_mag_30Rnd_556x45_M855_Stanag", 80]
_this addMagazineCargoGlobal ["the other type of amg", 80]

#

aahh I see oooohh, and same goes for the weapons?

still forum
#

ye

tulip hare
#

what about uuuhhhgg
removeAllWeapons this;
removeAllItems this;
removeAllAssignedItems this;
removeUniform this;
removeVest this;
removeBackpack this;
removeHeadgear this;
removeGoggles this;
_this addMagazineCargoGlobal ["rhs_mag_30Rnd_556x45_M855_Stanag", 80];
_this addMagazineCargoGlobal ["the other mag", 10];

still forum
#

this won't exist

tulip hare
#

_this then

still forum
#

But you might be able to guess what you c... 😄

#

Not sure if they work. As they are for Units not boxes

tulip hare
#

@still forum it's working now, thak you for your time and patience

#

thank*

unborn ether
#

Can anyone tell how to determine the maximum load unit can handle before he gets exhausted by gear? Some max value according to loadAbs?

#

Nvm found it explained in load

civic canyon
#

_vehicleData = _vehicle getVariable ["vehicle_info_owners",[]];
if (_vehicleData == player) exitWith {hint "Aracın Anahtarı Yok"};

#

they for this If the vehicles are not locked, the trunk menu should not be opened without the car's key

#

These are correct ?

ruby breach
#

Well that’s just going to give you a generic error if the variable is undefined

civic canyon
#

private ["_vehicle","_veh_data","_unitsnear","_vehicleData"]; @ruby breach

ruby breach
#

Doesn’t matter. Still going to give you a generic error if the vehicle_info_owners variable is undefined on the _vehicle

civic canyon
#

_vehicle = [_this,0,objNull,[objNull]] call BIS_fnc_param;
if (isNull _vehicle || !(_vehicle isKindOf "Car" || _vehicle isKindOf "Air" || _vehicle isKindOf "Ship" || _vehicle isKindOf "Box_IND_Grenades_F" || _vehicle isKindOf "B_supplyCrate_F")) exitWith {};

#

like this ?

#

@ruby breach

ruby breach
#

That has nothing to do with the potential for a generic error I mentioned

#

Assuming that you copy-pasted _vehicle getVariable [“vehicle_info_owners”,[]]; from somewhere that it actually works, comparing it to player is always going to return a generic error.

civic canyon
#

what should I do ?

#

@ruby breach

still forum
#

We can't tell you how to fix something while we don't know what it's supposed to do

#

Give us more details. At best all the details.
Show us your whole script. Where did oyu get "vehicle_info_owners" from.
What are you trying to do. And why are you trying to do it like you are doing it.

silk sparrow
#

Hello, How can i get the nearest vehicule of an npc classname??

still forum
#

of a classname? really?

#

What if there are many npc's with the same classname? just choose a random one?

digital hollow
#

Maybe they mean in the sense of stringdiff

silk sparrow
#

^^
I have my static npc (name: xyz_npc)
In a round of 10 meters around "xyz_npc" I would like to get the nearest vehicule classname

still forum
#

name or classname?

silk sparrow
#

classname

still forum
#

So... Answer my question then

#

Could there be more than 1 of that npc?

silk sparrow
#

Nop

still forum
#

vehicle aka Car? or.. Tank/Helicopter/Jet/Boat?

austere granite
#

i think he just wants typeOf nearestblabla

#

right?

silk sparrow
#

All vehicles

still forum
#
private _npc = allUnits param [allUnits findIf {typeOf _x == "your classname here"}, objNull];
private _nearestVehicle = nearestObject [_npc, "AllVehicles"];
private _nearestVehicleClassname = typeOf _nearestVehicle;

Thre ya go

austere granite
#

Do you consider a house to be a vehicle? 😃

silk sparrow
#

Car, planes, boats, etc....

austere granite
#

or stuff with seats?

silk sparrow
#

x)

#

With seats

#

Thank you @still forum !

still forum
#

But some drones are vehicles but have no seats

silk sparrow
#

Right but thats not a problem

nocturne basalt
#

Dont we have an eventhandler that triggers when vehicles are being repaired? 🤔

civic canyon
#

@still forum The first question I asked was resolved

drowsy axle
#

What is the difference between: ```sqf
-defines.hpp
// Defines all players who should be promoted to zeus upon connection.
#define zeusUIDs ["xxxxxxxxxxxxxxxxx", "xxxxxxxxxxxxxxxxx"]

// Defines all modules. Each module is connected to the player in the above list.
#define zeusModules [zeus0, zeus1]``````sqf
-init.sqf
zeusUIDs = ["xxxxxxxxxxxxxxxxx","xxxxxxxxxxxxxxxxx"];
zeusModules = [zeus0, zeus1];```

gleaming oyster
#

with
#define zeusUIDs ["x","x"];

#

it'll replace zeusUIDs with ["x","x"];

#
#define zeusUIDs["x","x"];
hint format["%1",zeusUIDs]; //["x","x"];
#

the zeusUIDs = ["x","x"];
will be stored in memory and have the ability to be available on the pc or other pcs.

drowsy axle
#

Does this have an affect on the usability of the variables zeusUID and zeusModules, either of these uses?

gleaming oyster
#

Nope. Not that I know of.

drowsy axle
#

Do they achieve the same thing, different ways?

gleaming oyster
#

Sure. One is stored in memory ,one is not.

drowsy axle
#

So the defines cannot be changed?

gleaming oyster
#

During runtime? I don't know for sure, but my guess would be no.

drowsy axle
#

the x's are PlayerUID's which option do you think is best?

gleaming oyster
#

I think the below example would be faster. However, I don't know which would be best.

#

depends on where and when you need to access it I guess. iirc #define will only set the definition inside that script and nowhere else. So.

drowsy axle
#

Do you think it would be effective to have a foreach for the zeusModules, so that zeusUID could be changed multiple times?

gleaming oyster
#

forEach for what array? why would zeusUID need to change?

drowsy axle
#

Able to add more ZeusUID in-game.

#

Without stopping the mission, to mess with configs.

gleaming oyster
#

just make a fnc that acts as a setter for the _zeusUID variable. Which in this case it sounds like you may just want to use the below example you provided

drowsy axle
#

Yup. I thought so.

fair drum
#

@gleaming oyster hey i'm trying to do a reverse check on if my unit is in the vehicle. i want to do something like this if ((p1 in boat1) = false) then {true} in my condition box but idk how to get my syntax correct

robust hollow
#

!(p1 in crew boat1)

fair drum
#

mk thanks. how would i go about pausing between lines of code in a trigger box? i can't use sleep in triggers im guessing.

#

like if i want playsound "Alarm" to play 3 times with 3 seconds in between when trigger condition is met

fathom scroll
#

Hi, I'm new in scripting arma 3, and need one help, hoy put info to intel archive? and change the trigger how completed in the condition of the trigger? sorry my bad english my language native is spanish 😃

fathom scroll
#

am, Hello?

still forum
#

@drowsy axle Does this have an affect on the usability of the variables zeusUID and zeusModules, either of these uses Yes.
#define is a preprocessor command. They are resolved before your script is compiled. Meaning

#define zeusUIDs ["xxxxxxxxxxxxxxxxx", "xxxxxxxxxxxxxxxxx"]
#define zeusModules [zeus0, zeus1]
zeusUIDs = ["xxxxxxxxxxxxxxxxx","xxxxxxxxxxxxxxxxx"];
zeusModules = [zeus0, zeus1];

will get preprocessed to

["xxxxxxxxxxxxxxxxx", "xxxxxxxxxxxxxxxxx"] = ["xxxxxxxxxxxxxxxxx","xxxxxxxxxxxxxxxxx"];
[zeus0, zeus1] = [zeus0, zeus1];

which obviously won't work at all.

drowsy axle
#

@still forum They weren't to be used together they are separate. If I was to use one, the other won't exist.

still forum
#

As a beginner you shouldn't touch macros if you don't really need them

winter rose
#

Are macros only "local" to the script scope? file scope maybe?

still forum
#

file

drowsy axle
#

@still forum ??

still forum
#

Mh?

#

I'd say don't use macros. They make no performance difference in your case. Only thing you might wanna use them is that no one could just edit the variables. But there are also other ways around that without using macros

warm gorge
#

Quick performance question, when using setVariable and applying a value that the variable already has, does the engine already check to see if the variable needs to be updated?

still forum
#

No. That would take about the same time as just updating it

warm gorge
#

Alright cheers

#
_animDuration = 9.09091;
_animLastTick = time;

player playMoveNow "AinvPknlMstpSnonWnonDr_medic0";

while {true} do {
    if ((time - _animLastTick) > _animDuration) then {
        _animLastTick = time;
        player playMoveNow "AinvPknlMstpSnonWnonDr_medic0";
    };
};

So I'm trying to loop a CPR animation which happens to work completely fine with a smooth transition in the animation viewer through the debug console. I looked into fn_animViewer.sqf, and I've copied how they loop animations but for some reason it is working nothing like it does in the animation viewer. Any ideas?

still forum
#

that while true loop get some sleep

#

because it loops endlessly till the 3ms limit (or 10k maybe)

#

what does "working nothing like it does" mean?

warm gorge
#

Yeah this was just for testing it won't actually be an endless loop like that. And when I say it works nothing like it does in the animation viewer. In the animation viewer, the unit stays crouched the whole time performing the CPR animation and looping it over and over. But when I run this script, it plays the animation, then the player ends up standing up before the animation plays again a few seconds later.

still forum
#

lower animDuration a little

#

Might glitch a bit though...

warm gorge
#

Made no difference unfortunately. Could it have anything to do with the fact that I'm using playMoveNow, rather than switchMove like the animation viewer? It's just when I use switchMove, it is even more buggier and doesn't even play the animation properly.

still forum
#

I don't do animation stuff. Don't know.
But it should definetly make a difference if you restart the animation sooner. Maybe your loop always is too late because of scheduled. You could use AnimChanged EH instead to wait for when the unit tries to get into a different atnimation.
Can anyone send me the content of BIS_fnc_listCuratorPlayers?

warm gorge
#

And i'll give that EH a try

still forum
#

OMFG.. And i was using that crap in TFAR. Thanks alot.
Rewrite for that horrible abomination of a function from @south rivet
(allCurators apply {getAssignedCuratorUnit _x} select {!isNull _x})
In case anyone else needs that.

warm gorge
#

There's a lot of BIS functions that could do with a rewrite lol

south rivet
#

thumbsupparrot It doesn't consider duplicates in allCurators though. But I don't see how that could ever happen.

still forum
#

I'm running allPlayers select {isPlayer _x} does anyone know if that makes sense? There is probably some weird Arma quirk in there that needs that?

warm gorge
#

lol

south rivet
#

allPlayers returns headless clients as well, not sure if isPlayer would filter those

#

Apparently, isPlayer also gives true for headless clients

#

So I guess that code doesn't make much sense

silk sparrow
#

Did someone know a script to have more control on a map marker? (Like change the heading of the marker)

#

Ace do that, but i'm searching for a serveur side script

meager heart
#

Did someone know a script to have more control on a map marker? (Like change the heading of the marker)

_marker setMarkerDir 120;
silk sparrow
#

❤ I'll try that

#

Thanks!

meager heart
#

😃

cosmic lichen
#

Has anyone got an idea how I could create a preview of a briefing text (Custom UI) on the fly? For example a text like this ? The new MBT Kuma is equipped with an <font color='#A52A2A'>Active Protection System</font color>, short APS. It's able to detect and successfully destroy incoming missiles. However it cannot destroy all incoming projectiles and it has it's ammunition limited to <font color='#A52A2A'>10 shots</font color> per side. The system needs <font color='#A52A2A'>1.2 seconds to reload</font color> after every successfull defence.

quasi rover
#

How to change callsign?
[West,"HQ"] sideChat "Hello World!"; Chat is displayed as CROSSROAD "Hello World!"
I want to change callsign CROSSROAD into HQ: HQ "Hello World!"

still forum
#

identity: String - class name of one of the identities in CfgHQIdentities. Possible identities in Arma 3 are:
Short answer: can't. HQ == CROSSROAD.

#

Long answer: Make a mod.

quasi rover
#

Thx Dedmen.

winter rose
#

@quasi rover maaaybe by replacing Crossroads stringtable entry in your mission's stringtable, but not sure if it still works

#

I wanted 'PAPA BEAR', but couldn't… I created a logic and gave an identity with the name 😃

still forum
#

^ other long answer alternative

winter rose
#

Hey, it's less than 1000 chars

meager heart
#

i have in one mission this >

private _moduleHQ = createGroup west createUnit ["ModuleHQ_F", _position, [], 10, "CAN_COLLIDE"];
missionNamespace setVariable ["BIS_HQ_WEST", _moduleHQ call bis_fnc_modulehq];
#

HQ ^

#

oh also...

#

to make it custom

#

_moduleHQ setvariable ["callsignCustom","customNameHere"]; < afaik this way, for that way ^ 😃

ember oak
#

There is no thing to block getout from vehicle with handlers? Because i tried with GetOut, GetOutMan and Action with inGameUISetEventHandler, but nobody works...

still forum
#

blocking the action should definetly work

ember oak
#
    true;
};``` i tried this
#

@still forum What you mean?

still forum
#

🤔

#

ah!

#

might be that exitWith in EH's doesn't work

#

any other code in there?

#

you could just
seatbelt && _this select 3 isEqualTo "GetOut" without the if

gleaming oyster
#

well why should they work? Wouldn't it cause unforeseen consequences if it did? Just exit like that without terminating the EH?

still forum
#

huh?

#

Don't understand what you are trying to say

gleaming oyster
#

exitwith + eh = shouldn't work correct?
if the code inside exits would the eh exit as well or would it remain a shell?

still forum
#

Don't exactly know why it doesn't work

#

Commy said eventhandlers don't work with exitWith ^^
He wrapped them in a call {} to work around that. I didn't investigate why it happens yet

gleaming oyster
#

what if the return was true inside the exitWith? Wouldn't it do the same exact thing since if you have a true return inside exitWith it creates a new scope?

still forum
#

as I said. I don't know

#

something is breaking it if you try to return with exitWith

#

no cross-posting.

compact maple
#

Ok tnx

austere hawk
ember oak
#

I tried, it brokes with exitWith, but works with then. Thank you @still forum

gleaming oyster
#

@austere hawk Nice job so far, thanks for the share.