#arma3_scripting

1 messages Β· Page 76 of 1

cyan dust
#

I noticed that it happens if previous waypoint has waypoint statements. Does statement need to return something in order for group to proceed? notlikemeow

#

I can appreciate the clever approach with using hashmap as an object with ctor, dctor and methods (even ToString is present). It just seems like you want to invent OOP inside of scripting language for some reason that I am trying to comprehend. Okay, if there were requests for that and you think it should be done - we'll see how good it will prove its own right to exist. I will definitely try it out when it'll go live on prod... just need to think of a proper scenario blobdoggoshruggoogly

stark fjord
still forum
cyan dust
#

Oh yeah, and thank you for answering.

cyan dust
stark fjord
#

Try _nul = [] spawn {}

#

Mayhaps handle does things to it?

#

Or do you do some wierd stuff to pilot inside that script?

cyan dust
#

Not to pilot, to group it carries.

#

Something here breaks the pilot logic, I just need to find what exactly

stark fjord
#

The only thing that has anything to do with vic moveOut and unassign

#

And leaveVehicle

#

Also whats the waypoint type? Move?

cyan dust
stark fjord
#

What if you tried using scripted waypoint? Or maybe try returning true

little raptor
#

Only if you change its text color

cyan dust
stark fjord
#

Also leaveVehicle also unassigns it

#

So mayhaps ```_x action ["eject", _vic];
unassignVehicle _x

tough abyss
#

so im running into an issue with ui (i havent used ui code in a while and can't remember too much about it) for some reason im running into the issue of no ; found at ```sqf
_RscButton_1601 = (call _display) ctrlCreate ["RscButton", 1601];

_display is defined as 
```sqf
_display = (findDisplay 46) createDisplay 'RscDisplayEmpty';

full script
https://pastebin.com/uFQmk4nG

full code for button with issue

_RscButton_1601 = (call _display) ctrlCreate ["RscButton", 1601];
_RscButton_1601 ctrlSetText "Play song";
_RscButton_1601 ctrlSetPosition [0.5 * safezoneW + safezoneX, 0.612 * safezoneH + safezoneY, 0.137921 * safezoneW, 0.098 * safezoneH];
_RscButton_1601 ctrlCommit 0;
_RscButton_1601 ctrlAddEventHandler["ButtonClick",{
    params ["_control"];
    _display = ctrlParent _control;
    _listBox = _display displayCtrl 1500;
    _index = lbCurSel _listBox;
   vehicle player vehicleChat ['Song is: %1',_listBox lbText _index];
tough abyss
#

ah ok so what would be the correct way to go about adding a button or other gui element to the screen?

little raptor
#

Remove the call meowsweats

tough abyss
#

changed it to ```sqf
_RscButton_1601 = _display ctrlCreate ["RscButton", 1601];

#

weirdly

stark fjord
#

Like errors, or just doesnt show

#

And ofc fortunate son D:

tough abyss
#

hmm

#

seems the addaction doesnt work propably fucked something

cyan dust
# stark fjord Perhaps try action eject

Tried everything, including 'setPosASL', 'disableAI', 'forgetTarget', you name it notlikemeow It really seems like secondary group in the heli somehow is connected to pilots and when pilots loose their passengers they loose their sheit along with it, completely forgetting their duties. They just hover there doing nothing. I can only imagine they enjoy the view of parachutes deploying. Maybe just being worried for their comrades to land safely.

tough abyss
#

did a little more debugging it seems that changing it to ```sqf
_RscButton_1601 = _display ctrlCreate ["RscButton", 1601];

stark fjord
willow hound
tough abyss
#

all of them

#

which confuses me

#

shame it only tells me missing ; and no more details

#

cant see anything wrong with syntax

stable dune
#

you may have add waitUntil display is avaible

#
0 spawn {
        _display = (findDisplay 46) createDisplay 'RscDisplayEmpty'; 
        waitUntil {!isNull _display}; 
//rest of your code 
};
tough abyss
thorny osprey
#

I have the half-power grenade throwing mostly figured out. Just have to bind it to a hotkey now (eg. shift-g). Or perhaps several hotkeys for various power throws. Code is simple, thanks to suggestion by @hallow mortar :

player addEventHandler ["Fired", {
  params ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile", "_gunner"];

  if (_weapon == "Throw") then
  {
    _vel = velocity _projectile;
    _dir = direction _projectile;
    _factor = 0.5;
    _projectile setVelocity [
      (_vel select 0) * _factor,
      (_vel select 1) * _factor,
      (_vel select 2) * _factor
    ];
    
    player removeEventHandler [_thisEvent, _thisEventHandler];
  };
}];

[player, currentThrowable player select 1] call BIS_fnc_fire;

Any comments on that?

#

Quite happy with this as it is compatible with all grenades and is a very simple way of throwing more controlled. While not totally going full ACE-style with trajectories, priming, etc.

#

(Obviously needs some further checking if player has a throwable and can actually throw).

cyan dust
# cyan dust All right, Thank you.

Bloody hell. For whoever will search for this problem as I did (pilots ignoring following waypoints on cargo units paradrop) - only the following kostyl worked:

//Fix pilots stucking in one place
_group leaveVehicle _vehicle;
{
    _x disableCollisionWith _vehicle;
    _x moveOut _vehicle;
    //_x enableSimulationGlobal false;
    //_x hideObjectGlobal true;//Not necessary
} forEach (units _group);
_group addVehicle _vehicle;
{
    _x moveInAny _vehicle;
    //_x enableSimulationGlobal true;
    //_x hideObjectGlobal false;//Not necessary
} forEach (units _group);
astral bone
#

How might I call something only when an object is added/removed from a curator's editable objects?

stark fjord
#

Checked event handlers?

astral bone
#

Yea, pretty sure I'd need to make something myself...

astral bone
proven charm
#

hmmm

astral bone
#

I want to make some objects be uneditable to curators.

#

wait-

proven charm
desert palm
#

why does my scripts in the triggers not work when in MP should I tick the server only box?

proven charm
desert palm
proven charm
shut lily
astral bone
#

so uh- looks like the thing I want might be doable by replacing with simple objects

torn hemlock
desert palm
#

its this tho if youd mind taking a look

call{((nearestobjects [d1,["Land_Cargo_House_V1_F"], 8]) select 0) setVariable ['bis_disabled_Door_1',0,true];}

shut lily
#

Tried it on dedi but nothing worked. Local host works fine. But setting up tanks in a formation moving forward is a pain..no way around UnitCapture?

torn hemlock
#

BTW does anyone knows, where can I get DLC resources such as Marksman DLC's weapons pictures?

jade abyss
#

?

tough abyss
sullen sigil
torn hemlock
#

Yes, but it will support mods like RHS, ACE, RDS and others, including various versions of ARMA

#

Also there is no full config classes and parameters list in BIS wiki

astral bone
#

Ok, so i made my own simple replace With Simple Object function, b/c why not. However... I put 2 compositions down of a cave.

jade abyss
#

What do you mean with "full config classes"?

astral bone
#

[_oldObj,_copyMatTex] spawn {
    params["_oObj","_copyMatTex"];
    private _position = getPosWorld _oObj; // Testing something
    private _sObj = createSimpleObject [(typeOf _oObj), [0,0,0]]; // createSimple Object
    ratchet_replacedSimpleObjects pushBack _sObj; // Peace of mind
    _sObj setPosASL (getPosASL _oObj);// Set Pos
    _sObj setVectorDirAndUp [vectorDir _oObj, vectorUp _oObj]; // Set Directions
    if(_copyMatTex)then{
        {
            _sObj setObjectMaterialGlobal [_forEachIndex,_x];
        }forEach getObjectMaterials _oObj;
        {
            _sObj setObjectTextureGlobal [_forEachIndex,_x];
        }forEach getObjectTextures _oObj;
    };
    
    deleteVehicle _oObj; // Remove old
};
torn hemlock
#

"full config classes and parameters list"

stark fjord
#

Idk if it works tho

jade abyss
#

ah, kk

modest gate
#

I've needed this since Six Config Browser died. Nice work.

astral bone
#

ah ha!

#

_sObj setPosWorld _position;

stark fjord
#

Sometimes it helps to ask, makes you find solution yourself faster πŸ™‚

willow hound
torn hemlock
#

It is not fully done yet but I plan to finish this in a week.

tough abyss
#

Thats is a nice config viewer, Blender.
Like a million times faster than the shitty one in game or the one six had.

#

Also, holy shit the one on the BI wiki
Thanks for letting me know that all these buildings are side civilian and faction default

hallow mortar
# thorny osprey I have the half-power grenade throwing mostly figured out. Just have to bind it ...

Making proper hotkeys is kind of awkward unless you're making a mod. If you're making a mod, https://community.bistudio.com/wiki/Arma_3:_Modded_Keybinding

Here's a suggestion: have your event handler on permanently. Modify it so that _factor is acquired from a variable saved on the player. Have an action (or keybinding if you are a mod) that changes that variable.
e.g.

// NOT full code
// action
player addAction ["Set grenade mode: short",{_caller setVariable ["Magiel_var_grenadeFactor",0.5]}];
player addAction ["Set grenade mode: default",{_caller setVariable ["Magiel_var_grenadeFactor",-1]}];
// EH
private _factor = _unit getVariable ["Magiel_var_grenadeFactor",-1];
if (_factor == -1) exitWith {};
// rest of code```
thorny osprey
#

Thanks for the thoughts @hallow mortar but I indeed want to create a mod that provides (CBA) keybinds. I'm not a fan of the player having to set a grenade mode, especially via the action menu. It tends to be hard to do in combat πŸ™‚

thorny osprey
# thorny osprey Thanks for the thoughts <@137672072821211136> but I indeed want to create a mod ...

