#arma3_scripting

1 messages ยท Page 199 of 1

eager pier
#

is there any good way to detect when a group is given an order to hold/open fire from the command menu?

eager pier
eager pier
#

nope, pretty sure i tried all the group EHs and none of them did it

proven charm
#

k

stable badger
#

Hi everyone.
Do you know how can I create an automatic Ship from sea to the seaport.
Do i need to juste createUnit & do a setPos in a for loop with config ? Or can i use something more optimised

icy gorge
#

Hey guys I have an issue with scripting a cutscene in the editor. Anyone have any solutions? The characters are all different (not copy paste), they all have the same animation, but they all go to a random direction when the scenario is loaded. The only way to fix it is to turn of simulation, but then it removes their "life-like" motions in the cutscene, as they are static.

#

pm me please if you find something, or know a solution

stable dune
icy gorge
#

didnt know exactly what channel to put it in, so threw it in the 3 i thought would most fit

#

let me grab it for you

#

this switchMove "Acts_AidlPercMstpSnonWnonDnon_warmup_8_loop";

#

@stable dune

#

and the sitting ones have
this switchMove "ace_sitting_HubSittingChairA_idle1";

#

and that is just in the Init for each unit

fair drum
#

Some animations have a different base direction. Look in the animation viewer to see how it changes. Not everything is zeroed to a units y axis direction.

If this is the case, you'll have to modify the direction before playing the animation.

icy gorge
#

@fair drum How can I do that, tried various commands from the Wiki and none worked

#

also any idea why one of the two standing faces a different direction than the others even tho he has the same animation

#

Im pretty new to this thats why I am asking yall

dire island
hallow mortar
#

WMV still exists as a format?
Keep in mind that units will try to orient themselves to match their group leader. You can try ungrouping them if they're in a group, or using disableAI "MOVE" to stop them turning. (disableAI "ALL" is an option, but it also disables their animation AI which could interfere with what you're doing)

icy gorge
#

thank you, let me try both of these rq. and i guess it does. tried to change file format to see if discord would let me have it play here but idk didnt work

#

@hallow mortar

#

disableAI "MOVE";
this switchMove "Acts_AidlPercMstpSnonWnonDnon_warmup_8_loop";

#

I did this and it has an error

dire island
#
this switchMove "Acts_AidlPercMstpSnonWnonDnon_warmup_8_loop";```
hallow mortar
icy gorge
#

oh right

#

sorry oops

#

THAT WORKS GOD BLESS, ive been trying to fix this for 2 days

#

thank yall

#

much love <3

dire island
#

I am spawning a bomb with a script and I want it to have an initial downward velocity. In my mind, the following should work, but the speed doesn't seem to get applied (the bomb spawns just fine).

waitUntil {alive _target};
private _height = 400;
private _fallSpeed = 500;
sleep _delay;
private _spawnPos = (getPosASL _target) vectorAdd [0, 0, _height];
private _bomb = "Bo_GBU12_LGB" createVehicle _spawnPos;
sleep 1;
_bomb setVelocity [0, 0, -_fallSpeed];
hallow mortar
#

This won't be what's causing your velocity issue but it is something you need to watch out for: you're calculating the spawn position using ASL altitude, but createVehicle doesn't use ASL altitude. This means that in certain circumstances, the bomb could be spawned at the wrong altitude. You should either convert your position to ATL, or use setPosASL on the bomb immediately after creating it.

#

Bombs do have aerodynamic flight profiles. I'd kind of expect a 500m/s launch to overcome it to some extent, but it is possible that the bomb is simply too resistant to lateral movement. You might need to rotate the bomb so that it's pointing in the direction you want it to go.

#

Your waitUntil {alive _target} doesn't make a ton of sense to me. If the target is created before this script is spawned, then...it's already alive, unless it died in the meantime in which case you've just created an endless waitUntil. If it's not created before this script is spawned, you can't possibly be passing a reference to it. That waitUntil is almost certainly doing absolutely nothing of use.

#

If the target dying before this script is spawned is a concern, use if !(alive _target) exitWith {}; instead.

dire island
dire island
spiral canyon
#

Is there a way to script UAV to have unlimited battery life? I have enemy drones I want to do patrols but dont want to constantly refill their fuel.

eternal spruce
#

I was told it has something to do with the terrain, but I'm asking if anyone knows any method to resolve this

last cave
#

rotate vector up with bis function

[vectorUp _bomb, nn, n] call BIS_fnc_rotateVector3D;

use

_bomb = "Bo_GBU12_LGB" createVehicle _spawnPos;
sleep 0.01;
Rot=vectorUp _bomb;
_bomb enableSimulationGlobal false;
myb = _bomb;

after this can check how look rotations and find correct numbers

[Rot, 90, 2] call BIS_fnc_rotateVector3D;

BIS_fnc_rotateVector3D first array its current rotation and functions for vectors have problems with calculating exact values so it is best to test through vector values at initialization or write an array with values equal to 0 in advance (Default object's vectorUp is [0,0,1]).
[[0,0,1], 90, 2] call BIS_fnc_rotateVector3D; For vector up

#

Because of problems with calculating vectors, I had to write the following code in my code for creating object compositions

//_r - reference object;
//_veh - created object;
//vhRot = [vectordir _r , vectorup _r];
//_direction = 0-360; // <- just dir
_vhRotDir=_vhRot#0;
_vhRotUp= _vhRot#1;
_veh setvectordirandup [_vhRotDir,_vhRotUp];
_v=[_vhRotDir,_direction, 2] call BIS_fnc_rotateVector3D;
_veh setvectordir _v;

After doing this, it doesn't matter how you rotated the reference object, the new object will always be rotated correctly.

hallow mortar
fair drum
drifting badge
#

Still trying to get the hideobjects to work with all the power poles and lines on the Malden map via script, because doing it manually, placing hideobject modules does work but would take ages to do on the entire map.

According to @molten elk I am looking to hide the following objects "PowerLines_Small_base_F", "PowerLines_base_F", "PowerLines_Wires_base_F", "PowerCable_01_base_F", but @proven charm did point out yesterday that nearestTerrainObjects would not work, so the following is not the way to go

nearestTerrainObjects [getPosWorld this, ["PowerLines_Small_base_F", "PowerLines_base_F", "PowerLines_Wires_base_F", "PowerCable_01_base_F"],10] apply {hideObject _x}```
warm hedge
#

You need isKindOf

drifting badge
#

but did you not say that it is not how it works yesterday?

proven charm
#

