#arma3_scripting

1 messages ยท Page 759 of 1

graceful kelp
#

nice

past wagon
#

how do you do a findIf statement inside a forEach loop? I'm having an issue with _x.

warm hedge
#

I'm having an issue with _x.
Explain

#
{
  private _currentX = _x;
  _currentX findIf {_x == 2};  //1
} forEach [[1,2,3]];```
This you mean?
short vine
#

Is there a way to allow a units addaction be accessed in a vehicle? Trying to allow crew to scroll wheel on one another.

tough abyss
#

gotcha, thanks

little raptor
#

did you add it on both clients?

short vine
#

This is singleplayer, so heres an example.

Infantry unit has an addaction assigned to him before entering aircraft.
Infantry unit enters aircraft.
Crewman, while in aircraft, can scroll on infantry and access the addaction

little raptor
#

oh that. I don't think that works
game issue

#

there are some other tricks you can use tho

short vine
#

Hmm darn. Other solution would be to maybe pass the addaction to the aircraft when entering? Im always down for more tricks, do you have any you recommend?

little raptor
#

well what I was gonna recommend was what you said.
another way might be adding the action to yourself, and checking an intersection to get the other guy
might be a bit slow I think ๐Ÿค”

#

not even sure if intersection works on units in the vehicle ๐Ÿค”

#

it should tho

short vine
little raptor
#

something like this:

this addAction
[
    "title",    // title
    {
        params ["_target", "_caller", "_actionId", "_arguments"]; // script
    },
    nil,        // arguments
    1.5,        // priority
    true,        // showWindow
    true,        // hideOnUse
    "",            // shortcut
    toString {player == _target && {
          _inters = lineIntersectsSurfaces [eyePos _target, eyePos _target vectorAdd (getCameraViewDirection _target vectorMultiply 3), _target, vehicle _target, true, 1, "FIRE", "NONE", -1];
          _otherGuy = objNull;
          {
            if (_x#2 isKindOf "CAManBase") exitWith {
              _otherGuy = _x#2;
            };
          } forEach _inters;
          !isNull _otherGuy
        }},     // condition
    50,            // radius
    false,        // unconscious
    "",            // selection
    ""            // memoryPoint
];
little raptor
short vine
#

Bascially transferring the data from the units existing addaction, and recreating it on the vehicle, or maybe its crew members to use it while in the vehicle

little raptor
# short vine Bascially transferring the data from the units existing addaction, and recreatin...

you have to save the action id first:

empty_params = ["", "", nil, 1.5, true, true, "", "", 50, false, "", "", "", ""];
_id = _unit addAction [...];
_unit setVariable ["my_actionID", _id];
_unit addEventHandler ["GetInMan", {
  params ["_unit", "_veh"];
  _params = _unit actionParams (_unit getVariable ["my_actionID", -1]);
  if (_params isNotEqualTo empty_params) then {
    _veh addAction _params 
  };
}];
short vine
#

Hmm let me play with that a bit and see what I can break ๐Ÿ™‚ Thank you!

little raptor
short vine
#

Good point, ill do that as well

sullen latch
#

@warm hedgejust found your animation thing on steam,exactly what im looking for

warm hedge
#

What?

#

I thought you were doing a mission

sullen latch
#

your artwork

#

no no

#

its easier to explain

#

ina VC but long story short its for MP,for ues

#

zues*

warm hedge
#

Then that's a no

#

Artwork Supporter is a Mod for purely artwork creation nothing else, nothing to do with a mission

sullen latch
#

so am i usuing the correct mod or

#

like its hard to explain

#

im in gen if you want me to explain more

warm hedge
#

No thanks

#

Just explain in the text, will leave the log

sullen latch
#

im usuing the animation scrips in the artwork to make my FOB more legit,then ill salve it in a comp,place it in zues and see if it works,if so the animations should stay and make the fob look like the AI are doing stuff such as repairing cars,listening to radio chatter and wht not

warm hedge
#

Then you're just doing it wrong. as I said Artwork Supporter is just an artwork supporter, not a mission supporter

sullen latch
#

so it won't work in MP then?

warm hedge
#

Never. Neither for a SP mission

little raptor
#

not mission making

sullen latch
#

yeah i get that part,if thats the case is there a mod like that out there or am i going to have to deal with like Zam and stuff

hallow mortar
#

Although Artwork Supporter gives you an easy interface for it, it is possible to apply animations to AI without it, using commands such as switchMove

sullen latch
#

would that be my best bet for static animation?

warm hedge
#

More like AS just does switchMove for you w/o complex scripting

little raptor
#

and change SIT2 to your desired ambient anim

#

but meh

sullen latch
#

thank you

warm hedge
#

Which note you mean Leo?

little raptor
#

2nd note

hallow mortar
# sullen latch would that be my best bet for static animation?

It should work with any animation (but bear in mind that certain static poses are added by the Artwork Supporter mod itself and won't be available without it).
BIS_fnc_ambientAnim as Leopard20 mentioned is easier to figure out, but keep in mind it only supports the specific animations listed on the wiki page. switchMove is a little more complex to work with, but can use any animation in the game.

hallow mortar
# little raptor this part

It's probably because of this parameter:

snapTo: Object - (Optional, default objNull) the object where the unit will be snapped to
I expect there's something that gets lost in translation on JIP, so it actually uses objNull as the position instead of not snapping at all

little raptor
#

but what's the difference with removeExecing it?

#

apparently using remoteExec is fine, but object init is not thonk

#

both should be the same blobdoggoshruggoogly

hallow mortar
#

ยฏ_(ใƒ„)_/ยฏ

#

It might not even be true, I don't know.
Maybe it's actually this one:

attachToLogic: Boolean - (Optional, default true) true to attach the unit to the created logic object, forcing it in one position
and something something logic position not synced
I haven't tried it or looked at the function code and I'm not going to

warm hedge
#
//remove NV goggles from units without helmets
if (_gear != "ASIS") then
{
    { _unit unassignItem _x } forEach 
    [ 
        "NVGogglesB_grn_F", 
        "NVGoggles_tna_F",
        "NVGogglesB_gry_F",
        "NVGoggles_ghex_F",
        "NVGoggles_hex_F",
        "NVGoggles_urb_F",
        "nvgoggles", 
        "nvgoggles_opfor", 
        "nvgoggles_indep"
    ];
};```You can guess how horrible it is ๐Ÿ˜„
hallow mortar
#

In fairness the function was added before the hmd command

hallow mortar
mortal wigeon
#

Are there any cases where the player's locality is not his own machine?

#

I'm trying to figure out why in some rare cases in my MP game mode, eventHandler "killed' stops firing when player is killed.

pulsar bluff
#

under what circumstances is the player killed?

mortal wigeon
#

being shot by another player

pulsar bluff
#

that shouldn't randomly fail

#

unless there are other scripts running

mortal wigeon
#

There's a few things going on but this EH is pretty straightforward. It frequently stops firing for some players. I'm pretty mystified. It gets added in initPlayerLocal.sqf.

#

I have spent many hours on this ๐Ÿ˜ฆ

#

One thought I had was maybe it stops firing for players who've gotten into another player's vehicle and their locality temporarily changed, breaking the eventHandler. But my testing showed that your locality does not change when you're a passenger.

mortal wigeon
# little raptor do you add it after respawn?

I don't re-add it after respawn but that isn't supposed to be necessary. My next step may be adding a post-respawn check to see if it exists and adding it if it doesn't. Maybe there is an unusual respawn situation that breaks it.

little raptor
mortal wigeon
#

as-in, player addEventHandler [etc.]

little raptor
#

try params ["_player"] instead.

#

and use _player

mortal wigeon
#

Ok. What is the thinking behind that?

little raptor
#

player object is not assigned thonk

mortal wigeon
little raptor
#

not related to FPS. but maybe the game doesn't assign the player at init. dunno. I've always used that and not player

pulsar bluff
#

it should be very rare

#

to the point of being a non-issue

#

my guess is script conflict or bug in script

honest pilot
#

hey, I came here to ask how i can make an sort of heal animation script , like
I have a unit who have a injured animation , what I wanted to do is that I use my Medkit on to make Unit regain heath , so alfter i treat , he change animation , but my Init didn't work . if someone knows plz tell me

#

(the injured unit have like 30% of heath)

open fractal
honest pilot
#

no just the static animation

#

for an init who react when unit have 100% of health and switch animation

copper raven
digital wasp
#

hello, I have a problem. i put up sandbags and stuff in a building but when building is destroyed, all the stuff I put up just floats in the air and annoys me, any way to remove the objects when building is destroyed?

pulsar bluff
#

you could replace the destroyable building with one that isn't destroyable, and have it as part of the composition

#

or replace it with a destroyable one and delete the sandbags when it gets destroyed

winter rose
#

instead of replacing, you can disable building's damage

or delete sandbags on building's destroying

or attach them to the building

digital wasp
#

attach them to the building? how would that work?

winter rose
#

attachTo

pulsar bluff
#

you cant really disable a buildings damage tho

#

terrain building i mean

winter rose
pulsar bluff
#

when i was working on that sort of thing, clients stream terrain buildings and a server-set "allowdamage false" flag would not remain on the client machine if he moved far away and returned

#

causing a situation where clients have destroyed buildings while server has intact buildings

#

did something change?

fair drum
#

if I'm making a long trigger statement, can I use \ to denote new line?

"\
   ['loyalist', 'SUCCEEDED'] call BIS_fnc_taskSetState;\
   deleteVehicle thisTrigger;\
   etc commands;\
"
copper raven
#

you don't need to use anything

#