The script is almost done now, thanks for the suggestions! I'll add some keybinds soon and fine-tune the slow factors for actual combat usage πŸ™‚

params ["_slow_factor"];

player setVariable ["magiel_throw_slow_factor", _slow_factor];

_throwable = currentThrowable player; 
if (count _throwable == 3) then 
{
  _event_handler = player getVariable ["magiel_throw_slow_event_handler", -1];
  if (_event_handler >= 0) then
  {
    player removeEventHandler ["Fired", _event_handler];
  };
  
  _event_handler = player addEventHandler ["Fired", { 
    params ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile", "_gunner"]; 

    if (_weapon == "Throw") then 
    {
      _fire_time = player getVariable ["magiel_throw_slow_fire_time", 0];
      if (time - _fire_time < 3) then {
    _slow_factor = player getVariable "magiel_throw_slow_factor";
    _slow_factor = 0.0 max _slow_factor; 
    _slow_factor = 1.0 min _slow_factor; 
    _vel = velocity _projectile; 
    _projectile setVelocity (_vel vectorMultiply _slow_factor);
      };
      player removeEventHandler [_thisEvent, _thisEventHandler];    
    }; 
  }];
  player setVariable ["magiel_throw_slow_event_handler", _event_handler];
 
  _muzzle = (_throwable select 1); 
  player forceWeaponFire [_muzzle, _muzzle];
  player setVariable ["magiel_throw_slow_fire_time", time];
};
wary sandal
#

how can I wrap multiple controls into a single one in config file?

#

currently I have the following classes:

class WTK_RecordButtonPath: RscButton {};
class WTK_TextBoxPath: RscEdit {};
class WTK_NoticeLabelPath: RscStructuredText {};
class WTK_Checkbox: RscCheckbox {};
#

can I put all of them in just one to avoid individually creating all the controls in my script

proven charm
wary sandal
boreal parcel
#

is it possible to "override" a mods function via script in a mission file?

stray flame
#

Hello, does anyone have a more adjustable command/script I could use to set a smoke trail behind a flying (crash-landing) plane?

call { 
    { 
        private _smoke = "#particlesource" createVehicleLocal [0,0,0]; 
        _smoke setParticleClass "ObjectDestructionSmoke1_2Smallx"; 
        _smoke attachTo [Lifeboat, [0,0.5,1]]; 
    } remoteExec ["call", 0, true]; 
};```
#

it works but I would like to adjust the smoke's effect which seems very limited

#

Im looking it up on google but a lot of the results I get are mixed to say the least, often about specific outcomes

stray flame
#

hmm, I was thinking of attaching the smoke module to the plane, but no luck

stray flame
#

uhhh

wary sandal
#

why did it start doing that

stark fjord
#

too little Y?

wary sandal
#

when i position it at the top of the screen it completely disappears

#

(it wasn't doing that when it was not in a controlgroup)

#

so there's no point to look into the positioning

#

it simply cuts away the closer it gets to the top of the screen

stable dune
thorny osprey
stark fjord
spice kayak
#

Oh, people are still on here. Hey all!

proven charm
wary sandal
#

instead of just the safezone or whatever

w = 1;
h = 1;
proven charm
wary sandal
proven charm
winter rose
stray flame
#

alright

wary sandal
wary sandal
#

switching to a control frame is pretty annoying

#

i wish i knew those existed before i started working on the gui

stray flame
#

okay issue, it doesnt seem to track animated or moving things

#

atleast not well

hallow mortar
#

to be fair it wouldn't be the first time there's been a "not" for no conceivable "why" in Arma

little raptor
#

well you can throw stuff from FFV seats. that's the why πŸ˜…

little raptor
#

and your ctrl group must be large enough to be able to show its children

#

if not they get cropped

little raptor
little raptor
#

you're doing something wrong

#

or you're using multiple monitors

thick arrow
#
// fn_init.sqf
diag_log "Initializing SAR mission...";

#include "client\SAR\fn_onPlayerRespawn.sqf"
#include "client\fnc\fn_setRespawnPosition.sqf"

// Call the SRG_fnc_setRespawnPosition function to set the respawn position to the SAR operations point marker
["SAR_opPoint_marker", false] call SRG_fnc_setRespawnPosition;

respawnOnStart = 0;

// Find all SAR Medics within 1 meters of the SAR_opPoint_marker marker
_sar_medics = nearestObjects [getMarkerPos "SAR_opPoint_marker", ["CAManBase"], 1];
_sar_medics = _sar_medics select {_x getVariable ["roleDescription", ""] == "SAR Medic"};

// Find all SAR Pilots within 1 meter of the SAR_opPoint_marker marker
_sar_pilots = nearestObjects [getMarkerPos "SAR_opPoint_marker", ["CAManBase"], 1];
_sar_pilots = _sar_pilots select {_x getVariable ["roleDescription", ""] == "SAR Pilot"};

// Find all SAR Copilots within 1 meters of the SAR_opPoint_marker marker
_sar_copilots = nearestObjects [getMarkerPos "SAR_opPoint_marker", ["CAManBase"], 1];
_sar_copilots = _sar_copilots select {_x getVariable ["roleDescription", ""] == "SAR Copilot"};



``` im trying to get a role specific spawn point setup for area of my unit. Ive ran into no errors but it isnt doing what im looking for it to do. would i need to #include this file into my acutal init.sqf for it to work?
stray flame
#

okay, anyone got any other suggestions for how to set smoke and/or fire particles attached to an object that moves via rich curve?

#

Last thing I tried it just vanished when set to the vehicle in questions. Making me think it wants to be static

wary sandal
#

how do i position a control group at the top-middle of the screen

#

this is confusing me

boreal parcel
# little raptor depends what kind of function. most mods make their functions final so no

im not entirely sure, but from look at his source code he might not compile final? atleast I dont see any of that but I dont know 100% what to look for. Mind Checking?
https://github.com/FreestyleBuild/freestylesNuclearBlast

GitHub

A rewrite of my orginal Realistic Nukes script. Contribute to FreestyleBuild/freestylesNuclearBlast development by creating an account on GitHub.

#

his init just spawns his functions defined in cfgFunctions

granite sky
#

hmm. I wonder what takes precedence if you have the same function defined in both base and mission CfgFunctions.

boreal parcel
#

would it not just throw an error about an existing function being defined twice?

granite sky
#

I honestly doubt it :P

boreal parcel
#

hmm, I just want to override his damage function a bit cause I dont think it would take a few minutes to die when a nuke explodes in your face

#

and I wanna make vehicles get some instant velocity in the opposite direction

kindred zephyr
# boreal parcel hmm, I just want to override his damage function a bit cause I dont think it wou...

That is relative to distance and terrain in real world though, you don't die instantly because of the radioactivity, heat and shockwaves unless you are at ground zero, since these are kinetic waves and they travel much more slower than light but faster than sound, however they lose speed exponentially.

A 1MTon equivalent bomb at 6km from the ground zero would have wind speeds to up to 260km/h, so it would in fact take 1 minute and 20seconds or so to feel the wind pressure at that distance.

Offtopic, I know, but the lower the yield of the explosive the longer the waves and wind pressure takes to reach point B from point A. Its not an incorrect effect but perhaps exaggerated according to the script creator.

granite sky
#

Visible light is a tiny part of the electromagnetic spectrum, and it all travels at the speed of light. There's plenty of other radiation (mostly thermal but a lot of xray & gamma) in a nuclear blast to kill instantly at close distances.

#

1MT at 6km is probably instant 3rd degree burns at best.

stark fjord
#

Thanks for the lead! I found a better suited one in the end "UnregisteredFromWorld3DEN"

boreal parcel
thorny osprey
little raptor
kindred zephyr
# granite sky 1MT at 6km is probably instant 3rd degree burns at best.

you are correct, at 1MT the heatwaves travel up to 12km with 8km being the distance in which the heat start to ceil and exponentially decrease temperatures of the wave, at that distance you will receive 3rd degree burn and beyond 12km first degree burns. There is this popular video of the early nuclear test were you can see paint and non metallic based materials being basically vaporized when the weather is clear and heat can propagate efficiently through air molecules.

kindred zephyr
boreal parcel
#

yeah looking at his script he's only damaging the chest slightly with thermal burns iirc every few minutes. Should be an easy change, ill just apply it to the entire body with more intensity, probably also check distance and apply an instant death. This is using ACE medical btw

stark fjord
#

How does Killed EH work? When entity is killed does it fire on killers side, killed entity side?

kindred zephyr
#

server usually, local to the unit, on the player pc if the unit is a player

wary sandal
#

how would i make it so the y starts at 0 at the top and ends at 1 at the end of the ctrlgroup

#

and so that x starts at 0 (left of ctrlgroup) and ends at 1 (right of ctrlgroup)

#

i'd like to position my ctrlgroup at the top middle, how do i do that

stark fjord
thorny osprey
little raptor
little raptor
kindred zephyr
kindred zephyr
stark fjord
#

yes, hence i asked, where it should fire πŸ™‚

#

but anyhow ill use MPKilled

#

thanks!

little raptor
#

idk what anim you're talking about tho

#

the game already does have throwing gesture

thorny osprey
little raptor
#

you can throw stuff from vehicles just fine

#

you're probably using the anim

#

not the gesture

thorny osprey
stark fjord
#

cause its using animation and not gesture

#

you probs wanna check if player is in vehicle, then forceWeaponFire and do the gesture

little raptor
#

and also why even use those? just use the vanilla throwing

thorny osprey
winter rose
#

action "throw" perhaps

thorny osprey
thorny osprey
winter rose
thorny osprey
wary sandal
winter rose
#

nah, you need some id etc

little raptor
#