@drifting badge maybe something like this? ```sqf
_lines = (getposATL player) nearObjects 50 select
{ // Select all power lines
_o = _x;
{ _o iskindof _x } count ["PowerLines_Small_base_F", "PowerLines_base_F", "PowerLines_Wires_base_F", "PowerCable_01_base_F"] > 0
};

{ _x hideObjectGlobal true; } foreach _lines;

stable dune
# proven charm <@807914411289346048> maybe something like this? ```sqf _lines = (getposATL play...

nearestobjects uses iskindof check
This command matches objects using isKindOf comparison instead of direct class name == comparison. As a result, if a class type is a parent, the search will return all objects that inherit from the parent as well as parent itself. This command also only finds objects that are entities. If you are looking for non-entity objects, see nearObjects, nearestObject.

_lines = nearestObjects [player, ["PowerLines_Small_base_F", "PowerLines_base_F", "PowerLines_Wires_base_F", "PowerCable_01_base_F"], 50];
if (_lines isNotEqualTo []) then {
    {
        _x hideObjectGlobal true;
    } forEach _lines;
} else {
    hint "No power lines found within 50 meters.";
};
proven charm
#

ah nice didnt notice there was nearestObjects command as well. well both codes work ๐Ÿ™‚

#

yours is faster though

proven charm
#

is there a way to make the scroll menu not disappear over time?

#

or make it reappear

stable dune
proven charm
#

i tried that already but it doesnt work ๐Ÿ˜ฆ

#

i mean the menu where addAction items are

drifting badge
#

@stable dune - oh brilliant, thank you very much that is exactly what I have been looking for!

proven charm
#

trying to place machinegun to arrow position seems to be bit tricky. I tried ```sqf
_a = createVehicleLocal ["B_HMG_01_high_F", getposATL at, [], 0, "CAN_COLLIDE"];
_a setposATL (getposATL at);

digital hollow
#

Maybe an offset based on getCenterOfMass

proven charm
#

like ```sqf
_cen = getCenterOfMass _gun;
_cen set [2,0];

_pos = _cen vectorAdd (getposATL at);

digital hollow
#

Something like that, if CoM is actually where you want over the arrow. also world offset will change based on direction so set that first.

proven charm
#

ok thx

alpine hamlet
#

Hey fellas, trying to make a script to โ€œsaveโ€ a vest (and all inventory items in it), replace it via script with another vest, then restore the original one.

The save + swap + restore works for the vest itself, but I have no idea how to save and restore original vestโ€™s inventory. Any hint?

odd iron
#

i have a question with some scripting on arma 3 mission I'm doing I'm using conda economy script and I've made some changes here is my init.sqf https://gist.github.com/Demandingking/afb5d91ede0aed0a3f34e6cd8be8e55e now I'm trying to add a shop where players can sell inventory items the issue is the script currently only searches for items in players hands not what's on there shirt/vest/backpack etc what would need to change in order for the shop script to do this here is shop script i currently have this is in the init.sqf as well https://gist.github.com/Demandingking/f8c6c18623e6df987f60bc2113da0d68

alpine hamlet
#

Nailed it! Thanks

odd iron
tulip ridge
# alpine hamlet Nailed it! Thanks

You can just get the loadout with getUnitLoadout, replace the vest class name, and just re-apply the loadout

No need to manually re-add items

#

(Just in case what Revo was implying wasn't clear)

queen cargo
#

well @tough abyss ... if isEqualTo returns true for any null object, then thats an error too ๐Ÿ˜ƒ

silent cargo
#

Check the cfgsurfaces, ensure friction is defined with a suitable value.

silent cargo
#

I've got a fire script included in a mod I'm making, but for some strange reason the smoke particles do not appear for other players, but the fire and everything else appears just fine for all players when on a server.

Any ideas why only the smoke would not be showing up for all players?

Below is the code used to spawn the smoke segment of the script..

private _cssmokespread = "#particlesource" createVehicle position _ThermiteDevice;
_cssmokespread setParticleParams [["warfxWeps\ParticleEffects\Universal\smoke_02.p3d",1,0,1,1],"","Billboard",1,12,[0,0,0],[0,0,1.2],0,0.05,0.04,0.1,[0.8,9],[[0.1,0.1,0.1,0.04],[0.2,0.2,0.2,0.04],[0.2,0.2,0.2,0.02],[0.3,0.3,0.3,0.01],[0.4,0.4,0.4,0.005]],[1.5,0.5],0.4,0.15,"","","",0,false,0,[[0,0,0,0]],[0,1,0]];
_cssmokespread setParticleRandom [4,[5,5.2,5],[0.15,0.15,0.2],10,0.1,[0,0,0,0],0.1,0.05,1,0];
_cssmokespread setParticleCircle [0,[0,0,0]];
_cssmokespread setParticleFire [0,0,0];
_cssmokespread setDropInterval 0.025;
_cssmokespread setPos [(getPos _ThermiteDevice select 0) + (_i * 0.5), (getPos _ThermiteDevice select 1), 0];
#

For some reason this part is only appearing locally for the person using the function

hallow mortar
silent cargo
hallow mortar
#

That's what I would do

#

Remember you'll also need to handle deletion locally (if you want to delete the source)

silent cargo
# hallow mortar That's what I would do

Alright. I got confused down the line somewhere about locality because strangely enough the fire particles spawn fine when we tested on the server but all smoke particles did not so this makes sense.

silent cargo
#

This whole thing is jammed into one function lol

hallow mortar
unreal scroll
#

Need some help.
Some time ago my dedicated server started to hang after some time.
I added some forces (addforce) for bodies in HitPart EH, and I think the problem is related to it, but I can't figure out why and how I can solve it.
In almost all cases the server hangs when I shoot somebody, and last log entries say that the force was applied.
Visually all objects stuck at their places, and there are no output for any console command, but I can walk around and shoot with no problems. The server process needs to be killed manually.
Interesting fact, that it never happens when I host the mission locally, so most likely no recursion/cycle problems.
How can I inspect the server in some ways, to known what can cause it.
NB. The force is added with command like

[_unit, [_finalforce, _pos]] remoteexeccall ["addForce",owner _unit];
hallow mortar
#

Where is the hitPart EH running?
https://community.bistudio.com/wiki/owner
owner only produces accurate results when run on the server. On any other machine, it returns 0 - meaning if this EH fires on a non-server machine, it will remoteExec that addForce to everyone. That could cause problems.

#

Btw, not that it makes much difference beyond saving you a few letters, but remoteExec already executes commands in an unscheduled environment. remoteExecCall is only different when it comes to functions, so it's not needed here.

unreal scroll
#

"Where is the hitPart EH running?"
It comes from my client, of course.

"owner only produces accurate results when run on the server."
Thanks, I almost forgot about it, but actually when I tested forces, I added it on all machines (target 0) for large amount of units simultaneously without any problems.

tacit lion
#

Trying to get a little radio at base to just loop this song, and I'm getting issues. Originally, it would start a new track for every JIP so I moved the scripting from the init to serverInit. Now, it seems it just doesn't loop correctly and starts overlapping itself after a hile.
In serverInit.sqf

while {true} do {
    homeBaseRadio say3D "baseMusic";
    sleep 170;
};

The track is 168 seconds long so it shouldn't be overlapping itself.

hallow mortar
granite sky
#

If it's some sort of networking stall then you'll probably get some info in the RPT.

#

but yeah, _unit is vastly less traffic than 0.

mortal folio
#

also serverInit is only for the server, unless you're remotely executing that command its not gonna trigger for all players

tacit lion
#

Man scheduled/unscheduled is like Greek to me. What alternatives do I have to make this work? Where would I need to run this code instead of serverInit?

mortal folio
granite sky
#

Hmm, that sleep should never trigger before 170 seconds.

stable dune
#

Or you can add SFX sound and create source

granite sky
#

Maybe if it's SP with pausing? Not sure what say3d does in that case.

tacit lion
#

CBA_fnc_directCall is also greek to me looking at the documentation

#

Trying this in initPlayerLocal.sqf using isNil

    isNil { 
        while {true} do {
            homeBaseRadio say3D "baseMusic";
            sleep 170;
        };
     };
};```
#

Nope that was very bad

unreal scroll
#

@granite sky Nothing exceptional in rpt, even with debug mode in profiling branch.
It can ends with "Road not found ...", or "Warning Message: You cannot play/edit this mission ...", or with any other script-related messages, but nothing that would looks suspicious for me, as there are was many similar messages before.

unreal scroll
tacit lion
#
    {
        while {true} do {
            homeBaseRadio say3D "baseMusic";
            sleep 170;
        };
    } call CBA_fnc_directCall;
};```
Also is bad. Game lags heavily on loading in, then plays the audio really loudly. Also get a popup about "Suspending not allowed"
granite sky
#

The original code is correct and you need to diagnose the problem properly.

#

At least put a diag_log into the loop and find out when it's being executed.

tacit lion
#

Forgive me, I'm really not sure where to start. Most of my arma coding experience is in configs, not scripting.

granite sky
#

Well, for a start, what's the test setup and what are the exact symptoms?

thin fox
tacit lion
thin fox
#

so, that's why you're getting suspending not allowed

mortal folio
#

no but john is right here it shouldn't be happening early - i saw timing issue and immediately jumped to it's delayed; that said it must be something else

#

even if you have a billion scheduled mods running crap it would only delay the execution not make it happen early

granite sky
#

What's odd with that one is that the say3d wiki claims that the same object can't play multiple sounds simultaneously, which is what's happening if the sound "plays really loud".

thin fox
#

can someone else reproduce this?

granite sky
#

The lag part is expected because what it's doing is running the infinite while loop 10k times and then quitting.

tacit lion
#

I can give more details when I'm home but, here's what I can report.

Before any changes made today, there was a radio item at base. In the radios's init, I ran an execVM calling a script file with the first code snippet I sent, the while true loop. This would work fine for the first play, but then after a period of time which I assume is near the length of the audio, the song loops and begins overlapping itself.

granite sky
#

Are you sure you calculated the length of the audio correctly?

tacit lion
#

2:46 = (2*60)+46 = 168

#

So 170 gives a 2s buffer

granite sky
#

Stopwatch the thing. See when it's actually looping.

tacit lion
#

Can do when I'm home

granite sky
#

maybe Arma just plays it slow :P

tacit lion
#

Something less important I've noticed is that there's a noticable doppler effect walking towards or away from the radio

#

Not a big deal but kinda funny

crude barn
#

I'm kinda dumb at scripting, how would I patch in my own edit to an existing mod function to use in my mission?

tulip ridge
#

If the mod uses compileFinal for its function, you can't overwrite it from a mission

tacit lion
#

Coming back to this, I don't even think I could do this unscheduled because of needing to suspend

fair drum
#

You can do anything unscheduled. You are just going to be getting into frame handlers, doing calculations with frame no and timing, etc instead of suspension commands

tacit lion
#

Does this mean I need to get the FPS the server is running at and then use that for the calcs?

fair drum
#

Your case, don't bother with unscheduled. It's not timing important.

#

Did you post all of your code at some point above?

tacit lion
#

Yeah basically.

I've tried this as a script called by an execVM in the radio's init, I've also tried it in initServer

  homeBaseRadio say3D "baseMusic";
  sleep 170;
};```

and then I tried those experimental examples with isNil and the CBA directCall without really knowing what I was doing
fair drum
#

Ill address this in like... 30 min If you are still on

tacit lion
#

Thank you, yes I should still be around

fair drum
tacit lion
#

As much as I'd love to learn from the ground up, if I can see the answer, it will help me figure it out for future references

fair drum
#

i'm making two assumptions. radio doesn't move, and you have this sound in CfgSounds in the description.ext

tacit lion
#

Yes and yes

fair drum
#

in either init.sqf, initServer.sqf (can remove the server check), or the init attribute of the radio object in editor:

if (isServer) then {
    0 spawn {
        TUBA_HomeBaseRadioPlay = true;

        private _soundCfgArray = getArray (missionConfigFile >> "CfgSounds" >> "baseMusic" >> "sound");
        _soundCfgArray params [["_filePath", ""], ["_volume", 1], ["_pitch", 1], ["_maxDistance", 100]];

        while {TUBA_HomeBaseRadioPlay} do {
            private _sound = playSound3D [_filePath, homeBaseRadio, false, getPosASL homeBaseRadio, _volume, _pitch, _maxDistance];

            waitUntil { soundParams _sound isEqualTo [] };

            sleep 1;
        };
    };
};
meager granite
#

Can't you just wait until entity returned by say3D is null?

#

Still, I'm clueless how new JIP player makes it restart the song thonk

fair drum
#

you can, I removed all locality stuff since I don't know how familiar he is with it

meager granite
#

Isn't say3D fully local?

fair drum
#

playSound3D lets you be global

#

now server can time it, and its the same for every client instead of letting each client deal with it

meager granite
#

Hmm, you can also solve that by offset in say3D

#

serverTime % 170 or something like that

#

Still I wonder why his original script doesn't work

fair drum
#

i like the accuracy of waiting for soundparams instead of a arbitrary sleep

meager granite
#

Originally, it would start a new track for every JIP so I moved the scripting from the init to serverInit
This is what I don't get

#

New track for every JIP? As in each client hears it anew on each new join?

fair drum
#

yeah i didn't really consider JIP. it would just be silent until the next iteration in this current example

meager granite
#
while {true} do {
    private _sound = homeBaseRadio say3D "baseMusic";
    waitUntil{isNull _sound};
};
```in radio init could be most basic solution unless I'm missing something about `say3D` and multiplayer
#

Is there a way to get sound length?

tacit lion
#

168 seconds

fair drum
#

using a soundID command and soundparams you can

#

and get current sound time of play

#

Syntax:
    soundParams id
Parameters:
    id: Number - id returned by playSoundUI and playSound3D commands
Return Value:
    Array in format [path, curPos, length, time, volume], where:

        path: String - the path to the played sound file
        curPos: Number - current play position in 0...1 range
        length: Number - total sound duration in seconds
        time: Number - time passed since the start of playback
        volume: Number - playback volume
#

you can sync it using that for JIP

meager granite
#

Oh you have to play it first to use the command, no way to do it beforehand

fair drum
#

yup

meager granite
#

I was just trying to come up with neat way to play it locally with offset by global timer so each client always hears same part

#

But I have no idea how playback works during pause or during say game being frozen? Does it skip by freeze amount, does it continue?

fair drum
#

i mean you can set playSound3D to local only and use a CBA jip event and send the current pos of the sound to the client

fair drum
#

look what you did @tacit lion lol

let me get you down the path of JIP syncing like we are talking about

tacit lion
#

๐Ÿ’€ Arma is wild

#

Thank you, by the way

fair drum
#

I have to think about this for a few min

meager granite
#

Still it makes the song end earlier

#

How could it overlap at all if its 168 seconds long and sleep is 170 thonk

tacit lion
#

Really not sure. When I have a sec, I'll do a recording and see if I can't catch it

meager granite
fair drum
#

my current thought process, if continuing to use a soundParams compatible command, is to create an event subscription on the server that sends the current playback position of the sound back to the requestor. The requestor will call this event when joining JIP to get that value, then play their sound locally starting with that time. The next iteration should link up when server sends it

meager granite
#

Could work but maybe it can be done simplier with no networking

fair drum
#

Or... @tacit lion doesn't care if all clients are at different points in the song?

tacit lion
#

For the purposes of this mission file, it doesn't really matter. It's just ambient base music.

#

If it's not synced, that's fine, so long as it at least plays for each player - JIP or not

meager granite
#

But what if one player says: "Here's the best part" and it will be at the worst part of the song for another player? ๐Ÿซฃ

tacit lion
#

Then they will hear the worst part ๐Ÿ™‚

fair drum
#

"is the time I'm going to put into this going to be recognized by the player"

meager granite
#

Which init exactly it was for that script to run

tacit lion
#

I put it in the radio init at first

#

Then serverInit.sqf

meager granite
#

Init field in the editor?

tacit lion
#

yes

#

Sort of*

#

The first draft had execVM "scriptpath" an sqm file I made that was the while loop you saw above

meager granite
#

Is there ANY way say3D can be paused in multiplayer? I can't think of any

#

I'm just trying to wrap my head around how you could have the song overlapping with that basic loop

fair drum
#

stacking scripts. he never said he was filtering his init attribute

meager granite
#

filtering init attribute?

fair drum
#

since its global. I didn't see him mention any local filters to prevent the while loop from being created again on a JIP client connect

#

since he said he was execVM'ing a file from the init

tacit lion
#

Yeah, orc code on my end

meager granite
#

JIP shouldn't call init on other clients again as object is not created again on existing clients

#

Okay, here is init script that will properly loop the song AND play it at the same place for every client

#
    waitUntil {alive player};

    private _sound_time = 170;
    while {true} do {
        private _offset = serverTime % _sound_time;
        private _end_at = serverTime - _offset + _sound_time;
        private _sound = homeBaseRadio say3D ["baseMusic", 100, 1, 0, _offset];
        waitUntil {serverTime >= _end_at};
        deleteVehicle _sound;
    };
#

Minus some scheduled lag offset

sharp grotto
#

At least in Arma 3 the basics are simple, i just recently tried playing a sound with Reforger while being clueless about it (Game, engine, tools, OOP).
8 hours wasted and no progress xD

meager granite
#

You can upgrade that to get _sound_time from soundParams but I decided to make it simple

fair drum
meager granite
#

Otherwise you'd have 4 cars

meager granite
tacit lion
meager granite
fair drum
#

Reforger is very frustrating currently. Just finished up ACE defibrillator for it and it was quite a pain with networking

#

We end up doing so much through the player controller due to ownership to call things on the server from a client

meager granite
#

I still haven't really touched replication there, but I feel I have plenty more frustration to come

fair drum
fair drum
tacit lion
#

Testing now, seems to be working. Will let the song play out and see if it loops well enough

#

The doppler effect is still silly

#

Loop seems good, no overlap

#

Need to test it in full MP with others but this feels good

fair drum
#

yeah i don't think you can take off that doppler effect

tacit lion
#

Kinda silly but no big deal

meager granite
#

Did a test with 2 clients, sound is always playing same part for everyone

tacit lion
#

Thank you both, greatly appreciated

fair drum
#

@meager granite did you try out the layer editor on reforger yet? do you like it better than doing GUI in a3?

meager granite
#

More specifically listing objects one after another, you had to script all that but now you can just wrap it into layout and it positions it automatically

#

Haven't done any real projects with it yet though, but so far definitely an upgrade

#

Few things are missing though, no subpixel shadows on images for example

fair drum
#

i only made a little calculator so far to figure out how it worked. never did well with spanning when I tried to learn js/html/css so its kinda annoying visualizing it in my head. but I like that its immediate feedback

meager granite
#

A3 shadows are always the same though but often that was enough, Reforger image shadows are whole pixel and they're useless unless you're doing very thick shadow

meager granite
#

In A3 its all absolute (unless in controls group) and you have to calculate everything yourself what comes after what

