#arma3_scripting

1 messages · Page 190 of 1

warm hedge
#

And it is possible to make instakill via a script

hushed turtle
#

It's weapon from mod. There are some vanilla .50 cal weapons. I would test those first before asking BIS about a mod 🤷🏻‍♂️

lime rapids
#

some of the more common factors that could be causing this
1 ballistics ie range, body armor of target and any objects the round is passing through
2 server desinc and lag / packet loss
3 could be bad config on cups end stating that the ,50 round is slower or smaller bullet size
4 any other mods or scripts running at the same time

open marsh
#

CUP weapons is gold standard though

lime rapids
open marsh
#

as in a lot of people use it so ppl will notice if it doesnt work

warm hedge
#

And?

#

Is the question "is it realistic" still?

shrewd mauve
#

if (isNil "toolkitUses") then { toolkitUses = 0; };
{
_veh = _x;
if (damage _veh > 0) then {
_timeForRepair = 300;
_repairProgress = 0;
while {_repairProgress < 1} do {
if ("Toolkit" in items player) then {
_repairProgress = _repairProgress + (1 / _timeForRepair);
sleep 1;
hintSilent format["Repairing: %1%", ceil(_repairProgress * 100)];
if (_repairProgress >= 1) then {
_veh setDamage 0;
toolkitUses = toolkitUses + 1;
if (toolkitUses >= 3) then {
player removeItem "Toolkit";
toolkitUses = 0;
};
};
} else {
hint "You need a Toolkit to repair this vehicle.";
sleep 1;
break;
};
};
};
} forEach (nearestObjects [player, ["Car", "Tank", "Air"], 5]);

Hello someone made this little script for me i wanted to make repair longer , its possible to add 3rd pârty DLC repair kit to it ?

hushed turtle
#

With it's audiovisual quality? No way IMHO. Maybe when combined with JSRS.

Still don't understand how does this relates to scripting though

open marsh
#

thanks for pointing out the obvious

winter rose
#

cool down buckaroo, this ain't the wild west

lime rapids
#

likely mod conflict or bad config

echo nebula
#

Guys we are all just trying to help each other we can be civil right

#

Speaking of help if you dont help me i will be MAD

#

😤

#

Hey im trying to get sql from the ace github i wanna learn and dont know am i supposed to drop this in mission file or can i take the function inside and put it in eden editor for startup init?

#

Talked with someone earlier about cargo size and wanna learn how to use this repository of functions effectively and to learn to make my own so not sure how to mesh them into missions thx in advance

#

i was joking about getting mad btw

#

im here to learn

warm hedge
#

Context here

echo nebula
#

i got directed to these functions i wanna change cargo size and they suggested these i just don't know how to use them

lime rapids
#

i c

echo nebula
#

i can work my way around the functions utility its more the file exploration and how to inject this stuff into my mission im lacking in knowledge

#

or the rules that arma uses for its systems im starting to get there but struggling mostly with the different files and what goes where and how i can mess with stuff in eden vs zeus vs pbo data in config etc

lime rapids
echo nebula
#

that or set the value of a objects cargo weight yes

warm hedge
#

I actually suggested Mod approach before I understand the context. You should ignore my instruction

echo nebula
#

its a simple task or i thought so and i want to start simple and work from there my end goal is a way to functionally pay for through objects a seperate object or vehicle ie: 3 money or boxes for 1 vehicle

#

i dont know how to do any function yet so ye

warm hedge
#

It likely is just one line of code

echo nebula
#

id assume so im just very foreign to how any of this works

lime rapids
#

pretty sure if you have the 3DEN mod aswell you can just double click and scroll down and there is a box you can modify for vehicles cargo size or an objects cargo size

echo nebula
#

can you walk me through how that works for future understanding, its just calling into action the function of setting cargo size for "this" being the init directed object and the value is just that functions value change on mission startup?

echo nebula
echo nebula
#

yeah i have that mod ty

#

its quite useful

lime rapids
echo nebula
#

okay so its worked on my HEMTT but my concern is mostly that it worked on 1 single truck how could i make it work on all? is there a way to call that function to define all hemtt to have that function on mission startup?

lime rapids
echo nebula
#

but i might want to spawn a new hemtt in zeus it wont have that cargo size anymore

#

and maybe im stupid but im trying to execute the code in the new one in zeus but that isn't working as a test either

lime rapids
echo nebula
#

im trying that too i see it wants _this i have zeus enhanced is there a button i press to initiate the code or just press ok?

lime rapids
echo nebula
#

im pressing it and nothing seems to be happening

lime rapids
#

maybe need to press enter in the box

echo nebula
#

ive also now tried that on all options, global, local, target

lime rapids
#

i apologize i was mistaken use [_this, 20] call ace_cargo_fnc_setSpace this command for both

echo nebula
#

woah

#

that worked on target

#

right we were changing the value of the objects cargo size not its internal space

#

lol

lime rapids
#

yeah reeding is hard meowfacepalm

echo nebula
#

is there a way to write this stuff in the init of the mission file like call "B_Truck_01_cargo_F" ace_cargo_setSpace = 20?

#

instead of manually scripting each hemtt, im fine with it this is fantastic progress and im very grateful im learning alot i'd just like to see how far i could push this function

winter rose
#

you can, it would be grabbing all existing trucks and foreach on them

#

spawned ones would be a different thing though.

echo nebula
#

thats kinda what i mean

#

my big thing is i spawn objects in for my players mid op for them to use and our ops last multiple days before server restarts so having that consistent space in the object or the cargo size of a barrel etc being consistent would be quite helpful

#

im so happy i got this far lol been trying to figure this out for ages lmao ik its simple but im very unfamiliar with arma and its systems

winter rose
echo nebula
#

how do we typically find classname apart from the obvious, is it through the config viewer ?

hushed turtle
#

Is it possible to change cargo size in vanilla using scripting or is it some ACE witchcraft?

echo nebula
#

well i know this one, cargo size is a ace addition, there is inventory size but theres no cargo in vanilla last time i checked

#

(cargo is for boxes, crates, spare wheels for ace etc)

hushed turtle
#

So, ACE has it's own cargo for things like spare wheels If I understand correctly

echo nebula
echo nebula
winter rose
#

(iirc)

echo nebula
#

yeah that was the easy way i thought existed thank you

winter rose
#
addMissionEventHandler ["EntityCreated", {
    params ["_entity"];
    if (typeOf _entity == "B_MyClass_F") then { _entity call SWA_fnc_MyScript; };
}];
echo nebula
#

oh wow thats different to what i wrote

winter rose
#

we will never know if you don't post it :p

echo nebula
#

im trying to finish it you are too quick lol

#
addMissionEventHandler ["EntityCreated", {
    params ["_entity"];
    Class B_Truck_01_cargo_F {
    ace_cargo_setSpace = 16;
    };
}];```
echo nebula
#

XD

winter rose
echo nebula
#

i figured after reading your crazy one

#

how do we define the target of the function is that just typeOf _entity == "B_Truck_01_cargo_F"}?

#

then if we can confirm entity is that we move forward with function?

winter rose
#

this event will execute for every created entity
you have to filter by entity type as shown yes

echo nebula
#

thats extremely cool

#

could we have different set values for the entity based on the target

#

like could i streamline 4 dif vehicles with 4 dif values in this ?

winter rose
#

sure

echo nebula
#

thats rlly cool how do we seperate the dif entities do we have to call to each what allows us to direct each to their specific function?

winter rose
#

you could use e.g a switch structure, this way it will accept multiple types

echo nebula
#

interesting let me see if i can try my hand at it

#
    params ["_entity"];

    if (typeOf _entity == "B1","B2","B3",) 
    switch (_condition) do {
    case "B1" { _entity call ace_cargo_setSpace = 16;
    case "B2" { _entity call ace_cargo_setSpace = 32;
    case "B3" { _entity call ace_cargo_setSpace = 64;
}];```
#

would this be something similiar to what im looking for theoretically

#

i understand im bad at this but as i learn more its becoming infinitely more engageable

cyan thunder
#

EntityCreated is awesomely useful - I use it for all sorts of things (like the current factions we are using some of the officers are set up weird and either have pistols only or no pistol/rifle so I have a quick check that adds an appropriate rifle, I also use it to control weather a unit is blacklisted from headless by type/side etc

echo nebula
#

it seems super useful

winter rose
grand narwhal
#

Hello, I have a question about preInit.

The following code is in a preInit executed function:

    if !(isNil {respawnBlockWest}) then {
        createMarker ['respawn_west', respawnBlockWest];
    } else {
        logWarning0("No respawn position found for side WEST")
    };
};```
However when I run the code, it tiggers the logWarning macro. However, if I run the code ingame (after the preInit stage), it succeeds. 

For my basic understanding of preInit, does map objects only get initialized after the preinit stage?
echo nebula
plain bramble
#

GOD this intel is driving me insane I have no idea what I'm doing anymore and nothing's working. I don't even know how to use eventhandlers and idk how to set up the triggers properly to make it work.

#

Someone please just give me a quick and dirty solution on a silver platter I can just paste in and format for each intel item at this point

#

because I'm tired of trying to quickfire intel in Zeus editor

winter rose
# echo nebula i feel like the switch needs a way to actually force the dif _entity to call the...
addMissionEventHandler ["EntityCreated", {
    params ["_entity"];

    switch (typeOf _entity) do
    {
        case "B_Class1_F": { [_entity, 16] call ace_cargo_setSpace; };
        case "O_Class1_F": { [_entity, 32] call ace_cargo_setSpace; };
        case "I_Class1_F": { [_entity, 64] call ace_cargo_setSpace; };
    };
}];
```but don't quote me on it, check how to use `ace_cargo_setSpace`, I have no experience with this function
echo nebula
plain bramble
#

don't get me wrong everything I've learned so far is fantastic

#

I have the better half of a mission already set up at this point and it's the most immersive mission I've been involved with

#

but for the life of me I can't solve intel.

echo nebula
#

im actually rlly proud of how close i was lmao

plain bramble
#

What's crazy is,

#

for me, it's not managing the intel module and writing all that, then linking it to a trigger

#

that I can do just fine

#

it's setting up a player action that deletes the intel object, then fires the trigger.

thin fox
#

there are tutorials for intel

grand narwhal
plain bramble
#

trust me I've watched every one of them.