but you won't see it at the top middle unless you fix the child ctrl positions

wary sandal
#

encountered yet another issue

#

valign is broken?

little raptor
#

afaik yes

wary sandal
#

aeugh

thorny osprey
thorny osprey
wary sandal
#

that's the code i have right now

#
class WTK_Main: RscControlsGroup
{
    x = 0.5;
    y = 0;
    w = 0.5;
    h = 0.5;
    class controls
    {
        class test: RscStructuredText {
            style = "0x00";
            colorText[] = {1,1,1,1};
            class Attributes
            {
                font = "RobotoCondensed";
                color = "#ffffff";
                colorLink = "#D09B43";
                align = "center";
                shadow = 1;
            };
            text = "test string";
            x = 0;
            y = 0;
            w = 1;
            h = 0.1;
            shadow = 2;
        }
    };
};
#

why does it create a scrollbar if the coordinates are relative?

#

w: 1 should fill the entire container right

#

also the ctrlgroup is seemingly not aligned and y = 0 isn't exactly at the top of the screen

#

see the issue^

stark fjord
#

Its all french to me...

wary sandal
#

the only issue

open hollow
#

im dong a tvt at night and want to limit the usage of the gamma as expoit

#

any ideas on how i can "read" and modify this value?

stray flame
#

Is there any way of making it follow an object in rich curve?

stray flame
warped hornet
#

Is BIS_fnc_ModuleRemoteControl_owner deprecated or something?

hallow mortar
# open hollow any ideas on how i can "read" and modify this value?

You can get it with getVideoOptions. You can't set it; acceptable values would depend on the player's hardware configuration and eyesight anyway.
You can use tricks like setApertureNew and local lightpoints to help make nighttime more comfortable for people regardless of gamma.

sharp grotto
open hollow
stark fjord
#

or rather just attach it in particle array

sharp grotto
#

There is no way in arma to stop gamma cheesing as far i can tell, i tried hours even had working filter only to realise it's not working windowed mode πŸ˜„

stray flame
#

you wot?

hallow mortar
sharp grotto
#

DayZ standalone has a decent solution, if i remember right even changing the GPU control pannel settings didn't help.

open hollow
stark fjord
#

put a very dark rscTitle over their screen if they "cheat"

sharp grotto
#
AntiGammaHack = ppEffectCreate ["ColorCorrections", 1500];
AntiGammaHack ppEffectEnable true;
AntiGammaHack ppEffectAdjust [1, 1, -0.04, [0, 0, 0, 0], [1, 1, 0, 0.85], [0.299, 0.587, 0.114, 0]]; 
AntiGammaHack ppEffectCommit 0;

//disable again
ppEffectDestroy AntiGammaHack 
stray flame
stark fjord
little raptor
stray flame
# stark fjord how do you create your particle with `drop` or `"#particlesource" createVehicleL...

private _posATL = Lifeboat modelToWorld [0,10,0];

private _ps1 = "#particlesource" createVehicleLocal _posATL;
_ps1 setParticleParams [
    ["\A3\Data_F\ParticleEffects\Universal\Universal", 16, 7, 16, 1], "", "Billboard",
    1, 8, [0, 0, 0], [0, 0, 4.5], 0, 10, 7.9, 0.5, [4, 12, 20],
    [[0.2, 0.2, 0.2, 0], [0.2, 0.2, 0.2, 0.3], [0.2, 0.2, 0.2, 0.3], [0.35, 0.35, 0.35, 0.2], [0.5, 0.5, 0.5, 0]],
    [0.25], 1, 0, "", "", _ps1];
_ps1 setParticleRandom [0, [0.4, 0.4, 0], [0.4, 0.4, 0], 0, 0.25, [0, 0, 0, 0.1], 0, 0];
_ps1 setDropInterval 0.2;

private _ps2 = "#particlesource" createVehicleLocal _posATL;
_ps2 setParticleParams [
    ["\A3\Data_F\ParticleEffects\Universal\Universal", 16, 9, 16, 0], "", "Billboard",
    1, 8, [0, 0, 0], [0, 0, 4.5], 0, 10, 7.9, 0.5, [4, 12, 20],
    [[0.33, 0.33, 0.33, 0], [0.33, 0.33, 0.33, 0.8], [0.33, 0.33, 0.33, 0.8], [0.66, 0.66, 0.66, 0.4], [1, 1, 1, 0]],
    [0.25], 1, 0, "", "", _ps2];
_ps2 setParticleRandom [0, [0.4, 0.4, 0], [0.4, 0.4, 0], 0, 0.25, [0, 0, 0, 0.1], 0, 0];
_ps2 setDropInterval 0.2;```
stark fjord
#

u see _ps1 and _ps2 in that array?

stray flame
#

uhhh yeah?

stark fjord
#

thats the object particles are attached to

#

you may have to use drop for different vehicle than particlesource but try just changing those for now

little raptor
stark fjord
#

or you can attach whole shebang to a vehicle, like _ps1 attachTo [veh, [0,0,0]];

stray flame
#

alright I may try that

#

omg...

#

works perfectly

#

I spent hours on this

#

and this solution just fixed it

stark fjord
warped hornet
#

I dont suppose anyone knows why this would print "-" still? The target is valid as I take over the unit fine

little raptor
#

which you're not

warped hornet
#

ah

#

Do you happen to know of any way to detect if/who is remote controlling a unit?

little raptor
#

mentioned on wiki

warped hornet
#

Im not realy fussed who I just need to know if it is being controlled

#

Yeah I tried the wiki suggested solution but I was getting a null return with their messy one

#

I assume its this you're referring to

little raptor
#

yes

warped hornet
#

ill mess about with it some more but it didn't seem to be working for me, thanks in the meantime

little raptor
#

does the game even have a papercar class?

#

never seen it

stark fjord
#

Yup

#

Well not much to be seen. Small gray square. You can get in via script. You cant drive it tho. So car part is a dirty lie

#

And paper too for that matter

little raptor
#

well that doesn't matter anyway

#

I just wondered if it exists at all

#

or if it was for old Armas

stark fjord
#

meh, when i first found it i imagined a 2d paper car cutout, but was bitterly dissapointed.

#

Also on remote controlling note. Is there a way to completely disable remote control in zeus or using unit as player in editor

little raptor
stark fjord
#

and remove editor control as well :D?

little raptor
#

you can detect it via EH and undo it blobdoggoshruggoogly

stark fjord
#

lets just go with no then...

warped hornet
#

So with the following code im still just getting back "<NULL-object>"

#

I cant see if its a bad implementation on my end or not

stark fjord
#

maybe the dirty hack doesnt work no more...

warped hornet
#

Things cant just be easy can they

granite sky
meager granite
#

Last time I checked that dirty hack worked

warm hedge
#

This is more generic program question and am asking because I only have experience with SQF (and a bit of Lua and python) b_clueless :
What exactly is OOP and how SQF isn't? Pros/cons? What makes me to use OOP solution on SQF?

molten yacht
#

Hey, for scripting a music trigger to play on everyone's machines simultaneously, is this correct?

["Music_Russian_Theme","playmusic",true,false] call BIS_fnc_MP;```
#

or should this be rewritten for ExecVM or similar?

sweet zodiac
molten yacht
#

Okay, thanks.

warm hedge
#

BIS_fnc_MP is a legacy way to synchronize a script - remoteExec/Call is more advanced and reliable

tulip ridge
# warm hedge This is more generic program question and am asking because I only have experien...

OOP is short "Object-Oriented Programming", it's a way of writing a program that heavily relies on classes.

Say you were building a program that lets people log in to some website.
Instead of a user's account just being some text file, perhaps like a json, there is an UserAccount class instead.

You did mention experience with Python, which often does use OOP style programming, so I'll give some (very basic) examples. I'm not sure how familiar you are with it though so it may or may not be helpful.

Here's a mock-up of that login program:
The first version is made with an Object-Oriented process in mind, where a user's account information is stored within an object

class UserAccount:
  def __init__(username: str, password: str):
    # This would be for when someone is making a new account
    self.username = username
    self.password = password

  def change_username(new_username: str):
    self.username = new_username

  ...
  # Etc. etc.
# Create new user
new_user = UserAccount("DartRuffian", "Password123")

Where a non-Object-Oriented programming approach would instead just treat each account like that data that it is.
Instead of a UserAccount class that stores all of the information, it might instead just be a dictionary with "username" and "password" as keys that you can grab.

new_user = {}
new_user.update({"username": "DartRuffian", "password": "Password123"})
#

I don't exactly know what you mean by this though

"What makes me to use OOP solution on SQF?"

warm hedge
#

Regarded to your Q, AFAIK an OOP solution on SQF has been introduced recently

tulip ridge
#

There are pros and cons to each, OOP can sometimes start to fall apart once the scale of a project reaches a certain point and also may use more memory due the larger amount of objects that need to be kept track of.

#

Oh that sounds interesting, I can see that would be useful for a lot larger and "heavier" mods

sweet zodiac
#

I just want my increment and decrement operators

tulip ridge
#

I'm waiting to use the best form of incrementing
i-=-1
Perfectly balanced, as all things should be

sweet zodiac
#

I have no idea what that is and I am scared

tulip ridge
#

It's just -= (minus equals) -1

#

It's functionally the same as i += 1 or i++

sweet zodiac
#

Ohh It just looks hella cursed

tulip ridge
#

I saw it in like a single post a couple years ago

sweet zodiac
#

OH

#

You are incrementing by adding a negative

tulip ridge
#

Yep

#

Just for the purpose of making it symmetrical lol

#

I do have an actual scripting question though:

Is there a way to easily get what addon a given object is from via scripting?

sweet zodiac
#

Tested it on one of my own units and it gave me the PBO name as a Array of Strings ["FF_Units"] in my case