using \ will just result in a parse error probably

fair drum
#

I've used it before when it comes to configs with

expression = "\
if (blah) then {\
  blahblahblah;\
};\
if (blah) then {blah};\
"

with no problems

#

just wondering if it would work for sqf too

copper raven
#

it could be just arma's preprocessor being arma's preprocessor

fair drum
#

I don't think you can in sqf. my linter is having a fit

copper raven
#

well the easiest way to tell is just, loadFile "test.sqf", preprocessFile "test.sqf"

steel fox
#

I don't believe trigger statements get preProcessed, just Compiled no?

copper raven
#

they don't

copper raven
#

just tested

copper raven
#

seems weird that it even works in double quoted strings

finite bone
#

I have a zeus module script that modifies the X,Y,Z positions of an object randomly and create some effects while doing so. When I place this script over an object, it has to activate the script for that object. How will I achieve this? (Something like cursorObject or cursorTarget but from a module perspective)

little raptor
#

Terrain objects are streamed

little raptor
little raptor
finite bone
#

Alright thanks!

pulsar bluff
ebon citrus
#

how can i disable the stupid smoothing of camCommit? I want it to linearly interpolate between 2 targets and 2 positions, but instead it does some weird spinning around inbetween

#

also, the transition between the 2 positions is really stuttery if i set a long time for camCommit

#

too stuttery to be attributed to floating point inaccuracy

hallow mortar
#

You can use https://community.bistudio.com/wiki/getUserMFDValue to read the values, but it does return all user MFD values for the vehicle, so you'll need to filter it a bit to check the specific value you want. I don't know much about MFD values so I can't tell you exactly how to interpret that array.

You don't necessarily need 2 actions unless you want the title to be different; if there are only two possible states, you can have one action that just checks what the current state is and sets it to the other one. But if you do use 2, you can definitely make it so only one is visible at any time.

ebon citrus
#

how can i linear interpolate a camera between 2 targets?

#

camsettarget and camcommit do some arc interpolation

#

and theyre very stuttery

#

what's the difference between camCommitPrepared and camCommit

open fractal
#

you can have two sets of data

ebon citrus
#

what is the practical difference?

open fractal
#

wish I knew

ebon citrus
#

and why does the camera stutter so much?

#

and why does it not interpolate between 2 targets linearly?

#

i am at 60 fps

#

but the camera stutters with its movement

open fractal
#

I don't really see stuttering when I use it, haven't tried it on a dedicated server in a while though

#

shouldn't make a difference i don't think as long as you have it properly running locally

#

as for the interpolation you can ask the spaghetti chef

ebon citrus
open fractal
#

have you tried setting the position and vector manually on each frame?

ebon citrus
open fractal
#

that should be linear right if you have a linear function?

ebon citrus
#

framerate is not linear

#

you would have to compute an accurate time

#

sqf doesnt offer an accurate time

open fractal
#

i don't have much to offer then besides suggesting something horrendous like switching to and from the camera in the middle of the transformation so it appears linear

#

or forcibly halting its movement

ebon citrus
#

what?

#

that doesnt make any sense

open fractal
#

i scrolled up

#

i was picturing it wrong

#

yeah i got nothing

tough abyss
#

getting an error mising ( at

if (//error here_selectedindex))==0) then (
_barbedwire2 = "Land_Razorwire_F" createVehicleLocal position player;
barbedwire2 attachTo [player, [0,5,2]];)

any ideas on what im missing?

_Rsclistbox_1500 ctrlAddEventHandler["LBSelChanged", {

params["_control", "_selectedinterface"];

if (_selectedindex))==0) then (
_barbedwire2 = "Land_Razorwire_F" createVehicleLocal position player;
barbedwire2 attachTo [player, [0,5,2]];)

if (_selectedindex))==1) then (
_tower2 = "Land_LifeguardTower_01_F" createVehicleLocal position player;
tower2 attachTo [player, [0,5,2]];)

if (_selectedindex))==2) then (
_circular2 = "Land_BagFence_Round_F" createVehicleLocal position player;
circular2 attachTo [player, [0,5,1]];)

if (_selectedindex))==3) then (
_czech1 = "Land_CzechHedgehog_01_new_F" createVehicleLocal position player;
czech1 attachTo [player, [0,5,1]];)

if (_selectedindex))==4) then (
_long2 = "Land_BagFence_Long_F" createVehicleLocal position player;
long2 attachTo [player, [0,5,2]];)

if (_selectedindex))==5) then (
_teeth2 = "Land_DragonsTeeth_01_4x2_new_redwhite_F" createVehicleLocal position player;
teeth2 attachTo [player, [0,5,2]];)

if (_selectedindex))==6) then (
_bunker2 = "Land_HBarrierTower_F" createVehicleLocal position player;
bunker2 attachTo [player, [0,5,2]];
}];
tranquil jasper
#

well first of all

