#arma3_scripting

1 messages Β· Page 107 of 1

meager granite
#

post errors

ornate whale
#

Not sure, I need some persistent space for vars to store between player respawns. Like for loadout. I don't know how to access such space via commands, eg. in onplayerkilled script.

fair drum
ornate whale
#

So far I have been doing it in a way that I store that loadout array withing the unit's (object's) namespace.

#

So I have to pass it from the old unit to the new unit.

ornate whale
#

If a unit dies, I don't know how to extract that player information from it.

fair drum
#

tell me exactly what you want and I can show an example

ornate whale
#

Unit dies, I want to get the player which possesses the unit, and save the loadout on the dead body to his namespace. When a new unit respawns, I will get the unit's owner again, read the saved loadout var in his namespace, and overwrite the default spawn loadout with the saved one.

granite sky
#

Loadout on dead body won't include primary & secondary weapons so I'm not sure that's what you want to do.

#

(non-sidearm weapons get dropped on death)

fair drum
#

you could create an EntityKilled event handler and a function that is written locally, (include the contents of the nearest ground weapon holder) and you can remoteExec that from the EntityKilled event handler using the target param and owner _unit. The event handler should only exist on server.

ornate whale
#

The owner _unit is the same as player's profile?

fair drum
ornate whale
#

Is there a way how to do it from server without remote calls, that seems as unnecessary to me?

fair drum
#
// Event handler on server
addMissionEventHandler ["EntityKilled", {
    params ["_unit", "_killer", "_instigator", "_useEffects"];

    if (!isPlayer _unit) exitWith {};

    [] remoteExec ["RAM_fnc_saveLoadout", owner _unit];
}];

// RAM_fnc_saveLoadout in CfgFunctions

/*
    some stuff for grabbing stuff
*/

profileNamespace setVariable ["RAM_loadout", _someVar];
fair drum
ornate whale
granite sky
#

Is this actually "between player respawns" or "between server restarts" or "between client reconnections"...

#

Because you don't need any profileNamespace stuff for the first one.

fair drum
#

i think he wanted it persistent between missions

granite sky
#

Or the last really.

ornate whale
fair drum
#

oh i was thinking you wanted it "persistent" which means between any mission to me

fair drum
ornate whale
#

I thought that onPlayerKilled script is executed on server.

fair drum
#

nah I use it for insta black screen/gurgle death sounds. its local.

ornate whale
#

Thanks guys @fair drum @granite sky

tough abyss
#

is there anyway to compile code inside the init box of an object?

#

or just have the code execute in the init box of an object without the commands etc being readable text

granite sky
#

Readable to who?

tough abyss
#

anyone viewing the objects init the object with its init being posted to steam as a comp

tribal sinew
#

You mean obfuscate the code so its not readable?

tough abyss
hallow mortar
#

Code contained entirely within the init field and published through the Steam-based compositions system? No, there's no way to obfuscate that.

tough abyss
#

anyway to obfuscate code in mission files?

simple trout
#

no

hallow mortar
#

You can try using the option to binarise the file when exporting it. I believe there is some way to reverse this, but at a glance it's not very human-readable.

sullen sigil
#

obfuscating code is a pointless exercise

tough abyss
#

i just wish for code to be non readable notlikemeow

sullen sigil
#

why

tough abyss
#

competitors stealing code

sullen sigil
#

if people care that much they will manage to reverse engineer it

#

just submit dmcas when your content is stolen if you care that much

#

obfuscation will not prevent your work being stolen

tough abyss
#

not mods but i guess it'll just happen

sullen sigil
#

and also, if your code is in the init box of an object, chances are its too generic to hold any weight for being stolen too -- if thats not the case, you really shouldn't be running the code in the init field

hallow mortar
sullen sigil
#

probably shouldnt be in the composition format if its that complex 🀷

next kraken
#

is there any way to disable that the AI will fall to ground if a car rams it ?

queen cargo
#

it was sarcasm to show you clearly that what you want to do is litteral BS ...
however, if you insist ... its fairly simple tbh

	params ["_str", "_toFind", "_toReplace"];
	private ["_flag", "_retStr"];
	_flag = 0;
	_retStr = [];
	_toFind = toArray _toFind;
	_toReplace = toArray _toReplace;
	_str = toArray _str;
	_tmp = [];
	{
		if(_x == _toFind select _flag) then
		{
			_flag = _flag + 1;
			_tmp pushBack _x;
			if(_flag >= count _toFind) then
			{
				_retStr append (_tmp select [0, count _tmp - _flag]);
				_retStr append _toReplace;
				_flag = 0;
				_tmp = [];
			};
		};
		false
	} count _str;
};