meager granite
#

Been dealing with this lately and a word of warning, if you need it to check for DLC restrictions, you can't because it might return DLC addons for non-DLC vehicles.

#

getAssetDLCInfo is the way to reliably check DLC restrictions

tulip ridge
#

Gotcha, I'm currently trying to find an object that may be causing an issue within the mission
More specifically, one mod that my unit has in it's modlist has a nasty habit of modifying some of the base assets that it uses

On another note, is there a way to write output to a file? Not really something I had ever checked

meager granite
#

Only to RPT with diag_log, otherwise you need extension

tulip ridge
#

Eh, that'll work

sweet zodiac
warm hedge
tulip ridge
#

Essentially yeah
OOP tends to fall apart after initially created and needed to make a tweak to a parent class, causing everything that inherits from that class to also need to be changed

warm hedge
still forum
tough abyss
#

@native hemlock Thanks for the input - yeah, i generally only use publicvariableclient from the server anyhow, as it's easier to just remoteExec send something to another client instead of asking the server for the clients id and then sending it.

Adding the ownerid to the client via setVariable would work, but you're right, is it worth the getvariable ect

#

Prob not

molten yacht
#

....Why is this not giving me a proper returned message??

while {_time > 0} do {
    _tformat = [_time, "MM:SS"] call BIS_fnc_timeToString;
    hintSilent format["Jamming Time Left: %1", _tformat];    
    _time = _time - 1;  
    sleep 1;};```
stark fjord
#

Is _time initialized anywhere?

sweet zodiac
#

"MM:SS" isn't a valid choice I don't think

sweet zodiac
#
_time = 120;

while {_time > 0} do {
    _jamLeft = format ["%1:%2", floor (_time/60), _time%60];
    hintSilent format ["Jamming Time Left: %1", _jamLeft];
    _time = _time - 1;
    sleep 1;
};

hintSilent "Time Out!";

try this for size

stark fjord
#

Probs want them leading zeros so it wont 0:5 on him

south swan
stark fjord
#

Or you could get fancy BIS_fnc_countdown

south swan
#

especially when timeToString expects daytime in hours-as-float format (i.e. 16.5 for 16:30), if i believe the doc

sweet zodiac
#

BIS_fnc_secondToString ties it up Nicely

_time = 90;

while {_time > 0} do {
    _jamLeft = [_time, "MM:SS"] call BIS_fnc_secondsToString;
    hintSilent format ["Jamming Time Left: %1", _jamLeft];
    _time = _time - 1;
    sleep 1;
};

hintSilent "Time Out!";
molten yacht
#

the full method as it was was ```sqf
params ["_time","_objArray","_speaker"];
_time = _this select 0;
_objArray = _this select 1;
_speaker = _this select 2;
private _tformat = 0;

while {_time > 0} do {
_tformat = [_time, "MM:SS"] call BIS_fnc_timeToString;
hintSilent format["Jamming Time Left: %1", _tformat];
_time = _time - 1;
sleep 1;
};
hintSilent "Jamming Time Left: 00:00";```

#

and then some other stuff below

#

the Other Stuff is verified to work dine

#

lemme try SecondsToString

#

yeah ok secondstostring is perfect

#

working 100%

stark fjord
#

Also u can do while {_time>-1}
And skip last line

molten yacht
#

...is that allowed???

stark fjord
#

Why not xD?

sweet zodiac
#

Yeah it will give you that last Hint without needing to have that line there

molten yacht
#

I feel like that's somehow illegal, not in a way that the system won't accept, but in the way like I'm going to get arrested for practicing black magic

#

(I'm doing it)

stark fjord
#

Oi oi, you'ave a loicense to compare to negative numbah mate?

molten yacht
#

Yeah yeah c'mere it's right next to my butterknife license, come closer

winter rose
#

*arrests Ashudene for practicing SQF magic without a license*

still forum
# warm hedge Sorry for late, so an no-OOP language is "hey Mr POLPOX you have the database, y...

Simple difference of OOP vs functional

functional
_data call My_fnc_ObjectA_DoOneThing
_data call My_fnc_ObjectA_DoSecondThing
_data call My_fnc_ObjectA_DoThirdThing

organizing your functions will get quite messy over time. And if you then make the mistake of
_data call My_fnc_ObjectB_DoSecondThing

calling a function that should take a datablock of format "ObjectB" but pass it a datablock of format "ObjectA" then.. poof.

OOP would be

_data call ["DoOneThing"]

You no longer need to specify which function you want to call, as the data itself now stores its own functions and knows what type it is.
ofc in functional you can also write

My_fnc_DoOneThing = {
if (_this.type == "ObjectA") then {_this call My_fnc_ObjectA_DoOneThing};
if (_this.type == "ObjectB") then {_this call My_fnc_ObjectB_DoOneThing};
} ``` That is one of the ways that previously people tried to create "OOP" inside SQF. it works, but its more effort to write (which ends up with many OOP projects giving you macro hell) and less efficient to execute.
stark fjord
#

But yeah in sqf it aint an issue.
Somewhere where you could define _time as unsigned and then accidentaly compare it to negative value, you could create infinite loop.
Also cpus/mcus like to compare to zero. Makes for less cycles

#

None of these matter for sqf anyhow

molten yacht
stark fjord
#

Cheeky bugger

stark fjord
#

"Taser, taser, taser!" 3 shots in the back

finite bone
#

How'd I display a picture (.paa / .png) in the RscDisplayEmpty? Example /samplepictures/somepicture.jpg

testobj = createVehicle ["UserTexture_1x2_F", player modelToWorld [-1.1, 2.5, 1.1], [], 0, "CAN_COLLIDE"];
testobj setDir (player getDir testobj);
testobj enableSimulation false;
testobjtexture = "obj" + (diag_frameno toFixed 0);
testobj setObjectTexture [0, format["#(rgb,1024,2048,1)ui('RscDisplayEmpty','%1')", testobjtexture]];```
meager granite
#

Get the display, ctrlCreate a RscPicture, ctrlSetText your image in it

stark fjord
#

Can you even display .png? Think ot has to be paa or jpg

finite bone
#

Corrected - but the idea is the same.

#
testobj = createVehicle ["UserTexture_1x2_F", player modelToWorld [-1.1, 2.5, 1.1], [], 0, "CAN_COLLIDE"];
testobj setDir (player getDir testobj);
testobj enableSimulation false;
testdisplay = findDisplay 46 ctrlCreate ["RscPicture", -1];
testdisplay ctrlSetText "/somewhere/something.jpg";``` so something like this
winter rose
#

wait, wait, wait.
what is your original goal - display a texture on a UserTexture object?

finite bone
#

oh yea im dumbfounded as well

meager granite
#

The man just wants to display a picture

finite bone
#

display a picture on testobj instead of the map

meager granite
#

Double click on it to open it Kappa

meager granite
winter rose
#

…setObjectTexture is enough

#

if you just want to display a picture (on a texture object), you don't need UI at all

meager granite
#

If you want your picture inside ui2texture, you need to wait until your display is initialized (it can take some time or never if you never look at the texture for it to appear), then create a control there

#
testobjtexture spawn {
    waitUntil {!isNull findDisplay _this};
    private _display = findDisplay _this;
    private _picture = _display ctrlCreate ["RscPicture", -1];
    _picture ctrlSetText "/somewhere/something.jpg";
};
#

Probably also want ctrlSetPosition and ctrlCommit to place your picture where you want it

finite bone
winter rose
meager granite
finite bone
winter rose
#

you know, it helps knowing what you have and what you are trying to achieve in order to help you accurately!

finite bone
#

didn't know the code was big until i pasted it sorry

finite bone
meager granite
#

Assign exactly the same texture to another object

#

If you want it on other objects too

finite bone
#

So sqf mapboardtexture = "map" + (diag_frameno toFixed 0); mapboard setObjectTexture [0, format["#(rgb,2048,2048,1)ui('RscDisplayEmpty','%1')", mapboardtexture]]; becomes sqf mapboardtexture = "/something/somewhere.jpg"; mapboard setObjectTexture [0, format["#(rgb,2048,2048,1)ui('RscPicture','%1')", mapboardtexture]];?

meager granite
#

mapboardtexture is nothing but a string name to get the display with findDisplay command

meager granite
finite bone
#

OH WAIT
thats it

#

sorry i was dumb to focus on the wrong area