grand narwhal
plain bramble
echo nebula
grand narwhal
plain bramble
grand narwhal
#

okey, and at what part does it not work for you?

plain bramble
#

so I've got a document resting on a table the players need to collect. I've set up in the document, for brevity's sake I'll just refer to as "doc", with an AddAction script that deletes the document on interaction and sends a hint saying "you've collected the doc". Then, the trigger contains within it's init !alive doc so that when the document gets deleted, theoretically, it should fire, because things in arma are "dead" when they're deleted or so I've been told. However, in practice, it doesn't work.

#

I did get it to work once, but the intel I wrote in the module didn't appear in the briefing, instead having just a blank image error icon.

agile bolt
#

!alive doc `is a condition for trigger

grand narwhal
#

because addaction command attached to an object is just suicide imo. especially in mp

plain bramble
grand narwhal
#

yeah, ok. Then you're working with the object init in the editor right?

plain bramble
#

yup

agile bolt
grand narwhal
#

can you share the object init of the doc?

echo nebula
cyan thunder
plain bramble
grand narwhal
plain bramble
#

Yes

#

the testbox is the object it's deleting.

grand narwhal
plain bramble
#

It will be, yes.

echo nebula
#

wow im astounded how perfectly this works is there any consiquences of me throwing like 40 entities into a array of switches into this code and letting it go ham on every vehicle on spawn? this is absolutely f* amazing how useful this is

#

and now i can make all my crates a value of 2 weight too!!!

#

i owe you one lou!

grand narwhal
cyan thunder
echo nebula
#

how would i put a exit condition im still quite new to this

thin fox
echo nebula
#

like if else exit?

#

default stop?

cyan thunder
plain bramble
thin fox
cyan thunder
# echo nebula like if else exit?

something like if!(_foo isKindOf "LandVehicle") exitWith{}; at the top - that'll bail out if _foo isn't a LandVehicle (which is cars, tanks, APC's etc)

grand narwhal
thin fox
echo nebula
#

im genuinely excited to learn more this shit is so cool when i spend time deciphering these hieroglyphscatjam

cyan thunder
cyan thunder
#

basically this 😄

echo nebula
#

lmao always the right for me

grand narwhal
echo nebula
#

i just do network and server hosting stuff administration crap and files never touched any script or programming outside editing a few values or stealing from github

cyan thunder
# echo nebula lmao always the right for me

eh - not knowing something is never a bad thing, not choosing to learn is - you are choosing to learn - the rest comes with time/practice 🙂 - curiosity is the thing that makes a good programmer a good programmer

echo nebula
thin fox
echo nebula
#

also iskindof is a odd one im gonna need to learn

plain bramble
#

none of this stuff makes sense to me I'm just here man

cyan thunder
# echo nebula _foo is land vehicles or is it just a replacement name?

_foo is whatever object you want to check, so if you have params ["_entity"]; at the top of your EntityCreated function it'd be _entity not _foo (fyi, foo, bar, fizz and buzz - are what programmers use as "placeholders" when they don't know what the other person is calling the variable 😄 - I like to think that foobar comes from FUBAR (Fucked Up Beyond All Recognition) 😉 )

winter rose
plain bramble
#

OK IT WORKS

#

PHEWH

#

idk what was wrong last night

#

but it works now.

grand narwhal
# thin fox it doesn't make any sense

its better to have one loop with 20 actions with there own conditions (which allows even some grouping of actions, like alive player) then have 20 actions with their individual conditions which basically are 20 individual loops

plain bramble
#

now if I can slap a hint in here it'll be great. I assume...

echo nebula
#

lmao

grand narwhal
plain bramble
#

I assume if I edit my existing code from
this addAction ["prist's account", {deleteVehicle testbox}, nil, 1, true, true, "", "true", 4, false, ""];

to
this addAction ["priest's account", hint "you've collected the priest's account of what happened", {deleteVehicle testbox}, nil, 1, true, true, "", "true", 4, false, ""];

it'll work properly.

#

or does it need to be in the squggly brackets

echo nebula
plain bramble
#

oh thank you god my hypothesis was correct

#

now I can go back to making le scary mission

echo nebula
#

how extensive would it be to theoretically make the player input x objects to recieve x objects how would i go about that i can think of some basic ways like have a factory the player has to load cargo into until x then idk how i would check and spawn a vehicle but thats where im at on my next big project.

plain bramble
#

thanks everybody.

cyan thunder
plain bramble
echo nebula
winter rose
#

stop making working scripts, this is not the place!

thin fox
plain bramble
agile bolt
#

how that's working is beyond anyone's mind 😂

thin fox
#

lmao

cyan thunder
plain bramble
grand narwhal
plain bramble
#

I walk up to the box, hit spacebar, it disappears. The game says they've collected the intel, and intel has appeared in the mapscreen.

thin fox
#

wrong parameters order

grand narwhal
winter rose
cyan thunder
# echo nebula oh amazing ty

arma's config system is pretty neat but generlaly you'll find yourself using typeOf and isKindOf a lot in your code 🙂 first tells you what something is and second returns true/false if it's kindOf

plain bramble
#

sometimes, professor, the most effective thing to destroy the enemy's plans isn't in-fact to send soldiers in, but to instead send in a flock of hens, whom of which have no idea or preconception of how severe the situation is that they are in.

cyan thunder
#

so you can do stuff like "is this unit a man (CAManBase not Man) and alive and on the enemy side and carrying a UAV terminal or whatever

agile bolt
#

@plain bramble this should be the correct one, you passed deleteVehicle testbox as an argument and it somehow works lol
this addAction ["priest's account", { hint "you've collected the priest's account of what happened"; deleteVehicle testbox; }, nil, 1, true, true, "", "true", 4, false, ""];

grand narwhal
plain bramble
#

I uh, hah,

#

put a comma between the arguments

agile bolt
#

thing is, you passed deleteVehicle testbox as an argument which you can acess with _this select 3 within addaction scope

winter rose
#

deleteVehicle

cyan thunder
# echo nebula oh amazing ty

also, use vscode (https://code.visualstudio.com/) and https://marketplace.visualstudio.com/items?itemName=Ezcoo.sqflint-revisited - it'll remove a lot of pain (first is a decent editor, second is a plugin for it that helps spot errors, typos in your code - stuff like the dreaded trailing , in arrays and the like

Visual Studio Code redefines AI-powered coding with GitHub Copilot for building and debugging modern web and cloud applications. Visual Studio Code is free and available on your favorite platform - Linux, macOS, and Windows.

plain bramble
#

I have no idea how it's happened, but now I'm gonna save this as a custom composition so I can just paste it in for other stuff I want the players to find in this endless breadcrump fetchquest of a horror op

#

I bet I could link this to a hide module on a marker that is named "exclusion zone" so the players don't know where the bad places are until it's too late

echo nebula
agile bolt
cyan thunder
# echo nebula oh this looks similiar to obsidian lol

it's "just" a code editor - it's a pretty popular one and widely used - has a bunch of plugins for making arma development more pleasant (it's not the one I use at work (neovim or intellij ftw :D) but for arma it's great)

echo nebula
#

oh man this is a tad overwhelming

cyan thunder
pallid palm
#

yes it was for me (too) but now i know (Lou) (Woohoo) to You lol

echo nebula
#

i got the sql plugin how do i make it all work

hushed turtle
echo nebula
#

and is there immediate changes i should make for ease of access?

cyan thunder
pallid palm
#

lol

cyan thunder
#

tangentially related, "Seventh Son of a Seventh Son" is one of the best metal albums ever created - perfect arma background music

hushed turtle
#

How I could not notice 🎸

echo nebula
#

how do i use these plugins

cyan thunder
hushed turtle
#

Install them and start coding?

echo nebula
#

what do they do im trying to figure that part out i guess

cyan thunder
# echo nebula what do they do im trying to figure that part out i guess

they add functionality to vscode - specifically in this case they add a linter (a background task that watches what you type and makes sure it looks valid) - basically it'll give you a heads up if your code is syntactically invalid, for example (I deliberately removed a ; and it warned me on the next line that it was missing)

echo nebula
#

i dont have all that colour in mine

cyan thunder
#

in that case, not only did it flag the error but it suggested what it might be

cyan thunder
echo nebula
#

i think i gotta use their theme then too

cyan thunder
#

it's called SQF Language in the extensions

echo nebula
#

and i want the file to be under sqf?

#

i changed it now i got quite a array of colours and i think the arma stuff is working now too?

hushed turtle
echo nebula
#

it doesn't show extension i installed it but when i have to choose a language it kinda just works?

#

like i typed and it came up with BIS

hushed turtle
#

What a taste for colors 😆

cyan thunder
# echo nebula and i want the file to be under sqf?

yeah, if the extension is whatever.sqf then vscode will recognise it as an SQF file automatically - for SQFLint you may need to install Java and then go into settings and set the path to the java binary - java is here - https://www.oracle.com/java/technologies/downloads/ ( you want this one probably https://download.oracle.com/java/24/latest/jdk-24_windows-x64_bin.exe) if you install it in the default location then the apth you want to put in "Java Path" is C:\Program Files\Java\jdk-24\bin\java.exe - that's basically all you have to do to get it linting properly 🙂

echo nebula
#

thanks i got java already ill direct it

#

java sucks to setup when your doing any complicated minecraft hosting i got like 12 versions XD

cyan thunder
#

Java sucks generally but the JVM is an engineering masterpiece

#

(note: not saying Java is a bad language - it's clearly not and half the world runs on it just not a language I enjoyed programming in at all)

echo nebula
#

i dont know the code i just know its hell for compatability

#

could i make a theoretical vehcile spawner in arma?

#

like interact with object = vehicle spawns

#

youd need to have a location for the vic to spawn and then my concern would be i want them to pay to spawn it, is there a check in game for a radius? like could i check for "block" in radius "5 meters" else no car?

grand narwhal
echo nebula
#

where could i find functions that could help in this endevour i want to make factories that my players can build and input resources into to get vehicles of their choice

grand narwhal
echo nebula
#

it might be a big step from changing 1 value idk if theres a middle ground option but its kinda my big crux atm spawning vics for my players is really rough on gameplay loop

cyan thunder
echo nebula
#

i want the logistics portion of the game to be as seemless as possible

#

yeah aye

#

its a nightmare

cyan thunder
#

also that T-34 plays Sabaton when players get in it - because why not and it amused me 😄

echo nebula
#

lmao

cyan thunder
#

(not as much as when I made every vehicle blast barbie girl for an op)

echo nebula
#

can i change a function call per case in a switch script?

#

like cargo fnc setspace for case a but setsize for case b

echo nebula
#

would there be any issues

#

hmm

#

that makes me want to make the largest entity created script ever

cyan thunder
#

switch/case is a common pattern for handling dispatch based on a condition that can be one of many

#

you can also use it for stuff like this sqf switch true do { case (_bearing >= 337.5 || _bearing < 22.5): {"N"}; case (_bearing >= 22.5 && _bearing < 67.5): {"NE"}; case (_bearing >= 67.5 && _bearing < 112.5): {"E"}; case (_bearing >= 112.5 && _bearing < 157.5): {"SE"}; case (_bearing >= 157.5 && _bearing < 202.5): {"S"}; case (_bearing >= 202.5 && _bearing < 247.5): {"SW"}; case (_bearing >= 247.5 && _bearing < 292.5): {"W"}; case (_bearing >= 292.5 && _bearing < 337.5): {"NW"}; }; since you can switch on a boolean 🙂

echo nebula
#

LMAO

#

thats so useful i worry its going to be inefficient or a poor way to script this stuff like if theres a cleaner method id like to do it

#

thats why i wanted to do switch rather then a standard else function

cyan thunder
#

switch isn't "expensive", it's essentially just a short hand to avoid a massive nasty block of ifelse

echo nebula
#

awesome ty

#

ive done 8 of these big arma events and its getting tiresome to do everything so having a way to make players load up crates sized 2 cargo on my hemtt and having dif objects be able to be loaded is gonna be so huge

#

is there a way to use a object position in reference to another object rather than the map?

cyan thunder
#

what they are "allowed" to spawn is then controlled by config via Description.ext because I'm lazy and we change maps/enemy factions fairly often

echo nebula
#

right

cyan thunder
#

^ uses ace, so it adds a new item to the ACE UI called "Ragner" (our unit) and then everything sits behind that for vehicle spawning

echo nebula
#

its getting late i might read that one tomorrow when i got more brain power, ive been working on this for hours

#

but ty!

thin fox
# echo nebula could i make a theoretical vehcile spawner in arma?

In this video i will be showing you how to install, setup, and configure the
VVS - Virtual Vehicle Spawner Script. The script will allow you to spawn various
types of vehicles from any vanilla or mod faction, from cars, armored,
helicopters, planes, drones, boats, and support vehicles.

DOWNLOAD the script
https://drive.google.com/file/d/1IHAa...

▶ Play video
cyan thunder
cyan thunder
#

forgot I did that 😄

echo nebula
#

man i feel like ive just unlocked a new way to play this game

#

my players are gonna be so happy with this lol

echo nebula
cyan thunder
echo nebula
#

also technically my event handler has things outside landvehicle now so i guess it should prob not be used

cyan thunder
echo nebula
#

i was just gonna do a big switch of all the objects cargo i wanted to change

cyan thunder
thin fox
agile bolt
#

right, in two separate scripts, top one is working, bottom trigger isn't firing for some reason. both are spawned through script using BIS_fnc_spawnGroup, both groups are using arrays with classnames to spawn in

_players = playableUnits;
_target = selectRandom _players;

enemyVehGroup = [getMarkerPos "spawnEnemyPos", independent, [vehUnits]] call BIS_fnc_spawnGroup;
targetVeh = leader enemyVehGroup;

private _wp = enemyVehGroup addWaypoint[_target, 1];

[true, "taskDestroy", ["", "Destroy the leading vehicle"], targetVeh, "ASSIGNED", 2, true] call BIS_fnc_taskCreate;

_taskDestroyTrg = createTrigger ["EmptyDetector", [0,0,0]];
_taskDestroyTrg setTriggerStatements ["!alive targetVeh", "[""taskDestroy"",""SUCCEEDED""] call BIS_fnc_taskSetState;", ""];
_greenforGroup = [getPosATL player, east, [infUnits]] call BIS_fnc_spawnGroup;
_targetTL = leader scientistGroupTemp;
_killTarget = [_targetTL, true];

[true, "taskEliminate", ["", "Eliminate the target"], _killTarget, "ASSIGNED", 2, true] call BIS_fnc_taskCreate;
_eliminateTrg = createTrigger ["EmptyDetector", [0,0,0]];
_eliminateTrg setTriggerStatements ["!alive _targetTL", "[""taskEliminate"",""SUCCEEDED""] call BIS_fnc_taskSetState;", ""];
cyan thunder
agile bolt
thin fox
cyan thunder
thin fox
#

it's my "home" game

cyan thunder
hushed turtle
cyan thunder
#

considering it's age and origin, it really is a fantastic sandbox/thing

hushed turtle
cyan thunder
#

a full time job is ~2000 hours a year, so he basically did the equivalent of a full time arma job for 6 years

echo nebula
#

when writing in my init i have to get rid of my // stuff is there any way to make this more seamless?

#

i like writing notes for anyone reading cause i might have other zeus looking over this and teaching them

digital hollow
cyan thunder
thin fox
#

did you remember that we've talked about the moduleCas_F days ago?

echo nebula
#

omg i got my huron containers to work they actually load and unload omfg

thin fox
echo nebula
#

this is just such a game changer for me

digital hollow
scarlet igloo
#

hey guys, is there any way i can check if a player has changed backpacks? im trying to do a rally point system that checks whether or not a player has an LR backpack and im trying to make it more dynamic

echo nebula
#

alrigth well i got a absolute absurd amount done today ill come back tomorrow to possibly work on the factory system ty all for the help ive gone from not having the faintest idea of how to do this to being able to add functions and different ones to any object! tyvm love2

cyan thunder
echo nebula
echo nebula
#

i have certain equipment i want them using or have access to but every restart id have to add new editions they unlock manually and such

cyan thunder
echo nebula
#

always

cyan thunder
#

create an arsenal off the map somewhere, set it up how you want it then you can use ```sqf
// get the virtual items in the arsenal, we only want the keys (as it is [["foo", any]]) - i.e. conventional hashmap)
_validItems = keys (primaryArsenal call ace_arsenal_fnc_getVirtualItems);