["foo""bar", """", "ESCAPE"] call replace;```

just wrote it down quickly
should be working, could be wrong so do not nail me down on it (also not the most performant code btw.)
jade acorn
#

so essentially disable physx? Yes it's possible, I know that you can do that through config, dunno about scripting (you can disable the collision but then vehicle will just phase through it iirc).

#

https://forums.bohemia.net/forums/topic/223702-disable-hit-animations/ here's an extensive list of all the physx config stuff.

kindred zephyr
#

Is it possible to get the damage given by a directHit but in the hitPart eventHandler instead of handleDamage?

I understand that they are not fundamentally used for the same purpose but I need the info given by the velocity vector in hitpart in the same frame if possible

edit: ah nvm, again my blindness negated me the fact that ammo gives that meowsweats

fleet sand
#

Anybody knows why does this return default ?

LEG_ReturnAnim = {
    /*
    [player] call LEG_ReturnAnim;
    return:
    "AmovPercMevaSnonWnonDf"
    */
    params ["_unit"];
    private _weapon = currentWeapon _unit;
    private _Anim = switch {true} do {
        case (_weapon isEqualTo ""): {"AmovPercMevaSnonWnonDf"};
        case (_weapon isEqualTo (handgunWeapon _unit)): {"AmovPercMevaSlowWpstDf"};
        case (_weapon isEqualTo (primaryWeapon _unit)): {"AmovPercMevaSlowWrflDf"};
        case (_weapon isEqualTo (secondaryWeapon _unit)): {"AmovPercMevaSlowWlnrDf"};
        case (_weapon isEqualTo (binocular _unit)): {"AmovPercMevaSlowWlnrDf"};
        default {"you fucked Up"};
    };
    _Anim;
};

systemChat format ["%1",[player] call LEG_ReturnAnim];
warm hedge
#

In which situation?

fleet sand
#

In all of them it always return default. No matter what player has in hands.

warm hedge
#

Ah I've found the issue

#

switch {true} do { -> switch (true) do {

fleet sand
hardy valve
#

Can someone share with me a working anti-AFK kick script for a public server? Something to warn and eventually kick a player after afk for 30 min. I asked server admin for official servers about theirs but he tends to never respond which is fine - prob busy. But if anyone knows of one to share it would be greatly appreciated

meager granite
#

Wish there was HandlePreDamage that gets fired at shooter side BEFORE damage gets sent to reciever (and over the network if remote)

sweet jungle
#

anybody know which SQF file related to these animationsources used in stryker_m1126 form RHSUSAF? i want to display a minimap on a object, use UVanimations to move /rotate the map, just like the gunner BFT of rhsusf_stryker_m1126_m2, but i did not find the sqf to connect vehicle's location to these animationsources

#

it must be some RHS guys in this discord

drowsy geyser
#

im trying to get the nearest door to the player this is my code but it doesnt work can someone please correct it for me?

[] spawn
{
    // Get the nearest building to player
    _house = nearestBuilding getPosATL player;

    // Get the selection names of the nearest building
    _buildingSelections = selectionNames _house;

    // Initialize arrays to store information about doors
    _doors = [];

    // Loop through the building's selections and filter doors
    {
        // Check if the selection name contains "door" and "handle" is not in the name
        if (_x find "door" >= 0 && _x find "handle" < 0) then
        {
            // Get the world position of the selection
            _selectionPosition = _house selectionPosition _x;

            // Store information about the doors
            _doors pushBack _x;
        };
    } forEach _buildingSelections;

    // Sort the doors by distance to player in ascending order
    _sortedDoors = [_doors, [player], {player distance _x}, "ASCEND"] call BIS_fnc_sortBy;

    // Check if there are sorted doors
    if (count _sortedDoors > 0) then
    {
        // Get the position of the first (nearest) door
        _nearestDoor = _sortedDoors select 0;
        
        // Place an arrow at the position of the first door
        _arrow = "Sign_Arrow_Yellow_F" createVehicleLocal [0,0,0];
        _arrow setPosATL ((_house modelToWorld _nearestDoor) vectorAdd [-0.5, 0, 0]);
    };
};
meager granite
#

*ChatGPT's code

drowsy geyser
manic kettle
#

I've never played with building commands so I can't say, but the process makes sense.
You'll need to use the debug menu to test each leg of the code one at a time. See if it stores each variable correctly.

#

Just saying "fix it" providing no context isn't going to get much answers. But people will help you with specific questions

stable dune
# drowsy geyser im trying to get the nearest door to the player this is my code but it doesnt wo...
private _house = cursorObject;
private _doorNames = selectionNames _house select {_x find "door_" != -1 && _x find "handle" == -1};
private _positions = _doorNames apply {_house modelToWorld (_house selectionPosition _x)}; 
private _sortBy = [_positions, [player], {player distance _x}, "ASCEND"] call BIS_fnc_sortBy;
private _sign = "Sign_Arrow_Yellow_F" createVehicle [0,0,0];
_sign setPosATL (_sortBy #0);
hollow plaza
#

I'm currently working on a script with the main function of getting the server a variable that can seemingly only be returned locally using currentNamespace (or using other namespaces, but this one works just as well), but I feel that there must be a way more efficient way of getting the server an otherwise locally stored variable instead of doing it such a roundabout way.

Here's what the script currently looks like, this is stored in initServer.sqf as it is executed when a player disconnects (alongside a myriad of other things). fnc_saveKSS isn't fully finished, but it basically just saves the given data.

{
  _UID = getPlayerUID player;
  _hunger = currentNamespace getVariable "KSS_hunger";
  _thirst = currentNamespace getVariable "KSS_thirst";
  [_UID, _hunger, _thirst] remoteExec ["fnc_saveKSS", remoteExecutedOwner];
} remoteExec ["call", _unit];
#

There isn't necessarily anything wrong this, but for the sake of the future this just feels like an incredibly inefficient way of doing it

#

I suppose I could just use publicVariableServer to broadcast the variables onto the server and get them that way, I just hope there won't be issues when multiple people disconnect or whatnot

meager granite
#

Your approach looks fine, except you're sending whole code block each time to each player

#

Call a function that exists on clients instead

#

Just a more proper way to do it

#

fnc_requestKSS or something

#

also remoteExecCall

#

publicVariableServer will be fine too but its an old way of doing it, remoteExec is a modern approach

#

On a side note, can you remoteExec from client to a client? I think so, but I'm unsure for some reason. πŸ€”

tender fossil
#

Is it possible to retrieve remote object's owner's network ID directly on another client nowadays? Or do I have to send the object reference variable to server and use owner command there

hollow plaza
# meager granite also `remoteExecCall`

Calling it in an unscheduled environment ensured that the code doesn't go forward before the remoteExecCall'd part is fully done, wasn't that how it worked

#

I had already forgotten about the difference, but I'll definitely need to implement that into a lot of my other scripts regardless

proven charm
meager granite
tender fossil
#

Roger! Thanks for the info to both of you πŸ‘

granite sky
ornate whale
#

What is the relation between the "Skill" attribute and all the sub-skills, like "general"? How do I set "Skill" via command?

hallow mortar
ornate whale
hallow mortar
#

I mean, it does answer how to set the skill using a command.
It also contains a link to this, which explains in more detail. https://community.bistudio.com/wiki/Arma_3:_AI_Skill
It looks like the skill slider and the General subskill are the same thing, and the General slider just controls the level of all subskills unless a subskill is given a specific override.

ornate whale
#

Even on BIKI there is no clear explanation:

#

It mixes the terms of a raw "Skill" and a "general" sub-skill into one.

kindred zephyr
hallow mortar
ornate whale
# hallow mortar They're just the same thing. Skill slider controls the general subskill which is...

So after some testing, I find out this:

  1. "Skill" slider in eden editor sets all sub-skills to one even level unless a particular sub-skill is manually overriden.
  2. The command "unit setSkill value" sets all sub-skills to even level, when no specific skill is provided, the same as the eden "Skill" slider.
  3. General sub-skill should somehow affect the other sub-skills, but who knows how. It is supposed to be the main skill for all.
  4. All sub-skills are interpolated based on relevant CfgAISkill values, resulting in a sub-skill "finalSkill" value.
  5. And all finalSkill values are affected by the difficulty settings in the player's profile. Where, roughly, 0.5 skill value (in difficulty settings) means no change to the final values. 0.75 skill means double the value. And 1 means triple the value. But maximal finalSkill value is always capped at 1.
exotic tinsel
#

Hi all,
I am trying to create a Thunder Run mission with AI but I am having some issues.
I can get the AI to drive properly if I put all the drivers in a group that is set to carless.
However they wont move once I put other crew in the commander and or the gunner seat.
Any way to force them to move if there are other group members occupying those seats?

tough abyss
#

How do I script a container, add a uniform, spawning a soldier.

#

?

tulip ridge
tulip ridge
#

Is there a way to check if a vehicle has the "jet" hud? Only appears when the engine is on, etc.
Can't really think of a good way to describe it

tough abyss
#

So, you put a uniform in the container and it spawns a soldier.

tulip ridge
#

I think there's an event handler for an object's inventory changing?
Don't fully remember off the top of my head, will need to check

tough abyss
#

So, for the condition in the trigger, I used the script addItem.

#

I'm thinking it has to be a specific item added before the trigger operates, but the units spawn despite my trigger having a condition.

kindred zephyr
#

is there any page in wiki that explains how damage overflow to other hitpoint after one of them is dead (1)?

From what i can see hitHead and hitBody are the only fatal ones when dead (1) while others "seep" into hitBody and incapacitated hitpoints

wanton swallow
#

Is it possible to activate voice chat from SQF?

granite sky
#

@kindred zephyr hitBody is something like the maximum of the four specific body hitpoints, while IIRC hitHead is a real hitpoint but also maxed by hitFace and hitNeck.

#

So 1+ in any of the body or head hitpoints is fatal.

#

Order of resolution however is very, very odd.

kindred zephyr
#

yeah, there comes a moment when damage returned by the commands stop being useful haha. Good to know that "body" is the actual health

granite sky
#

The general damage is separate again, I think.

#

So if you kill a unit with limb shots it dies without hitBody or hitHead changing.

kindred zephyr
#

yeah, which seems to be the one called incapacitated

#

or maybe not hmm, looks like if you +1 in the last "incapacitated" hitpoint it doesnt matter where you are shoot you die

#

maybe dedmen could clarify? it doesnt seem to be any mention to hitBody in the recent years besides config

granite sky
#

incapacitated is a separate hitpoint.

#

It's another composite one with a funny formula. You can see it in config.

opal zephyr
#

I'm trying to evaluate code blocks inside an if statement and its not working. I swear ive done this before but I cant figure out what im doing wrong this time.
Example code:

_condition1 = 
{
  if (blah blah) exitwith {true};
  false;
};

If (_condition1) then{};

It just errors and says its expecting a boolean, not code

warm hedge
#

You need to call _condition1

opal zephyr
warm hedge
#

You can have if (call _condition1) then and you're good to go

#

This is how it is

opal zephyr
#

ah perfect

#

thankyou

warm hedge
#

Also, one thing to add: you're converting a boolean into a boolean which is unecessary

#

I don't know what is the code you actually have but no need to if or exitWith

meager granite
#

Can there be HandleDamage EH firing from some damage without overall damage (hit_index = -1) being fired too?

#

From my tests hit_index = -1 always fires no matter what you damage, but maybe I'm missing something

warm hedge
#

So you mean, is there any possibility to have no getDamage update but only a part of it, besides a scripted damage?

meager granite
#

Yes

warm hedge
#

Good question πŸ€”

meager granite
#

From my tests for any kind of damage, HandleDamage always fires for overall damage too (hit_index = -1), even if damage is 0

#

But maybe I'm missing something and it is possible

warm hedge
#

I... think some damage class can have no "penetration" damage

#

You may want to check Damage article or whatever its called, if you haven't already

meager granite
#

I did, but couldn't find any relevant info

warm hedge
#

Which vehicle or whatever you test on? Or "any"?

meager granite
#

Last test was with a helicopter, but seem to happen on other too

neon lynx
#

Hi,
would ask if there is a script command that the AI comes to the player, play the bandage animation and heal the player in field? Like the heal command from the "AI command menu"?

neon lynx
#

Edit: forget it. I found this:
https://www.youtube.com/watch?v=ieO50Zu1rWY

A short and simple video demonstrate a script for AI Medic to auto heal any injured team members. The scripts use in this video are:

Named your group:
team_1 = group this;

medic auto heal script:
[] spawn { while {sleep 1; alive medic_1} do {{ if (damage _x *symbol of greater than 0) then { medic_1 action ["healsoldier", _x]}} forEach units te...

β–Ά Play video
vivid bridge
#

Could you please give me an example script on how to make a random bot surrender?

_killer selectRandom [b1,b2,b3];
@(player distance _killer < 10);
_killer setcaptive true;
_killer action ["surrender",..........????????

wise frigate
#

Anyone able to give me some pointers on how to pass some Args through a remoteExec
The remoteExec is executed by a player by keypress on CursorTarget, but I want to pass through the actual player who executed the remoteExec to within the function so that I can reference the "Executor" within the Script that is executed on CursorTarget

warm hedge
warm hedge
vivid bridge
wise frigate
#

For sure,

So I am king a script where a player, who is close enough to another (Target) player (2m), will be able to press a key, which will then execute a script on the target player. The below function is called on CBA Keybind

NotifyTargetFunc = 
{
    _target = cursorTarget;
    
    if (_target isKindOf "CAManBase" && {alive _target} && {(player distance _target) < 2} && {!(_target getVariable ["ACE_isUnconscious", false])}) then 
    {
        if (NotifyType == 1) then 
        {
            [[],ABC_fnc_TargetScript] remoteExec ["call", cursorTarget];
        };
};
//ABC_fnc_TargetScript//

if (alive player) then 
{
    addCamShake [1, 0.5, 5];
    hintSilent parseText format["<t size='1.0' font='Zeppelin33' color='#3b378c'>NOTIFY</t>"];
};
#

Would there be a better way to execute on a target player than using CursorTarget, because for some reason when this is run, it sometimes executes on multiple players

warm hedge
vivid bridge
warm hedge
wise frigate
#

Sure

warm hedge
#

Then have sqf [[player],ABC_fnc_TargetScript] remoteExec ["call", cursorTarget];and have sqf params ["_whoTapsYou"]; or something in the function so _whoTapsYou or whatever you name tells your player

wise frigate
#

Gotcha,
Do you think there is a better way to execute it other than on CursorTarget?

warm hedge
#

Not really. There is a way to detecting nearest player and which direction you look or somehow to tell who is infront of you, but basically cursorTarget is easiest way

wise frigate
#

Gotcha, but does CursorTarget only select one "Target" or does it select several?

warm hedge
#

One, always one

wise frigate
#

Gotcha

#

Alright thanks, that's all I needed!

tribal sinew
#

im having trouble with debugging my script after it failed to fully work on a dedicated server

the script is called from a server-only trigger:
execVM "scripts\applyFogAndShake.sqf";

aaand the content is:

[48, [0.029, 0.09, 240]] remoteExec ["setFog", 0];

48 remoteExec ["PP_fnc_setPostProcessingBloody", 0, true]

sleep 50;

for "_i" from 1 to 6 do {
    [["fogEntrance", 1]] remoteExec ["playSound"];
    [[10, 10, 30]] remoteExec ["addCamShake"];
    sleep 12;
};

sleep 30;

48 remoteExec ["PP_fnc_setPostProcessingClear", 0, true];

[48, [0.001, 0.09, 240]] remoteExec ["setFog", 0];

So both the setFog and PP_fnc_setPostProcessingBloody work perfectly fine but the for "_i" from 1 to 6 do loop doesn't execute at all (works fine in the editor).

Any ideas thinking ?

edit: no errors present, just no effect

vivid bridge
#

how do I change this to randomly surrender a unit?

not the whole group, but one of five units, for example?

{
[_x] spawn {
params ["_dude"];
_weapon = currentWeapon _dude;
_dude removeWeapon (currentWeapon _dude);
sleep .1;
_weaponHolder = createVehicle ["WeaponHolderSimulated", [0,0,0],[],0,"Can_collide"];
_weaponHolder addWeaponCargoGlobal [_weapon,1];
_weaponHolder setPos (_dude modelToWorld [0,.2,1.2]);
_weaponHolder disableCollisionWith _dude;
_dir = random(360);
_speed = 1.5;
_weaponHolder setVelocity [_speed * sin(_dir), _speed * cos(_dir),4];
};
_x setcaptive true;
_x action ["surrender", _x];
} foreach units gr1;

warm hedge
#

Where is the origin of the script?

tribal sinew
#

thats a question for me or nikolay πŸ˜… ?

warm hedge
#

nikolay. I almost always use reply if there is some posts between

warm hedge
vivid bridge
warm hedge
#

You're replying to the post that answering canadian not you

tribal sinew
wise frigate
#

@warm hedge
Sorry for the ping,
Any chance you could help me out a little with this next part
Lets say I want to add a second distance check within the executed script between the player and target

//ABC_fnc_TargetScript//
params ["_Executor"];

if (alive player) then 
{
    addCamShake [1, 0.5, 5];
    hintSilent parseText format["<t size='1.0' font='Zeppelin33' color='#3b378c'>NOTIFY</t>"];
};

How could I achiev that here? Obviously I would pass through the param but how could I get the distance between the passed param and the "target"

warm hedge
#

β€œtarget” is player here no?

vivid bridge
# warm hedge β€œtarget” is `player` here no?

let me tell you what I want to do?

I want one of the five units to randomly surrender. (randomly)

The surrender condition should have a distance between the player and the random unit.

Is it possible to do this?

wise frigate
#

Should be

warm hedge
warm hedge
wise frigate
#

Gotcha, Thanks

kindred zephyr
#

alternatively you could use nearestObjects and get the info you need, but distance is much more simpler and direct for what you want

quaint oyster
#

I need some assistance, I thought it would be simple but I'm trying to remove an item from a container via aiming at it and through the console.

I've tried;

cursorobject removeMagazine "type";
cursorobject removeMagazines "type";
cursorobject removeMagazineGlobal "type";

I can't get them working, is there something I'm missing? Remote execution maybe?

quaint oyster
#

I got the adding okay but I can't get a specific item or any item rather to remove from a container or a vehicle or a ground holder.

#

I can get everything to remove however

warm hedge
#

Check the article carefully. There is a way to remove

quaint oyster
#

I'll try that

#

jeez, I've been getting my *** beat for several hours by being unable to solve that

#

thank you @warm hedge

#

I shoulda came here sooner

vivid bridge
# warm hedge https://community.bistudio.com/wiki/addMagazineCargoGlobal

_killer selectRandom [b1,b2,b3]
@(player distance _killer < 10)
_killer addWeapon ""
_killer addHandgunItem "";

I want to do something like this. I've done it with civilian units.
When I get close to one of the listed units, one of these civilian units becomes randomly an enemy unit, it gets a weapon and starts shooting at me. but now I want to do the opposite so that I come within 20 meters would be activated randomly on a certain unit to which I come within 20 meters so that he surrenders. so that he drops his weapon and everything.

kindred zephyr
#

its a recent command change, its comprehensible

warm hedge
lyric schoonerBOT
#

stop using 'setPos' for the love of god notlikemeowcry
Leopard20; Tuesday, 10 August 2021

kindred zephyr
#

oh lol

#

not that o e

tribal sinew
# warm hedge What if you have, like `hint` or `systemChat` for debug to make sure the `for` i...
for "_i" from 1 to 6 do {
    "Before sleep!" remoteExec ["hint"];
    [["fogEntrance", 1]] remoteExec ["playSound"];
    [[10, 10, 30]] remoteExec ["addCamShake"];
    sleep 12;
    "After sleep!" remoteExec ["hint"];
};

Changed the loop but still no luck. Whats interesting is that the script actually runs once I exec it from the developer console as server exec BUT it seems to totally skip the sleep part.

warm hedge
#

So the hint does work?

tribal sinew
warm hedge
#

And in latter case it skips sleep?

tribal sinew
#

yep, exactly magic

warm hedge
hallow mortar
#

execVM creates a scheduled environment though

lyric schoonerBOT
#

stop using 'setPos' for the love of god notlikemeowcry
Leopard20; Tuesday, 10 August 2021

tribal sinew
kindred zephyr
#

oh wtf

#

again?

warm hedge
hallow mortar
vivid bridge
hallow mortar
#

(I mean I know it doesn't, so something doesn't add up I guess)

warm hedge
tribal sinew
#

im using Leopard's advanced dev tools, so maybe it's different meowsweats

tribal sinew
vivid bridge
warm hedge
tribal sinew
#

yeah, Linux

#

locally it works fine

warm hedge
# vivid bridge No, it's not my script. I got it off YouTube.)))).

Okay, first thing first and was the first thing I've told you but you should to use an SQF not SQS. SQS is obsolete and should be done in SQF.
Second, please define what exactly is the goal. I thought your goal is to make someone surrender but you recently said you have different goal.

vivid bridge
warm hedge
#

20 secs? I guess yes

drowsy geyser
kindred zephyr
hallow mortar
#

Is there a way to make a radio channel's label appear in the "currently speaking" popup?
You can use radioChannelSetCallsign to make it appear on text chat messages, but that doesn't affect the speaker indicator.

quaint oyster
quaint oyster
#

thanks, i never knew the alternative syntax for these

tribal sinew
#

48 remoteExec ["PP_fnc_setPostProcessingBloody", 0, true]

#

is missing ; ................

stable dune
fair drum
# tribal sinew is missing `;` ................

It's good to have your server's rpt file readily available when you start using lots of remote exec. You won't see the error otherwise. This definitely would have thrown a script error on the dedi rpt

#

It should have even thrown an error in the editor as well

tribal sinew
tribal sinew
fair drum
#

Do you have script errors turned on in the launcher?

tribal sinew
#

Yep

#

Whats even more funny, the script did work in the editor

unborn rivet
#

I use a script in a trigger to spawn AI. AI will spawn when the player gets into the set area of the trigger. How do I de-spawn AI when the player leaves the trigger set activation area?
Kind Regards.

grizzled cliff
#

implemented pseudo-static members

#

:: operator accesses a objects prototype method/members

#

its essentially shorthand for _obj.__prototype

drowsy geyser
# stable dune Hi, I have so little knowledge of getting object LOD and bounding boxes and some...

Thank you, i found this maybe its useful but its way beyond me
https://forums.bohemia.net/forums/topic/234172-getting-whether-door-opens-inward-or-outward/

fair drum
granite sky
unborn rivet
granite sky
#

If you're using the same trigger for spawn & despawn then you could just setVariable on the trigger object.

#

If it's different triggers but the same marker then you could use the marker as a hashmap key.

vivid bridge
#

Could you please advise me on the last question? How to make any bot from my group come to the opponent (bot1, bot2,bot3) run a script to capture a random bot?

granite haven
#

how does one disable the scientific notation of large numbers?

#

im ptting a number in a structuredtext but i dont want it to go in scientifc notation just full

granite haven
digital hollow
wintry sentinel
#

base

vivid bridge
# digital hollow You can add a check to the start of the surrender code with your desired logic. ...

Can you help me edit this, please?

{
if (
_forEachIndex > 1
&& {random 1 > 0.5}
) then {continue;}
{
[_x] spawn {
params ["_dude"];
_weapon = currentWeapon _dude;
_dude removeWeapon (currentWeapon _dude);
sleep .1;
_weaponHolder = createVehicle ["WeaponHolderSimulated", [0,0,0],[],0,"Can_collide"];
_weaponHolder addWeaponCargoGlobal [_weapon,1];
_weaponHolder setPos (_dude modelToWorld [0,.2,1.2]);
_weaponHolder disableCollisionWith _dude;
_dir = random(360);
_speed = 1.5;
_weaponHolder setVelocity [_speed * sin(_dir), _speed * cos(_dir),4];
};
_x setcaptive true;
_x action ["surrender", _x];
} foreach units gr1;

wary sandal
#

can I disable the aerial shot (with "SITREP" on the top left of the screen) when you die?

#

i'd like to end my mission with BIS_fnc_endMission and not with some UAV circling around your body

unkempt bay
#

Hello there,

I am looking for the function that trigger a cargo parachute on falling vehicles and crates. I'd like to trigger it from an addAction since the parachute does not trigger itself when there is a player inside.

As Zeus, when you put a vehicle in some altitude, the cargo parachute spawn by itself.
so I assume there is a way to trigger it manually ?
Thanks for any tips πŸ™‚

still forum
digital hollow
wary dust
#

Hola chicos. A ver si me puedes ayudar.
A ver si me explico.
Como puedo hacer lo siguiente, que llevo dΓ­as y no hay manera de encontrar la soluciΓ³n.
Un grupo llamado Romeo1_1 con diferentes soldados. El lΓ­der es R_1 IA y el jugador es R_6
En un momento dado (cuando la zona ya estΓ‘ limpia de enemigos) R_1 tiene que ordenar al jugador que ponga las cargas en Objetivo.
Hi guys. Let's see if you can help me.
Let me see if I can explain.
How can I do the following, I've been doing it for days and there is no way to find the solution.
A group called Romeo1_1 with different soldiers. The leader is R_1 AI and the player is R_6.
At a given moment (when the area is already clear of enemies) R_1 has to order the player to set the charges on Objective.
I don't succeed. There is no way.
Could you help me. Thank you guys.

vivid bridge
#

(bob distance b1) < 10

how to make the group distance group? (any bot of the group against any opponent of the group?

lone forge
lone forge
wary sandal
#

can I make so that you can't escape a dialog (and instead just opens/closes menu like if it was a display)?

wary sandal
#

I'm not sure whether I want to use a dialog or a display

#

conceptually a dialog would be more fitting for what i want to do but i don't think you can't disable escaping it...

kindred zephyr
#

you can always intercept the keypress for escape

#

or, if its supposed to last a fixed period of time, take control away from the unit

unborn rivet
#

I'm new to scripting and really struggle with this probably simple to some of you problem. I use a trigger to spawn AI on game logic marker. I can spawn AI, however can't figure out how to de-spawn this AI once player moves out of the trigger zone. What code do I put to "On Deactivation" field in the trigger to de-spawn AI. This is the code I have in "On Activation" field:

_grp1 = [getPos spawn1, east, ["vn_o_men_nva_43"],0] call BIS_fnc_spawnGroup;

tulip ridge
#

Check when the player is no longer in the trigger area

deleteVehicle each ai

unborn rivet
tulip ridge
tulip ridge
#
{
    deleteVehicle _x;
} forEach (units _grp1);
unborn rivet
#

Still doesn't work. This is what I have:

tulip ridge
#

Because the deactivation doesn't know what _grp1 is

fair drum
#

you have to save _grp1 either in the mission name space with a global variable, or in the trigger's object name space, then recall

#

example

#
// Activate
private _grp1 = [getPosATL spawn1, east, ["vn_o_man_nva_43"], 0] call BIS_fnc_spawnGroup;
thisTrigger setVariable ["enemySpawn_1", _grp1];

// Deactivate
private _grp1 = thisTrigger getVariable ["enemySpawn_1", grpNull];
units _grp1 apply {deleteVehicle _x};

this would be using the trigger's object namespace

unborn rivet
granite sky
#

Second to last line should start with private _grp1 =

unborn rivet
#

In "On Activayion" field with "private" and "getPosATL" instead of "getPos" AI will not even spawn now.

unborn rivet
# fair drum Oops

The first line will not spawn AI.: private _grp1 = [getPosATL spawn1, east, ["vn_o_man_nva_43"], 0] call BIS_fnc_spawnGroup;
Is it because I use gamelogic marker for spawn position "spawn1" ?

#

It spawns with this code OK: _grp1 = [getPos spawn1, east, ["vn_o_men_nva_43"],0] call BIS_fnc_spawnGroup;

fair drum
#

possibly something to do with the gamelogic. then use getpos then. I just don't like getpos when I can tell it what type of position I want off the bat

#

but I don't use that function so maybe its something with it

unborn rivet
#

Well it doesn't work. I tried following.
Trigger Expression Condition is: this
In "On Activation" field:
_grp1 = [getPos spawn1, east, ["vn_o_men_nva_43"],0] call BIS_fnc_spawnGroup;
thisTrigger setVariable ["enemySpawn_1", _grp1];

and in "On Deactivation" field
_grp1 = thisTrigger getVariable ["enemySpawn_1", grpNull];
units _grp1 apply {deleteVehicle _x};

I also tried with "Private" in front of the code.
AI will spawn when entered trigger area but will not de-spawn once player left trigger area. Thank you guys for trying. This seems quite complicated to me.

split oxide
#

Check the "repeatable" box under activation

#

and if you only want the spawn/despawn once, make your "On Deactivation" this by adding the last line

private _grp1 = thisTrigger getVariable ["enemySpawn_1", grpNull];
units _grp1 apply {deleteVehicle _x};
deleteVehicle thisTrigger;```
unborn rivet
split oxide
#

Despawn is going to require you to check the "repeatable" box in the activation section and if you want it to happen only once, add the deleteVehicle line to your "on Deactivation" as shown above

split oxide
#

so overall, your code should be:

// Activate
private _grp1 = [getPosATL spawn1, east, ["vn_o_man_nva_43"]] call BIS_fnc_spawnGroup;
thisTrigger setVariable ["enemySpawn_1", _grp1];

// Deactivate
private _grp1 = thisTrigger getVariable ["enemySpawn_1", grpNull];
units _grp1 apply {deleteVehicle _x}

// add to deactivate if you want it to happen only once
deleteVehicle thisTrigger;```
and make sure "repeatable" is selected
unborn rivet
#

Success. Last code missing " ; " after {deleteVehicle _x} and spelling in the class name "vn_o_man_nva_43" should be " vn_o_men_nva_43""

unborn rivet
primal quiver
#

Hi!

How does one add a rangefinder to both the commander and gunner seat for a vehicle? The script from this forum thread https://forums.bohemia.net/forums/topic/220125-adding-rangefinder-functionality-to-vehicle-optic-via-script/ which works but only for the commander, and I tried my best to add it for the gunner seat as well but I'm not so sure what else to do.

For ease of reading, here's the code.

KUSH_fnc_rangeFinder =
{
_location = screenToWorld [0.5,0.5];
_distance = round(player distance _location);
_string = "Range: " + str _distance + "m";
titleText [format["<t color='#00CC00' size='1'font='PuristaBold'>%1</t>",_string], "PLAIN DOWN", -1, true, true]; sleep 3; titleFadeOut 2;
};

player addAction ["<img size='0.8' color='#DC143C' image='\a3\Ui_f\data\GUI\Cfg\CommunicationMenu\transport_ca.paa' /> <t color='#DC143C'>Laser Rangefinder</t>",KUSH_fnc_rangeFinder,[],99,false,true,"","(vehicle player != player) && (commander vehicle player == player)"];

molten yacht
#

With playVideo, none of the size options I've tried - [1,1] , [10,10], [5,5] have resulted in a visible display. How can I play a video that only shows on part of the hud?

meager granite
stray jackal
#

anyone noticing the update breaking doartilleryfire/commandartilleryfire? had a perfect working artillery fire loop script, after update, fires once and now won't continue to fire

stray jackal
#

no

lavish stream
#

Can you post the script?

stray jackal
#
{
    _x doArtilleryFire [[(_artylocation select 0),(_artylocation select 1),0],_artyAmmo, 3];
} forEach _artyvehs;

I push four D-30 artillery cannons to an array _artyvehs, set their ammo to 1 each time it loops and do a few distance checks. The distance checks are working flawlessly. I've tried the above in multiple ways whether its command or do, or with an added sleep, or just throwing both in there.

#

it will do the full doartilleryfire the first time it loops

grizzled cliff
#

annnnnd changed up parent invokes to make it ... well work better

stray jackal
#

but it loops again, and they no longer fire

grizzled cliff
#

_thisObj::parentMethod.__call(_thisObj, arg1, arg2);

midnight niche
#

Does entering a camera with camCreate grab sound from the source or the players location?

Can you specify to use source sound or not?

grizzled cliff
#

that is how you call a parrent method

lavish stream
grizzled cliff
#

there is a magic __call function on functions

stray jackal
#

this script worked flawlessly until the recent update

lavish stream
#

Honestly, I'd log everything in there and compare the first run to the second

#

it'd be easier

stray jackal
#

yea thats what im about to do

grizzled cliff
#

adding a magic __apply method too

#

if anyone has done any OO JS

#

this is familiar territory

sage furnace
#

Hi, could you please give me an example of how to make groups with group names instead of single bot1 distance bot2 < 10?

warm hedge
#

Define where exactly is the position you want to get dist

meager granite
#

Now that we have select -1, wish we had deleteAt -1 to do opposite of pushBack

south swan
#

This command will not issue error when -1 index is passed making it ideal for using with find (see Example 2) or findIf (see Example 3).
oof meowsweats

#

#define POP(ARR) ARR deleteAt (count ARR - 1) blobcloseenjoy

meager granite
#

Yeah, but that's so many commands

#

I guess it should be a new command then, popBack or just pop

warm hedge
#

arr deleteAt [1,true] to select and delete reversely?

south swan
#

inb4 deleteAtReversed to match forEachReversed

meager granite
#

So turns out projectile HitPart only triggers for direct hits and not for splash damage like entity HitPart

wary dust
#

Hi guys. Let's see if you can help me.
Let me see if I can explain.
How can I do the following, I've been doing it for days and there is no way to find the solution.
A group called Romeo1_1 with different soldiers. The leader is R_1 AI and the player is R_6.
At a given moment (when the area is already clear of enemies) R_1 has to order the player to set the charges on Objective.
I don't succeed. There is no way.
Could you help me. Thank you guys.

warm hedge
#

Two methods I think:

  • Have β€œFired” EH and detect if the charge has set in the right place
  • Have a trigger and detect if a charge is in the area
#

Not sure if you use ACE, though

south swan
#

inb4 the question is "how do i make R_1 give the order" and not "i can't execute it"

hallow mortar
#

I have two similar missions with identical initPlayerLocal.sqf:

_display = uiNamespace getVariable "RSCDiary";
_ctrl = _display displayCtrl 1202;
_ctrl ctrlEnable false;
_ctrl ctrlSetTextColor [0,0,0,0];
_ctrl ctrlSetTooltip "";
_ctrl ctrlCommit 0;```
This is the only code in initPlayerLocal.sqf. I am testing in the same conditions (editor MP). The missions are substantially similar in terms of scripting, and there is no other UI scripting going on.
In one mission, this disables the "centre map on player" button in the top right of the map, in the briefing phase.
In the other mission, it does not.
I am having a very hard time figuring out why this is different between these two missions.
wary dust
#

The group arrives in the zone,
1 eliminates the enemy garrison in the area.
R_1 orders R_6 to place the charges.
At the moment I do it with sideChat but of course the group doesn't wait for R_6 while he sets the charges and that makes him vulnerable. And I want them to wait for him to place the charges and then move on to another waypoint further away to detonate the charges.

warm hedge
#

So which part you exactly want/still haven't achieved yet?

hallow mortar
wary dust
warm hedge
#

I've tried to help you and guess you don't really care about it?

hallow mortar
#

You guys are both talking through like 2 layers of translation each and it's just not working very well. I don't think they're trying to be rude, they just decided to take a shortcut rather than deal with the language barrier.

warm hedge
#

I just wanted to have a clarify

cobalt path
#

Does anyone know a way to create a bright flare effect. By that I mean: u know how in nuke mods they create a flare that u can see though terrain and it takes half your screen even if u are on the other side of the map?
Well I would like to spawn that. I assume it is not actually a flare. What is it?

warm hedge
#

Aperture I guess

cobalt path
#

But apperture I know of just makes your entire screen brighter or darker

#

Or what do u mean? Like flare aperatyre itself?

hallow mortar
warm hedge
#

You're correct. I thought you want to have bright screen effect regardless you are at?

cobalt path
#

Well it needs to be directional. Thats why I refer to nuke mods for example. Because I know in a lot of those u can see explosion though terrain (yes not realistic). And it looks like someone spawned a flare and made it super bright

warm hedge
#

I see

#

As Nikko suggested a light source can be that bright even if daytime

candid sun
#

x39 that function doesn't really work

cobalt path
#

Ye I would love it to be visible during daytime as well thanks!

candid sun
#

it does remove the character (once you tell the function to actually return something) but it returns an array of numbers representing unicode chars, not a string

#

and it's all jumbled up

#

this works for me, i'm sure you can rip it apart though

#
	params ["_input", "_remove"];
	private ["_split", "_return"];
	_split = _input splitString "";
	_return = [];
	{
		if !(_x == _remove) then {_return pushBack _x};
	} forEach _split;
	_return = _return joinString "";
	_return
};

["foo""bar", """"] call noob_fnc_escape_string; // "foobar"```
wary dust
lusty pecan
#

Why are these not showing up has required?

sullen sigil
#

what am i looking at

lusty pecan
#

my server console

#

its not showing my mods has required and then also saying they we cannot run the mods because the server does not allow it

sullen sigil
meager granite
hollow hare
#

Have you guys used unit capture/play? I've got a problem where the path I recorded for a helicopter is elevated about 1m.

#

The terrain ground level is at 341m but the inputs are recorded from 342m for some reason.

silver ingot
#

Play a video on the players HUD like on a phone

dreamy kestrel
hallow mortar
#

No, basically only fall damage

#

hitPart can detect splash damage with that parameter, but handleDamage works differently and can only identify fall damage

dreamy kestrel
#

also what's the difference between source and instigator? memory vague in that area, I seem to recall sometimes vehicle, something like that, but I am fuzzy...

hallow mortar
#

IIRC it's for remote control and the AI gunner manual fire thing

#

i.e. if a player is a tank commander with an AI gunner, when they use Manual Fire to have the gunner shoot, the gunner is the source and the commander is the instigator.
And in the case of UAV or Zeus remote control, the controlled unit/UAV AI would be the source and the controller would be the instigator

wind flax
#

Hey guys. I've made an animation, and am trying to get the player to play it, but I'm encountering an issue where sometimes only the hands move, and the player won't do the full animation (it's a full animation, not a gesture).