#
private _map = _x ctrlCreate ["RscMapControl", -1];
_map ctrlMapSetPosition [0.2, 0.2, 0.6, 0.6];
_map ctrlMapAnimAdd [0, 0.1, mapcenter];
ctrlMapAnimCommit _map;
_x setVariable ["map", _map];``` this is where i should be focusing on right?
#

so instead of RscMapControl it should be RscPicture with relevant stuff

meager granite
#

Yes, _x is a display

finite bone
#

Oh yea got it

finite bone
#

This should do it? sqf imgobj = createVehicle ["UserTexture_1x2_F", player modelToWorld [-1.1, 2.5, 1.1], [], 0, "CAN_COLLIDE"]; imgobj setDir (player getDir imgobj); imgobj enableSimulation false; imgobjtexture = "obj" + (diag_frameno toFixed 0); private _img = findDisplay imgobjtexture ctrlCreate ["RscPicture", -1]; _img ctrlSetText "/somewhere/something.jpg"; displayUpdate imgobjtexture;

meager granite
#

no, you don't get it at all

#

Instead of randomly pasting code, try to understand what it does line by line

stark fjord
#

Can diag_frameNo even return float?

south swan
#

no

stark fjord
#

So why toFixed 0?

south swan
#

because copypaste, i suppose

finite bone
# meager granite Instead of randomly pasting code, try to understand what it does line by line

Ref: https://sqfbin.com/joyoyoqonizijenubuto

From reading your code, you are finding the displays and adding it to yhe globalvariable to be used inside your forEach statement. However, since in my case I only require one display to do my required activity, I replaced the private _map = _x ctrlCreate ["RscMapControl", -1]; with direct statement of finding display and creating control at the RscPicture and then ctrlSetText with the image path.

As for the imgobjtexture = "obj" + (diag_frameno toFixed 0); I do not understand as to why you included this in your original code and wiki does not elaborate on the functionality so I didn't touch it to ensure it works with minimal changes first.

stark fjord
#

Last part by my guess is just to create unique name.
"obj1345" for example.

finite bone
#

Good/Bad/WTF - sqf imgobj = createVehicle ["UserTexture_1x2_F", player modelToWorld [-1.1, 2.5, 1.1], [], 0, "CAN_COLLIDE"]; imgobj setDir (player getDir imgobj); imgobj enableSimulation false; private _img = imgobj ctrlCreate ["RscPicture", -1]; _img ctrlSetText "/somewhere/something.jpg"; displayUpdate _img;

south swan
#

imgobj ctrlCreate = WTF

wary sandal
#

how do I force an aspect ratio for checkboxes?

#

i tried giving it the ST_KEEP_ASPECT_RATIO style but it doesn't work

#
class WTK_ExcludeGroundCheckboxPath: RscCheckbox
{
    style = "0x00 + 0x800";
    checked = 0;
    x = "0.5 - 0.375 / 2 - 0.007";
    y = "safeZoneY + 0.0425 * 3.75";
    w = "0.025 * safezoneW";
    h = "0.04 * safezoneH";
};
finite bone
#

Ok what should I do now 😒

meager granite
wary sandal
#

stretched checkboxes do not look good

little raptor
#

use GUI_GRID coords

#

not random numbers

wary sandal
#

i just added a * 0.7 to scale it down

little raptor
#

well in any case just use GUI_GRID

sullen sigil
#

the wonders of arma gui

south swan
finite bone
# meager granite Don't randomly paste code, learn the language, figure what each line does

bruv im trying my best here - i know so far what each line did in your previous code but i dont know where im going wrong in getting it to work on what i wanted to achieve... (especially with no wiki on these functions)

From the wiki and earlier conversation I know that ctrlCreate with RscPicture and ctrlSetText will be the key functions to utilize in finishing my task. I took note on how you did it and drew comparisons to this one here.

Its not a stab at you since you have been of tremendous with your code helping in establishing the overall baseline of the vision, its just that im slightly frustrated and loss at direction to proceed with.

wary sandal
#

why are my macros not being preprocessed?

#

description.ext

#define GUI_GRID_WAbs (safezoneW / safezoneH) min 1.2
#define GUI_GRID_HAbs GUI_GRID_WAbs / 1.2
#define GUI_GRID_W GUI_GRID_WAbs / 40
#define GUI_GRID_H GUI_GRID_HAbs / 25
#define GUI_GRID_X safezoneX
#define GUI_GRID_Y safezoneY + safezoneH - GUI_GRID_HAbs
south swan
#

do you have other includes that can define same things? If you're checking in 3DEN - have you reopened the mission after changing the description.ext? Are the defines above the place they're used at?

wary sandal
#

you have to reload the mission?

#

didn't know

#

it still doesn't

#

as you can see:

little raptor
wary sandal
#

i just did

little raptor
#

have you wrapped your h in "" yourself?

wary sandal
#

yes

#
    w = "GUI_GRID_W * 25";
    h = "GUI_GRID_H * 4";
little raptor
#

then how do you expect it to get preprocessed?

wary sandal
#

i thought macros worked everywhere?

little raptor
#

no

#

they do work in single quotes tho

#

but you don't need any quotes in config (unless when you want to span multiple lines I guess, or if you have ; in your string thing, or when dealing with arrays)

wary sandal
#

even outside description.ext

little raptor
#

yes. the config parser converts what it doesn't recognize to string

wary sandal
#

why does this work tho

#

safeZoneY is a macro?

little raptor
#

no

#

it's a command

wary sandal
south swan
wary sandal
#

@little raptor perfect, thanks

velvet merlin
#

is the description definition in cfgFunctions actually anywhere used/show or just like an internal description within configs?

stark fjord
#

CfgFunctions has descriptions?

#

Is there a way to get parent function call history/"stack"?

proven charm
south swan
kindred zephyr
spare adder
#

Hello folks, I hope this is the right place to ask. Can someone help me with a script to temporarily disable fall damage? My group is using Ace 3, and we are trying to get a jetpack script to work for a special event, but we always take fall damage on landing.

stark fjord
kindred zephyr
#

yeah, better alternative indeed. You doing a custom monster then?

stark fjord
#

Brains are mostly done. Just effects are ... lacking. Ill see if i ever finish it.

stark fjord
wary sandal
#

how can I make a control group not blocking clicks on other buttons?

#

i have a ctrl grp that is intentionally slightly larger than its content, and i'd like to limit the "clickzone" to its content only

#

when a ctrlgrp takes up all the screen, all the other buttons on the display become unclickable

#

so basically i'd like to find a solution to shift the "zindex" of the ctrlgrp to something lower than any other button

still forum
#

There is some that returns array of thing

stark fjord
#

diag_stacktrace but that only goes up to the start of the function

#

Ah diag_dumpCalltraceToLog is it
But one tiny issue

Only available in Diagnostic branch(es)

#

And im not aware of linux server diag branch

proven charm
wary sandal
#

wrapping CT_Edits inside controlgroups are glitching the borders

#

sometimes they are grey and sometimes white, no idea why

proven charm
wary sandal
#

ctrlgroup or rscedit?

velvet merlin
proven charm
wary sandal
#

it only happens when you wrap it in a ctrlgroup

#

arma UI in a nutshell ig

proven charm
#

can you show pic?

wary sandal
#

it's subtle but it's annoying

#

and it sometimes happens on other edges

#

at different resolutions

proven charm
#

oh yeah I think that's "normal" the line drawing isnt very accurate

wary sandal
#

yep

#

but it's more about the line color

proven charm
#

illusion πŸ€”

wary sandal
stark fjord
#

Well... you could always make your own border, with blackjack and white lines?

proven charm
stark fjord
proven charm
#

not sure what u mean then...

stark fjord
#

Difficult to describe...
One of mods is causing event handler init and delete defined in cfgVehicles, class EventHandlers to run multiple times on server.
Example
Spawn unit.
EH Init code runs on client
EH Init code runs on server
EH Init code runs on server (again)

Delete unit
EH Delete runs on client
EH Delete runs on server
EH Delete runs on server again

Im trying to finger out the mod causing that.

proven charm
#

yeah EHs called from the engine don't have much of an call stack

wary sandal
#

is there even a way of turning a button/control unclickable?

stark fjord
#

Yeah. Figured as much. But how does one cause eventHandler to fire, if it aint the script.

wary sandal
#

it conflicted with my text box because i added a fake place holder text when nothing is written in the textbox

#

i'm bad at explaining stuff but you get the point

sullen sigil
#

Is there any issue adding EHs to projectiles insofar as causing problems later on when lots of EHs have been created for them (even if deleted?)

wary sandal
#

unfortunately it also disables its children

little raptor
#

but if multiple EHs trigger at once you may notice a performance drop

little raptor
wary sandal
little raptor
#

do it on the child ctrls then

wary sandal
#

i can't

#

because it's the ctrlGroup itself that's causing the issue

#

it blocks me from clicking any other button

#

because the ctrl grp is over everything else

little raptor
#

why did you even make a ctrl group?

wary sandal
#

(it takes up all the screen)

little raptor
stark fjord
#

Make it smaller?

wary sandal
little raptor
#

why?

wary sandal
#

that have the same goal

#

e.g for a menu

little raptor
#

well make it small enough to fit its items

sullen sigil
# little raptor no

fired eh -> hitpart eh local to each player which then sets damage to an object which doesn't take any sounds like a bad idea but i cant think of any better methods of "adding" damage meowsweats

little raptor
#

your question was: does adding EHs to projectiles cause a problem later on
to which the answer is no (unless there's a bug in the game, which should be reported and fixed)
idk if there's a better way to do what you want but sometimes you gotta do what you gotta do

little raptor
sullen sigil
#

more than a few specific objects & i've not got any helper objects to use πŸ˜…

#

im trying to make an object take damage until its eventual destruction from being shot by players

little raptor
#

doesn't hitpart work on the object?

sullen sigil
#

yes but object and shooter have to be local

little raptor
#

so?

sullen sigil
#

works fine in sp but for mp would be dreadful

little raptor
#

add the EH everywhere

sullen sigil
#

handling JIP etc

#

is there not actually a way to add sqf commands to jip queue? thonk

little raptor
#

remoteExec

sullen sigil
#

but i dont want to use remoteexec notlikemeowcry

little raptor
#

what are you working on?

sullen sigil
#

spamming player with remoteexec versus just having each player have a local fired -> hitpart eh

little raptor
#

mod or mission?

sullen sigil
little raptor
#

just make an init/post init function then

sullen sigil
#

init function for remoteexec or the local fired -> hitpart business notlikemeowcry

little raptor
#

no fired

#

just a hitpart on the object itself
why add fired and projectile EHs if you only want to damage specific objects?

sweet zodiac
#

PostInit Function to add Eventhandler locally

stark fjord
#

or add event handler directly in cfgVehicles

sullen sigil
#

i'll have to modify the initialisation function and make a cba event or something for in-progress spawning and push it back into an extra array and just add the eh for each in the array on postinit

#

i think

#

that makes no sense

stark fjord
#

what exactly are you trying to do?

sullen sigil
#

cba event for each time an object is created that adds the hitpart eh then just postinit function that iterates through all the current objects and adds ehs to them all

sullen sigil
little raptor
#

iirc it does have JIP? think_turtle

sullen sigil
#

...let me look

#

That seems to be the case, that solves a lot for me then πŸ€”

#

just a matter of passing the object through to the global event then doing eh bits there, nice

wary sandal
#

How can I navigate through items in ctrlgroups without altering their IDC?

little raptor
#

navigate?

wary sandal
#

access*

#

i messed up my phrasing

#

ah, i found this

#

controlsGroupCtrl

#

but are IDCs inside a ctrlGroup reserved to the group or global?

little raptor
#

they're both global and "specific"

#

they're just numbers

south swan
#

"global" as in "display-wide" or something, i suppose?

little raptor
#

if you access them via the command you said its specific to the ctrlsGroup
if you access them via displayCtrl they're global

little raptor
south swan
#

and only IDCs of the display you're working with matter. You can have a button with IDC=1 (and most likely do) in 15 different displays and they don't affect each other tanking

still forum
still forum
wary sandal
#
(_textBoxControlGroup controlsGroupCtrl 11) ctrlAddEventHandler ["onEditChanged", {
    params ["_control", "_newText"];
    systemChat _newText;
}];
#

what am I doing wrong?

#

the event doesn't fire

#

(controlsGroupCtrl 11 returns a CT_EDIT, it says Control # 11)

stark fjord
proven charm
wary sandal
proven charm
#

arma version 2.14 though, hmmmm

wary sandal
#

but it still doesn't work

#

greeeat

wary sandal
tiny coyote
#

how do i get an add action from a unit to trigger a trigger

hallow mortar
wary sandal
#

how long will we have to wait for 2.14 to release?

proven charm
#

maybe use "onChar" or something else in meanwhile

hallow mortar
stark fjord
#

Ah found the mod that was causing Init event handler to fire twice multiple times... it was RHSAFRF...
I wonder if it does something with "O_Soldier_VR_F" which i use as base 😐
But of all the mods this was one of the least expected...

hallow mortar
# wary sandal damn

Remember you can always check the current game version by looking in the bottom right of the main menu, of the Editor UI, or of the screen when the pause menu is open. Or at the bottom of the Options menu in the launcher if you don't want to open the game.

wary sandal
#

I'll keep an eye out for version numbers next time now that i know that we're in 2.12 meowsweats

#

one another thing

#

when a display gets deleted, every event connections to its children are deleted right?

#

we don't have to disconnect the events manually

wary sandal
#

what are the alternatives to passing arguments to a ctrlAddEventHandler ?

#

with a addMissionEventHandler you would do

addMissionEventHandler ["smth", {

}, [...]];
#

I'd like to pass controls to the event handler because I haven't figured a way to do it with globals (since UIs don't support serialization)

wary sandal
little raptor
wary sandal
#

i need another control

little raptor
#

haven't figured a way to do it with globals (since UIs don't support serialization)
wiki already explains it. use []

little raptor
sweet zodiac
wary sandal
#

no but the [] thing

#

there's no mention of it on setvariable

#

whatever

supple tusk
#

any help on how I can make an invisible wall around an object with no collision physics? pretty much just need a sphere that's an invisible wall.

wary sandal
little raptor
#

I linked it for []

wary sandal
#

but when i switch them to global, it says that it can't be serialized in the missionNamespace or something along these lines

little raptor
#

just read the page. okthnkxbai

tiny coyote
#

Anyone know how to make a vehicle trigger a trigger

#

works with blufor infantry but not when they are in a vehicle

stark fjord
#

specific vehicle or any vehicle?
If vehicle is occupied by blufor
and trigger activation is set Blufor, type Present then it should trigger

tiny coyote
stark fjord
#

damage only goes up to 1

#

also for a test, try putting ```sqf
hint "Activated!";
ied setDamage 1;