_arsenalObjectClass = "AmmoCrates_NoInteractive_Medium";
{
[_x, _validItems, true] call ACE_arsenal_fnc_initBox;
} forEach (allMissionObjects _arsenalObjectClass select { _x getVariable ["isSecondaryArsenal", false] == true});

TL_arsenalsTransfered = true;```

echo nebula
#

but the thing is i want to force only certain ppl to have access to certain gear and make any gear they get access to perma during the reset and after

echo nebula
#

ill have to read that tomorrow i gotta sleep

#

but ty goodluck yall

cyan thunder
echo nebula
#

oh thats smart

cyan thunder
quick sky
#

Does anyone understand why AI simply become "static"? By that i don't mean pathing, but AI dont raise their gun when you come close, yet they still shoot without an animation.

Here's my code: https://pastebin.pl/view/6a90883d
It won't let me send the code in discord for some reason.

verbal acorn
#

I’m sorry if this is the wrong chat. But I’m running a small Arma 3 group, trying to step up my mission creation. And I’m in need of help with triggers and other things. Can anybody help? Or direct me to the correct channel to ask in?

verbal acorn
#

It’s an SCP group, so I’m trying to figure out how to systematically teleport one player away, kill them so my team sees the death message, and then play a scream for the rest of the group.

quick sky
#

Make a trigger and set activation to ANYBODY/ANY PLAYER and Repeatable unchecked and put the condition as this && isServer. In On Activation, paste:

private _victim = thisList select 0;

// teleport them to whatever coordinates
_victim setPosATL [1000, 1000, 0];

// kill them after 1 second
[_victim] spawn {
    sleep 1;
    _this#0 setDamage 1;
};

// death message
["SYSTEM", format ["%1 has died under mysterious circumstances...", name _victim]] remoteExec ["hint", 0];

// scream sound
[_victim, "scream"] remoteExec ["say3D", 0];

Make a description.ext in your mission folder and put this code in:

class CfgSounds {
    sounds[] = {scream};
    class scream {
        name = "scream";
        sound[] = {"sounds\scream.ogg", 1, 1};
        titles[] = {};
    };
};

Find a scream noise, convert it to a .ogg if it's not already and put it in \sounds.

verbal acorn
#

Okay. I have no idea how to do the sound part of it but the teleport and kill worked perfectly. Thank you.

quick sky
#

This is an example you could use.

#

Just name it whatever you pathed here;
sound[] = {"sounds\scream.ogg", 1, 1}; and you'll be fine.

#

It also has to be in the sounds\ folder if that's where you pathed it to.

#

The first number is the volume, with 1 being full volume. The second 1 is the pitch/speed of the sound.

winter rose
#

do you want the scream to originate from the vanishment point, perhaps?

verbal acorn
#

My thought process is teleport, death message, sound plays for those who where not teleported.

quick sky
#

^^, in that case, add a

private _victim = thisList select 0;
private _vanishPos = getPosATL _victim;

and then

[_vanishPos] remoteExec [{
    params ["_pos"];
    private _sfx = "Land_HelipadEmpty_F" createVehicleLocal _pos;
    _sfx say3D "scream";
    sleep 3;
    deleteVehicle _sfx;
}, 0];  // 0 = all clients

If i'm correct.

quick sky
tulip ridge
verbal acorn
#

I should have specified. The mod I’m using has zeus modules to play sounds. Can I do something to set one of those to play?

quick sky
#

Zeus Immersion Sounds?

verbal acorn
#

Drongos spooks and anomalies.

winter rose
quick sky
winter rose
#

most likely not.

#

_hostage disableAI "MOVE"; is what makes a unit not move, that's about it

quick sky
#

But that shouldn't stop their shooting animation tho. I'll go ingame real quick to take a clip of what's happening exactly.

winter rose
#
_enemy disableAI "MOVE";
_enemy disableAI "PATH";
#

that's enemy's disableAI

quick sky
#

What's the difference between MOVE and PATH?

#

Is there documentation on this anywhere?

#

Would try and look but the BI Forums have been down for a while.

winter rose
quick sky
#

It explains the disableAI feature but not necessarily the parameters as far as i can see.

#

I'll for sure mess around with it, i'm gonna assume that disabling pathing would be more then enough.

#

Unsure of why MOVE was added in there. I'm gonna assume its rotation or so.

quick sky
#

😭

buoyant cairn
#

Even after changing the variables the ''One hit kill'' script still doesn't have an effect on already spawned AI units

[] spawn {
while {true} do {
{
_x setVariable ["HAF_spawned",true];
_x addEventHandler ["HandleDamage", { [_this#2, 1] select (_this#6 == player) }];
} forEach (allUnits -allPlayers select {isNil {_x getVariable "HAF_spawned"} && side _x == EAST && !isPlayer _x});
uiSleep 2;
};
};

cosmic lichen
#

Use entity created event handler instead of a loop

buoyant cairn
#

hm, that's a good idea, gonna give it a try

#

thanks bro

quick sky
#

Is there a function that allows you to change the amount of armor an AI has?

#

Me commenting out _enemy disableAI "MOVE"; gave the AI 1000% extra armor or something.

#
        // SECTION 9.2: ENEMY PLACEMENT
        private _mustSpawn = count _units < _unitsMin;
        private _shouldSpawn = (random 1 < _enemyChance);

        if (_unitCommon &&
        count _units < _unitsMax &&
        (_mustSpawn || _shouldSpawn)) then {
            // Create enemy group and unit
            private _group = createGroup _enemySide;
            _group deleteGroupWhenEmpty true;
            private _enemy = _group createUnit [
                selectRandom _enemyTypes,
                getPos _helper,
                [], 1, "CAN_COLLIDE"
            ];
            _enemy attachTo [_helper, [0, 0, 0]];
            detach _enemy;

                // set position and stance
            _enemy setFormDir (_helper getDir _furthest);
            _enemy setDir (_helper getDir _furthest);
            _enemy setUnitPos (selectRandom ["UP", "MIDDLE"]);

                // Disable AI movement
            //_enemy disableAI "MOVE";
            _enemy disableAI "PATH";

                // Add to units array
            _units pushBack _enemy;
            sleep _sleep;
#

Part of the script.

buoyant cairn
# cosmic lichen Use entity created event handler instead of a loop

something like this?

["CAManBase", "init", {
params ["_unit"];

if (
    side _unit == EAST && 
    !isPlayer _unit && 
    isNil {_unit getVariable "HAF_spawned"}
) then {
    // Mark unit as processed
    _unit setVariable ["HAF_spawned", true];
    
    _unit addEventHandler ["HandleDamage", {
        [_this#2, 1] select (_this#6 == player)
    }];
};

}] call CBA_fnc_addClassEventHandler;

wicked roostBOT
#
How to use SQF syntax highlighting in Discord

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

// your code here
hint "good!";
buoyant cairn
# cosmic lichen !code
["CAManBase", "init", {
    params ["_unit"];

    if (
        side _unit == EAST && 
        !isPlayer _unit && 
        isNil {_unit getVariable "HAF_spawned"}
    ) then {
        // Mark unit as processed
        _unit setVariable ["HAF_spawned", true];

        _unit addEventHandler ["HandleDamage", {
            [_this#2, 1] select (_this#6 == player)
        }];
    };
}] call CBA_fnc_addClassEventHandler;
```sqf
cyan thunder
stable dune
buoyant cairn
#
if (isNil "HAF_entityHandlerAdded") then {
    HAF_entityHandlerAdded = true;
    
    addMissionEventHandler ["EntityCreated", {
        params ["_entity"];
        
        if (
            _entity isKindOf "CAManBase" &&          // Only human units
            side group _entity == EAST &&             // More reliable group side check
            !isPlayer _entity &&                      // Exclude players
            isNil {_entity getVariable "HAF_spawned"} // Not already processed
        ) then {
            _entity setVariable ["HAF_spawned", true];
            
            _entity addEventHandler ["HandleDamage", {
                params ["_unit", "_selection", "_damage", "_source", "_projectile", "_hitIndex", "_instigator"];
                
                // Check if instigator is a player (works in MP)
                private _isPlayerDamage = !isNull _instigator && {isPlayer _instigator};
                
                // Return full damage if from player, original damage otherwise
                [_damage, 1] select _isPlayerDamage
            }];
        };
    }];
};```
fair drum
buoyant cairn
granite sky
#

Looks plausible as long as you don't have other HandleDamage event handlers (eg ACE).

buoyant cairn
#

Gonna test right now

granite sky
#

I don't think addMissionEventHandler ever fails. I don't know where the -1 return value idea comes from.

buoyant cairn
#

No errors, but no effect, ACE is conflicting, but it already gave me a positive return for not popping up an error

#

I will probably try to add a ACE compatibility to it

#

Unless i mess everything up and give up lol

tulip ridge
#

Why bother with HandleDamage if ypu're just killing them outright anyway?
Just use a Hit EH or something and kill them there

buoyant cairn
tulip ridge
#

You would check it the exact same way

buoyant cairn
#

I might just give it a shot, as long as ACE and CBA don't conflict with it and mess everything up like it did a few months ago

buoyant cairn
#

insteresting approach

#

im gonna work on it tomorrow when i get home

tulip ridge
#

No, you'd have to add it to every unit
Unless you're fine with a CBA dependency

buoyant cairn
#

already have it anyways

tulip ridge
#

Then just check whatever conditions you want in the EH

buoyant cairn
#

Cool, will just check for player only and fresh spawns and already spawned ones

#

Nice, thanks for the help bro

tulip ridge
#

That is the EH, you wouldn't need to add a new one

#
["CAManBase", "HitPart", {
    private _firstHit = _this select 0;
    private _instigator = _firstHit select 11;
    if (isPlayer _instigator) then {
        (_firstHit select 0) setDamage 1; // Kill unit
    };
}] call CBA_fnc_addClassEventHandler;
buoyant cairn
#

do i have to update de config.cpp and mod.cpp?

tulip ridge
#

You'd need to add cba_main to your requiredAddons if its not already

buoyant cairn
#

Done it a few seconds ago lol

#

I have a side question

#

Does CBA usually overwrite all of the ACE's EventHandlers?

glad ore
#

hello guys, my friendgroup and i play regular pvp missions on our server. To balance it a bit i would like to restrict the arsenal and take out some weapons from the mission and make them not playable. For example G6 Lynx or TITAN launcher. how do i do this?

buoyant cairn
#

Or "mechanics" to be less specific

buoyant cairn
buoyant cairn
glad ore
#

we dont use zeus. isnt it possible to do via init sqf or smth

#

smth like this:

// banWeapons.sqf
private _bannedWeapons = [
"arifle_Katiba_F",
"srifle_DMR_01_F"
];

while {true} do {
{
private _playerWeapons = weapons _x;
{
if (_x in _bannedWeapons) then {
_x removeWeapon _x;
_x setVariable ["warned", true, true];
_x globalChat "Diese Waffe ist verboten!";
};
} forEach _playerWeapons;
} forEach allPlayers;
sleep 5;
};

buoyant cairn
#

!code

wicked roostBOT
#
How to use SQF syntax highlighting in Discord

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

// your code here
hint "good!";
buoyant cairn
#

Use this to share your code here

glad ore
#

oh okay

buoyant cairn
#

Makes it easier to read

#

Also, i don't usually mess with the Arsenal and weapons in the game, so i guess the others here can help you a lot more than i can

fair drum
glad ore
#

where do i limit this?

tulip ridge
buoyant cairn
tulip ridge
#

Well CBA doesn't modify damage handling at all

#

That's not the point of CBA

buoyant cairn
#

Then why do we have to use it to call the EH?

#

im just curious, that's all lol

tulip ridge
#

In that example, it just saves you the effort of manually adding the event handler to all units

buoyant cairn
#

Very nice

#

Thanks for the help and the explanation

tulip ridge
#

Never used it, sounds like what you're looking for though

glad ore
#

already tried this its not working

buoyant cairn
proven charm
#

did you write the script yourself?

#

the HandleDamage needs to be run where the entity is local so you should cover that

tulip ridge
#

That's not using HandleDamage, and HitPart should run local to shooter iirc

tulip ridge
#

Are you loading it from a mod that only you're using?

proven charm
#

oh i was looking at the code posted above

buoyant cairn
tulip ridge
#

Then yeah it should be fine

#

If you want, you could also check the _instigator's steam id and checks if it matches yours

buoyant cairn
#

Will do, thanks so much bro

buoyant cairn
proven charm
#

chatGPT?

buoyant cairn
#

But now the script is all Dart’s

buoyant cairn
#

Im using deepseek

proven charm
#

i wouldnt now, cause i dont use those 😉

#

ok

buoyant cairn
proven charm
#

have to say im bit impressed that AI created that code. not saying its perfect

buoyant cairn
#

But it’s a good helper

buoyant cairn
#

Lot’s of corrections there

#

The Ai creates some nonsense, just like any other

#

Deepseek it’s just easier to work with because it’s not so much gibberish unlike gpt for example

#

I do recommend using it only to help, not to create the whole thing

#

And yet, me with deepseek still got completely destroyed by Dart lol

proven charm
#

it usually shows if people come here with chatGPT code 🙂

#

it just dont work

buoyant cairn
#

I tried using a fully made one

granite sky
#

Well, that didn't work, because he was trying to use it with ACE :P

buoyant cairn
#

I tried gpt and the one it made crashed my game, then when it said “oh i updated it” it ended up giving me a permanent error on screen and zero damage to any enemy

#

Anyways, time for me to go to work, have a good one yall

granite sky
#

I've seen some pretty plausible SQF code from AIs recently, so I guess they've been grinding through the git repos.

#

In the end you've got to understand the platform though. The code isn't the hard part with SQF.

proven charm
#

yeah like locality

pallid palm
#

my Chat GPT is the guys that i know, in Discord, i would never trust any code unless it came from the guys in here

#

or myself if its easy enough

grand narwhal
digital hollow
#

You could try it in postInit too

empty gulch
#

Dynamic Airport Configuration need a little help have all the inputs for the air port

#

class AirportBase : NonStrategic
{
simulation = "airport";

ilsPosition[] = { 52861.855, 77991.344 };
ilsDirection[] = { 53606.29, 0.08, 77826.59 };
ilsTaxiIn[] = { 53616.027, 77795, 53481.39, 77780.69, 53140.055, 77859.125 };
ilsTaxiOff[] = { 53074.191, 77872.25, 52990.79, 77892.19, 52917.27, 77910.7, 52824.09, 77972.95, 52813.656, 78002.45 };

};

brittle badge
empty gulch
brittle badge
#

it works

#

autopilot for blackwasb can land than

empty gulch
brittle badge
#

jep.

#

only jets/planes ho can land automatic on carrier can land there. but u can make a script that everyplane can land there

#

so i think

echo nebula
#

oh i think i get it, your just making a arsenal that dupes itself to other objects of same class ie "Ammocrates_nointeractive_medium"

#

oh interesting im curious how it updates is it just checking every single time a interaction happens with it?

echo nebula
#

alright a tad bit confused on how to use this code

echo nebula
#

is there anyone around who could help me understand how this code works and what i should do with it

sharp arch
#

How do I script a unit to be designated by a laser so it can be targeted by data link/IR homing weapons?

hallow mortar
#

Laser targets are objects and you can create them and attach them to things

#

Unfortunately I can't remember the classnames off the top of my head, but there are a few different ones for different sides; you'll need to get one that's targetable by the desired side

#

Once attached, you can either leave it alone (for LOS detection only) or broadcast it to the datalink (reportRemoteTarget, and confirmSensorTarget)

thin fox
#

"LaserTargetW" for blufor "LaserTargetE" for opfor

hallow mortar
#

Should also mention that IR guidance and laser guidance are not the same thing. Some IR-guided weapons also have laser guidance, but it's not guaranteed. You need to make sure the specific weapon has the correct type of seeker.

grand narwhal
split ruin
#

I need to make dedi proof little script which adds players individual rating to "overall rating" variable

_scorehandle = 0 spawn 
    { 
        missionNamespace setVariable ["kib_score", 1000, true];
        while {true} do 
        {
            sleep 10;
            private _oldScore = missionNamespace getVariable "kib_score";
            private _playerScore = rating player;
            private _sideScore = _playerScore + _oldScore;
            if (_sideScore >= 900000) then {_sideScore = 900000};  
            missionNamespace setVariable ["kib_score", _sideScore, true];
            player addRating (0 - rating player);   
        };
    
    };
split ruin
#

@cosmic lichen nice, didn't know it existed 👍

cosmic lichen
#

Whenever you need to use spawn + while + sleep , check to see if there isn't an event handler that could do that.

winter rose
#

sudden memory of "can I have a distance EH?"

cosmic lichen
#

DistanceChanged?notlikemeow

winter rose
#

yes someone did not want to loop to check if entity 1 and 2 were close

cosmic lichen
#

I hope you suggested him to use AnimChanged event handler for that ?meowsweats

winter rose
#

yeaaah, of cooourse

#

"TimeChanged", { params ["_timeSlice"]; 😄

pallid palm
#

hello: what do i put inplace of the "man" to cover all (Ai and Players)

_unit isKindOf "man"
warm hedge
#

"CAManBase"

pallid palm
#

@warm hedge oh cool thx man Awsome

sharp arch
winter rose
sharp arch
#

Thanks

split scarab
#

Is there any way to freeze an object without enableSimulationor simple object? It's a light I want to attach to the roof and it doesn't flash if it's a simple object or enableSimulation = false

split ruin
#

@split scarab what object?

split scarab
hallow mortar
#

Just attach it to something

#

Doesn't have to be attached to the roof, it can just be some proxy object that's not going to move. attachTo is pure magic, there doesn't have to be any proximity.

split ruin
#

why you want to freeze it? performance gain is almost zero

split scarab
#

It doesn't stay on the ceiling that's why I wanted to freeze it in place

split scarab
hallow mortar
#

Depends what you mean.
If you rotate the object after attaching, the light will move with it, no matter what.
If you do a plain attachTo, the light will orient itself to match the object's orientation upon attaching. Use setDir, setVectorDir etc after attaching to adjust its relative orientation.
If you use BIS_fnc_attachToRelative, the light's relative orientation before attaching will be preserved.

split scarab
floral cloud
#

Is there a way to remove specific weapons from the Virtual Arsenal?

granite sky
#

The vanilla one or the ACE one?

floral cloud
#

vanilla

granite sky
#

I don't think there's a blacklist option. You can either list everything or list specified items.

floral cloud
#

Not even via script?

haughty timber
#

Hi, I'm trying to run a script where every unit that gets spawned except the player gets money (I'm using GradMoneyMenu), but it's currently not working correctly. This is my code atm:

    params ["_entity"];
    if (!!isPlayer _entity) then
    {
        private _randomMoney = floor random [5, 100, 500];
        [_entity, _randomMoney] call grad_moneymenu_fnc_setFunds;
    };
}];```