However, if I reload, or play a gesture (like High ready) then do the switchMove statement, it works perfectly. Any ideas on how I can fix that?

Script:

player switchMove "RS_TS";
hallow mortar
#

You might want to try #arma3_animation , this feels like it might be a problem with the animation itself rather than with the script to use it

meager granite
dreamy kestrel
meager granite
#

no, HandleDamage is wonky and sometimes there is no instigator

#

when you run unit over, source is driver, not vehicle

#

lots and lots of nuances

#

in general - instigator, if null then source

dreamy kestrel
#

understood, got it, thanks...

tough abyss
#

question how does one make a marker only visible to a side? had a look at createmarker and can see side channels but apparently you can't set it for blufor,opfor etc

granite sky
#

You can remoteExec setMarkerAlphaLocal, I guess.

wary sandal
#

is there a sqf command to enable mouse cursor?

#

my current UI setup is a control group parented to display 46, issue is that I can't get to make it clickable

#

I could use a dialog instead but you can close it by pressing escape, and i don't want that

opal zephyr
#

Do you have the controls defined under RscTitles?

wary sandal
opal zephyr
#

you could use a dialog and just intercept the esc press

wary sandal
#

here's my config

description.ext

#include "defines.hpp"

import ScrollBar as RscScrollBar;
import RscText;
import RscFrame;
import RscCombo;
import RscControlsGroup;