if (_selectedindex))==0) then (

you have 1 ( and 3 ) so that's a problem
Also you need { } after then not ( )

tough abyss
#

im selecting from a rcslistbox i can include the things ive added in the box if you want

tranquil jasper
#

Are you saying there more code than what is posted?
You also have _selectedindex in the if conditions but _selectedinterface in params

tough abyss
#

i can upload the entire script but it will be a file

#

only a few kb

tranquil jasper
#

github link would be much better

tough abyss
#

give me a second please just need to login to github

tough abyss
#

wait dont worry

still forum
copper raven
#

i think he just wanted to use them for readability

still forum
#

wuht

copper raven
still forum
#

how does adding useless backslashes that break the code help with readability ๐Ÿค”

copper raven
#

dunno

#

i'm suprised it actually works like that (in preprocessor)

#

the fact that it strips backslashes within ""

still forum
#

in preprocessor macro definitions you can disable the line ending by blocking it with \ at end

copper raven
#

yes, macro definitions

still forum
#

yes, and tha should be it

copper raven
#

should ๐Ÿ˜„

#

but it's not

ebon citrus
#

BIS_fnc_unitCapture doesnt copy anything to my clipboard when it ends

proven silo
#

im using a whitelisted arsenal script, I was wondering if there was anyway to make it so people can't take damage while there in the arsenal?

ebon citrus
#

BIS_fnc_unitCaptureSimple works as intended

open fractal
ebon citrus
#

unitplaysimple doesnt work

steel fox
proven silo
#

hey so i was reading what you said can would something like this in my init.sqf work? ```sqf
[true, "arsenalOpened", { player allowdamage false; }] call BIS_fnc_addScriptedEventHandler;

little raptor
#

Juat read the value
To toggle 0 and 1, just do 1 - value

proven silo
#

also noob question how do i add another trigger to this sqf if ( (not canMove _x) || (not alive _x) || (({ alive _x } count (crew _x)) isEqualTo 0) && !(_x inArea kavala_hangar) ) then { solution: add another ```sqf
&& !(_x inArea kavala_hangar)

proven silo
#

so that is for a script to remove empty vehicles and the kavala_hangar is the trigger so it doesn't delete vehicles in that area in the ```sqf
(_x inArea kavala_hangar)

#

oops

#

but i have multiple areas(triggers) i want to add i tried doing ```sqf
(_x inArea kavala_hangar,skip_hangar)

little raptor
#

Also you might want to use lazy evaluation

buoyant abyss
#

Ahhh ok thanks

proven silo
#

awesome the && worked thank you @little raptor

little raptor
proven silo
#

so should i use || instead?

#

i just tried that and it makes none of them work

little raptor
#

No. That's not what I mean

little raptor
#

&& means and
|| means or

little raptor
little raptor
little raptor
little raptor
#

after then you need {} and not ()
and your variable names are all wrong so... your script is totally kaputt

#

Neither

#

Find the MFD index then do

getUserMFDValue _veh select _index
open fractal
#

disregard found it in the docs

#

that should work, just be sure to add another one for closing the arsenal

#

consider initPlayerLocal.sqf as it does not need to fire serverside if it's dedicated

proven silo
#

Okay i will switch it thanks for the heads up

#

also i was wondering if anyone could give me a solution for this

#

im using ```sqf
0 = [] spawn {
while{true} do {
{
if(_x distance (getMarkerPos "i_safezone") < 75) then {_x allowDamage false} else {_x allowDamage true};
} forEach allUnits + vehicles;
sleep 1;
};
};

#

i do player enabledamage false; and i still take damage

open fractal
#

it's checking every second if the unit is outside the safe zone and enabling damage if it is

#

also this isn't scripted well for multiplayer

proven silo
#

Is there any other way to make it so an unit/vehicle that is in that marker wont take damage but I can still use god mode? and i know im new to scripting and just been googling and found that for a safezone

open fractal
#

a lot of the scripts you can find through google are simply goofy

#

but if you want to have a unit override that script a good way to do that is by setting a variable and having a check in the code for that variable

#

also 0 = [] spawn is unnecessary you can just write [] spawn

proven silo
#

how can I do that can you teach me lol that would be cool

open fractal
#

yeah

proven silo
#

and thanks i appreciate it, i been working on my mission all day its fun

open fractal
#
[] spawn { 
    while{true} do { 
        if !(_x getVariable ["DJ_GodMode", false]) then {
            {
                if (_x distance (getMarkerPos "i_safezone") < 75) then {
                    _x allowDamage false
                } else {
                    _x allowDamage true
                }; 
            } forEach allUnits + vehicles; 
        };
        sleep 1; 
    }; 
};
#

then for the unit you can do

_unit setVariable ["DJ_GodMode", true];
#

what's happening is you're setting a godmode variable for that unit

#

and the script checks if that godmode variable is false, which it defaults to if it is not manually set

#

again, this script is weird and not good for multiplayer. allowDamage takes a local attribute, which means it has to be executed on the player's machine

#

what the individual on the steam forum is saying to do is to have this loop continuously run on every machine and iterate through every single unit and vehicle

#

so every unit is iterated through on every machine just to set allowDamage on the player

#

and the player's vehicle

#

there are likely more efficient ways to go about this, but let's use your loop as an example

#

instead of putting it in init.sqf and having it loop like this on every machine, you can go into initPlayerLocal.sqf and have every client only worry about its own player unit

proven silo
#

okay, and i put the last code in the units init box correct? and I been trying to learn about init and initserver all of that

#

also thank you for writing that out for i really appreciate it

open fractal
#

you want to avoid the init box unless you're just slapping in some quick code that references the unit itself

#

the init box executes code for every machine, including JIP

#

quick question @proven silo is this for AI or just players?

proven silo
#

its for players i have a 5v5 cqc mission im working on

open fractal
#

oh that makes things super easy

proven silo
#

so if that code doesn't go into the unit I would slap it in initplayerlocal and it will make it so all units bypass allowdamage true correct?

#

its more than 5 players but its a tdm cqc mission.

#

be right back gonna get a drinkl

open fractal
#
//initPlayerLocal.sqf
[] spawn { 
    while{true} do {
        private _unit = player;
        if !(_unit getVariable ["DJ_GodMode", false]) then {
            if (_unit distance (getMarkerPos "i_safezone") < 75) then {
                _unit allowDamage false
            } else {
                _unit allowDamage true
            };
        };
        sleep 1;
    };
};
#

again, looping like this should generally be avoided but this isn't too heavy and I should be going to bed soon

#

make a file called initPlayerLocal.sqf in the mission folder and slap this in there

#

this will have every player's client run the check itself instead of having every machine check every unit

#

the better way to do it is to use a function to only run when it's needed (i.e. during a certain stage of the round)

proven silo
#

Hey so I just tried that and the safe zones still work, but its the same result god mode doesn't work when Im outside of the marker area. I just needed to add that code into initplayerlocal correct?

open fractal
#

what did you try?

#

did you also set the godMode variable for your player unit?

proven silo
#

Nope how do I do that? Thats what I was asking about the units init in the editor do I need to put ```sqf
_unit setVariable ["DJ_GodMode", true];

open fractal
#

_unit is an undefined local variable. I just wrote it as a placeholder. if you put it in the init it would be this

proven silo
#

ahh

#

so should I do in my initplayerlocal.sqf ```sqf
player setVariable ["DJ_GodMode", true];

open fractal
#

if you look at the code setting that variable to true just makes the unit bypass the script entirely

#

so yes, if that's what you want to happen

#

if !(_unit getVariable ["DJ_GodMode", false]) then { read this as "if DJ_GodMode is not true then do the thing"

#

so what you do with that depends on your goal right now. if you want a unit to selectively bypass the script then you write this setVariable ["DJ_GodMode", true] in the init box

proven silo
#

Okay sorry im really slow at this can we from step one, my goal is to have a safe zone for no player or vehicle damage but admins need to be able to toggle god mode and currently whats happening is god mode doesn't work at all because of my script.

#

sorry if im making it confusing

#

or god mode does work but only in the safezone

open fractal
#
//initPlayerLocal.sqf
player allowDamage false;
[] spawn { 
    while{true} do {
        private _unit = player;
        if !(_unit getVariable ["DJ_GodMode", false]) then {
            if (_unit distance (getMarkerPos "i_safezone") < 75) then {
                _unit allowDamage false
            } else {
                _unit allowDamage true
            };
        };
        sleep 1;
    };
};
//local exec in the debug console (don't include this comment line)
player setVariable ["DJ_GodMode",true];
#

if you want to set the variable on the fly you can do that in the debug console. If you click the local button you can use player to get the unit of whoever ran the command locally

#

if you click global it will execute on every machine thus setting the godMode variable for every player

#
player setVariable ["DJ_GodMode",false];
``` to disable it
proven silo
#

going to try that right now

open fractal
#

this does not affect whether damage is allowed, only whether the unit is affected by the script

#

if you define a godmode function you can combine setting the variable and setDamage to have a single line that does it all

#

which you can then add to the scroll wheel menu, etc.

proven silo
#

Okay I understand now, that command is going to be the main god mode command instead of using player allowdamage false. I tested it and every is working fine so far thank you so much for putting up with a noob Im happy I can use god mode now ๐Ÿ™‚ I also have one more question if you don't mind it should be simple I hope. How would add a second marker would it go like this for this part of code ```sqf
if (_unit distance (getMarkerPos "i_safezone" && "second_safezone") < 75) then {

open fractal
#

that command is going to be the main god mode command instead of using player allowdamage false
what are you talking about?

#

and no that code wouldnt work

proven silo
#

I ran ```sqf
player setVariable ["DJ_GodMode",true];

open fractal
#

no it doesn't, it just prevents the script from setting allowDamage

#
player setVariable ["DJ_GodMode",true];
player allowDamage false;
#

this is what you're looking for

proven silo
#

okay but thats strange im on editor running and i only typed that in and i have god mode with the allowdamage

open fractal
#

GodMode is just the name of the variable, it doesn't actually change anything, it's a variable checked by the script before it does anything

open fractal
proven silo
#

yes

open fractal
#

i think the script isn't working

proven silo
#

im going to test it again

open fractal
#

try it without setting the variable

proven silo
#

okay going to restart my mission in editor and try allowdamage command first.

#

okay you were right I tried both commands separate local and nothing worked until I did ```sqf
player setVariable ["DJ_GodMode",true];
player allowDamage false;

#

must of been a bug idk how it was working the first time

open fractal
#
if (["i_safezone","second_safezone"] findIf {_unit distance (getMarkerPos _x) < 75 } > -1) then {
#

this is how you check a condition for multiple entities

#

Leopard might come in and say findIf is slow in which case an alternative is

if ((_unit distance (getMarkerPos "i_safezone") < 75) || (_unit distance (getMarkerPos "second_safezone") < 75))
proven silo
#

awesome thank you very much I appreciate it im just testing stuff right now making sure theres no other problems ๐Ÿ™‚

#

Okay man tested that second code and everything working flawless. You the real mvp

open fractal
#

yw dude I recommend checking out that functions library link itโ€™s fairly essential if you plan on adding more scripts

drifting sky
#

A2OA. I have an invisible target object I use for AI to suppress positions. If there's any way to do this, I'd like to have the target sway back and forth a little so the AI's suppressive fire is more spread out. Any way to do this?

little raptor
#

that's not a condition

proven silo
#

does anyone know what this means Tried to AccessTargetList for non-local AI group while non-local targeting was disabled! Engine will now enable non-local targeting which will hurt clientside performance.

little raptor
#

0 and 1 in sqf are not booleans

#

they're numbers

#

yes

little raptor
#

it only does targeting locally which improves performance

#

if you use a command such as targetKnowledge, targets, etc. on a remote unit it disables the optimization to be able to fetch what you requested for the remote unit

#

to use those commands you must always check if the unit is local using local command

#

if not remoteExec the function

proven silo
#

okay im a noob idk how to do that lmao, should i just use main branch also x86 or x64 for my dedi

little raptor
#

do what?

proven silo
#

what branch should i use when i host my dedicated server they have main profiling i was just testing them

little raptor
little raptor
#

everything is still working

#

but that message simply means that the optimization was turned off, either because of a bad mod, or your own fault

#

np

ebon citrus
#

is there really no EH for Activetext dragging?

honest pilot
#

hey , what is the init needed to set an heal script ?

warm hedge
#

"an heal script"?

winter rose
honest pilot
warm hedge
#

I don't really know what it is. Elaborate please, do you have any resources?

warm hedge
#

What exactly is the goal?

honest pilot
#

in fact , i need this for complete a **treat injured pilots ** task

#

so i know i can use

warm hedge
#

setDamage

honest pilot
#

but that will damage the unit

#

not givin' heath

warm hedge
#

W-what

honest pilot
#

wait

#

let me redo

#

so

#

i got a task

warm hedge
#

tldr you need a setter or getter?

honest pilot
#

set

warm hedge
#

Then setDamage

honest pilot
#

to ?

warm hedge
#

What?

honest pilot
#

like 1 at 0

warm hedge
honest pilot
#

alr

#

and witch init to trigger the completed task ?

#

l was trying for if (_unitname) damage <20

warm hedge
#
if (_unitName damage < 0.2) then {
  // execiton
};```?
honest pilot
#

yea

#

but in the then it would be like(taskid)set Completed task or something like that

#

with the BIS_fnc task status

warm hedge
#

Something like that yeah, I guess

honest pilot
#

oh ok alr

#

that was it, thanks

proven silo
#

instead of using ```sqf
(nearestBuilding this) allowDamage false;

tidal ferry
#

Hey question- how does setVariable/getVariable work for player units that respawn? Is setVariable persistent across respawns?

little raptor
manic sigil
#

Aight, got inspiration from the general chat, and a long nagging feeling of something missing from singleplayer campaigns.

I put together a basic but functional AI-compatible revive system for a mission I released not too long ago, and I think with some tweaking it could be used in campaigns, ala the SSPCM functions.

However, since its a script I wrote and all, its a) probably awful in every computational sense, and b) obviously only available as a script injection if you have the admin console.

Where should I start looking if I wanted to package it as a standalone mod, activatable on a per-mission basis from an added Mapscreen menu?

winter rose
manic sigil
#

Had a feeling, but wasnt sure if this project would qualify. Thanks!

noble zealot
#

Why switchCamera _anotherPlayer sometimes act strange (multiplayer):

  • it show a scoped vision but player is not scoped.
  • it show the camera from weird view point that are really not possible in game.
  • it show bugged vision from inside a vehicle.
    May be network problems (missing packs)?
sand summit
#

could someone help me with something regarding a condition field?

#

it has to do with an ACE3 interaction condition but i think the syntax expectations for them are the same as for UserActions

plush bronze
#

Hi Everyone, I'm running a Server with some missions and I've wanted to do some extensions with a script, is there any way I can do this without having to make a pbo thing?
If there is no way, could somebody maybe point me on how to best start with this?
Since all I can find seems to focus on making scripts in missions, but I want to do something which "lives" outside the missions and is loaded always.

hallow mortar
little raptor
#

also I'm not sure if that's actually what you meant...

#

you can also use the profileNamespace for data that "lives outside the mission"

plush bronze
# little raptor Extensions don't need a pbo

Sorry, for not using the right terms, still trying to grasp what is what.
So the ideal thing I want to do is make/use something which allows me to do custom admin commands. I don't want this to be added to the missions, since they can change on the server. And it seems to me I don't need to "compile"/pbo-ify some simple scripts, but things just won't really load so I'm very confused.
I have done some modding/scripting for various other games, but here I can't for the life of me even figure out how to get something started ๐Ÿ˜…. Everything I look at has a different folder structure and I'm not really able to get anything from the "Arma 3 Samples" to run/load, so if you have any ideas or pointers on how I can get started with this I'd really appreciate it.

little raptor
plush bronze
little raptor
# plush bronze My idea is to be able to write something like `#something` and in the background...

Afaik you can't add custom admin commands
You can get your scripts to run on the server using the debug console
To always have access to your scripts you have to make a pbo, sign it, and add the bikey to server keys. If you don't give that signature to anyone else only you can use that mod

This page explains the basics of sqf:
https://community.bistudio.com/wiki/Introduction_to_Arma_Scripting

This page explains the basics of making an addon:
https://community.bistudio.com/wiki/Arma_3:_Creating_an_Addon
Tho I don't think you can follow it as a complete beginner

As for Arma 3 samples, afaik there are no scripts in there, so they're irrelevant to your needs. Also to use them you need to set up P drive

lapis ivy
#

Hello. I have two objects that appear at a random position, but I want them to appear in the briefing for only one side. How can I specify an object in a briefing?

plush bronze
still forum
#

CBA lets you add chat commands

#

with # infront, so exactly what you want

plush bronze
#

oh wow ๐Ÿ˜ฎ

plush bronze
still forum
#

not today

plush bronze
#

thanks for the CBA thing tho

elfin flax
#

Hello everyone, is it possible to get the Z height using screenToWorld?

Need to get the Z height of screenToWorld [0.5, 0.5] knowing the height of the object and its vectorUp.

winter rose
granite sky
#

Z height relative to what?

elfin flax
granite sky
#

AGLtoASL after that then

#

It sounds like screenToWorld ignores objects entirely though, so you may have the wrong starting point.

analog cargo
#

Hey guys. I'm using the bis_fnc_holdActionAdd function to add an action with a nice progress icon. The problem is the hold action is supposed to last longer than 20 seconds, and after about 10 seconds in, the action menu automatically fades out, along with the progress icon which just vanishes from the screen. It makes it seem like the action has failed (even though it actually continues in the background as long as the key is held). It's pretty confusing for players. Is there a quick way to prevent the action menu from automatically fading out, or perhaps force it by script to show itself again (along with the progress icon)? I know there's a isActionMenuVisible command. Would be nice to have a showActionMenu command or something I guess ๐Ÿ™‚

winter rose
#

not as far as I know (but using the scrollwheel I guess)

analog cargo
#

Surely there must be some hacky workaround nobody's discovered yet lol

winter rose
#

if they haven't discovered it yet here's your chance ๐Ÿ˜›

analog cargo
#

Is there a Rsc config just for the action menu?

manic grail
#

whats the script used to create the pictures of the AI in eden? ive completely lost what it was called

manic grail
#

ah editor previews

#

thanks mate

winter rose
analog cargo
shadow sapphire
#

I'm having trouble finding a complete list of the default mission endTypes. Does anyone have a link to all of them?

shadow sapphire
open fractal
#

i see

shadow sapphire
#

I think I remember seeing things like WestWin and OpforWin in Arma 2 or something like that. I probably am not remembering, but I can't find whatever it was that I thought I saw.

open fractal
#

@shadow sapphire check CfgDebriefing

#

(found under CfgDebriefing in the game's config file)

shadow sapphire
#

Ah! Thanks a ton!

#

Update, this is comprehensive! Thanks!

open fractal
#

yw

shadow sapphire
#

Does anyone know if there is a reason to choose config.cpp for anything over description.ext when something can be done in either file?

open fractal
#

isn't config.cpp for addons and description.ext for missions?

shadow sapphire
#

I have no clue, but the custom debriefings can be placed in either file and my mission utilizes both.

I'll likely just use the description.ext and change it later if there is a compelling reason.

open fractal
#

I don't think config.cpp will do anything in a mission file

#

Description.ext is the mission config, config.cpp goes in addon root

shadow sapphire
#

Oh, thanks!

proven silo
#

How can I get my vehicle spawned to spawn vehicles with init code after they are destroyed and Respawn

#

Also anyone know a simple way to add disable friendly fire for teams but enable fall damage too

open fractal
# proven silo Also anyone know a simple way to add disable friendly fire for teams but enable ...
//onPlayerRespawn.sqf
params ["_newUnit", "_oldUnit", "_respawn", "_respawnDelay"];

_newUnit addEventHandler ["HandleDamage", {
    params ["_unit", "_selection", "_damage", "_source", "_projectile", "_hitIndex", "_instigator", "_hitPoint"];
    private _friendlyFire = missionNamespace getVariable ["DJ_FriendlyFire",true];
    if (!_friendlyFire) then {
        if (side _source == side _unit) then {0}
    }
}];
#

DJ_FriendlyFire = false will disable friendly fire. Make sure to broadcast the variable (either global exec or use publicVariable)

#

worth noting that ace medical may override this

open fractal
#

fixing this now if any concerned parties stumble on this, found the tutorial someone linked on the wiki

#

one day I will fully comprehend this darned event handler

#

one day i will learn how to read*

quasi rover
#
disableUserInput true;
//do something, time delay effect
disableUserInput false;

I want to use this script in EH. and give some time delay effect between them, just like sleep. but EH is Unscheduled environment and suspending is not allowed, so Is there a way to give that sleep effect between them?

warm hedge
#

Use spawn

quasi rover
warm hedge
#

Yes

quasi rover
#

much appreciated.

proven silo
#

Does anyone know how I can get vehicles to keep there init when they respawn using a vehicle respawner

proven silo
#

so i did some searching and I found out this is the way you do it so I tried this in the vehicle respawn module init and my vehicle still doesn't have an arsenal option```sqf
params ["_newVehicle","_oldVehicle"]; _newVehicle addAction ["<t color='#006400'>Arsenal</t>", {["Open",true] spawn BIS_fnc_arsenal}];

hallow mortar
#

Speculatively, the respawn module has 2 code fields, one init for the module itself and one that it runs on respawning an object, and you've used the wrong one

#

Alternatively, also speculatively, this is in MP and the code is only being run on one machine

proven silo
#

oh wow i feel dumb @hallow mortar thank you, I was putting in the init box and didn't read the expression box its working now

finite imp
#

hey guys, I'm trying to use a script from a workshop for a bombing run. Basically just hides and unhides a crater and explodes a satchel charge on the ground when the plane passes overhead. But, for some reason, I'm getting an error thrown out

The code in the trigger is this:

call{rt enablesimulationGlobal false && rt hideObjectGlobal true && crater1 hideObjectGlobal true && crater2 hideObjectGlobal true && crater3 hideObjectGlobal true && crater4 hideObjectGlobal true && crater5 hideObjectGlobal true && crater6 hideObjectGlobal true && crater7 hideObjectGlobal true && crater8 hideObjectGlobal true;}

And the error I'm getting is this:

Error &&: Type nothing, expected Bool,code

Anyone know why? The first crater gets hidden, the second does not.

And, yes, I know, the code is horrendous and overcomplicated, but that was the way it was implemented in the composition I pulled from the workshop and didn't wanna mess with it.

winter rose
#

Anyone know why?
because the script is wrong
replace && by ; and it should be good

#

@finite imp โ†‘

hallow mortar
#

To expand: && doesn't mean "do this & this", it means "check if this & this both return true". ; indicates an end of the current instruction and is used to separate a series of commands.

#

Also, hideObjectGlobal is a command that must run only on the server, so make sure your trigger's Server Only box is ticked (and all other commands in the trigger are okay with being run only on the server)

#

Finally, you can simplify this pretty easily:

{
  _x hideObjectGlobal true;
} forEach [rt,crater1,crater2,crater3,crater4,crater5,crater6,crater7,crater8];
finite imp
#

the trigger includes enableSimulationGlobal, is this fine with being run on the server only?

#

thank you for your input, both of you as of now

hallow mortar
#

Yes

winter rose
finite imp
#

does this have to be in a call{} or is that unimportant?

coral nest
#

could you put a unit insignia on a vest?

hallow mortar
proven silo
#

Hey guys i have this weird problem I got my vehicles to respawn with the init but it doesn't work on a dedicated server, this is what i have in my expression box. Am i doing anything wrong for these to not work on an dedicated server ```sqf
params ["_newVehicle","_oldVehicle"]; _newVehicle addAction [("<t color=""#0fff00"">" + ("Repair Vehicle") +"</t>"), "repair\repair.sqf",[],1,false,true];

winter rose
fleet plaza
#

yo, how can you load a save in multyplayer, old man mission

winter rose
#

Old Man is not multiplayer

finite imp
#

its not much of a deal to me personally because they spawn way out of visible range for any players but still

hallow mortar
#

Try disabling simulation on the plane after hiding it

proven silo
#

@winter rose sorry im new and i can't get it nice. The function works but it doesn't work on a dedicated server

hollow laurel
hallow mortar
finite imp
hallow mortar
#

yes

finite imp
#

Error still persists though

hallow mortar
#

Unfortunate. Well, I'm out of ideas

proven silo
#

how do i write a remoteexec for an add action

finite imp
proven silo
#

can i just put the remoteExec infront of it correct?

winter rose
#

no

proven silo
#

ya im looking right now i see the hint one

#
addAction [("<t color=""#0fff00"">" + ("Repair Vehicle") +"</t>"), "repair\repair.sqf",[],1,false,true];
``` hopefully this comes out formatted.
granite sky
#
[_newVehicle, [("<t color=""#0fff00"">" + ("Repair Vehicle") +"</t>"), "repair\repair.sqf",[],1,false,true]] remoteExec ["addAction", 0];
proven silo
#

dang that was quick i was googling and looking at this example reading the 0 makes it so everyone can see it

granite sky
#

It means it runs it everywhere. Now if you want full multiplayer compatibility then you may also want to think about JIP :P

last thicket
#

I recommend to do a different approach. Use initplayerlocal, check if vehicle is damaged etc etc

hallow mortar
#

Why would you use initPlayerLocal for this? That would be fine for vehicles that already exist, but it's of no use at all for respawned vehicles, which is what this is about

last thicket
tidal ferry
#

Can you create Groups during preInit?

#

Or only postInit?

hallow mortar
# last thicket Why remoteexec all the time? Just use addaction in combination with cursortarget

all the time once per vehicle spawn
In my view, an action that involves interacting with an object is best assigned to the object, not to the player; by checking cursorObject, distance, vehicle type etc. you're putting a lot of work (and per-frame performance) into duplicating functionality that already exists natively in addAction. That's not necessary just to avoid one small, infrequent remoteExec.

proven silo
pulsar bluff
#

dont use vehicle init for respawning

#

use something like this

hallow mortar
#

They're not using the vehicle's init as the method of respawn, they're using a BI Vehicle Respawn Module. They've successfully used the respawn module's expression field to add an action to the vehicle when it respawns; the problem now is that it works locally but not on DS.

brazen lagoon
#

how difficult would it be to make side WEST neutral to side GUER outside of specific markers?

#

like, if a unit of side GUER is in a marker it's considered hostile to WEST but only in those markers.

open fractal
#

have you peeped the side relations wiki page

brazen lagoon
#

not recently but im aware of how they work generally

open fractal
#

Thereโ€™s a value you can assign to make specific units hostile, not sure if it works both ways

brazen lagoon
#

well that isnt exactly what I want

#

i assume you mean joining them to sideRogue

granite sky
#

I don't think it's possible to do exactly what you want. Side hostility doesn't have that level of control.

#

So you'd have to use hacks like side-swapping or setCaptive.

open fractal
#

as john jordan said

drifting portal
#

I'm spawning an object
but I want to make sure that this object is in contact with the ground or with any type of floor so that it doesn't spawn floating
what command should I use to make sure the object is either in contact with the ground or with any type of floors?

#

oh it seems isTouchingGround also accounts for floors even if the floor is floating

#

then I guess I have answered my self

#

such silliness

tender fossil
#
((typeOf (vehicle player)) in ['WarfareSupplyTruck_RU', 'WarfareSupplyTruck_USMC', 'WarfareSupplyTruck_INS', 'WarfareSupplyTruck_Gue', 'WarfareSupplyTruck_CDF'])

Is this correct syntax? I get no errors but the script is still not working and I suspect that the error is caused by this line (NOTE: Arma 2 OA)

tranquil jasper
#

Hmmโ€ฆnow that I think about it, both sides would have to be captive, otherwise the captive side would shoot the non captive side with no consequences until they all died

brazen lagoon
#

hoping that arma 4 has per-faction hostility but im doubtful

tranquil jasper
#

I feel like you meant to say per-unit hostility, not faction

granite sky
#

probably means an in-between of arbitrarily-defined factions rather than fixed sides.

tranquil jasper
#

Ah I think he meant factions as the different groups belonging to the same side

#

Not entirely sure if this will work but you can use setFriend to change the standard side hostilities, then in your code add all the affected units to a group in that side

fleet plaza
#

i have played with one of mine

drifting portal
#

I'm trying to calculate the amount of the items "money_bunch" a player has in their inventory

#

but problem is

#

despite me having that item in my inventory in addition to other items

#

when I run items player it just returns ["FirstAidKit"]

tranquil jasper
#

Ah too slow, was typing that lol

elfin flax
#

Is dat possible to set angular velocity?

coarse dragon
#

Whats the code to switch to a different player via a trigger?

granite sky
#

@elfin flax Not directly but you can use addTorque

tranquil jasper
#

selectPlayer

#

Or remoteControl

hushed tendon
#

Anyone know what I need in the file path to use a sound from a mod?

#
// What I've got rn
playSound3D ["\addons\Cytech_Sounds\Cytech_SFX_Sounds\Alarm_V1.ogg", _hive, false, getPosASL _hive, 5, 3, 30];
bitter oak
#

"\Cytech\Cytech_Core_Assets\Cytech_Sounds\Cytech_SFX_Sounds\Alarm_V1.ogg" @hushed tendon

hushed tendon
honest pilot
#

ay , can someone help me , my Init dosen't work
Crewmen1 switchMove ""; if (Crewmen1 damage > 0.5) then {["task4","succeeded"] call bis_fnc_tasksetstate}; [Crewmen1] join Misfit1

#

that say a ( is missing .

coarse dragon
#

Hey im making a coop MP mission and i have a team of 4. sitting in chairs for a brif. i have it set on a trigger to switch them to another set of units where the mission will take place.. they have the variable name of mark, mark2. ect

but me code no workie
selectPlayer mark && mark1 && mark2 && mark3;

honest pilot
#

you want to switch caraters ?

#

or only team

coarse dragon
#

i want the team to switch to the players in the mission area, to save having to transport em ect

honest pilot
#

so if you want mark 1 ,2 and 3 to switch team do

[mark1] join _groupname
[mark3] join _groupname
[mark2] join _groupname

coarse dragon
#

they are in a diff area though

honest pilot
#

alr

#

that would work even

drifting portal
coarse dragon
#

[mark1] join _Alpha 1-5 && [mark3] join _Alpha 1-5 && [mark2] join _Alpha 1-5 && [mark] join _Alpha 1-5;

honest pilot
#

why u add && ?

coarse dragon
#

because it wasnt working either way

tough abyss
#

hey guys, ive made a custom save data function for my mission, however when I try calling the fuction, it doesnt work and throws an error saying suspending not allowed in this contex.

The code works 100% as just a file, want it as a function to call it easier

#
redacted

This is the code. any insight will be helpful ๐Ÿ™‚

copper raven
#

spawn your code

tough abyss
fickle hedge
#
    private _zeus = (allMissionObjects "ModuleCurator_F") select 0;

    _zeus addEventHandler ["CuratorObjectPlaced", {
        params ["_curator", "_entity"];
        
        if (_entity isKindOf "Man" && {(side (group _entity)) isEqualTo EAST}) then {
            [_entity,  "balaclavaReplace"] call BIS_fnc_unitHeadgear;
        };
        
    }];
};

Hello all. I'd like to use this script that applies headgear/glasses to OPFOR units that are spawned in with Zeus. But instead of BIS_fnc_unitHeadgear i'd like to use linkItem (to equip NVGs instead). How would I do this?

open fractal
#

[_unit1,_unit2] join _group

#

or โ€˜units _group1 join _group2โ€™

honest pilot
#

well

honest pilot
open fractal
honest pilot
#

so it would be (number) < damage_unit ?

#

because i need the game to understand that when my unit as been healed , the task ends

#

@open fractal

honest pilot
open fractal
#

also

#

20?

#

you mean 0.2?

#

did you read the docs

honest pilot
honest pilot
ebon citrus
#

so 50% damage would be 0.5

#

remember that damage != health

#

damage is generally the inverse of health

#

health 1 = 0 damage

#

damage 1 = 0 health

#

have a nice day

honest pilot
#

so i'll use health ?

#

@ebon citrus

open fractal
honest pilot
#

ok that i understand

#

but in the init , that dosn't set my task4 as succeded

honest pilot
open fractal
#

what does your code look like

#

and please

#

!code

wicked roostBOT
#
How to use SQF syntax highlighting in Discord

```sqf
// your code here
hint "good!";
```
โ†“

// your code here
hint "good!";
lyric portal
#

Hey guys, I got a question with pip.

#

Ok so, I got 2 screens, left and right. I want them to function like some kind of cctv. I set up 2 cameras, 1 for each door. Now the 1st camera, on screen it points where I want it to. The 2nd camera, points the opposite of where I want it to. What should I do?

#

I tried a bunch of stuff like making stuff on the sqf's vectordir up negative but it didnt really make the camera point outside but just towards the door

elfin comet
#

Anyone have a solution to checking if the player that triggered a trigger is a group leader?

granite sky
#

leader group _unit == _unit

little raptor
elfin comet
#

Yes, I just need to know if that player is the group leader.

little raptor
#
thisList findIf {leader group _x == _x} >= 0
#

That means at least one leader in the trigger

elfin comet
little raptor
#

That's why I asked you first if you set the trigger to players only

#

If you did yes
If not no

elfin comet
#

So thisList only has things that would make the trigger go off?

little raptor
#

Yes

elfin comet
#

Noice

honest pilot
honest pilot
#

where

little raptor
#

Also there's no health command

granite sky
#

if (health Crewmen1) > 0.5)

honest pilot
#

so its damage

little raptor
#

As people already told you

granite sky
#

One open, two close

honest pilot
#

?

granite sky
#

Also you're missing a quote in the next bit.

#

["task4,"SUCCEEDED"] call BIS_fnc_taskSetState <- no

honest pilot
granite sky
#

Did you fix all three errors?

honest pilot
#

only that one appear

granite sky
#

It gives up on the first parsing error. It's a computer not a human.

honest pilot
#

ik thanks i know the difference -_-

#

i'll just don't see where to set the true or false

#

@granite sky

granite sky
#

Just fix the three errors that we told you about (missing bracket, wrong command, missing quote) and then see what it does.

honest pilot
#

Crewmen1 switchMove ""; if ((damage Crewmen1) > 0.5 , true) then {["task4, "SUCCEEDED"] call BIS_fnc_taskSetState};

#

?

granite sky
#

blinks

honest pilot
#

...

#

once again the same error code if: type number , Boolean expected

granite sky
#
Crewmen1 switchMove ""; if ((damage Crewmen1) > 0.5) then  {["task4", "SUCCEEDED"] call BIS_fnc_taskSetState}; 
honest pilot
#

ok

#

but for the Boolean ?

granite sky
#

I think you created that error by adding a bogus , true in the if statement.

honest pilot
#

alr

#

so now its good

#

no error code

#

but the then {["task4", "SUCCEEDED"] call BIS_fnc_taskSetState};

#

won't do something

#

so i copied the code you wirtted

honest pilot
granite sky
#

It'll set "task4" to "SUCCEEDED", whatever the hell task4 is.

#

If you want it to throw a notification then ["task4", "SUCCEEDED", true]

honest pilot
#

and did the call BIS_fnc_taskSetState}; stay ?

granite sky
#

sighs

#
Crewmen1 switchMove ""; if ((damage Crewmen1) > 0.5) then  {["task4", "SUCCEEDED", true] call BIS_fnc_taskSetState}; 
#

you should probably attempt to learn the basics of programming :P

honest pilot
#

i know

honest pilot
#

but for that , that's my first attempt

#

:/

honest pilot
#

still not

granite sky
#

I guess your task isn't called "task4".

honest pilot
#

yes it is

granite sky
#

or damage Crewmen never exceeds 0.5

little raptor
#

It's damage not "health"

granite sky
#

Are you trying to heal the guy or kill him? :P

honest pilot
#

heal

granite sky
#

oh yeah, backwards then

honest pilot
#

so it would be >

#

;_;

granite sky
#

It's already > :P

honest pilot
#

<

#

?

little raptor
#

_<

honest pilot
#

YEEEEEEEEEEEEEEEEEEEEEEEEEEEEEES

#

TASK NOW COMPLETE

#

XD

#

DUDE

#

thanks

#

xd

#

@little raptor@granite sky big thanks

lyric portal
#

How can I rotate the live feed and make it face somewhere else

#

I have it setup as a stationary camera.

open fractal
#

can someone explain to my smooth brain how velocity is calculated

#

like the geometry behind it

#

all i know is you can multiply the array to change the speed the object is moving

granite sky
#

velocity is just the speed in metres per second, split into x/y/z components

open fractal
#

oh

#

I'd need to use trig right?

#

if i want to manipulate it

granite sky
#

so getPosASL _veh vectorAdd velocity _veh will give you the ASL position of the vehicle after one second.

#

Not unless your input values are bearings or something.

open fractal
#

OH

#

position/time for xyz

#

thank you

#

so if I wanted to, say, toss an object upward, it would just be ```sqf
_object setVelocity [0,0,1];

#

oh wow that's really it, I don't know why I never made this connection but thanks john

shrewd slate
#

Hello there! Um, I don't know if this is the right channel to be asking for help, but lately I've been having issues in dedicated servers when it comes to the Trigger module. So to keep things short, basically my Trigger module which is for a Bar gate to open whenever any player would come into contact, would not work in my dedicated server, although, the Trigger itself works in EDEN Editor when I play it in "Play in Multiplayer."

little raptor
#

what code do you use in the trigger?

shrewd slate
# little raptor what code do you use in the trigger?

The Trigger settings were:
ACTIVATION: Any Player
TYPE: None
ACTIVATION TYPE: Present
REPEATABLE: True
SERVER ONLY: False

Condition:
this

On Activation
Gate01 animate ["Door_1_rot", 1]

On Deactivation
Gate01 animate ["Door_1_rot", 0]

open fractal
#

server only should be true

#

animate has a global effect

#

idk if that's a fix

#

wiki says animateSource should be used for multiplayer as well

shadow canopy
#

So I see that on the TWS nightvision scope that when you press T it displays the distance, I was wondering what base arma script that does that is? I know it also auto elevates guns on tanks too. I know I could just use inputAction to detect when lase range is pressed but I wanted to see how the base game does stuff

shrewd slate
hallow mortar
fickle hedge
#
if (hasInterface) then {
    private _zeus = (allMissionObjects "ModuleCurator_F") select 0;

    _zeus addEventHandler ["CuratorObjectPlaced", {
        params ["_curator", "_entity"];
        
        if (_entity isKindOf "Man" && {(side (group _entity)) isEqualTo EAST}) then {
            [_entity,  "balaclavaReplace"] call BIS_fnc_unitHeadgear;
        };
        
    }];
}; ```
Hello all. I'd like to use this script that applies headgear/glasses to OPFOR units that are spawned in with Zeus. But instead of BIS_fnc_unitHeadgear i'd like to use linkItem (to equip NVGs instead). How would I do this?
winter rose
#

!code

wicked roostBOT
#
How to use SQF syntax highlighting in Discord

```sqf
// your code here
hint "good!";
```
โ†“

// your code here
hint "good!";
somber radish
#

Any way to get the mass / weight of a vehicle from ConfigFile?

hallow mortar
hallow mortar
somber radish
#

Any way to extract data from models? like size / shape etc?

open fractal
#

boundingBox can give you a rough estimation of size

hallow mortar
#

boundingBox/Real, sizeOf, bis_fnc_boundingBoxDimensions

somber radish
tranquil jasper
#

problem with the bounding boxes is that they are often quite a bit larger than the most extreme points in each axis

hallow mortar
#

If you have an existing example of the object (required for all the size commands except sizeOf) you can use getMass

hallow mortar
open fractal
#

yeah bounding boxes are a headache when it comes to stuff like antennae and structures extending underground

#

lucky for me I only used them for a mock prop hunt

hallow mortar
#

The additional parameters for bounding box commands from 1.92 have also made it easier to get accurate measurements

hallow mortar
young current
#

Vehicle mass is not config parameter

winter rose
#

it's model's?

warm hedge
#

Models' yes

shadow canopy
hallow mortar
#

I don't know. Probably?

It's recently become fairly easy to detect when input actions are used, thanks to the addition of relevant event handlers. So you shouldn't have too much difficulty unless you want to modify the behaviour, in which case good luck

drowsy geyser
#

hi, im trying to display an icon via Draw3D

TAG_3DIcon1 = addMissionEventHandler ["Draw3D", { 
alphaText = linearConversion[2, 8, player distance generator1, 1, 0, true];       
drawIcon3D [getMissionPath "images\RepairIcon.paa", [1,1,1, alphaText], generator1 modelToWorld[0,0,0.1], 0, 0, 0, "POWER               GENERATOR", 0, 0.04, "RobotoCondensedLight","center",true,0,-0.03];}];

but somehow it shows the text but not the image,any help?

copper raven
drowsy geyser
fickle hedge
#

Hello. Basically i have an addAction on an AI to open an arsenal. I'd like for the addAction to open the arsenal and then say a greeting using sideChat or similar function from an array of strings. BUT only for the player using the addAction and not for all clients. What would be a good way to do this?

this addAction["ACE Arsenal", {[arsenal_box, player] call ace_arsenal_fnc_openBox},"",1,true,false,"","_this distance _target < 5"];
hallow mortar
#
params ["_target"];
private _text = selectRandom ["array","of","strings"];
_target sideChat _text;```
Since sideChat has local effect, this will only display the message for the player that uses the action.
quasi rover
granite sky
#

Which wall? Nearest or a specific one? Specific house or any house?

#

In general you can use the lineIntersectsXXX functions for this sort of thing.

coarse dragon
#

anyone any idea on how to this to work? its to select another team via a trigger so i dont have to transport em. and want it to work in COOP

selectPlayer mark, mark1, mark2, mark3,;

open fractal
#
private _playerUnits = units playerGroup;
private _targetUnits = units targetGroup; 
{
private _playerUnit = _x;
private _targetUnit = _targetUnits select _forEachIndex;
_targetUnit remoteExec ["selectPlayer",_playerUnit];
} forEach _playerUnits;
#

never used selectPlayer no idea what this does

#

but looking at the syntax i think this is what you want?

#

it would probably be better to just teleport your players...

granite sky
#

yeah if you want to teleport, just teleport.

marsh agate
#

I have one entity being hidden by a terminal activation, but i need to add extras into the script and im not sure how i string them on, help?

#

Terminal addAction ["Hide laser wall", "hideObject wall 1"];

#

that is the current code i have

jade acorn
#
terminal addAction ["Hide laser wall", {hideObject wall1; hideObject wall2; hideObject wall3; hideObject wall4;}];```
#

should work, it's from the forum thread I've sent you

marsh agate
#

alright thank you

jade acorn
marsh agate
#

ok thank you

#

it works!

drifting portal
#

is there a way to detect when object is clipping through a wall?

winter rose
#

with boundingboxes and lineIntersects* most likely

tranquil jasper
open fractal
tranquil jasper
#

globally

open fractal
ivory locust
#

Is there a way to convert text/structured text back to a string?

#

I'm having trouble with line breaks and action icons

tranquil jasper
#

str?

ivory locust
#

That has weird behavior, it culls everything after line breaks it would seem

#
_image = image "\a3\ui_f_oldman\data\igui\cfg\holdactions\holdaction_market_ca.paa"; 
_image setAttributes["size","3"]; 
_text = "Check Credits"; 
_x = composeText[_image,linebreak,_text];
//How do I convert _x back to an XML style string?
#

setUserActionText Takes a string instead of structured text

tranquil jasper
tranquil jasper
open fractal
#

i just ignore it

tranquil jasper
#

I don't love that, but this will probably be better than using notepad++ and git bash, if for no other reason than the git terminal inside vs code lol

quasi rover
lyric portal
#

Good day

How may I run remote exec here?

[cam1, "piprendertg1", 1, 45, 45, -30, 0.25, 0] execVM "Scripts\setSurveillanceCam.sqf";
sleep 3;
[cam2, "piprendertg2", 1, 20, 30, -30, 0.5, 0] execVM "Scripts\setSurveillanceCam.sqf";

fair drum
lyric portal
#

Ah, thank you!

proven silo
#

Hey guys I have this jump script I am using that I found online It works, but people able to teleport when they DPI and jump. I know dpi has been a thing on arma for a while but I was wondering if someone could help me make it less buggy. currently you can hold down the v key and it will keep jumping if there was a way to have a cooldown after jumping that would be awesome.

grim cliff
#

does anyone know how i can make a weapon on the ground inaccesible?
i have a "weaponHolder_single_Limited_weapon_F"
and i read somewhere that setting the damage to 1 would make it inaccesible to the player, but it also makes the weaponcargo command return and empty array
as well even then inventory still opens if the player lays down on the weapon in just the right spot.
testweapon1 enablesimulationglobal false; & [testweapon1,false] remoteExec ["enablesimulationglobal",0,false]; also does nothing.

#

i cant use createsimplevehicle because i need the vehicle to be accesible later on

warm hedge
#

Try lockInventory I think?

grim cliff
#

tried that. it does lock the inventory but the option to pick up the rifle still appears and works

open fractal
#

I solved this by disabling simulation for a unit's weapon when the unit is killed

lapis ivy
#
["WeaponDestroyed",[localize "STR_Weapon", localize "STR_Weapon_destroyed"]] remoteExecCall ["BIS_fnc_showNotification",0];
0 spawn { 
 sleep 5; 
call{west addScoreSide (scoreSide west + 9999);
"SideScore" call BIS_fnc_endMissionServer;}};

Only one language is displayed on the server at all times, even though the stringtable.xml specifies two different ones.
https://community.bistudio.com/wiki/Stringtable.xml
I found a section about Multiplayer, but I do not quite understand how I should do it.

#

I need notifications.

still forum
#

If you run localize on server, it will localize to the servers language

lapis ivy
still forum
#

you need to do the localize call on the client

#

not on the server

#

remoteExec some script that does localize on client

winter rose
#

an "ugly" thing would be```sqf
[{
["WeaponDestroyed", [localize "STR_Weapon", localize "STR_Weapon_destroyed"]] call BIS_fnc_showNotification
}] remoteExec ["call"];

little raptor
acoustic abyss
# grim cliff does anyone know how i can make a weapon on the ground inaccesible? i have a "we...

You can also remove access clientside using the UI event handlers to recognise when players access the weapon (or inventory of dead units). Eg:

inGameUISetEventHandler ["action", toString 
    {
    private _cont = _this select 0;
    _act = _this select 3;
    if  ( {cursorTarget isKindOf _x} count ['weaponHolderSimulated'] > 0
      && _act in ['TakeWeapon']
       
        ) then {     
            // case weapon on ground, do something; 
            }
    
    else
        { if      ( {cursorTarget isKindOf _x} count ['weaponHolderSimulated','CAManBase'] > 0
                && _act in ['Rearm','Gear','Inventory']
       
                ) then {
                      // case weapon dropped by man, do something else;
                      }
        else
            { if      ( {cursorTarget isKindOf _x} count ['CAManBase'] > 0
                    && _act in ['TakeWeapon']
       
                    ) then {
                          // case inventory man, do something; 
                           }
            }
        
        }
        
    }
    ];
winter rose
lapis ivy
# winter rose an "ugly" thing would be```sqf [{ ["WeaponDestroyed", [localize "STR_Weapon", ...

This works for my trigger, but doesn't work for the zone capture feature.

case "red":
        {
            if (_trigger getVariable ["owner","none"] == "none") then 
            {
                _zone setMarkerColor "ColorEAST";
                _marker setMarkerType RedFlag;
                _flag setFlagTexture getTextRaw (configFile >> "CfgMarkers" >> RedFlag >> "texture");
                [{ ["PointCaptured",[_pointName2,_pointName2 +  localize "STR_Captured_red"]] call BIS_fnc_showNotification }] remoteExec ["call"];
                RedSectors = RedSectors + [_pointName];
                BlueDrain = BlueDrain + 1;
                publicVariable "BlueDrain";
                _trigger setVariable ["owner","red"]
            };
        };

My _pointName2

PointVillage setVariable ["linkedSectors",["Alpha","Charlie"]];
PointVillage setVariable ["name","Village"];
PointVillage setVariable ["name2", localize "@STR_Village"];
winter rose
#

of course, you are using local variables ๐Ÿ™‚

lapis ivy
#

The trigger that makes the function call runs on the server.

#

How can I make this work? I can already imagine how many missions need to be redone...

little raptor
#

you can pass it as an argument to call:

[_pointName2, { ["PointCaptured",[_this, _this + localize "STR_Captured_red"]] call BIS_fnc_showNotification }] remoteExec ["call"];
lapis ivy
#

Thanks

agile cargo
#

Why is radioChannelCreate always returning 0(for failed)?

#

radioChannelCreate [[0, 0.95, 1, 0.8], "Radio One", "Test", []]. I'm calling this via the debug console targeting the server

little raptor
agile cargo
#

Is there a way to list all channels created?

little raptor
#
_last = 0;
for "_i" from 1 to 10 do {
  if !(radioChannelInfo _i#5) then {break};
  _last = _i;
};
agile cargo
#

oh, so the channels are not resetting upon a changing the mission

little raptor
#

idk. they should

agile cargo
#

hmm, strange. I just loaded a mission and it already had 10 channels lol

#

granted, it was the same mission

little raptor
agile cargo
#

i just went back to the mission select secreen

little raptor
agile cargo
#

Thanks btw

little raptor
warm hedge
#

dun

#

Oh here

tender fossil
#
((typeOf (vehicle player) in ['WarfareSupplyTruck_RU', 'WarfareSupplyTruck_USMC', 'WarfareSupplyTruck_INS', 'WarfareSupplyTruck_Gue', 'WarfareSupplyTruck_CDF'])

Ok, so we've traced the source of error in our script to this piece of SQF, that refuses to work. Classnames are correct (double or triple checked). I'm just curious; why doesn't this work? (Note: Arma 2 OA)

winter rose
#

maybe casing

#

@tender fossil Gue โ†’ GUE?

#

use toLower

tender fossil
#

(Quote from v1.63 config files)

#

The casing should be correct too, but need to try with toLower

distant oyster
#

never trust the casing. also use toLowerANSI

distant oyster
#

tl;dr

shadow canopy
tender fossil
little raptor
#

you shouldn't use cursorTarget...

#

use cursorObject

#

nvm that's A3 only...

finite bone
#

Is there a command to get pos AND rotation of the object?

#

like one array with both position and array available natively

winter rose
finite bone
#

ah got it

pastel pier
#

So i have added CfgUserActions to my mod. Any way to make them only activate or work when i'm in a vehicle?
Do UserActionsConflictGroups do this or do they only check if there are conflict with other keys?

still forum
#

Inside your action script, just check that player is in vehicle

#

if (isNull objectParent player) exitWith {};

#

Do UserActionsConflictGroups do this or do they only check if there are conflict with other keys?
only conflicts between keys

#

Arma keybindings have no way to define context, aka "in vehicle only", you gotta do that yourself

#

I just remembered that days ago someone asked for help with keybinding, I told them to ask questions they have, and then forgot about it and now I don't remember who it was or if they ever asked questions

elfin flax
#

Hello everyone, there is a unit in the vehicle that is controlled by Zeus, there is also a code that runs on each client.

Question - what condition can be written in order to run the code only on the client that control the unit?

I tried it like this:
if (gunner _vehicle != cameraOn) exitWith {};
but such a check returns false, I also can't use player instead of cameraOn because of zeus

open fractal
#
remoteExec ["GTX_fnc_yourFunction",_unit];
#

or ```sqf
if (owner gunner _vehicle != owner _zeus) exitWith {};

#

you didn't specify what the situation is or specifically what you mean by "control the unit" but the first example will make your code only run for the machine controlling _unit (does it have to be the machine physically remote controlling it?) and the second example will check if the unit is owned by the zeus, which is generally the case when the zeus either spawns or remote controls the unit.

elfin flax
pastel pier
elfin flax
#

Is there any way to use setVectorUp together with setVelocity in a loop?

If you do something like this:

onEachFrame {
    private _velocity = ...;
    
    object setVectorUp (vectorUpVisual object_2);
    object setVelocity _velocity;
};

Then object won't budge. If you remove line via setVectorUp, then everything will be fine.

grim cliff
acoustic abyss
grim cliff
#

where can i find the code to gain a better understanding? ingame configveiwer?

acoustic abyss
acoustic abyss
grim cliff
#

why does the if scope return true?

acoustic abyss
#

How do you mean? Which "if" ? I'll try to take a look at it when I'm behind a keyboard.

tranquil jasper
tranquil jasper
#

tongue-in-cheek question for you guys good at MP scripting...is it worth learning the intricacies of locality and painstakingly use the correct commands all the time, or just remoteExec everything

granite sky
#

remoteExec isn't immediate, so for a lot of stuff you kinda have to use the commands.

#

Generally if you have a chunk of code that's working on a particular unit then you run that chunk where that unit is local.

tranquil jasper
#

Yeah I'm starting to see that

boreal parcel
#

anyone know how Hearts and Minds defines its vehicles for use? for instance where it decides to spawn certain types of boats or decides how to place vehicles on the flatbed of a hemtt?

tranquil jasper
#

Is there any way for me to be in a different locality than the server in MP editor?

#

like how do I test this lol

granite sky
#

You generally have to run your own DS

#

which is a bit easier than it looks because you can re-use the client data.

tranquil jasper
#

I was afraid that'd be the answer, but I've had a DS before so I can probably figure it out again

willow oyster
#

anyone know how i can attach vehicle turrets to things or make hulls of vehicles invisible i want to attach a MGS turret to a hatchback sport

tranquil jasper
#

attachTo and hideObject

#

and there is hideObjectGlobal if this is MP

willow oyster
tranquil jasper
#

idk if you can make a specific part of a vehicle invisible...I never tried that

granite sky
#

Generally you can't unless it's been built with pieces that can be disabled.

#

I would be surprised if the roof of a hatchback was removable.

little raptor
little raptor
little raptor
tranquil jasper
#

I already got it working lol

little raptor
brazen lagoon
#

any suggestions for a HUD gui explanation?

fair drum
brazen lagoon
#

I figured it out but a guide is what I mean

still forum
drowsy geyser
#

hey, is it possible to playSound only once inside an MissionEventHandler without it being looped ?

TAG_3DIcon3 = addMissionEventHandler ["Draw3D", {  
    {   
    if (_x getVariable ["GeneratorActive",true] && player == monster1) then {
        playSound "soundName"; //this part only once??
        _pos = _x modelToWorldVisual [0,0,0];  
          drawIcon3D [getMissionPath "images\AudioWaves.paa",[1,1,1,1],[(_pos select 0),(_pos select 1), (_pos select 2)+0.2], 2.5, 2.5, 0,"", 0, 0.04, "RobotoCondensedLight","center",true,0,-0.03];
        };  
    }forEach (allMissionObjects "Land_Cyt_FE_Dirty_ElectricalSupply_Switchboard01");  
}];
open fractal
#

I donโ€™t see any reason for it to be in there

drowsy geyser
#

i want a sound to be played once any of the objects is activated ๐Ÿค”

little raptor
drowsy geyser
#

true haha

#

so simple thank you

little raptor
#

and don't use allMissionObjects every frame meowsweats

#

it's slow

open fractal
#

do you need to be checking every frame

#

yeah

#

what he said

#

ideally the only thing that should go in the event handler is drawIcon3D

#

it can be stacked

little raptor
#

only stack for a new purpose

open fractal
#

fair point

#

so define a variable for allMissionObjects outside the expression and pass that to the EH would you say

#

and keep the forEach

still forum
drowsy geyser
drifting sky
#

Anyone have a robust method or tips on how to stop spawned ai groups from getting stuck?

winter rose
#

in the washing machine?

granite sky
#

@drifting sky Stuck immediately on spawn?

tough trout
#

What do I add to an object in order for it to have a 30% chance of something happening when it's hit by a bullet? Specifically trying to make "pressurized containers" for reference

little raptor
#

it's not exactly 30% chance tho

tough trout
#

I was also looking for the on hit by bullet syntax

little raptor
serene rose
#

noob question, but I'm trying to modify this line to replace the chemlight with the orange one from ACE:

_chem1 = createVehicle ["Chemlight_yellow", chempos, [], 0, "CAN_COLLIDE"];```
how do I access the orange one given that it's from another mod and not the base game?
(line of code comes from the awesome TF21 Chemlight Drop mod)
granite sky
#

Same way, you just have to find the classname.

little raptor
granite sky
#

I think the ACE arsenal gives classname on mouseover, although not sure about the mags.

little raptor
#
player addEventHandler ["FiredMan", {
  _type = typeOf (_x#6);
  copyToClipboard _type;
  systemChat _type;
}]
granite sky
#

That would be the one.

little raptor
#

not ammo

serene rose
little raptor
serene rose
#

I'm assuming that the CfgAmmo.hpp from the ace chemlights pbo might just have it instead?

little raptor
#

that's the easiest way for newbies to get ammo classnames

granite sky
#

you can go config hunting but yeah, the EH is easier at that point :P

finite bone
#

Yea, as others stated, EH is easier and less taxing

player addEventHandler ["Fired",{private ["_fired_throwable"]; _fired_throwable = _this select 6; _shooter = _this select 0; [_fired_throwable] execvm "change_throwable.sqf"}];```
granite sky
#

ACE_G_Chemlight_Orange is the ammo apparently

serene rose
#

thanks gents, I'll try that out. I'm super new to modding arma but not programming, so I can read stuff just fine but fail at writing shit myself

serene rose
finite bone
little raptor
finite bone
#

I play risky Kapp

granite sky
#

execVM is at least guaranteed to complete eventually, right :P

#

Someone added this epic keyDown handler in our project that occasionally jams completely. This is bad.

finite bone
#

Oh yea it will complete KMAO

little raptor
#

the problem with execVM is not just the "scheduledness". it's also slow

winter rose
#

it reads from the file everytime yeah

stone hornet
#

Hi guys, new to the arma scripting scene and was wondering if anyone knew of a way to increase the top speed of some of the vehicles?

granite sky
#

Config at best, I think?

#

Not even sure if it's config...

little raptor
#

unless cruiseControl can do it thonk

serene rose
#

ACE_G_Chemlight_Orange worked, thanks. Will keep the EH on hand for future use ๐Ÿ™‡๐Ÿปโ€โ™‚๏ธ

granite sky
#

setVelocity can do it :D

stone hornet
stone hornet
granite sky
#

kinda funny to have a key that gives you an instant 50km/h forward kick but not a fix, yes

#

hmm

little raptor
#

you can just define a top velocity and a set acceleration

#

then use setVelocity every frame while the "W" key is pressed until you reach that top speed

stone hornet
#

could either of you send me over the script to do that

little raptor
#

not in the mood

granite sky
#

god no, it's horrible

#

You could try just setMass too, but I expect there's a hard limit on top speed for some vehicles.

little raptor
#

paper cars blobcloseenjoy

granite sky
#

Logically top speed isn't even related to mass unless you're going uphill

#

Although it should certainly affect your hill-climbing abilities...

little raptor
#

I'm not familiar with PhysX tho

granite sky
#

I guess the bearing friction increases a bit? Drifting off-topic though :P

stone hornet
#

so tired set mass and my vehicle decided to float XD

think im juts gonna have to deal with it

serene rose
#
class ACE_G_Chemlight_IR: Chemlight_base
{
    ACE_Chemlight_IR="ACE_Chemlight_IR_Dummy";
    effectsSmoke="ACE_ChemlightEffect_IR";
    timeToLive=28800;
    model="\A3\Weapons_f\chemlight\chemlight_blue_lit";
};

from the config

#

any ideas on how to make it work?

proven silo
#

hey really noob question how can I make this work for the tilde key ~ instead of user action 14 I was looking for the DIK key for it, but couldn't find it. ```sqf
addUserActionEventHandler ["User4", "Activate", TAWVD_fnc_openMenu];

little raptor
#

just create your own action

granite sky
#

@serene rose If you spawn in the ACE_Chemlight_IR_Dummy instead then you get the IR effect.

proven silo
#

going on my second week on arma scripting i don't know how lol

granite sky
#

I would guess ACE just swaps the objects after throwing.

proven silo
#

theres no DIK key for tilde

little raptor
#

not tilde

proven silo
#

thank you

worthy light
#

Hey Friends - I'm placing some players in my mission as playable players but I only want them to become 'active' when someone connects to one of them, I'd then like it to kick off a series of events around bringing them into the game whereever I am, maybe by helli.. any pointers on what I need to be looking at?

open fractal
worthy light
open fractal
#
//onPlayerRespawn.sqf
params ["_newUnit", "_oldUnit", "_respawn", "_respawnDelay"];
if (isNull _oldUnit) then {_newUnit call KIL_fnc_yourFunction};
#
//fn_yourFunction.sqf
private _player = _this;
//do whatever you want with _player
worthy light
#

So the premis is, I've got my characters setup sat on an island in the corner of the map as the placeholders. Esentially using repawn (will trigger when someone connects to one of these toons) I can then basically script it to do whatever with it...