#arma3_scripting

1 messages ยท Page 78 of 1

granite sky
#

easier then.

#

Assuming that you're not using headless client transfer mods :P

molten yacht
#

nope

#

Basically, they've been flying around without a care in the world for several missions in a row and it's time to make them feel unsafe

#

:)

granite sky
#

A basic example would be:

_vehicle addEventHandler ["HandleDamage", {
  params ["_veh", "_part", "_damage"];
  _damage min 0.5;
}];
drifting sky
#

Is it possible to force an invisible object to be visible? Maybe make it drawn as wireframe?

granite sky
#

I'm not sure that this is guaranteed to prevent destruction with vehicles though.

pulsar bluff
granite sky
#

Also you'd need to ensure that your handleDamage is the last one added.

molten yacht
#

I don't think a single Titan AA can usually smoke a ghost hawk...

granite sky
#

oh, they do.

molten yacht
#

Do they usually full-kill it?

#

I thought they just knocked it out

granite sky
#

In vanilla? Straight down IIRC.

molten yacht
#

Hmm.

#

Time to do some tests

#

We are running ACE3

granite sky
#

If you have advanced vehicle damage enabled in ACE then you may need to delay installing this EH.

#

Or work with it, but that involves reading ACE code :P

#

I haven't messed with it much, especially with helis, but generally ACE advanced vehicle damage prevents vehicles from dying fully. It might just go full red and lose all its fuel.

fair drum
#

messing with macros, can't figure out my error:

// Mission
#undef TAG
#define TAG                                         "IFA_UK_DES_"

#undef MISSION
#define MISSION                                     TAG+"M01"

// Macros
#undef GMVAR
#define GMVAR(var1,var2)                            missionNamespace getVariable [var1,var2]

#undef SETMVAR
#define SETMVAR(var1,var2,var3)                     missionNamespace setVariable [var1,var2,var3]

// UI
#define LAYER_BLACKSCREEN                           "hyp_blackscreen"

// Common
#define MISSIONSTARTED                              "hyp_missionStarted"
#define PLAYER_SIDE                                 resistance
#define VIEW_DISTANCE                               1000
#define TERRAIN_GRID                                12.5