class WTK_MIS_menu: RscControlsGroup
{
    class VScrollbar: RscScrollBar
    {
        width = 0;
        height = 0;
        color[] = {1,1,1,0};
    };
    class HScrollbar: RscScrollBar
    {
        width = 0;
        height = 0;
        color[] = {1,1,1,0};
    };
    class Controls
    {
        class topBar: RscText
        {
            x = 0;
            y = 0;
            w = 1;
            h = 0.05;
            SizeEx = 0.05 * 0.90;
            colorBackground[] = {
                "(profilenamespace getvariable ['GUI_BCG_RGB_R',0.13])",
                "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.54])",
                "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.21])",
                0.5
            };
            colorText[] = {1,1,1,1};
            text = "$STR_WTK_MIS_test1";
        };
        class bottomMain: RscFrame
        {
            x = 0;
            y = 0.055;
            w = 1;
            h = 1 - 0.055;
            colorBackground[] = {0,0,0,0.5};
            colorShadow[] = {1,1,1,0};
            color[] = {1,1,1,0};
            colorSelection[] = {1,1,1,0};
            style = ST_HUD_BACKGROUND;
        };
    };
    x = 0;
    y = 0;
    w = 1;
    h = 1;
};
#

oops it's a bit long, sorry

wary sandal
#

you can't pause the game anymore

opal zephyr
#

Does your display not close right now with esc? Are you creating it with createDisplay?

wary sandal
#

here's how i create it

#
waitUntil { sleep 0.05; !isNull (findDisplay 46) };
findDisplay 46 ctrlCreate ["WTK_MIS_menu", -1];
#

i don't create the display, 46 is the IDD for the MISSION UI or whatever

#

if there are better ways of doing what i want tell me, i'm not sure

opal zephyr
#

You could try using ctrlSetFocus and set it to your control

#

have never used it but that might work

wary sandal
#

no mouse cursor

#

i can still move my camera around and move my character

opal zephyr
#

hmm, perhaps its because your interactable objects (scroll bars) arent actually apart of the controls and the game doesnt see it as interactable?

kindred zephyr
#

46 is main display, you cant show a cursor over it can you?

#

why not make an rsctitle or a dialog?

opal zephyr
#

they dont want it closeable with esc so that rules out the dialog

#

can titles have interaction?

kindred zephyr
#

you can always intercept esc x2

opal zephyr
#

read up, they dont want that

#

need to keep the esc menu as openable

kindred zephyr
#

why not intercept it only when his dialog exist?

opal zephyr
#

idk, they didnt elaborate, maybe it needs to be open for awhile

kindred zephyr
#

what can he possible be doing that requires esc usable when his dialog is up?

#

thats a good point

wary sandal
wary sandal
#

and i also want the user to be able to pause the game

kindred zephyr
split scarab
#

How to make a trigger activate if a specific task is completed aka. "Succeeded"?
This isn't working in the trigger condition taskState rescueTask == "Succeeded"

cosmic lichen
#

"task_1" call BIS_fnc_taskState == "SUCCEEDED"

split scarab
molten yacht
#

Is sqf { _x setDamage 1; } foreach _group; the correct way to iterate through all units in the group?

#

or should that be like, foreach units in _group

opal zephyr
#

you could use apply too

#

What do you have stored in _group?

#

is it an array of the units, or the group indentifier

#

if its the group indentifier then you will need to do units _group

split scarab
split scarab
#

Not certain, I use remoteExec a few times. Is that not associated?

opal zephyr
#

No

#

Try to use it in multiplayer, if it doesnt work then look for where you define CfgRemoteExec

split scarab
#

It works for me alone in multiplayer, will need to test with another player to make sure

dreamy kestrel
#

how do I get the keyboard modifier key states? ctrl, alt, shift, left and/or right, and so on?

dreamy kestrel
opal zephyr
dreamy kestrel
opal zephyr
#

Which EH do you intend to use?

dreamy kestrel
opal zephyr
#

which keys are you going to use with it?

dreamy kestrel
#

I just need the states.

#

and in a way that does not obstruct other display bindings

opal zephyr
#

ah, im not sure about distrupting other display bindings

#

you could try using false, im not sure how it would affect it

dreamy kestrel
#

I seem to recall true/false signaling whether EH handled

opal zephyr
#

Ive only ever used it to block the keys original function, if you execute something in the eh and then return false, that execution will still happen

opal zephyr
#

@dreamy kestrel Heres another way to do it that Id forgotten about, you can also check if the key value is equal to itself to prevent it from doings its original action, heres an example I used.

              findDisplay 46 displayAddEventHandler ["KeyDown",{
                  params ["_displayOrControl", "_key", "_shift", "_ctrl", "_alt"];
                  if (FH_positionSelecting) then{        
                      switch _key do{
                          case 18:{
                              []spawn J3FF_fnc_initializeFoxhole; 
                              FH_positionSelecting = false;
                          };
                          case 19:{
                              FH_positionSelecting = false;
                          };
                      };
                      _key == 18 || _key == 19;
                      
                  };
              }];
dreamy kestrel
#

honestly, I am not looking to intercede actions. I really just want the modifier states. πŸ˜‰

dreamy kestrel
#

think I got er sorted @opal zephyr appreciate the feedback

#

the EH are a bit tricky, they signal the event change in state, i.e. up or down. i.e. to think _shift is active is a misnomer. rather variables might be named _shift_up, _shift_down would be more accurate. seems to work well, simple smoke test running, lookout around (shift, alt) got a good EH.

neon lynx
#

Hi, ist a way to play unitcapture data from any point on the map? Like a command "play unitcapture from this location"? I would record an airplane maneuver that is played dynamically over the players position.

meager granite
#

You'll need apply and vectorAdd

#

Looks like format is [frameTime, unitPosition, unitDirectionVector, unitUpVector, unitVelocity] for each frame, you'll need something like:

    private _capture_data = [....];
    private _offset = [100,200] vectorDiff (_capture_data select 0 select 1);
    _offset resize 2; // Remove Z so only XY offset remains

    {
        _x select 1 vectorAdd _offset;
    } forEach _capture_data;

    _capture_data .... BIS_fnc_unitPlay;
#

[100,200] being new coordinate for start of the capture

#

Change _offset resize 2 to say _offset set [2, getPosASL player] if you want capture height to remain the same above the player

#

There are few more nuances regarding ASL\ATL, but it depends on how you captured your data

neon lynx
#

thx

meager granite
#

HandleDamage is driving me nuts

#

One shot, two hit parts, HandleDamage gets fired 4 times even before HitPart does on next frame, and these fires are invalid their return do nothing, then you have HandleDamage that actually do something.

#

Basically for each hit you get two faulty fires that do nothing, then next fires are valid

south swan
#

mandatory "hidden attached unit that displays head/bust" conspiracy theory mention

meager granite
#

What's interesting is that faulty HandleDamage calls are done 1 frame before HitPart and proper HandleDamage

south swan
#

and mostly mention HitHead/HitBody hitpoints, iirc

meager granite
#

How can you even tell real HandleDamage fires from these fake ones that do nothing?

#

Yeah, its just head and overall damage

south swan
#

new damage doesn't change between fake and real HandleDamage

meager granite
#

And I shot unit in the center, nowhere near the head (thus 0 damage in these fake fires)

south swan
#

but from within it - i don't know meowsweats

meager granite
#

Yeah and it gets worse when you consider locality

#

You can't even use HitPart as a separator

south swan
#

yaaay, we're all constantly getting arma'd

meager granite
#

If shooter and target are different clients

south swan
#

and different projectiles. I'm pretty sure damage calcs for bullets are performed at shooter machine, as they're the only machine that has real bullet. But iirc grenades are globally synced or something?

meager granite
south swan
#

HandleDamageWithoutDamagingMyBrain

next kraken
#