Can anyone help? Thanks
#

I feel like this code is very wrong, but I can't put my finger on where

quaint oyster
#

I used grad money in the past and I didn't even know it had the call functions for adding cash lol.

haughty timber
#

I'm using GradMoneyMenu because specifically with this script in mind, I can have my players loot enemy AI corpses for cash

quaint oyster
#

Setvariable is the core of the call function, just save time and use setvariable. You also have !! In the if statement which probably isn't gonna work out.

haughty timber
#

How do I find units that aren't players?

quaint oyster
#

Should work how you have it off the top of my head just remove a ! In the if statement, it only requires one

haughty timber
#

Is ! the same as not?

quaint oyster
#

It is but !! Won't work as far as I know

haughty timber
#

I did not isPlayer _entity earlier and it didn't work, it counted players as the units still and reset the amount of money every time we died

quaint oyster
#

Try it as !(isplayer _entity) See if it works that way, I can't see much else unless the call function doesn't work that way.

hallow mortar
#

isPlayer may indeed not be true at the moment the new unit is created, before the player's control is transferred into the new body

lime rapids
#

also note two !

hallow mortar
#

Also, this EH is going to fire for every single entity that ever gets created, which includes all sorts of shit, not just units. You are going to be adding funds to, like, grenades.

hallow mortar
hallow mortar
haughty timber
#