Into On Activation field, this will pop up a hint when trigger is activated
tiny coyote
#

This is so jank lol

#

My recording software is not working

stark fjord
#

is this intended for players or any blufor unit?

tiny coyote
#

any blufor units including players

stark fjord
#

ive just tried it and it worked.

tiny coyote
#

it works when AI is driving

#

but not players

stark fjord
#

this worked in any case, me driving, alone or with ai. just ai driving, or any on foot

#

is your area big enough to accept whole vehicle?

tiny coyote
#

i think its just this specific vehicle im using

#

i just tried with a pickup truck and it went off

stark fjord
#

which vic from what mod?

tiny coyote
#

RHS MATV

stark fjord
#

darn. I dont have RHS loaded atm, so i cant try on my end. Im too lazy to restart

tiny coyote
#

maybe the counter IED shit on the vehicle is blocking the trigger

#

but its a trigger

#

so why would that be the case

stark fjord
#

it shouldnt. Try one without RHINO

tiny coyote
#

did that...nothing

#

tried with a Humvee tho and it worked

#

i hate arma so much

#

thanks man. You are the bomb for trying to help

stark fjord
#

np... also i've just noticed, if u have further questions about editor related stuff #arma3_editor is perhaps better choice

tiny coyote
#

alright thanks

hardy dune
#

Hey how can I modify a function at runtime

#

From a mod

#

That I already have the source code

sullen sigil
#

you cant

#

cfgfunctions are protected from being overwritten aside from by ither mods

exotic flax
tough abyss
#

Thank you!

stark fjord
still forum
#

when you do a spawn, the newly spawned code doesn't know where it came from

stark fjord
#

Nah it was EH. I found out whats going on using... less scientific methods

#

I was trying to figure out why event handler that should only occur once, happend multiple times.

tough abyss
#

any eh that detects drone's being placed?

#

assembled

sweet zodiac
#

Does WeaponAssembled Fire for Drones?

frank cedar
#

@torn hemlock, thanks for the excellent tool, which is need for every mod developer

meager granite
#

Anybody looked into mines performance impact?? Thinking about having mines in my mission, wondering how much the affect the performance. Didn't do any tests myself but wonder if anybody can share their experience.

proven charm
#

they lag a lot

stark fjord
sullen sigil
#

you also dont need to populate all minefields with mines too; if your players are smart oftentimes they'll just go around the fields

meager granite
#

πŸ€”

sullen sigil
#

of course, if your players are stupid...

proven charm
#

remember to put "Mines" sign

grizzled lagoon
#

Hello, I made a script to generate crash barriers along the roads on my map. The problem is with the curvature on the road this makes the position inaccurate.Do you have any ideas to patch this problem?
the script ```sqf
{
private _info = getRoadInfo _x;
if (_info select 3 == "VA_Island\data\roads\route_principale.paa") then {
private _pos = _x modelToWorld [9.5,-3.18286,0];
private _obj = create3DENEntity ["Object", "xcam_Crash_barrier_F", _pos];
private _dir = ([_x, (roadsConnectedTo _x) select 0] call BIS_fnc_dirTo) + 90;
_obj set3DENAttribute ["rotation", [0, 0, _dir]];

};

} forEach ([3710.33,7191.15,0.00144267] nearRoads 50);```

stark fjord
#

Easy way is to not place it on curvy roads

grizzled lagoon
winter rose
#

use maths… or a library of relative positions

grizzled lagoon
#

Okay thanks i look that x)

cosmic lichen
#

Do these road segments have a classname? If so, depending on how many there are you could predefine positions for each class

#

and then just use these positions to create the barriers

grizzled lagoon
#

No but I will try to find a coefficient which depends on the direction of the road and then apply it to the position

spice kayak
#

Quick question, how would you make a trigger activate only if a player inside of it has a specific item? I've tried "O_UavTerminal" in (assigneditems player + items Player); but obviously that activates when any player has the item, regardless of whether or not they are in the trigger area. Adding "this &&" doesn't seem to help either. I'm guessing it's something really obvious that I'm missing here.

#

I know " if ("O_UavTerminal" in (assigneditems player + items player) && player in thislist) then {" would work, but would that not trigger if at least one person is in the trigger, and another has the object, even if it isn't the same player?

#

Maybe I'm over thinking it. I'll go try it out in a bit.

frank cedar
#

@spice kayak , do you want to check this item in inventory of all units (player and AI) or only players?

#