Hello guys ! Since animals are not working proberbly on dedicated servers (modules, script and sides -movement is bugged) im seaching for someone who can create the following script/module without addons. [ Overall, a script/module which creates a specified number of agent animals in a specific area, which have a radius they move in] If you know someone, i appreciate you inform him over my request : If working, will pay 15€ for that. Of course i take it for free too^^ You might wonder why i would pay for it, but i need that for immersion in my mission so bad and why not pay some talented people for their work.

meager granite
#

Apparently these fake HandleDamage fires only happen to units, can't seem to find any other vehicles that do that

next kraken
#

🐐

#

thanks in advance, if you might be interested

south swan
next kraken
#

oh thanks sa-matraΒ°!

meager granite
#

Fake HD always seems to follow "head" then "overall" pattern

#

While real HDs are "overall" then "parts"

wanton swallow
#

How to catch event when player connected to UAV?

ivory lake
#

yeah this handledamage bs is partially why ace adds a special hitpoint for handledamage use

#

as its always the last thing to go off

polar belfry
#
private _missile = createVehicle ["vn_sa2_ammo", [0,0,0], [], 0, "none"];   
_missile enableSimulation true;   
_missile setPosATL _pos;   
_missile setVectorDirAndUp [[0,0,1], [1,0,0]];  
sleep 20;```

Is there a way to make the missile spawn on the point where p1 (oil stain for reference) is but on the surface of the water p1 is attached to a submarine
#

if it is underwater the missile blows up

#

I thought originally _missile enable damage false

meager granite
polar belfry
#

so this would spawn the misile on the point where the stain is but on surface (+0.5m) of the terrain wheter it be water or soil

#

will try

hollow plaza
#

From what I've read so far, I'm assuming it is not possible to edit/override the attributes of already existing items, like adding more attributes or changing the name/weight of an ACE ration item through a mission file (description.ext/cfg files).
I just want to confirm if this is indeed the case and that I'll need to make an addon that adds in new items if I want to be able to edit them.

wary sandal
#

you can still escape it

#

there's no real solution?

polar belfry
#

SQFbin for some reason doesn't want to load

meager granite
polar belfry
#

I will run it in pararell with my player script (players are blufor but admins may control some opfor planes)

kindred zephyr
# meager granite I think I have an idea. Looks like hit indexes are always ascending and if my re...

I want to believe that is because of predictability since the bullet just calculates where it goes through as soon as it touches FG.

Having a handling for incapacitated and body seems to be a solution at least on my situation since i want to alter the vanilla behaviour without needing more artificial hitpoints.

The problem with the selections and why it might do what it does seems to be the "propagation" of the hitpoint and its "parent", if the selection being hit is close enough to the hitpoint itself being originally affected, it will count as "hit", its honestly a bit of bullshit going on there since its dependant of selection positioning and damage hitpoints stacking

meager granite
kindred zephyr
#

im talking exclusively for camanbase too

open hollow
#

i mean i can have a while, saving all loadouts every x seconds... but yea, if i can find the corpuse of the disconected player, will be easier

open hollow
#

thankyou ❀️

unborn rivet
#

I'm using following code to spawn AI on tree platform which work OK. I need to stop them from moving. Where within the code and what should I put to make them don't move? Since they spawn on tree I don't want to use waypoint.

private _grp1 = [getPosATL spawn1, east, ["vn_o_men_nva_43"]] call BIS_fnc_spawnGroup;
thisTrigger setVariable ["enemySpawn_1", _grp1];

proven charm
unborn rivet
proven charm
#

after

#
{
private _man = _x;
dostop _man;
_man disableAI "PATH"; 
} foreach (units _grp1);
unborn rivet
#

Thank you

tough abyss
#

had brain fog does anyone know the operator in sqf to check 2 conditions in an if then statement? i think its two & signs right?

tough abyss
grizzled cliff
foggy stratus
#

In my SOG AI mod, I occasionally get this error when player dies. Its a problem because it causes a game freeze, and you have to kill the arma process and restart game. The failure occurs in function BIS_fnc_selectRespawnTemplate which I have no control over. Is there some missionNameSpace var I could set that would guarantee this not occur?

#

6:30:26 Error in expression <entry; if ( (ismultiplayer && _respawn == _respawnOrig) || _mode in ["initRe> 6:30:26 Error position: <== _respawnOrig) || _mode in ["initRe> 6:30:26 Error Generic error in expression 6:30:26 File /temp/bin/A3/Functions_F/Respawn/fn_selectRespawnTemplate.sqf..., line 80

#

I have respawn set to Group in the description.ext. This is an intermittent error, so hard to reproduce consistently.

granite sky
#

The head value is identical to the one you get next frame though, IIRC.

proven charm
#

like check all calls to BIS_fnc_addRespawnPosition have valid parameters

fleet sand
#

Quick question does anybody know why when i run this code i just have white screen with no Text on screen what so ever ?

private _screen = cursorTarget;
_screen setObjectTexture [0,"#(rgb,512,512,3)text(1,1,'PuristaBold',1,'#0000ff7f','#880808','Hello World')"];
opal zephyr
#

Is attachTo still supposed to disable collision of the object being attached? It doesnt seem to work with a unit

opal zephyr
opal zephyr
#

any guesses why it might not work?

sullen sigil
#

as in the unit still has collisions?

opal zephyr
#

yup

sullen sigil
#

probably cant disable unit collisions or something

#

🀷

opal zephyr
fleet sand
sullen sigil
#

attaching to what

opal zephyr
sullen sigil
#

is it a physx object

opal zephyr
opal zephyr
sullen sigil
#

what are the classnames

opal zephyr
#

Land_Small_Stone_02_F

fleet sand
sullen sigil
#

hm, odd

#

works the same for me, both have cols

opal zephyr
#

The wiki doesnt actually say it disables collision, just posts and threads on the arma site

#

maybe it changed, idk

sullen sigil
#

my capital ships system stuff has its collisions disabled

#

so maybe in movement or something? 🀷

opal zephyr
opal zephyr
sullen sigil
#

no collisions whilst its moving

#

potentially

opal zephyr
#

ah

fleet sand
opal zephyr
#

change both the background and text to that value @fleet sand

opal zephyr
#

what is the cursorTarget you're looking at?

fleet sand
#

This is the screen i am looking at with cursorTarget: "Land_TripodScreen_01_large_F"

next kraken
#

when using kbtell function on a dedicated server, all works good, only problem ive got is that the conversations do not wait until the sound is finished from the speaker, i see the next dialog immideatly

#

any idea why and how to fix it ? works fine in normal multiplayer

opal zephyr
#

@fleet sand This works:

_screen setObjectTexture [0,'#(rgb,512,512,3)text(1,1,"PuristaBold",0.25,"#0000ff7f","#880808","Hello World")'];
#

it seems to have a problem with using ' vs " for the actual values

fleet sand
# opal zephyr <@263862165079851009> This works: ```sqf _screen setObjectTexture [0,'#(rgb,512,...

Ok and i think i found problem. So if you do this:

//this works
private _screen = cursorTarget;
_screen setObjectTexture [0,'#(rgb,512,512,3)text(1,1,"PuristaBold",0.25,"#0000ff7f","#880808","Hello World")'];

//this dosent work:
private _screen = cursorTarget;
_screen setObjectTexture [0,"#(rgb,512,512,3)text(1,1,'PuristaBold',0.25,'#0000ff7f','#880808','Hello World')"];
``` Its "" and ''
opal zephyr
#

exactly

kindred zephyr
#

Can someone remind me:

Variables assigned to objects are local to the object pc/where they were assigned?

Or can they be accessed from remote pcs?

granite sky
#

_object setVariable ["varname", _value, true] will publish that variable globally.

kindred zephyr
#

yeah, i dont want that otherwise it will kill the bandwidth for this case. I can asume the values of the variable are local to the place where the command was executed right?

granite sky
#

uh, if you remove the true on the end then it's only set locally.

#

So you can have a different value on each client if you want, or only have the variable on machines where it's needed.

wary sandal
#

this element just doesn't want to appear, i have other UI elements like buttons and pictures set up that appear without a problem

proven charm
#

or whatever is right command πŸ™‚

wary sandal
#

i followed the second wiki example, now the frame DOES appear but adding items to it does nothing

wary sandal
cosmic lichen
#

I was talking about the first one that just shows the class

proven charm
#

make sure all defines are there like "CT_TREE"

cosmic lichen
#

GUI_TEXT_SIZE_MEDIUM
I am 100% sure this is undefined for you

#

That's why it's not showing anything

#

change it to 0.03

wary sandal
#

oops wrong link

cosmic lichen
#

Well, it works for me fine

wary sandal
#

this

cosmic lichen
#

Please use import keyword

#

instead of redefining the class

wary sandal
#

what tells you that i don't?

cosmic lichen
wary sandal
#

i know how to work with classes πŸ’€

#

again, what tells you that i don't use import

cosmic lichen
#

The link you've send

wary sandal
cosmic lichen
#

That's not what the link is showing

wary sandal
#

that's my work

#

and define.hpp is the link I sent

#

it defines all of the useful stuff like GUI_TEXT constants, control type hex codes, etc

#

so i put back the first example and added the idc value, and now it works, thanks

#

there's something wrong with the second tho

cosmic lichen
#

What second?

#

Example?

wary sandal
#

yeah

cosmic lichen
#

Works fine here

wary sandal
#

weird, all the macros that the example uses are defined correctly in my defines.hpp file so i don't know where it could come from

#

anyways i'll stick with first example as it is cleaner and bare bones

cosmic lichen
#

Check the config viewer, you will see if a macro was not replaced by its value there very easily

cold pebble
#

Anyone had this before?: GIAS pre stack size violation

hallow mortar
#

It's essentially "generic error in expression" - something not covered by other cases has gone wrong. Look for missing }, ), ], , etc, those are common culprits

cold pebble
#
params ["_from","_to","_truckCount","_startTransitTime","_endTransitTime","_carrying","_fuelRequired","_fromIndex"];

DT_logistics params ["_availableTrucks","_trucksInUse","_currentRoutes"];
private _isFromFOB = isNil {_from getVariable "DT_factoryResources"};
private _nearFOBRes = [_from] call DT_fnc_getCurrentResources;
private _fuelAvailable = _nearFOBRes select 1;
private _fuelTotalRequired = if (_isFromFOB) then {_fuelRequired = _fuelRequired + (_carrying select 1)} else {_fuelRequired};
if (_truckCount > _availableTrucks) exitWith {["Not enough trucks."] remoteExecCall ["DT_fnc_notify",remoteExecutedOwner]};
if (_fuelTotalRequired > _fuelAvailable) exitWith {["Not enough fuel."] remoteExecCall ["DT_fnc_notify",remoteExecutedOwner]};

if (_isFromFOB) then {
    [_from,_carrying,false] call DT_fnc_adjustResources;
} else {
    private _factoryResources = _from getVariable "DT_factoryResources";
    _factoryResources = _factoryResources vectorDiff _carrying;
    _from setVariable ["DT_factoryResources",_factoryResources,true];
};
[_from,[0,_fuelRequired,0],false] call DT_fnc_adjustResources;

private _newRoute = [_from,_to,_truckCount,_startTransitTime,_endTransitTime,_carrying];
_currentRoutes pushBack _newRoute;
DT_logistics set [0,(_availableTrucks - _truckCount)];
DT_logistics set [1,(_trucksInUse + _truckCount)];
[DT_logistics,"startRoute",_newRoute,_fromIndex] remoteExecCall ["DT_fnc_updateLogistics",-2,"DT_Logi_JIP"];

if ((missionNamespace getVariable ["DT_logisticsHandle",-1]) isEqualTo -1) then {
    DT_logisticsHandle = [DT_fnc_logisticsLoop,10] call CBA_fnc_addPerFrameHandler;
};

I can't see aynthing 😦

#
18:53:14 Error in expression <es select 1;
private _fuelTotalRequired = if (_isFromFOB) then {_fuelRequired = >
18:53:14   Error position: <= if (_isFromFOB) then {_fuelRequired = >
18:53:14   Error GIAS pre stack size violation
18:53:14 File C:\Users\xx\Documents\Arma 3\missions\Frontlines.Altis\Server\fn_logisticsStartRoute.sqf..., line 12

This is the exact error

granite sky
#

The code it's failing in isn't in what you pasted.

cold pebble
#

Its line 4 in the above

granite sky
#

yeah ok, I can't see anything either.

cold pebble
#

Annoyingly this worked before 2.14 😦

granite sky
#

The line it's quoting looks broken but I'd be surprised if it crashed the parser.

cosmic lichen
#

Check the params you send over to the script

south swan
#

_fuelRequired = _fuelRequired + (_carrying select 1) doesn't return anything, though

#

private _a = if (_cond) then {_b = _c} else {_d}; doesn't make sense as such

cold pebble
granite sky
#

ah wait, it does crash the parser:

_var1 = 2;
_var2 = if (true) then {_var1 = _var1+1} else {_var1};
_var2; 

GIAS pre stack size violation :P

cold pebble
#

ah

#

of course

#

i'm dumb

cosmic lichen
#

Interesting

cold pebble
#

lmao

#

good spot

#

That was it, thanks folks πŸ™

#

First time I've seen that error too, good learning

cosmic lichen
#

Seen it quite often but not caused by something like that.

granite sky
#

I'd have expected that to just set the var to nil. Not sure if something changed.

cosmic lichen
#

It's literally always missing brackes or , for me

south swan
#

it's a "Generic script error" of old iirc. Just a bit more specific, maybe

dreamy kestrel
#

Q: is there a way I can see which addMissionEventHandlers are there?
or rather addEventHandlers ...

dreamy kestrel
#

like at run time

south swan
#

one loop call, actually for each and every object/EH combo

wind flax
#

Does anyone know how would I use remoteExec on a another player if I'm getting them from cursorObject?

_otherPlayer = cursorObject;
// other checks (distance, etc)
if (isPlayer _otherPlayer) then {
    // remoteExec would be here to another function I want to run on the player I'm looking at 
};
dreamy kestrel
opal zephyr
south swan
#

well, i can't find anything better

wind flax
hallow mortar
#

Yes, exactly

opal zephyr
#

yup that will work

wind flax
#

Sick. Thanks guys

hallow mortar
#

Wrong person :P

opal zephyr
#

oops

wind flax
#

Oh Discord added a quick copy on code blocks

#

That's cool

wicked sparrow
#

Hey, stupid question but I don't seem to get it correct after trying it multiple times, so I hope it's okay if I ask here.

I got a string like this "[[Item1, 10], [Item2, 20], [Item3, 30]]" . So basically an array that is just quoted and therefore is a string. My question now is how do I just remove the quotation and therefore make it a string like this: [[Item1, 10], [Item2, 20], [Item3, 30]] ?

sullen sigil
#

parseSimpleArray

wicked sparrow
#

Thanks, I searched a lot for exactly that command. salute

split scarab
#

If I give a vehicle a variable name, how would I check if players entering a trigger is within said vehicle with a variable name?

opal zephyr
#

use list/thisList to get the players in the trigger, and then use vehicle to check if player is in a vehicle, and if they are then compare the vehicles name to your variable name

split scarab
#

If I want to do setCaptive true while they're inside the trigger and setCaptive false when they leave it, if I do what you said in the condition, will it still apply etCaptive false when they leave the area?

opal zephyr
#

you would have to put setCaptive false in the de-activation portion of the trigger

south swan
#

The question is: how to get the units to setCaptive false when they're outside of it?

split scarab
#

Haven't tested, but I'd assume the trigger loses reference of what players to put setCaptive false on?

south swan
#

At least for server-only trigger. For global trigger each player's copy can just check the local player πŸ™ƒ

split scarab
opal zephyr
#

no, thats checking incorrectly

#

would need to be something like if (vehicle _x isEqualTo "opforHeli2") then

split scarab
#

So replace all player mentions in the loops with _x?

opal zephyr
#

yes

split scarab
#

And maybe replace player in condition with this? I'm not always sure how you refer to the correct unit sometimes

opal zephyr
#

you're going through the contents of thisList with the foreach, and the _x value represents the current item in the array, or in this case the unit

split scarab
#

Alrighty, I'll give it a test, thank you

split scarab
opal zephyr
#

just have it trigger with whichever side is the one entering it? The whole point of the script was to check every unit inside and see if they were in the heli

split scarab
#

Like so?

#

This is what's in the Activated section:

{ 
    if (_x in opforHeli2)  then { 
        _x setCaptive true; 
    }; 
} foreach allPlayers;
#

Forgot to ping hehe @opal zephyr

#

Hmm it works but it's constantly flipping between being Activated or Deactivated

meager granite
# meager granite I think I have an idea. Looks like hit indexes are always ascending and if my re...

Kinda works, same frame, frame after frame.

 5:56:00 ---------------------------------------------------------
 5:56:00 "Frame 710690: [ FAKE ] HandleDamageMan: B_Soldier_F"
 5:56:00 ["B Alpha 1-2:2 (B_Soldier_F)","head",0,"<NULL-object> ()","B_65x39_Caseless",2,"<NULL-object> ()","hithead",true]
 5:56:00 ---------------------------------------------------------
 5:56:00 "Frame 710690: [ FAKE ] HandleDamageMan: B_Soldier_F"
 5:56:00 ["B Alpha 1-2:2 (B_Soldier_F)","",0.100436,"<NULL-object> ()","B_65x39_Caseless",-1,"<NULL-object> ()","",true]
 5:56:00 #########################################################
 5:56:00 "Frame 710691: HitPart: B_Soldier_F"
 5:56:00 ["B Alpha 1-2:2 (B_Soldier_F)","<NULL-object> ()","1821154: tracer_red.p3d (B_65x39_Caseless)",[23343.6,17994.4,4.03315],[0,0,-100],["rightupleg","hit_rightleg","hit_legs"],[10,0,0,0,"B_65x39_Caseless"],[-0,-0,-1],0.171822,"a3\data_f\penetration\meat.bisurf",true]
 5:56:00 ---------------------------------------------------------
 5:56:00 "Frame 710691: HandleDamageMan: B_Soldier_F"
 5:56:00 ["B Alpha 1-2:2 (B_Soldier_F)","",0.100436,"<NULL-object> ()","B_65x39_Caseless",-1,"<NULL-object> ()","",true]
 5:56:00 ---------------------------------------------------------
 5:56:00 "Frame 710691: HandleDamageMan: B_Soldier_F"
 5:56:00 ["B Alpha 1-2:2 (B_Soldier_F)","pelvis",0.101626,"<NULL-object> ()","B_65x39_Caseless",3,"<NULL-object> ()","hitpelvis",true]
 5:56:00 ---------------------------------------------------------
 5:56:00 "Frame 710691: HandleDamageMan: B_Soldier_F"
 5:56:00 ["B Alpha 1-2:2 (B_Soldier_F)","legs",0.203252,"<NULL-object> ()","B_65x39_Caseless",10,"<NULL-object> ()","hitlegs",true]
 5:56:00 ---------------------------------------------------------
 5:56:00 "Frame 710691: HandleDamageMan: B_Soldier_F"
 5:56:00 ["B Alpha 1-2:2 (B_Soldier_F)","body",0.000106828,"<NULL-object> ()","B_65x39_Caseless",11,"<NULL-object> ()","incapacitated",true]
 5:56:00 ---------------------------------------------------------
 5:56:00 "Frame 710691: [ FAKE ] HandleDamageMan: B_Soldier_F"
 5:56:00 ["B Alpha 1-2:2 (B_Soldier_F)","head",0,"<NULL-object> ()","B_65x39_Caseless",2,"<NULL-object> ()","hithead",true]
 5:56:00 ---------------------------------------------------------
 5:56:00 "Frame 710691: [ FAKE ] HandleDamageMan: B_Soldier_F"
 5:56:00 ["B Alpha 1-2:2 (B_Soldier_F)","",0.100436,"<NULL-object> ()","B_65x39_Caseless",-1,"<NULL-object> ()","",true]
 5:56:00 #########################################################
 5:56:00 "Frame 710692: HitPart: B_Soldier_F"
 5:56:00 ["B Alpha 1-2:2 (B_Soldier_F)","<NULL-object> ()","1821157: tracer_red.p3d (B_65x39_Caseless)",[23343.5,17994.6,4.0433],[0,0,-100],["leftupleg","hit_leftleg","hit_legs"],[10,0,0,0,"B_65x39_Caseless"],[-0,-0,-1],0.171033,"a3\data_f\penetration\meat.bisurf",true]
 5:56:00 ---------------------------------------------------------
 5:56:00 "Frame 710692: HandleDamageMan: B_Soldier_F"
 5:56:00 ["B Alpha 1-2:2 (B_Soldier_F)","",0.200871,"<NULL-object> ()","B_65x39_Caseless",-1,"<NULL-object> ()","",true]
 5:56:00 ---------------------------------------------------------
 5:56:00 "Frame 710692: HandleDamageMan: B_Soldier_F"
 5:56:00 ["B Alpha 1-2:2 (B_Soldier_F)","pelvis",0.203252,"<NULL-object> ()","B_65x39_Caseless",3,"<NULL-object> ()","hitpelvis",true]
 5:56:00 ---------------------------------------------------------
 5:56:00 "Frame 710692: HandleDamageMan: B_Soldier_F"
 5:56:00 ["B Alpha 1-2:2 (B_Soldier_F)","legs",0.406504,"<NULL-object> ()","B_65x39_Caseless",10,"<NULL-object> ()","hitlegs",true]
 5:56:00 ---------------------------------------------------------
 5:56:00 "Frame 710692: HandleDamageMan: B_Soldier_F"
 5:56:00 ["B Alpha 1-2:2 (B_Soldier_F)","body",0.000175089,"<NULL-object> ()","B_65x39_Caseless",11,"<NULL-object> ()","incapacitated",true]
meager granite
granite sky
#

That's only true if the current damage is 0.

meager granite
# meager granite Kinda works, same frame, frame after frame. ``` 5:56:00 -----------------------...
    private _head_index = _unit getVariable "koth_ehs_hithead_index";
    private _old_index = _unit getVariable "koth_ehs_handledamage_index";
    private _old_frame = _unit getVariable "koth_ehs_handledamage_frame";

    private _is_fake = (
        // 2 (head)
           _hit_index == _head_index && (_hit_index < _old_index || _old_index == -1)

        // -1 (overall)
        || _hit_index == -1 && _old_index == _head_index && _old_frame == diag_frameno
    );

    _unit setVariable ["koth_ehs_handledamage_index", _hit_index];
    _unit setVariable ["koth_ehs_handledamage_frame", diag_frameno];
meager granite
meager granite
# meager granite Just tested it, looks like "head" (-2) passes current damage while "overall" (-1...

Started with setDamage 0.3, shot the leg:

 6:02:17 ---------------------------------------------------------
 6:02:17 "Frame 764841: [FAKE] HandleDamageMan: B_Soldier_F"
 6:02:17 ["B Alpha 1-2:2 (B_Soldier_F)","head",0.3,"B Alpha 1-2:1 (Sa-Matra) (B_Soldier_F)","B_65x39_Caseless",2,"<NULL-object> ()","hithead",true]
 6:02:17 ---------------------------------------------------------
 6:02:17 "Frame 764841: [FAKE] HandleDamageMan: B_Soldier_F"
 6:02:17 ["B Alpha 1-2:2 (B_Soldier_F)","",0.337371,"B Alpha 1-2:1 (Sa-Matra) (B_Soldier_F)","B_65x39_Caseless",-1,"B Alpha 1-2:1 (Sa-Matra) (B_Soldier_F)","",true]
 6:02:17 #########################################################
 6:02:17 "Frame 764842: HitPart: B_Soldier_F"
 6:02:17 ["B Alpha 1-2:2 (B_Soldier_F)","B Alpha 1-2:1 (Sa-Matra) (B_Soldier_F)","1821816: tracer_red.p3d (B_65x39_Caseless)",[23343.4,17994.8,3.38357],[-702.334,212.028,-314.5],["leftlegroll","hit_leftleg","hit_legs"],[10,0,0,0,"B_65x39_Caseless"],[0.989887,0.13607,-0.0401141],0.139311,"a3\data_f\penetration\meat.bisurf",true]
 6:02:17 ---------------------------------------------------------
 6:02:17 "Frame 764842: HandleDamageMan: B_Soldier_F"
 6:02:17 ["B Alpha 1-2:2 (B_Soldier_F)","",0.637371,"B Alpha 1-2:1 (Sa-Matra) (B_Soldier_F)","B_65x39_Caseless",-1,"B Alpha 1-2:1 (Sa-Matra) (B_Soldier_F)","",true]
 6:02:17 ---------------------------------------------------------
 6:02:17 "Frame 764842: HandleDamageMan: B_Soldier_F"
 6:02:17 ["B Alpha 1-2:2 (B_Soldier_F)","legs",0.846216,"B Alpha 1-2:1 (Sa-Matra) (B_Soldier_F)","B_65x39_Caseless",10,"B Alpha 1-2:1 (Sa-Matra) (B_Soldier_F)","hitlegs",true]
granite sky
#

yeah, god knows what's going on underneath there.

#

It feels like bugged behaviour but maybe there's some backwards compatibility going on.

#

But then handleDamage has been the same forever?

#

Oh yeah, if you want a laugh, see what happens if you shoot someone in the body with a 50cal.

#

I'm gonna call that as oversimulation

meager granite
# granite sky But then handleDamage has been the same forever?

Tested Alpha 0.5, same there:

"Frame 35571: HandleDamageMan: B_Soldier_F"
["B Alpha 1-1:2 (B_Soldier_F)","head_hit",0,"<NULL-object> ()","B_65x39_Caseless"]
---------------------------------------------------------
"Frame 35571: HandleDamageMan: B_Soldier_F"
["B Alpha 1-1:2 (B_Soldier_F)","",0.222734,"B Alpha 1-1:1 (Sa-Matra) (B_Soldier_F)","B_65x39_Caseless"]
---------------------------------------------------------
"Frame 35572: HandleDamageMan: B_Soldier_F"
["B Alpha 1-1:2 (B_Soldier_F)","",0.222734,"B Alpha 1-1:1 (Sa-Matra) (B_Soldier_F)","B_65x39_Caseless"]
---------------------------------------------------------
"Frame 35572: HandleDamageMan: B_Soldier_F"
["B Alpha 1-1:2 (B_Soldier_F)","head_hit",0,"B Alpha 1-1:1 (Sa-Matra) (B_Soldier_F)","B_65x39_Caseless"]
---------------------------------------------------------
"Frame 35572: HandleDamageMan: B_Soldier_F"
["B Alpha 1-1:2 (B_Soldier_F)","body",0,"B Alpha 1-1:1 (Sa-Matra) (B_Soldier_F)","B_65x39_Caseless"]
---------------------------------------------------------
"Frame 35572: HandleDamageMan: B_Soldier_F"
["B Alpha 1-1:2 (B_Soldier_F)","hands",0,"B Alpha 1-1:1 (Sa-Matra) (B_Soldier_F)","B_65x39_Caseless"]
---------------------------------------------------------
"Frame 35572: HandleDamageMan: B_Soldier_F"
["B Alpha 1-1:2 (B_Soldier_F)","legs",0.186451,"B Alpha 1-1:1 (Sa-Matra) (B_Soldier_F)","B_65x39_Caseless"]
meager granite
granite sky
#

yeah, like it somehow deals damage to pretty much every hit point.

#

...and then ACE tries to reduce it to one :P

meager granite
#

I'm worried how much FPS I'll kill by having each unit and vehicle have Fired, HitPart and HandleDamage.

#

And then each projectile has SubmunitionCreated and some (that appear as null in HitPart) with HitPart and HitExplosion

winter rose
#

haaaaaaaaah please use pastebin Γ©_Γ¨

split scarab
#

Wait does setCaptive temporarily make the player part of another team or somemthing?

opal zephyr
#

it sets them as civilian

split scarab
#

So that's why it's flipping between activated/deactivated, the trigger is set to monitor Independent players inside the trigger, so when I set them to captive they technically no longer are inside

#

Easiest way to prevent that, that I can think of is to empty the "deactivated" statement and make an identical trigger but for Civilian side instead

dreamy kestrel
opal zephyr
#

They have it set to independent, since they're just doing one side they can assume the unit will be set back to independent

split scarab
#

Hmm, if Zeus remote controls a unit, is that unit considered a Player?

#

If not, then I should be able to just set the trigger to trigger for 'Any Player'

dreamy kestrel
meager granite
split scarab
#

I'm gonna test and see if it would work with 'Any Player' if so then I won't have to as this was meant to be a relatively simple mission hehe, besides I wouldn't know how to track that stuff anyways

#

Works! :)

