#arma3_scripting
1 messages Β· Page 107 of 1
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.
you can create a function that operates locally that stores the things you want in the client's profileNamespace. then you target remote execute that function when you want to save it.
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.
That is the problem, I do not know how to get the players id/profile or whatever I can use for creating variable via setVar and target it using remoteExec. π
If a unit dies, I don't know how to extract that player information from it.
tell me exactly what you want and I can show an example
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.
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)
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.
The owner _unit is the same as player's profile?
it tells the remoteExec which client to say, "hey I want you to run this function". in that function, all you need is profileNamespace because its being run locally on that machine (remoteexec told it to)
Is there a way how to do it from server without remote calls, that seems as unnecessary to me?
// 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];
no, setting profilenamespace stuff needs to be local
So far it worked, when I put it in onPlayerKilled.sqf, the loadout saves correctly.
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.
i think he wanted it persistent between missions
Or the last really.
Just between spawns, but if it could be between reconnects it would be even better.
oh i was thinking you wanted it "persistent" which means between any mission to me
if you are doing it through onPlayerKilled.sqf then you don't need the server to actually handle anything at all. you can keep it all local.
I thought that onPlayerKilled script is executed on server.
nah I use it for insta black screen/gurgle death sounds. its local.
Thanks guys @fair drum @granite sky
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
Readable to who?
anyone viewing the objects init the object with its init being posted to steam as a comp
You mean obfuscate the code so its not readable?
if its not readable that works
Code contained entirely within the init field and published through the Steam-based compositions system? No, there's no way to obfuscate that.
anyway to obfuscate code in mission files?
no
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.
obfuscating code is a pointless exercise
i just wish for code to be non readable 
why
competitors stealing code
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
not mods but i guess it'll just happen
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
Regardless of code complexity, you don't have a choice for compositions. The init field is the only way to include code.
probably shouldnt be in the composition format if its that complex π€·
is there any way to disable that the AI will fall to ground if a car rams it ?
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.)
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.
Hey Is there a way to safely disable hit animations/feedback from happening when soldier is hit with bullets? So when bullet hits soldier nothing is animated/twitching/that weird flexing movement. Last few days I started play R6:RS from 2003 and models there dont have hit animation feedback and o...
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 
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];
In which situation?
In all of them it always return default. No matter what player has in hands.
Thank you very much.
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
Wish there was HandlePreDamage that gets fired at shooter side BEFORE damage gets sent to reciever (and over the network if remote)
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
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]);
};
};
*ChatGPT's code
got the idea from here
https://forums.bohemia.net/forums/topic/222808-solved-get-3d-positionof-doors-for-building/
I googled the crap out of this and couldnt find an answer. How do I get the ASL positions of doors for a building? The code below correctly finds all the door selections for the house. But it does not place a helper object at the physical position of the door. _house = nearestBuilding getMarkerPo...
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
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);
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
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. π€
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
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
Thank you very much
you mean like this: remoteExecutedOwner ?
Yeah, only server knows owner of entities, other clients have to ask the server
Roger! Thanks for the info to both of you π
Pretty sure it does, otherwise a lot of our stuff wouldn't work. I would guess that remoteExec always transmits to the server for target processing, even if you gave it player as a target.
What is the relation between the "Skill" attribute and all the sub-skills, like "general"? How do I set "Skill" via command?
This unfortunately does not answer my question. There is not explained the difference between the Skill slider, and sub-skill sliders.
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.
Thank you. You were right, at least partially, the "Skill" slider in Eden sets all sub-skills to the given value unless the specific sub-skill is overriden. Although, it seems that the "general" sub-skill is not the equivalent of "Skill".
Even on BIKI there is no clear explanation:
It mixes the terms of a raw "Skill" and a "general" sub-skill into one.
as long as its not limited by battleeye, you can
They're just the same thing. Skill slider controls the general subskill which is distributed across all other subskills
So after some testing, I find out this:
- "Skill" slider in eden editor sets all sub-skills to one even level unless a particular sub-skill is manually overriden.
- 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.
- General sub-skill should somehow affect the other sub-skills, but who knows how. It is supposed to be the main skill for all.
- All sub-skills are interpolated based on relevant CfgAISkill values, resulting in a sub-skill "finalSkill" value.
- 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.
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?
What do you mean by "script a container"
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
I'm trying to make a spawner for a container. The stuff you put in influences the units that spawn.
So, you put a uniform in the container and it spawns a soldier.
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
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.
I also found this write up on how to make markers operate with a trigger:
https://steamcommunity.com/app/107410/discussions/17/1696048879935324327/
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
Is it possible to activate voice chat from SQF?
@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.
yeah, there comes a moment when damage returned by the commands stop being useful haha. Good to know that "body" is the actual health
The general damage is separate again, I think.
So if you kill a unit with limb shots it dies without hitBody or hitHead changing.
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
incapacitated is a separate hitpoint.
It's another composite one with a funny formula. You can see it in config.
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
You need to call _condition1
It feels bulky to have a line that just says call _condition1; Is that really the only way to do it?
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
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
So you mean, is there any possibility to have no getDamage update but only a part of it, besides a scripted damage?
Yes
Good question π€
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
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
I did, but couldn't find any relevant info
Which vehicle or whatever you test on? Or "any"?
Last test was with a helicopter, but seem to happen on other too
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"?
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...
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",..........????????
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
- You 100% shouldn't use sqs
- selectRandom doesn't take argument on the left
Please tell us what is your script right now so we can point what's wrong easily
How do I make a random bot surrender at a small distance?
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
What exactly should be the condition to surrender?
Distance. If an enemy unit comes close, the random bot surrenders.
So, to clarify you want to have a way to tell the one who is tapping someone else?
Sure
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
Gotcha,
Do you think there is a better way to execute it other than on CursorTarget?
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
Gotcha, but does CursorTarget only select one "Target" or does it select several?
One, always one
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
?
edit: no errors present, just no effect
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;
Where is the origin of the script?
thats a question for me or nikolay π ?
nikolay. I almost always use reply if there is some posts between
What if you have, like hint or systemChat for debug to make sure the for itself is working?
I'm sorry, I didn't quite follow you
You're replying to the post that answering canadian not you
yeah, exporting the updated version of the script right now to test on dedi, ill let you know
@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"
β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?
You're replying to the post that is not related to you again, though.
One thing I don't get is, if you get close to an enemy, does it really need to be randomized? Let's say if you're close to the enemy A, but it could make surrender the enemy B who is 100m away?
Use distance command to get distance between A to B
Gotcha, Thanks
alternatively you could use nearestObjects and get the info you need, but distance is much more simpler and direct for what you want
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?
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
Check the article carefully. There is a way to remove
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
_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.
its a recent command change, its comprehensible
Again, please reply to the reply that replies to you.
...And I thought you want someone to surrender
stop using 'setPos' for the love of god
Leopard20; Tuesday, 10 August 2021
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.
So the hint does work?
it doesnt work when executed by the trigger with execVM, it works when executed in the developer console
And in latter case it skips sleep?
yep, exactly 
https://community.bistudio.com/wiki/Scheduler
This is the reason why it skips sleep - tldr, there are two environments, one allows you to sleep aka suspend a script, one doesn't
execVM creates a scheduled environment though
stop using 'setPos' for the love of god
Leopard20; Tuesday, 10 August 2021
yeah but i guess that the developer console might not?
Indeed Developer Console will run on the latter case
If it didn't, that would cause the debug console version to not work
do you mean in the redactor itself or as a file in sqs?
(I mean I know it doesn't, so something doesn't add up I guess)
Former. I would want to know if that was YOUR script or not, I guess not though
im using Leopard's advanced dev tools, so maybe it's different 
tho the loop still doesnt work in execVM which is the main problem
No, it's not my script. I got it off YouTube.)))).
Yeah that is strange at the glance but we eventually get it I guess. This runs on the (dedicated) server right?
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.
do you have 20 seconds to watch my video?
It will contain what I would like to see only in reverse so that a random bot does not have a weapon when I approach it, but on the contrary, he dropped the weapon and became neutral.
20 secs? I guess yes
Thanks for this code again, now i tried to adjust the position of the arrow by vectorAdd to spawn the arrow at the bottom center of the door but unfortunately this does not work for every door, would really appreciate any help, need to get the arrow at the bottom Center of a doorπ
the formula for damage to those hitpoints is in config? Or do you mean as the declaration of hitpoints and resistance/passthroughs?
If its the first one, that is precisely what im looking for and I would greatly appreciate a pointer on that π
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.
I'm having issues using this with items like goggles unfortunately, it worked for magazines, do you by chance have a suggestion for other item types?
thanks, i never knew the alternative syntax for these
guess what I have just noticed
48 remoteExec ["PP_fnc_setPostProcessingBloody", 0, true]
is missing ; ................
Hi, I have so little knowledge of getting object LOD and bounding boxes and somehow to use/get those from those to get the position of the door bottom center.
But I can always test and get back to you what I will find.
I issue with doors that aren't x size or their position in the house is somewhere else than the bottom floors?
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
Yeah i guess so, this is a community server so rpt access is very much restricted
I have no idea why it didnt throw an error in the editor
Do you have script errors turned on in the launcher?
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.
implemented pseudo-static members
:: operator accesses a objects prototype method/members
its essentially shorthand for _obj.__prototype
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/
Hey everyone, Im making a script that allows you to kick open a door to make breaching slightly faster. However, I do not want players to be able to kick open doors that open towards them, as that would be rather strange to say the least. In order to accomplish this, I need a way to determine if ...
you store the AI in a variable as an array of objects. you then delete all the objects using either forEach or apply
See CfgVehicles/CAManBase/HitPoints
Thank you Hypoxic for your reply. I don't quite know how to incorporate de-spawning into my code. I use this code within the trigger:
_grp1 = [getMarkerPos "spawn1", east, ["O_Soldier_SL_F"],0] call BIS_fnc_spawnGroup;
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.
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?
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
toFixed
ty
You can add a check to the start of the surrender code with your desired logic. For example
{
if (
_forEachIndex > 1 // surrender 1st unit
&& {random 1 > 0.5} // 50% chance for following units to NOT surrender via the continue
) then {continue;}; // don't surrender this unit
// surrender _x (what you already had here)
} foreach units gr1;
base
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;
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
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 π
with lazy eval you could
if (true && _condition1) then
because &&/|| accept code on right side, which is basically the same as doing a call
BIS_fnc_curatorObjectEdited which you can see in functions viewer
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.
(bob distance b1) < 10
how to make the group distance group? (any bot of the group against any opponent of the group?
Here's a snippet from one of my scripts that airdrops a vehicle from a plane:
_vehicle = createVehicle ["B_LSV_01_armed_F", _start_point_pos, [], 0, "NONE"];
_vehicle setPos [(getPos _plane select 0) + 22, getPos _plane select 1, getPos _plane select 2];
_chute = createVehicle ["B_Parachute_02_F", getPos _vehicle, [], 0, "NONE"];
_vehicle attachTo [_chute, [0,0,0]];
Please can you tell me how to do code formatting in messages here like with your recent post? Thanks
can I make so that you can't escape a dialog (and instead just opens/closes menu like if it was a display)?
See pinned #arma3_scripting message
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...
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
Thanks π
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;
Check when the player is no longer in the trigger area
deleteVehicle each ai
I putted this code and it doesn't work
- In your trigger, check if the player is not in the trigger area,
!(player in thisList) - If the player is not in the trigger area, use
deleteVehicleon each AI in the group
Wasn't exact code, if you just do deleteVehicle it's not going to work
{
deleteVehicle _x;
} forEach (units _grp1);
Still doesn't work. This is what I have:
Because the deactivation doesn't know what _grp1 is
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
Thank you Hypoxic for the guidance you provided. I still can't figure it out.
Second to last line should start with private _grp1 =
In "On Activayion" field with "private" and "getPosATL" instead of "getPos" AI will not even spawn now.
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;
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
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.
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;```
You are right, with CSAT soldier this line works: private _grp1 = [getPosATL spawn1, east, ["O_Soldier_SL_F"]] call BIS_fnc_spawnGroup;
However the de-spawn doesn't. Maybe it is the S.O.G DLC
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
Try subtituting your class name back in. I thought it was wrong before and got rid of it to not confuse people ctrl+f ing words in the the future since I posted it and then you said part of it worked.
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
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""
Thank you very much! Awesome!
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)"];
Ive been looking via google and here on the forums for any indication that this is doable via scripting. (No luck so far) Im attempting to add functionality where the rangefinder display you get in a tank gunner slot appears in slots that normally do not have the functionality. We use both RHS US...
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?
Didn't use that function much, I guess you need all 4 numbers for UI coordinates?
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
Using ACE?
no
Can you post the script?
{
_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
annnnnd changed up parent invokes to make it ... well work better
but it loops again, and they no longer fire
_thisObj::parentMethod.__call(_thisObj, arg1, arg2);
Does entering a camera with camCreate grab sound from the source or the players location?
Can you specify to use source sound or not?
that is how you call a parrent method
can you post the entire thing, can't see anything wrong with what you have there.
there is a magic __call function on functions
this script worked flawlessly until the recent update
Honestly, I'd log everything in there and compare the first run to the second
it'd be easier
yea thats what im about to do
adding a magic __apply method too
if anyone has done any OO JS
this is familiar territory
Hi, could you please give me an example of how to make groups with group names instead of single bot1 distance bot2 < 10?
Define where exactly is the position you want to get dist
Now that we have select -1, wish we had deleteAt -1 to do opposite of pushBack
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
#define POP(ARR) ARR deleteAt (count ARR - 1) 
Yeah, but that's so many commands
I guess it should be a new command then, popBack or just pop
arr deleteAt [1,true] to select and delete reversely?
inb4 deleteAtReversed to match forEachReversed

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

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.
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
inb4 the question is "how do i make R_1 give the order" and not "i can't execute it"
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.
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.
So which part you exactly want/still haven't achieved yet?
The fix seems to be to add this line before it:
waitUntil {!isNull (uiNamespace getVariable ["RSCDiary",displayNull])};```
However, I still don't know _why_ this is required in one mission but not the other.
That's it guys, thanks.
I've gone for the easy way.
At the waypoint where R_1 sideChat
I've put a 180 sec wait
Thanks
I've tried to help you and guess you don't really care about it?
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.
I just wanted to have a clarify
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?
Aperture I guess
But apperture I know of just makes your entire screen brighter or darker
Or what do u mean? Like flare aperatyre itself?
https://community.bistudio.com/wiki/Light_Source_Tutorial
One of these with flare and setDayLight on and the intensity cranked way up, probably
You're correct. I thought you want to have bright screen effect regardless you are at?
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
I will check it out
x39 that function doesn't really work
Ye I would love it to be visible during daytime as well thanks!
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"```
Thanks man, I do care about the help and I appreciate it. Sorry if you were offended. My level of English is very low and I have to use translators.
what am i looking at
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
thats a question for #server_admins
Something-something different loading times ends up with one script started later and RscDiary being initialized and not in the other
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.
Play a video on the players HUD like on a phone
Q: on "HandleDamage", directHit has a specific comment for fall damage ... but does directHit encompass indirect fire, splash, shrapnel, things of this nature? i.e. not being tagged by an actual flying round, something like that?
https://community.bistudio.com/wiki/Arma_3:_Event_Handlers#HandleDamage
No, basically only fall damage
hitPart can detect splash damage with that parameter, but handleDamage works differently and can only identify fall damage
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...
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
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";
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
source is vehicle, instigator is who pulled the trigger
so with no vehicle in the mix, if I am evaluating for instigator, then I pretty much always want instigator?
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
understood, got it, thanks...
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
You can remoteExec setMarkerAlphaLocal, I guess.
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
Do you have the controls defined under RscTitles?
hmm, no?
you could use a dialog and just intercept the esc press
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
yeah but then you are stuck in the game
you can't pause the game anymore
Does your display not close right now with esc? Are you creating it with createDisplay?
it doesn't
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
You could try using ctrlSetFocus and set it to your control
have never used it but that might work
doesn't seem to work
no mouse cursor
i can still move my camera around and move my character
hmm, perhaps its because your interactable objects (scroll bars) arent actually apart of the controls and the game doesnt see it as interactable?
46 is main display, you cant show a cursor over it can you?
why not make an rsctitle or a dialog?
they dont want it closeable with esc so that rules out the dialog
can titles have interaction?
you can always intercept esc x2
why not intercept it only when his dialog exist?
idk, they didnt elaborate, maybe it needs to be open for awhile
what can he possible be doing that requires esc usable when his dialog is up?
thats a good point
no idea what a RscTitle is
i have a mission startup UI (with a bunch of settings) and i don't want it to be exittable
and i also want the user to be able to pause the game
hmm, this seems similar enough, maybe you have already seen it
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"
"task_1" call BIS_fnc_taskState == "SUCCEEDED"
Actual savior, thank you
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
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
This mod says you need to whitelist the function Dr_fnc_updateDisplay for multiplayer use but can't find any examples on how to do it, anyone know how?
https://steamcommunity.com/sharedfiles/filedetails/?id=2981787966
Do you use cfgRemoteExec in your missions config?
https://community.bistudio.com/wiki/Arma_3:_CfgRemoteExec
Not certain, I use remoteExec a few times. Is that not associated?
No
Try to use it in multiplayer, if it doesnt work then look for where you define CfgRemoteExec
It works for me alone in multiplayer, will need to test with another player to make sure
how do I get the keyboard modifier key states? ctrl, alt, shift, left and/or right, and so on?
so if I install some general use EH on displayAddEventHandler, if I do not want to interfere with other key strokes, then I should return false, correct?
if you don't want the key to do the action associated with it, yes. ex: if you attach the EH to "w" but dont want the character to move forwards
not to "w" per se, but to watch for the modifier keys. everything else, including the modifier keys, I want to passthrough to which ever appropriate handlers are next in line.
Which EH do you intend to use?
"KeyUp", "KeyDown"
I thought maybe actionKeys, but that seems a bit far downstream of the key bindings themselves. I want something upstream closer to the keyboard.
which keys are you going to use with it?
I just need the states.
and in a way that does not obstruct other display bindings
ah, im not sure about distrupting other display bindings
you could try using false, im not sure how it would affect it
I seem to recall true/false signaling whether EH handled
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
@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;
};
}];
honestly, I am not looking to intercede actions. I really just want the modifier states. π
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.
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.
Didn't ever use unit capture but I see its just an array of transformations each frame
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
thx
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
mandatory "hidden attached unit that displays head/bust" conspiracy theory mention

