#arma3_scripting

1 messages Β· Page 748 of 1

little raptor
#

once the condition is met, you can start filling the heli by the number of free cargo seats:

_freeSeats = {!alive(_x#0)} count fullCrew [_heli, "cargo", true];
#

you can also add another check, e.g. to make sure the heli has landed in a specific area, you can use inArea

#

you can then add another check for the extraction area, and disembark those civvies

crisp jacinth
#

Okay dokey, I give it a shot and hope I dont break it haha

#

thank you very much though

thin gate
#

Anyone know how to make a vehicle a simple object cause it resets everytime I restart the mission

winter rose
thin gate
#

But after testing it then going back to eden it resets it

winter rose
#

try without mods, to see?

untold copper
#

Not all objects can be simple.

thin gate
#

Well the thing is it's a milsim op I'm making and we are using VME PLA mod and the boats just cause frame rate issues

#

It also happens with vanilla vehicles

untold copper
#

Not all objects are simple.
How are you making them simple?
3DEN Scripts?

thin gate
#

No I'm using the item attributes to change it

plush belfry
#

iirc you can only disable the simulation of vehicles but I might be wrong

untold copper
#

CUP Vehicles?

thin gate
untold copper
#

Arghahahaha!

thin gate
#

Modern day Chinese military

untold copper
#

You're on your own.
I haven't used this mod.
Good luck.

thin gate
#

If not I'll just figure out a place holder for the port

dapper cairn
#

is there a way to paste in a toxic zone using zues? I have the script for a toxic zone from the workshop but I need something I can place on the fly. Like a 20mx20m cone with the toxic zone script and possibly a yellow smoke attached to it permanently

#

Also the script is too large to paste soo not sure if there is a site i can use to share it

untold copper
#

Which mod is it?
Depends on the mod.
Is it setup for Zeus?
EDIT: Are there Zeus Modules?

untold copper
dapper cairn
#

okay just making sure

untold copper
#

Woah. You can have scripts in Workshop compositions now?
I don't want to download the composition, but you should be able to use the script ( if any ) from it.

untold copper
# dapper cairn if youre talking to me

Ok. Curiosity got to me and I checked out the composition with scripts in triggers.

First scan, it's only for single player.
And it looks like it'll be heavy on performance.

Not tested.

untold copper
versed leaf
#

Does anyone know how to boot with weapons in Altis Life? I place them, I determine their function but when I enter the game they appear without the weapons. πŸ˜’

versed leaf
#

Hooo, ok, sorry

winter rose
# versed leaf Hooo, ok, sorry

I mean, it would be better to get help around e.g their discord server, as this is a framework that is specific to them πŸ™‚

versed leaf
#

thanks dude

#

and so sorry!"

winter rose
#

thou shalt be spanked!!

proven charm
#

how to get rid of the screen that comes when there is no player object in singleplayer? I want to end the mission but that screen prevents it

#

getting splendid camera / No GPS screen...

#

I have to press ESC to get rid of it but would like to do that via script

proven charm
little raptor
#

nvm

#

I thought you meant it can't be closed via Esc

proven charm
#

oh

little raptor
proven charm
#

ok will try

#

umm how do I get the camera for camDestroy ?

little raptor
#

["Exit"] call BIS_fnc_camera;

#

will exit splendid cam

proven charm
#

It doesn't seem to do anything

proven charm
#

Well I solved the problem by creating the player via script if the player is null πŸ™‚

warped marten
#

Is there a way to force a particle effect to always spawn in a given orientation?
I tried setParticleRandom to set it all to zero, I have randomDirectionPeriod and randomDirectionIntensity on 0, rotationVelocity also 0. But the particles still spawn with different orientations.

I basically want a circle emanating from a unit, growing, as a particle effect - \A3\data_f\Training_Ring_30 seems perfect in that regard, but only if I can fix its orientation

warm hedge
#

Show the code please

noble zealot
#

Is the function that allows you to change the size of the vehicle inventory ready?

warm hedge
noble zealot
#

Thanks

opal sand
hushed tendon
#

Well you have to add the action to the targeted object > attach the object to the player / make player do anim > add action to stop carrying > un-attach the object and remove the anim. That’s what I would do off the top of my head

sharp grotto
#

Only works for alive players in Mp tho, cant drag corpses of dead players.

sacred slate
#

when switching units and become squad leader, the vehicle seat switch menu disappears. it reappears if i get out and back into the vehicle. is this fixable by code?

acoustic abyss
# opal sand im trying to make a carry/drag script, where do i start lol been looking for a s...

It awesome you are making this a script (for people who don't want the hassle of loading ACE3), but-
Coding this reliably requires some fiddling with animations and multiplayer scripting. Other people have done it before. Here's some inspiration from a popular persistent scenario still running on servers right now:
https://github.com/auQuiksilver/Apex-Framework/blob/master/Apex_framework.terrain/code/functions/fn_clientInteractCarry.sqf

sacred slate
hidden depot
#

I need help, I'd like to make a mod but not sure how to start. I have an idea for a stacking up mod, where players can "link" to the man in front of them in a stack. The idea would be that the point man would move the linked players as he moved. Any linked players would be basically locked into 1st person and as if they were in a vehicle, able to aim around but not control their movements until they break away. This seems possible in my mind but not sure where to begin. Anyone bored wanna collaborate ?

austere nymph
#

Evening gents - did the ACE slideshow module got an update recently ? I'm having issues getting the controller to work and manually select the next slide. I simply don't have any interaction on the object. Automated rotation of the slides works fine but manual switch just doesn't exist anymore. Any idea why ?

warm coral
#

can anyone help me figure this out?

{ 
    this addEventHandler ["Fired", { 
        params ["", "", "", "", "", "", "_projectile"]; 
      ; 
        _dir = random 360; 
        _range = random 1000;
bomb="Bo_GBU12_LGB" createVehicle [(getPos hpad2) + (sin _dir) * _range, (hpad2 select 1) + (cos _dir) * _range, 0];
    }]; 
}; ```

completly breaks my script HOWEVER if i do

```if (isServer) then  
{  
    this addEventHandler ["Fired", {  
        params ["", "", "", "", "", "", "_projectile"];  
      ;  
        _centerpos = (getmarkerpos "hpad1"); 
        _dir = random 360;  
        _range = random 1000; 
bomb="Bo_GBU12_LGB" createVehicle [(_centerPos select 0) + (sin _dir) * _range, (_centerPos select 1) + (cos _dir) * _range, 0]; 
    }];  
};```

it works just perfectly fine main diffrence between these two is that the first one is a object and the second one is a marker
#

and im honestly just confused

winter rose
copper raven
winter rose
#

plus hpad select 1

#

basically, use the debug console and try πŸ˜„

copper raven
#

just do hpad2 getPos [random 1000, random 360] instead of all that extra stuff

warm coral
copper raven
#

yes

warm coral
#

fml

winter rose
#

Experience is a hard teacher because she gives the test first, the lesson afterwards.
πŸ™‚

warped marten
# warm hedge Show the code please

Sorry for the late reply.
My test-bed code is:

private _pos = getPosATL _this; 
_pos = _pos vectorAdd [0, 0, 2.7];  
_pos = _pos vectorAdd ((eyeDirection _this) vectorMultiply 0.1); 
private _object_orb = "Sign_Sphere10cm_F" createVehiclelocal _pos;  
_object_orb setObjectMaterialGlobal [0, "\a3\data_f\default.rvmat"];   
_object_orb setObjectTextureGlobal [0, "#(argb,8,8,3)color(1,1,1,0.5,ca)"];  
_object_orb setPosATL _pos; 

private _eye = eyeDirection _this;
private _dir = vectorDir _this;
private _rel = [0,0,0];
_rel = _rel vectorAdd (_dir vectorMultiply -0.1); 
_rel = _rel vectorAdd ([0,0,1] vectorMultiply 1.1); 
_object_orb attachTo [_this, _rel, "head"]; 
 
_ele = "#particlesource" createVehicleLocal (getPosATL _object_orb);  
_ele setParticleCircle [0, [0, 0, 0]];  
_ele setParticleRandom [0, [0, 0, 0], [0, 0, 0], 0, 0, [0, 0, 0, 0], 0, 0]; 
comment "                                                                 lifeTime, position   moveVelo rotVel weight volume rubbing size             color                                                           animSpeed rndPir,rndInt";
_ele setParticleParams [["\A3\data_f\Training_Ring_30", 1, 0, 1], "", "SpaceObject", 1, 0.15, [0, 0, 0], [0, 0, 0], 0.0, 0.0, 1.0, 0.075, [0.003, 0.03, 0.05], [[0.1, 0.1, 0.1, 0.5], [0.25, 0.25, 0.25, 0.5], [0.5, 0.5, 0.5, 0]], [0.0], 0, 0, "", "", _object_orb];  
_ele setDropInterval 0.1;
_ele setParticleRandom [0, [0, 0, 0], [0, 0, 0], 0, 0, [0, 0, 0, 0], 0, 0, 0, 0];
_ele attachTo [_this, _rel, "head"];
hideObject _object_orb;

This generates a sphere (not relevant here, but used as the reference object), with the rings in its place.
I would love to have the rings only spawn with the axis through their centers being the Z axis.

winter rose
wicked roostBOT
#
How to use SQF syntax highlighting in Discord

```sqf
// your code here
hint "good!";
```
↓

// your code here
hint "good!";
warped marten
winter rose
warped marten
winter rose
#

ah well, I call Armagic on that one πŸ˜„

winter rose
warped marten
little raptor
winter rose
#

that's for particles though

little raptor
#

I didn't even read the discussion πŸ˜…

#

I thought it was about setVectorDir meowsweats

unreal scroll
#
  1. Is there a way to modify parameters of units icons, showed at the screen bottom - like alpha/background, with scripts?
  2. I try to change hc group parameters with
_grp setGroupIconParams [[0.9,0,0, 1], "No contact", 1, true];

It turns red for a second, and then returns to green (basic). Why it resets?

winter rose
#
this addEventHandler ["ContainerOpened", {
    params ["_container"];
    if (random 100 < 5 && !(_container getVariable ["ROM_searched", false]) then
    {
        // spawn grenade
        getPosATL _container createVehicle "GrenadeHand";
    };
    _container setVariable ["ROM_searched", true, true]; // tells all machines
    _container removeEventHandler _thisEventHandler;
}];
```MP-compatible @foggy lodge
#

if you want it on all your enemies:

{
  _x addEventHandler ["ContainerOpened", {
      params ["_container"];
      if (random 100 < 5 && !(_container getVariable ["ROM_searched", false]) then
      {
          // spawn grenade
          getPosATL _container createVehicle "GrenadeHand";
      };
      _container setVariable ["ROM_searched", true, true]; // tells all machines
      _container removeEventHandler _thisEventHandler;
  }];
} forEach units opfor; // if your enemy is opfor
winter rose
foggy lodge
#

Okay, so do I have to name anything in the mission _container or _x?

winter rose
#

nothing at all

foggy lodge
#

Oh thank you!

winter rose
#

these are local variables, for the current code only

foggy lodge
#

That's amazing. Will this tear into performance in any way?

winter rose
#

nope, at all

foggy lodge
#

perfect!

winter rose
#

it could be perfected about MP messages, but it should work well nonetheless

#
{
  _x addEventHandler ["ContainerOpened", {
    params ["_container"];
    private _hasBeenSearched = _container getVariable ["ROM_searched", false];
    if (!_hasBeenSearched && random 100 < 5) then
    {
      getPosATL _container createVehicle "GrenadeHand";
    };
    if (!_hasBeenSearched) then
    {
      _container setVariable ["ROM_searched", true, true];
    };
    _container removeEventHandler _thisEventHandler;
  }];
} forEach units opfor;
```that's the ideal code I believe
foggy lodge
#

I will use that then, I don't speak computer so I trust your judgement

oblique arrow
#

Might be good to have a hint or something like that, that a grenade was dropped?

#

Thinking from a player perspective i'd be quite confused if I looted a guy and just sorta exploded

foggy lodge
#

my unit will figure it out. I'm probably replacing it with a minigrenade, but they like to learn things the hard way and that will give it some mystery.
I like when players come to their own conclusions

oblique arrow
#

or play a sound

winter rose
quasi sedge
#
private _classes = "getNumber (_x >> 'scope') == 2 && {configName _x isKindOf 'Tank'}"
configClasses (configFile >> "CfgVehicles");
private _names = _classes apply { configName _x };
_names;```
This script parse tanks from current user modset
#

how to parse uniforms?

#
private _classes = "getNumber (_x >> 'scope') == 2"
configClasses (configFile >> "CfgWeapons");
private _names = _classes apply { configName _x };
_names;
sacred slate
#

how do i spawn a couple of vehicles randomized? i have used some safe spot combinations, and also forbid dmg. in a lot spawns, some of them blow up anyways. :>

quasi sedge
#
private _classes = "getNumber (_x >> 'scope') == 2"
configClasses (configFile >> "CfgWeapons"); 
private _names = _classes apply { configName _x ; 
_names;```
How to particulary extract only Vest's from CFG Weapons?
real tartan
# quasi sedge how to parse uniforms?
private _uniforms = "( ( configName _x ) isKindOf ['Uniform_Base', configFile >> 'CfgWeapons'] )" configClasses (configFile >> "CfgWeapons") apply { configName _x };
real tartan
#

try Vest_base

quasi sedge
#

nothing, doesn't working

copper raven
pearl night
#

Hi, I'm making a mission in which all players should start thirsty and hungry (ACE Field rations framework) i think I should use this, but I'm not sure how:

3.3 Adding a status modifier
ace_field_rations_fnc_addStatusModifier

  • Adds a status modifier. Should be called on all machines.
  • Code must return a NUMBER which will be applied additively with other status changes.
  • Arguments:
  • 0: Status to modify (0 - Thirst, 1 - Hunger, 2 - Both) <NUMBER>
  • 1: Code (is passed the unit <OBJECT>) <CODE>
  • Return Value:
  • None
  • Example:
  • [0, {random 1}] call ace_field_rations_fnc_addStatusModifier
winter rose
#

[2, {0}] call stuff?

cosmic lichen
#

2nd one needs to be code

winter rose
cosmic lichen
#

cheater

#

This is my trick

winter rose
#

like you never pulled that one on me 😁

pearl night
#

found it, its
player setVariable ["acex_field_rations_hunger", 80];
player setVariable ["acex_field_rations_thirst", 80];

sacred slate
#

how do i do: _pos2 = getpos _pos1 + 1 meter to the right of it;

winter rose
sacred slate
cosmic lichen
#

getPos is banned here you must know πŸ˜„

winter rose
sacred slate
#

thx!

winter rose
#

but given you are using a marker position, it seems…weird
also that you want to spawn a Merkava on top of a repair truck, too πŸ˜„

sacred slate
#

on top?

#

it should be one meter right of it :>

#

right now i watch the vehicles explode until somthing works.

winter rose
#

oh poop, I made it 1m on top of it πŸ˜„

#
vectorAdd [0, 1, 0];
```but "just" 1m may not be enough
sacred slate
#

yes, works now. thx πŸ˜„

peak skiff
#

Hey all! I want to add an action that will execute a script from a mod made by the Project Hatchet team for their H-60. Essentially, the idea is to addAction and then call upon their send message script to send the message. Then, it will give a hint to the player letting them know it has been sent. I am lost so far 😦

this addAction ["Request Reinsert", { call VTX_fnc_attemptSendMessage ["Reinsert Requested", "USR SYSTEM", ALL, 0, "Reinsert has been requested, please RTB for pickup." ] } ];

I would still need to add the hint part in there, but I want to get this working first, and its telling me there should be semi-colons and brackets everywhere. Any help is appreciated!

#

P.S., im new to any sort of scripting or coding in general, and I do realize that I might need to format it correctly as far as breaks and brackets, but i have no clue on how.

winter rose
wicked roostBOT
#
How to use SQF syntax highlighting in Discord

```sqf
// your code here
hint "good!";
```
↓

// your code here
hint "good!";
winter rose
#
this addAction ["Request Reinsert", {
  call VTX_fnc_attemptSendMessage ["Reinsert Requested", "USR SYSTEM", ALL, 0, "Reinsert has been requested, please RTB for pickup."];
}];
```so
this is wrong because you do `call <function> <arguments>`
where it is `<arguments> call <function>`

also, what is `ALL`? if it is supposed to be a string, use `"ALL"` πŸ™‚
kindred zephyr
#

Hello a3 hive mind.

A quick doubt:

levelAI = "AILevelHigh";

would affect the custom skill setting for each unit in the mission while on a server?

winter rose
#

Hello a3 hive mind.
make us whole again

peak skiff
#

Because at the moment, I've swapped them and its telling me

VTX_fnc_attemptSendMessage

Is an undefined variable. Do i need to provide a file path? I've tried adding .sqf and it gives me the same error.

copper raven
#

did you configure cfg functions properly?

peak skiff
#

I haven't configured anything, so that leads me to say no. I just have to add a new Cfg Functions and define its class?

#

I'll follow the wiki for that, but that would make sense πŸ˜‚

verbal whale
#

guys quick question , why setdir function move object slightly , i am trying to setdir for static gun and its moving while dir changing

kindred zephyr
verbal whale
#

yes is there solution for that ?

tough abyss
#

how can I set everything on blufor as captive at mission start (I have a solution for JIPs, so dont worry about that in your answer)

fair drum
tough abyss
fair drum
#

or just use initServer.sqf

tough abyss
#

Great. Can I use it the same way in a trigger?

#

Or do I need to add a remoteExec in trigger?

fair drum
#

same way. you know how to check locality for commands right?

tough abyss
#

yeah some stuff I read said I needed remoteExec though so I got confused

fair drum
#

if you check the wiki page for a command, at the top of it there will either... LE, GE, LA, GA

#

for:
local execution
global execution
local argument
global argument

#

so tell me, what does setCaptive say?

tough abyss
#

LA GE

fair drum
#

so that means?

tough abyss
#

local argument global execution

fair drum
#

so it means that the argument, the unit, needs to be local to that machine, and the command itself, effects everyone in the game

#

and AI when not using a headless client is typically local to the server

tough abyss
#

isnt zeus spawned ai local to the zeus

fair drum
#

you're not doing that. you are using an init

tough abyss
#

I'm aware. I'm talking about generally.

graceful kelp
#

maybe

bitter jewel
#

setFriend needs server exec

#

i am attempting to do it thusly:

[west, Independent, 0] remoteExec ["SetFriend", 2];
[Independent, West, 0] remoteExec ["SetFriend", 2];
#

it does not work

#

ah ofcourse, SetFriend is a binary operator, so i needed to give it two operands

#

which happened like so:

[west, [Independent, 0]] remoteExec ["SetFriend", 2];
#

thank you all

winter rose
maiden garnet
#

hello everyone, is there a way to change a customChatcolor? its only popping up in purple for me but ive seen pictures of it in red

fair drum
maiden garnet
#

ive found what im looking for: its defined within radioChannelCreate

fair drum
#

correct

maiden garnet
bronze temple
#

Does anyone have documentation on how to get custom inventories to work

#

Currently arma 3 just ignores it

#

Made a custom mod to rewrite it and instead of moving things around it just makes the inventory darker for some reason

sudden yacht
#

How can i get all groups in cargo of a vehicle? I want to have it so they briefly leave the vehicle until the vehicle turns of its engine. ```
this addEventHandler ["TurnIn", {
params ["_vehicle", "_unit", "_turret"];

thegroup leaveVehicle _vehicle; 

}];

this addEventHandler ["Engine", {
params ["_vehicle", "_engineState"];

thegroup addVehicle _vehicle;

}];

little raptor
sudden yacht
#

@little raptor Thanks i will give it a try.

little raptor
#

should've been group (_x#0) not group _x

sudden yacht
#

@little raptor i must be doing something wrong. No luck on my end.

sudden yacht
#
this addEventHandler ["Engine", {
    params ["_vehicle", "_engineState"];
    private _allGroups = fullCrew [_vehicle, ""] apply {group (_x#0)};
    _allGroups = (_allGroups arrayIntersect _allGroups) - [grpNull];
    _allGroups leaveVehicle _vehicle; 

}];```
sudden yacht
#

um forgive me im dumb. I dont see it.

little raptor
sudden yacht
#

So um how would i go about that.

little raptor
#

loop

#

forEach

round scroll
#

background is the placement of anchors to put a rope in between

sudden yacht
#

@little raptor I think i got it.

round scroll
#

or maybe I just use getPos and sum the array elements for a somewhat unique number, If those would be equal the system cannot work anyway?

#

ah, no summing is not good, compare element by element must be done

little raptor
round scroll
little raptor
round scroll
little raptor
round scroll
#

how does the non master know about the master?

little raptor
#

they're synced aren't they? when one is the master the other one isn't

#

once you've picked the master you can use setVariable on both objects to let each one know who's the master

little raptor
round scroll
#

something like that should work then? ```sqf
private _syncedAnchor = _syncedAnchors # 0;
// arbitrarily select one based on greater comparison
if (_syncedAnchor getVariable ["ttt_wires_isMaster", false]) exitWith {
systemChat "The other anchor is master";
};
_anchor setVariable ["ttt_wires_isMaster", true];
systemChat "Setting up rope";

little raptor
round scroll
#

bummer, seems my understanding of 'synchronizing to' is off - I cannot sync two objects of the same class it seems

#

BIS_fnc_allSynchronizedObjects just returns the object itself, not the synced to 😦

little raptor
round scroll
#

Yeah, looks like it. I used it in the past with modules though, maybe that's a work around

little raptor
#

perhaps using modules would be better

coarse dragon
#

Anyone know a good video guide on how to set up the Sfq files ect

jade acorn
#

how can I force player to look/turn at certain direction? lookAt works only with AI.

little raptor
jade acorn
#

would making a custom animation solve that or will the player's head still look at the previous position?

little raptor
turbid crag
#
remoteControlArgs = [_oldPlayer, _isDamageAllowed];

// Wait until pause menu is shown, then do stuff
[missionNamespace, "OnGameInterrupt", {
    params ["_args"];
    _args params ["_interruptDisplay"];
    
    [_interruptDisplay, _thisScriptedEventHandler] spawn {
        params ["_interruptDisplay", "_EHID"];
        
        waitUntil {!isNull _interruptDisplay};
            
        [missionNamespace, "OnGameInterrupt", _EHID] call BIS_fnc_removeScriptedEventHandler;
        
        remoteControlArgs params ["_oldPlayer", "_isDamageAllowed"];
        // Do stuff with args
    };
}] call BIS_fnc_addScriptedEventHandler;

Sorry to ping you @little raptor

What I want to do is to pass the contents of remoteControlArgs within the EH.
Since I don't use BIS_fnc_callScriptedEventHandler, I can't pass them through that. From what I can tell you can't pass arguments through BIS_fnc_addScriptedEventHandler - or can you?

little raptor
wind ingot
#

Is there a quick way to convert int to bool? Like a str but for bool

#

Or do I need a ifjust for that

warm hedge
#

str do that

#

Ah sorry, int to bool

#

parseNumber

little raptor
#

that's bool to int meowsweats

#

(also there's no int in sqf...)

warm hedge
#

My brain moment

wind ingot
#

I meant "Number"

little raptor
#
_num == 0 //or !=
wind ingot
#

lmao yeah

#

πŸ€¦β€β™‚οΈ

#

Clearly simpler than if(_value==1)then{true}else{false}

little raptor
warm hedge
#

More like that's overcomplicated

wind ingot
#

I needed parseNumber anyway for the other way around. So thanks both πŸ‘

last rain
#

it is can work together?

enableDebugConsole = 1;
enableDebugConsole[] = {"765611980********", "765611980********", "765611980********"};
acoustic abyss
coarse dragon
#

Is there no script that forces the AI to just drop it's bombs untill its empty?

#

this forceWeaponFire["sab_fl_bomb_48rnd_ptab_mag", "LoalAltitude"]; im trying to get a modded plane drop its bombs but im a total newbi with the weapons config

acoustic abyss
gloomy dome
#

Trying to make a capture point out of a Trigger Area using a custom condition:

count (allPlayers inAreaArray thisTrigger) > count ((east countSide inAreaArray thisTrigger) select { lifeState _x == "HEALTHY"; } )

Activates when allPlayers is greater than "healthy" OPFOR AI.

However I'm getting a syntax error when placing this in the condition box of the trigger.

#

What am I doing wrong here? Can someone point me in the right direction?

little raptor
#

inAreaArray needs an array of objects to its left

#

yet you're providing none

#

the correct way is:

units east inAreaArray thisTrigger
gloomy dome
#

I'll give this one a try and report back. Thanks for now

gloomy dome
compact maple
hollow thistle
#

No.

tidal ferry
#

Hey, not sure if this is the right channel or not, but

#

Does anyone have a ballpark guess on how soon 2.10 is coming?

#

But we need to wait for it to be actually out before we finalize πŸ˜…

#

I know it'll likely be a while but I figured I'd ask

acoustic abyss
#

I'm using inGameUISetEventHandler to add an extra event when a player uses a standard action. I've noticed it only executes when it returns TRUE. Right now the code is structured as:

  " if  ( ... ) then {hint 'You are not allowed to do this'; true}
  "];```

And it works, probably because *hint* returns nothing. However, almost every other command returns something, which disables the entire Event Handler. Is there a way of controlling the return value of a command (such as a script handle for *execVM*) or otherwise running code within the *inGameUISetEventHandler* ?
hollow thistle
#

can't you just always return true at the end?

#

As you're doing now? meowhuh

acoustic abyss
#

I definitely thought so. Nosiree; the RPT gives Error position: <inGameUISetEventHandler ["action", ... Error ingameuiseteventhandler: Type String, expected Array
When you use commands like execVM, createVehicle et cetera. Which is odd, because the syntax of inGameUISetEventHandler requires wrapping code in quotes. Again, only having TRUE in the brackets, or using hint commands before the TRUE statement, works.

little raptor
#

I'd say 6

acoustic abyss
#

In order to run code and get it to return TRUE, I've tried something exotic from BIKI:
...then {_handle = 0 spawn {}; scriptDone _handle; true}
But this just an "Error Invalid number in expression" error. Perhaps because the syntax trick dates from Arma 2.

acoustic abyss
little raptor
#

My wat is more like who the hell writes something like that?

acoustic abyss
little raptor
#

Stop spamming

acoustic abyss
#

Well, I wrote it and linked it above. I'm trying to get code to run within inGameUISetEventHandler

sharp grotto
#

He already told you to stop spamming and now you spam again and even tag him.
That's how you won't get any help....

little raptor
little raptor
tough abyss
#

Pls hep me

hollow thistle
tough abyss
#

I wanna ask is someone else having an issue with achillite beta?

little raptor
acoustic abyss
acoustic abyss
little raptor
#

No

little raptor
acoustic abyss
#

No. In fact I copy+pasted the syntax into toString {}

little raptor
#

well the toString code is already preprocessed

#

The string isn't

#

You probably had a bad string, for whatever reason

acoustic abyss
#

OK. I will read up on preprocessor. Thanks for the feedback.

hollow thistle
#

Great to see the little trick I've shared being used and useful already blobhappygoogly

tough abyss
#

Hello

obtuse blaze
#

anyone know of any eventhandler that would be triggered when a vehicle reloads from a crate or ammo truck?

hollow thistle
#

no such thing, you can only catch normal weapon reloads.

quasi sedge
#

How to parse every backpack from modset?

"getNumber (_x >> 'scope') == 2 && {getNumber (_x >> 'itemInfo' >> 'type') == 701}" configClasses (configFile >> "cfgWeapons") 
#

== 901 gives nothing

copper raven
#

backpacks are in cfgVehicles

#

and you want to look for isBackpack iirc, number 1 or 0

steep wave
#

I want to make a hold action that once the player completes it a respawn point is enabled
Is there (preferably easy way) to set the condition of the Respawn to true instead of false or some other way to enable it?

acoustic abyss
#

Thank you for the straightforward (non-developer bashing) question :)! Do you want the AI to switch to combat mode at all? In that case you could set the group on "Careless".

hollow thistle
#

It's safe mode, you can't set careless via Zeus unless you use mod, like ZEN

#

And safe auto switches to combat when enemies are known.

tired delta
#

so i got a problem with my remoteExec funtion. Somehow my object (house) is not passed trough. what could be the cause for this?

willow hound
viral basin
#

Hey there, does any1 know how to convert a [vectorDir, vectorUp] array to the 3DEN "rotation" attribute format? Or is there any BIS_FNC that does it?

still forum
tired delta
#

i get the house through CoursorObject and pass it through the remoteExec to the server but the server receives only an ObjectNull

#

why is that so

#

the other tow strings i pass with it get recived adn work just fine

#

im am so confused

cunning oriole
#
publicVariable "_x";

can i do that in a for each?

#
publicVariable format ["%1", _x];
``` IG that could work if the former doesnt

STR could also work i reckon
distant oyster
#

you can't publicvariable a local variable

cunning oriole
#

yh but say it was part of a forEach on a series of global vars?

#

would that still not work?

distant oyster
#

no, with

publicVariable "_x";
``` you are telling arma to broadcast _x
#

the second option would also not work reliably, eg with objects

{
  publicVariable format ["%1", _x];
} forEach [player];
``` would broadcast something like `B Alpha:1 (Terra)`
cunning oriole
#

ok cheers

flint topaz
#

Hi. Is there something I'm missing to make an object smaller for all players on a server.

#

I am currently doing within the objects Init:```sqf
this setObjectScale 1.7;

#

but when on a dedicated server the players see it at the normal 1.0 scale

willow hound
compact maple
#

(unsure)

outer plover
#

There is a script command called "triggerAmmo" that supposedly triggers munition as if it did hit something... I tried on G_20mm_he, and it doesn't make the grenade explode. It does work with the MAAWS ammunition, though... So, is this limited to certain ammo simulations, like shotRocket ?

open fractal
#

my workaround has been to script the object to be replaced by a simple object with the same model

#

if the object isn't centered on the model you'll have to do some adjustments to make it fit the same space

peak pond
#

Is there a way to add an AI unit spawned via createUnit to the list of units a Spectator slot can spectate?

night sundial
#

is there a way to detonate a grenade with scripts, triggerAmmo doesnt seem to work

oblique summit
#

Hi guys, could you guys tell me how I could export data from sqf to Json?

warm hedge
#

Like what? You excute an sqf, will get a json?

oblique summit
warm hedge
#
  1. A3 has no native json support
  2. You can use copyToClipboard to copy formatted text but it is restricted on clients in MP
little raptor
little raptor
#

it's only intended for simple and attached objects
and it should only be executed where the object is local

oblique summit
#

u.u that sad

warm hedge
#

Arma has no "write it to a file" command

#

Expect diag_log

oblique summit
#

πŸ˜”

dusk gust
#

Technically could use a logging extension like A3Log, then just log the JSON to the file you pre-define, but that does require extra extensions

little raptor
#

you might as well just write your own extension for reading/writing to file

oblique summit
dusk gust
little raptor
#

there are existing extensions that can do that

oblique summit
oblique summit
oblique summit
open fractal
#

may I have some assistance

#
null = [] spawn {

soviet1 doWatch getpos doorwatch2;
soviet1 doTarget doorwatch2;
sleep 3;
for "_i" from 0 to 3 do { 
 soviet1 forceWeaponFire [currentMuzzle soviet1, "Single"]; 
sleep 0.2;
};
};
#

when the trigger is activated the unit shoots toward game logic entity doorwatch2

#

but it's seemingly random whether he actually turns and targets it before shooting

#

I guess I should ask a question

#

How do I get the unit to consistently shoot at the target?

quasi sedge
# quasi sedge How to parse every backpack from modset? ```sqf "getNumber (_x >> 'scope') == 2 ...

http://forum.aimgame.ru/index.php?/topic/316-skript-arma3-poluchenie-spiska-klassov-vsei-tekhniki/
Found good article how to parse classnames of current mod set(dont foget to change Β» to >>)

Parse weapons (Other item types https://community.bistudio.com/wiki/BIS_fnc_itemType
Select 0 = category:Weapon, use
Select 1 for subtypes:Rifle" ")

_configs = "getNumber (_x >> 'scope') >= 2 AND getText ( _x >> 'simulation' ) isEqualTo 'Weapon'" configClasses (configFile >> "CfgWeapons");  
_classNames = _configs apply {configName _x};  
_names = [];  
{  
_isUni = (_x call BIS_fnc_itemType) select 0;  
if (_isUni == "Weapon") then  
{  
_names pushBack _x;  
};   
} forEach _classNames;  
  
copyToClipBoard str _names;  
hint str _names;_names```
little raptor
#

other weapon types are 2 for pistol and 4 for launchers

#

if you wanted all weapons: getNumber (_x >> "type") in [1,2,4]

maiden garnet
#

hello everyone, trying to get a way for radiochannelcreate to work in multiplayer but im super stumped

maiden garnet
# little raptor what do you try?

if (isServer) then { customRadioChannel = radioChannelCreate [[1.0, 0.1, 0.1, 0.7], "Ground Forces", "%UNIT_NAME", []]; customRadioChannel enableChannel false; };

#

ive tried that

#

and this

#

if (isServer) then { private _channelName = "Ground Forces"; private _channelID = radioChannelCreate [[1.0, 0.1, 0.1, 0.7], _channelName, "%UNIT_NAME", []]; if (_channelID == 0) exitWith {diag_log format ["Custom channel '%1' creation failed!", _channelName]}; [_channelID, {_this radioChannelAdd [player]}] remoteExec ["call", [0, -2] select isDedicated, _channelName]; };

#

from what i can tell its just not creating the channel

little raptor
#

where do you execute it?

maiden garnet
#

in-mission via zeus module - ive ofound it works in singleplayer but not in mp

#

im using the global setting for said module

little raptor
# maiden garnet in-mission via zeus module - ive ofound it works in singleplayer but not in mp

well first of all, the command should be executed on the server itself
you should either make it into a function and remoteExec the function (the preferred option), or remoteExec the code if you can't or don't want to create the function for some reason:

[{
    private _channelName = "Ground Forces";
    private _channelID = radioChannelCreate [[1.0, 0.1, 0.1, 0.7], _channelName, "%UNIT_NAME", []];
    if (_channelID == 0) exitWith {diag_log format ["Custom channel '%1' creation failed!", _channelName]};
    [_channelID, {_this radioChannelAdd [player]}] remoteExec ["call", [0, -2] select isDedicated, _channelName];
}] remoteExec ["call", 2]; //server exec
#

I don't remember what I was gonna say for "second of all"... meowsweats

open fractal
#

second of all, have fun!

little raptor
#

maybe πŸ˜…

maiden garnet
#

0:10:29 "Custom channel 'Ground Forces' creation failed!"

#

this is what my

#

console spits out

little raptor
#

console? you mean rpt?

maiden garnet
#

yea yea

#

not exactly sure what im doing wrong, though im not really sure what im doing in the first place

#

i am running it on the server level now

little raptor
maiden garnet
#

i will restart and report back

little raptor
maiden garnet
#

im going to restart and see if im just doing something dumb

maiden garnet
#

i think the issue is the way im calling customChat

cyan dust
#

Good day. Where can I see the insides of 'setVehiclePosition' command? I'm particularly interested in how it detects collision with other game objects, could not find it in functions viewer tool.

winter rose
#

no can do, engine code

cyan dust
winter rose
#

command != function indeed πŸ˜‰

cyan dust
#

true (=

little raptor
maiden garnet
little raptor
#

why 3? just use the channel ID from that command

maiden garnet
#

3 is what its always started out for me in testing

little raptor
#

better just save the channel ID into a var and use that var instead

maiden garnet
#

if i knew how to do that

#

i probably would

#

this is totally out of my realm

#

thanks for the help, ill probably try this again at a later time

#

but it is currently 3am

winter rose
tight cloak
#

query, use EH such as FiredMan or onFlare.sqs for detecting flares being used

#

and does FiredMan detect grenades

little raptor
little raptor
#

why is it in sqs? meowsweats

#

who even uses sqs? meowsweats

winter rose
#

Operation Flashpoint: Resistance

#

I suspect added for a very specific mission where Troska has to grab an illegal weapon delivery on the coastline from the USA πŸ˜‰

tight cloak
#

thanks for the help

little raptor
# tight cloak maybe i just enjoy your company

my point was that it would save you time. how long did it take for someone to reply? 1.5 hours? yet the whole process of launching Arma, placing a player in 3den, writing a simple code like player addEventHandler ["FiredMan", {systemChat str _this}];, and executing it in debug console would take 1.5 minutes at most

dapper cairn
#

Is there a way to set the RHS Ch47/Chinook (named ch47 for this) to be invincible except for its tail rotor?

compact maple
#

Is

if (_tableName == "" || { _updateFields isEqualTo [] }) exitWith {""};

better than

if (_tableName == "" || _updateFields isEqualTo []) exitWith {""};

or it is just a myth ?

distant oyster
marble flint
#

Am I correct that if func have global effect and global context, it must be called only under if (isServer) { ... };?

marble flint
#

Or any other single run

#

Because I made radio via playSound3D and forgot about that and I have 17 simultaneous sounds, heh

winter rose
#

OR, in the function you could havesqf if (!isServer) exitWith { ["This function must be called on the server"] call BIS_fnc_error };

little raptor
winter rose
#

it all depends on what you have in your function really
"just" a call from the client is possible if everything is global, but it can be seen a good practice to remoteExec on the server

#

it will be needed if you have server-only commands though

modest temple
#

"ln.sqf" remoteExec ["execVM"]

#

I have this as a hold action on a laptop

#

I added it by 3den enhanced mod

#

if I put a hint "new markers added" in the ln.sqf

#

will it show for all the players, or just the played who did the push action

fair drum
winter rose
#

actually connected*

fair drum
#

forget about those lobby trolls πŸ˜„

modest temple
#

just as I wanted it to

runic edge
#

hello guys, how does one upgrade a script to a function :
I have that line sqf pInf addAction ["GV","loads\ce\gv.sqf",[],1.5,true,true,"","",5]; calling this gv.sqf (used to swap loadouts quickly) ```sqf
private _unit = player;

removeAllWeapons _unit;
removeAllItems _unit;
removeAllAssignedItems _unit;
removeUniform _unit;
removeVest _unit;
removeBackpack _unit;
removeHeadgear _unit;
removeGoggles _unit;

_unit addWeapon "rhs_weap_hk416d145";
_unit addPrimaryWeaponItem "rhsusf_acc_g33_xps3";
_unit addPrimaryWeaponItem "rhs_mag_30Rnd_556x45_M855A1_Stanag";
_unit addWeapon "rhsusf_weap_glock17g4";
_unit addHandgunItem "rhsusf_mag_17Rnd_9x19_JHP";

_unit forceAddUniform "unif_SWEAT_ce_impact";
_unit addVest "6094_HEAVY_od";
_unit addBackpack "KIT_BAG_od";

for "_i" from 1 to 10 do {_unit addItemToUniform "ACE_elasticBandage";};
_unit addItemToUniform "ACE_EarPlugs";
for "_i" from 1 to 4 do {_unit addItemToUniform "ACE_tourniquet";};
for "_i" from 1 to 4 do {_unit addItemToUniform "ACE_CableTie";};
for "_i" from 1 to 10 do {_unit addItemToVest "rhs_mag_30Rnd_556x45_M855A1_Stanag";};
for "_i" from 1 to 3 do {_unit addItemToUniform "rhsusf_mag_17Rnd_9x19_JHP";};
for "_i" from 1 to 3 do {_unit addItemToVest "rhs_mag_m67";};
for "_i" from 1 to 5 do {_unit addItemToVest "SmokeShell";};
for "_i" from 1 to 4 do {_unit addItemToBackpack "ACE_plasmaIV_500";};
for "_i" from 1 to 6 do {_unit addItemToBackpack "ACE_splint";};
for "_i" from 1 to 5 do {_unit addItemToBackpack "ACE_epinephrine";};
for "_i" from 1 to 5 do {_unit addItemToBackpack "ACE_morphine";};
for "_i" from 1 to 20 do {_unit addItemToBackpack "ACE_packingBandage";};
_unit addHeadgear "Mohawk_Core_S_OD";

_unit linkItem "ItemMap";
_unit linkItem "ItemCompass";
_unit linkItem "ItemWatch";
_unit linkItem "TFAR_anprc152";```
to which I'd like to add a call BIS_fnc_setUnitInsignia; but from what i understand from the wiki, i cant just add the call into the the gv.sqf and that's where i'm lost !

little raptor
runic edge
#

ain't addactions remote executed ?

distant oyster
#

no

runic edge
#

oh ok thanks

#

So it's working on it's own but it doesn't work when there's a onPlayerRespawn.sqf with [] execVM "scripts\equip.sqf"; calling the lodaouts at respawn given selected role. equip.sqf is a switch looking like that ```sqf
private _unit = player;

if (!isNil("ce")) then {
switch (str(_unit)) do {
case "god";
case "god1": {_unit execVM "loads\ce\zeus.sqf"}; //god

    case "grCdg";
    case "sgCdg": {_unit execVM "loads\ce\cdg.sqf"}; //Cdg
    
    case "grMed";
    case "sgMed": {_unit execVM "loads\ce\medecin.sqf"}; //Med
    
    case "sgBlCde";
    case "sgGrCde";
    case "grBlCde";
    case "grGrCde": {_unit execVM "loads\ce\cde.sqf"}; //Cde
    
    case "sgGvIng";
    case "sgBlGv1";
    case "sgBlGv2";
    case "sgGrGv1";
    case "sgGrGv2";
    
    case "grGvIng";
    case "grBlGv1";
    case "grBlGv2";
    case "grGrGv1";
    case "grGrGv2": {_unit execVM "loads\ce\gv.sqf"}; //Gv```

Is execVM remote executed ?

winter rose
cosmic lichen
#

!code

wicked roostBOT
#
How to use SQF syntax highlighting in Discord

```sqf
// your code here
hint "good!";
```
↓

// your code here
hint "good!";
winter rose
#

they mean here:

  • Global Argument
  • Local Effect ← this is what you are looking for
#

in the example of e.g setDamage, executing it on one location has the effect broadcast to other machines (Global Effect)

runic edge
winter rose
#

…no.

#

I just said that execVM was not

#

@wild prairie you were right too! πŸ˜„

runic edge
#

So remoteExec ain't remote executed because the code is locally executed on each client ?

winter rose
#

…you are mixing things up, wait one

#

using remoteExec on a command with a local effect will make it run locally on each machine yes

cosmic lichen
#

depends on the target parameter

#

but tbh, the wiki page explains it well.

#

Just read it a few times

winter rose
#

one PC executing normally a local effect command = "I'm doing this on my own, nobody shall know"

one PC remote-executing local effect command = "HEY Y'ALL! run this on your PC"

one PC executing normally a global effect command = "HEY Y'ALL! I'm running this command, and the engine will propagate it for me"

one PC remote-executing a global effect command = "HEY Y'ALL! I am running this command, it will be propagated by the engine, and you will run it too and the engine will propagate it again, multiplied by the amount of players!"

runic edge
#

So executing normally only runs the script once (and transfer the RESULTS if the effect is global) while remote executing transfer the script first and let each pc gotta execute it by itself ?

winter rose
#

kind of, yes

#

let's say yes

runic edge
#

I'm sorry i only kind of understand πŸ˜‚

night sundial
#

you've pretty much got it

winter rose
#

I mean yes the concept is correct yes πŸ˜„

#

I just nitpicked in my head as "yeah it's not really transferring the script but telling the other to execute such command/function with passed arguments" πŸ˜… sorry, I am a bit "Friday-like" right now

runic edge
#

ok

night sundial
#

is there any way to make lightpoints visible during the day? i wanted to make custom tracers

night sundial
#

i tried, but you can only see the ambience during the day

#

was hoping maybe there was some weird way to get around it

winter rose
#

negative, but maybe next patch πŸ™‚

night sundial
#

would be cool to see

winter rose
still forum
#

3rd june, that will be in

winter rose
night sundial
night sundial
winter rose
#

I think he meant "was done on 2021-06-03 so should be in game already"

night sundial
#

i will test some more real quick

still forum
night sundial
runic edge
winter rose
#

set max distance to e.g 100

winter rose
night sundial
winter rose
#

ah welp
blame Ded then πŸ˜‹

night sundial
#
mylight = "#lightpoint" createVehicle (player modelToWorld [0,2,1.5]);
mylight setLightColor [1,0,0];
mylight setLightAmbient [1,0,0];
mylight setLightDayLight true;
mylight setLightIntensity 100;
mylight setLightUseFlare true;
mylight setLightFlareMaxDistance 100;
mylight setLightFlareSize 10;

flare is completely invisible during the day πŸ™

runic edge
# winter rose because what are you using in equip.sqf? global effect commands πŸ™‚
private _unit = player;

if (!isNil("ce")) then {
    switch (str(_unit)) do {
        case "god";
        case "god1": {_unit execVM "loads\ce\zeus.sqf"}; //god
        
        case "grCdg";
        case "sgCdg": {_unit execVM "loads\ce\cdg.sqf"}; //Cdg
        
        case "grMed";
        case "sgMed": {_unit execVM "loads\ce\medecin.sqf"}; //Med
        
        case "sgBlCde";
        case "sgGrCde";
        case "grBlCde";
        case "grGrCde": {_unit execVM "loads\ce\cde.sqf"}; //Cde
        
        case "sgGvIng";
        case "sgBlGv1";
        case "sgBlGv2";
        case "sgGrGv1";
        case "sgGrGv2";
        
        case "grGvIng";
        case "grBlGv1";
        case "grBlGv2";
        case "grGrGv1";
        case "grGrGv2": {_unit execVM "loads\ce\gv.sqf"}; //Gv
        ``` 
the switch do has global effect ?
winter rose
#

no

#

what do you use in these other scripts?

smoky verge
#

is there no way to disable terrain grass without lowering terrain resolution?

runic edge
still forum
smoky verge
runic edge
coarse dragon
#

Eden enhanced

smoky verge
coarse dragon
#

Yea

smoky verge
coarse dragon
#

General up at the top

#

The 1st setting at bottom

smoky verge
#

I have player respawn at the bottom of general

#

oh it was in enviroement

coarse dragon
#

Yess lol

#

Not on atm so couldn't remember

smoky verge
#

thanks anyway

runic edge
winter rose
smoky verge
runic edge
#

y

winter rose
#

execVM β†’ calls another execVM β†’ etc β†’ which scripting commands are used, in the end?

night sundial
winter rose
#

it can be merged with mine actually

night sundial
#

also i was playing around with bullet velocities, and multiplying a bullets velocity by a large amount, (say around 10), will send the round in a seemingly random direction. Why does it do this? I wanted to have a near hitscan round, but they dont go straight at all

winter rose
#

code?

little raptor
#

I don't remember what it was tho. maybe 5k?

night sundial
# winter rose code?
player addEventHandler ["Fired",{
    params ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile", "_gunner"];
    systemChat str vectorNormalized velocity _projectile;
    _projectile setVelocity ((velocity _projectile) vectorMultiply 10);
    systemChat str vectorNormalized velocity _projectile;
}]

the normalized velocity vectors are different with a multiplied velocity of 10

little raptor
night sundial
#

darn

#

didn't think it would be that low

little raptor
#

@still forum do you remember what you set the max velocity to?

#

I'm not sure what it was.

still forum
#

no

#

but I know where to find it meowsweats

little raptor
#

It should be added to the wiki meowsweats

night sundial
#

i can test it, where do i find the velocity of the projectile in the cfg? the weapon or the ammo?

little raptor
#

neither

#

mag

#

but you can just do vectorMagnitude velocity _projectile in the EH

#

yeah, it's 5k

night sundial
#

oh well. i did notice that while setting the bullet speeds very high that you can shoot an mx through an h-barrier, which i thought was interesting

little raptor
night sundial
#

well i was hoping for a bit faster but that might be alright

little raptor
little raptor
#

it's + mach 10 (roughly Mach 15)

night sundial
#

i wanted to point my maaws at a jet and blow it out of the sky without leading it

#

also i will have to update the speed very often because of drag

little raptor
night sundial
#

lineIntersectsWith has a max distance of 1km so i cant really put the round exactly where i'm looking

little raptor
#

and its limit is 5km

little raptor
#

you can break the distance down and check multiple intersections

night sundial
#

will keep that in mind

digital hollow
#

terrainIntersectAtASL works past 5k, but obv is useless for trying to hit an aircraft.

little raptor
#

the primary reason I suggested lineIntersectsSurfaces is because you can specify the lod

#

all other intersect commands don't have a lod parameter

#

afaik they only check the VIEW lod

night sundial
#

my fix for my tracer issue is to attach a cmflare to the round. While very smokey, it actually looks very badass

night sundial
#
player addEventHandler ["Fired",{
    params ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile", "_gunner"];
    private _flare = "#lightpoint" createVehicle getPos _projectile;
    _flare attachTo [_projectile];
    _flare setLightColor [1,0,0];
    _flare setLightUseFlare true;
    _flare setLightIntensity 40;
    _flare setLightFlareMaxDistance 3000;
    _flare setLightFlareSize 1;
    [_projectile,_flare] spawn {waitUntil {isNull (_this#0)}; deleteVehicle (_this#1);};
}];

i was testing this at night since i can actually see the flares. I attach a light to the projectile, but the light disappears almost immediately? like when the round gets about 200m away, you lose sight of the flare

peak pond
#

Hi, I'm creating modules for some Zeus utilities. It's great all the things you can do with modules, but I have hit a roadblock. For some modules, I need the associated function to run some code only on the client that placed it via Zeus (i.e. neither global nor server-only). Is there a way to do this, either in the module config or the SQF function?

Sample module config:

class my_modules_selectPlayer: Module_F {
    scopeCurator=2;
    curatorCanAttach=1;
    category = "my_modules";
    displayName = "Select Player";
    function = "my_modules_fnc_selectPlayer";
};

Sample module function:

params ["_logic", "_units", "_isActivated"];
if (not _isActivated) exitWith { false };
// TODO: Exit if not client that placed the module!  Also, can't just
// check if player is curator because there may be multiple curators.
private _selectedUnit = _logic getvariable [
    "bis_fnc_curatorAttachObject_object",
    objNull
];
selectPlayer _selectedUnit;
deleteVehicle _logic;
true;
dapper cairn
#

Is there a way to set a helicopter with the variable name of Heli1 to be invincible except for its tail rotor?

hallow mortar
#

HandleDamage EH maybe?

#

It returns the selection that was hit so if you figure out the name of the rotor selection, you can discard damage to anywhere else

dapper cairn
#

Okay

crude vigil
distant oyster
#

well deleteVehicle will be global anyway, you can't delete vehicles locally, unless they were created with createVehicleLocal

boreal parcel
#

how would I go about detonating the ATMine via script? Trying to recreate the bridge engineer scene from BF3 except im gonna use an addaction on a little computer

peak pond
#

in zeus, who places an object becomes the owner of it

Great, this should do the trick. If that's true, then I should be able to make the module isGlobal = 1, then in the function check if _logic is local, which should achieve the desired effect of only continuing if on the Zeus client that placed it. Thanks!

#

createVehicleLocal would be useful too, but there's no way to do this via Zeus, right?

manic sigil
distant oyster
#

maybe triggerAmmo will also work as that is its intended purpose i think

warm coral
#

anyone got a idea why my music wont play? when i use sounds from a diffrent mission i made previously it works perfectly fine im just so confused

#

its in the right format and everything

winter rose
#

we may need more details about this

warm coral
#

one sec

#
{
     sounds[]={OststurmFinal,tension};

class OststurmFinal
     {
     name = "OststurmFinal";
     sound[] = {\music\OststurmFinal.ogg, +10db, 1.0};
     };
class tension
     {
     name = "tension";
     sound[] = {\music\tension.ogg, +2db, 1.0};
     };
 };```
this is what i have in the description.ext file and both the music files in the music folder within the mission when i listen to the oststurmfinal.ogg file it works perfectly fine but when i go into arma and try to get it to run with a trigger just silence
#

i tried messing with the audio volume on both the audio and description file

#

but nothing

#

the tension.ogg works perfectly fine

#

so i have no idea

#

only thing i could think of is use a diffrent programm to convert it to ogg instead of audacity

untold copper
warm coral
#

doesnt work with playMusic nor with debug

#

only thing i can think of is maybe redo the audio incase it like bugged or something

crude vigil
warm coral
#

ill try it once i figure out how to do it in audacity

limber panther
#

Hello! Can somebody help me please? I made a script, that is supposed to lock/unlock a vehicle when the vehicle owner gives it an order to do so, and it is supposed to prevent other players from entering the vehicle and driving away with it, when tested on my own, it all works fine, even on a dedicated server, i spawn the vehicle, i can lock it, unlock it, and it pretty much does its job. But the problems comes, when there are actually more players. For my my car still works fine. But even if i lock the vehicle anyone else can still enter the seemingly locked vehicle, as well as drive it or steal inventory items, and they can even use the locking/unlocking functions. And of course i can enter their locked cars and operate the system. So this script just seems to work fine but in reality it totally failing in its job. Can someone help me fix that please? Thank you. ```sqf
_vehicle setvariable["fw_owner",player,true];
_vehicle lock true;
_vehicle lockInventory true;
_vehicle addAction ["UNLOCK", {
params ["_target", "_caller", "_actionId"];
private _owner = _target getVariable["fw_owner",""];
if (_owner==player) then {
_target lock false;
_target lockInventory false;
playSound3D [getMissionPath "sound\lock.ogg", _target];
};
}];
_vehicle addAction ["LOCK", {
params ["_target2", "_caller2", "_actionId2"];
private _owner = _target2 getVariable["fw_owner",""];
if (_owner==player) then {
_target2 lock true;
_target2 lockInventory true;
playSound3D [getMissionPath "sound\lock.ogg", _target2];
};
}];

sudden yacht
#

Is it possible delete a particle source on a vehicle that is spawned?
say from an exaust of a vehicle?

untold copper
sudden yacht
#

@warm coral if recall correctly the format must 48000 hz, and in mono in order to work.

#

If its not you will have to re-record and or change it to 48000hz, and mono.

#

Also are the sounds in the correct location?

warm coral
warm coral
#

thats how i got it to work

fair drum
limber panther
# fair drum why are you using `player`? whats the locality of this script? where are you put...

it is written in editor in the init field of an noticeboard, using player to identify the one who is triggering the action at that moment to check if he is the owner of the vehicle or not```sqf
this addAction ["Pickup", {
private _vehicle = createVehicle ["CUP_C_Pickup_unarmed_CIV", [3648,304]];
[_vehicle, true] remoteExec ["enableDynamicSimulation", 0];
_vehicle setvariable["fw_owner",player,true];
_vehicle lock true;
_vehicle lockInventory true;
_vehicle addItemCargoGlobal ["kka3_ace_extension_roadcone_l_f", 3];
_vehicle addItemCargoGlobal ["CUP_V_B_LHDVest_Yellow", 4];
_vehicle addItemCargoGlobal ["ACE_tourniquet", 4];
_vehicle addItemCargoGlobal ["ACE_elasticBandage", 5];
_vehicle addItemCargoGlobal ["ACE_fieldDressing", 5];
_vehicle addItemCargoGlobal ["ACE_packingBandage", 5];
_vehicle addAction ["UNLOCK", {
params ["_target", "_caller", "_actionId"];
private _owner = _target getVariable["fw_owner",""];
if (_owner==player) then {
_target lock false;
_target lockInventory false;
playSound3D [getMissionPath "sound\lock.ogg", _target];
};
}];
_vehicle addAction ["LOCK", {
params ["_target2", "_caller2", "_actionId2"];
private _owner = _target2 getVariable["fw_owner",""];
if (_owner==player) then {
_target2 lock true;
_target2 lockInventory true;
playSound3D [getMissionPath "sound\lock.ogg", _target2];
};
}];
}];

limber panther
#

can you elaborate a bit more please? i'm not catching up yet

#

hold on so is there any mistake with the set variable line?

fair drum
#

its just not how I do it. you just have conflicting data types between the set variable and the get variable default later

#

but it shouldn't matter

limber panther
#

and how would you do it?

#

oh wait a second

#

you mean the "" right?

fair drum
#

well i wouldn't be doing this all in a init box for one lol, id be splitting this up

#

and yes, but ""==_caller and objNull==_caller is going to be false either way

limber panther
fair drum
#

why are you not just creating simpler functions instead?

#

and then you don't have to lol

limber panther
fair drum
#

so the first thing I would try is changing player to _caller and the default for the getVariable from "" to objNull

limber panther
#

anyways that you very much for your help and your ideas

#

hopefully it will work this time because each test costs me money

fair drum
#

if you did this and it worked for 199 other vehicles, what did you do differently for this one?

#

costs money?

limber panther
#

the script is identical for all 200 vehicle, they have just different classnames, spawn coordinates and these tiny details

fair drum
#

whats this cost money ordeal?

limber panther
#

i created this script, tested it in editor and it worked so i placed it into a dedicated server and launched it on my computer to see if it works and it worked but i couldn't test it any further so i assumed it works and did this for all the vehicles, and today i purchased a server rent at a hosting company to be able to actually invite my friend to the game to be able to test it in two people and what a surprise when we realised it doesn't ... so yeah every time i need a second player to test something, i have to pay for a server rent, otherwise we can not join to the same game

hollow thistle
#

You could just start 2 arma clients on your PC.

#

Or client + dedi.

limber panther
#

@hollow thistle negative sir, i don't have public IP address, my internet provider doesn't allow me to host any multiplayer session in any game

hollow thistle
#

And how that blocks you from starting multiple clients on YOUR pc? meowhuh

limber panther
hollow thistle
#

it does, I was literally testing with 3+ clients on my PC at times.

fair drum
#

you can't launch from steam though, you gotta go by the .exe

#

is how i get around it auto shutting off with multiples

hollow thistle
#

You can just leave the launcher on.

#

And click play

limber panther
#

i never really thought about this possibility, on the other hand the server costs me about 9Kč per day (+ - 0.37€ per day) so that's not a problem that i'm dealing with

hollow thistle
#

and click it again

#

and again.

fair drum
#

so for next time, i would seriously consider how well your code scales up. right now, having to manually go through all 200 vehicle init boxes and change stuff is a problem with ease of scale, when you could store the classnames and positions together in either a variable or hashmap, make your functions with args and params, and send the vehicle through a function chain

crude vigil
#

I mean the "click again and again" part

limber panther
fair drum
boreal parcel
boreal parcel
fair drum
boreal parcel
#

minefield module

fair drum
#

give me a sec and ill look at it

boreal parcel
#

basically tried

{
    _x setDamage 1;
} forEach nearestObjects [getpos player,["ATMine"],15000];

limber panther
#

but so far, with your help here i think i was able to create a great thing, because since i first dipped my nose into scripting for the very first time until now i was and still i am working on the very same arma mission, now it's been 2 years and the mission file has grown into a really big and very nice gaming experience, thanks to you @fair drum and some other people

boreal parcel
boreal parcel
#

alright

fair drum
boreal parcel
#

is allMines a built-in method?

fair drum
#

yes its an array of all the mines lol

untold copper
boreal parcel
#

ahhh gotcha, sweet thats convenient

fair drum
#

runs faster than nearestObjects as well

untold copper
boreal parcel
#

awesome it worked, it was beautiful lol

fair drum
#

let me put my character back together first

boreal parcel
#

hey another question, is there a method to turn a vehicle unit into an IED? and how would I go about having said unit rush through whatever towards its target rather than the current ai I spawn in zues and turn into a vbied that likes to use traffic laws

fair drum
# untold copper How many times faster? 🀣

in a bare editor field with mines placed and nearestObjects changed to accept all objects since its not going to pick up at mines anyways the way he was doing it...

Execution Time: 1.4280 ms  |  Cycles: 701/10000  |  Total Time: 1001 ms

vs

Execution Time: 0.0911 ms  |  Cycles: 10000/10000  |  Total Time: 911 ms

so... a lot of times

untold copper
untold copper
warm coral
boreal parcel
#

Ah Hypoxic sent me a link to pretty much the same question I asked but elsewhere, where he answered and provided a script. I'm working on making that work now

wild canyon
#

Is there a way to loop an animation x amount of times guys

zinc loom
#

hello everyone , im a newbie, does anyone of you know, where are the textures for Land_Cargo40 containers ?

#

i found the .p3d but in the data i dont understand or cant find the skins

little raptor
# wild canyon Is there a way to loop an animation x amount of times guys
_animName = "Blablabla";
_repeat = 4;
_unit setVariable ["anim_loop_params", [_animName, _repeat]];
_unit addEventHandler ["AnimDone", {
  params ["_unit", "_finishedAnim"];
  private _animParams = _unit getVariable ["anim_loop_params", []];
  _animParams  params ["_anim", "_repeat"];
  if (_finishedAnim == _anim) then {
     _repeat = _repeat - 1; 
     _unit playMoveNow _anim;
     if (_repeat <= 0) then {
       _unit removeEventHandler ["AnimDone", _thisEventHandler];
     } else {
       _animParams set [1, _repeat];
     }
  };
  
}];
_unit switchMove _animName;
_unit playMoveNow _animName;
zinc loom
#

lets say i want ot change from Land_Cargo40_grey_F the texture to Land_Cargo40_light_blue_F texture

#

shouldnt i find a paa of both of them somewhere ?

little raptor
#

the textures are baked into the p3d

#

you can't change an object textures unless it has hiddenSelectionsTextures

#

these objects don't have one

zinc loom
#

ah ok my bad ty very much

#

ok

little raptor
#

define it then

wild canyon
valid abyss
vernal mural
#

It seems like task description and title cannot be properly localized when using the Task Framework ? (BIS_fnc_taskCreate)

#

my server is started in english, and it looks like all french players are seeing english strings in tasks created by the server

cosmic lichen
#

yes.

#

Translation happens where it's executed and is then send over to the client.

#

At least I think so. Would need to check the function.

vernal mural
#

isn't that inefficient and unconvenient ?

cosmic lichen
#

Yes and yes

#

But let me check the function first

vernal mural
#

yep

#

it seems to use getText in the setTask function

bronze temple
#

Anyone know if theres an event handler for opening the ace medical menu

#

Or a work around for it

bronze temple
#

Ah sweet

#

So its

#

ace_medicalMenuOpened

#

Thanks

#

Another question

#

Never really worked with CBA before but
player addEventHandler ["["ace_interact_medical_menu" ace_medicalMenuOpened] CBA_fnc_addEventHandler", {
_typeVeh = getText (configfile >> "CfgVehicles" >> typeOf vehicle player >> "vehicleClass");
if (_typeVeh == "men" || _typeVeh == "MenSupport") then {
[] spawn A3NV_fnc_ACEMenu;
};
}];

#

Would that work at all

little raptor
#

no

bronze temple
#

Figured

little raptor
#

even the syntax is wrong. how's it supposed to work?

bronze temple
#

idk tbh

#

First time writing a lot of this script

#

Worked for my inventory script

#

But that was a base game event handler

#

Never really worked with CBA before but
_medical = ["ace_medical_opened", ace_medicalMenuOpened] call CBA_fnc_addEventHandler;
player addEventHandler ["_medical", {
_typeVeh = getText (configfile >> "CfgVehicles" >> typeOf vehicle player >> "vehicleClass");
if (_typeVeh == "men" || _typeVeh == "MenSupport") then {
[] spawn A3NV_fnc_ACEMenu;
};
}];

#

Would that?

little raptor
# bronze temple idk tbh

if you simply use syntax highlighting (Notepad++ or vscode with SQF syntax highlighting) you'll see why:

player addEventHandler ["["ace_interact_medical_menu" ace_medicalMenuOpened] CBA_fnc_addEventHandler", {
  _typeVeh = getText (configfile >> "CfgVehicles" >> typeOf vehicle player >> "vehicleClass");
  if (_typeVeh == "men" || _typeVeh == "MenSupport") then {
    [] spawn A3NV_fnc_ACEMenu;
    };
}];
little raptor
#

you're just writing random stuff

bronze temple
#

Pretty much

little raptor
bronze temple
#

Ah I see

#

Thanks man

#

my brain was half thinking that would be it but first time branching into this shit I got no clue what I am doing half the time lmao

radiant breach
#

Is there a script for that defending AI doesn't move but with status custom buttons that you can "set them free"

bronze temple
#

Achilles has a garrison module if you set to 0 will make them stay and it has an un garrison module which lets them move again

radiant breach
#

OkΓ© thanks for the reply

bronze temple
#

Is there anyway I can do displayCtrl with and idc of -1

little raptor
#

you already can

bronze temple
#

How

little raptor
#

wdym how? just like any other idc

#

_disp displayCtrl -1

bronze temple
#

There are multiple -1's

little raptor
#

then you have to filter them to get the one you want

bronze temple
#
    class controlsBackground
    {
        class Title: RscText
        {
            idc=1200;
            x="((1) * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2))";
            y="((0) * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2))";
            w="((38) * (((safezoneW / safezoneH) min 1.2) / 40))";
            h="((1) * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25))";
            colorBackground[]=
            {
                "(profilenamespace getvariable ['GUI_BCG_RGB_R',0.13])",
                "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.54])",
                "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.21])",
                "(profilenamespace getvariable ['GUI_BCG_RGB_A',0.8])"
            };
            moving=1;
        };
        class Center: RscText
        {
            idc=-1;
            x="((1) * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2))";
            y="((1.1) * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2))";
            w="((38) * (((safezoneW / safezoneH) min 1.2) / 40))";
            h="((16) * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25))";
            colorBackground[]={0,0,0,0.69999999};
        };
        class Bottom: Center
        {
            y="((17.6) * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2))";
            h="((9) * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25))";
        };
    };
little raptor
#

or if you created the display don't set the idc to -1

bronze temple
#

Trying to edit the ace dialog to be custom

#

And a lot of their stuff has idc's of -1

little raptor
#

what are you making? mod or mission?

bronze temple
#

Mod

little raptor
#

then just modify the class properties

#

change the idc

#

no

#

just modify the idc

bronze temple
#

Gotcha

upper cliff
#

how does one make a mod?

bronze temple
#

thats a broad question lol

#

Would look up some tutorials online

crude vigil
upper cliff
#

thanks

sick dune
#

I've seen some music/sound placement mods for Zeus around, but I'm wondering if those are good templates for adding custom stuff of my own, or if there's an easier way to do it by hand.

crude vigil
sick dune
#

Well, that's encouraging. I already got a custom animation in without the game exploding, so maybe this will be easier KEKW

acoustic abyss
#

Is there a method of detecting vehicle damage due to water? And using that to reverse it?

When using the Dammaged event handler, like so:

_vehicle addEventHandler ["Dammaged", 
{
    params ["_unit", "_selection", "_damage", "_hitIndex", "_hitPoint", "_shooter", "_projectile"];
    hint format ["Shooter: %1", _this select 5]; 
}];

It gives <NULL-object> . This makes sense. But I can't seem to detect it using:

if ( _shooter == "<NULL-object>") then {...};

Anyone have experience with this?

winter rose
#

isNull _shooter
and that would also filter collision/fall damage

acoustic abyss
#

Cheers! I feel a bit stupid; had simultaneously jus read this on the BIKI myself. Thank you for responding quickly. Will improve my Google-fu before asking a question next time.

winter rose
#

no worries, at least you tried, that's the most important part πŸ‘

inland trout
#

hello, im trying to learn scripting and was wondering about this event handler

#

`{
_x addEventHandler ["Fired",{ _this spawn{

params ["_firer"];
{
_x setBehaviour "COMBAT";
sleep random [1.8,2.2,3.5];
} forEach (allUnits select {_x distance2D _firer < 200});
_firer removeEventHandler ["Fired", 0];
};
}];
}forEach allUnits;`

#

the script works about how does it know what "_firer" is?

bronze temple
#

Weird question here

#

But im noticing stuff like this
x="((7.5) * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2))";
but when I do safezones in GUI editor I get lines like this
x = 0.442735 * safezoneW + safezoneX;

#

Just wondering what the diff is

#

if any at all

fair drum
fair drum
#

when the fired event handler goes off, it stores all of the above info in an array to the event handler which you can access by using params

little raptor
little raptor
low remnant
#

is there a scripting command to make a preplaced ar-2 darter not be able to be packed back up?

low remnant
#

tried, doesnt work

little raptor
# low remnant tried, doesnt work

it does hide the "Disassemble Darter" or whatever action. I'm not sure what you mean by "doesn't work".
If you mean disassembling them via scripts, yes, it doesn't work for that

low remnant
# low remnant tried, doesnt work

clarification: itdoes hide the disassembly prompt on foot, but getting into a vehicle close enough to it the disassembly is useable from the vehicle

little raptor
idle jungle
#

Hello all
Im trying to make other factions spawn using the SPAWN AI module.

trying to use code in the init field of the spawn ai module

this setVariable[ "side", "resistance", true ];  
this setVariable[ "faction", "IND_C_F", true ];```
but this is not working and says its not valid
#

could i also give these groups waypoints instead of using the sectors?

quasi sedge
#

How to parse "hidden" vehicles in mod set?

#
_configs = "getNumber (_x >> 'scope') >= 2" configClasses (configFile >> "CfgVehicles");  
_classNames = _configs apply {configName _x};  
copyToClipBoard str _classNames;  
hint str _classNames; _classNames```
#

i can play mission with "rhs_btr_80_vdv", but i can't parse it

#

Cut from parse list 14553 lines

...
rhs_bmp3mera_msv
rhs_brm1k_tv
rhs_brm1k_tv_b
rhs_brm1k_tv_g
rhs_btr60
rhs_btr60_b
rhs_btr60_g
rhs_btr70
rhs_btr70_b
rhs_btr70_g
rhs_btr80
rhs_btr80_b
rhs_btr80_g
rhs_btr80a
rhs_btr80a_b
rhs_btr80a_g
rhs_casing_105mm_m14b1
...
little raptor
#

are you sure it's not there? how did you check?

quasi sedge
#

got answer - just use 1 instead of 2 in (_x >> 'scope') >= 2

cyan dust
#

I'm kinda lost notlikemeow with 'lineIntersectsSurfaces' command, which LOD should I use? Where can I find what's the difference?

little raptor
#

if you want to check visibility -> view
if you want to check object collision -> geom
if you want to check projectile collision -> fire

#

I think you'll understand the diff with an example:
you (and AI) can look through a window (no VIEW intersect), but you can't pass through it (GEOM intersect). and a bullet may pass through/damage a window (FIRE intersect)

little raptor
cyan dust
#

Thanks a lot.

sacred slate
#

i play with unit switch a lot. i like the previous unit to keep its watch direction where i left it, but it feels like that doesn't work. _directionwatch = unitAimPosition _previousUnit; _previousUnit doWatch _directionwatch;

#

they react to sights, thats fine. but i like them to return to their watch dir

full sleet
#

Hey I've got a quick question: Since everyone but the dedicated server is supposed to execute initPlayerLocal.sqf, what exactly happens when I put a scripting command (such as addCuratorEditableObjects) with Server Execution in there? Will it still be passed to the dedicated server or is it simply being ignored?

winter rose
#

the command will say "oh, I should run that! am I the server? nope, so none of my business"

(otherwise it would be run X times, the number of players)

#

there is initServer.sqf, if you want - works for both dedi and hosted servers

full sleet
#

Jup, thanks. Just wasn't sure where to put it. An additional question: Say we want to add a newly created player object via addCuratorEditableObjects, how do I add it in initServer.sqf, since I can't use the variable player in there, such as in initPlayerLocal.sqf

winter rose
#

I do not understand the question

full sleet
#

Sorry, maybe I was unclear. I've got curators in my mission and I want to add player objects of newly connected players to the Zeus Interface with the command addCuratorEditableObjects. How to I get the newly created player object? I cannot find an Event Handler that returns such a player object.

winter rose
#

you can use onplayerconnected mission EH perhaps, and wait until the player disconnects or has a "player" unit

full sleet
#

Thanks, I'll try that out!

south gale
#

Hey there!
I have a mission I'm currently making where I'd like to have 3 smaller tasks complete one task when they're all completed
What do I do in order to do such? I assume it is a trigger synced to the three smaller tasks, but I dont know what to put in that trigger to do what I want it to do

#

I tried to have a trigger that complete the final task by having all the smaller task triggers be named trigger1-3 and having this on my finall trigger, but it did not work:

triggeractived trigger1;
triggeractived trigger2;
triggeractived trigger3;

Missing semicolon somewhere? Idk I dont script very often

south gale
#

Mfw I cannot spell

#

Thank you Lou

hasty current
#

Hi all, I'm having issues with getting fog to work in a dedicated server. In the mission's intel tab, I have the fog set to 90% with a forecast of 50%, and in a trigger I have 0 setFog [0.9, 0, 0];1800 setFog [0.5, 0, 0];

Both the weather settings and the trigger script work in singleplayer and in listen servers, but on a dedicated server there is no fog at all. Are there any rules I'm not aware of but should be? Like, does decay=0 not work on DS? What's the epsilon value for decay - AKA how low can it go before the engine considers it the same as 0? I need fog to be practically the same at all altitudes

winter rose
#

since setFog should be run on server, make the trigger server-side, not player-linked
or last hope, use remoteExec

hasty current
#

Wait, really? I assumed setFog would only change the density value. Let me try that..

full sleet
south gale
winter rose
#

Β―_(ツ)_/Β―

south gale
#

I cry

#

Thanks though

#

I did it!

#

I made it so a trigger would detect if a task is completed, and if it did it would change a global variable

#

Then the final trigger would detect if all three variables were true

shut basin
#

So i got a problem:
I'm trying to set up a trigger, which triggers a pop-up-target, when you walk through it:
Got this from online
this animate ["terc", 1]; in the target
and
TargetSofa setDamage 0; TargetSofa animate ["terc", 0]; this in the trigger, with all configurations and the correct variable name in the target.
The Target even goes down, but the trigger wont do anything. I've even tried having it play a sound without results.

#

dont need a condition if its just about a player walking through, right?

winter rose
#

it does not automagically know it should trigger on player's presence

shut basin
#

well yeah

little raptor
shut basin
#

do i need one in that case?

little raptor
#

just asking what it is. is it this?

little raptor
shut basin
#

hm ok

#

what would i type in there?

little raptor
#

this

shut basin
#

oh

#

well thanks, that did it XD

little raptor
shut basin
#

mustve yeeted it by some point

little raptor
#

I mean unless you changed it ofc

shut basin
#

yeah

#

probably

somber radish
#

So I got a question about making an addon, I have a FSM file I would like to make into a WorkShop Item as a addon / module to be placed on the map. However I got no idea on how to proceed.
Currently I got a couple of scripts ready for testings sake (just to learn the process).

/*init.sqf*/
waitUntil{time > 5};
systemChat "hello [P]";
[] spawn Tally_Fnc_chatSpammer;
``````c
/*Description.ext*/
class CfgFunctions
{
    class Tally
    {
        class testFunctions
        {
            class chatSpammer {};
        };
    };
    
};``````sqf
/*Fn_ChatSpammer.sqf*/
while {sleep 10; true} do {
    systemChat "this is a test";
};
#

This will send a hello message, and then send a message every 10 seconds with the content "this is a test"

#

How would I go about turning this into a mod?

crude vigil
somber radish
hushed tendon
#

I'm working on making a mind control script and I'm running into an issue with the AI that takes over the player. For some reason the AI around the victim (they are looking away) spot and start shooting at the victim first. I'd like for the victim to immediately start shooting the units around them but I'm hitting a wall with figuring out how to do so.

_victim = player; 
_cfsSide = east; 
if!(local _victim)exitWith{}; 
 
if(isPlayer _victim)then{
    _grp = createGroup (side group _victim); 
    _dummyUnit = _grp createUnit [ (typeOf _victim), [0,0], [], 0, "CAN_COLLIDE"]; 
    _dummyUnit enableSimulationGlobal false; //Creating dummy unit to place under players control
    _dummyUnit allowDamage false; 
    _dummyUnit hideObjectGlobal true; 
    _dummyUnit setPosATL [0,0,1000]; 
    _victim setVariable ["DummyUnit",_dummyUnit]; 
    selectPlayer _dummyUnit; //Removing players control over their unit
    switchCamera _victim; //Player camera goes back to body to simulate being in their body with no control
    _victim addEventHandler ["Killed", {
        params ["_unit", "_killer", "_instigator", "_useEffects"];
        _dummyUnit = _unit getVariable ["DummyUnit",objNull];
        selectPlayer _dummyUnit;
        [_unit] joinSilent group _dummyUnit;
        _dummyUnit setDamage 1;
        deleteVehicle _dummyUnit;
        _unit removeEventHandler ["FiredNear", _thisEventHandler];
    }];
};
sleep 1;

_grp = createGroup _cfsSide; 
[_victim] joinSilent _grp; //Changing side to make hostile
crude vigil
# hushed tendon I'm working on making a mind control script and I'm running into an issue with t...

Use setCaptive for the process. This will make all AIs ignore this unit.
Group change process may take a while, and since the AI update of 1.68 (iirc), they sometimes require an additional order to update "relations". That might be the reason that it is not attacking "instantly", simply issue an order. (Such as addWaypoint, which I know it works or used to work at least) My experience with this was on changing side diplomacy but maybe it affects change of group the same way for units so I am not sure if it is the same reason.

hushed tendon
hasty current
hushed tendon
#

You probably have a mod on that is overriding the fog settings

somber radish
# crude vigil https://community.bistudio.com/wiki/CfgPatches No more description.ext but confi...

So I got it set up now, however upon starting a mission, nothing happens.

/*config.cpp*/
class CfgPatches
{
    class MyAddon
    {
        // Meta information for editor
        name = "Test Addon";
        author = "Tally";
        requiredVersion = 1.60;
        requiredAddons[] = { };
        units[] = {};
        weapons[] = {};
    };
};
#include "cfgFunctions.hpp"
``````c
/*cfgFunctions.hpp*/
class Tally
    {
        class testFunctions
        {
            class chatSpammer {};
            class MissionInit {postInit = 1;};
        };
    };```
```sqf
/*Fn_MissionInit.sqf*/
systemChat "hello [P]";
"hINT SIIIR GO TO WORK" remoteExec["hint", 0];
[] spawn Tally_Fnc_chatSpammer;
``````sqf
/*Fn_chatSpammer*/
while {sleep 10; true} do {
    systemChat "this is a test";
};
#

I did export it using the addon-builder and publisher from A3 tools

crude vigil
somber radish
#

no

#

Should I look into the RPT file?

#

I do see it loaded tho when launching the game

crude vigil
#

no , it means u couldnt load the mod. Btw you dont need publisher or something... Are you sure u didnt forget to load the mod in a3 launcher?

somber radish
#

However no messages are displayed on mission-start

#

yeah I subscribed to it from workshop

#

then selected it from the list of available mods

crude vigil
#

no u shouldnt do it like that...

somber radish
#

Oh?

crude vigil
#

you can put local mods into launcher

#

that is how we test mods basically

somber radish
#

Ok just did it

crude vigil
#

ok does it return any error upon loading it into launcher?

#

or is it green light?

#

if it is green light, then check in game on main menu, if you see a Puzzle icon with your mod's name on it

somber radish
#

Yup

#

I got the @tough abyssAddon there

#

in the puzzle

tiny wadi
#

Is CfgDisabledCommands enforced by each client, if so does that mean its vulnerable to exploit?

fair drum
tiny wadi
fair drum
#

i believe it disables the execution of the command after the preinit phase

crude vigil
empty birch
#

Does anyone have any experience with having OPFOR Spawn and paradrop out of a vehicle

warm hedge
#

Yes?

coarse dragon
#

Is there a script that forces an AI driver go straight to a waypoint

coarse dragon
#

With a ; at the end?

warm hedge
#

What

coarse dragon
#

Thats a script?

warm hedge
coarse dragon
#

Blah it doesn't work on boats

winter rose
coarse dragon
#

A landing craft to go straight to a waypoint. Without turning and blocking the paths of others

spring dust
#

YourVehicle doMove position

#

And take a look at disableAI

#

Set it to careless

little raptor
#

BIS_fnc_recompile

winter rose
#

you can set (atm) allowFunctionsRecompile = 1; in description.ext, and recompile in Functions Viewer from the pause menu

little raptor
#

you can make it recompile a specific function

#
[mode] call BIS_fnc_recompile

Parameters:
mode (Optional, default 0):

    String - **name of the function to be recompiled**
#

name

winter rose
#

next patch (or in dev branch) you don't need it

sage heath
#

quick question: how do i increase a mission file's ambient temp?

#

cuz the thermals arent working properly and everythings too dang dark

little raptor
sage heath
#

frick

#

what can i do with this?

little raptor
#

nothing. it's a getter. not setter.

sage heath
#

oh ok

#

yep changed the date

#

works

#

thanks

digital wasp
#

how do i make a group join another group?

little raptor
digital wasp
#
[ai1] join player; ai1 enableAI "move"; ai1 setCaptive false;``` works but only for 1  person, doesnt work for tje whole group
#

ignore other stuff, its just so they dont move

#

oh, how do i make it a group?

#

group [ai1] or [group ai1]?

#

or group ai1?

digital wasp
#

okay, thanks

#

what about the other two commands? do i also add the "units" to it or leave it as it is?

digital wasp
#

huh?

little raptor
#

see forEach

digital wasp
#

i'm not really good at coding, can i just get the command/alternative?

distant oyster
#
{
  _x enableAI "move";
  _x setCaptive false;
} forEach units group ai1;
units group ai1 join player;
digital wasp
#

thank you very much

little raptor
digital wasp
#

it doesn't work unfortunately

#

they join the group but stand still

distant oyster
digital wasp
#

it works now, thanks

ocean orchid
#

Hey, I'm having some problems trying to iterate through a list of config classes. Say I wanted to collect a variable from a list of classes in the config files and I know where they are, I just need to go through each of them and collect the same variable in each.

I've found I can't just navigate to the place in which the classes are and use that as a parameter in a forEach loop. It gives an error and says it expects arrays and not configs so how else would I go about it?
Thanks in advance!

distant oyster
#

can you show your code?

ocean orchid
#

Yeah here it is:

private _supplyDropsConfig = (missionConfigFile >> "gamemode" >> "supplydrops");
private _crateTypeArray = [];
{
    private _crateType = getText (_supplyDropsConfig >> _x >> "className");
    _crateTypeArray pushBack _crateType;
} forEach _supplyDropsConfig;

Trying to make a save system in Mike Force and it technically already works. I just wanna make it work with potential expansions to MF in the future as well.

little raptor
#
private _supplyDropsConfig = (missionConfigFile >> "gamemode" >> "supplydrops");
private _crateTypeArray = "true" configClasses _supplyDropsConfig apply {
  getText (_x >> "className");
};
ocean orchid
#

Ah alright I'll give it a try thanks a ton!

digital wasp
#

how do i make a trigger that activates when the group (ai0_1) is in a specific vehicle?

little raptor
digital wasp
#

my_vehicle stands for variable name of the car i want to check?

#

also, < 0 means more than 0, but i want the whole group to be in a car. so it would look like that?

units ai0_1 findIf {!(_x in my_vehicle)} == units ai0_1```
little raptor
digital wasp
#

yeah, sorry

little raptor
digital wasp
#

god, im terrible at coding

little raptor
# digital wasp god, im terrible at coding

what that code does is it finds if any unit is not in the vehicle, and returns its index, which is 0 or greater if found.
if not it's less than 0
so less than 0 means all units are in the vehicle

coarse dragon
#

So that domove. Where do I apply it?

To the driver or a waypoint?

coarse dragon
#

doMove ([9496.4,22396.5] "Marker_1");

#

i is no knowie

versed leaf
#

Does anyone know how I can add quests to my Altis Life RP map made by tonic? I want to give some action over there

#

when i put armed boot on mada with their functions they appear without weapons, unequipped

south gale
#

I have set up a Blufor Present trigger in my mission and connected it to both a Set Task State and Create Task to cancel previous task and start new one.
In testing when a blufor unit enters the area nothing happens

#

Why is this?

versed leaf
#

the same is happening to me

south gale
#

That is odd

#

I have no clue how to fix it

versed leaf
#

I've been trying for weeks, I don't see an explanation for this. I imagine that in the script if we are talking about the same map made by Tonic, that there is a block in the script, I've looked everywhere but I don't think

south gale
#

You mean Cytech?

#

Dave Tronic is one of the devs

#

Really need some help with this if anyone can

quasi sedge
#
type="mil_arrow2";    colorName="ColorBlue";

What is regular expression to find every type marker classname in mission.sqm
using regex:
notepad++ or visual studio code?

Something like this? But i can't write correct syntax

type="(.|\n)+?"; \n 
colorName="(.|\n)+?"
#

if i just find

type="

there will be thousands of
non-marker type objects

south gale
#

Dmitriy, would you happen to know a script that detects changes in a turrets ammo count?

#

I am completely lost without the presence trigger working

quasi sedge
#

@south gale

vehicle player addEventHandler ["Fired",{ 
_this spawn {
if (
_this select 5 == "rhs_mag_M829A3" or 
_this select 5 == "mkk_125mm_SABOT_MAG" or 
_this select 5 == "mkk_1Rnd_KE_shells" or 
_this select 5 == "mkk_mag_bm25_2_1" or 
_this select 5 == "mkk_1Rnd_85mmHEAT_D5" or 
_this select 5 == "mkk_1Rnd_105mm_HEAT_MP_T_Green")
then { 
        private _sound = selectRandom ["wolf1", "wolf2", "wolf3"];
        playSound _sound;
        playSound _sound;
        sleep 6;  
        vehicle player addMagazineTurret ["rhs_mag_M829A3",[0]];
        vehicle player addMagazineTurret ["mkk_125mm_SABOT_MAG",[0]];
        vehicle player addMagazineTurret ["mkk_1Rnd_KE_shells",[0]];
        vehicle player addMagazineTurret ["mkk_mag_bm25_2_1",[0]];
        vehicle player addMagazineTurret ["mkk_1Rnd_85mmHEAT_D5",[0]];
        vehicle player addMagazineTurret ["mkk_1Rnd_105mm_HEAT_MP_T_Green",[0]];
        reload vehicle player;
        reload player;
  }; };}];```
#

this is example if abrams tank fired a shot, after 6 second gun will reload

#

@south gale what exactly your problem?

south gale
#

Just that the presence trigger isnt working on a single player mission I'm working on

#

Its necessary in order to finish the mission

quasi sedge