#

Thanks for the help guys, my mission is finally done and fully functional with everything I wanted

leaden flare
#

I have a vehicle spawning script for a multiplayer mission file, is there anyway to set the texture it uses for when the vehicle spawns?

#
[       
       
    "Spawn Huron",        
    {       
        _pad1 = getPosATL Spawn_Pad6;       
       
        _dir = getDir Spawn_Pad6;    
        _veh = createVehicle          
        [       
            "B_Heli_Transport_03_unarmed_F",       
            _pad1,       
            [],       
            0,       
            "NONE"       
        ];      
        _veh setDir _dir;     
    }       
]; 
this addAction 
[ 
 "Spawn Executive Transport",        
    {       
        _pad1 = getPosATL Spawn_Pad6;       
       
        _dir = getDir Spawn_Pad6;    
        _veh = createVehicle          
        [       
            "Aegis_B_ION_Heli_Transport_02_VIP_F",       
            _pad1,       
            [],       
            0,       
            "NONE"       
        ];      
        _veh setDir _dir;     
    }       
];} ```
paper ridge
#

setObjectTextureGlobal?

#

Should set it for all users

exotic tinsel
#

What is the best method for connecting to MySQL these days. I havent done it in years and I am trying to help out a friend. I am not finding much on ExtDB3, most content has been removed.

kindred zephyr
vapid scarab
#

Is there a way to generate a config into missionConfig with a script that runs during a mission initialization?

warm hedge
#

No, config is only predefined

winter rose
#

also, why?

manic kettle
#

Wrap it in an addaction and call it a day

leaden flare
manic kettle
#

You go to the garage editor and export the code. Then replace the code currently inside the addaction for that vehicle

#

Plus more tweaking if you want it to spawn on pads rather than near player

vapid scarab
meager granite
#

Wish you could do something like

HASHMAP = createHashMapFromArray [
    "_var1",
    "_var2",
    "_var3"
];

as a short for:

HASHMAP = createHashMapFromArray [
    ["_var1", _var1],
    ["_var2", _var2],
    ["_var3", _var3]
];
#

I dont like keys starting with _ though but you later can params it back into private vars

#

params HASHMAP as a short for values HASHMAP params keys HASHMAP too

#

Maybe params HASHMAP could add _ to keys if its not there by itself or something

wicked sparrow
#

Hey, I want to create a function that checks the whole inventory of the player for a few items that are provided by an array with number, if the player has these Items & the correct quantity it should return a boolean. So far I've got a array with all the inventory Items and a array with the item & quantity to check for. But now arises the problem. To check for all elements of the "ItemToCheck" Array I need to do a ForEach loop. But inside that loop I need to do another ForEach loop to loop the current selected _x through the whole inv to pushback all results into a output array. But how can I select the current selected Target from Array 1 (the ItemToCheck) which would be _x but inside the second array _x would be the current item from the whole players inventory. So I basically would have to check in the if statement is _x (Inv Item) equal to _x (Item to Check). But that does not work. Any Ideas how to solve that mess?

_itemList = [];
_itemToCheckFor = [];

{
    _x select 0;

    {
        if (_x == _itemToCheckFor) then {
            _itemList pushBack [];
        };
    } forEach _inventory;

} forEach _itemToCheckFor;

Thinks to note:

  • _inventory is an array of all the players inv. items.
  • _itemToCheckFor is an array that looks like this: [['ACE_packingBandage', 10], ['ACE_quikclot', 15]]
  • _itemList is the output array where every ACE_packingBandage or ACE_quikclot should be listed.
stray jackal
#

Any easy way to put an add action on a serverside spawned object? I tried passing the object via a variable through remoteexec. But the add action isn't showing.

warm hedge
#

addAction can take global arg so you can simply put 0 into the target

#

If it doesn't work, please show the code

winter rose
stray jackal
#
    
    
    _StartSwitch addAction
    [
        "Begin Solo Arena Challenge", //Text
            {//Script
                [_StartSwitch,_LeaveSwitch]remoteExec ["GKATSOlOArenaReset",2];
            },
        nil, //Arguements
        1, //Priority
        true, //showWindow
        true, //hideOnUse
        "", //shortcut
        "true", //condition
        10
    ];

#

Top part is passing the variables from server to client. Bottom is back from client to server

warm hedge
warm hedge
stray jackal
#

That's a remote exec to pass the object variables. Below that is the client file that's creating the addaction on the variables I passed

warm hedge
#

Okay, I don't really know what you mean.

  • pass the object variables
  • the client file that's creating the addaction on the variables I passed
    Really not sure what do these mean
#

In the first place, addAction is a local effect command. Which means, in order to have them on everyone's computer, you need to run it on everyone's computer

stray jackal
#

_startswitch and _leaveswitch are objects I created server side. I'm passing them through those variables through a remoteexec to a client side file I have in my mission.pbo. that client side file I then take those variables and place an add action on them, and then pass back the variables to a server side file.

Basically I want all the code to execute server side, but knowing the addaction has to be local. I'm trying to pass variables from server to client and back because of the add action.

warm hedge
#

What is clientsidefilename?

stray jackal
#

Placeholder for a client file where the server variables will pass to

#

Through the remote exec

warm hedge
#

Okay, I think I got the intention around there. So, the code that you posted, is running on the server?

stray jackal
#

Yea, I'm trying to create an add action on an object that will basically do a bunch of code server side. Where I'm struggling is finding a reliable way to put that add action on the object i intend to be used to start it all.

warm hedge
#

Okay, let's try to solvesqf [_StartSwitch,[ "Begin Solo Arena Challenge", /* omitted for a reason */ ]] remoteExecCall ["addAction"]

  • there is no reason to pass the variable into clients in order to have addAction into other clients
  • if you want to pass an object into remoteExec and use in it, you can pass like this
stray jackal
#

But how do you make that addaction execute a serverside file.

warm hedge
#

Not sure what is unclear and I am not sure what you mean too

stray jackal
#

The addaction with need to execute an .sqf file on the server, not on the client.

#

There's a server file I intend for it to execute

tulip ridge
#

Is the sqf file contained in the mission pbo?

warm hedge
#

But the addAction has to be run on every client no? That's why I use remoteExec (call) there

stray jackal
#

No, in a server side pbo I've created

#
  1. Server code compiles and creates object server side and assign it variable _startswitch

  2. pass _startswitch from server to client file via remote exec

  3. on client file, create add action on object _statswitch, that executes a server file.

#

That's what I'm trying to do

warm hedge
#

The _startswitch object is a global object right?

stray jackal
#

Server object

warm hedge
#

Okay let me rephrase: createVehicle or createVehicleLocal?

stray jackal
#

Createvehicle

warm hedge
stray jackal
#

Can you write out what you mean? Unfortunately not understanding

warm hedge
#

What is unclear?

south swan
#

any global object can be a direct target of addAction without messing up with transferring variable names between machines

stray jackal
#

If I create the vehicle on the server, how can I create an add action on it without needing to create some sort of client file.

warm hedge
#

That's what I'm explaining, I'm afraid

south swan
#

it's not "hey, clients, add an action to whatever you call _StartSwitch" from the server.

#

it's "hey, clients, add an action to this specific global object I CALL _StartSwitch"

stray jackal
#
[_StartSwitch,[ insert addaction script/array
]] remoteExecCall ["addAction"]```
#