// Triggers
#define TRIGGER_TICKRATE_DEFAULT                    0.5
SETMVAR(MISSIONSTARTED, true, true);
[""] remoteExec ["hintSilent"];
/* ERROR
19:38:09 Error in expression <awned
} == -1;
};
 ("hyp_missionStarted", true, true);
[""] remoteExec ["hintSil>
19:38:09   Error position: <, true, true);
[""] remoteExec ["hintSil>
19:38:09   Error Missing )

I thought SMVAR should be building an array?

granite sky
#

That doesn't look like you quoted the code that's triggering the error?

#

yes but the error has a remoteExec on the next line.

#

your code does not.

fair drum
#

oh i copied the wrong thing, you're right one sec

#

its actually SETMVAR that must be erroring then

fair drum
#

I have no idea what I did but I fixed it... split the file into multiple includes... must have had a typing error before... its saving variables correctly.

slender olive
#

Hey guys, how do I make the player walk for a while at the beginning of a single player mission like in the arma campaigns

sweet zodiac
#

Probably just a bunch of PlayMoves

thin heron
#

anyone know how i can customize the menu screen? like adding a button or graphic that will load the server without direct connect?

drifting sky
#

Is there still no fix for ai drivers unable to cross small bridges on altis? scripted, modded, etc fixes?

slender olive
#

I fixed my problem but now I have a new one:

Can i make the AI move at the same time as doing an animation?

#

Like, I want to apply a walking animation to the AI but they just walk in place whenever I do

warm hedge
#

Do not use Artwork Supporter

slender olive
#

Wym?

#

Oh the mod

#

What do I do otherwise then?

#

Cuz im putting it in the init.sqf of the mission and I want to end it with a trigger

warm hedge
#

By some scripts. People who want to use AS to make missions often say such

slender olive
#

I am doing scripts though

#

At the moment I'm really trying to use BIS_fnc_scriptedMove

sweet zodiac
warm hedge
slender olive
#

AI1 switchmove "Acts_welcomeOnHUB01_PlayerWalk_5";

This didn't cut it

warm hedge
#

Then you have attached the AI to something I guess

slender olive
#

I don't know how to do that lol

manic kettle
#

Is it possible using hit or hitpart to know what the previous damage properties of the damaged part or vehicle health was?
I want to know if a vehicle was at 0% damage before it was hit

#

Or maybe if a killed event handler fires before the vehicle is killed, is it possible to stop the vehicle death? Or is that already hard coded to happen

hallow mortar
#

Hit and HitPart no, handleDamage yes; it fires before the new damage is actually applied, so getting the current damage works, and you can override the final damage to prevent death.

manic kettle
#

Oh interesting.
The locality note still kinda confuses me for vehicles though. Could I add this handler on the vehicle from a server side script and it would be fine? Or do vehicles somehow change locality if players are in it? Would headless clients cause an issue?

hallow mortar
#

Vehicles regularly change locality - they are typically local to the driver in order to have driving work well in multiplayer

#

The locality note means that the EH can be added to something that's not local, but will only fire on the machine where it is local. For vehicles this means it's usually best to add the EH everywhere.

molten yacht
#

How would I "tag" a unit that respawns so I can check if it's a tagged unit OnPlayerRespawn?

#

There's these three players that need a couple of things setup for them for accessibility reasons and these things are reset upon death

#

Ideally, I'd assign a trait like "helper" and check in onrespawn "if helper"...

manic kettle
molten yacht
#

oic thanks

brisk lagoon
#

hey
I am trying to resize a banner, I use *banner name* setObjectScale 1.8;
when I try it on my end in multiplayer it works, but when it's on my server it goes back to normal size, why?

hallow mortar
#

https://community.bistudio.com/wiki/setObjectScale
setObjectScale exists at the very furthest edge of what the engine can support, and has a number of serious limitations. This is one of them.
The wiki page contains more information. tl;dr (but do read it): for non-Simple Objects, the scale must be set every frame to work at all

little raptor
#

In multiplayer the only working solution I've found is using local only simple objects

brisk lagoon
little raptor
#

It should

#

Didn't try with custom textures

brisk lagoon
#

Alright thanks, I will try it

slender olive
#

Hey guys

I'm trying to add a held action to a truck that only appears once a Large Dug-In IED is placed in its inventory, like "If this is true, then create the action.
It'd be helpful to know how to use the return value of BIS_fnc_hasItem to do it (the "if this is true"), but I don't know how to do that exactly

#

I've mostly been guessing and looking on the wiki for consistencies and patterns but it's just not clicking.

fair drum
slender olive
#

No need to say like if ([stuffhere] call BIS_fnc_hasItem == true) then {}; or something?

#

I guess that's why I was messing up, I thought you had to say "if function is true, then...

fair drum
#

no because the return is a bool.

if you did it that way it would be

bool == bool which is unneeded

#

instead of just bool

slender olive
#

Oh interesting

#

Would there be a way to turn another return into boolean?

warm hedge
#

It works since very recent update tho

#

!true is false

fair drum
#

lets see what you want

slender olive
#

Well let's say I wanted to turn a number of OPFOR in an area, say 5 for example, into a "true" statement, alongside anything below it; anything above 5 would be "false"

#

Would that be super complicated or is that kinda casual?

fair drum
#

something like?
count units east <= 5

#

which would return a bool

slender olive
#

Oh okay, so it'd be if {count units east <= 5} then {hint "Script Works"};?

fair drum
#

that would state, if 5 or less units on side east exist, hint something, plus use () for the if statement and {} for then statement

warm hedge
#

if takes only a boolean not a code

#
if (count units east <= 5) then {hint "Script Works"};```
slender olive
warm hedge
#

() <- this means nothing but only to execute early
{} <- this is a code, to put any script statements that needs to run

slender olive
#

Oh okay

#

Okay what am I doing wrong here?

if ([STARTINGTRUCK1, "CUP_IED_V4_M"] call BIS_fnc_hasItem) then {hint "Truck Works"};

fair drum
#

do you have script errors turned on? it should tell you

slender olive
#

It's giving me a weird error about something _found blah blah blah

warm hedge
#

blah blah blah... is not how to tell us what is the error

slender olive
#

I know I was trying to get it. I can't memorize so much text so fast lol

warm hedge
#

/temp/bin/a3/functions_f? sounds not even normal

slender olive
#

idk, I know i didn't make that file lol

warm hedge
#

What is STARTINGTRUCK1?

slender olive
#

That's the variable name of the truck I'm checking the inventory of

#

I'm going to add a hold action to it that starts the mission

#

But as for now a hint will do

fair drum
#

use "CUP_IED_V4_M" in itemCargo STARTINGTRUCK1 for now (if CUP_IED_V4_M is the correct letter case)

brisk lagoon
slender olive
#

so it'd be if ("CUP_IED_V4_M" in itemCargo STARTINGTRUCK1) then {hint "Truck Works"};

#

?

warm hedge
slender olive
#

Seems to have fixed something since it's running the rest of my init.sqf but I don't see the hint coming up so I don't know for sure

#

Oh wait nvm

brisk lagoon
warm hedge
#

A texture update is not a update

brisk lagoon
#

So what am I doing wrong? I am using object setObjectScale #; it works when I test it but on the server itself it won't resize

warm hedge
#

Really depends on how you've ran it

brisk lagoon
#

What do you mean?

warm hedge
#

AKA depends on the context around the code

brisk lagoon
#

I still don't understand what you mean by context around the code ๐Ÿ˜…
why is it so difficult to resize a damn object

warm hedge
#

Because the setting scale is done in a really hacky way AFAIK and only introduced really recently

#

Where do you actually put the code?

brisk lagoon
#

in the init of the object itself

#

I give it a variable name, then I replace object with the variable name then setObjectScale 1.5;

warm hedge
#

How about sqf if (local this) then {this setObjectScale 1.5};?

brisk lagoon
#

I will try

slender olive
#

Okay back to the if-then stuff:

I wanna say "if (this is true) then {some trigger activates};"

#

How does one do this?

warm hedge
#

Why you need to activate a trigger when you can run any script in this statement already?

slender olive
#

To give the player a task. I'm just much more familiar with doing task stuff with triggers and whatnot but if you know an easier way to do it in an .sqf file, by all means

#

?

winter rose
slender olive
#

Did you put something and delete it? Lol

winter rose
#

yeah, missed the ref message

slender olive
#

Ah

stark fjord
slender olive
#

^

#

Or just new scripters, such as myself

stark fjord
#

And if it can be done with triggers, why not?

slender olive
#

You have any ideas, Marko?

warm hedge
#

That's the point too

winter rose
#

Cc @grim cliff ^

stark fjord
slender olive
#

Alright

meager granite
grizzled cliff
#

if anyone thinks call compile is faster than getVariable they are ... not smart.

slender olive
grizzled cliff
#

we had a number of call compiles in ACRE2 a while ago and we switched them all out for getVariable and there was a marked speed improvement

#

call compile has to spin up the entire overhead of the lexer/parser

#

getVariable on missionNamespace just does what every global variable does, which is call into the gamevar hash for that namespace

#

it is super fast

nocturne bluff
#

Aye

thin heron
stark fjord
#

Careful tho, cause some map makers delete whole spotlight for no apparent reason...

leaden ibex
sweet zodiac
#

I have been meaning to look into replacing the Boxes on the main screen too, Its just at the bottom of my priorities at the moment

stark fjord
brisk lagoon
#

let's say it is supposed to be simple object, there is no simple object option in the attributes of a banner, so what do I do?

#

what does attached object mean

winter rose
#

clicky clicky linky linky

brisk lagoon
#

so if it isn't attached to anything it won't resize...........?

winter rose
#

if simple, won't resize
if normal, must be attached and must be reapplied every frame

thin heron
#

My ultimate goal is to replace the big box. Sounds like that is spotlight

leaden ibex
#

Ah, big box you mean in the middle?

brisk lagoon
thin heron
brisk lagoon
#

why is arma so stupid with stuff like that

thin heron
winter rose
#

(I am updating the page with note + examples)

brisk lagoon
#

if not planned for MP there is literally no use for banners

#

either way it's stupid

stark fjord
#

How big is the banner?

winter rose
brisk lagoon
#

Resize exists
BI:

brisk lagoon
winter rose
#

there are workarounds, just not as you expect, that's it

brisk lagoon
stark fjord
#

1.5 meter? Centimeter? Pixel?

winter rose
brisk lagoon
winter rose
#

the banner's colour has nothing to do with setObjectScale btw

brisk lagoon
brisk lagoon
stark fjord
#

Okay, what if you use user texture 10x10 meters, and resize actual image using paint or w/e? Like make it transparent?

winter rose
#

make your banner mod or script that workaround, ez

brisk lagoon
#

see how it goes

stark fjord
#

It will go hot. And you dont need to rescale anything

brisk lagoon
leaden ibex
# thin heron Yeah

That I don't know how to do exactly. Looking at the config, it does seems to be the Spotlight2. But can't find the onClick functions

stark fjord
winter rose
leaden ibex
stark fjord
#

Well time to make miniature oreokastro and drop miniature cluster bomb from miniature plane, called in by miniature miller, using his miniature laser designator. In multiplayer.

winter rose
#

all local and manually synchronised, of course

brisk lagoon
winter rose
sweet zodiac
#

I used the same principle to get Objects animated in Multiplayer, Local Object and separate Loop to move it on each client

brisk lagoon
winter rose
stark fjord
proven charm
#

I'm trying to detect when server shutsdown but for some reason this code never triggers ```sqf
addMissionEventHandler ["PlayerDisconnected",
{
diag_log format["QUITTING %1", _this];
}];

stark fjord
#

Because when it shuts down, all scripts stop execution.
But then again how do you shut it down? end mission first, then shutdown?
Or just straight up kill it, with eg taskman?

proven charm
#

editor multiplayer ending

stark fjord
#

probs MPEnded would be better?

proven charm
#

tried that too

stark fjord
#

is this supposed to do something on client?

proven charm
#

just server

stark fjord
#

or server rather?

#

also in editor multiplayer, server continues running if you go back to editor, i believe

dusty depot
#

i'm trying to make a mission like a conquest in battlefield with sector moudles

proven charm
#

no luck with that either, im using debug console to test

dusty depot
#

the sector has spawned at right place but it's not showing up

#
    _sector = selectRandom _possible_sectors;
    _possible_sectors = _possible_sectors select {(_x distance _sector) > 300};
    _sector_logic = (createGroup sideLogic) createUnit ["ModuleSector_F", getPos _sector, [], 0, "NONE"];
    _sector_logic setvariable ['BIS_fnc_initModules_disableAutoActivation',false, true];
    _sector_logic setVariable ["Name", (_sector_name # _i) # 0, true];
    _sector_logic setVariable ["Desnignation", (_sector_name # _i) # 1, true];
    _sector_logic setVariable ["OnOwnerChange", "[_this # 0, _this # 1, _this # 2] spawn conq_fnc_sectorOwnerChanged", true];
    _sector_logic synchronizeObjectsAdd [logic_west, logic_east];
    _sector_logic setVariable ["Sides",[ east, west ], true];
    CONQ_sectors pushBack _sector_logic;
proven charm
#

weird none of the disconnect HEs work. I tried with new mission too (from the editor) and I get no logging via diag_log . is this working for everybody else?

wise frigate
#

Any way to limit FiredNear eventHandlers Activation Distance. I saw the Params section in the wiki just not too sure how it would work in this context

dusty depot
#
this addEventHandler ["FiredNear", {
  params ["_unit", "_firer", "_distance"];
  if (_distance < d) then {
    "code";
  };
}];
winter rose
proven charm
#

does this code work for anybody when disconnecting from editor server? (Run in console) ```sqf
addMissionEventHandler ["PlayerDisconnected",
{
diag_log format["QUITTING %1", _this];
}];

proven charm
#

it's supposed to print "QUITTING" and some vars

proven charm
#

pretty sure it used to

winter rose
#

(just to be sure: it must be done on server)

proven charm
#

editor-MP is what I use

#

maybe it only works on dedi?

winter rose
#

yes, but on which machine is the code run? client or server?

proven charm
#

my machine is both when launching editor-MP.

winter rose
#

it might not consider yourself a disconnection

#

if you have another machine connecting then I believe it should trigger yes

proven charm
#

ok it seems to only work on dedi just tested

winter rose
#

it's not that
it's that when you are player-hosted, you are the server, you do not "connect" to it

#

have you tried having another machine connect-disconnect as you host?

proven charm
#

dont have another

#

so i need workaround for same PC "disconnect"/mission ending handling.

slender olive
#

I dont think my script to check the truck actually activates

#

I just dont think it works

winter rose
proven charm
proven charm
#

thx. I tried "Ended" but it doesnt trigger

winter rose
#

it should trigger on mission ending
not on server restart

proven charm
#

no luck, maybe its only for SP

winter rose
proven charm
#

im pretty sure I already tried everything ๐Ÿ™„

winter rose
#

are you trying all that in Eden or in a "normal" MP environment?

proven charm
#

eden

proven charm
#

thx will try that one

stark fjord
# slender olive Kinda At the moment, i just used scripts to assign the "Load IED Into Truck" ta...

If you'd wanna use trigger you can replace this condition with:

"CUP_IED_V4_M" in (magazineCargo STARTINGTRUCK1)

And i would set trigger interval to something like 10 seconds.
So every 10 seconds it would check if STARTINGTRUCK1 has CUP_IED_V4_M.

Funny trigger notes. Once non repeatable trigger has activated, it will continue evaluating the condition.
Also there seem to be no way to retrieve Trigger owner :o?

slender olive
#

Yo i just did something simpler thats effectively the same:

I just made it so the player requires it and when they're ready to start the mission they just get in the truck

#

Now what I need to do is make it fade out once they get in and teleport them into another truck that has simulation enabled and the same kit as the trigger truck.

Its going to be driven by one of the NPCs

stark fjord
#

In my testing thru all

little raptor
#

yes

#

you can use lazy eval to prevent it

#

using {}
condition1 && {condition2}

fair drum
sweet zodiac
#

Give me a sec I'll grab a new one

fair drum
#

use pastebin cause i think sqfbin is down atm

sweet zodiac
#

Yeah I saw that

stark fjord
#

span class="re5">

sweet zodiac
#

Yeah that's pastebin not me

#

Check the raw

stark fjord
#

probs doesnt like sqf

#

perhaps cause that isnt SQF :p

sweet zodiac
#

UI stuff makes me sad so I figured it out then just forgot about it XD

stark fjord
#

Thats because you design sad ui. You need to start making happy ui.

sweet zodiac
#

Once I am able to wrap my head around UI stuff easily then I will Hahahaha

sullen marsh
slender olive
#

How can you detect if a mine has been placed within a trigger's boundaries

#

Im trying to make a task for the player to place an IED on a road

sweet zodiac
#

You could check for all mines owned by the player and see if they are in the Triggers Area

#

Slight Caveat getAllOwnedMines, I don't believe works with ACE

slender olive
#

Ah okay

sweet zodiac
#

My next best guess is just have the trigger call a tiny function to look through all the objects in the Area of the Trigger and find classnames that match, could get very expensive though

slender olive
#

Yeesh yeah

sweet zodiac
#

Another solution I have seen is to use the FIRED Eventhandler on the player and see if it happens within the area

slender olive
#

Ive seen that too but have absolutely no idea abt how to use it atm

sweet zodiac
#

Oh Wait, better idea https://community.bistudio.com/wiki/inAreaArray
count ( ["mineClassName1","mineClassName2"] inAreaArray _trigger ) > 0
You can even change the 0 to what ever minimum amount of mines you want in the area
Another Alternative
count (allMines inAreaArray _trigger) > 0
Completely indiscriminate, all Mines are included

slender olive
#

Ooh I'll check that out

sweet zodiac
#

Nevermind false alarm, ["mineClassName1","mineClassName2"] inAreaArray _trigger doesn't do what I thought, but I did find another alternative that is super small. count (allMines inAreaArray _trigger) > 0

drifting sky
#

Is there a way to get all paths for gun turrets on a vehicle (not including "person turrets" or the driver or commander stations without a gun)? Or more specifically, is there a way to get all paths for empty instances of that kind of gun turrets on a vehicle?

sweet zodiac
slender olive
#

Damn dude ur popping off

drifting sky
#

is it possible to get the kind of turret from just a turret path?

slender olive
sweet zodiac
#

_trigger is just me representing the trigger, it can be the variable Name of the trigger or if you slapped it straight into the condition you can just use thisTrigger

slender olive
#

Okay thx

sweet zodiac
slender olive
#

Tbh i think im biting a bit more off than I can chew with this project lmao

Cuz after this I now need to make a trigger create a convoy that runs over the IED, then a helicopter that lands after to act as a reinforcement, then turn all this plus howevermany more missions Im making

#

Hm, it doesnt seem to be working anyway

#

Im gonna try without ace

sweet zodiac
#

My tiny test seemed to work with Ace

slender olive
#

I guess i messed something up

sweet zodiac
slender olive
#

Ill try again

#

That was how i set it up tho

#

At least I thinl

#

Ill quadruple check

sweet zodiac
#

The mines need to be activated fully to count as well

slender olive
#

It works

#

And im glad it does, even better

pulsar bluff
#

not โ€œnearestMinesโ€?

sweet zodiac
#

Did I miss that? ๐Ÿ˜…

kindred lichen
#

for the homies trying to belittle 0.001ms

#

That's a huge amount of time for such a simple call

#

If that was all you were doing it would be the difference between 170 FPS and 150 fps.

granite sky
#

It's new-ish apparently.

kindred lichen
#

that being said, the performance test is for 10k iterations.

#

Anyone have experience working with the ryan zombies and demons mod?

#

Trying to ease up the server load of the ai, but it seems headless client makes things worse.

#

When I make the zombies local to a client, they suffer a huge amount of ai lag. Like they stand still, take a couple steps, stand still again, while the Server local ones perform fine.

#

All I can think is that the server is taking over the AI, but having to execute it remotely or there's some other conflict going on.

fallen inlet
#

Could someone point me in a good direction for a money system script. Been looking and came up empty

spice kayak
#

Is the only way to unlock faction clothing via addons and not scripts?

sullen pulsar
#

I wasn't trying to "belittle" it, I was just joking around -_-

#

And @spice kayak you can use forceAddUniform or something like that to forcefully add clothing.

jade abyss
#

Thats correct @sullen pulsar whistle

sullen pulsar
#

No, he asked if the only way was by addons and not scripts.

jade abyss
#

What you talking about? I wrote nothing (pls wait with answers, until i changed my posting)

sullen marsh
#

"7:47 Dscha: He wanted to do it by Addon @sullen pulsar" QFT

sullen pulsar
#

LOL

jade abyss
#

I never wrote that!

#

LIAR!

#

:D

sullen marsh
#

If only there was a real quote function </3 discord

jade abyss
#

@sullen marsh grr, me hatin ya!

sullen marsh
#

<3

wary needle
#
[] spawn {
    AI addEventHandler ["AnimChanged",
    {
        _aunit = _this select 0;
        _curanim = _this select 1;
aunit playmove "ApanPercMrunSnonWnonDf";
    _aunit setAnimSpeedCoef 1.5;

    }];

    [] spawn {
        while{true} do {
            waituntil{((AI distance player) <= 59)};
            AI setDir ([AI,player] call BIS_fnc_dirTo);
        
        };
    };
    while{true} do {
        _targetPos = getpos player;
        AI DoMove (position player);
        waitUntil{(count(_targetPos nearEntities [typeOf player,(AI distance player)/5]) == 0) && ((AI distance player) >= 1.5)};
        

    };
};
#

hey i made this script that makes ai follow me, but for some reason the script majes the ai animation look choppy

stable dune
pulsar bluff
#

there is some old outdated code there too, like โ€œbis_fnc_dirToโ€

burnt torrent
#

how could i set the speed of a jet? looked on wiki it gives velocity of a object but that not work any help would be appreciated

tough abyss
#

call compile str
everything

sweet zodiac
kindred lichen
#

Call compile mission.sqm

sullen marsh
#

call compile call compile call compile call compile call compile call compile call compile

stark fjord
kindred lichen
#

Try to imagine the escape characters for that many nested compiles.

nocturne bluff
#

AAAAAAAAAH

#

;X

little raptor
#

For AI controlled ones try forceSpeed and limitSpeed

#

And waypoint speed

nimble hill
#

call compile ""end1" call bis_fnc_endmission"

#

done

#

of course make it local as well

burnt torrent
prisma glen
#

Call compile mission.sqm
You say that; the amount of execVM I've seen in some missions ...

stray flame
#

Hello

#

How do I turn off respawn markers form showing on the map?

#

idk if its relevant to scripting or not exactly but cant seem to find a good awnser

digital hollow
#

use the System > Empty marker. that shouldn't be visible.

stray flame
#

hu?

sweet zodiac
#

How exactly does your Respawn work, are you using the respawn Module in the editor?

stray flame
#

yeah

#

something like that

#

When I place a respawn in editor or zeus, it comes with a marker that is displayed to atleast their own team

#

like this

sweet zodiac
#

If you are doing it in Zeus it's gonna be a pain to change, but in the Editor that's fairly straight forward

stray flame
#

There shouldnt be any additions on zeus needed

#

I want one group to respawn on closest squad member, and one pilot to respawn at HQ

#

neither should know where the other is

#

the far away group shouldnt even know where they are

#

as is map markers for respawn kinda ruin it

#

and respawn on death position is not optimal cuz

#

pilot may crash and end up in the water

sweet zodiac
#

Well first off just like Ampersand said use the System > Empty marker. that shouldn't be visible. You can use a Empty marker
After that you can give it a very special variable name as dictated in the Multiplayer Attributes window for Respawns.

stray flame
#

ah right

#

use that instead of a module

#

right, that could work perhaps

burnt torrent
#

really daft question @sweet zodiac but im new to all this and ive wondered a few times, why is your editor orange and mine green is there a reason? i will remove this question once answer btw

sweet zodiac
#

there is a colours Menu in the Options, I have haven't changed my menu colours from when I installed the game Some 5k hours ago

burnt torrent
#

ahhh mines all ways been green and im on 1600hrs

#

thanks fluffy

little raptor
burnt torrent
thin heron
#

Has anyone ever, or does anyone have a script for a shooting range that keeps score looking to build a range where I can have folks shoot a set of targets on a time thing and have it scored

stray flame
#

using this method

#

with the module its just attaching the thing to a player

sweet zodiac
#

Hmm, well I suppose you could just run a loop that moves the position of the Respawn to the Group Leaders position

#

There might be an easier method but I can't think of anything at the moment

stray flame
#

alright

#

is there anything that can be done to make a respawn group specific?

#

I have a weird pseudo solution of having a respawn room and just having one specific trigger in there teleport the pilot to the spawn but

#

I feel like something more optimal could be done

sweet zodiac
#

I can think of a way yeah

#

did it the other day for another fella

#

having this executed locally for the people in question.

[player, getMarkerPos "MarkerName", "SpawnName"] call BIS_fnc_addRespawnPosition
stray flame
#

and this wouldnt add a module with the respawn thing on it?

sweet zodiac
#

Don't believe so but I would have to double check

stray flame
#

okay

#

a roundabout solution is to set that different players get teleported to different places on the map when they get to the spawn room

#

hmm maybe secondary solution

#

I have some scripts that sets back the loadout on respawn

#

I wonder if I can put something in my onPlayerRespawn.sqf that makes it so that

#

if the player is part of a surtain group

#

they get teleported to the nearest player

#

if they are not, they go to somewhere else

sweet zodiac
#

If they stay in the same group you can probably just player setPos (getPos leader player)

stray flame
#

im bad at formatting if statements

#

but I shall try

sweet zodiac
#

If it's in onPlayerRespawn you shouldn't need an If

stray flame
#

well I would want it to be player specific

#

if player is in group A, then ....
if player group B, then .....

sweet zodiac
#

That short snippet will grab the leader of their current group, so if they are in Group B they will TP to Group B's leader and the same for Group A

stray flame
#

hm

#

might be an issue if the respawn pos of gorup B is fixed

#

I would need to have still ai as leader then

sweet zodiac
#

In that case then you would want one yes

stray flame
#

look the premise is

#

2 groups, the rescue and the survivors

#

the survivors are split into small teams (in the same group so that its unpredictable who will be with who) and they dont know where the heck they are

#

and the rescue pilot

#

the rescue pilot should only respawn at the base

#

the survivors should respawn on closest survivor (or closest player since that will always be another survivor)

#

When respawning, if the respawning person is group survivor, they should be moved to nearest player

#

if the player is group rescue, they should be moved to a set location

#

thats the if statement I would need to construct

#

with G_Survivor and G_Pilot

sweet zodiac
#

onPlayerRespawn has 4 Params you can play with that might help, specifically _oldUnit

#

If you are a Survivor getNearest Survivor to the oldUnit/Body then TP there

stray flame
#

hm

pastel pier
#

How do i know if a mine has exploded or has been deactivated by a person?

sweet zodiac
#

Ta Da

params ["_newUnit", "_oldUnit", "_respawn", "_respawnDelay"];

switch (typeOf player) do {
    case "G_Survivor": {
        _teammate = nearestObject [_oldUnit, "G_Survivor"];
        player setPos (getPos _teammate);
    };
    case "G_Pilot": {
        // Do Nothing
    };
    default { };
};

You just need to set the Respawn for your Pilot where ever you want using a similar setup in the initPlayerLocal and you should be golden.

stray flame
#

Wow

#

I am only used to basic programming with C# so arma stuff confuses me alot

#

thank you

sweet zodiac
#

Mind you this is untested so I can't guarantee that it will work.

stray flame
#

yeah

#

I would assume the best standard thing to set is also respawn at position of death too

#

just to not potentially mess with anything related to it finding locations

sweet zodiac
#

I would use custom Position instead

stray flame
#

hm?

#

I mean

#

I can

sweet zodiac
#

Well if you respawn on your death position you bypass any Spawn Positions

stray flame
#

ah

#

so I should have respawn on custom position with no set respawn module or marker?

sweet zodiac
#

I would have a marker somewhere so you can use it with BIS_fnc_addRespawnPosition so that way you can at least set a location for your Pilot, and since the survivors get TP'd anyways their spawn pos doesn't matter.

stray flame
#

I think I will have a respawn room with the respawn module

#

and then have it TP player to pilot spawn

#

as to not give away the respawn location of the pilot

#

or no, that wouldnt be a problem

#

I dont need that

#

I'll do as u said

sweet zodiac
#

Either option work really

stray flame
#

the players can know the pilot's spawn location

#

thats fine

#

its on an island

#

yeah got a place for the module

sweet zodiac
#

The Teleport should happen fast enough that the players likely won't even see the place they spawn

#

well the Survivors at least

#

The Pilot should be fine unless you plan to Tele them too

stray flame
#

I guess in testing this I need an AI teammate

sweet zodiac
#

If your mission is setup to respawn on Start it may complain the first time

#

since _oldUnit won't exist until the first death

stray flame
#

nah

#

I set it to

respawnOnStart = -1;

#

strange

#

it appears I have respawned where I died

#

is respawn selection a needed thing too?

sweet zodiac
#

Put atleast 1 second delay on the respawn

stray flame
#

there is 20

sweet zodiac
#

Interesting

stray flame
sweet zodiac
#

Wait a minute, I need to test something Yeah it works fine from what I can see

#

I do have respawn Position enabled

stray flame
#

Cant hurt

#

okay on my test

#

it did not teleport me

sweet zodiac
#

Okay, I have the feeling that it's picking up the body, lemme change it up real quick

stray flame
#

if its depending on the body then we have

#

an issue

open fractal
#

setPos getPos can lead to headaches

#
setPosASL getPosASL 
``` or ATL is cleaner
granite sky
#

(not related to your problem though)

stray flame
#

onPlayerRespawn.sqf


params ["_unit", "_corpse"];
if (isNull _corpse) exitWith {};
player setUnitLoadout (getUnitLoadout _corpse);
_primaryWeapon = _corpse getVariable ["Hmch_Saved_primWeapon",["",[""],[""]]];
_secondaryWeapon = _corpse getVariable ["Hmch_Saved_secWeapon",["",[""]]];
player addWeapon (_primaryWeapon select 0);
player addWeapon (_secondaryWeapon select 0);
{
player addPrimaryWeaponItem _x;
} forEach (_primaryWeapon select 1);
{
player addPrimaryWeaponItem _x;
} forEach (_primaryWeapon select 2);
player addSecondaryWeaponItem ((_secondaryWeapon select 1) select 0);
deleteVehicle _corpse;


//params ["_unit", "_corpse"];
//player setUnitLoadout (getUnitLoadout _corpse);



//params ["_unit", "_corpse"];
//player setUnitLoadout (_corpse getVariable ["Saved_Loadout",[]]);

//player setUnitLoadout (player getVariable ["Saved_Loadout",[]]);
player setUnitFreefallHeight 50;




params ["_newUnit", "_oldUnit", "_respawn", "_respawnDelay"];

switch (typeOf player) do {
    case "G_Survivor": {
        _teammate = nearestObject [_oldUnit, "G_Survivor"];
        player setPos (getPos _teammate);
    };
    case "G_Pilot": {
        // Do Nothing
    };
    default { };
};
open fractal
#

yeah just bugging you to save some potential trouble

stray flame
#

I have a script that restores player loadout by taking the things from when they died and the gun from their body then removing the body

#

so something thats body-dependent has a good chance of not working

sweet zodiac
sweet zodiac
#

Okay that was quite the annoyance, Probably not the most clean solution.
Replace the inside of the "G_Surivivor" case with this, unless I have made a mistake this should do the job, I did test it

if !(_corpse isEqualTo objNull) then {
    _nearPlayers = nearestObjects [_corpse, ["G_Survivor"], 500, true];
    _teammates = _nearPlayers select {alive _x && _x != player};
    player setPosASL (getPosASL (_teammates select 0));
};
#

I would also move the deleteVehicle _corpse to beneath the Switch

stray flame
#

Alright

stray flame
#

I put deleteVehicle _corpse; last in the file

sweet zodiac
#

That way the Corpse will exist long enough to get the teammates from it

stray flame
#

yeah

#

will this only work for actual player teammates?

sweet zodiac
#

It will work for AI teammates too

stray flame
#

hm

#

currently I have not managed that

sweet zodiac
#

-_-

stray flame
#

as in I respawned without TP to teammate

#

there is an AI squadmate

#


params ["_unit", "_corpse"];
if (isNull _corpse) exitWith {};
player setUnitLoadout (getUnitLoadout _corpse);
_primaryWeapon = _corpse getVariable ["Hmch_Saved_primWeapon",["",[""],[""]]];
_secondaryWeapon = _corpse getVariable ["Hmch_Saved_secWeapon",["",[""]]];
player addWeapon (_primaryWeapon select 0);
player addWeapon (_secondaryWeapon select 0);
{
player addPrimaryWeaponItem _x;
} forEach (_primaryWeapon select 1);
{
player addPrimaryWeaponItem _x;
} forEach (_primaryWeapon select 2);
player addSecondaryWeaponItem ((_secondaryWeapon select 1) select 0);



//params ["_unit", "_corpse"];
//player setUnitLoadout (getUnitLoadout _corpse);



//params ["_unit", "_corpse"];
//player setUnitLoadout (_corpse getVariable ["Saved_Loadout",[]]);

//player setUnitLoadout (player getVariable ["Saved_Loadout",[]]);
player setUnitFreefallHeight 50;

if !(_corpse isEqualTo objNull) then {
    _nearPlayers = nearestObjects [_corpse, ["G_Survivor"], 500, true];
    _teammates = _nearPlayers select {alive _x && _x != player};
    player setPosASL (getPosASL (_teammates select 0));
};

deleteVehicle _corpse;```
#

here is the whole file

#

if there are any obvius issues

sweet zodiac
#

Does the rest of it fire?

#

like the weapons stuff?

stray flame
#

yeah

#

it works as it should

stark fjord
#

then it must be the if

stray flame
#

I dont think its another script

#

onPlayerKilled.sqf

params ["_oldUnit", "_killer", "_respawn", "_respawnDelay"];
_primaryWeapon = [primaryWeapon player, primaryWeaponItems player, primaryWeaponMagazine player];
_secondaryWeapon = [secondaryWeapon player, secondaryWeaponMagazine player];
player setVariable ["Hmch_Saved_primWeapon",_primaryWeapon];
player setVariable ["Hmch_Saved_secWeapon",_secondaryWeapon];```
sweet zodiac
#

Well I just tested it again, and It works here

#

I am unsure what could be causing it

#

The If just checks if the corpse exists, if it does then look for the teammates using it's position

stark fjord
#

just BTW: are you only saving primary/secondary weapon on purpose?

stray flame
#

I made it with big help from people here

#

it worked, and I payed it no mind thereafter

#

its made that way due to a mod that makes it dificult to save loadout on death

#

since its revive state removes weapon mags

stark fjord
#

you could getUnitLoadout player then player setUnitLoadout loadout.
We save it when players exit arsenal or base.

stray flame
#

I want it to save when dying or just before

#

its a survival op

#

there is no prep phase

stark fjord
#

oh okay

sweet zodiac
#

getUnitLoadout _oldUnit

stray flame
#

Regardless, is that what would cause the issues?

sweet zodiac
#

No, not at all

stark fjord
#

also, what if you try if !(_corpse isEqualTo objNull) exitWith {

sharp grotto
stark fjord
#

uhh, yeah for us its not an issue. But it could be for survival type ops

sweet zodiac
#

In my version I also delete the corpse at the end to see if it would stop the teleporting, No dice

stray flame
#

here is the help I got on that script for respawn save

#

I could try to remove that part

#

or make it into a comment so I can undo it if need be

#

as I tend to

stark fjord
#

you wont get teleported to teammate in any case

#

cause line 2 if (isNull _corpse) exitWith {};

sweet zodiac
#

It returns false upon death

#

It just helps you avoid any issues with respawnOnStart

#

Since in that case your Corpse wouldn't exist since you haven't died yet

stray flame
#

RespawnOnStart is -1

sweet zodiac
#

I mean potentially but that is a very specific and rare case I would say

stark fjord
#

idk rearranged, but it doesnt handle first spawn... soDontUseIT

sweet zodiac
#

He wants to teleport though

stark fjord
#

teleport what?

sweet zodiac
#

Certain Players he wants to teleport

stark fjord
#

god dang nang it

sweet zodiac
#

Move the Else into the main and remove the Else all together

stray flame
#

at the start teleporting is no issue if thats a question

#

just respawn

#

tho I think ive made that clear

stark fjord
#

ye

sweet zodiac
#

The If statement I made was because I was testing with respawning at start, It shouldn't have made any difference for you

#

I still don't understand why it's failing to teleport I can confirm it works in a vacuum at least, the only difference is I used a different Classname

#

So unless the className is wrong I don't understand why it's not working

stark fjord
#

So if i understood correctly this whole process:

  1. First spawn: spawn on original position, dont alter gear
  2. Respawn spawn on corpse if available, restore gear from corpse and remove corpse
  3. Respawn on nearest player. Restore gear from corpse.
sweet zodiac
#

Always respawn on Teammates in the case of the player being of "G_Survivor" Class

stray flame
#

idk why it would respawn on corpse but ig?

stark fjord
#

ah. gotcha

stray flame
#

"G_Survivor" Class or part of the group with "G_Survivor" as its variable?

#

idk maybe that just is the class

sweet zodiac
#

is G_Survivor the className or the Variable Name?

#

well It couldn't be variable because each player would have to be different I suppose

stray flame
sweet zodiac
#

Oh my god

stark fjord
#

Lol

sweet zodiac
#

It's a group

#

My brother in christ

#

Can you get the className of one of the units

stark fjord
#

amm, why not just get random groupman?

stray flame
sweet zodiac
#

He has two sub groups within that group and he wants them to join back with their own sub Group

#

So we can't use the group as a whole

stray flame
#

hold your hourses

stark fjord
#

B_Soldier_unarmed_F

stray flame
#

I want it to respawn the player on the nearest teammate to where they died

sweet zodiac
#

Yes

#

As I said

stray flame
#

that is always one of the people within that "sub group"

stark fjord
#

Hamsch, right click one of these guys, select "Log", "Classes"

#

and pasta it here

stray flame
#

OPTRE_UNSC_Marine_Soldier_Unarmed (Player_1)

sweet zodiac
#

OPTRE_UNSC_Marine_Soldier_Unarmed

stark fjord
#

thats the class ๐Ÿ™‚

sweet zodiac
#

Put that instead of "G_Survivor" and it should function

stark fjord
#

unless every single one is different class.

stray flame
#

I thought only the variable names mattered ยฏ_(ใƒ„)_/ยฏ

sweet zodiac
#

I hope not

stray flame
stark fjord
stray flame
#

only one with a different class is pilot

#

who isnt in the same group

sweet zodiac
#

Man here I was thinking G_Survivor was a class

stark fjord
stray flame
#

ah

sweet zodiac
#

I mean it looked like one to me so I just assumed it was XD

stray flame
#

I thought one could just search for nearest unit by side or something

stark fjord
#

Many ways to skin a cat

stray flame
#

Since there are no allied troops in this mission outside of the HQ itself

sweet zodiac
#

My solution isn't the best but I think it works better than just finding the closest blufor, since that could potentially be the other group and the Pilot

stark fjord
#

I thunk you had some modded unit G_survivor, cause (I/O/B)_Survivor_F are valid

#

sooo

#

what happens if they get squad wiped

#

?

sweet zodiac
#

Well It would find the closest of that class within 500 at least with my numbers

stray flame
#

I have not yet accounted for that I do admit and I would hope that they respawn on body pos or something so I can manually sole that

#

in zeus

stray flame
#

2000m

sweet zodiac
#

You can change it as much as you want, I just used 500 for my test

stark fjord
#

well script would error out. and idk what your default respawn setting is

sweet zodiac
#

custom position

stray flame
#

its fine

stark fjord
#

actually no, youd be sent to [0,0,0]

stray flame
#

I dont expect a group of mostly scattered people to get wiped together. even If they do I will take responsibility and TP them back

#

at that point me as mission maker can be blamed

stark fjord
#

if i would zeus that, id just hint "Get rekt, git gud" and leave them to swim to main land

stray flame
#

you do you

#

I didnt prep my boys for a titanic op

#

Now back to what I need to actually change

#



if !(_corpse isEqualTo objNull) then {
    _nearPlayers = nearestObjects [_corpse, ["G_Survivor"], 500, true];
    _teammates = _nearPlayers select {alive _x && _x != player};
    player setPosASL (getPosASL (_teammates select 0));
};

deleteVehicle _corpse;```

if I replace `G_Survivor` with `OPTRE_UNSC_Marine_Soldier_Unarmed` it should work right?
sweet zodiac
#

I'd imagine so

stray flame
#

testing!

#

tho I should make the test AI that class too

sweet zodiac
#

If it doesn't I will cry

stray flame
#

which I had not done before

stark fjord
#

great! you will test squad wipe scenario

stray flame
#

here I am with dancing bob

#

lets try it out

#

it worked

#

(picked up some clothes to test that too)

#

now im going to kill him

sweet zodiac
#

I don't think AI respawn

stray flame
#

yes but

#

he is my respawn point

stark fjord
#

oh no, not the dancing bob

sweet zodiac
#

Oh yeah

stray flame
#

so I will kill him and see where I end up

sweet zodiac
#

dementia

stray flame
#

I ended up in the backrooms

#

as I call it

#

it was the old respawn hub

#

if you go through the green blob you end up on the beach near the spawn

#

unless you are pilot in which case you end up at base

#

or not, but, thats my problem

#

Thank you gentelmen

sweet zodiac
#

FSM is best used for statemachines

#

Well this is going to sound dumb but its a machine that runs through States, Its mostly used for AI, I believe googling it will do a far better job at explaining it

#

Hmm well the only real one I have is a small attempt at making an AI that tries to capture zones, But you could also use it for Dialogue

#

This is the only example I have on hand, It ain't much but it's honest work

#

Scenario Flow is another use for it as well

#

Basically anything that can go through multiple states

#

Yeah that is one way to use it, I would use it for anything that can branch off several times at several points

stark fjord
#

good example is AI decision making

sweet zodiac
#

Im going to try and make AI Dialogue using it tomorrow, just for fun points

stark fjord
#

Does anyone still use sqs?

sweet zodiac
#

Its effectively deprecated for Arma 3

winter rose
sweet zodiac
#

Does it actually have any benefits?

winter rose
#

not really no

#

besides goto

sweet zodiac
#

just like Batch

stark fjord
#

If you really like one-liners its the script language for you

sweet zodiac
#

sounds very cursed

#

just like using !false for true conditions

stark fjord
#

Why im asking is

can be used for scripts but not for functions
Does that just mean you cant define funcs in there? Or?

winter rose
stark fjord
#

Ah.

#

Wait, fsm can be put in cfgFunctions?

winter rose
#
private _myFunc = { hint _this }
~1
"Hello there" call _myFunc
```works in SQS
winter rose
stark fjord
#

Umm ext=".fsm"...

winter rose
#

missionFlow.fsm iirc is a thing, and is called every mission start - same as init.sqf, you can have yours in a mission dir

stark fjord
#

You still have to prefix it with fn_ correct?

winter rose
stark fjord
#

How do you call fsms later in mission? If they are defined in cfgfunctions. doFsm or execFsm both seem to take file paths? Do you simply spawn it like [arg] spawn TAG_fnc_myfsm?

kindred lichen
#

@nimble hill that's not the correct escapes. That'll throw an error. Should be like call compile " ""end1"" call bis... ";

nimble hill
#

I've sinned.

sullen pulsar
#

Mass converting bis_fnc_MP to remoteExec, I wonder what will break :s

sullen sigil
#

you dont have to prefix anything with fn_, i didnt for the first year of making scripts and shit

stark fjord
#

But .... wiki...1

#

Well i understand if u use file= for every func

sullen sigil
#

i do

stark fjord
#

Oh...

sullen sigil
#

i just prefix with fn_ for readability now

sullen sigil
stark fjord
#

Still seems like a waste of bytes if system does it for you.

sullen sigil
#

saves organisational headache

#

never managed to get it to work without file=

stark fjord
#

Well i have mine organised as per wiki and works fine.
I only use file to specify folder if within mod.

sweet zodiac
#

I assumed fn_ was required

#

because on multiple cases it failed to load without it

#

I just use it as gospel because setting file for every single Func is hilariously inefficient

stark fjord
#

Not if you do class myFunc {file="asdf.sqf"};
But i agree its a bit redundant.

sullen sigil
#

i have functions folder with them in

#

file= just dislikes me

#

(Its user error im just lazy)

stark fjord
#

There is no wrong way of doing it, just personal preference.

But for folders i use

class myTag/myCategory
{
    file="myFolder"
    //functions (without file, fn prefixed)
};
sweet zodiac
#

Yeah I use that pretty frequently

little raptor
#

That's the best way imo

stark fjord
#

In mission setting you dont even need file folder if your folder has same name as category

#

But still how does one exec fsms defined in cfgFunctions?
Simply calling it?

little raptor
#

Well fsms can't be called (unless the fsm gets compiled into sqf, and afaik it does but I've never seen a dedicated command that does it)

#

Last I checked there's only execFSM

stark fjord
#

Those take paths to file, at least according to wiki

little raptor
#

I know

stark fjord
#

So what would be the purpose of defining fsm in cfg functions, besides auto init?

sullen sigil
#
#define QUOTE(var1) #var1
#define MACRO_FUNCPATH(FUNCNAME) KJW_CapitalShips\functions\fn_##FUNCNAME

#define MACRO_FUNCTION(FUNCTIONNAME) class FUNCTIONNAME {\
                file = QUOTE(MACRO_FUNCPATH(FUNCTIONNAME).sqf);\
            };```
is just what i use
stark fjord
#

Eww. But i understand

sweet zodiac
#

I'm not sure if there is a use for it really

sullen sigil
#

not having to bother with precisely getting my config just how arma wants it

sweet zodiac
#

Not sure if these are correlated though or if it's just outdated

stark fjord
#

commandFSM says fsmFile as param.
And doFSM says fsmName as param, but examples show its a file.fsm

#

Ill try calling one later and see what occurs

#

Mostlikely error...

sweet zodiac
#

I'm betting on it just being outdated and it does require a path

#

Yup It's file path

#

Just tested it

winter rose
stark fjord
pastel pier
#

I'm at my ends wits with this one. I have barricades where i add an event "Explosion". This works locally but then when i try on my dedicated server the event does not get triggered.
Here is the code for the event that triggers on all clients according to the documentation.

addBarricadeHitEventHandler = {
    getMissionLayerEntities "Barricades" params ["_barricades", "_markers"];

    diag_log format ["Barricades: %1", _barricades];

    {
        _x addEventHandler ["Explosion", {
            params ["_vehicle", "_damage", "_source"];
            diag_log "Explosion";
            _explosiveTypes = ["gm_explosive_charge_petn","gm_explosive_charge_plnp"];
            [getPosATL _vehicle, 10] remoteExec ["fnc_huntGroup",2];

            if(typeOf _source in _explosiveTypes) then {
                [_vehicle] remoteExec ["deleteVehicle", 2];
                deleteVehicle _vehicle;
            }
        }];

        diag_log format ["Barricade: %1", _x];
    } forEach _barricades;
};
#

Here are the logs of the server. There is a lack of explosion in it.

11:15:53 "Barricades: [7f259aa16800# 1928666: barricade_01_10m_f.p3d,7f259c89a000# 1928667: barricade_01_10m_f.p3d,7f259aa17000# 1928668: barricade_01_10m_f.p3d,7f259aa17800# 1928669: barricade_01_10m_f.p3d]"
11:15:53 "Barricade: 7f259aa16800# 1928666: barricade_01_10m_f.p3d"
11:15:53 "Barricade: 7f259c89a000# 1928667: barricade_01_10m_f.p3d"
11:15:53 "Barricade: 7f259aa17000# 1928668: barricade_01_10m_f.p3d"
11:15:53 "Barricade: 7f259aa17800# 1928669: barricade_01_10m_f.p3d"
stark fjord
winter rose
little raptor
stark fjord
#

Add event handler on all clients+server, then remoteexec the content

pastel pier
#

So the code is executed on every client. But the barricade is only on the server? So the explosion triggered by a client doesn't trigger because the barricade is* on the server?

stark fjord
#

The event handler runs on every client, but according to wiki, only the client that created explosion will report it

pastel pier
#

Ok i think i get it know. IF i look in my local logs. It can't find any barricades.

#

So how do i add a local event to a remote object?

stark fjord
#

Also you see in the wiki you see GA on top, that doesnt mean global effect, but global argument.

stark fjord
pastel pier
#

It doesn't otherwise i wouldn't be here.

stark fjord
#

Like none? At all?

little raptor
#

The real question is where do you call that function?

pastel pier
#

Like i show in the logs. The event doesn't trigger in the client because no barricades can't be found. And because the explosion has to be local before it triggers it doesn't trigger on the server although it got added there.

stark fjord
#

Log doesnt show not found

pastel pier
#

No because those are the server logs

#

Local shows this: 13:15:50 "Barricades: []"

tepid talon
#

Is there anyway to write a script that forces a certain ammunition on a class of vic's ( I m having problems with setting some default ammunition for rhs tanks to spawn with ) I have looked in the wiki and experimented with some stuff but none if it worked

stark fjord
#

How do you even call function above, and where?

#

Ah reason: getMissionLayerEntities only does on server. Clients dont get such info

#

So one way would be to remote exec your function from server to all, passing barricades as params

stark fjord
#

Eg ```if (isServer) then {[getMissionLayerEntities "Barricades"] remoteExec ["addBarricadeHitEventHandler"];};

//addBarricadeHitEventHandler
params ["_barricades"];
//rest of your code```

tepid talon
sweet zodiac
#

The Arguments need to be local so you either need to own the vehicle or execute the command where the vehicle is local.
One example would be to get the Owner of said Vehicle and execute it on them.

_ownerID = owner _vehicle;

[_vehicle, [magazineName, turretPath, ammoCount]] remoteExec ["addMagazineTurret", _ownerID];
pastel pier
#

I'm thinking about just doing

private _barricades = nearestObjects [getMarkerPos "AOmarker", ["Land_Barricade_01_10m_F"], 1000];
stark fjord
#

Whatever floats your boat, i just gave you an example if you wanna use layer.

sweet zodiac
#

Something I never understood was using private, isn't that the same as using _ on your variables?

stark fjord
#
private _lol=1;
while {something} do {
private _lol = 2;};
hint str _lol;
``` maaaybe
sweet zodiac
#

I can't say I can think of many uses where I would need to use private it seems to just mean that lower scopes can't read what it was higher up

#

Maybe I'm just too stupid for it

#

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

stark fjord
#

Idk what purpose it would serve within the scope of the function, but i just roll with it.

sweet zodiac
#

The Wiki states that Params more or less serves the same purpose so to me it just seems like a round about way of declaring a variable

stark fjord
#

Well params has other uses

#

Like [1,2,3] params ["_v1", "_v2", "_v3"]; instead of _v1 = [1,2,3] # 0

sweet zodiac
#

That's super handy, I forgot you could use params like that

stark fjord
#

At the start of the function it does the same. So you dont have to use _this select 0 for first param etc.

sweet zodiac
#

Yeah I already use it in Functions and Spawns

pastel pier
stark fjord
#

Awesome

pastel pier
#
[(getMissionLayerEntities "Barricades")#0] remoteExec ["addBarricadeHitEventHandler",0,true];
winter rose
stark fjord
#

Sooo like this ```sqf
Asdf = {_lol = 2;};
_lol = 1;
call Asdf;
hint str _lol;

That would still hint 1 i believe, even if no private was used?
#

Or can lol somehow escape scope of the function?

sweet zodiac
#

It hints 2 like that

#
Asdf = {private _lol = 2;};
_lol = 1;
call Asdf;
hint str _lol;

Hints 1

open hollow
stark fjord
#

Why use private of any sort in aboce case is the question?

#

Like instead of private _a = 1; just _a=1;

sweet zodiac
#

Because called code can change local Variables in the Parent script too if it isn't privated

stark fjord
#

Ah. Nvm misread your test result.

sweet zodiac
#

Yeah I can see it's use case now

open hollow
#

i guess is a safty measure, being sure that _a its what i want to be and nothing else in this scope.

_myvar = 123;
systemChat str [_myvar];        //ย [123]
call {
    systemChat str [_myvar];    //ย [123]
    private "_myvar";
    systemChat str [_myvar];    //ย [any]
    _myvar = 345;
    systemChat str [_myvar];    //ย [345]
};
systemChat str [_myvar];        //ย [123]
#

now... what happen if i do private _this = _this thonk

sweet zodiac
#

I don't think that's possible since it's a reserved variable

#

like _x

stark fjord
#

I think _this is defined before your code starts running within the function. So it wouldnt change

sweet zodiac
#

It would just be private "_this" potentially

#

But even then in any scope I feel like it would be overwritten by the Engine because it's reserved

#

It would let you mitigate any potential issues with reusing certain variable names that aren't defined by Params

#

for example _count or some variation of _unit that isn't directly apart of your initial params but is also used in the parent scope that called the code in the first place

winter rose
sweet zodiac
#

It ran faster simply because the scope didn't need to create nor destroy the definitions

jade abyss
#

everything, throw it away :D

zealous heath
#

anyone mind helping me with something real quick? Trying to set up a respawn on an OPTRE corvette for an event on my server, but players spawn under it in a parachute for some reason

sullen sigil
#

player setUnitFreefallHeight 1000; in an onplayerrespawn.sqf. failing that,

use an onplayerrespawn.sqf to move them to the correct position or spawn them into crypo pods

zealous heath
sullen sigil
#

from optre

#

or some other vehicle

#

sync respawn module to them

zealous heath
boreal parcel
#

so im trying to force all ai units to stand at all times instead of going prone when they come into contact, I tried the following simple code but they didnt seem to care. Any better suggestions?

{
    // Current result is saved in variable _x
    _x setUnitPos "UP";
} forEach (allUnits);
#

this is in the init.sqf btw

winter rose
#

try adding a little sleep 0.1; before it

lean raptor
#

Anyone able to help with this, its a missdrop script, but it only works for one player when called upon

_aircraft = _this; _aircraftPassengers = assignedCargo _aircraft; _aircraft setDamage 0.5; _aircraft setFuel 0; { moveOut _x; _xCordNum = [-400,400] call BIS_fnc_randomNum; _zCordNum = [-400,400] call BIS_fnc_randomNum; _yCordNum = [1,15] call BIS_fnc_randomNum; _currentPos = position _x; _xCordPos = _currentPos select 0; _zCordPos = _currentPos select 1; _yCordPos = _currentPos select 2; _xDropCord = _xCordNum + _xCordPos; _zDropCord = _zCordNum + _zCordPos; _yDropCord = _yCordNum + _yCordPos - 30; _x setPos [_xDropCord,_zDropCord,_yDropCord]; _x action ["OpenParachute", _x]; _unconTime = [4,12] call BIS_fnc_randomInt; [_x, true, _unconTime, true] call ace_medical_fnc_setUnconscious; } forEach _aircraftPassengers;

boreal parcel
boreal parcel
sullen sigil
winter rose
boreal parcel
#

and ill try the others now

boreal parcel
winter rose
#

also - if you have AI mods, good luck - support here stops at vanilla

boreal parcel
sullen sigil
#

probably lambs suppression

boreal parcel
sullen sigil
#

uhhh

#

which one

sweet zodiac
#

LAMBs Danger is the main one

sullen sigil
#

oh

little raptor
#

so it conflicts with yours

#

basically there's no AI mod that doesn't use that command ๐Ÿ˜…

boreal parcel
#

gotcha gotcha

hallow mortar
#

I encountered this in a mission recently. I ended up just adding a loop that does setUnitPos on all relevant units every x seconds (not too fast).
As a bonus, it also catches any units that were created after mission start.

open fractal
#

if you dont want to loop you can use the animchanged handler and catch the units that try to go prone

#

assuming setunitpos is getting adjusted by a mod

wind flax
#

Hey guys, how would I get the tilt of an aircraft? Like how much it's banking left or right?

little raptor
#

asin (vectorSide _veh # 2) would be one way...

#

not accurate tho

#

oh vectorSide is dev only rn
then vectorDir _veh vectorCrossProduct vectorUp _veh instead

hallow mortar
little raptor
#

idk what bug it's talking about but if it means what I mean then it's not a bug

#

what I mean is that when the vehicle has both pitch and bank it's hard to define what banking is anymore blobdoggoshruggoogly

#

depending on pitch
I guess yeah it means what I mean then

wind flax
#

Perfect, thanks guys

stark fjord
#

Yes. You add vic, and with that you also get control of each of its crew

pulsar bluff
#

i wonder how we can join two ladders together

#

so player tops out on one and connects to bottom of the next

little raptor
#

not possible right now

#

unless you script the whole process

#

(i.e. motion is controlled by your script not engine)

dusk gust
#

Anyone know if import RscDisplayOptions as RscDisplayTest; actually works in mission config?
I can get it to just import without the as, however when I use it I just get File ..\..\file.h, line 0: /: 'a' encountered instead of ';'

dusk gust
molten yacht
#

goddamnit

#

how do I assign a variable to a player again

#

I know this

winter rose
molten yacht
#

setVariable

#

I got it

molten yacht
#

Hey, has anyone here ever seen the error "GIAR pre stack size violation"

granite sky
#

yeah, it's one of those where your SQF error confused the SQF interpreter so much that it fell over.

molten yacht
#

Hmm

#

baffling

#

I'm just trying to pass a thing to TFAR once everyone already has their radios

hallow mortar
#

Yes, but some part of the way in which you tried to do it was highly illegal

granite sky
#

It's usually just some kind of bracket screwup :P

grim cliff
#
switch (getnumber (configfile >> "CfgMagazines" >> currentmagazine player >> "Count" )) do {


case _x<100: {hint "SmlMag"};

case _x>100: {hint "BigMag"};
default { hint "Broken"; };

};
}];

trying to make a switch to execute code base on how many bullets a magazine has by default, but i dont want to list every number from 30 to 500 just to do something for only certain sizes in between.

south swan
#
private _count = ...;
switch (true) do {
    case (_count > 100): {hint "bigBoi";};
...```
molten yacht
#

It's got CBA/TFAR complicating it

hallow mortar
#

Post it (on sqfbin if it's long) along with the full and exact error. If I can't figure it out someone else may be able to, but only if they can see the code

molten yacht
#

I need to run it in RPT mode or something to get the Full And Exact One, don't I

granite sky
#

Please tell me you're not developing with -nologs

molten yacht
#

ok yeah found the checkbox

#

no, I just didn't have -debug on while putting together some casual zeus missions

hallow mortar
#

If you saw the script error on screen, it should have been logged to the .rpt file in %localappdata%\Arma 3

molten yacht
#

ok, I'll check there.

granite sky
#

Not sure if -debug helps with that one but worth a shot.

placid token
#

Only 'think' I had to take special care of when using remoteExec was ensuring that the function used (not command) was defined in the library. Didn't seem to like functions stored in -serverMod / filepatched + pv'ed. Result was just using one scripted function for remoteExec and using a case switch, instead of having a bunch of whitelisted remote exec functions.

molten yacht
#

ok cool I found the full error in the RPT

#

FULL ONPLAYERRESPAWN.SQF: sqf [{call TFAR_fnc_haveSWRadio}, { TFAR_currentUnit = call TFAR_fnc_currentUnit; // so it also works for Zeus private _tf1 = TFAR_currentUnit getVariable ["tfar_t1", false]; private _tf2 = TFAR_currentUnit getVariable ["tfar_t2", false]; [(call TFAR_fnc_ActiveSWRadio), 1] call TFAR_fnc_setSwStereo; // Set primary channel to be in left ear [(call TFAR_fnc_ActiveSWRadio), 2] call TFAR_fnc_setAdditionalSwStereo; // Set additional channel to be in right ear if (_tf1) then { // set alt channel to 3, which is 71 [(call TFAR_fnc_activeSwRadio), 3] call TFAR_fnc_setAdditionalSwChannel; } if (_tf2) then { // set alt channel to 4, which is 72 [(call TFAR_fnc_activeSwRadio), 4] call TFAR_fnc_setAdditionalSwChannel; } if (!_tf2 && !_tf2) { systemChat "Aaaaa you're not in a squad aaaaaaaaaaaaaaaaaaaaaagh"; } }, [] ] call CBA_fnc_waitUntilAndExecute;

#

RESULTING ERROR: ```sqf
22:09:55 [ACE] (common) INFO: Extension version: ace_fcs: 3.8.4-ef4d289
22:09:55 CallExtension loaded: ace_advanced_ballistics (D:\SteamLibrary\steamapps\common\Arma 3!Workshop@ace\ace_advanced_ballistics_x64.dll) [3.12.0-8ddde18]

22:09:55 [ACE] (common) INFO: Extension version: ace_advanced_ballistics: 3.12.0-8ddde18
22:09:55 [ACE] (nametags) INFO: TFAR Detected.
22:09:55 [CBA] (xeh) INFO: [12921,458.879,0] PostInit finished.
22:09:56 [ACE] (common) INFO: Settings initialized.
22:09:56 [ACE] (common) INFO: 14 delayed functions running.
22:09:56 Error: Cannot create custom post effect(type: 5), PE with same priority(400) already exist.
22:09:56 Post process effect creation failed
22:09:56 [Crows Zeus Additions]: Zeus initialization complete. Zeus Enhanced detected.
22:09:56 Fresnel k must be >0, given n=1.4,k=0
22:09:56 โžฅ Context: #(ai,64,64,1)fresnel(1.4,0.0)
22:09:57 CallExtension loaded: task_force_radio_pipe (D:\SteamLibrary\steamapps\common\Arma 3!Workshop@Task Force Arrowhead Radio (BETA!!!)\task_force_radio_pipe_x64.dll) [ย†฿ฌ]

22:09:57 Mission id: f1bb3ec4ba2a23a18d0d8bc1dc0b4f6f05113413
22:09:57 Error in expression <all TFAR_fnc_setAdditionalSwChannel;
}
if (_tf2) then {
[(call TFAR_fnc_active>
22:09:57 Error position: <if (_tf2) then {
[(call TFAR_fnc_active>
22:09:57 Error Missing ;
22:09:57 File C:\Users\Black\Documents\Arma 3\mpmissions\00-TrainingRange.VR\onPlayerRespawn.sqf..., line 12
22:09:57 โžฅ Context: [] L35 (/temp/bin/A3/Functions_F/Respawn/fn_initRespawn.sqf)
[] L197 (/temp/bin/A3/Functions_F/Respawn/fn_selectRespawnTemplate.sqf)

22:09:57 Error in expression <all TFAR_fnc_setAdditionalSwChannel;
}
if (_tf2) then {
[(call TFAR_fnc_active>
22:09:57 Error position: <if (_tf2) then {
[(call TFAR_fnc_active>
22:09:57 Error Missing ;
22:09:57 File C:\Users\Black\Documents\Arma 3\mpmissions\00-TrainingRange.VR\onPlayerRespawn.sqf..., line 12
22:09:57 โžฅ Context: [] L35 (/temp/bin/A3/Functions_F/Respawn/fn_initRespawn.sqf)
[] L197 (/temp/bin/A3/Functions_F/Respawn/fn_selectRespawnTemplate.sqf)

22:09:57 Error in expression <all TFAR_fnc_setAdditionalSwChannel;
}
if (_tf2) then {
[(call TFAR_fnc_active>
22:09:57 Error position: <if (_tf2) then {
[(call TFAR_fnc_active>
22:09:57 Error Missing ;
22:09:57 File C:\Users\Black\Documents\Arma 3\mpmissions\00-TrainingRange.VR\onPlayerRespawn.sqf..., line 12
22:09:57 โžฅ Context: [] L35 (/temp/bin/A3/Functions_F/Respawn/fn_initRespawn.sqf)
[] L197 (/temp/bin/A3/Functions_F/Respawn/fn_selectRespawnTemplate.sqf)

22:09:57 Error in expression <all TFAR_fnc_setAdditionalSwChannel;
}
if (_tf2) then {
[(call TFAR_fnc_active>
22:09:57 Error position: <if (_tf2) then {
[(call TFAR_fnc_active>
22:09:57 Error Missing ;
22:09:57 File C:\Users\Black\Documents\Arma 3\mpmissions\00-TrainingRange.VR\onPlayerRespawn.sqf..., line 12
22:09:57 โžฅ Context: [] L35 (/temp/bin/A3/Functions_F/Respawn/fn_initRespawn.sqf)
[] L197 (/temp/bin/A3/Functions_F/Respawn/fn_selectRespawnTemplate.sqf)

22:09:57 Error in expression <-TrainingRange.VR\onPlayerRespawn.sqf"

[{call TFAR_fnc_haveSWRadio},
{
TFAR_cur>
22:09:57 Error position: <[{call TFAR_fnc_haveSWRadio},
{
TFAR_cur>
22:09:57 Error GIAR pre stack size violation
22:09:57 File C:\Users\Black\Documents\Arma 3\mpmissions\00-TrainingRange.VR\onPlayerRespawn.sqf..., line 2
22:09:57 โžฅ Context: [] L2 (C:\Users\Black\Documents\Arma 3\mpmissions\00-TrainingRange.VR\onPlayerRespawn.sqf)

22:10:03 ["TFAR_SendRadioRequest",["TFAR_anprc152"],0.031,5.045]
22:10:03 "TFAR_RadioRequestEvent [[""TFAR_anprc152""],gm_player] 466.476"
22:10:03 "Send TFAR_RadioRequestResponseEvent [1] 466.477"
22:10:03 ["TFAR_ReceiveRadioRequestResponse",[1]]

granite sky
#

You're missing a then

molten yacht
#

...is that all??

#

I don't think it works even without the third if-statement

#

but I'll check

granite sky
#

Nah, few semicolons too.

molten yacht
#

ok so do you need a semicolon after every if()then{}; ?

#

I'm being confused by having scripted in like 3 other languages

granite sky
#

You need a semicolon after every close bracket that's not immediately followed by another close bracket.

molten yacht
#

Okay, I'll try that.

#

Is this also true for cfgRespawnInventories and the like?

granite sky
#

Config is different syntax.

hallow mortar
stable dune
#
If (!_tf2 && !_tf2) then {
...
}

Missing too ; and is there reason why check same 2 timez

molten yacht
#

so later I would replace that with a Switch statement

#

but I'll be similarly careful with ; on the switching statement

#

that did fix it I think tho

hallow mortar
granite sky
#

and yeah, commas are fine too :P

molten yacht
#

I'm so used to stuff like C# where you don't ; after }

granite sky
#

It's kinda odd in SQF because { } actually declares a code data type.

molten yacht
#

it hwat

hallow mortar
#

; in SQF is not specifically related to }, it just means "end of this instruction, next bit is separate". } usually has one because it's usually at the end of an instruction, but not always

molten yacht
#

Hokay I'm gonna give this a try.


[{call TFAR_fnc_haveSWRadio},
  {
    TFAR_currentUnit = call TFAR_fnc_currentUnit; // so it also works for Zeus
    private _tf = TFAR_currentUnit getVariable ["tfar_squad", 0];
    [(call TFAR_fnc_ActiveSWRadio), 1] call TFAR_fnc_setSwStereo; // Set primary channel to be in left ear
    [(call TFAR_fnc_ActiveSWRadio), 2] call TFAR_fnc_setAdditionalSwStereo; // Set additional channel to be in right ear
    switch (_tf) do {
        case 0: {systemChat "You are Zeus or some other #0 person, setting your alt to 73"};
        case 1: {systemchat "Radio configured for Fireteam 1 (Alt=70)";
                [(call TFAR_fnc_activeSwRadio), 1] call TFAR_fnc_setAdditionalSwChannel;  };
        case 2: {systemchat "Radio configured for Fireteam 2 (Alt=71)";
                [(call TFAR_fnc_activeSwRadio), 2] call TFAR_fnc_setAdditionalSwChannel;  };
        default: { systemchat "You aren't in a recognized squad, so I didn't set your additional channel."};
    };
  },
  []
] call CBA_fnc_waitUntilAndExecute;```
granite sky
#

In most languages } is an implicit end-of-expression because they don't have the form { } command

#

default syntax is wrong, shouldn't have a colon.

molten yacht
#

oh, ok

#

just default {code}; ?

hallow mortar
# molten yacht it _hwat_

A Code data type is kind of like a string, but for code. It says "don't process this yet in the immediate context, just collect it in its entirety ready to use". That's why it's used for the switch cases, for example - it lets the code exist without being actually executed unless the case is chosen.

#

(Sometimes it is then immediately executed in the current context, by the command you feed it to, but you can save it for later as well)

zealous heath
#

anyone know how to fix disapearing slots?
because on a hosted game it works, but as soon as I put the mission in my server they do a dissapearing act

zealous heath
#

found the offender, friggin ;

molten yacht
#

Any idea of what to put into a trigger's activation field to set all the groups in it to be Aware, when by default they're careless?

#

Would {_x setBehaviourStrong "AWARE";} forEach thisList do it?

zealous heath
#

NVM, THEY STIL GONE REEEEEEEEEEEEEE

zealous heath
fair drum
#

whats your respawn settings in description

warm hedge
#

Are you sure is not a Modded Unit's iffy?

zealous heath
zealous heath
little raptor
#

Does your server have all the mods set up properly?

#

Check the rpt

zealous heath
#

Yes, I tripple checked, found a wrongly placed ; then tried again, slots still gone

little raptor
#

Can you post your server rpt nonetheless?

zealous heath
#

Ye, you mean the @prime jayd thingy right?

little raptor
#

The what?

wicked roostBOT
#
Arma RPT

Arma generates a .rpt log file each time it's run, which contains a lot of information like the loaded mods, or any errors that appear, this log file can be very useful for troubleshooting problems.

To get to your RPT files press Windows+R and enter %localappdata%/Arma 3

Additionally see the wiki page for more info: https://community.bistudio.com/wiki/Crash_Files

To share an rpt log here, please use a website like https://sqfbin.com/ to upload the full log, that way the people helping you can take a look at it and try to figure out the problem you're having together with you.
Note: RPT logs can hold personal information relevant to your system, the game or others.

zealous heath
#

can't find it in my server, there is configstore, connection logs, content log and stats_log, I am in vc, may be easier if I screenshare

little raptor
hallow mortar
#

Disappearing slots sounds a lot like mod mismatch, particularly if they're all disappearing.

zealous heath
stray jacinth
#

does anyone know how to get a jet to target another jet, then land itself after shooting down the target?

#

actually i know how to do the 2nd part

#

but i dont know how to do the first

#

nvm i think i got it

molten yacht
#

I wish there was some way to make a helicopter tougher but not invincible

#

without a mod

stark fjord
stark fjord
#

Like have a variable heliHealth=10000; and while heliHealth>0 just return 0 in above mentioned handleDamage EH.

#

Just make sure your EH is last

molten yacht
#

I gotta figure out how this works in the morning, the wiki has no examples...

winter rose
#

good thing documentation words explain how it works ๐Ÿ˜„

little raptor
#

actually you need to use the current damage ๐Ÿ˜“

#
this addEventHandler ["HandleDamage", {
  params ["_unit", "", "_damage", "", "", "_hitIndex"];
  private _currentDmg = if (_hitIndex < 0) then {damage _unit} else {_unit getHitIndex _hitIndex};
  private _takenDmg = _damage - _currentDmg;
  _currentDmg + _takenDmg * 0.5;
}];
#

the above code will halve the damage you take

molten yacht
#

Will that work on a vehicle?

little raptor
#

yes

manic sigil
#

Do you still need to return _damage at the end, or am I recalling a fever dream?

#

Or i guess _currentDmg in the above case

stark fjord
#

He is returning it

#

Last line isnt saved into any variable

manic sigil
#

Ah, I see now.

true frigate
#

I learnt a fun lesson in scripting. If you have to use remoteExec to play sounds and run a script, use them differently.

Had a script that played sounds and also spawned 2 explosions - so to make sure the sounds would work for all 9 players on the server, I used 0 for the 'targets' to execute it on every device.
Now imagine my surprise when 18 explosions spawned instead of 2, before I realised that I had made a serious fuck-up

#

Of course, this never appeared in my testing - because I was the only one on the server

stark fjord
#

Or you can, within same script

Obj playSound ...;
if (isServer) then
{
//spawn explodar
};
```and remoteExec it with 0
manic sigil
#

Sometimes the easiest answer to locality is 'screw it, YOU figure it out if youre so clever'

true frigate
#

I might have to start doing that as failsafes, because I will make this mistake again

manic sigil
#

Also good for anything you put in an objects Init field, since that gets run every time someone connects (iirc)

sweet zodiac
#

Objects init field is good for addActions, since you dont have to do it manually for everyone

cyan dust
#

getPosATL measures from model 'feet", getPosWorld from some model point. How do I get delta between those? Considering there is no chance that terrain underneath is at ASL 0

stray flame
#

quick and dumb question

stray flame
#

is this how you do it right?

#

with the expression on vehicle respawn

winter rose
stray flame
#

the wiki really didnt give much for examples

winter rose
stray flame
winter rose
winter rose
stray flame
#

yeah just noticed

#

lmao

#

but I doubt its just that

warm hedge
#

passed arguments
means _this

cyan dust
winter rose
#

muscle memory