stable mica
#

How do I set a unit to be unconsious at the start of a scenario? I tried _unit setUnconsious but it doesn't seem to be working

candid scroll
#

Are there any workarounds these days to allow a "helmet cam" be on a soldier and then have that soldier fly a plane or drive a vehicle without the camera view stuttering?

meager granite
#

One of my ideas that I haven't tried was finding unit proxy offset in the vehicle and work from that

#
  1. Get unit seat
  2. Find proxy of that unit
  3. Get proxy offset in the vehicle
  4. Vehicle position + Proxy offset + selectionPosition of unit + camera offset
#

Something like that

warm hedge
#

You can setPos'ing camera each frame. Reliable to me except the audio stutters

meager granite
#

There is no way to get real rendered unit position inside vehicle

warm hedge
#

Hm, I realized my case attached cam to vehicle not unit

ivory lake
#

it'll be something to do with render scope vs simulation

meager granite
#

Render time scope commands on units inside vehicles still return simulation time scope positions it seems

#

Can you even get seat proxy position in the vehicle?

#

Vehicle render scope position + Proxy offset + Unit selectionPosition offset + Needed camera offset

#

Something like that

#

Or maybe @still forum could figure out why engine does it and fix it properly

stable mica
meager granite
#

Why waypoint, didn't you want it at start of scenario?

stable mica
#

That's the full code I put into the init for the unit, with variable named to unit2. Pretty much, I'm wanting them to keel over with little health, it's a downed helo situation, starting downed

meager granite
#

Why do you wrap it in {}?

stable mica
#

Google AI leading me astray, apparently

meager granite
#

Init field in editor:

if(isServer) then {
    this spawn {
        sleep 1;
        _this setUnconscious true;
    };
};
#

LLM can barely code in languages that are x1000 more present online for it to learn from, they're absolutely useless for SQF, don't even bother

stable mica
#

perfect, thank you

proven charm
#

does anyone know if its possible to prevent the scroll menu from fading away? I mean the menu with addActions

candid scroll
#

Some helpful tips though @meager granite and @warm hedge. I'll explore, thank you!

spring stone
#

I need help with a trigger: I want the trigger to fire when OPFOR knows about the present of BLUFOR (or the Player in a Multiplayer mission).
Trigger:
Type: None
Activation: None
Condition: east knowsAbout player
On Activation: hint "Trigger has fired"

I only get the error: Condition: Type Number, expected Bool
Using DEVBranch and the Eden Editor!

open marsh
#

How can I in arma 3 disable unit name randomization so it uses the name i provide in the properties?

drifting badge
#

Am I right that there is no way to remove or replace main road textures (those that are on the map/terrain, not placed in Eden) via scripts? Am trying to make a historical Malden island for a mission and this is the final modern thing that I somehow need to fix (i.e. the modern roads - especially the main highway, etc.), and it would help if one is able ot somehow replace those with dirt roads or even just grass? Could the nearRoads detection be of use as it apparently is able to "find the road segments within the circle of the given radius" (according to the wiki), in combination with custom texture creation in those area?

I also did check on the workshop, but did not see any Eden extension that allows one to place something like large grass objects/ground textures to be able to "hide" the road below.

Any ideas how it could be achieved?

pallid palm
#

hello all: how do i delete soundSource , after i created a soundSource, ```sqf
_flameSFX1 = createSoundSource ["Sound_Fire", position F5, [], 0];

pallid palm
#

oh cool thx m8

#

wow that was easy thx so much @thin fox

dire island
#

Is there any way to pass a nonglobal variable into an event handler? Both this post: #arma3_scripting message and ChatGPT (nothing on BIKI as far as I can find) leads me to believe that this should work:

            params ["_bomb", "_pos", "_bombLethalRange"];
            {
                if (
                    alive _x &&
                    isNull objectParent _x &&
                    !(_x isKindOf "Animal") &&
                    _x distance _pos < _bombLethalRange
                ) then {
                    for "_k" from 1 to (floor random 4) do {
                        [
                            _x,
                            selectrandom [0.25,0.5,0.75],
                            selectrandom ["head","body","hand_l","hand_r","leg_l","leg_r"],
                            "explosive"
                        ] call ace_medical_fnc_addDamageToUnit;
                    };
                };
            } forEach allUnits;
            {
                if (
                    alive _x &&
                    _x isKindOf "AllVehicles" &&
                    !(_x isKindOf "Man") &&
                    _x distance _pos < (_bombLethalRange / 1.5)
                ) then {
                    private _hitPoints = getAllHitPointsDamage _x select 0;
                    {
                        _x setHitPointDamage [_x, selectRandom [0, 0.2, 0.5, 0.8]];
                    } forEach _hitPoints;
                };
            } forEach vehicles;
        }, [_bombLethalRange]];```
It gives the expected results when I specify  _bombLethalRange inside the EH, but I want to be able to assign it outside the EH to make the script work for different types of ordinance.
hallow mortar
#

You could use setVariable and getVariable to store your variable in the bomb's namespace and then retrieve it

open marsh
pallid palm
#

ouch that white text herts my eyes

#
```sqf
//----------your code
tardy osprey
#

Am i dumb or something. This:
!alive rt1;

does not fire after the destruction of said variable.

cosmic lichen
#

Gotta give a bit more context. alivechecks if given object is alive or not

#

not if a variable was destructed.

tardy osprey
#

The destruction of the variable would mean that it is no longer alive.

cosmic lichen
#

Not really

tardy osprey
#

Then please elaborate, because in every other situation i've used alive, when said thing is no longer "alive". Aka Dead man, or destroyed object. The trigger fires.

cosmic lichen
#

variable != object.

#

And I still have no clue where you check it, in a trigger, in a loop in an event...

tardy osprey
#

In a trigger....

#

Hang on a minute

#

I'm supposed to put it in Condition, no?

cosmic lichen
#

yes

tardy osprey
#

Yeah, I seem to mix them up sometimes..

cosmic lichen
#

Happens

open marsh
#

When you double click on a Unit in ARMA3 Eden editor theres a category Identity, with field name

#

When you type in a name, the name gets overridden by something in game

#

So either its a mod, or its the game doing it

cosmic lichen
#

It works for me. So it could be a mod.

ivory lake
#

player names override it in mp iirc

hushed turtle
#

Player also overrides head and glasses

#

In both SP and MP

spring stone
#

Nevermind....I guess Activation: BLUFOR and Activation Condition: Detected by OPFOR should do the trick, hu?

signal flume
#

QUestion on object setVariable.. What's the desired limit of objects with setVariables on them? If I have lots and lots of objects with variables set on the,, will have have noticable effect on performance and network usage? cheers

indigo snow
#

@spring stone knowsAbout returns a number [0-1]

torn hemlock
#

@tough abyss (random 1000) isEqualTo (random 1000) ? xD

polar radish
#

how do i write a sleep command inside a trigger that works in a dedicated server?

#

i need to put sleeps inbetween some BIS_fnc_spawnGroup for server proformence reasons

open marsh
#

and still in vanilla arma 3, the identity name field, doesnt do anything

#

pls someone halp

#

seems towork out of the blue now

split ruin
#

@polar radish just use []execVM "yourSpawnScript.sqf" beginning with sleep or whatever u need and put it in the trigger

meager granite
#
0 spawn {
    grp1 = ... call BIS_fnc_spawnGroup;
    sleep 1;
    grp2 = ... call BIS_fnc_spawnGroup;
};
#

Change 0 to trigger variables (thisList or such) if needed so its passed to thread

polar radish
#

okay

#

thank you :)

split ruin
#

how to make a group stop stalking and go to position after some time ?

private _stalking = [_staticgrp, (group player), 10, 0, {sleep 600; true;}, "usa_base_area"] spawn BIS_fnc_stalk;

cannot use sleep in this context error ....

split ruin
#

@stable dune I read about scheduler but how to make them go to the marker after some time?

cosmic lichen
meager granite
#

or you can use some global variable to make it even more basic

#

Also can't you just kill the thread? Not sure how that function works.

#

Probably gonna have to do waypoint cleanup manually

split ruin
#

@meager granite hmm with this stalking groups doesn not start to stalk at all ...

sleep 180; //need this to make them deffend an ammo ceche ofr a bit 
_staticgrp setVariable ["stalking_now", true];
private _stalking = [_staticgrp, (group player), 10, 0, {!(_staticgrp getVariable "stalking_now")}, "usa_base_area"] spawn BIS_fnc_stalk;
sleep 180;
_staticgrp setVariable ["stalking_now", false];
split ruin
#

finally I had to use scripted waypoint

private _wp = _staticgrp addWaypoint [flg_us,0];
_wp setWaypointType "SAD";
[_staticgrp, 1] setWaypointSpeed "FULL";
[_staticgrp, 1] setWaypointBehaviour "COMBAT";
[_staticgrp, 1] setWaypointCombatMode "RED";

sleep 180;
{_x enableAI "PATH"} forEach units _staticgrp;

no stalking, they go directly to us base to drink some blood ๐Ÿ™‚

west grove
#

is there some simple way to get the current road surface type that i am standing on? we have surfaceType which returns the current terrain surface but ignores roads. we can check if player is on a road and then grab nearest road.. but that seems unnecessarily complicated? am i missing something or do i really have to find the nearest road to then read the material?

#

basically i just want to know if i am on an asphalt or dirt road or something else

meager granite
#

Not sure if dirt roads are "TRACK" or that's something else

west grove
#

hm. lineintersectssurfaces gives me just the terrain surface again. unless i'm doing something wrong

#

ok i'll just use getroadinfo in combination with roadat. should do the trick

supple condor
#

Can someone explain how does "setVectorDirAndUp" works? I cant figure out what reference to feed, in order to tilt in the desired direction.
Objective is to tilt a tree towards a player and "hit him with the tree".

it will be somewhere in a forest, so it needs to be able to tilt in every direction.

I call my script inside a trigger with anyPlayer and present condition. it is repeatable and server only (and currently hosted on lan)

[thisList select 0, truck_tree1] execVM "scripts\trees\hitting.sqf"; //yee i will only hit the first player that enters the trigger, but thats okay and reduces complexety by a lot i think


_playerDir = getDir _player; //easier to look at

_treeDir = 0; //i dont know how to make vars global to script but not to mission, so this is my solution

if (_playerDir > 180) then //i argue that my goal is, to rotate my tree towards to the player and then tilt forward.
{                          //so figuring out, in what direction my tree needs to be rotated
    _treeDir = _playerDir - 180;
}
else
{
    _treeDir = _playerDir + 180;
};

for "_i" from 1 to 90 step 1 do
{
    _tree setPos (getPos _tree vectorAdd[0, -0.03, -0.03]); //my test tree has it center somewhere in the middle, so at somepoint, roots are going to be in the air. im trying to fix that with small teleports
    _tree setVectorDirAndUp [[sin _treeDir, cos _treeDir, -sin _i],[0 , 0, sin _i]]; //HELP HERE PLEASE. i have no idea what vectorUp to feed, so it will tilt forward till it lays on the ground (so 90ยฐ)
    sleep 0.01; //prevent that it happens instantly and make it atleast look like its falling
};```
ornate whale
digital hollow
ornate whale
meager granite
#

There is an issue of locality though, it might look shitty over the network

supple condor
#

i think that is too much for me ๐Ÿ˜…
it sounds really nice, but i understand only half of what your are saying ๐Ÿ˜‚

ornate whale
#

Use the setDamage as @digital hollow suggests. That is very easy.

supple condor
#

wait

#

so just create something invis, pass it as killer and good to go?

ornate whale
#

Yes.

meager granite
#

deleteVehicle testo;
testo = createVehicle ["Flag_Vrana_F", player modelToWorld [0,8,0], [], 0, "CAN_COLLIDE"];
        