Is there a better way to code this?

quaint oyster
#

If it was me, I would try a killed event handler adding the cash on death via a

_unit setvariable ["grad_bank_var_idk_it_lol",(50 + random 1000), true];

Something like that.

#

That's how I handled it on mine for several years I just don't remember the variables.

quick sky
haughty timber
#

For the mission I'm making, I'm also allowing my players to rob living civilians (we're doing a "bad guy" mission)

#

Every unit except INDFOR

#

Because we're fighting both BLUFOR and OPFOR

haughty timber
#

ACE

#

The "rob living civilians" system is pretty simple, GRAD Civs allows you to make civs surrender if you aim at them, while GRAD Money Menu lets you take their money while they're surrendered

#

The only issue right now is actually giving units that spawn money

#

I was using
if (not isPlayer _entity) then
But it didn't work as intended; every unit gets a randomized amount of money when they spawn yes, but that includes resetting the amount of money the players have every time we respawn

quick sky
#

initServer.sqf

{
    if (alive _x && side _x != independent) then {
        _x setVariable ["grad_bank_cash", 50 + random 1000, true];
        _x addEventHandler ["Killed", {
            params ["_unit", "_killer"];

            if (!isNull _killer && _killer != _unit && isPlayer _killer && side (group _killer) != independent) then {
                private _cash = _unit getVariable ["grad_bank_cash", 0];
                private _current = _killer getVariable ["grad_bank_cash", 0];
                _killer setVariable ["grad_bank_cash", _current + _cash, true];

                if (local _killer) then {
                    systemChat format ["Message", round _cash, name _unit];
                };
            };
        }];

         // ace interaction
        if (side _x isEqualTo civilian) then {
            private _civ = _x;

            [_civ, 0, ["ACE_MainActions"], [
                "Rob Civilian",
                "Take their money",
                "",
                {
                    params ["_target", "_caller", "_actionId", "_arguments"];
                    private _cash = _target getVariable ["grad_bank_cash", 0];
                    if (_cash <= 0) exitWith {
                        if (local _caller) then { systemChat "This civilian has nothing left."; };
                    };

                    private _callerCash = _caller getVariable ["grad_bank_cash", 0];
                    _caller setVariable ["grad_bank_cash", _callerCash + _cash, true];
                    _target setVariable ["grad_bank_cash", 0, true];

                    if (local _caller) then {
                        systemChat format ["Message", round _cash, name _target];
                    };
                },
                { true },
                {},
                []
            ]] call ace_interact_menu_fnc_addActionToObject;
        };
    };
} forEach allUnits;
#

Could try this. I'm not the best with ACE interactions, but you could use the documentation to make that work specifically if it doesn't.

haughty timber
#

Most of that is actually unnecessary, since the GRADMoneyMenu and GRADCivs module already work in tandem pretty dang well

quick sky
#

Unsure. Never worked with GRAD, just used parameters that are in the docs.

haughty timber
#

if (alive _x && side _x != independent) then {
_x setVariable ["grad_bank_cash", 50 + random 1000, true];
} forEach allUnits;

#

Haven't tried this yet

quick sky
#

Could try it this way?:

{
    if (alive _x && side _x != independent) then {
        _x addEventHandler ["Killed", {
            params ["_unit", "_killer"];

            if (!isNull _killer && _killer != _unit && isPlayer _killer && side (group _killer) != independent) then {
                private _reward = 100 + random 500;
                [_killer, _reward] call grad_lbm_fnc_addFunds;

                if (local _killer) then {
                    systemChat format ["Message", round _reward, name _unit];
                };
            };
        }];
    };
} forEach allUnits;
#

Again, unsure, as i don't know how GRAD works.

haughty timber
#

Should I ask in their server instead?

trim solstice
earnest token
#

I’m creating a Vietnam scenario and for helicopters taking off, I want to delay a couple so they take off one by one. How can I do this?

#

I’m no too experienced with scripting so I would appreciate if u tell me where ur gonna need me to place the scripts

fair drum
quick sky
# earnest token I’m creating a Vietnam scenario and for helicopters taking off, I want to delay ...

You’ll use a small line of code in the helicopter’s Init field to delay its movement.

1. Place each helicopter with a pilot in Eden Editor
Place the helicopter (with pilot) and name the helicopter something like heli1 and paste this into the helicopter’s init field:

this spawn {
    params ["_heli"];
    private _padBase = padBase;
    private _padDest = padDest;

    while {true} do {
        // fly to destination
        _heli doMove position _padDest;
        waitUntil { (_heli distance _padDest < 30) || !canMove _heli };

        // land at destination
        _heli land "LAND";
        waitUntil { isTouchingGround _heli || !canMove _heli };
        sleep 40;

        // fly back to base
        _heli doMove position _padBase;
        waitUntil { (_heli distance _padBase < 30) || !canMove _heli };

        // land at base
        _heli land "LAND";
        waitUntil { isTouchingGround _heli || !canMove _heli };
        sleep 40;
    };
};

2. Place two invisible helipads
Place two invisible helipads from the "Objects (Helpers)" category. One at the base: name it padBase and one at the destination: name it padDest for example.

Repeat the same thing again if you're wanting to do it for multiple helicopters.

#

The while {true} do { makes it so that it's a infinite loop and it'll never stop.

quick sky
earnest token
modern plank
#

Is there a string function like text startWith prefix returning a boolean?

#

I found nothing in the strings function page, so maybe CBA or whatever native workaround?

#

I guess there is nothing dealing with regexp?

#

Oups, I missed
string find [substring, indexStart]

#

Have a good night/day folks!

tulip ridge
ionic talon
#

Hi 🙂
Does anyone know how to place underwater mines with a script, and get the "Z" right?
Every time I place them, they stick out way too far above the water...

ionic talon
modern plank
#

Small question about Missions Parameters (class Params in description.ext). Is there a way to create a kind of presets parameter, one param at the top who will update several ones when changing its value.
I know that I can read the whole params and do whatever I want with them after, but I would like dynamic changes on the parameters page directly. Possible?

#

Currently I have a "mission type" at the top, that overrides a bunch of params like "respawn type" during the init process, except if this param is set to value "custom". It just works, but checking if I can do better.

next gust
#

How would I access the first soldier in a group via script?

modern plank
#

Do you need something else than units _group select 0? Some check on the rank maybe?

next gust
#

no, that should be enough.

modern plank
#

ok.

next gust
#

ok I asked wrong. given a player, how can i know his position in his group?

modern plank
#

What do you mean by "position"?

#

just his place in the array?

next gust
#

probalby

modern plank
#

does it matter?

next gust
#

yes, we hand out helmets with the position as a number on it. need give the right helmet to a player based on his number in the group

modern plank
#
private _place = -1;
{
  if(isPlayer _x && local _x) then {
    _place = _forEachIndex;
    break;
  };
} forEach units player;```

Something like that (not tested).
next gust
#

will give that a try, thanks!

modern plank
#

Looping on all units of the player's group.... then getting the index if the unit is a human player + local to the computer where it runs... to avoid matching another human in the same group.

#

Code to be executed on the computer who owns the unit. You may need to deal with clientID and owner otherwise.

next gust
#

works. thanks again for the help

split scarab
#

Anyone got pointers for how to disable thermal vision on a AR-2 Darter drone after being assembled?

modern plank
#

You may want to test the class of object to target Darter only, because this EH is attached to player.s, not the drone itself. Code not tested yet.

split scarab
tulip ridge
#

units player findIf { _x isEqualTo player }

#

Should work

#

Plus findIf exists as soon as a match is found, so it'll always be less or as many loops as forEach

old owl
#

Could also just do units player find player too

reef tangle
#

Does anyone know how to change the mission for arma 3 server we want to swap it to freeroam

tulip ridge
fair drum
reef tangle
reef tangle
#

rn its under zeus

echo nebula
#

hey could someone give me some help understanding how this script works and its utilization

#
_validItems =  keys (primaryArsenal call ace_arsenal_fnc_getVirtualItems);

_arsenalObjectClass = "AmmoCrates_NoInteractive_Medium";
{
    [_x, _validItems, true] call ACE_arsenal_fnc_initBox;
} forEach (allMissionObjects _arsenalObjectClass select { _x getVariable ["isSecondaryArsenal", false] == true});

TL_arsenalsTransfered = true;```
#

someone in the server gave it to me for my arsenal but i want to learn how it works i figured it would make all of that object class have the same arsenal but it doesn't seem to work

cedar bay
#

@hasty violet thank u

fair drum
proven charm
#

so in init ```
this setVariable ["isSecondaryArsenal", true];

cosmic lichen
still forum
#

in engine, Y and Z are always swapped.
And we go to the effort of always swapping them around the expected way, when passing any coordinates to/from scripts. Unless someone forgets to do it..

split scarab
#

Anyone know how to disable TFAR radio when a unit is unconscious or where I can find TFAR documentation? Haven't bene able to find it myself

#

It disables radio if using ACE Medical but I'm using the vanilla medical system for my mission as we have a lot of new players that aren't used to ACE Medical

cosmic lichen
hushed turtle
#

Java person

wind hedge
#

Does this 👇 fires when player pressing the R button, or when using the action on the action menu for reload magazine? Or both?

#

private _ehId = addUserActionEventHandler ["ReloadMagazine", "Activate", { systemChat "reloading!"; }];```
winter rose
#

key only

haughty timber
#

Is it possible to add a while {} do loop on the init of a unit? I'm using a mod's unit spawning module, it allows me to write down a code I want to run on the init of the spawned unit

#

Basically what I'm trying to achieve is a moving mapmarker on every living vehicle that I spawn

#

My current code looks like this:

#
    _vehMarkerClassname = format ["boughtVehMarker_%1" , _index];

    _vehMarker = createMarker [_vehMarkerClassname, _this];
    _vehMarker setMarkerTypeLocal "mil_triangle";
    _vehMarker setMarkerSizeLocal [0.6,0.8];
    _vehMarker setMarkerColorLocal "ColorGUER";
    _vehMarker setMarkerText _vehMarkerClassname;

    [] spawn {
    while {alive _this} do {
        _vehMarker setMarkerPosLocal _this;
        _vehMarker setMarkerDir (getDir _this);
        };
    };
} else {
    deleteMarker _vehMarker;
};```
winter rose
#

please don't do that in init

#

make ONE thread that manages all marker for all units 😄

haughty timber
#

Ah crap, the problem is I wouldn't know the variable names of the spawned vehicles because they aren't made in the editor

atomic niche
#
while {alive _this} do {
        _vehMarker setMarkerPosLocal _this;
        _vehMarker setMarkerDir (getDir _this);
        };
    };

and please add some delay meowsweats

haughty timber
#

Oh yeah I was gonna add a delay lol

#

What's a better way of doing this...?

hushed turtle
#

You gonns need [this] spawn {

hallow mortar
haughty timber
#

Oh right

hallow mortar
#

Does the module indicate whether it runs this init code only on one machine, or on all machines?

haughty timber
#

It's the Simplex Support Services Logistics module, I dunno

hallow mortar
#

Try hovering over the title of the init field and seeing if the tooltip has any useful information.

hushed turtle
haughty timber
hushed turtle
#

Or you could add them into global array on spawn a then have one thread, which loops through

hallow mortar
# haughty timber It just says "Code ran for every item spawned. ``_this`` refers to the object, `...

Super.
Well, I don't really want to go into this mod's code to figure out how it actually works, so there's a limit to how much I can say about it. But the main point is, it matters where the code is executed. If it's executed on all machines, you need to structure it properly to avoid duplication (either by adding a check to only run on the server, or by managing all the markers fully locally). If it only runs on one machine, then you need to make sure that machine correctly gives other machines the information they need.

haughty timber
#

Oh right

hallow mortar
#

There's two ways to approach an overall looping thread: local management (each machine runs their own loop) and global management (the server runs one loop that broadcasts markers to everyone). In the case of local management, you need to make sure everyone gets an up-to-date list of targets for the markers. In the case of global management, you need to make sure the server's list is kept up-to-date. If the init code only runs on the server, that's easy, but if it runs elsewhere (e.g. on the machine of the player who spawned a vehicle) then it's a little more complex.

haughty timber
#

Is there a way to test the locality of the module's code

fair drum
echo nebula
#

since it needs to call the function of the virtual arsenal items from the primary arsenal and the keys for each item to send to every box rather than a full arsenal

haughty timber
#

Is it in the Splendid Config Viewer?

echo nebula
#

you can check the dir and params in config iirc

echo nebula
cosmic lichen
hallow mortar
# fair drum Look in the config. It's under `isGlobal` 0 is server only, 1 is global, 2 is g...

It may not be that simple.
That config controls the module's code that's run for the module's initialisation, but this init field code isn't directly executed by the module's creation, it's executed by the module code when it creates a vehicle through its own processes. It could have its own internal checks and/or remoteExecs that cause this code to be executed on other machines.

haughty timber
hallow mortar
#

if you have a DS or a friend available for a quick test, you can check yourself:

private _text = format ["init code was run on machine %1",clientOwner];
_text remoteExec ["systemChat"];```
haughty timber
#

Oh thanks for this! This might be able to help me kill two birds with one stone, since I've been having issues with locality for scripts using that module

winter rose
echo nebula
#

hey Lou when you have a minute do you know what i do to call my primary arsenal object or is there code i write per item inside the init of the game via the keys of the items?

#

i get the context of the script but the formatting is not something im adept in yet

winter rose
#

what is a "primary" arsenal object?

echo nebula
#

its the object that gets the virtual items on init to distribute that data to all "secondaryarsenals" essentially duplicating a specific arsenal to all of that object class of my choosing

#

but im having a hard time declaring a box as the primary arsenal object and so my secondary arsenals end up just having full virtual arsenal rather than a limited one

winter rose
#

I, huh, would have no idea

echo nebula
#

no problem thanks for taking the time regardless

#

if my way of describing the issue is poor too please lmk how to improve

haughty timber
#

Wait @echo nebula are you using a limited arsenal of some sort

echo nebula
#

i am attempting to

haughty timber
#

What are you using?

echo nebula
#

the function?

haughty timber
#

For the limited arsenal

#

Is it the one used in Antistasi?

echo nebula
#

im using ace's "ace_arsenal_fnc_getVirtualItems"

haughty timber
#

Oh

echo nebula
#

oh no lol im manually trying to do it haha

#

so i can update 1 arsenal and it will update all of them

#

im trying to do small projects scripting wise to learn and then work my way up and this helps my server

haughty timber
#

Maybe you could post the code you have so far for it?

echo nebula
#

i already have i don't want to be obnoxious and post like 3 times an hour

#

ill just direct to it

haughty timber
#

Ohh ok

echo nebula
#

its not mine it was written by someone else aiding me and i actually understand now how it works but my issue is mostly to do with navigating how it identifies or how i identify the primary arsenal

haughty timber
#

Oh I see

echo nebula
#

maybe on startup i tell the box to boolean the _validitems?

#

that way it triggers the function to get the item list or "keys"

proven charm
echo nebula
hallow mortar
#

init.sqf is a script located in the mission folder. It runs on every machine during mission initialisation.

proven charm
#

@echo nebula well i dont really know how ACE arsenal works, i was just reacting to the code you posted

echo nebula
#

thanks i appreciate the help

#

i haven't touched init.sqf yet or folders outside the game with script yet to be truthful im nervous on that front

proven charm
#

you have to run your script somewhere, dont worry

echo nebula
#

well ive been running them currently inside the eden editor in the init section

proven charm
#

right

echo nebula
#

and i guess the code i have im confused about how it finds the information from the arsenal the whole keys section confused me

proven charm
#

yeah i was bit puzzled as well but i dont know ACE so

echo nebula
#

i see the documents area for the mission sqm

#

thanks im still very new trying to learn appreciate the help even tho its confusing

#

what is a createHashMapObject?

#

im trying to understand all this lingo, is a hashmap just a database of all information a object has?

winter rose
#

a hashmap is an object storing data as key→value

#

hashmap.Get(key) returns value

#

(oops, my Enforce Script leaked here)

echo nebula
#

so maybe i could get a hashmap of the data from primary arsenal -> then i could inform the init through _foo?

#

whats a hashmap typically used for? like examples of its utility

thin fox
#

Store some data into a key. Like, I want to store some planes magazines inside a key called "GBU", and some other magazines in "Rockets", and in a script I would get the key to get the data from it

echo nebula
#

interesting that makes sense categorizing the data

#

the first section having "_validItems" makes sense now we use a hashmap on the primary arsenal to declare it as "_validitems" and then the code on init will work?

#

like it stores data from the ace function -> we take that declare it as _validitems and then the script goes wild with that?

#

2 iq thinking im 10 iq XD

echo nebula
#

could i theoretically use a event handler on the object to declare that when it opens to call _validitems and it does the function i want?

echo nebula
#

im so out of my depth with this i just don't get it, im trying to learn this hashmap stuff or look at all the ace functions or learn how to declare _this = "foo" i just dont get it i guess ill come back later when im less fatigued

granite sky
#

You don't generally want to start by reading ACE code :D

split scarab
#

What's a better way to do this? (Disabling TFAR radio if unconscious and enabling if conscious)
It works but "detatches" from the player after respawn

initPlayerLocal.sqf:

[player] spawn {
    params ["_player"];
    _player setVariable ["tf_unable_to_use_radio", false];
    while { true } do {
        systemChat format["Conscious check: %1", _player];
        sleep 0.5;
        if (incapacitatedState _player == "UNCONSCIOUS" && !(_player getVariable "tf_unable_to_use_radio")) then {
            _player setVariable ["tf_unable_to_use_radio", true];
            systemChat "Disabled radio";
        };
        if (incapacitatedState _player == "" && (_player getVariable "tf_unable_to_use_radio")) then {
            _player setVariable ["tf_unable_to_use_radio", false];
            systemChat "Enabled radio";
        };
    };
};`
hushed turtle
hushed turtle
hushed turtle
split scarab
granite sky
#

Should probably put in yet another feedback tracker request for an unconscious EH :/

little raptor
#

AnimStateChanged EH meowsweats

granite sky
#

There are so many animation state changes that it's probably slower than polling the damned thing :P

little raptor
#

yeah I meant as a workaround 😅

wind hedge
#

Has anyone ever evaluated the utility of a
A) speedChangedEh
B) player forceProne true; (Same as forceWalk but for prone) (Yes I know it can be done via AnimStateChanged EH but also a expensive workaround) Basically to simulate a player with broken legs until healed