What's interesting is that faulty HandleDamage calls are done 1 frame before HitPart and proper HandleDamage
and mostly mention HitHead/HitBody hitpoints, iirc
How can you even tell real HandleDamage fires from these fake ones that do nothing?
Yeah, its just head and overall damage
new damage doesn't change between fake and real HandleDamage
And I shot unit in the center, nowhere near the head (thus 0 damage in these fake fires)
but from within it - i don't know 
Yeah and it gets worse when you consider locality
You can't even use HitPart as a separator
yaaay, we're all constantly getting arma'd
If shooter and target are different clients

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?
I thought about keeping some internal values to tell if previous HandleDamage was fake or not, but it will break as soon as some scripting command changes damage somewhere
Yes, that's right.
Thus my recent wish.
HandleDamageWithoutDamagingMyBrain
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.
Apparently these fake HandleDamage fires only happen to units, can't seem to find any other vehicles that do that
hence
mandatory "hidden attached unit that displays head/bust" conspiracy theory mention
oh thanks sa-matraΒ°!
I think I have an idea. Looks like hit indexes are always ascending and if my recent observation that overall damage gets a HD fire first is correct, you can keep a counter of a previous hit index HD fire this frame. If handle damage is "head" without going through overall damage first, means its a fake HD
Fake HD always seems to follow "head" then "overall" pattern
While real HDs are "overall" then "parts"
How to catch event when player connected to UAV?
yeah this handledamage bs is partially why ace adds a special hitpoint for handledamage use
as its always the last thing to go off
Connected or controlling?
https://community.bistudio.com/wiki/getConnectedUAV each frame probably
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
private _pos = p1 modelToWorld [0,2,1.6];
_pos set [2, 0.5];
private _missile = createVehicle ["vn_sa2_ammo", _pos, [], 0, "none"];
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
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.
the solution is just creating an empty dialog
you can still escape it
there's no real solution?
is there a way to make this work for AI. I want it to strike any AI above a cerain altitude. This is practically a modified no fly zone script I have
https://pastebin.com/VT7GJBJA
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
SQFbin for some reason doesn't want to load
Wrap in forEach allUnits (or other units list you have) and change player to _x
I will run it in pararell with my player script (players are blufor but admins may control some opfor planes)
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
It happens to man units only though, not vehicles
im talking exclusively for camanbase too
hello im trying to save the loadout of a disconected person, ive tryied to use https://community.bistudio.com/wiki/Arma_3:_Mission_Event_Handlers#PlayerDisconnected
But the player object its not saved, so im quite lost on how to get the loadout
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
thankyou β€οΈ
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];
dostop _man;
_man disableAI "PATH";
``` is what I use
Will this go after BIS_fnc_spawnGroup or before within the code?
after
{
private _man = _x;
dostop _man;
_man disableAI "PATH";
} foreach (units _grp1);
Thank you
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?
yes && .. or .... "And"
thanks gonna go reinstall brain os rq
and my brain is fried now: https://github.com/NouberNou/carma2#advanced-concepts
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.
The overall damage value there is off-spec too, it's just the added damage, and doesn't include the current damage.
The head value is identical to the one you get next frame though, IIRC.
to debug this problem make sure all the values you pass to the respawn system/function calls are valid. if you pass for example a nil that would cause problems
like check all calls to BIS_fnc_addRespawnPosition have valid parameters
thx, will check.
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')"];
Is attachTo still supposed to disable collision of the object being attached? It doesnt seem to work with a unit
Do you have other code that is making the screen white or does it turn white with that setObjectTexture script?
yes
any guesses why it might not work?
as in the unit still has collisions?
yup
Just tested it with a rock, the rocks collision doesnt disable either, odd
Its a procedural texture that i am using there with text. But I only see white background and no Text the example on wiki is the same:
https://community.bistudio.com/wiki/Procedural_Textures#Text
Same with this no text shown on screen.
#(rgb,512,512,3)text(0,0,"Caveat",0.3,"#0000ff7f","#ff0000","Hallo\nWelt")
attaching to what
a little sprocket object used for testing
is it a physx object
if you change the background color, does it change accordingly?
changed it to another rock, which shouldnt be physx objects, still doesnt work
what are the classnames
Land_Small_Stone_02_F
No its always white.
The wiki doesnt actually say it disables collision, just posts and threads on the arma site
maybe it changed, idk
my capital ships system stuff has its collisions disabled
so maybe in movement or something? π€·
try changing the background color to #00000000
what do you mean "in movement"?
ah
Its same white.
change both the background and text to that value @fleet sand
Same
what is the cursorTarget you're looking at?
This is the screen i am looking at with cursorTarget: "Land_TripodScreen_01_large_F"
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
@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
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 ''
exactly
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?
_object setVariable ["varname", _value, true] will publish that variable globally.
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?
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.
why doesn't the CT_TREE example on the wiki (https://community.bistudio.com/wiki/CT_TREE#RscExample) work?
this element just doesn't want to appear, i have other UI elements like buttons and pictures set up that appear without a problem
did u add items to it ? https://community.bistudio.com/wiki/tvAdd
or whatever is right command π
yeah i did
i followed the second wiki example, now the frame DOES appear but adding items to it does nothing
It has no IDC
I was talking about the first one that just shows the class
make sure all defines are there like "CT_TREE"
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
nope, i made sure to import all of these at the top of my file
oops wrong link
Well, it works for me fine
this
The link you've send
That's not what the link is showing
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
yeah
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
Check the config viewer, you will see if a macro was not replaced by its value there very easily
Anyone had this before?: GIAS pre stack size violation
It's essentially "generic error in expression" - something not covered by other cases has gone wrong. Look for missing }, ), ], , etc, those are common culprits
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
The code it's failing in isn't in what you pasted.
Its line 4 in the above
yeah ok, I can't see anything either.
Annoyingly this worked before 2.14 π¦
The line it's quoting looks broken but I'd be surprised if it crashed the parser.
Check the params you send over to the script
_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
Did so and it was what I expected [1780211: empty.p3d,1780156: empty.p3d,1,31.098,2131.1,[200,0,0],70,0]
Good point
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
Interesting
lmao
good spot
That was it, thanks folks π
First time I've seen that error too, good learning
Seen it quite often but not caused by something like that.
I'd have expected that to just set the var to nil. Not sure if something changed.
It's literally always missing brackes or , for me
it's a "Generic script error" of old iirc. Just a bit more specific, maybe
Q: is there a way I can see which addMissionEventHandlers are there?
or rather addEventHandlers ...
I guess being more specific, which ones have actually been installed
like at run time
a whole lot of https://community.bistudio.com/wiki/getEventHandlerInfo calls then
one loop call, actually for each and every object/EH combo
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
};
I'm not sure that shows the actual code
Im pretty sure you can just use the player object
well, i can't find anything better
I assumed you could, just haven't been able to get someone on to test yet.
Figure you can do this:
[params] remoteExec ["SomeFunction", _otherPlayer]
Yes, exactly
yup that will work
Sick. Thanks guys
Wrong person :P
oops
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]] ?
parseSimpleArray
Thanks, I searched a lot for exactly that command. 
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?
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
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?
you would have to put setCaptive false in the de-activation portion of the trigger
The question is: how to get the units to setCaptive false when they're outside of it?
Haven't tested, but I'd assume the trigger loses reference of what players to put setCaptive false on?
At least for server-only trigger. For global trigger each player's copy can just check the local player π
Something like this?
Condition:
(vehicle player in thislist)
Activate:
{
if ((vehicle player in thisList) && (vehicleVarName player == "opforHeli2")) then {
player setCaptive true;
};
} foreach thisList;
Deactivate:
{
if ((vehicle player in thisList) && (vehicleVarName player == "opforHeli2")) then {
player setCaptive true;
};
} foreach thisList;
no, thats checking incorrectly
would need to be something like if (vehicle _x isEqualTo "opforHeli2") then
So replace all player mentions in the loops with _x?
yes
And maybe replace player in condition with this? I'm not always sure how you refer to the correct unit sometimes
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
no
Alrighty, I'll give it a test, thank you
Doesn't seem to work but I made this that works if (_x in opforHeli2), now I just need to work out making the Trigger activate when the heli enters the Trigger. Thought I could do something similar like this for the condition (thisTrigger == opforHeli2) but apparently not
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
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
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]
Just tested it, looks like they both show values you'll get in proper HD fires
That's only true if the current damage is 0.
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];
Just tested it, looks like "head" (-2) passes current damage while "overall" (-1) passes added damage

odd
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]
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
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"]
You mean lots of hit points?
yeah, like it somehow deals damage to pretty much every hit point.
...and then ACE tries to reduce it to one :P
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
haaaaaaaaah please use pastebin Γ©_Γ¨
Wait does setCaptive temporarily make the player part of another team or somemthing?
it sets them as civilian
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
not temporarily, sets to civilian. if you want to maintain side-dness, then you need to track the original side as a variable on the unit object, or something like that. I happen to do that in the mission I am working on.
They have it set to independent, since they're just doing one side they can assume the unit will be set back to independent
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'
IDK, Zeus, control, etc, I'm just telling setCaptive. you have to track the original side, if you want to return in some way to that side, group, whatever.
Sorry, will do next time
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
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;
}
];} ```
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.
not only that, the shooter actuaklly receive damage from shooting from 50cals like the Lynx
Is there a way to generate a config into missionConfig with a script that runs during a mission initialization?
No, config is only predefined
also, why?
If you mean textures/configurable things in the virtual garage editor... there is a button in the virtual editor that let's you export code that spawns vehicle how you set it up.
Wrap it in an addaction and call it a day
So I have the code on a laptop to spawn a vic in in game, how would I add this to the code to have it spawn the preset way each time
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
a stupid reason. Just curious really.
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
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.
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.
addAction can take global arg so you can simply put 0 into the target
If it doesn't work, please show the code
fair π I can understand!
_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
For a quick note, you can nest forEach's if you want. In order to use outer _x, assign _x into a variable```sqf
{
private _outer = _x;
{
systemChat format [_outer,_x];
} forEach ["a","b","c"];
} forEach ["1","2","3"];
Okay how exactly you do addAction? I see no remoteExec around there
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
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
_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.
What is clientsidefilename?
Placeholder for a client file where the server variables will pass to
Through the remote exec
Okay, I think I got the intention around there. So, the code that you posted, is running on the server?
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.
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
addActioninto other clients - if you want to pass an object into
remoteExecand use in it, you can pass like this
But how do you make that addaction execute a serverside file.
Not sure what is unclear and I am not sure what you mean too
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
Is the sqf file contained in the mission pbo?
But the addAction has to be run on every client no? That's why I use remoteExec (call) there
No, in a server side pbo I've created
-
Server code compiles and creates object server side and assign it variable _startswitch
-
pass _startswitch from server to client file via remote exec
-
on client file, create add action on object _statswitch, that executes a server file.
That's what I'm trying to do
The _startswitch object is a global object right?
Server object
Okay let me rephrase: createVehicle or createVehicleLocal?
Createvehicle
Then there is no reason to have step 2 and 3, just this will execute addAction into everyone's computer unless you have some intention to have the script in client
Can you write out what you mean? Unfortunately not understanding
What is unclear?
any global object can be a direct target of addAction without messing up with transferring variable names between machines
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.
this^
That's what I'm explaining, I'm afraid
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"
[_StartSwitch,[ insert addaction script/array
]] remoteExecCall ["addAction"]```
Just like that? No need to define -2 or 0 or any JIP?
you define them if you need them. You don't define them if you don't need them.
[_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
[...] 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
I'll give it a go. Thanks
interceptDB exists and seems to work. Though I don't have much time to maintain it... Though neither does extDB I guess
No Linux though (Not because it wouldn't work but because I don't have time to do it)
despite brain fry, still working: https://github.com/NouberNou/carma2#critical-sections
do you know any script to turn off the animation of the injured person, slow walking?
Limping you mean? I do not think there is than making a Mod to entirely remove that or disable leg damage by script
Ok thx
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
Ok thx i try
This is unrelated to your question
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=.....
addActionand store the return value locallyremoveActionif necessary
Is there a way to get the actual date a mission is played?
{
somePrefix_action = someObject addAction ["brabra", {true}];
} remoteExecCall ["call"]```
```sqf
{
someObject removeAction somePrefix_action;
} remoteExecCall ["call"]```
What is the actual date?
to return the real life day/month/year not the in-mission date
thank you
U saved my Day.........! π Thanks a tons POLPOX π 
systemTime/UTC?
Also its the same reason why HandleDamage fires for remote units
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 
Wonder what that head damage does, probably something similar
@still forum How about fixing this?
- Get rid of bullshit HandleDamage calls
- Make bleeding MP-compatible after 10 years of it being a thing
:peepoleave:
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;
i love that emoji