[player, testo] spawn {
    params ["_player", "_tree"];
    private _fall_time = 2;
    private _fall_till = diag_tickTime + _fall_time;

    private _pos = getPosASL _tree;
    private _vec = _pos vectorFromTo getPosWorldVisual player;
    _tree setDir (_vec # 0 atan2 _vec # 1);

    private _start_vd = vectorDir _tree;
    private _start_vu = vectorUp _tree;

    waitUntil {
        private _vec = _pos vectorFromTo getPosWorldVisual player;
        private _dir = _vec # 0 atan2 _vec # 1;
        systemChat str _dir;
        _tree setVelocityTransformation [
             _pos
            ,_pos
            ,[0,0,0]
            ,[0,0,0]
            ,_start_vd
            ,[0,0,-1]
            ,_start_vu
            ,[sin _dir, cos _dir, 0]
            ,1 - ((_fall_till - diag_tickTime) / _fall_time)
        ];
        diag_tickTime > _fall_till;
    };
};
#

Try that

#

Haven't tried myself

#

I feel like ChatGPT coming out with SQF code without even testing it

#

If this works you can upgrade it to make it fall faster at the end and such

#

Feed it through sin or cos or something

#

fixed interval being the wrong way

#

Messed up var names (start and from), fixed

#

I'd run A3 to test it but I think it closes Reforger and I'm in a queue

supple condor
meager granite
#

Ok it works but getDir spazzes out if objects are too close

ornate whale
# supple condor so just create something invis, pass it as killer and good to go?

You can simply calculate the differrence between the player position and the tree position (which rersults in a direction vector), then invert the resulting direction vector to point in the opposite direction from the tree position and place a game logic (invisible object) there. You can probably find an easier solution with getDir and getPos and distance commands avoiding all the vector work. Edit: the vector is [X,Y,Z], not just [X,Y].

meager granite
#

You can go from there

#

Updated even more, much better now

#

So tree jumps a bit after fall, etc

astral tendon
#

What is this error?
[BIS_fnc_respawnBackpack] RespawnCamps: Cannot assign camp to a player, camp deleted!

ornate whale
astral tendon
#

hearts and minds modded

ornate whale
astral tendon
#

but I fixed, it was a parameter that had 0 that means disabled and not unlimited timer.

#
    class btc_p_rallypointTimer { // Time before rallypoint self-destruction:
        title = __EVAL(format ["      %1", localize "STR_BTC_HAM_RESP_RALLYTIMER"]);
        values[]={0,5,10,30,60};
        texts[]={$STR_DISABLED,"5 min","10 min","30 min","60 min"};
        default = 999999999;//actually unlimited
    };
signal kite
#

I'm currently trying to update a running mission on a dedicated server with live weather data, but I can't figure out where to put the files in order to access them via loadFile or preProcessfile.

robust willow
#

So I have a initServer.sqf to randomly place objects and playerstarts based on a getMarkerpos. Apparently it only works LAN. How would I make this usable for a dedicated server?

#

I have came across several posts that look like they might offer a solution, but they all lead to the BI forums which are still down.

errant iron
robust willow
#

Yes, I am trying the get the players to spawn at one of six random spots designated by a marker (an empty) pre-placed in the editor. _startPos = getMarkerpos (SelectRandom ["m1","m2","m3","m4","m5","m6"]);

errant iron
#

should it handle players respawning too?

robust willow
#

no

errant iron
#

then just initPlayerLocal.sqf should be sufficient, move that _startPos and anything else referencing it to there

#

that runs locally on every player, excluding the dedicated server itself since it doesn't have a player

robust willow
#

Okay, I will try that

#

Thanks

errant iron
robust willow
#

all together\

errant iron
#

that'll take a bit of extra effort, since selectRandom and other random commands don't produce the same results on each client

#

i suggest having the server decide on a marker, broadcast the marker in a global variable, then have players teleport to the marker in said variable

#

essentially something like: ```sqf
// initServer.sqf
David_startPos = getMarkerPos selectRandom [...];
publicVariable "David_startPos";

// initPlayerLocal.sqf
player setPosATL David_startPos;```

#

i think this alone would be unreliable on non-JIP players though

robust willow
#

Thanks, I will try and implement this. I appreciate your taking the time.

meager granite
#

Gotta add waitUntil or something

#

for the var to arrive

snow viper
#

does anyone have a Patrol Ops 4 map config for Chernarus 2020?

limpid briar
#

me

snow viper
#

or if youre willing to share the map data generator project, i wouldnt mind spending a couple hours on further perfecting it, if thats even possible

thorn thunder
#

Hihi, does anyone know the script to put on an object to grant players like, medic, EOD, Engineer perms through scroll wheel?

tulip ridge
#

If using ace, you will also need to use its systems instead of vanilla

Vanilla medic trait won't do anything, and vanilla engineer will bypass ace repair

#
// 0 = untrained, 1 = medic, 2 = doctor
_unit setVariable ["ace_medical_medicClass", 1, true];

// 0 = untrained, 1 = engineer, 2 = advanced engineer
_unit setVariable ["ace_isEngineer", 1, true];

// false = not eod, true = eod
_unit setVariable ["ace_isEOD", true, true];
thorn thunder
#

Thank you both <3

raw acorn
#

anybody know the script to put a live map on an object?

fair drum
raw acorn
#

yeah like the ingame map. iโ€™ve seen it done by like holding space on the object and then you can move the map wherever you want.

opal zephyr
raw acorn
#

how would i execute that

opal zephyr
raw acorn
#

tracking, so iโ€™d just do #(rgb,width,height,mipCount)ui("displayClassName","uniqueName","texType"); ?

last cave
#

Has anyone tested this event.
When an object in remotexec with a JIP disappears from the world, will this JIP be deleted if the object does not exist?
example
[_object,2] remoteexec ["setAnimSpeedCoef",0,true];

When an object is deleted during the game, will everyone who enters the server call setAnimSpeedCoef for a non-existent object in the world?
In this case, won't I have to add EH Deleted for the object with the JIP ID string argument?

granite sky
#

If you don't want it to complain a bit, yes.

meager granite
#

Not sure if I ever tried

granite sky
#

I would be surprised if it had that depth of filtering.

#

If you use an object as the JIP parameter then that JIP entry will be deleted when the object is deleted, but that's a much easier lookup.

#

You only get one of those per object unfortunately.

fleet sand
#

Quick question does anybody know how to create custom category for compositions are you doing that with scripts or how ?

fair drum
#

if you want something everyone can see in your mod, you have to use the standard faction system under the yellow props tab

fleet sand
fair drum
#

then look in the compositions folder in your user profile for the header.sqe file connected to your specific composition

fleet sand
fair drum
#

I don't know all the different categories, so you'll have to experiment. for instance, i have some in EdSubcat_Default

#

I'm sure they are listed in the config somewhere

fleet sand
tulip ridge
#

You create a class in CfgEditor(Sub)Categories

fair drum
#

mod that

tame lion
#

Is it possible to create a custom info panel in the mission description.ext file?

Long story short, I want to create a custom info panel (the panels that are on the left/right side of the screen such as GPS, radar, SLA, etc) that will be used for basically a helmet cam script. Id rather just use those panels as opposed to creating an overlay through the conventional means that people ususally with cutRSC

fleet sand
molten tree
#

What's the best way to add music to an object around a radius? For example a radio sitting on a desk.

polar belfry
#

is there a way to exclude all parachutes from helicopters
I'm making a no fly zone and since parachutes are helicopters they get targeted by the script

#

maybe with a not iskindof parachutebase

#

or inheritsfrom

pallid palm
#

do you mean remove parachutes from helicopters ?

#

or did you want this "Steerable_Parachute_F"

#

oh i see you want to be able to Para jump into the no fly zone

#

i remember i did this before, and i just made it so helicopters, can't fly in the no Fly zone

#

but that was way back in Arma 2 !(_unit isKindOf "Parachute") or you can make the unit can not get damaged while in the chute (vehicle _player) allowDamage false;

polar belfry
#

I want in case someone ejects over it they don't get pelted by missiles while landing'

rain vessel
#

Does any one know any scripting to help AI planes Taxi properly on Altis largest airport .

polar belfry
#

where can I see the inheritance for kindof
Eg Air contains heli and plane

polar belfry
#

scotty's thing worked

#

I did this here
(["ParachuteBase", "UAV_06_base_F", "UAV_01_base_F", "UAV_02_Base_lxWS", "UAV_RC40_Base_RF"] findIf { vehicle _x isKindOf _x } == -1
cause I want many things to be excluded

meager granite
#

You can exclude this stuff much more efficiently with simulation checks

#

Also you can't do vehicle _x there as _x is a string

#

You can do

toLowerANSI getText (configOf _vehicle >> "simulation") in ["parachute", "paraglide"]
#

UAVs can be checked with isUAV flag, but this also includes large uavs

#

You can neatly exclude all backpack UAVs with some config checks

#
count getArray(configOf _vehicle >> "assembleInfo" >> "dissasembleTo") > 0
``` will be `true` for anything that can be disassembled into a backpack
pallid palm
#

wow awsome

polar belfry
#
{
    (vehicle _x) in thisList &&
    (vehicle _x isKindOf "Air") &&
    (side (crew _x select 0) == WEST) &&
    (["ParachuteBase", "UAV_06_base_F", "UAV_01_base_F", "UAV_02_Base_lxWS", "UAV_RC40_Base_RF"] findIf { vehicle _x isKindOf _x } == -1) &&
    ((getPosATL (vehicle _x)) select 2 > 10)
} count allUnits > 0

So for this I do this?

{
    (vehicle _x) in thisList &&
    (vehicle _x isKindOf "Air") &&
    (side (crew _x select 0) == WEST) &&
    !(vehicle _x isKindOf "UAV_RC40_Base_RF") &&
    (count getArray (configOf vehicle _x >> "assembleInfo" >> "dissasembleTo") == 0) &&
    !(toLowerANSI getText (configOf vehicle _x >> "simulation") in ["parachute", "paraglide"]) &&
    ((getPosATL (vehicle _x)) select 2 > 10)
} count allUnits > 0

#

fixing it

meager granite
#

Whatever is more convenient for you, but doing config checks is always more universal than listing classes

#

in case you'll add mods later or something like that

polar belfry
#

that one is special cause it's the RF uav 40mm drone

pallid palm
#

man lol, i just made a Para Eject script,

#

where the player don't get damaged till he or she is on the ground

meager granite
pallid palm
#

thats really cool stuff guys Awsome @meager granite @polar belfry

polar belfry
#

The no fly zone was made cause my players would find creative ways to long shot a radar

pallid palm
#

i see, yeah i had to do lots of stuff also, to stop players from doing stuff , i didnt want them to do, thats just part of the game i guess

tepid hemlock
#

Quick question. The CustomWaypoint (Shift+LMB) on the Map... There is no way to set and/or delete this waypoint with code?

pallid palm
#

ummm maybe by radio trigger ?

#

i really don't use any way points ever, so i'm just guessing kinda

tepid hemlock
#

Thanks. But a Radio Trigger won't help much, if there is no actual command to set it.

pallid palm
#

i forget can you even name way points

#

if you can name it you can delete it

#

i remember scripting waypoints then its easy to delete them

tepid hemlock
#

The CustomWaypoint is not one of them

pallid palm
#
//WP0_Sub1
wp0 = _Uboatgrp addWaypoint [getMarkerPos "WP0_Sub1",0];
wp0 setWaypointType "Move";
wp0 setWaypointSpeed "FULL";
//WP1_Sub1
wp1 = _Uboatgrp addWaypoint [getMarkerPos "WP1_Sub1",0];
wp1 setWaypointType "Move";
wp1 setWaypointSpeed "FULL";
//WP2_Sub1
wp2 = _Uboatgrp addWaypoint [getMarkerPos "WP2_Sub1",0];
wp2 setWaypointType "Cycle";
wp2 setWaypointSpeed "FULL";
tepid hemlock
#

But thats a normal waypoint, not the one to Shift+Mapclick

pallid palm
#

yeah i wounder can you name waypoints that you mapClick in the editor

#

i guess they get named as you click them

tepid hemlock
#

A "setcustomWaypointPosition" command would be nice..

stable dune
tepid hemlock
#

No. But I dont see how that would help. The custom waypoint is either set and has a position (in this case it overrules the normal waypoint) or is deleted/NULL.

#

But thanks.

polar belfry
#

is there a get or to command to get something that has all (Eg above water to be ASLW, above ground to be ATL)

warm hedge
#

Use max command etc to find which is higher

polar belfry
#

and use that?

warm hedge
#

Do whatever you want

broken pivot
#

Hey there :D
Im into building into variable problems. Maybe someone can help me.

I want to give a publicVar to every typeOf an object I place down.
Thats the way Im going:

addMissionEventHandler ["EntityCreated", {
    params ["_newEntity"];

    if (typeOf _newEntity isEqualTo "rhs_2b14_82mm_vmf"
    ) then {
        _newEntity setVariable ["Mortar", "Mortar", true];
        publicVariable "Mortar";
        _mortarCrew = east createVehicleCrew Mortar;
...
...
...
#

Im meanwhile into try and error because I cant explain it to myself

warm hedge
#

Why, is the first question

broken pivot
#

Because I need this object with this var
simple, right?

warm hedge
#

What do you want to do with that "Mortar"?

broken pivot
#

Shoot automaticly after beein placed

warm hedge
#

Thing is, anyways, your first two lines, both don't define "Mortar" in missionNamespace (aka default namespace)

proven charm
#

AI generated script?

broken pivot
#

So at first: a variable is defined and stored in missionNamesapce wich is also the main/default one?

proven charm
#

just curious

broken pivot
proven charm
#

hmmm

warm hedge
#

Mortar = _newEntity
This defines Mortar in missionNamespace

#

publicVariable "Mortar"
so the variable is synced to every client

broken pivot
#

Copy confirm

#

Simple as genius

#

I tried similar but failed like always a centimeter from goal away haha

warm hedge
#

_newEntity setVariable ...
is basically defining a variable within the entity, not missionNamespace

#

The variable is "Mortar" string, though

#

Not the object

broken pivot
#

Okay thats not easy because I cant imagine a usage of a var inside the localization of an object.

warm hedge
#

tldr, you were wrong

broken pivot
#

Thats what Ive did now

warm hedge
#

Even though, that script you really want to execute may not require publicVariable etc, at least my glance says, but that's different story to this question

broken pivot
#

But it wont spawn a crew inside still

#

But the target for createVehicleCrew is given, thats what confuses me

meager granite
#

Spawning crew in EntityCreated is very wrong

#

Spawn it where you spawn the mortar itself

#

This pretty much forbids you from ever spawning an empty mortar if you'll ever need it or something else does

broken pivot
#

All good

warm hedge
#

Anyways, I would make sure if the script is actually running

broken pivot
#

Wich?

broken pivot
warm hedge
#

Ou ping sorry

broken pivot
#

I dont know as well haha

warm hedge
#

Debug it, aka use a very obvious command that outputs very obvious result

#

Like hint

broken pivot
#

But I need a mortar with the name "Mortar"
and a invisible helipad named MortarTarget

warm hedge
#

No, "but" is not the question

broken pivot
#

Bro

#

all good

#

thank you

#

i will wait for my people if your in a bad mood at the moment

warm hedge
#

Nah nah, I am saying just hint it

broken pivot
#

There is nothing to hint in my eyes

warm hedge
#

To make sure your code is at least running

broken pivot
#

Thats why I feel kinda trolled

warm hedge
#

The chance is, the entire code may simply not running

broken pivot
#

I know... but I think that we cant know because the code stops with the crew spawning thing

warm hedge
#

And that's why I say hint

#

Debug 101: use a obvious command to see if the code is actually running or not. If yes, pull your hair. If not, pull your hair

broken pivot
#

Sorry for my reaction but I think I got you know

#
    if (typeOf _newEntity isEqualTo "rhs_2b14_82mm_vmf"
    ) then {
        Mortar = _newEntity;
        publicVariable "Mortar";
                hint "Var granted";
        _mortarCrew = east createVehicleCrew Mortar;
        if (alive _mortarCrew

You mean like that?
I thought that I can skip that because the AI isnt getting spawned in the mortar

warm hedge
#

Basically yeah

broken pivot
#

no hint shows up

warm hedge
#

See?

#

You didn't see it, now pull your hair

broken pivot
#

Yeah like I said

#

I misunderstood

#

I want to apologize bro haha

winter rose
#

don't fight over code! fight code

warm hedge
#

That means, your method/theory before the if or if itself is somehow wrong

warm hedge
#

I'm not mad, unlike the entire task you just try to step in is

#

Welcome to the Bald Club

broken pivot
#

hahahaha

#

Okay so another solution is needed to give the mortar typeOf its classname in namespace/ missionNamespace

#

Do you have an idea? Mine is dead now. Even if the only way has to be connected with the EventHandler.
I know no other way to detect a placed down object

warm hedge
#

Make sure if the EntityCreated is even running

broken pivot
#

It is, Im getting an error by placing the podnos

#

But the error is created after the hint is not getting launched

warm hedge
#

I see

#

What do you want to achieve by checking it?

broken pivot
#

If the skript needs to change to stop mode.
That includes that the player killed the gunner and the MortarTarget doesent needs to be there anymore

stable dune
# broken pivot

your are checking Group not object with alive check
Check if given vehicle/person/building is alive (i.e. not dead or destroyed).

So you need check if xx unit in crew is alive.
So get gunner of "vehicle" mortar, and check that.

broken pivot
#

I think Ive fixed that ->
(alive ((units _mortarCrew) select 0);

warm hedge
#

Well, you just spawned the group?

broken pivot
#

I used createVehicleCrew

warm hedge
#

Yes, you just spawned them, so they (theoretically) cannot be dead

broken pivot
#

100%

#

So they start

#

But if the gunner is dead becuase he got killed the script needs to stop

warm hedge
#

Well, the thing is, the script ran in one frame

#

It does not stop, suspend

stable dune
#

If you are using your while loop with 60sec delay, you only can check every 60sec is your gunner dead,

private _time = time;
while {alive gunner Mortar} do {
     if (_time < time) then
    //Spawn your stuff
     _time = time + 60;
     };
     sleep 1;
}

It will check every 1 sec is your gunner alive, and every 60 sec move target

winter rose
#

you could use an event handler on the gunner or the turret

drifting badge
#

Having a bit of an issue with the following simple script that I need to work in an MP environment:

_groupleader setUnitPos "UP";
_groupleader disableAI "MOVE";
_groupleader playMoveNow "AmovPercMstpSnonWnonDnon";

I wanted the AI to just move on in the direction it is facing when the player tells it to do so (it is in an addaction), but while it does play the animation and makes a few steps it breaks off the animation and then returns to the standard stance and stops. Do I need to put in some kind of loop?

broken pivot
broken pivot
winter rose
#

no worries, this channel is here for that as well :)

drifting badge
#

Ah figured it out, it works if I include a disableAI "ANIM";

chrome iron
#

Hello! Does anyone have a description for PvP missions? I need it so that when the blue team wins, the red team gets an image and text showing they failed. Similarly for the blue team โ€“ if the red team wins.

I wrote the description manually, but it didnโ€™t function correctly for some reason

stable dune
drifting badge
#

How can I make the turn towards the new "heading" (in this case 22.5) being incremental (so it looks a bit more natural) and not immediate (as it is at the moment)?

_newdir = [vectorDir _groupleader, 22.5, 2] call BIS_fnc_rotateVector3D;
_groupleader setvectordir _newdir;
thin fox
tender fossil
thin fox
tender fossil
drifting badge
#

like:

for _i from 0 to 22.5 do {
_groupleader setVectordir _newdir;
sleep 0.05;
};```
proven charm
drifting badge
#

oh like I mentioned above the initial code works just fine and exaclty like it should - but I just want it not to be instant but incremental (as in somewhat "smoother" than instant snapping to the new heading)

thin fox
#

okay, we were just thinking about a more dynamic way to do it

#

so you could use in other examples

rain vessel
#

Any scrips out there for AI planes to follow taxi ways properly

thin fox
#

if the airport is registered in the map as default, you just place the airplane in the taxi way and the AI do the job, you just need to check if it's the right direction for taxiing

rain vessel
#

My planes do alot of cross country to get to the take off point from the Gates .Iv resorted in trying my hand with coding ,and I can't code .

rain vessel
#

Where would I find info on how to achieve that .Im new to arma 3

rain vessel
#

Thank you kindly

thin fox
# rain vessel Thank you kindly

I've never done myself a dynamic airport, but take the carrier config example in the link, and take the positions of the map (array format [X,Y]) and edit each format position for taxi and ILS

#

only ilsDirection you need to take Z pos into account

jaunty ravine
#

Is it possible to temporarily disable thermal imaging in binoculars, either through some post-processing effect or via script commands?

rain vessel
thin fox
#

you can place objects, markers... anything to get the positions

rain vessel
#

Then expand on that code ,what file do I place it in Init.sqf?

thin fox
rain vessel
#

Got ya ,gona give it a crack

#

I will let you know ow how I fair

chrome iron
thin fox
#

do the same for both teams

#

Idk what is the condition to end your mission, but the onAct code should be the same idea

hollow solar
#

not sure what channel to post this, anyone knoinw why?

sweet vine
#

Trying to check if there's a body of water between two positions or if AI can path find from one pos to another using a land vehicle, just can't quiet figure it out, any pointers?

did try calculatePath, not sure that's a suitable approach a recurring check however

#

I recalling seeing a command to check if two locations were connected, but can't quiet find it again, if it ever existed lol

open hollow
#

spawn an unit ( agent ideally), add the eh to it, tell him to go to some point, get the result, and delete the unit

#

will be nice to have an command to do this more efficiently tho

#

ded? blobcloseenjoy

queen cargo
#

@signal flume No
Variables are only synced on changes and only if you make them public (using the third argument on setVariable) --> JIP players might see a big impact but that should not be from interest for you
There is also no realistic limit on how many variables you can use (as Quiksilver already did, you just can throw random numbers in the room until one tries) but what is known: they can have an impact on the speed that they get resolved
more variables might result in longer access time for them (we talk about ms here)

In the end, your biggest concern should be the object count
many objects might mean many syncs of their position (if it is AI) but thats the usual thing
to finalize this lil post:
Forget about the variables and just code normally
Objects/Vehicles/Units (however you want to call em) will get your problem
not the variables

drifting badge
#

@thin fox - thanks for your input earlier, everything worked well with using "for"

drifting badge
#

Just had a test with a friend and noticed that my addactions (currently placed in the INIT field of an AI unit), that do work in singleplayer, do nothing in multiplayer (only for me but for nobody else).

this addaction ["<t color='#f5d442'>Forward!</t>","scripts\forwardTEST1.sqf",[],1,true,true,"","_this distance _target < 20"];

Do I need to use that remoteExec somehow? I do have difficulties transfering the addaction I have in SP to the remoteexec one, because

[_target, ["TEST FOR MP MOVEMENT", "scripts\forwardTEST1.sqf"]] remoteExec ["addAction", _target];

does not even show up? Am definitely doing something very wrong here.

lavish stream
stable dune
drifting badge
#

@stable dune - the addactions did show up for everyone but I was the only one who could initiate them (i.e. see the unit move and execute the command of the sqf file)

tough abyss
#

I have a probably stupid question but here it goes.

On an official zeus server can I have a script offload some amount of processing to a non-local client. It seems from the docs that I probably can only remoteExec built in functions, and/or the client would need to already have the function I want to run defined. If this is the case is there a way to provide a function to a client from the server without the client needing to explicitly load a mod? Is there a way to see what CfgRemoteExec looks like on an official server or just trial and error?

If its not possible on an official server, what about one I can configure?

I understand on a public server giving /anyone/ the ability to run /anything/ on a client is asking for trouble so I get it if there is no way to do so. Realistically what I want to do is see if I can offload single execution computationally heavy to something like a headless client to prevent server lag while processing and ideally not requiring client side mods and minimal server specific configuration. I only mention official server because I would like to maintain compatability in pub zeus too but its not strictly a requirement.

drifting badge
#

so if I get you right it is not the addaction but the script that is broken

stable dune
drifting badge
#

so if my simple "forwardTEST1.sqf" script has only the following

_groupleader = man1
_groupleader playMoveNow "AmovPercMwlkSnonWnonDf";

the addaction in the init field would still remain

this addaction ["<t color='#f5d442'>Forward!</t>","scripts\forwardTEST1.sqf",[],1,true,true,"","_this distance _target < 20"];

but how do I integrate the code you linked

 [[...], "script.sqf"] remoteExec ["execVM", 0]

into the "forwardTEST1.sqf" script? I feel like I am missing something important here.

stable dune
#
"forwardTEST1.sqf" remoteExec ["execVM",0];
round hazel
#

Hey folks, I've written a simple wave defence system and i'm running into a small niggle. Spawned enemy groups just stand in place, despite me giving them a 'Destroy' waypoint upon creation. I've read that the 'Combat' behaviour can cause this, but that doesn't seem to be the case for me. Any ideas?

["<t size='2.5' color='#ffffff' font='PuristaMedium' >The Horde Approaches!</t>",0,0.2,3,1] spawn bis_fnc_dynamictext;
currentTime = 0;
waitTime = 10;
_spawnWave =
{
    groupSize = [4, 10] call BIS_fnc_randomInt;
    currentGroupSize = 0;
    _grp = createGroup East;
    posToSpawn = leader Guards2 getPos [100, random 360];
    while {currentGroupSize < groupSize} do
    {
        _newUnit = _grp createUnit ["Zombie_O_Walker_Civ", posToSpawn, [], 10, "NONE"];
        currentGroupSize = currentGroupSize + 1;
    };
    _wp = _grp addWaypoint [getPosASL leader Guards2, -1];
    _wp setWaypointType "DESTROY";
    _grp setBehaviour "AWARE";
};


while {currentTime < waitTime} do
{
    call _spawnWave;
    _waitTime = random 40;
    currentTime = currentTime + _waitTime;
    sleep _waitTime;
};
["<t size='2.5' color='#ffffff' font='PuristaMedium' >You have survived for now!</t>",0,0.2,3,1] spawn bis_fnc_dynamictext;
#

And if it helps, the leader remains stationary while the rest of the group either moves around randomly, or on the occasion I've directly given them a new waypoint in zeus, moved to the waypoint, leaving the leader behind

proud minnow
#

is there any way to make a script to make people join to my server through the middle box ? and removing the others two?

trail smelt
#

yes

trail smelt
last cave
#

I thought about showing on the map what another client who is in the camera "camera" camcreate is looking at. And I would like to know, is the camera object created locally or in the network? Is it possible to create a camera so that other players could track the position and view of the camera that was created by another client?

hallow mortar
#

camCreate is Local Effect, so the camera only exists on the machine where the command was executed.
To get around this, you could (not an exhaustive list):

  • create cameras on all machines with the same parameters (works well for cameras that are static, script-controlled, or attached to things, not so much for player-controlled free cameras)
  • have the camera-owning machine publish information about its position and orientation using e.g. setVariable (works OK for free cameras, but update rate could be an issue)
jade abyss
#

So setVariable with "true" is like "publicVariable" ?

sweet vine
meager granite
#

Can't you create global camera with createVehicle? Not sure if I tried. Still, it might not have interpolation and it could be easier to just do your own.

proud minnow
still forum
austere granite
#

Kind of. PublicVariable being in missionNamespace and setVariable setting it to the namespace of an object

crude tendon
#

Hello. I almost have no experience at Arma scripting and I'm curious if I am checking TaskState properly.

{
    hqdriver sideChat "Yes, Got it. Looks like they are restoring the power in the area. Beware of the patrols which are coming into your area. The extraction is waiting for you in the marked location.";
}
else
{
    hqdriver sideChat "Yes, Got it. I'm glad you've managed to find these docs and survive without disabling the light. Anyways - I've overheard that two patrols are coming into your area. Extraction awaits for you in the marked location.";
};```
proven charm
#

looks like it , if optgen is infact a task

crude tendon
#

Thank you.

meager granite
#

Or does it go through entire RE stack and does exact string comparison

still forum
#

It iterates over every message in the JIP queue, for every object thats being deleted. Checking the object ID's on every JIP message that has one

meager granite
#

Some time ago I was suggesting to allow multiple REs per object by having object id as prefix in string instead of full match

still forum
#

object id is a number, not a string. Can't really have a prefix or something

meager granite
#

Meant netid

still forum
#

netid is also not a string

#

We could add a extra variable onto it to store some string suffix/prefix for jipID separately

meager granite
#
123 remoteExec ["func", 0, player];
321 remoteExec ["func", 0, netid player]; // overwrites above JIP RE
#
123 remoteExec ["func", 0, player];
321 remoteExec ["func", 0, format ["%1 something", netid player]]; // No longer overwrites but also applies to prefixed netid
#

something like this

still forum
#

something like that, theoretically possible

meager granite
#
123 remoteExec ["func", 0, player];
321 remoteExec ["func", 0, [player, "something"]]; // Convenience, have remoteExec function treat array as prefix and suffix
#

This way mods could add JIP REs to entities without fearing overwriting mission or other mod JIP REs

#
123 remoteExec ["func", 0, player];
321 remoteExec ["func", 0, [player, "MYMOD_init"]];
333 remoteExec ["func", 0, [player, "MYMOD_somethingelse"]];
#

(forgot to remove format)

austere granite
#

When I want to change player sides on respawn, what would be the recommended course of action. EZ mode creating a group on the target side and then making sure (group player) is used everything, or using createUnit and selectPlayer on that.

last cave
#

My code for displaying the laser at the exit point does not track the rotation of the proxy SIDE. I need to somehow add the result of dirandup from the weapon object here, but I do not understand mathematical matrices.

//simpleObjects ow = weapon, oa = pointer
_p=oW selectionPosition ["proxy:\a3\data_f\proxies\weapon_slots\side.001", 1];//pos proxy
oa setPosWorld (ow modelToWorldWorld _p);//pointer on side pos
_a=ow selectionVectorDirAndUp ["proxy:\a3\data_f\proxies\weapon_slots\side.001", 1];
oa setvectordirandup _a;//pointer rotate how must be.

the screenshot shows that the pointer is tilted and also rotated 180 degrees along the Y axis (probably Y, I don't know). The proxyWeapon rotation is taken into account, but the proxySide rotation should also be taken into account, but I don't understand where to add this rotation to find the position relative to the rotation of both the weapon and ProxySide.
#arma3_scripting message

#

My code with part format.

/*
_DataLaser = [["CUP\Weapons\CUP_Weapons_FNFAL\CUP_fnfal5063_ris.p3d","\A3\weapons_f\acc\accv_pointer_F",[-0.0424448,0.000860501,0.0175099]]]
_DataWeapons = [["CUP\Weapons\CUP_Weapons_FNFAL\CUP_fnfal5063_ris.p3d",[-0.289515,0.0159688,0.128267],[[-5.96046e-08,-0.886978,-0.461812],[-8.9407e-08,0.461812,-0.886978]]]]

_DataWeapons#0#2  == vectorDirAndUp selection Proxy SIDE;
need use _DataWeapons#0#2 for apply vectorDirAndUp

*/
_proxy = format ["proxy:\a3\characters_f\proxies\%1.001",_type];
_posData=(_DataLaser#0#2) vectoradd (_DataWeapons#0#1);
_posData = _posData apply {[_x]};

_unit selectionVectorDirAndUp [_proxy, 1] params ["_vy", "_vz"];
private _pos = selectionPosition [_unit,_proxy,0,true,"FirstPoint"];
private _posDir = +_pos;
private _vx = _vy vectorCrossProduct _vz;
private _mat = matrixTranspose [_vx, _vy, _vz];

//Retrieve position data
private _offsetLa = _posData;
private _directionLa = +_offsetLa;

//Compute position of memory point
private _posOffLa = +(_pos vectorAdd flatten(_mat matrixMultiply _offsetLa));
private _p1La = _unit modelToWorldVisualWorld _posOffLa;

//Compute direction point and vector
private _directionTLa = _directionLa #0 #0;
_directionTLa = _directionTLa - 10;
(_directionLa #0) set [0,_directionTLa];
private _posDirLa = +(_posDir vectorAdd flatten(_mat matrixMultiply _directionLa));

private _p2La = _unit modelToWorldVisualWorld _posDirLa;
private _v2La = _p1La vectorFromTo _p2La;

drawLaser [_p1La, _v2La, [1000, 0, 0], [], 0.1, 0.35, -1, false];

#

In this screenshot I removed the offset inversion for the pointer.
The starting point is higher only because the position needs to be moved relative to the ProxySide rotation and not the default rotation [[0,1,0],[0,0,1]]

#

If this problem is solved then most weapons will be able to correctly support laser pointer positions via drawLaser. (I don't understand why they didn't give us a command that would allow us to get laser pos and laser dir on weapons without these hundreds of checks and calculations on the client side with crutch created by simpleObject...)

Instead of all this there would be such a beautiful line of code. โค๏ธ

//getWeaponItemSelectionInfo - return [ASL POS laser start, laser direction vector]
drawLaser ((_unit getWeaponItemSelectionInfo CurrentWeapon _unit) +[ [1000, 0, 0], [], 0.1, 0.35, -1, false]); 

It can even be used to check for collisions to simulate the fact that the bot noticed the laser and received information about where the one using the laser is standing. It doesn't even matter if it's IR or visible

last cave
#

I hope someone can correctly calculate the vectors for the laser start position in my piece of code. meowawww
||After I test it, I will be able to post the full code that can be launched with any mod without any configs or templates. (The problem of laser collision with a large model size (usually machine guns) will not be solved)||

crude tendon
#

I used BIS_fnc_taskState and it worked.

proven charm
#

i think the BIS_fnc_ task functions are a different system (and old) from actual task objects/commands

crude tendon
#

I think taskState doesn't work in SQF as intended

proven charm
stable dune
proven charm
#

but the bis fnc stuff creates a string id

crude tendon
stable dune
proven charm
#

it seems the editor task module uses the BIS_fnc_ functions

stable dune
#

Yeap. it does

crude tendon
#

Is it really the reason taskState didn't work? It sounds funny, they do the same thing!

stable dune
#

yes.

versed trail
#

In-game, you can hold alt and drag on a user created marker to move it around. is this functionality to move markers available for scripts, somewhere, or will it work if I make the marker as a _USER_DEFINED marker? I'm trying to make markers spawned by scripts be player movable in a more simple way than my original plan of handlers for mouse movement on map

still forum
#

Or well. Yes and no (but also yes).
The moving around is a feature from ACE mod.
But afaik it also checks that.
And that user defined thing, does the showing players name as tooltip, and being able to delete the marker

spiral canyon
#

Is there a way to detect if a vic is on a road and if it goes off the road it starts taking slow % damage so players are required to keep it on the road?

still forum
#

Is isOnRoad a command or am I miss remembering that?

spiral canyon
#

I see it in the wiki, I will give that a try. Thanks

open hollow
#

there is any documentation on how "swiming" works in arma?

i wanted to do currents in water, so if you want to cross a river, make it more difficult, on vehicles you can use addforce, but on players... you cant ( since it ragdols), and if you try to use setVelocity, animation will be like running

#

i guess i can do a "swiming" script, and use the set velocity there...

spiral canyon
spiral canyon
round hazel
#

Gonna try again here. Having a bit of issue with this wave spawner script, spawned enemies don't follow the waypoint I add to them, they just stand around, but if I give them a waypoint in zeus, they move towards it. Any ideas what's going on? Cheers

P.s. the units are zombies from WebKnight's Zombies and Creatures if it helps!

["<t size='2.5' color='#ffffff' font='PuristaMedium' >The Horde Approaches!</t>",0,0.2,3,1] spawn bis_fnc_dynamictext;
currentTime = 0;
waitTime = 10;
_spawnWave =
{
    groupSize = [4, 10] call BIS_fnc_randomInt;
    currentGroupSize = 0;
    _grp = createGroup East;
    
    posToSpawn = leader Guards2 getPos [100, random 360];
    while {currentGroupSize < groupSize} do
    {
        _newUnit = _grp createUnit ["Zombie_O_Walker_Civ", posToSpawn, [], 10, "NONE"];
        currentGroupSize = currentGroupSize + 1;
    };
    _wp = _grp addWaypoint [getPosASL leader Guards2, -1];
    _wp setWaypointType "MOVE";
    _grp setCurrentWaypoint [_grp, 1];
    
};


while {currentTime < waitTime} do
{
    call _spawnWave;
    _waitTime = random 40;
    currentTime = currentTime + _waitTime;
    sleep _waitTime;
};
["<t size='2.5' color='#ffffff' font='PuristaMedium' >You have survived for now!</t>",0,0.2,3,1] spawn bis_fnc_dynamictext;
spiral canyon
proven charm
#

there shouldnt be need for setCurrentWaypoint but you can try zero there

round hazel
#

Messed around with it and for some reason the move waypoint spawns in the middle of the ocean

#

Both with zombies and some Nato guys

limpid briar
#

guyss teach meee

#

teach me this cool stuff you do

granite sky
round hazel
#

Ah gotcha. Guards2 is a group i have placed in the eden editor, with Guards2 as variable name. Is there any way I can reference this group or do I just have to input the actual position?

fair drum
round hazel
old owl
#

Is it normal and intended behavior for mission scripts to run and diag_log prior to

16:14:31 Starting mission:
16:14:31  Mission file: <mission name>
16:14:31  Mission world: <mission world>
16:14:31  Mission directory: <mission directory>

In a multiplayer mission? Or is this a bug from the new profiling? Not sure where that is supposed to fall in initialization order

fair drum
#

If you use guards2 in the variable attribute on the group in the editor, this reference is made during object init, which is before your mission even starts.

#

Are you modifying the group at all? Or changing the units to a different group at all? During the mission before this trigger activation?

#

Oh I see you have a previous comment, let me look at it

old owl
fair drum
round hazel
#

Still exist. Guards2 are a group whom the spawned enemies are supposed to move towards and kill

fair drum
#

Do some logging. See what guards2 is returning as at that time. Same with the positions you are using. This is something logging can easily find. On phone so I can't write anything easily for you.

fair drum
granite sky
#

@round hazel Type units Guards2 into the debug console and see what it returns.

fair drum
#

And does it go away when going back to stable branch?

round hazel
#

[B Alpha 1-2:1,B Alpha 1-2:2,B Alpha 1-2:3,B Alpha 1-2:4,B Alpha 1-2:5,B Alpha 1-2:6,B Alpha 1-2:7]

#

Position of waypoint is origin

#

However the units spawn in a 100m radius around guards as intended

granite sky
#

Wait, I was misreading the problem anyway

#

You said later about the waypoint spawning in the ocean.

#

Original code was just not following the waypoint, but it was in the right place?

round hazel
#

That was a later discovery, the waypoint spawns close/at the maps origin. I've been testing and believe it could be to do with getPosASL

granite sky
#

Wasn't that after you used setCurrentWaypoint with 0?

#

0 waypoint is often at [0,0] for some reason.

round hazel
#

I have to go eat but I will return, thanks for the help so far everyone!

old owl
# fair drum I haven't noticed any issues spawning, both in vanilla respawn systems and my cu...

A player put in a bug report that he was unable to respawn using a custom system within our mission. When I took a look at his attached RPT it looked like he hit an exitWith we had for the script already being active. I looked into it further and it looked like other systems of ours were executing prior to initialization causing a widely used var of ours to become undefined.

I think I've at least seen four or five people with the issue myself but just not sure if it's an actual issue with profiling. We spawn some of those scripts on initialization so could also just as easily be our own apeish fault for having some of that stuff spawned as it's execution order wouldn't be guaranteed.

#

I guess TLDR is I am certain it is being caused by profiling but just not sure yet if it is due to a race condition within our mission or some larger issue with the profiling update

quaint oyster
#

Perhaps a silly question, but does Arma 3 have a method to detect what day the server host currently has in real life? I am wanting to make it so on weekends the missions themselves change.

queen cargo
#

@austere granite createUnit
you should not mix up blufor units with non-blufor units

#

@jade abyss it is even worse! <NAMESPACE> setVariable [<STRING>, <ANY>, true] is even better then public variable as you just need one command ๐Ÿ˜ƒ

drifting badge
#

I have been wondering about this for a while now, if you have a group of lets say 5 soldiers (either lead by and AI or by a player) is it possible to select the various soldiers according to their position in the group without giving them a dedicated name in Eden? Like if you do a thislist on the group (not sure if there is a better way than thislist) and then go "select 0" for the leader, "select 1" for soldier 1 (which the player would select using F1), "select 2" for the soldier 2,...

The reason I ask is I want to transform some of the scripts I have, which use named units, to a more general script that I can more easily copy paste or use on "created units" (i.e. not placed in the editor but those spawned via scripts).

The second thing I have been wondering, if you have a

{...some code...} forEach units group this;

can you exclude one of the units doing something like

{...some code...} forEach units group this (-leader group);

or with the thislist above lets say to exclude soldier 5

...forEach units group this (-(thislist (select 4))

because I tried but could not get that to work (so I got to wonder if that is even possible).

Thanks guys.

drifting badge
#

oh thanks @stable dune did not know about deleteAt, that is neat!

still forum
proven charm
#

does anyone know if its possible to take a tent object from CUP and put the redcross texture from other tent (that looks the same) to it?

winter rose
#

poor GenCoder8

proven charm
sacred kayak
#

I think they already removed the spam ๐Ÿ˜„

winter rose
proven charm
#

oh ok ๐Ÿ™‚

meager ember
#

problem solved

proven charm
#

the tent i mean

hallow mortar
proven charm
#

cant take texture from other tent? (which has similar model)

hallow mortar
#

If the object doesn't have hiddenSelections set up, you can't change its textures. There are no selections to target with the new texture. Doesn't matter where the new texture came from.

#

If it does have hiddenSelections set up, it's likely the other tent's texture will fit, and you can use setObjectTexture to apply it.

proven charm
#

ok thx. I tried selectionNames if thats what you mean? it returned empty array

hallow mortar
#

rightclick > inspect in Config Viewer > does hiddenSelections attribute exist

proven charm
#

cant see it

stable dune
proven charm
#

ah thx prisoner i was looking from wrong place. so I guess that means a no

#

related question, what about hiding parts of the object, where are those options listed?

#

hmm arma just froze when trying to start mission. it must not like CUP or IFA

jade abyss
#

Oh boy

tulip ridge
proven charm
#

is that same what you get with selectionNames command? because I get lot of entries from there, just dont know how to hide them

tulip ridge
#

Not necessarily
Things in AnimationSources will use points on the model, but not everything from selectionNames would have an animation source

proven charm
#

ok the object im working on doesnt have anything on AnimationSources

tulip ridge
#

Doesn't seem like you can hide any of it then

proven charm
#

even selectionNames gives a list? ๐Ÿค”

tulip ridge
proven charm
#

ok thx

drifting badge
#

Noticed something weird - am using the following code in a "gamelogic" to remove a percentage of trees on a custom map that has way, way too many trees on it (making the forrest area unusable by players).

0 spawn {
   
    sleep 10;
   
_tree_perc = 66.66;

_tree_fac = round (100 / _tree_perc);

_trees = nearestTerrainObjects  [[worldSize/2, worldSize/2], ["TREE"], (worldSize * 1.41) , true, true];

{
 if((_forEachIndex + 1) % _tree_fac isEqualTo 0) then {_x hideObject true;};
} forEach _trees;

};

Weirdly enough if I go above 66.66 percent it removes all the trees for some reason.

I then figured ok I just use a second gamelogic with the same code and change the last portion to include a check if the objects are not hidden && (!isObjectHidden _x) as well as as forEachReversed _trees; on the tree array:

{
 if(((_forEachIndex + 1) % _tree_fac isEqualTo 0) && (!isObjectHidden _x)) then {_x hideObject true;};
} forEachReversed _trees;

...but for some reason I do not see additional trees getting removed (even put in a different "sleep" time so I can observe the changes. I then tried the same without the isObjectHidden check and also no difference.

Any idea what is wrong?

still forum
#

Your 66.66% deletes every second tree.
Your factor calculation is just wrong

#

I would structure the code differently.

Get all trees.
numberToDelete = count _trees * percentage

Then delete that many tree's.

You can random shuffle the array and delete the first numberToDelete trees, or a for loop with selectRandom, or a forEach loop deleting every Nth tree.
every Nth tree (as you've been doing) is gonna be annoying, because N will not be a whole number

If you have 500 tree's and want to delete 66.67, you'd want to delete 333 tree's, every 1.5 tree's. That's annoying

drifting badge
#

Ah actually I want to delete more than 66.66 but if I go like 80 percent in the above used code, it deletes all the trees for some reason (i.e. if I only go to 66.67 it will delete all, so anything above the value of 66.66 will delete every tree).

still forum
#

I just told you the reason, and how to fix it.. Did you not read my message?

proven charm
#

what about these which selectionNames gives, are they any good? ```["proxy:\ca\misc3\fort_bagfence_long.001","proxy:\ca\misc3\fort_bagfence_long.002","proxy:\ca\misc2\table\table.001","proxy:\ca\misc2\table\chair.001","proxy:\ca\misc3\fort_bagfence_long.003","proxy:\ca\misc3\fort_bagfence_long.004","proxy:\ca\misc3\fort_bagfence_long.005","proxy:\ca\misc3\fort_bagfence_long.006","proxy:\ca\misc3\fort_bagfence_long.007","proxy:\ca\misc3\fort_bagfence_long.008","proxy:\ca\misc3\fort_bagfence_long.009","proxy:\ca\wheeled2\hmmwv\m997a2_ambulance\data\stretcher\stretcher.001","proxy:\ca\misc2\table\table.002","proxy:\ca\wheeled2\hmmwv\m997a2_ambulance\data\stretcher\stretcher.002","proxy:\ca\wheeled2\hmmwv\m997a2_ambulance\data\stretcher\stretcher.003","proxy:\ca\wheeled2\hmmwv\m997a2_ambulance\data\stretcher\stretcher.004","proxy:\ca\wheeled2\hmmwv\m997a2_ambulance\data\stretcher\stretcher.005","proxy:\ca\wheeled2\hmmwv\m997a2_ambulance\data\stretcher\stretcher.006","proxy:\ca\wheeled2\hmmwv\m997a2_ambulance\data\stretcher\stretcher.007","proxy:\ca\wheeled2\hmmwv\m997a2_ambulance\data\stretcher\stretcher.008","proxy:\ca\wheeled2\hmmwv\m997a2_ambulance\data\stretcher\stretcher.009","proxy:\ca\wheeled2\hmmwv\m997a2_ambulance\data\stretcher\stretcher.010","proxy:\ca\wheeled2\hmmwv\m997a2_ambulance\data\stretcher\stretcher.011","proxy:\ca\wheeled2\hmmwv\m997a2_ambulance\data\stretcher\stretcher.012","proxy:\ca\wheeled2\hmmwv\m997a2_ambulance\data\stretcher\stretcher.013","proxy:\ca\wheeled2\hmmwv\m997a2_ambulance\data\stretcher\stretcher.014","\ca\misc3\tent_east.001","\ca\misc3\powergenerator\powergenerator.001"]

open marsh
#

In vanilla arma 3 there's a artillery support requester module, how can i make it so that all blufor units can request artillery?

proven charm
#

you probably have to sync the requester module player synchronizeObjectsAdd [req] then player has it

remote cobalt
#

Hey Folks, I have a question because I don't seem to understand something completely here.

I would love to place a Hammer Turret on a Ship and through some ambient fire onto the coast while the players insert into the ao.

Checking the Hammer, it has an artillery computer and when asking with getArtilleryAmmo I get a nice array back. So, this is artillery right? Well, if I try using it with doArtilleryFire nothing happens.

Okay, well, maybe its a bit special, like the vls turret, so I make it watch a target and then give a simple doFire command. Well, it turns somewhat into the direction where the target should be and then it fires, but the shot drops into the water after a few meters.

Well the last problem is obviously because the fire mode is on "Close". Did anyone ever get this working via script and can someone explain what is wrong with using doArtilleryFire?

Here is the call with doWatch and fireatTarget:

west reportRemoteTarget [vlsTarget_1,2000];

hammer doWatch vlsTarget_1;

waitUntil {sleep 1; unitReady hammer};

hammer fireAtTarget [vlsTarget_1];

And here my do Artillery call;

hammer doArtilleryFire [_pos,1,"magazine_ShipCannon_120mm_HE_shells_x32"];
thin fox
thin fox
remote cobalt
#

Argh, what a stupid reading mistake. Thank you.

remote cobalt
thin fox
remote cobalt
drifting badge
#

@still forum - thanks for your help and input earlier, much appreciated (am not that good at math and coding and it takes a while for me to understand how to do things). I still wonder though why 66 percent works and everything above that number does delete everything with the code I had so far. In any case I will try to insert your suggestion and see if I can get it to work :)

rain vessel
#

Hi ,Im still trying to create a dynamic airport for Altis ,the large
Airport.
I tried using the Dynamic airport code in wiki ,asked AI to assist with code building ect but it's never going to work.Been at this for a week now everyday almost ,does anyone know of anything or anyone I can chat to regarding this goal.

thin fox
rain vessel
#

My planes cross country and dont use any of the taxi ways .

thin fox
thin fox
rain vessel
#

Will do .Thank you .If i wanted to edit it and place more points on the airfield

earnest ether
#

anybody knows how to add an button in the map screen on the upper right corner, sort of config.cpp class enhancement or something maybe
โ‚ฌdit: found out by myself -> configfile >> "RscDisplayMainMap" >> "controls" >> "TopRight" >> "controls" >> "ButtonPlayer"

tough abyss
#

is there a do { ... } while (x); in sqf?

warm hedge
#

while {} do {};

tough abyss
#

that still does execute the do block once before first check of the condition? @warm hedge

warm hedge
#

No, if the first condition is false already, it won't happen

tough abyss
#

ok

#

ill use something else, thanks!

warm hedge
#

What is the point you want to achieve

tough abyss
#

I prefer the former, but its fine.

do {
    {
        _containerIdCharacters pushBack switch (_x) do {
            case "A" : { selectRandom _characters; };
            case "0" : { selectRandom _numbers; };
        };
    } forEach _containerIdPattern;
    _containerIdString = _containerIdCharacters joinString "";
} while (_usedContainerIdStrings pushBackUnique _containerIdString == -1);
while (_usedContainerIdStrings findIf { _x == _containerIdString } > -1) do {
    {
        _containerIdCharacters pushBack switch (_x) do {
            case "A" : { selectRandom _characters; };
            case "0" : { selectRandom _numbers; };
        };
    } forEach _containerIdPattern;
    _containerIdString = _containerIdCharacters joinString "";
};
warm hedge
#

So at least do something once is just the point?

tough abyss
#

yeah pretty much

#

generate a unique number, check if it matches any of the previously generated numbers, if so try again

warm hedge
#
  // whatever
  if (condition) exitWith {};
};```
tough abyss
#

the former just lets me use the side effect of pushBackUnique to both do the check and for the number already existing and update the list of used numbers instead of the the latters findIf is a little less immediately obvious

exotic flame
#

I'm wondering, is there a way to scale an object in Arma 3 ? I'm making combvat rations and i'd like to have the expiration date on the box. I'm hesitating in between adding hiddenselections or attach a scaled object with appropriate textures

warm hedge
#

setObjectScale

exotic flame
# warm hedge `setObjectScale`

nice, thanks that i think its better to attach an scaled object with the text. It's flexible and reusable on other objects

ornate whale
#

Does the array reference behave like a smart pointer in C++? For example, if I declare a private array in a function A and pass it to another function B, and the function A ends right after, will B still have access to the array? Thanks

winter rose
#

ye

ornate whale
tawdry stump
#

How would I setup BIS_fnc_showSubtitles in order for it to work on MP?

ornate whale
#

Is a marker a data type (object) in SQF or is it just a string name? Thanks

hallow mortar
#

It's just a string

ornate whale
edgy dune
#

with animationSourcePhase "rpm" I can tell wat the rpm of a vehicle is, is there away to get what gear its in? ik theres nothing for gearbox for model cfg (and the only gear is for like landing gear)

ornate whale
#

Will this successfully terminate a spawned function?

isNil
{
    if (true) then {terminate _thisScript;};
};
//Don't execute beyond this line...

Or like this?

scopeName "fnc";
isNil
{
    if (true) then {breakOut "fnc";};
};
//Don't execute beyond this line...

I know there were/are some issues regarding exitting functions from within isNil.
Thanks.

still forum
#

I think for it to properly terminate, you need to force it to suspend.
So add a sleep 0.001 after the isNil

#

I'm pretty sure the terminate is one layer above the actual execution loop, so while inside the loop it wouldn't see it

tough abyss
#

@torn hemlock
That's cheating

oblique arrow
#

Helloh peeps, a friend asked me how to do something for an op he wants to do

Hey Pi, question. If I wanted something for an OP of my own that could be activated mid-game that would cause everyone outside a certain radius to instantly drop dead, and then can be turned off, how would I do that, if any that you know of?
my first idea on how to do it is to use 2 nearObjects checks
my first guess would be 2 sets of nearObjets checks, one that only checks the radius you dont want to kill and then another one that checks further outside that area and you subtract the smaller one from the big one
any better/other ideas or recommendations?

still forum
#

_inArea = _allUnits inAreaArray [...]
_unitsToKill = _allUnits - _inArea;
kill them

#

its unclear what "everyone" means. I consider that as everybody which means units. So no need for nearObjects scanning all objects, you can trivially retrieve a list of all units, and let inAreaArray do the filtering

crude tendon
#
    ["Alexander Viscera", "We've arrived back to the 'Union' camp. Give me the document.", 0],
    ["Bobr", "Here.", 5],
    ["Bobr", "Anyways, what is in there?", 7]
    ["Alexander Viscera", "How do I know? I've only got it! I'll tell you all you need before another operation.", 12],
    ["Bobr", "Another one?", 17],
    ["Alexander Viscera", "Yes, but I hope we won't need to go on another 'unplanned' operation. Call me at the morning. Now get out.", 21],
] spawn BIS_fnc_EXP_camp_playSubtitles;```
Help me, I did everything as said in BIS wiki and it still throws an error which I can't understand. It says that "]" is missing at the 12th line (fifth in this code block) but its structure is the same as in the previous lines.
ivory lake
#