little raptor
#

speedchangedEH?

wind hedge
little raptor
#

you might as well check every frame then

#

speed changes a lot

wind hedge
#

I see, not a good idea then

#

but idea B) is not so bad is it?

little raptor
#

I don't see its use case

#

why force someone to be always prone or even crouched?

#

Basically to simulate a player with broken legs until healed
ah this

wind hedge
little raptor
#

well technically you can create your own animation states for that (you can use vanilla rtms tho)

#

if you chain them together without linking to vanilla ones the unit won't be able to go to another state except those you link to (basically traps the unit into a specific network of anims)

wind hedge
#

Would also be useful to simulate ai units being suppressed, forcing them temporarily into forced prone or croush

#

There are many many use cases really

tulip ridge
#

Ai units do get suppressed

#

It's a vanilla thing

#

Also setUnitPos(?) exists for AI to force them into a certain state

digital hollow
#

addForce to make them collapse >:)

wind hedge
wind hedge
wind hedge
small crow
#

hey yall literal first time doing anything arma scripting related or just coding in general. I'm trying to make this script have there be multiple sidechat messages (one after another), how would i do that

wind hedge
#

another way would be to use spawn instead of call so you can space them with a sleep like so:

0 spawn {_soldierOne sideChat "Show this text"; sleep 1; _soldierTwo sideChat "Show this text"; sleep 1; _soldierOne sideChat "Show this text";}
#