Just like that? No need to define -2 or 0 or any JIP?

south swan
#

you define them if you need them. You don't define them if you don't need them.

stray jackal
#
[_StartSwitch,[ insert addaction script/array
]] remoteExecCall ["addAction",-2,true]```

Is this the correct syntax then?
#

I'll need to test whether the number for client vs global matters but I'll definitely need it added via JIP

south swan
#

[...] remoteExecCall ["addAction",[0, -2] select isDedicated,_StartSwitch], i'd argue. Target change for the stuff to work on player-hosted servers, JIP change to not break in case of object being deleted at some point in future

stray jackal
#

I'll give it a go. Thanks

still forum
grizzled cliff
terse tinsel
#

do you know any script to turn off the animation of the injured person, slow walking?

warm hedge
#

Limping you mean? I do not think there is than making a Mod to entirely remove that or disable leg damage by script

terse tinsel
#

Ok thx

meager granite
#

Turns out that "fake" HandleDamage is not fully fake. It can kill if 1 or more. Looks like it controls getBleedingRemaining value.

#

Doing 1 of overall damage (-1) to unit sets bleeding to 90

#

Guess head HandleDamage is some other hardcoded bullshit

meager granite
next kraken
#

hiho...im searching for a working script for dedicated servers, where i can addActions to an object and then remove them again

#

point is, that i only found removeAllAction codes with google search=.....

warm hedge
#
  1. addAction and store the return value locally
  2. removeAction if necessary
next kraken
#

sounds easy, but sadly im bad at scripting^^

#

can you give an example 😬

drowsy geyser
#

Is there a way to get the actual date a mission is played?

warm hedge
warm hedge
drowsy geyser
#

to return the real life day/month/year not the in-mission date

warm hedge
drowsy geyser
#

thank you

next kraken
#

U saved my Day.........! πŸ™‚ Thanks a tons POLPOX πŸ‘ blobcloseenjoy

winter rose
warm hedge
#

You're too late

#

I'm in UTC+9, you're +1 no? I won

winter rose
#

you were ahead all this time!

#

Discord failed me 😒

meager granite
#

Shooter calculates how much target bleeds, but target never does

#

That's why you never bleed from fire from remote units

#

Player 1 shoots Player 2
P1 POV: P2 bleeds
P2 POV: P2 never bleeds

#

Another hardcoded not-MP aware crap arma3

#

Wonder what that head damage does, probably something similar

#

@still forum How about fixing this?

  1. Get rid of bullshit HandleDamage calls
  2. Make bleeding MP-compatible after 10 years of it being a thing
still forum
#

:peepoleave:

meager granite
#

hmmyes FIX

#

Wonder if there is some network message to broadcast bleeding value, its completely local right now

#

New message type time!

#

Not sure what would be best solution though

#

Personally I'd be happy with:
description.ext:

noBullshitHandleDamageFires = 1;
sullen sigil
#

i love that emoji

winter rose
exotic tinsel
little raptor
leaden flare
next kraken
#

i still have no solution for using the BIS_fnc_kbTell on a dedicated server. it works, but in DIRECT channel-speech, the sentences of the topic show immideatly instead waiting for the sound to be played to the end and starting the new sentence of the topic

#

i tried to call it with spawn and remoteExec it, no chance. dialog of all sentences shows immediatly

#

maybe someone has a idea?

granite sky
#

@meager granite Ah so the first two are shooter-local, that makes way more sense. Any idea what it's doing with the head damage though?

meager granite
#

We need engine insight

granite sky
#

The local ones should really be a separate EH

meager granite
#

Or just use overall damage from normal EH for it on reciever side

granite sky
#

I don't suppose that's going to happen, but adding a shooter/target flag would make sense at least?

#

And then you can just ignore the shooter-local ones.

meager granite
#

Or some special selection name

#

"#bleeding" or something instead of ""

granite sky
#

Yeah but backwards compatibility issues.

meager granite
#

Still this whole thing doesn't work because this bleeding is local

#

only shooter gets it

#

Remote units never bleed from remote damage

granite sky
#

Although I imagine it's only breaking stuff atm.

meager granite
#

I'd just ditch it all together and re-implemented

#

Removing these weird HandleDamage calls and implementing them properly and MP-aware would be the best solution

#

Won't break much because this damage doesn't really apply unless >= 1

granite sky
#

Well, also because they were never documented or understood as far as I can tell.

meager granite
#

Nope, they aren't, borderline zero info about how bleeding works

#
if(_is_fake && _hit_index == -1) then {_wanted_damage = 100;};

setting overall damage in that bleeding HandleDamage EH doesn't do anything, only sets bleeding

#

=1 damage = 90 bleeding

meager granite
hallow mortar
meager granite
granite sky
#

hmm, the hitHead there is more of a shooter-local death calc?

#

Maybe used for faster hit responses (twitch, ragdoll)

meager granite
granite sky
#

If you block all the target-local damage, does that 1.01 on shooter-local still kill?

meager granite
meager granite
granite sky
#

Yeah.

meager granite
#
if(_is_fake && _hit_index == 2) then {_wanted_damage = 100;} else {_wanted_damage = 0;};
```no flinching, unit is invincible
#