you missed a comma

crude tendon
ivory lake
#

on the third line

oblique arrow
stable dune
oblique arrow
oblique arrow
ornate whale
#

Does getText return "" empty string when it doesn't find anything (no config or no config attribute exists)? Thank you

proven charm
#

yep

ornate whale
#

I assume that this won't work, right? Using a string as an argument representing a name of a class when it expects a config type.

//fn_someFunction
params [
    ["_classNameString", "SomeDefaultClass", [configNull]]
];

//Then call it like:
["SomeClass"] call fn_someFunction; //Error: a config type expected.

Thanks

proven charm
#

strings and configs dont mix ๐Ÿ˜ฌ

#

but you could do ```

params [
["_classNameString", missionConfigFile >> "SomeDefaultClass", [configNull]]
];

ornate whale
#

I guess I will have to manually validate the input then.

#

Because this is not really user firendly.

delicate tangle
#

Is there a way to check if a location is in the playerโ€™s view before spawning units?

delicate tangle
#

What is IS?

#

What about checkVisibility

thin fox
#

but you could also try with lineIntersectsObjs, terrainIntersectASL, checkVisibility,

ornate whale
# delicate tangle What about checkVisibility

checkVisibility will work, but you have to adjust the threshold, it can also take into account the foliage. Or you can use lineIntersectsObjs. If you are planning to place a bigger object there, like a tank, then it is a good idea to cast more then one ray to check also the far left/right/top edges of the area, not just the spot on the ground, which is usually not visible.

proven charm
thin fox
#

nearestTerrainObjects BIS_fnc_inAngleSector

ornate whale
delicate tangle
#

I dont want units spawned in view of the playerโ€ฆthats all Im going for.

jade abyss
#

b = false? ๐Ÿ˜„

spring stone
#

In this case is false equal to false which is true :3 At least if I think right!

stable mica
#

How do I setup an evac marker to appear when a task is completed? This is my current code for it, but it's not behaving if (triggerAcivated demoF) then {"Evac" setMarkerAlpha 1};

hallow mortar
#

if is a one-time check. Unless this code is running in a loop, this will check whether the trigger is activated, once, see that it isn't, and then give up.

#

You could use waitUntil instead - or change the marker alpha in the same code that completes the task

stable mica
#

I was putting it in the condition field on the marker, which says it checks constantly

hallow mortar
#

I don't think markers have condition fields

stable mica
#

Could be 3den enhanced or something, I'll try using the task succeded trigger

hallow mortar
#

Yes, added by a mod

#

Put triggerActivated demoF in the marker's condition field

#

The condition field will be "the condition to unhide the marker". You don't need to unhide the marker yourself in that code, you just need to make a condition that will return true or false. When it returns true, the mod will unhide the marker.

stable mica
#

if it doesn't work in the trigger I synced the task state succeed to, I'll try that. I'm also trying to figure out how I can have an area trigger check for a deployed turret

indigo snow
#

false isEqualTo false returns true

#

null isEqualTo null doesnt return anything

cosmic lichen
stable mica
# cosmic lichen Make sure that the condition returns a Boolean.

I synced the task state success to a trigger which is linked to the evac task create, I put the setMarkerAlpha code into the OnActivation of the trigger, so I'm pretty sure I set it up right. I was going to test once I figure out this turret code for another task

indigo snow
#

and as a bonus, (-0) isEqualTo (0) returns true as well

stable mica
#

I'm trying to use an exec to get the name of the deployed turret using unitTurret, but it's not returning anything

#

_vehicle unitTurret player

stable dune
stable mica
#

thought I tried that and it didn't like it. I'll try again in abit

stable mica
stable dune
#

So that is 1st turret

stable mica
#

Okay, so that's not what I was trying to do. I was trying to emulate that allMines deal to get the classname of the deployed turret so I can have a trigger area check for if the turret is deployed in it's area

stable mica
#

What command would I use to look for a vehicle classname in the trigger area?

#

Cuase if I start with it in a backpack on a unit, I can't exactly give it a variable name, so if I can have the trigger look for the classname, that should work afaik

faint burrow
stable mica
#

Now if i want a task to only create once two other tasks are complete, I want to use triggerActivated, but do I set it up as triggerActivated demoF, triggerActivated locateF or something else

stable mica
#

okay, so and instead of the comma

oblique arrow
#

then you wont have to worry about players seeing them spawn in but they also wont start blasting the player too early

delicate tangle
open marsh
#

hi guys

#

how can i sync support requester to any unit? any blufor unit

#

With scripts, not using editor, just syn to all BLUFOR units

proven charm
open marsh
#

yes i tried but it didnt work

#

when i switch to another unit it doesnt have access to support

proven charm
#

you mean like team switch or respawn?

open marsh
#

team switch

#

it works if u select and spawn in with chosen unit

#

but if u switch to another unit in ur team and do it, then it doesnt sync

proven charm
#

maybe ```