or you can continue what you are doing like sqf call {_soldierOne sideChat "Show this text"; _soldierOne sideChat "Show this text"; _soldierOne sideChat "Show this text";}

#

But all the text will come up at once

small crow
wind hedge
#

The amount of seconds you want

#

But using spawn

small crow
#

alr ty

hushed turtle
wind hedge
drowsy geyser
#

Just use player playActionNow "PlayerProne";
if the player has a certain damage value, and then block the input actions: Stand, Crouch, Prone, MoveUp, MoveDown

granite sky
#

Player draws RPG, moves to crouch? :P

west portal
#

How does cursorObject work in multiplayer? I'm trying to make it so that players are supposed to spot a radar, and I know it works in singleplayer, but how does it return in MP?

#

I'm doing this through a trigger with condition cursorObject == obj1

#

Is it possible to determine which player's cursor is over the radar?

winter rose
wind hedge
#
VAL_fn_aiMovingThoughBuildingsFix = {
    params [
        ["_unit", objNull, [objNull]]
    ];
    
    onEachFrame {
        if (insideBuilding _unit == 1) then {
            if (isTouchingGround _unit) then {_unit setVelocity [0,0, -1]};
        } else {
            onEachFrame {};
        };
    };
};
#

☝️ Will this effectively remove the onEachFrame {} when the unit is not inside a building?

winter rose
#

well yes

#

it is recommended to use the EachFrame event btw

#

it will work for only one unit, and onEachFrame does not see other variables

#

so it won't work 😄

wind hedge
#

PS: I know it is very expensive so I will use it on few units only

winter rose
#

only one event, check on multiple units at once

wind hedge
#

I guess I could also try to use the animationChanged EH and check only every time they change animations

#

would be less expensive and might be as effective

winter rose
#

if you want to paralyse them when they enter a building… why not simply disableAI?

wind hedge
#

last time I tested the Ai could still move

#

Its been ages that I tested it, I am just redoing most of my old scripts and some might no longer work

thin fox
wind hedge
#

disableAi "PATH" works great if you want them to still turn and fire. disableAi "Move" is stronger

cosmic crater
#

Hi all. I've been working on a full mission where all you have to do is put down a unit and copy files and run. Everything is there. I was wondering if anyone knows if it's possible to copy the contents of the entire mission folder to run with playScriptedMission to a new world?

glass remnant
#

Looking for arma 3 server dev

winter rose
split scarab
#

Would anyone happen to know why on my dedicated server, I can heal people/rearm vehicles in Zeus using Zeus Enhanced (I think?) but my friend also using Zeus cannot? I'm typically logged in as admin but he can't do it even with admin

split scarab
#

And does anyone know how to let spectators hear TFAR radio comms, not just proximity? And how to remove a specific radio from Zeus? :)

winter rose
split scarab
#

Fairs, for all 3 questions?

glass remnant
#

You cannot play/edit this mission; it is dependent on downloadable content that has been deleted.\na3_characters_f pulled theese from server logs, any idea?

granite sky
#

Fake error. Your problem, whatever it is, is elsewhere.

glass remnant
#

Also i get Server error: Player without identity

#

no functions are working because of that error

hallow mortar
#