If only players then if ("O_UavTerminal" in (assigneditems player + items player) && player in thislist should work. You can send notification to other players via publicVariable when such event occured.

spice kayak
#

Alright, thanks. I'll give it another shot. My thought process for that statement was 'If a player has this and another player is in this trigger, then it'll activate' which isn't what I wanted.

#

Guess I was just over thinking it haha.

wary sandal
#

redundant code notlikemeow

#

am i using setvariable wrong?

winter rose
# wary sandal

it's not a good practice to directly put the code like that
use { this call TAG_fnc_something }

winter rose
wary sandal
winter rose
wary sandal
#

not sure if it makes sense

winter rose
#

you… don't have to store all that
you can have one script adding an event handler to one dialog's control

wary sandal
winter rose
#
disableSerialization;
private _myDisplay = findDisplay 46 createDisplay "MySuperDisplay";
private _myButton = /* whatever method to find by idc */;
private _myTextbox = /* whatever method to find by idc */;
_myButton setVariable ["TAG_theTextbox", _myTextbox];
_myButton ctrlAddEventHandler /* click stuff using getVariable TAG_theTextbox */;
wary sandal
winter rose
#

no

#

you don't even have to store anything globally

wary sandal
#

ah

#

setvariable on the textbox

winter rose
#

what

wary sandal
#

mb I've said button, it's not a click event but a KeyDown event instead

winter rose
wary sandal
#

but on the uiNamespace instead

winter rose
#

too time/memory/text-consuming

wary sandal
#

got rid of all the uiNamespace getVariable

winter rose
#

you wrote ArmA
you lost customer support

wary sandal
#

but why is it written Arma and not ArmA

#

like Armed Assault

wicked roostBOT
supple tusk
#

super simple question im struggling with, how would I make a script activate on an object if players entered a Trigger Area?

supple tusk
#

I have a script on a vehicle that will spawn units out of it, the goal is for that script to run only while players are present in the are of the trigger

lofty mantle
#

Are you intending on spawning a lot of enemies at once or in waves

supple tusk
#

the hope would be for it to be in waves so for example players would enter the trigger area, cause the script to run on the object that is spawning the enemies, I then had intended to have it rest for 2 minutes or so before then looping and repeating the process until the object is destroyed

#

the scenario is a star wars operation using essentially a drop pod to spawn battle droids to add some context

hardy dune
#

Which IDE do you use for scripting that also have snippets?

#

Does visual studio have plug-in for sqf files and also code snippets?

#

Currently I am using typesqf ide and I found it really bad

wary sandal
#

the news will be hard to digest

stark fjord
lofty mantle
winter rose
stark fjord
#

so technically this would be arm3

winter rose
#

with a capital A no

stark fjord
#

Yeah cant wait for Arm4

supple tusk
lofty mantle
#

Ah, it is best you run the script to spawn the people in the vehicle and then have them get out in the onactivation part of the trigger

supple tusk
#

Problem is its not a vehicle that can be crewed the object that's spawning them is technically a car with no seats that the script I have for it currently triggers its spawn animation, I just need to know how to make that script run when a player enters a trigger area

stark fjord
#

and have it on cooldown later?

#

If you just need to run a script, call/spawn it in OnActivation field of a trigger

supple tusk
stark fjord
#

Okay and how does that script work? you can put mayhaps a global variable that would be set by the trigger and then reset

#

Example
inside trigger on activation

MY_respawn_counter = 10;

then inside your script

if (MY_respawn_counter == 0) exitWith {};
//your spawn script
MY_respawn_counter = MY_ respawn_counter - 1;
supple tusk
#

I honestly cant even describe how it dose im very new to scripting so I only understand the basics but I can post it if that would help

stark fjord
#

well without knowing how your script spawns, im just firing into the dark here

supple tusk
#

I took the pre existing script in the functions menu for the object and have just been trying to get it working, thats all I really know? Im not sure what you would be wanting to know specifically about it

spice kayak
#

Oh god damn it. My issue wasn't with the trigger's condition. It was simply because it wasn't moving to where it needed to be.

stark fjord
#

well unless i know how it spawns players i cant really tell you how to start stop it

#

it isnt a module you can just sync to trigger and have it turn on/off

stark fjord
#

damnit

#

ill find more excuses

supple tusk
#

this is what's saved into an SQF file in my mission folder, what it should be doing is triggering an animation, sound, spawning and then reversing the animation with another sound effect

stark fjord
#

This doesnt spawn player at all πŸ˜„
This spawns a droid

winter rose
supple tusk
stark fjord
#

but im guessing you want to make it look the same, except for players

#

i guess i missunderstood

supple tusk
#

no I want the script to activate if a player is next to it

stark fjord
#

DAAMN

#

okay

#

yes i completely missunderstood

supple tusk
#

apologize trying my best to explain it all

stark fjord
#

okay, so you wanna spawn N amount of droids when player gets close ye?

supple tusk
#

yeah exactly

stark fjord
#

yeah put that script into sqfbin and gib link

#

also do you know how long the animation on the script lasts?

supple tusk
#

I dont have the exact times on them but there were enough rests in the script to prevent it from wigging out

#

at least it did when i tested it

stark fjord
#

there is nothing in it to prevent spawning 100 of them in one second. but i figure it aint gonna look nice

supple tusk
#

oh I see how that could be an issue

stark fjord
#

So do you want trigger to be repeatable? So every time someone enters it spawns drones or is it just gonna be 1 time event

supple tusk
#

the end goal for me is a repeatable trigger that goes on cooldown after spawning say X number of droids

stark fjord
#

okay how many and how long between the spawns?

#

of the two droids?

supple tusk
#

I had hoped this would be easier since the spawn droids functon is actually on the Dispencer's interaction menu but have only discovered that it dose not make it easier XD

stark fjord
#

no, it sure isnt easy if you never did it before

#

also is this in cfgFunctions already?

supple tusk
#

I was thinking while active it would only be a couple of seconds between the droids spawned when a play enters before then going dormient for about 2 minutes or so

#

im not sure if its in CFGfunctions I pulled the script I sent from the function viewer

stark fjord
#

then its in there allright

supple tusk
#

unsure if thats the same thing

stark fjord
#

you know its name? it should be listed on very top

supple tusk
#

DISPENSER_fnc_spawnUnit

#

or is that the name of the function?

stark fjord
#

Okay so lets first tackle spawning and cooldown later, its gonna be something like this.
in OnActivation field of the trigger:

thisTrigger setVariable ["cooldown", time + 2];
[spawnerObject] spawn
{
  params["_spawner"];
  private _grp = createGroup east;
  for "_i" from 1 to <amount of drones you want> do //Execute code below N amount of times
  {
    private _spawnpoint = selectRandom [1,2,3];  //Select random spawn position as there appear to be 3 from your code snipped
    _spawner setVariable ["location", _spawnpoint]; //Save it
    [_spawner, _grp] spawn DISPENSER_fnc_spawnUnit; //Call the function
    sleep <amount of time between two spawns>; //Wait until next drone spawn
  };
};

Set trigger to server only and repeatable. And replace spawnerObject with the variable of the object that acts as spawner, <amount of drones you want> with number and <amount of time between two spawns> with number.

supple tusk
#

Awesome! I'll try it out right away

stark fjord
#

Oh wait

#

There

#

if there is sleep inside the function, one must use spawn instead of call

supple tusk
#

I did have a question about the random spawn section though, the script is essentially set so that a "door" open and a droid pops out at the corresponding door with the shape of the object being like a triangle, if there spawn position is random dose that mean "Door1" will open but they'll spawn in position 3?

stark fjord
#

no the function you've sent seems to put them where they should be
thats all the stuff inside switch(_location), we just tell it here to chose location 1, 2 or 3 at random. So they dont always spawn at door 1

supple tusk
#

Oh gotcha, so dose this mean that the trigger is also spawning them? Or is it only keeping track of how many have spawned?

stark fjord
#

No <amount of drones you want> <-- replace that with number, which is the amount you wanna spawn

#

Eg: for "_i" from 1 to 6 do will spawn 6 droids

supple tusk
#

so is that going to be spawning them all at once?

stark fjord
#

Umm <amount of drones you want> with <amount of time between two spawns>

#

if you set <amount of time between two spawns> to 0 all will spawn at the same time

#

if you put it to lets say 10, 1 droid will spawn, 10 seconds later another, then 10 s later 3rd and so on

supple tusk
#

is there a way that instead of the trigger determining this I can tell the trigger to run the spawning script I already have on the object for a set period of time before deactivating and going into a cooldown?

stark fjord
#

like deactivate interaction?

supple tusk
#

Im not sure what that means?

stark fjord
#

what do you mean by

script I already have on the object

supple tusk
#

Okay im gonna pull a few screen shots to show what the object dose with the script on it currently

#

1st one shows the dispenser, when the script is activated currently through an "addaction" prompt it opens its hatch while playing some audio. a battle droid then spawns beside where the hatch opened and finally the hatch closes, pressing the button again will then prompt it to preform the same series of actions just from a different hatch and so on and so forth.

#

this is essentially what the script that I sent you dose currently my problem is I want a trigger linked to it that tells it to preform that script thats in the Dispenser we'll say 6 times before then entering a cooldown if players enter the trigger radius

stark fjord
#

By interaction i meant scrolly scrolly action menu thingy.
Okay post your addaction script

supple tusk
#

sorry I might also be misunderstanding, so the script I sent as far as im aware is if you want to brute force this thing into spawning stuff, there is also a scrolly scrolly menu option that spawns stuff if you remote control it in the zeus

stark fjord
#

amm... i dont think this will work the way you think it will...

supple tusk
#

the addaction was nothing I wanted to keep on it and was just a place holder to make sure the script actually works

stark fjord
#

okay...

#

then im confused

#

Do you want players to spawn droids by action, or do you want droids to pop out when they get inside the trigger...?

supple tusk
stark fjord
#

or what exactly...

supple tusk
#

okay Im gonna try to start from the begining and be happy with whatever is recommended

#

so "Arma human player" walks into the trigger zone, that then activates this droid spawner which creates X amount of droids before going onto a cooldown for X amount of seconds

stark fjord
#

Thats exactly what our trigger above would do (doesnt have cooldown part yet)

  1. Player walks in
  2. Droids spawn
supple tusk
#

currently ive been trying to make it spawn said droids by using the CFG file in the function menu by putting it into a script that the goal was to have the trigger run that script to spawn the droids then go on cooldown, but if its easier to do something like tell the trigger to use the interaction menu prompt that totally works to

supple tusk
stark fjord
#

its using its spawn function DISPENSER_fnc_spawnUnit the one you gave me

#

and its not relying on sqf file

#

it will have no actions, it will just spawn stuff

supple tusk
#

okay that makes much more sense I was confused because I thought the trigger script you gave me was activating my sqf which is also the spawning script while also activating it again from its own function

supple tusk
stark fjord
#

no, unless you gave me wrong function

stark fjord
supple tusk
#

no thats the one I was using in the sqf file, I was just mixed up thinking it was doing the DISPENSER_fnc_spawnUnit process twice. Once being from the trigger and once from it activating the sqf file its a mistake on my end in understanding sorry

stark fjord
#

it is doing DISPENSER_fnc_spawnUnit

supple tusk
#

yes it is

stark fjord
#

so it works?

supple tusk
#

im getting an error that its missing a "}" on line 2

stark fjord
#

did you edit the variables?

supple tusk
#

I did might have deleted it by accident 1 sec

stark fjord
#

post here what you are putting in there

supple tusk
#

fixed the first issue now its saying invalid value

#
{ 
  params["_spawner"]; 
  for "_i" from 1 to 6 do //Execute code below N amount of times 
  { 
    private _spawnpoint = selectRandom [1,2,3];  //Select random spawn position as there appear to be 3 from your code snipped 
    _spawner setVariable ["location", _spawnpoint]; //Save it 
    [_spawner] spawn DISPENSER_fnc_spawnUnit; //Call the function 
    sleep 4; //Wait until next drone spawn 
  }; 
};```
stark fjord
#

did you put a valid object variable here -> spawnerObject

supple tusk
#

oh god no i didnt sorry

#

should there be a colin after "for "_i" from 1 to 6 do"

stark fjord
#

no

supple tusk
#

its saying its causing an invalid number in expression

#

and marking just to the left of the forward slashes on that line

stark fjord
#

oh, delete all the comments

#

everything after // including slashes themselves

#

tbf i didnt test it

supple tusk
#

that was the issue my bad

#

okay got another error but not with the trigger

stark fjord
#

ah then DISPENSER_fnc_spawnUnit isnt the script that you posted in the sqfbin

supple tusk
#

no that is the spawn unit script

supple tusk
#

thats the one I posted right?

stark fjord
#

check yourself

supple tusk
#

okay, it is the one i posted and its the same as the FNC_spawnunit script in the function tool

#

no im an idiot

#

I didnt copy the last 2 lines

#

ffs

#

there is the actual one, sorry again

stark fjord
#

this function makes no sense _dispenser isnt declared anywhere it just pulls it out if its posterior. Or is something else missing

supple tusk
#

this time I can promise that I didnt cut anything out

#

when I had run the code through Chat GPT to try and help me it had said the same thing if that helps

stark fjord
#

like i see whats wrong with it, whoever wrote it forgot to replace _dispenser with _spawner

#

BUT, it should still create droid despite the error

#

does it?

true frigate
#

Replace a semicolon with a Greek question mark (;) in your friend's script and watch them pull their hair out over the error

supple tusk
#

no, it says there is an error

#

sorry it would be line 14, 25, 36, 45

stark fjord
#

yeah, lsd_cis_b1_standard

#

is probs wrong class for the droid

#

or what does error say

supple tusk
#

specifically its calling out right before the _dispenser as an undefined variable

#

so still the same error I posted the screen shot of just the line changes depending on what hatch trys to spawn a droid

stark fjord
#

no its not

supple tusk
#

theres another error that only flashes for a second

stark fjord
#

okay lets take a step back, what do you have inside droidspawn.sqf

#

just for the reference

supple tusk
#

currently I have exactly what I sent you but I removed it from the spawners int. field

#

or rather removed my add action that triggered it

stark fjord
#

Oh wait a second.. code changed again... _group = createGroup sideLogic; is missing...

supple tusk
#

oh and becuase _group isint defined its not able to create them?

stark fjord
#

and who wrote that code, was it you or you copied it from somewhere

supple tusk
#

the 2nd was copied from arma 3

#

I thought I did the same for the first I must have accidently sent the one I was fiddling with

stark fjord
#

Okay. and that is 100% no question about it, no change and nothing added or removed from what it shows in functions* viewer as function DISPENSER_fnc_spawnUnit and you swear by it??

supple tusk
#

it is the code from arma 3 itself, the only thing I didnt put in was the 9 lines of creators notes which took up lines 1-9 that I can add if it would help

#

it was just a bunch of * and a note saying please dont use the mod assets without permission

stark fjord
#

Side note its not from arma3 its probs from starwars mod. Ill edit the snippet above to include group.
it contains an error. But nothing we can do about that, the dispenser thing in the last line.

#

What side do you want bots to spawn opfor blufor indie?

supple tusk
#

sorry I meant coipied from the arma 3 application not that bohimeia made it lol

#

opfor

stark fjord
#

try above now. _dispenser error will still popup

supple tusk
stark fjord
#

That one. I edited it, with createGroup

supple tusk
#

works perfectly, the error still pops up but everything spawns as it should

stark fjord
#

Ok now cooldown, ill edit again above script again BUT replace Condition in trigger with this this && time > (thisTrigger getVariable ["cooldown", 0])

#

In above example cooldown is set to 2 seconds

#

so change it to fit your needs, but for testing purposes set it to something like 30, so you can see if bots spawn every 30 seconds

supple tusk
#

looks like it works mostly, the only thing im noticing is the trigger isint going off again if I remain in the zone

#

I have it set to repeatable to I have to add something to the deactivation field?

stark fjord
#

that is how its supposed to work. Do you want it to only do it if you leave the zone and come back?

supple tusk
#

I was wanting to have it go off again if you remain in the zone

granite sky
#

Don't use a trigger. Just have a nice spawned checking loop.

supple tusk
# stark fjord and it does.

it's not currently, if I remain in the zone without leaving it activates once and doesn't activate again even if I remove the cooldown

stark fjord
#

In on activation code did you change it to thisTrigger setVariable ["cooldown", time + 30];?

#

or did you perhaps change condition code by accident

stark fjord
granite sky
#

I thought triggers had no built-in repeat-fire capability. Like you always have to move out and then in again.

stark fjord
#

nope

#

well they do but im changing condition code to constantly false-> true if he stays inside within the period

granite sky
#

Are you sure that works?

stark fjord
#

100%

supple tusk
#

that was the problem I only copied the new condition code and didnt update the activation

stark fjord
#

yep

#

okay so now it does what you want it to do, bar the error on line 54?

supple tusk
#

this && time > (thisTrigger getVariable ["cooldown", 20])

thisTrigger setVariable ["cooldown", time + 2];
[disp3] spawn
{
params["_spawner"];
private _grp = createGroup east;
for "_i" from 1 to 3 do
{
private _spawnpoint = selectRandom [1,2,3];
_spawner setVariable ["location", _spawnpoint];
[_spawner, _grp] spawn DISPENSER_fnc_spawnUnit;
sleep 4;
};
};

this is what I have currently

stark fjord
#

yep, now it will go off every 2 seconds

#

that is time + 2, if you want it to go off every 1 minute do time + 60

#

etc, you get theidea

supple tusk
#

oh gotcha, yup defenitley working just watched 6 battle droids spawn all at once

stark fjord
#

ye

supple tusk
#

I thought time + 2 would be 2 plus the cooldown so I'll fix that quick

stark fjord
#

because spawning script is executing for 12 s well actually 16 but last 4 s is just idling

supple tusk
#

perfect! its working perfectly on the loop

stark fjord
#

cool, there are also ways to fix that internal _dispenser error, but only server will see it anyways, so i dont think its worth fixing it.

supple tusk
#

its absolutley perfect thank you so much Marko for all your amazing help and dealing with me struggling to understand this lol

stark fjord
#

np, you did make me hate arma3 starwars even more tho.

supple tusk
#

if I wanted to try and fix the error is it going to be a super complicated thing?

supple tusk
stark fjord
#

well i aint gonna stop you, but im going to sleep

supple tusk
#

lol fair enough thanks again for all the help!

stark fjord
#

OH. and remember to have trigger set to server only. otherwise you will end up with droid battalion, depending on amount of players during the op

supple tusk
#

perfect sounds good!

clever smelt
#

Hey everybody, I'm very new to the Eden editor as well as scripting and I'm trying to learn as I build my first scenario. atm I am trying to play a video so the multiplayer version of the scenario can see the SP intro as well. I have setup a trigger and placed it so when players spawn they can watch the intro. Issue is, I can't seem to get the pathing right and tbh I am super lost because the forums and BI wiki don't really explain this obscure process well. Attached are some screenshots of my issue. Any help would be appreciated!

little raptor
#

and set your trigger to server only

spice kayak
clever smelt
#

You folks are damn wizards!

torn hemlock
#

@spice kayak you should attach to object, not string :)

spice kayak
#

That's the issue though, I'm trying to attach it to a specific marker, which is randomly decided at the top of the script.

#

So there are marker objects all on the map, "Extraction_0" through to 5, and I'm trying to attach it to one of them, but it doesn't seem to want to attach to the value of a variable, if that makes any sense.

torn hemlock
#

Because you should attach to object, not string

#

If there is an object with name Extraction_2 then you should compile your STRING to its name

spice kayak
#

If tExtraction = "Extraction_" + "0", giving me "Extraction_0", which is an object in game, would it not work?

torn hemlock
#

Because "Extraction_0" is a STRING

spice kayak
#

Right, sorry. I should have said scripting is rather new to me haha.

torn hemlock
#

If you have some objects named like Extraction_0, Extraction_1 etc... then you have to call compile your string. ex: _object = call compile "Extraction_1"; then use this variable

spice kayak
#

so, if I went '_extractionLocation = call compile tExtraction;' would that give me the result I'm looking for? Then use 'attachTo _extractionLocation'? Or am I reading what you're saying wrong?

torn hemlock
#

It says that we can attach one OBJECT to another OBJECT

fair drum
#

BIS_fnc_kbTell does not seem to automatically determine the distance of a player before deciding if it should play the sentence direct or through radio. Anyone else experience this?

torn hemlock
#

not location/marker etc

spice kayak
#

Alright. I just am confused, because I swear an earlier version of my mission actually had this working perfectly fine.

#

Oh well. I'll try and figure something else out. Thank you.