onTeamSwitch { player synchronizeObjectsAdd [req]; };

open marsh
#

hmm i feel like this module can only be attached to one person?

proven charm
#

dunno

open marsh
#

do u know any mod for fire support ?

proven charm
#

no

open marsh
#

really, tis most basic thing

#

calling in arty

proven charm
#

try my code?

open marsh
#

i tried and it didnt sync

proven charm
#

the onTeamSwitch code?

open marsh
#

yeah

proven charm
#

oh

open marsh
#

well i can also do it in debug console

#

after i switch

#

and then also it dont work

proven charm
#

what about onTeamSwitch { _to synchronizeObjectsAdd [req]; };

open marsh
#

well

#

it doesnt seem to do much

proven charm
#

hmm

#

it could work if onTeamSwitch would trigger but I couldnt get it to trigger

stable dune
proven charm
#

tried that too

#

but maybe i dont know how to properly setup team switch

hallow mortar
#

It's possible/likely that the module registers all its stuff when it's created, and syncing new units later won't cause it to do it again

#

e.g. on init it goes "okay, here are my synchronised units, add all the support actions etc to them" and then it's done, mission complete. Syncing a new unit doesn't inherently make it rerun its code, there is no EH for detecting synchronisation, and the module is probably not constantly checking to see if anything new got added