This is probably not a scripting problem.
Does it say literally na3_characters_f, or is it actually a3_characters_f?
If the latter, try verifying your game files (and the server if it's impacting other people on the server, not just you). If the former, ✨ mod problem ✨

glass remnant
#

Na3 it says

#

But my main issie is that it shows player without idenity

#

@hallow mortar gonna go insane soon trying to figure it out for 2 hours straight

hallow mortar
#

These are probably both symptoms of the same problem

#

Verify your game files anyway

#

Also try without mods, with a known good mission file, with a fresh empty mission file.

glass remnant
#

@hallow mortar thanks, i will give it a try

pallid palm
#

@cosmic crater well what i do if i want to move a mission to a new map:
i just change the folder name from A3-Jets.Altis To A3-Jets.Stratis
and then ofcorse you must go in the mission
and reset all the stuff to the places you want

#

but as far as playScriptedMission to a new world,, i dont know how to use that

#

i have seen missions where eveything was scripted to find locations and had many maps in it for use, but that takes alot of scripting, and yes it can be done

#

like the DEP mission

pallid palm
#

its a cool mission but i have to edit the hell out of it to fit my needs

lime rapids
#

is there any config properties to determine if something under cfgweapons is an infantry weapons?

warm hedge
#

type being 0, 1, 2 or 4

lime rapids
raw vapor
#

Is there any way for AI to detect "oh shit I'm being shot at" even if it's by a friendly?

Ideally I want a line of script that checks,

  • When someone is being shot at
  • If the AI knows what jerkwad is shooting at them
  • What side jerkwad is on, East or West
    and then finally, do something based on the outcome of if their side is the same as your side or not.
#

I observed AI behavior where I started shooting at indep as blufor, both friendly, trying to scare the AI into going into combat mode since I do know how to trigger scripts based on CombatModeChanged. The AI moved to my position after I finished shooting and missing them, so they know something's up. The use case is I am trying to make a group of AI set the person shooting at them to a renegade even if they don't hit anyone—ideally only if they actually identify who is shooting them.

proven charm
sharp grotto
#

Problem with FireNear is, max. distance ~69m.
I would use a combination between firedNear and Hit EH, not perfect but better than nothing.

hallow mortar
#

Suppressed EH would be ideal except it only considers enemy fire

dusky kestrel
#

Sup guys, can someone tell if it is possible to make a script that gives me both bullet instant hit and no weapon spread?

#

In a way that would work on my local player

queen cargo
#

@tough abyss UI != GUI
what you need is just some way to do that stuff

#

recommended: simply add some simple keys for detailed adjustment and the rest: 3d space movement

open fractal
#

you can speed up the projectile or teleport the projectile or something like that.. idk if 'instant' is attainable

#

speeding it up would probably get u the simplest result but idk what the engine limitation is there

dusky kestrel
#

Would work, how can it be done? I have the CBA mod

open fractal
#

'Fired' can get u the projectile object and you can set the velocity of it

wind hedge
#

Anyone knows if sqf addMissionEventHandler ["PreloadStarted"
Runs before Mission Params in Description.ext or after?

dusky kestrel
open fractal
#

probably need to edit config which requires making a mod

dusky kestrel
proven charm
wind hedge
cosmic lichen
#

No

#

Just think about it. CfgFunctions can be defined in description.ext

wind hedge
cosmic lichen
#

You wait until the mod has defined them and then overwrite them.

wind hedge
#

thank you

cosmic lichen
#

Of couse

#

Cba_fnc_waitUntil

#

Or your own eachFrame eh

wind hedge
#

I will just go scheduled

little raptor
cosmic lichen
#

This

#

It's 3 lines of code

little raptor
#

it's a bit more but yeah 😅

cosmic lichen
#

Not necessarily.

#

If he only wants to check one condition

#

If he wants to build a framework like CBA's then of course it's more work.

royal quartz
tulip ridge
#

PositionRelative = model offsets

granite sky
#

Generally boundingCenter doesn't matter for vehicles, because their model gets automatically recentered on load.

#

Buildings are another matter. I'm not sure what attachTo uses there.

royal quartz
#

ok I was just curious because I was getting minor discrepancies in my logic for making vehicles go bumper to bumper of around 0.1 sometimes or 0.27 others and wanted to know if this could be the cause. thanks for the info.

If anyone does know would greatly help thanks

granite sky
#

Was that using data from boundingBox(Real)?

royal quartz
# granite sky Was that using data from boundingBox(Real)?

yes I am using this command to get the bounding box of the vehicle ´boundingBoxReal [_loadVehicle,'geometry'];´ as it seems to provide the closest correct bounding box.

A question on that command with these parameters, do you know where the center of orgin comes from? Because on a hatchback for example you get this

[[-0.989059,-2.52638,-1.36978],[0.905163,2.20161,0.264737],2.38464]

As you can see for the Y co-ord, its not even so the center the command measures from is not central to the model which is frustrating. I was just wondering if anyone knows what the origin point is based on?

royal quartz
# tulip ridge It's model coordinates

right I get its from model space co-ords but is it from [0,0,0] or from the boundingCenter position, or the center that boundingBoxReal gives. Im also wondering what the center of BoundingBoxReal is explained above

tulip ridge
#

It's from the model center, so wherever [0, 0, 0] is
(or from the given bone, if set)

cosmic lichen
#

BB Center might be an offset from center of mass

royal quartz
#

I asked here because model people might not even know of the commands if they focus on model and config

cosmic lichen
#

They will know.

little raptor
#

attachTo uses [0,0,0] in model space (model coordinates origin is always [0,0,0] ofc, just like world coords)

royal quartz
plain bramble
#

Hi everyone. I'm back again with a different question.

I want to make a point in my mission where players can use (for example) a tent to skip time. I saw a reddit thread reference this code:

this addAction ["skip 5 hours",{SkipTime 5}];

Which in theory should work. But I wanted to double check that this action is in-fact repeatable?

little raptor
#

yes

plain bramble
#

Great

granite sky
#

Note that skipTime needs to run on the server.

#

(so this code wouldn't work in multiplayer, except for the host)

plain bramble
#

Though I will say, I probably need to just handle it zeus-side considering my playerbase. They'd abuse the shit out of a button like that.

hushed turtle
#

skipTime needs to be executed on server regardless

plain bramble
#

Yeah. Gonna handle it zeus side

#

"K everybody nappy time"

#

"I SAID"
"NAPPY. TIME."

split scarab
#

Is it possible to "override" this spectator button somehow so it toggles ACE Spectator on/off instead of the vanilla spectator? With vanilla spectator you're just stuck 1st person view from your body

#

I'd like for player to be able to spectate their own team while they wait for respawn

remote cobalt
#

Hey folks,

am I lucky and somebody already did some legwork with the new ACE function that attaches IR Lasers on vehicles?

I wanted a drone that is loitering in the Air targeting Targets on the ground and marking them with the IR Laser.

My idea is this:

droneVeh disableAi "AUTOTARGET";
droneVeh disableAi "AUTOCOMBAT";
droneVeh disableAi "FSM";

droneVeh lockCameraTo [truck_1,[0]];

droneGrp enableIRLasers true;

droneGrp setBehaviour "COMBAT";

droneVeh fireAtTarget [truck_1,"Laserdesignator_mounted"];

While the targeting works, the activation of the IR Laser does not happen. Also, if I switch it on manually by taking UAV turret control, it uses the laser and it is also visible for the Player on the ground, but after I release the UAV controls it will only stay on for a few seconds and then be switched off.

I didn't find to much in the ACE documentation and got lost in the ACE Github so I was hoping somebody here already worked with that function and might be able to help.

split scarab
hushed turtle
#

I believe at least at first person this depends on whatever player being spectated is using and cannot be controlled by spectator nor mission maker

echo nebula
#

is anyone here knowledgeable about ace i asked about ace related questions previously and i still use it extensively for my zuesing and eden editing and would like some guidance on working some problems i have/things id prefer to script and not have to manually do in missions for my players

glass remnant
#

When i pick role and after i load in i get a black screen, but cant figure out whats wrong, ill leave log files here https://logpaste.com/Tg0oLHmC

echo nebula
#

oh good call i didn't think that was a thing truth be told

#

well i guess i want to fix this arsenal script i have and i got no clue how, i also want my players to be able to purchase vehicles of my choice for objects in game like you construct a vehicle at a sign and it costs 3 boxes

tulip ridge
echo nebula
#

im aware of it but id rather have it be a personal project, we worked on events like this before i just want to be able to automate some stuff but i don't like the stuff that comes with liberation or antistasi

thin fox
echo nebula
thin fox
echo nebula
#

ty ill be sure to do that

echo nebula
#

want to let yall know that i solved the issue with my arsenal i had to use a cba function to wait until the map had loaded and the objects loaded before i ran my _validItems script 😛

#

ty yall for the aid!

abstract veldt
#

What are the return values of a Zeus module? e.g. If I had a custom zeus module and placed it on a unit via Zeus, how do I get the unit it was placed on? Or do I define that when creating the module. Not sure if that makes sense.

warm hedge
#

You need to define an EH to the curator module

tulip ridge
#

You can just set curatorCanAttach to 1 in the module's config, and then just check attachedTo _logic

#

E.g. something like:

params ["_logic"];

if (!local _logic) exitWith {};

private _unit = attachedTo _logic;
if (isNull _unit) exitWith {
    [objNull, "Place on a unit"] call BIS_fnc_showCuratorFeedbackMessage;
};
pallid palm
#

hello all: So if i set the Fog on a Hosted Server in The initServer.sqf to WhatEver i want,
do i need to set the Fog in the initPlayerLocal.sqf and the init.sqf also

cosmic lichen
#

You shouldn't need to.

#

As it' server excec

pallid palm
#

oh ok cool : thx @cosmic lichen so i was woundering if some one joined later

jovial sinew
#

apologies if this isn't the place to ask this, does anyone know of a cheeky little line of code I could use to disable ace3 fatigue on a single player in a multiplayer environment (dedicated server, if that changes anything)

#

going to bed, so @ me if anyone has an answer, cheers misc_chma_pepe_heart

tulip ridge
pallid palm
#

and also player enableStamina false;
player enableFatigue false;

jovial sinew
#

eh, I could
we usually play with stamina and all that, I'm looking at making one player in each squad an experimental heavy weapons droid, so I'd ideally like some way to disable stamina for just them

jovial sinew
pallid palm
#

must do both

jovial sinew
#

copy, appreciate it

pallid palm
#

settings and p10 enableStamina false;
p10 enableFatigue false;

tulip ridge
tulip ridge
pallid palm
#

agree

tulip ridge
#

So why are you saying to disable it, when ACE ignores it

#

Same for vanilla fatigue

pallid palm
#

he would need to disable vanilla also right

#

if he wants all off

tulip ridge
#

Not sure if advanced_fatigue replaces or runs on top of the vanilla system
In any case, just change the unit's performance factor through Eden

pallid palm
#

copy that

#

i think advanced_fatigue runs on top of the vanilla system

tulip ridge
#

That wouldn't make it dependent on whatever slot a player picks, which you may or may not want

pallid palm
#

nice looking script @tulip ridge

lean ice
#

Hello everyone, I'm trying to make a mp mission for me and my friends to play on a private server. I created easily a sandbox mission with zeus but now I'm trying to launch random objectives in the mission with scripts. I don't really know how to script so I used ai to create it but it's quite hard. Can someone help me please ? 🙂
I published the mission folders on GitHub https://github.com/Jozoooooooo/MISSION/tree/main/SANDBOX%2520AUSTRALIA.australia

#

If it's not the place to publish this I'm sorry and I will delete it immediatly

tulip ridge
#

Link is a 404, I guess github urls allow the space instead of using %20?

#

And now it doesn't have the space

#

Weird

#

That still 404s, both

ebon radish
#

Anyone know if using the unit capture script, I have a NPC do its thing, if I enter that NPC as Zeus will it override the unit capture? I want to use the helmet cam mod to get seamless stuff (since you can’t do a lot of stuff with helmet cam)

atomic niche
#

discord formats it lol

tulip ridge
tulip ridge
lean ice
#

I copy the permalink maybe it will work for you

atomic niche
lean ice
#

Oh yes, thank you !

#

The server run but the scripts for launching random missions are not working good at all

cosmic lichen
#

Well these scripts can't work as they contain commands that don't exist.