No idea what this does at all, only kills unit if damage is around 1.01 or above but doesn't actually damages the head

#

Feels like some unused leftover for something to be honest

#

Probably alongside bleeding or something new-A3 features that weren't touched for 10 years

#

@little raptor Can you do an engine dive plz?

meager granite
little raptor
#

where the hell did that come from?! πŸ˜…
oof I can't even delete it...more useless Discord nonsense

meager granite
# little raptor not now. about what?

There are 2 weird HandleDamage calls that are done on shooter side, one for overall damage (index=-1) that controls the bleeding (only on shooter side too), another for HitHead (index=2)

#

I figured that setting that local HitHead damage to 1.01 (anything less doesn't do anything) kills the unit and HitHead remains undamaged

#

So I wonder what its for really

little raptor
#

make a ticket with repro and everything and I'll take a look tomorrow if I find time

meager granite
#

I'll have a ticket eventually to hopefully clean this ancient crap out

#

Alright

#

Sorry for ping

#

Will ping dedm*n next time hmmyes

meager granite
tulip ridge
#

Can you set a unit's icon via script?

little raptor
#

no

tulip ridge
#

Didn't think you could, saw setGroupIcon so wanted to check

next kraken
#

using addAction, is there a way to have no memory point instead of just a distance where the object can be picked up ?

next kraken
#

mhh

#

im using that

#

{
civ_1_Ende_action = dokument addAction ["<img size='2' image='\a3\ui_f\data\IGUI\Cfg\Actions\take_ca'/> <t color='#f59042'

font='PuristaBold' size='1.65'>Akte nehmen</t>","civ_1_Ende.sqf",[],10,true,true,"","_this distance dokument < 15",10,false,"",""];

#

trying to have a radius for it, but i have to point at the document

#

what im doing wrong😬

proven charm
#

if you want radius then you can add the action to player object

next kraken
#

yea, thats what i allways did

#

problem is, its dedicated server MP

#

so it show for all

proven charm
#

addaction has local effect

next kraken
#

yea, usually it does, but i need the action to be show for all players

#

thats why i remote it

#

now if one player is near it, gets the action, others get it to

tulip ridge
#

It doesn't "usually" only have a local effect, it always does
If it's for a mission, you can add it in initPlayerLocal.sqf

next kraken
#

omw

#

sorry

proven charm
#

you mean they get the action/option or the effect?

next kraken
#

i understood

#

the action

#

should work i test it now

vapid scarab
#

So im looking to make some modules. I want to pull this UI from ACE as a base, and im really just changing the function that runs from it. Where would I go to look for this specifically?

cosmic lichen
#

Cfg3DEN >> Attributes

vapid scarab
#

Thank you!

molten yacht
#

I'm having trouble with this code. sqf { [_x,artytarget,"",50,12,1] spawn BIS_fnc_fireSupport; } forEach units artyGroup;

This is just meant to have the group of MLRS artillery start throwing rounds at the artytarget gamelogic. But it says _magazine is undefined. Looking at the wiki, you're supposed to be able to leave the magazine field blank. Any ideas?

plain wolf
molten yacht
#

Hm, here's the RPT issue.

12:40:07 Error in expression <sClass (configFile >> "CfgMagazines" >> _magazine))) exitWith {["ARTILLERY SUPPO>
12:40:07   Error position: <_magazine))) exitWith {["ARTILLERY SUPPO>
12:40:07   Error Undefined variable in expression: _magazine
12:40:07 File /temp/bin/A3/Functions_F/Combat/fn_fireSupport.sqf..., line 50
12:40:07 Error in expression <sClass (configFile >> "CfgMagazines" >> _magazine))) exitWith {["ARTILLERY SUPPO>
12:40:07   Error position: <_magazine))) exitWith {["ARTILLERY SUPPO>
12:40:07   Error Undefined variable in expression: _magazine
12:40:07 File /temp/bin/A3/Functions_F/Combat/fn_fireSupport.sqf..., line 50```
tough abyss
#

so everyone is going to hate me for this but how do you guys think i could try to recreate this clip? im thinking just setvelocity downwards and to a side a bit

molten yacht
#

Adding the magazine makes it fail silently. They just do nothing. I'm going to try using coords instead of a target gamelogic

stray jackal
south swan
molten yacht
#

.....wait

#

OH WAIT

#

I'm iterating through the drivers, not their vehicles!

#

I think?

#

Okay yeah I'm iterating through just the gunners

#

I need to do like, vehicle _x instead probably

south swan
stray jackal
molten yacht
#

Hmm. So it's still not working.

#

I wonder if the function requires them to be in a state other than careless

#

Let's test that.

#

Okay, nope. Doesn't seem to matter what mode the units are in.

south swan
#

if the error message is the same - the only way i can see it to exist is for getArtilleryAmmo [_unit] to return an empty array. Read: attempt to run function on non-artillery unit.

molten yacht
#

It's not giving any errror anymore and the RPT isn't showing any either.

#

It's just silently refusing to fire

south swan
#

strange, it should fail with ARTILLERY SUPPORT: Delay cannot be less than 5 seconds!, not silently :3

#

increase the last argument in your code to 5 or more πŸ€·β€β™‚οΈ

molten yacht
#

huh

#

Not possible to have rocket artillery spam rounds like katyusha, hm?

stray jackal
#

_artyAmmo = (getArtilleryAmmo _artyvehs) select 0;

{
_x doArtilleryFire [[(_artylocation select 0),(_artylocation select 1),0],_artyAmmo, 3];
} forEach _artyvehs;

Alternatively, I have an artillery mission on my server, I use the following and it works.

molten yacht
#

I need to go back and check if the unique names are on the gunners or the vehicles.

#

Okay, it's the group.

#

So it's on the gunners....

#

Let's try using doartilleryfire instead of the BIS function.

stray jackal
# south swan missing a `,` after `_StartSwitch` in line 2?

Ok so the addAction was applied, I see it on the object. Now I'm getting errors client side, because the variables that reside on the server aren't getting passed to the client.

14:18:25 Error in expression <
[] call GKATSOLOArenaPlayerRadiusCheck;
_StartS>
14:18:25 Error position: <GKATSOLOArenaPlayerRadiusCheck;
_StartS>
14:18:25 Error Undefined variable in expression: gkatsoloarenaplayerradiuscheck
14:18:26 Error in expression <
[] call GKATSOLOArenaPlayerRadiusCheck;

#

How do you make that addAction, execute a serverside file

molten yacht
#

I didn't reuse your code but you did give me the idea to use that function

#

hats off to you

fleet sand
woeful sundial
#

anyone knows if i can add custom options to this? config?

molten yacht
#

..........Does anyone know how Camo Coefficient is calculated?

#

What attribute of a ghillie makes it hide you better, if it actually even hides you better at all?

stray jackal
#

I don't believe it innately happens in game for AI. You have to set the coef which somehow changes how AI detect you.

opal zephyr
#

@molten yacht There is a config entry called camouflage on uniforms that sets how likely it is to be detected. You can change said number with the setUnitTrait command during runtime

opal zephyr
tough abyss
#

^^ Critical sections work by abusing the condition statement in the SQF command configClasses which executes in a blocking fashion.

Is all config >> methods blocking in arma ?

molten yacht
#

oh, it probably wasn't changing because I was using it on AIs.

opal zephyr
#

It should still work, it will just affect other AI's from detecting them

dense viper
#

could someone please help with a script to turn a envoromental object hider into a crass cutter or the ability to hide grass and seaweed

stray jackal
#
[[_EnterGate,_ExitGate,_LeaveSwitch,_StartSwitch,_Gladiator], "GKATSOLOArenaStart"] remoteExec ["spawn",2]; //Starts the Arena

19:01:19 Error in expression <(_this select 0) spawn (_this select 1)>
19:01:19 Error position: <spawn (_this select 1)>
19:01:19 Error spawn: Type String, expected code

Still struggling with these remote execs, can anyone identify what im doing wrong

#
[
    _StartSwitch,
        [
            "Begin Solo Arena Challenge", //Text
                {//Script
                    params ["_target", "_caller", "_actionId", "_arguments"];
                    _arguments params ["_EnterGate","_ExitGate","_LeaveSwitch","_StartSwitch"];
                    _EnterGate = (_this select 3) select 0;
                    _ExitGate = (_this select 3) select 1;
                    _LeaveSwitch = (_this select 3) select 2;
                    _StartSwitch = (_this select 3) select 3;
                    _StartSwitch removeaction (_this select 2);
                    _Gladiator = _this select 1;
                    //
                    [[_EnterGate,_ExitGate,_LeaveSwitch,_StartSwitch,_Gladiator], "GKATSOLOArenaStart"] remoteExec ["spawn",2]; //Starts the Arena
                },
            _SoloArenaVariables, //Arguments
            1, //Priority
            true, //showWindow
            true, //hideOnUse
            "", //shortcut
            "true", //condition
            10
        ]
] remoteExec ["addAction",-2,true];
#

In total what I'm trying, passing an addaction to client (it shows up), that when triggered executes in a spawned environment a global server file

granite sky
#

Is GKATSOLOArenaStart a function?

stray jackal
#

its a precompiled variable i made global tied to a server side sqf file

#
private["_code"];

{
    _code = compileFinal (preprocessFileLineNumbers (_x select 1));
    missionNamespace setVariable [(_x select 0), _code, true];
}
forEach
[
    ['GKATSOLOArenaStart','GKATSoloArena\code\GKATSOLOArenaStart.sqf'],
    ['GKATSOLOArenaSetup','GKATSoloArena\code\GKATSOLOArenaSetup.sqf'],
    ['GKATSOLOArenaLogging','GKATSoloArena\code\GKATSOLOArenaLogging.sqf'],
    ['GKATSOLOArenaObjectCreate','GKATSoloArena\code\GKATSOLOArenaObjectCreate.sqf'],
    ['GKATSOLOArenaAISpawn','GKATSoloArena\code\GKATSOLOArenaAISpawn.sqf'],
    ['GKATSOLOArenaPayout','GKATSoloArena\code\GKATSOLOArenaPayout.sqf'],
    ['GKATSOLOArenaCrate','GKATSoloArena\code\GKATSOLOArenaCrate.sqf'],
    ['GKATSOLOArenaReset','GKATSoloArena\code\GKATSOLOArenaReset.sqf'],
    ['GKATSOLOArenaPlayerRadiusCheck','GKATSoloArena\code\GKATSOLOArenaPlayerRadiusCheck.sqf']
];
granite sky
#

probably just [_EnterGate,_ExitGate,_LeaveSwitch,_StartSwitch,_Gladiator] remoteExec ["GKATSOLOArenaStart", 2]; then

stray jackal
#

I'll try that thanks

ebon wing
#

Super quick question, if I want to prevent a crate from being pushed, or airlifted, just make it static, should I use or is there a better way, I want people to still open it```sqf

_myObject enableSimulationGlobal false;

tulip ridge
#

Could try attaching it to something, but I'm not sure if attached objects can be loaded

#

Like if you created a game logic object at the same position of the crate, and then attached the crate to it

ebon wing
tulip ridge
#

Wouldn't let you open the inventory

meager granite
ebon wing
#

But its possible to enable and disable it right?

tulip ridge
#

Simple objects?
No

ebon wing
#

Hey also, does Arma limit arrays to 2d? Or can I go wild?

tulip ridge
#

You can do nested arrays