split ruin
#

any way to find flat terrain not using BIS_fnc_randomPos ?

_uberPos = [["enemy_area"], ["usa_base_area"], {true}] call BIS_fnc_randomPos;
proven charm
tough abyss
#

๐Ÿ˜›

split ruin
#

@proven charm I don't want to use BIS_fnc_findSafePos because it gives me 2D position and in lot of spawning script I need 3D pos

#

other reason is I have an area marker where I want enemies to spawn, with BIS_fnc_findSafePos I can only blacklist area marker

thin fox
#

for what do you need Z coords?

queen cargo
#

ye ... well @tough abyss
its the same thing with if <ANY>
the for command just marks the following value --> waste of command

split ruin
#

@thin fox I looked again my code and actually I don't need Z for anything ... ๐Ÿ˜‚ everything is working with BIS_fnc_findSafePos ...

split ruin
#

I swear it didn't worked with it yesterday ...

thin fox
#

I was going to say that you can add Z coords later in the code

split ruin
#

I can just add it to the position array ...

tough abyss
#

nope
B = if true
B isEqualTo B
-> true

#

pls test ingame

queen cargo
#

*should be the same

#

maybe the marking fucks up the string

#

hell i know

#

only thing is: for & if and many other commands are doing nothing else but marking the value

crude tendon
#