Thank you for the response. I will look in to interceptDB
ask them in #western_sahara
Thanks π
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?
@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?
nope, can't figure it out, seems to do nothing π€
We need engine insight
The local ones should really be a separate EH
Or just use overall damage from normal EH for it on reciever side
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.
Yeah but backwards compatibility issues.
Still this whole thing doesn't work because this bleeding is local
only shooter gets it
Remote units never bleed from remote damage
Although I imagine it's only breaking stuff atm.
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
Well, also because they were never documented or understood as far as I can tell.
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
if(_is_fake && _hit_index == 2) then {_wanted_damage = 1;};
```Unit is alive is fine, no head damage.
```sqf
if(_is_fake && _hit_index == 2) then {_wanted_damage = 1.00001;};
```Kills the unit, `HitHead` is still undamaged after the fact.

borderline zero info about how bleeding works
Bleeding works?
Its just visual bleeding though
hmm, the hitHead there is more of a shooter-local death calc?
Maybe used for faster hit responses (twitch, ragdoll)
Doesn't work with 1.00001 anymore but I swear it just worked. Kills with 1.01 though
If you block all the target-local damage, does that 1.01 on shooter-local still kill?
Twitches even when EH returns 0 (_wanted_damage in my script)
You mean 0 damage on everything but that fake head EH?
Yeah.
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?
Guessing this because behaviour is the same in the very first public alpha of the game
not now.
about what?
where the hell did that come from?! π
oof I can't even delete it...more useless Discord nonsense
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
make a ticket with repro and everything and I'll take a look tomorrow if I find time
I'll have a ticket eventually to hopefully clean this ancient crap out
Alright
Sorry for ping
Will ping dedm*n next time 
Doesn't kill remote unit thankfully, didn't see any side effects
Can you set a unit's icon via script?
no
Didn't think you could, saw setGroupIcon so wanted to check
using addAction, is there a way to have no memory point instead of just a distance where the object can be picked up ?
sure
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π¬
if you want radius then you can add the action to player object
yea, thats what i allways did
problem is, its dedicated server MP
so it show for all
addaction has local effect
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
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
you mean they get the action/option or the effect?
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?
Cfg3DEN >> Attributes
Thank you!
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?
Put a value on your magazine?
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```
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
Adding the magazine makes it fail silently. They just do nothing. I'm going to try using coords instead of a target gamelogic
Tell me if it works or not
https://pastebin.com/h5KGMXYQ
@warm hedge
Thoughts on this? Tried editing syntax a few times and can't get this to work.
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
by the quick look at the function's code - that can happen if non-artillery unit is given to the function π€·ββοΈ
.....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
missing a , after _StartSwitch in line 2?
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.
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.
It's not giving any errror anymore and the RPT isn't showing any either.
It's just silently refusing to fire
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 π€·ββοΈ
_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.
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.
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
Okay, so doArtilleryFire makes them fire off exactly like I wanted, thanks for that
I didn't reuse your code but you did give me the idea to use that function
hats off to you
myb try setting mass to really low
anyone knows if i can add custom options to this? config?
..........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?
I don't believe it innately happens in game for AI. You have to set the coef which somehow changes how AI detect you.
@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
very likely, probably just needs some poking around the config/scripts for that mod
^^ 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 ?
oh, it probably wasn't changing because I was using it on AIs.
It should still work, it will just affect other AI's from detecting them
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
[[_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
Is GKATSOLOArenaStart a function?
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']
];
probably just [_EnterGate,_ExitGate,_LeaveSwitch,_StartSwitch,_Gladiator] remoteExec ["GKATSOLOArenaStart", 2]; then
I'll try that thanks
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;
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
Could making it a simple object work?
Wouldn't let you open the inventory
All hardcoded, can't be done anything to it.
hmm
But its possible to enable and disable it right?
Simple objects?
No
Damn
Hey also, does Arma limit arrays to 2d? Or can I go wild?
You can do nested arrays