Hello. Can someone help me please? I don't understand why player's side is not changing (playerSide always returns EAST)

_PlayerArray joinSilent (createGroup independent);```
#

(bobr is the player's unit variable)

warm hedge
#

"bobr" is not an object but a string, bobr might be the object you look for

#

This code should return an error anyways

crude tendon
warm hedge
#

Just found out that it is not returning error. It shouldn't work anyways

#

But anyways sidePlyer is not actually updating while side player is

crude tendon
stable dune
#

And to be sure to check side group player

crude tendon
stable dune
crude tendon
drifting badge
#

Sorry guys but I am really struggling a lot with grasping addaction in MP and making those work for everyone. Things work just fine in SP, but in MP the actions only work for me as the host (i.e. if I execute the action, the other players see something happen, if they execute it, things happen for them, but do not translate to me AND it seems that the object reverts to the previous state, before executing the action, for them). It also seems the "actions" are "doubling" too for some reason (so instead of one entry I get two, when testing with one other player).

So if my test sqf works in SP, do I really have to remoteexec every line of the code inside the sqf to make it work for all players?

Or is it enough to add the following remoteExec at the top of the sqf file (assuming it will then execute it for everyone?):

"scripts\moveforward.sqf" remoteExec ["execVM",0];
_groupleader = man1
_groupleader playMoveNow "AmovPercMwlkSnonWnonDf";

(did try other variations yesterday, putting that line in at the bottom, but did not get around to test this latest one)

(or do I have to put a "isServer" in somewhere maybe?)

split ruin
#

I am desperately trying to make mixed motorized group (veh+infantry) to move with the same speed

{_x limitSpeed 20} forEach units _qrfgrp;

Vehicle always go into drag race leaving infantrymen behind ๐Ÿคท

open marsh
#

is it possible in arma3 formations to have a specific squad member be in a specific position within a formation?

proven charm
proven charm
ornate whale
#

Can getPos syntax 3 handle correctly negative and out of the range compass headings like -400, or + 400? Thank you
origin getPos [distance, heading]

tender fossil
ornate whale
stable dune
proven charm
#

everybody typing but no messages pop up ๐Ÿ˜„

thin fox
split ruin
#

how to select mission params for single player missions? Is there any way?

granite sky