#arma3_scripting
1 messages · Page 19 of 1
I'm trying to make an NPC that the players have to put into a dedicated vehicle so that they don't die, but I'm quite new to arma mission making and don't know much about scripting. could anyone help?
more specific
how do you want them to put the dude in the vehicle?
one way is having the unit join their group and having the group leader order the AI to get in the vehicle
or you could put an action on the guy to load him into the vehicle. This could also be combined with a system to move him, either your own or you could try the ACE mod's handcuffs and escorting
thank you
trying to figure a way to detect if a player enters an area in MP, but have it be exclusive to each player
right now I globally execute a function which creates a trigger which has its global flag set to false. So every client should have its own trigger for anyplayer present. If worst comes to worst I can just catch the global execution of the trigger with if (player inArea _trg) but I'd rather not execute that check on every single player's machine for every player who enters the area.
He will be wounded so they can load him into a Vic using ace
I’m thinking of having it detect whether the “squad” enters a trigger area (by squad I mean the npc)
Would that work?
what would the trigger do? I dont see why you need to detect when the players enter to load the guy in
Kill him, unless he’s in an ambulance/medical vehicle
oh that isnt too complex actually, let me look some stuff up real quick but I think I know how to go about it
Alright, thanks!
I might have my do not disturb turn in since it’s late but I will check when I can.
ugh, I know how to do this though code, but I dont know how to do it using the editor properties for triggers 😆
this might not be exactly what you want though. This will detect when the injured man (with the variable name hurtMan) enters the trigger area. If he isnt in the ambulance when he enters the area, then he will die
Yes that’s exactly it! Thank you!
you can change "C_Van_02_medevac_F" to the class name of any vehicle you want
that will be the vehicle that will protect the guy
Thank you Ajdj100, very cool 😎
perhaps … it feels like something else tho
how is a lobby slot evaluated as joinable/not occupied?
here is how the bug presents to players (and why skipLobby cant be used)
Ah ARMA. Don't you just love all the juicy and inconvenient bugs? Well, we wouldn't have it any other way..
Today's video features the solution to the very annoying and very common receiving data bug players often face when trying to access multiplayer lobbies. Luckily, this bug is as easily fixable as it is identifiable.
~Enjoy
Discord: S...
if a player ingame is in the glitched state where he appears as “Error: No unit”, will his slot appear joinable in lobby?
From my experience their slot would still be occupied
error no unit used to happen when you tried name command on dead unit
Pretty sure I had cases where remote players returned "Error: No unit" on "name"
Seeing players with no group is a very common occurrence in multiplayer, see it almost every day
isPlayer => false, group => null
Anyone know of a good way to check if an object is a drone?
Currently I'm using "isKindOf" and checking these base classes,
uav, UAV_01_base_F, UAV_02_base_F, UAV_03_base_F, UAV_04_base_F, UAV_05_Base_F, UAV_06_base_F, UGV_01_base_F, UGV_02_Base_F
I'm sure not all drones have these bases, and using this method, I'm sure i could never check for bases of drones from all the mods out there. Seems like there would be a better way to go about it.
getNumber(conifgFile >> "CfgVehicles" >> typeOf _vehicle >> "isUav") > 0
Can get all of 'em with allUnitsUAV as well. Then check if something is a UAV with unitIsUAV.
https://community.bistudio.com/wiki/allUnitsUAV
https://community.bistudio.com/wiki/unitIsUAV
indeed.
does this check ugv's as well?
Alternatively, getNumber (configOf _vehicle >> "isUAV")
Basically the UAV term here is just drone
Wiki says it does
Most bizarre MP bug I've seen was OPFOR groups all being null. At some point all clients started seeing OPFOR groups as nulls, allGroups returned bunch of nulls and then other side groups fine, rejoin didn't help, only server restart helped.
Even have a screenshot somewhere, really weird stuff
I've seen a similar thing as well. Server restart fixed it so I chocked it up to Arma being Arma
so im modifying some code, why would one use removeMagazineGlobal in a loop rather than removeMagazines?
removeMagazineGlobal affects every client
removeMagazines will only remove the magazine for the client executing the command
ahh, ill leave it then
can you repro it?
Are you sure about that? It's LA but I'm slightly dubious that it's also LE
no, happens randomly
yea these are "busy multiplayer" issues
only workaround for the "receiving data" bug i can think of, is for player to be dropped into a random lobby role when "skipLobby" is used, instead of "first available". that way if the first available role is glitched, they can re-attempt entry and probably get a different non-glitched role @unique sundial
skipLobby randomly kicks players off the server on round end for us, did you see this happen as well @pulsar bluff ?
What's the modern approach to get view port zoom level?
So I have some functions; when an object is hit with a weapon, it's supposed to move. This works, in a fashion, but it's not perfect yet; in SP its fine, in MP the object will move on some machines, but take several seconds to move for others, which is a bit of a problem when the one with the delay is the one trying to move things around.
The relevant parts of my script:
https://sqfbin.com/wapawasogiguqecukedi
the Destroy function at least works smoothly, so I'm assuming it's a problem with propagating the new position/direction of the object.
Are you trying to move island-placed objects?
also be careful with switch as it is case-sensitive, currentWeapon returns classes with whatever casing config has
depends on the "hitObject"'s simulation
some objects take too much time to sync, because they're meant to be static
That is an excellent question; the objects are buildings placed via SOGPF's Mike Force building system, so I'm not sure how they are handled, locality speaking. Things like trenches, bunkers, towers, etc.
So not map-objects, mission specific ones.
well that's obvious. you can't move terrain objects anyway
but anyway, since they're buildings, the sync delay is obviously huge
you can try remoteExecing the setPosASL on all clients, but not sure about any side effects
Like, amplifying the movement x the number of players, sort of thing?
setPos* on remote entities will generate network messages
While locally position will update when engine decides to
hmm. Might work if you moved it far away and back again :P
(remoteExec setPosASL is probably preferable)
Another hacky solution would be broadcasting position and orientation everywhere, then creating a dummy local object on that position on remote clients, then attaching your object to that local object, then deleting it
This way you'll move the object without any network messages to everyone from each client
If waiting for the engine to update position globally is the issue
if not then just remoteExec setPos* commands to where object is local
If its an island object, then you'll need to do setPos on each client
By island object I mean getObjectType _object != 8
Ech... remoteExecing the move seems to have broken the action :/
Paste remoteExec line here
'... call BIS_fnc_callScriptedEventHandler;
|#|if (count _bypass_projectile >0 && {_by...'
Error if: type String, expected Bool
[_hitObject, _dirElev] remoteExec ["setposatl",0];
Ah, I think I follow. Since I have it running as a mini-function and the last line is the remoteExec, the call's final line is a string rather than a bool?
your {} must return bool for it to be used in condition\lazy &&
Yeah, capped it with a true;, and that cleared the error.
Unfortunately, the multi-jump is now in effect T_T
Even in single player, which is bizarre.
Damn... was hoping it was just a matter of trying different setpos*'s, but no dice.
Double damn, trying to do the invisible helipad attachTo workaround but it keeps shooting off into the stratosphere T_T And I can't imagine 'delete object, create new object at new position' would be much better.
Yeah, doubly so since that'd interrupt the whole Supply system of MF.
Do you actually need the position to adjust immediately for other players, or just the user?
Because otherwise you could hide the real object locally, create a local copy and move that around.
The actual speed of the change is a bit of a tossup, if it moved for the user actually doing the thing, it'd be fine - but if other players are nearby, it'd be nice for the object to move in the same moment so they don't get surprised and have !!fun!!.
And creating a copy is a no-go, this is for SOGPF's Mike Force, so the objects have a whole supply system to keep them active. Granted, I usually handwave that kind of needless pedantry in favor of gameplay, but in this case I'd like to keep it closer to the original intent.
That's not a problem is it? The real building is still there, just hidden to one user and not syncing very often.
Maybe we need a forceNetworkUpdate command :P
Is there any good way to do a plus/minus function?
plus minus function?
For what ?
Number +/- number
I'm trying to place another object randomly within 100m E/W and 100m N/S of the first object
_obj setPosASL (getPosASL _firstObj vectorAdd [random [-100, 0, 100], random [-100, 0, 100]])
Won't that only place it somewhere randomly to the north or east of the first object? Never south or west
100 - random 200 🤷♂️
Fair
use the other random then
I didn't like it's distribution. Gonna just do the 100 - random 200 solution
Was there a command to return attachTo offset or do you have to calculate it yourself?
no
Q: re: map shapes i.e. ellipses and such...
I have a default shape working on the default map...
IIRC, when I have a second map control, i.e. in a dialog, that needs to be a second shape, correct?
The awkward part, IMO, is that markers are ubiquitous (?) i.e. regardless of the map control (view) ...
I don't understand the question
are you trying to have 2 different shapes for 2 different map controls?
I have one shape, it is showing on the default map control. Do I need a second shape for the second control?
Which seems different from map markers.
Holy shit help me out here;
I'm trying to take a brick explosive which lays flat on the ground, tilt it 90 degrees forward so the panel is facing out and then 90 degrees counter clockwise (-90) so it sticks to the side of a car.
I've been trying to wrap my head around this setVectorDirandUp for hours and nothing I input gets me even close, most just ending up at some vague 45 degree angle. Is anyone able to help me out?
Howdy all, random question: Is there a way to make a player no longer be able to control their vehicle? i.e. say they take enough damage to the controls, the controls stop responding?
specifically for aircraft
Vectors aren't in degrees, so forget about all that :P
Place a C4, name it, and start the mission. Then use the debug console to do setVectorDirAndUp on it so you can see your changes live without restarting every time. Change one axis at a time in small increments (remember, 1 is a lot) until you figure out which way each axis rotates it. You'll get there in the end if you take it cautiously.
to clarify, no, I want the "same" shape (loosely speaking) appearing on two different maps.
seems like I need two different shape updates, one for each map control?
no. markers properties apply to all controls
it is not a marker. it is a drawn shape.
do you have a normal?
marks do appear on multiple map controls. that's fantastic... the shape does not.
you mean drawIcon?
no
then I have no idea what you mean. you say it's not a marker and it's not an icon. then what is it?
i.e. _mapCtrl ctrlRemoveEventHandler ["Draw", _ehID]
... literally drawEllipse, or drawRectangle or whatever...
you can override the game controls while the player is in the aircraft
Which call allows for that?
well then it's a draw. that's what I mean
you need individual Draw EHs for each map control then
okay, that's what I was figuring. thanks...
it's not just a single "call". you need a keyDown event handler
which returns true to override the keys
you can use actionKeysEx to get the keys for aircraft controls and override those
Can this also be applied to joystick?
it should. try it out
Awesome! Thank you, sir!
I haven't tested anything analog with keyDown tbh
for testing, get into an aircraft, then run this and try moving your joystick:
findDisplay 46 displayAddEventHandler ["KeyDown", {
params ["", "_key"];
_key > 1;
}];
if the aircraft still responds then it won't work
Will give it a whirl
hey just a quick question, is it possible to write to a txt file with sqf rather than logging to rpt?
no
unless you use an extension
i want to use the "look at command" but im new to scripting is there a tutorial or someone can help
Help me out here
private _goat = synchronizedObjects thisTrigger; _expl1 = "DemoCharge_Remote_Ammo" createVehicle position _goat; _expl1 attachTo [_goat, [0.15, 0.30, 0.60], ""]; _expl1 setVectorUp [1,0.001,0.001];
The bottom 3 lines of that work perfectly if I name my animal goat and remove the _ in front goat. I'm trying to add something like the top line so that I can have as many of these as I want and I don't have to rename each goat as goat 1, goat 2 etc etc Is there any reason what I'm doing is failing? Is there a way that would work?
synchronizedObjects returns an array, not an object. So you'll do something like this:
private _goats = synchronizedObjects thisTrigger;
{
_expl1 = "DemoCharge_Remote_Ammo" createVehicle position _x;
_expl1 attachTo [_x, [0.15, 0.30, 0.60], ""];
_expl1 setVectorUp [1,0.001,0.001];
} forEach _goats;
Not throwing errors, but not spawning the explosive and placing it on the goat sadly
Wait, sorry it's working perfectly
Gotta love coding overtired 😛
Yeah works like a charm, thanks a ton mate
is there any way to disable 3D markers and map markers (i.e. where players are on the map, but not enemies) in script? or is this only done in difficulty options?
Hello, I currently have a problem with ending a mission in multiplayer.
I use ["endDeath"] call BIS_fnc_endMissionServer; when all players are dead and all respawn tickets are exhausted.
But the closing shot seems look quite bugged (https://imgur.com/a/fx7yW0x). This does not happen when I end the mission while I am alive (everything looks normal there).
How can I fix this?
The Debriefing class looks like this:
class endDeath {
title = "MISSION FAILED";
description = "All defenders were killed.";
picture = "KIA";
};
It should not have the big blue square and neither the 0 below it.
Which it also doesn't happen if I end the mission the same way while I am still alive.
Force closing the map, switching the camera or force respawning the player does not seem to fix this.
Even with a delay after all of that and any combination of the above.
That looks like the game showing the ticket count for BLUFOR to me. I'm hesitant to describe it as bugged because it's probably supposed to do that.
Probably, but why does it do that when I use a custom debriefing class?
endDeathisn't a custom debriefing class, it's one of the default ones and you're overwriting its content- this may be something it does automatically when the mission ends with 0 tickets, not part of the debriefing class
- the mission may be automatically ending itself because you're out of tickets (this is controlled in the respawn template settings) rather than using your endMissionServer call
nah, its not ending itself. I already checked that. The timing is consistent with my sleeps and such in my script where I check if the mission should end.
It probably really is that it only happens when the tickets are zero. Hm... maybe I can increase the tickets before ending.
This certainly is very weird, since when I increase the tickets again it still shows the "wrong" debriefing screen.
And the "Tickets" Template itself also doesn't call or run any mission ending functions.
I've now even check BIS_fnc_endMission and BIS_fnc_endMissionServer and neither seems to special case the debriefing screen for tickets.
Even failMission, an engine command, seems to show the ticket debriefing screen.
So I guess this is an engine limitation then and I would have to make my own ticket system.
i want a helo gunner to sweep an area left to right
i found this [_someSoldier, _otherSoldier] lookAt markerPos "markerOne";
this will not make the helicopter move
use waypoints or doMove maybe
no im talking about the turret
the heli stays in place and the gunner looks left and right
You may be on broadly the correct track, but you'll need to look at (hur hur) the documentation for lookAt (https://community.bistudio.com/wiki/lookAt) and see how the syntax works to implement it properly.
idk how to write the position (im new to scripting )
helogunner lookAt [100, 100, 100]
is this correct ?
That's correct as long as the [x,y,z] coordinates you want them to look at are [100,100,100], which seems somewhat unlikely
i have no syntax error
hello
can anyone tell me how to script an ai to follow his waypoints without turning left or right or doing stuff to protect himself when the enemy is shooting him?
Try this lot:
{
_unit disableAI _x;
} forEach ["AUTOTARGET","AUTOCOMBAT","SUPPRESSION","WEAPONAIM"];
_unit setSpeedMode "FULL";
_unit setUnitCombatMode "BLUE";
_unit setCombatBehaviour "AWARE";
Taken from this mod: https://steamcommunity.com/sharedfiles/filedetails/?id=2654482940
how can i make ai get out of helo when it lands
Crew or passenger group?
2 pilots
leaveVehicle is pretty effective. You can even call it in mid-air and they'll land to get out :P
Hello, im looking for a little help. I need a way to rearm a plane with a code, so the players can rearm it interacting with an asset and not having the zeus doing it. is there a way or some code that i could use
What's the reliable way to delete dead unit from the vehicle?
deleteVehicleCrew doesn't work properly
Even executing it globally doesn't work, funnily enough it deletes it everywhere except where unit is local
Deletes after few seconds too
deleteVehicle is fine now, I think.
No, deleteVehicle does nothing
Huh. I thought they fixed that.
Nope, nothing happens
Actually, something happens
Unit deletes everywhere after some time
Except where it was local

I test it with unit on turret though, so it might be turret switching locality back to vehicle owner and it triggers unit disappearing
Locality didn't change
Maybe since player has a phantom dead body on that turret locality jumps back and forth or something
is there a way to create a radio channel that can only be drawn in? no text or voice, only map markers and drawings
10:28:59 Server: Object 9:113 not found (message Type_96)
10:29:18 Server: Object 9:113 not found (message Type_124)
10:29:18 Server: Object 9:114 not found (message Type_124)
10:29:19 Server: Object 9:114 not found (message Type_96)
10:29:19 Server: Object 9:113 not found (message Type_96)
```Lots of this in RPT
I guess these phantom dead bodies produce most of this crap
https://community.bistudio.com/wiki/radioChannelCreate
https://community.bistudio.com/wiki/enableChannel
create custom channel, add players to it, disable text and VON
Didn't try it myself, might work
interesting, I'll take a stab at it
What's funny is that createAgent deletes easily all the time
createUnit only deletes while its in group few seconds after death
Then its a headache
Looks like moveOut u; deleteVehicle u; is a proper way to delete dead units now
Since moveOut was patched to work with fully dead bodies some time ago
deleteVehicleCrew is broken and useless
This command attempts to move the given crew member out before deleting it.
```(❌) DOUBT
I wonder if deleting vehicle with dead bodies inside is safe
And won't trigger that RPT spam in some form
having a strange issue with calling a function in the init field of an object
if I call this [this, 5] call AJDJ_fnc_createArea; in the init field, it seems to break and doesnt actually pass the object in via this
if I execute that code while the mission is running, it works perfectly fine
passes in the object exactly like it should
What makes you think it doesn't?
/*
creates a new contamination area
Params:
0: Position array OR Object - The source of the contamination
1: Radius - the radius of contamination around the object
*/
params ["_location", "_radius"];
systemChat str _location;
if ("OBJECT" isEqualTo typeName _location) then {
_location = getPos _location;
private _emitterObject = _location;
systemChat "existing object";
} else {
private _emitterObject = "Land_GarbageBarrel_02_F" createVehicle _location;
systemChat "new Object";
};
when I run it in the init, none of the systemchats spit out anything
SystemChat doesn't work in init
I.... think it does?
There's no display
No
hang on let me try it
*In very first milisecond of the mission start
I must be tripping, maybe its because in past I have had other code run first
regardless, that's not all that doesnt work
Spawn it
Regarding this problem, there seems there is really no way to avoid the special ticket ending debriefing screen, no matter what command or function I use to end game.
Even If I add tickets right before ending it. Even without the ticket template and manually adding / subtracting tickets this happens. Very confusing behaviour.
this seemed to have worked, but it looks like that was hiding a real issue somewhere that I'll have to dig out. Thanks for the help
lol I think the issue is just trying to work when I should be asleep 
Alright I'm sure I'm fucking this up and am overthinking it but nothing seems to be working
this addAction ["Remove Spike Strip", {{deleteVehicle _this;} forEach _x;}];
Delete the object it's in the init field of when the action is triggered
this addAction ["Remove Spike Strip", {deleteVehicle (_this#0)}];```
God damn I even tried that but missed the _
Thanks a ton mate
total noob wanting to know what the parts of this script do (or should do as i cant get it to work) if (!isDedicated && {playerSide == civilian}) then {this setVariable ["bis_disabled_Door_1", 1, false];}
what u want to do?
door only opens if your a member of a faction (civ opfor etc) this one suposed to be civ right?
i say right it is SUPOSED to be civ
my understanding is you cant the server host and you must be civ if thats true then it unlocks the door 1 on the building the code is in the init for
or i misunderstood the dedicated comand?
i see that explains alot so ill need to set a trigger up?
is there a major difference between gates and doors in houses? in terms of scripting
???
deleteVehicleCrew
Just tested it and its broken, couldn't get it to delete local body from remote vehicle properly
no matter what I tried
Turned out since moveOut works with bodies now, moveOut + deleteVehicle works properly
it call moveout why you doubt it? i can double check
Maybe it does, in practice it doesn't work
even if you do it globally it deletes it for everyone but for body owner
can you give me quick repro?
What I had approximately:
- Server-owned vehicle
- Client-owned dead body in vehicle (wait until it stops being in group)
No matter how I trieddeleteVehicleCrewfrom client side, couldn't get it to reliably delete the body everywhere
the body is just dead ai?
I had the body on a turret seat specifically and server on driver of that vehicle
Yes, createUnit, was never a player
createAgent deletes properly all the time, createUnit doesn't
I think best result was executing deleteVehicleCrew globally through remoteExec, it instantly deleted it for everybody but for client that owned the body
i’ll check after i had a coffee
Then I abandoned it and went for moveOut+deleteVehicle
moveout is better anyways, cleaner and generates fewer “object not found” errors
Yeah, it used to not work with dead bodies some time ago
When I implemented "take out bodies" feature I had server create invisible AI units and have them get into seats to push out dead bodies, lol
i remember
looked into how you did it long time ago, decided not worth my time 😂 pve dont need to manage bodies/weaponholders as much
i think in pvp the body is a duping issue?
So you are deleting it from client, not where vehicle is local?
While the argument is global, you should take extra steps and execute this where vehicle is local as moving units out of the vehicle happens where vehicle is local and you want this to always precede deletion.
have you tried deleting where is local?
Yes, tried most combinations
deleteVehicleLocal where body is local, then from server, then remoteExec it everywhere
None worked properly with different results
i was using deletevehiclecrew for awhile (before 2.06 moveout) in server "entitykilled" event, no trouble
it was instantaneous tho, not sure if that changes locality considerations
I think I found the problem
if ((owner _killed) isNotEqualTo (owner (objectParent _killed))) then {
[
(objectParent _killed),
_killed
] remoteExec [
'deleteVehicleCrew',
(objectParent _killed)
];
};
}```
Curious, what was the issue?
Their animation names might be different
Anyone knows a way to reliably check whether a vehicle and all its turrets are entirely out of ammo?
There is unfortunately no getter for setVehicleAmmo
still is
I reproed, but the code is doing something fishy
private _has_ammo = magazinesAllTurrets _vehicle findIf {_x # 2 > 0} >= 0
But you'll need to make exceptions for mags like countermeasures, laser batteries and such
Interesting. Gonna test that
"this createSimpleObject " and after this what do i type
Maybe go other way around and only check known projectile types
It checks whatever weapon and magazine state was broadcasted to your client
That suffices
So it might be lagging behind real ammo count a little bit, depending on who the turret is local to, how much they lag, etc.
So somewhat reliable
Like only check magazines that have CfgAmmo with simulation=shotBullet,showShell,shotMissile,shotRocket
anyone knows whats the syntax to create super simple object
So the problem is that the unit has to be moved out first then deleted. But then it gets messed up because of localities and so request to move out is sent but then unit is deleted immediately locally before the remote request is completed
I wonder why moveOut+deleteVehicle works then
Question about the Task Framework. Is it possible to transfer ownership of a created task from target A (original owner) to target B or do I need to create the task from scratch for the new target?
How to stop players autoreporting, because even with all this they still do it. 🤔
Auto reporting is disabled in the difficulty settings autoReport = 0;
enableSentences false;
enableRadio false;
player disableConversation true;
player setSpeaker "NoVoice";
showSubtitles false;
tried disableAI "RADIOPROTOCOL" ? Stops AI from talking and texting while still being able to issue orders.
We don't have AI in player groups and on the wiki it says it can cause weird behaviour if run on players.
why dont you try it
guess i will, thanks 👌
because I tweaked moveout awhile ago
I'm so glad I don't work on the SQF code.... everything being broken would drive me up the wall.
everything being broken would drive me up the wall
Good job this is not the case, we wouldn't want you on the wall
Wouldn't you prefer to work on something else?
why? 99% of the sqf is solid
I've never understood why you never just used an already existing language. I mean SpaceEngineers did that and it works very well.
They choose C#
And Enfusion script looks a lot like C#
None of us here made the SQF syntax. What's wrong with it in the first place?
Procedural language is a little limiting.
You must be new to Arma series
Tell Bohemians so 25 years ago
No I've written some scripts. I don't like it when it does things like commands doing what they should when they should. Like what happened with deleteVehicle
If you do deleteVehicle, it deletes a vehicle, what's wrong?
but that is not SQF this is engine bug
True. I've noticed you've been expanding the expressiveness of SQF.
Great work with the setTerrainHeight command.,
It's Ded's work
Too bad you can't ask BIsims for some input.
They had a fully fledged terrain editor that could build scenarios from blank slates not just have maps
I still don't really know what's your point
Me neither
VBS 3.0 allows you to do full on terrain editing change terrain height etc. and Place plants, grass etc. It eliminates the requirement for a single map.
yeah, but the point?
More flexibility?
No, your point, not VBS's point
oh, you wish to have that
OK, not related to SQF then
Nor Arma
Fair enough.
not even #arma3_scripting
general discussion BIS forums
k
Or #offtopic_arma probs
Had that no group no uid bullshit on a player just now:
[group o, side group o, getPlayerUID o, isPlayer o, name o] => [<NULL-group>,UNKNOWN,"",false,"Kiraa"]
Happens pretty much each live game, not reproducible in closed environment it seems
[alive o, group o, side group o, getPlayerUID o, isPlayer o, name o, o in allUnits, o in playableUnits, o in switchableUnits]
=>
[true,<NULL-group>,UNKNOWN,"",false,"Kiraa",false,false,false]
not in any of the lists
Going back to lobby and joining again helped, so it might be local issue
Player respawning didn't fix it
What's interesting is that it returns player name, yet isPlayer=>false
Hey, who can I ask regarding if something is a bug or an intended engine feature?
Try here
yes this is semi regular for me too ... i eject them back to lobby. used to let them play but they would cause issues/glitches for others too... unable to be revived, not showing on map, glitching around vehicle seats, etc
they would start to complain "i think im glitched, XXX or YYY isnt working for me"
Yeah, kicking them back to lobby gonna help as well
I wonder if they're broken simultaneously for everyone or just some clients
because as I just tested, me going back to lobby and joining again fixed it
often is for everyone, their group reports grpnull from other client
if you use zeus, you will see them as yellow icon
Wonder why this happens and if there can be some safeguards against it. Very big problem if you ask me
we can only speculate ... are the lobby groups being destroyed ... client IDs being recycled ...
My kill feed shows whatever side server had them on and it shows as proper side, so this issue isn't present on the server, only on some or all clients
maybe another client has joined their same slot and orphaned their character, etc
We can try nagging Dedmen or KK to add something for logging on profiling build to diagnose it, as it happens fairly often on live populated server 
In my mission every clients creates their own group and unit on join, no of lobby groups of units used
So it might be something else
you mean in lobby each player is separate lobby grp (alpha 1-2, 2-2, etc)?
you ever have the "stuck on receiving data" bug in koth?
Okay, so my problem is that somehow any usage of the respawn ticket system,
besides querying the ticket count, causes the game to always use a unspecified
debriefing ending.
My mission looks like this:
Description.ext
respawn = "BASE";
respawnButton = 1;
respawnDelay = 15;
respawnOnStart = -1;
respawnVehicleDelay = 15;
respawnTemplates[] = {"MenuInventory", "MenuPosition", "Tickets"};
class CfgDebriefing {
class endCustom
{
title = "Mission Failed";
description = "All players died";
picture = "\a3\Ui_f\data\GUI\Cfg\Debriefing\endDeath_ca.paa";
};
};
My initServer.sqf looks like this:
[west, "respawnMarker"] call BIS_fnc_addRespawnPosition;
[west, 1] call BIS_fnc_respawnTickets;
Steps to reproduce:
- Kill player (setDamage or Respawn Option Menu)
=> Respawn Menu Opens, but can not respawn since tickets are exhausted! - Use BIS_fnc_endMission or BIS_fnc_endMissionServer or endMission engine command with
custom ending "endCustom" defined in description.ext.
What happens: Closing Shot and debriefing looks different than the one specified in description.ext.
What should happen: Closing Shot and debriefing looks like the one defined in the description.ext.
Note: This only happens if you ever modify the ticket amount with "BIS_fnc_respawnTickets".
If you never modify the ticket amount and just end the mission, everything looks normal.
Now what really confuses me is that even endMission has this problem, which is an engine command.
And I could not find any specific setting that "BIS_fnc_respawnTickets" modifies to make the debriefing look like that.
This also happens if you restore the ticket amount to any positive number, and then end the mission, even with players still alive.
debriefing = 1;
but doesn't that just toggle whether the debriefing even happens?
It does happen after all, but just looks nothing like the specified one / the one that happens without ever running "[west, 1] call BIS_fnc_respawnTickets;".
But I'll test regardless.
Even with debriefing = 1; it still happens. I'll try to post two pictures of what I mean with: "What happens" and "What should happen".
open up bis_fnc_respawnTickets and see what its doing
maybe it has its own debriefing hardcoded
I did. It sets some global vars regarding tickets count and thats it.
well some more stuff regarding argument parsing and all the different ticket namespaces, but yes.
It doesn't even have anything regarding any of the end mission commands in its code.
also check module functions in case there is some system being initialized
check what else is running with copytoclipboard str diag_activeSQFscripts; and also check for events with copytoclipboard str diag_allmissioneventhandlers
sometimes those systems have like a "multiplayer module" running
@meager granite is here a bug ticket for deletevehiclecrew? I fixed it will try to push it for the next profiling
Regarding the pictures:
This is what happens when the ticket count is modified at all (Not Intended):
https://imgur.com/y3A6pG3
This is what happens when the ticket count is never modified using BIS_fnc_respawnTickets (Modifying the global vars manually seems fine):
https://imgur.com/BPZglJ6
I'll try that!
didn't search for one
how many gb is arma 3
copytoclipboard str diag_activeSQFscripts; results in []
copytoclipboard str diag_allmissioneventhandlers results in https://hastebin.com/arirusobin.json.
So this problaby is like a list of eventhandler type and count.
The only culprits that could be it are: Loaded, HandleDisconnect, EachFrame, Ended.
Of these, the most logical ones would be EachFrame and Ended. Is there a way for me to get the code that these event handlers have?
mine 45
Even if I remove all the event handlers listed by diag_allmissioneventhandlers with removeAllMissionEventHandlers it still happens.
(Checked if they were all gone before running endMission)
thanks
For my actual mission I currently have to work around this by never using BIS_fnc_respawnTickets at all and instead having a custom ticket system and setting the vars visualized by the Respawn GUI myself. But that is very hacky and, in my opinion, should not be necessary. If I specify a specific ending using any of the ending commands it should use that ending like it is defined in the config and not something else.
only contact matters
other DLCs are always installed
can you make one? for feedback on the fix
will do
I've got a mostly working AI revive script, but I'm having a devil of a time making sure they don't just keel over dead; as far as I've seen it's related to how much damage I allow before running the actual wounded portion, but it feels like there's no safe level.
_unit addEventHandler
["HandleDamage",
{
params ["_unit", "_selection", "_damage", "_source", "_projectile", "_hitIndex", "_instigator", "_hitPoint"];
if (units group _unit findif {isPlayer _x} == -1) exitWith {_unit removealleventhandlers "HandleDamage"};
if (_unit getVariable ["srd_downed", false]) exitWith {_damage = 0};
if(alive _unit && _selection == "" && _damage >= 0.5 && !(_unit getVariable ["srd_downed", false])) then
{
_unit setVariable ["srd_downed", true, true];
_damage = 0;
[[_unit],SRD_AIRevival_Wounded]remoteExec ["call",0];
}
}
];
I can shoot them in the arms or legs and they'll fall down and run the script, but chest or head and it's instant kill :/
If I turn down the if _damage >= to .1, then it works - but they'll go down at the slightest shrapnel.
I think you have to block the non-"" selection damage too.
oh wait
You're not blocking damage at all?
Ill try to check if bis stores anything that this could cause in the missionNamespace or uiNamespace
Or only by accident. HandleDamage uses the return value to override damage inflicted.
Just setting the _damage var to zero doesn't do anything. You need to actually return a value.
Ahh, cripes, I see it now.
also be really careful that it's returning on every path.
I will confess, I'm using the Dynamic Recon Ops revive system as a basis, though it's been so stripped down I think it's basically just reference at this point. But I think I stripped down too much :/
Also if you don't want to change the damage in a handledamage, make sure you explicitly return nil.
Yarp, he has a line negating kill damage and then returning at the end of the function.
Does that include exitWiths? Like for my second If statement... though I suppose it makes no difference, the reflexive variable was just an attempt to patch this same problem.
Yes, it does.
Would I need to change it, or is leaving the exitWith like that fine for returning the 0 value?
both of those exitWiths are broken.
although I think removeAllEventHandlers does return nil :P
just do it explicitly though, avoids non-obvious fuckups where a command returns an unused value.
Yeah, there's a lot going on that needs tightening up. The former one works, though, if the player abandons the team - so they don't get the protection anymore. Adding the return and overkill protection worked, though now they take two shots to the head... but I can live with that.
And the latter apparently keeps it from firing twice every time they get shot.
👍
Is it intended that the ticket says createVehicleCrew and not deleteVehicleCrew?
@meager granite
fixed
Hrn... damn, that still hasn't fixed the issue when the script is run in multiplayer.
Lemme see...
the aiRevival function is called on every unit that it create via two different means;
One is serverside, has a if {!isServer} check and all, before calling srd_fnc_AIRevival on the unit.
The second is a trigger, created on the server but set to global, running a function to createVehicleCrew, which is remoteExec'd to the driver of the vehicle.
Both sets of units will die if shot in the head or chest - but weirdly, the script does fire, because they do my groupChat 'i got hit' callout before dying o.0
So what is your script now? Because the previous one clearly wasn't going to work.
_unit addEventHandler
["HandleDamage",
{
params ["_unit", "_selection", "_damage", "_source", "_projectile", "_hitIndex", "_instigator", "_hitPoint"];
if (units group _unit findif {isPlayer _x} == -1) exitWith {_unit removealleventhandlers "HandleDamage"; _damage};
if (_unit getVariable ["srd_downed", false]) exitWith {_damage = 0; _damage};
if(alive _unit && _selection == "" && _damage >= 0.5 && !(_unit getVariable ["srd_downed", false])) then
{
_unit setVariable ["srd_downed", true, true];
_damage = 0;
[[_unit],SRD_AIRevival_Wounded]remoteExec ["call",0];
};
if(_damage >= 1) then {_damage = 0.85};
_damage
}
];
It works in SP, for what that's worth.
If there's no player in the group then you remove the handler?
but you said these AIs were created on the server?
Yeah, the script creates them on the server side, then assigns them to the player.
would the server transfer ownership if the player isn't a group leader, though?
I think it does, not sure.
It certainly transfers ownership if the player is group leader :P
And then the handleDamage won't work because it's on the wrong machine.
so we have like 75% probability of AI locality changing and server-added EH doing nothing O_o
But it does partially work?
In what case does it work?
Getting shot in the arms or legs. Torso and head are just straight to death.
I've tested with the debug console, no difference in how it's executed.
inb4 somebody asks for "Killed" EH to become override-capable
Curious. Maybe the handleDamage documentation is wrong and it fires everywhere but only overrides locally.
You understand the locality issue, right? You create AI on server, install the EH on server, and then join them to a player group, at which point they're no longer on the server.
handleDamage is only supposed to execute for local units.
Yeah, I believe I'm following, it's just weird that it'd still work - mostly. Rather than just not working at all?
Override thing would explain it, but I'm not 100% clear on what you're doing so I'd have to check here.
maybe transferring override over the network works but is just too slow for it to work on oneshots. Or some other meme reason
also, i believe certain body parts have their own damage thresholds for unit to get killed
This is possible, I am working with SOGPF's weapons, so I'm not sure if they have the exact same damage system :x
Lemme put a sqfbin together for the proper file hierarchy.
mag? Does the array get populated at all?
you delete the index before deleting the item itself
The relevant parts of my scripts, in relative order of execution.
array deleteAt index returns the deleted element
Mine class is APERSMine_Range_Ammo
you're comparing magazine class to entity class thus it never adds anything
class APERSMine_Range_Mag: ATMine_Range_Mag
{
ammo = "APERSMine_Range_Ammo";
getText(configFile >> "CfgMagazines" >> "APERSMine_Range_Mag" >> "ammo")
to return ammo\entity class that magazine shoots out
Or go into config explorer
Hrm, referencing DRO's revival system again, it does look like he remoteExecs his eventhandler. I'll give that a try.
yes, you're already using it O_o
Well, I didn't break it, but now they're just immortal 🙃
is there a way to prevent players from enabling/disabling AI in the lobby?
talking about this
https://imgur.com/ntpHiLw
I think that setting is in the Editor mission attributes as well (presumably under Multiplayer)
I want AI not to be disabled, will this help?
Hey all, this was working last night, now is throwing errors. All I'm trying to do is attach the trigger to the synced object. Any ideas?
private _suicide = synchronizedObjects thisTrigger; { thisTrigger attachTo _x; } forEach _suicide;
It would be useful to know which errors it's causing
Yes, it should be thisTrigger attachTo [_x]
For a trigger on any object smaller than a building, object centre is probably fine.
Goat bomb, but same principle. Explosion on a trigger, suicider may not be in the location he started so I need the trigger to travel with him
yeah well you might wanna do thisTrigger attachTo [_x, [0,0,0]];
This worked to make him blow up + stop throwing the errors but doesn't seem to move the trigger with him if I move him via zeus.
I still blow the thing up by stepping forward into where he used to be, despite him being 30 meters away
I'll give it a try
This is a goat, right? Is the synchronised object the goat itself, or a goat module?
I'm fairly new to arma coding so let me know if I've got any basics wrong
Goat specifically, although for testing I've also got it on a man and a car, same issue each time
Well can you do us a little test, give the trigger a variable name, then do
attachedTo triggerName
What does it return?
Where are you actually putting this code - which code field?
Average status quo format scrippter
hahahahaha
of course I put the attach in the activation which required a player to be in it....fucking of course I did
Now the question is where the hell can I put it to attach it. Unit leader doesn't want us using object inits
Give the trigger a name, put the code in the mission init inside an if isServer then, and replace thisTrigger with the trigger name
why not initServer?
I'm trying to create a small pack of easily placeable set pieces for some particularly uninspired zeus's in the unit, I'm try to avoid anything that isn't just copy and paste in eden, so init is out or that's what I'd do
the On Deactivation field, is that just when the stated activation is not met?
No, it's when it stops being met having been met
So I could set activation to Player Not Present - put the attach script in activation
Then have the bomb in deactivation?
I......maybe? That could work. Hell of a hack though.
Nah that doesn't seem to do anything
Not being able to use any init fields or external code files is a pretty major limiter to be honest
Yeah well aware, i've had to use some roundabout logic for these set pieces
I was thinking of the Editor mission init so we didn't have to go outside the Editor. initServer isn't accessible there.
Fair enough
Why is it that you're not allowed to use any init fields? They can be unsafe if used improperly, but a simple attachTo is perfectly fine
because they call on every players machines every time someone connects (according to our head zeus) and at 40-60 people an op performance can get a bit rough
What
So a question
Are you going to deploy this script using a composition?
Through zeus?
this is true, init fields are called for JIP but only if the object exists. You can add ```sqf
if !isServer exitWith {};
at the top to break at line 1 and make this negligible.
If that's possible with trigger that's an option, but also placeable in eden
Then follow this
Wait
So if I'm reading this right it basically says "are you a server trying to init this? if not fuck off?"
yea exactly
huh
For Zeus-placed compositions you can't use an if isServer check, because when placed in Zeus the init only runs on the client that placed it
In the Editor it does run on every machine, but not Zeus
Thats why i asked
For Zeus compositions you may also need to add a small sleep, because the init doesn't wait until all the objects in the composition exist - it may create the trigger, run its init, then create the object you want to attach it to (too late)
But it appears to not be the case?
I've sent a message off to the head zeus so I'll see what he thinks of that approach
Otherwise I really can't think of a way to do it, attach a trigger to an object without init or outside code
I would make sure "EntityKilled" is called for mines by putting some print there
also i dont get why you delete index 0 and not the mine's actual index...
Hi, I have a quick question if anyone is willing to lend a hand. I'm trying to disable Collison for certain units and it seems that whenever an object initiates the script it only applies to the last line of it, only disabling collision for one unit. In my case whenever I apply the script, collision is disabled for the unit named "p3" and the others are ignored. Any idea what I may be doing wrong?
Script I Used:
this disableCollisionWith p1;
this disableCollisionWith p2;
this disableCollisionWith p3;
An object can't disable collision with more than one object
maybe
{ _x disableCollisionWith this } forEach [p1,p2,p3];
```?
unless I'm remembering wrong
Let me try it out, thanks for the quick response
i think it's stored to the object in the first parameter
Well, true IIRC
Unfortunately it seems like the same issue again, only the object named "p3" has collision disabled. Is there any other possible script or have I hit a dead end?
you may be out of luck
That's alright, I'll try to tinker around with some other methods that could possibly work. Either way thanks a lot for the help, always nice to get a second opinion.
you could find the _unit in the array and get the index then deleteAt that index
yes IDK if it does
or do array = array - [_unit]. Or just run array = array - [objNull] before trying to add a new one to get rid of destoyed objects. Or any number of other solutions.
not like anyone is gonna notice a performance difference on 3-length array
i forgot that simplest option 😀
at those lengths i'd go for a separate watchdog cycle to do all the maintenance once every, say, couple of seconds 🤷♂️
just a separate piece of code that does all the maintenance outside the EH
something like https://sqfbin.com/pudoresiqebirulovoqa
Don't know if we have any ACE gurus here, but I'm trying to figure out a way to detect damage to a unit, or check their wounded state. I know that there are options for enabling a "Sum of Trauma" death state - what I'm wondering is, if there is a way to find out what a unit's current "Trauma" value is.
I was initally going to use 'damage' method, but this doesn't work with ACE Medical because of how damage is interecepted and converted to wounds.
It also does not appear to work with 'Lifestate' either, as they seem to not be in an 'injured' state.
You can direct ask from ace team.
[player] call ace_medical_fnc_serializeState;
``` will return a string with the medical values
you can find the function on their github if you want to see the variables
Oh awesome, thanks for the Discord link, and the info!
ace medical handles just about everything differently so I highly recommend looking at their docs if you want to script with medical
Looks from the code like that's working as intended?
Maybe describe exactly what you're trying to do.
That's way simpler than what you wrote :P
MRTM_spawnedAPERSMine_Range_Ammo = [];
addMissionEventhandler ["EntityCreated", {
params ["_entity"];
if (typeOf _entity != "APERSMine_Range_Ammo") exitwith {};
if (count MRTM_spawnedAPERSMine_Range_Ammo >= 3) then {
deleteVehicle _entity;
} else {
MRTM_spawnedAPERSMine_Range_Ammo pushBack _entity;
};
}];
...what
I have never used EntityCreated so it might be bugged to hell, but otherwise yes.
Is there any way to use the setTIParameter-command to reverse the Tweaked: Thermal Imaging overhaul?
Any working scripts i can place into the init field of "playable" unit/character for them to respawn on starting position? When they are controlled by AI they always respawn on their group on custom warlords game mode instead of back at base as a player.
Is there any way to detach the weapon from a dead player ?
So when i delete the corpse the weapons doesn't get deleted with the corpse ? 🤔
you would have to create a new groundholder and put same weapon into it
Yea thought, but also thought there might be an easier way 😅
guess i just move the body to [0,0,0] and add it to garbagecleaner
that leaves the weapon there #Lazy
I have another question pertaining to my inquiry from earlier. Is it possible to disable collision not for individual entities but for possibly units that are grouped together? If not grouped units, would I be able to disable the collision of an object for all players in a session?
No, you can only disable collision for one unit for an object.
Ok then I'll run it back a bit. Is there any way to keep AI contained within a certain radius, (let's say within 100 meters of a certain point) while keeping their ability to move? I'm building an OP that has the players moving from village to village and I want to keep a dynamic flow of combat going, but I don't want the AI pissing off into the sunset randomly. My solution originally was to surround the area with invisible walls and then disable collision for players. But since that would be impossible, is there any other alternative anyone can recommend?
Thanks will try
I'm not quite sure what the issue is here, I don't think I'm missing a semi-colon but the error message says I do. Can someone take a look real quick?
you cannot set an array value like that
use set
Yep, I realized that as soon as I posted lol
That error seems to have gone away
but now my script doesn't seem to be going past an if statement
if ((_radioList select _forEachIndex) in uniformItems _player)
I'm not sure if it's because of (_radioList select _forEachIndex) or in uniformItems _player
if you don't get an error message, there's no error
That is not true lol
well, if you use -showScriptErrors it is :p
Even then, some errors don't pop up
yep, if one of those variables is undefined, and it's unschd, it will fail silently
I used to use [] spawn {offending code}
What is the best way to get all Weapon Holders in the server?
@copper raven this function take 62 ms to find the weapons holders. I was hoping there was something faster. Thanks.
entities or nearEntities don't work on Weapon Holders 🫂
yeah
well, you can use event handlers and track stuff manually
like Put or Killed
then use nearEntities or something
you can also use schd code, and compute nearEntities in a grid kinda way (piece by piece of the map)
I will use scheduled allMissionObjects so i have sure to generate no freeze
it will freeze regardless
This is why scheduled not make much difference, sch allMissionObjects takes 80 ms.
you can't measure sched code properly anyway, so it makes no sense, if a command call halts the game, moving to scheduled will not make it magically not freeze, scheduler suspends between instructions, not within command call
i would do this
I understand
But i need to use nearestObjects or nearObjects, because nearEntities don't get Weapon Holders.
the latter is faster iirc
allObjects
Ground weapon holders could use a dedicated list, such a pain to iterate through them for cleanup purposes
No idea, I want my own cleanup logic
Is there a way to make a custom hint for the function call BIS_fnc_advHint;?
this will go in the description.ext file right? I am having trouble calling it from there, if someone could direct me.
may I dm you if possible, wont take more than 5 mins
@plush belfry Add create a separate file
then add the entry to the include in description.ext
#include "hint/cfgHints.hpp"
I am sorry, can you elaborate on what you mean by that
oh okay
That way it's not cluttering up the description.ext with a slab of classes
They will be included into the description.ext at mission run time but you'll have a common place to edit it from.
should be a backslash
how do you get them now?
because they contain stuff inside
The only reliable way is allMissionObjects "GroundWeaponHolder"
But because the command is slow it still produces microfreeze which isn't good for server-side
So I ended up tracking all GWHs with InventoryOpen and Put event handlers
Ones dropped from units can be get with entities "WeaponHolderSimulated"
so you do the whole map at once? why not separate map into sectors and do smaller cleanups but more often?
class CfgPatches{
class FirstAddon{
name = "FirstAddon";
author = "Me";
url = "http://pewpew.com";
requiredVersion = 1.60;
requiredAddons[] = { "CAWeapons"};
units[] = {};
weapons[] = {};
};
};
class cfgWeapons{
class Pistol;
class M9: Pistol{
begin1[] = {"/m9",1,1,800};
soundBegin[] = {"begin1",1};
};
};
I'm trying to make an alternative sound for m9 pistol as practice, but it doesn't change the sound in game. I dunno what I'm doing wrong :(
arma 2 btw
sorry >.<
@meager granite 8 allobjects 0 way way faster
With nearEntities?
Indeed, 100+ times faster
{8 allobjects 0 select {typeOf _x == "GroundWeaponHolder"}}
if you have several thousand static objects it could end up slower
compared to
allMissionObjects "GroundWeaponHolder"
but at least no freeze in scheduled
I would've checked if diag_codePerformance wasn't disabled for clients
you disabled it?
No it does single cycle only in MP
for loop 😛
For security purposes, this command will only run for 1 cycle in multiplayer, unless in-game debug console is available via description.ext option or Eden attribute setting.
if you don’t have debug console enabled
I don't because enableDebugConsole[] = {"76561198018221755"}; also allows the console for logged admins
instead of listed UIDs only
What security purposes btw? Freezing the server/client with cheats?
because you can execute a lot of code very quickly
sky is the limit
does it have to be ground weapon holder or any supply will do?
If the security reason was freezing the server, then you can easily do for "_i" from 1 to 2 do {_i = 1}; to kill it as cheater anyway (do not execute in scheduled, freezes the game completely)
Whatever engine produces when you open the inventory
even when you open it on vehicle?
Though there is now another way, server-side EntityCreated mission event handler
so you can manage the list yourself
I think it creates ground weapon holder as well?
yeah but temporary
If you drop something into it, it stays
if you don’t drop anything it is deleted
Either way, issue is script-solvable with EntityCreated or allObjects now
Was much more problematic before
did you check how long the ordered vehicles list gets by the end of the game, including nulls?
Oh, -1 is 2.12
ah true
count (8 allObjects 0) => 261 on a 80 players server 30 minutes in
nah not the same, that list is never resized could get very long if you create delete
I guess you have to stay the whole round in to see how many nulls there are
as rejoining would wipe it?
sent from the server?
interesting
Well if you can hack yourself to connect to 2.10 server with 2.12, you can check it yourself
in which case the longer the game runs the longer this list will be
can ask @still forum to add it to perf as an exception
Live server with 80 players and 40 minutes of mission uptime
allMissionObjects "GroundWeaponHolder" => 13.697ms
8 allobjects 0 select {typeOf _x == "GroundWeaponHolder"} => 0.147995ms
Its KotH though, so not that many objects with pretty aggressive clean up
So around 100 times faster again
you are building an array but if you just use it after condition could be faster
0.0319824 without select
Viable either way, while allMissionObjects is unusable during gameplay at all
So problem is pretty much solved as of 2.10
@unique sundial A related ticket for you to snap with a solution: https://feedback.bistudio.com/T77175
oh you just wait
that won't work, ignoring version number is easy but you still won't be able to connect because the netcode is different
allMissionObjects is multithreaded on #perf_prof_branch
still slower
doesnt use network that command
Then I don't know what you are referring to, I assumed
Well if you can hack yourself to connect to 2.10 server with 2.12, you can check it yourself
?
allObjects tweak
Ah, can do that if we don't document it, I'll put it on the list for v5
why not 63 allObjects [0, "groundWeaponHolder"]?
speed
the command is not that fast anyway 
it is the fastest it could get
I mean not fast enough for array arg to matter
or allObjects [63, 0, ["GroundWeaponHolder"]]
supporting array of types
thats the worst for speed
with this you can filter any array of objects
not just allObjects
you have plenty of tools to play with this command is built for speed.
so is this ticket
you no longer have to write slow selects anymore
CfgVehicles only?
- cfgAmmo + cfgNonAIVehicles I guess
I see such command being useful, no urgent need for it though
I'd make it even more universal though
Idea: ARRAY/OBJECT/STRING isKindOfList ARRAY
Left argument being object, class name or array of these
Right argument being list of branches for isKindOf check and list of strings for exact matches
Kinda lost faith in such idea a bit while thinking about it though, not sure if worth it
vehicles isKindOfList [configFile >> "CfgVehicles" >> "Air", configFile >> "CfgVehicles" >> "Ship", "I_Heli_light_03_F"]
how is that more universal?
_arrayOfObjs selectObjectClasses [ ["class1", "class2", ...], (exactMatch = false)];
Lets you compare list of against both branches and exact classes
Not sure if its really needed though
this one also has exactMatch parameter
Mine lets you have both at once
List of classes + list of kind ofs
as well as comparing non-entity configs
questionable practical usage though
@unique sundial @still forum
Any idea how this issue can be solved without a repro?
#arma3_scripting message
Happens somewhat consistently on live games, maybe you guys can prepare special EXE with logging to figure why it might fail?
I think server sees him fine because my kill feed generated by server shows his side properly
while client shows him having no group
Didn't check, but I bet its all fine on server side
Gonna collect more info but so far it seems to be client-side issue
Clients randomly see players broken - no group, isPlayer=>false, getPlayerUID=>"", all that stuff you seen in that output
can you collect info from all clients including server when this happens?
Going back to lobby and joining again helps
Alright, I'll setup some kind of data poll
This is a very old issue I believe, I remember it as long as I did scripting, back in 2012 in A2OA, some players randomly not included in playableUnits, no UID, etc.
when group goes after respawn or randomly
can they be using hacked exe?
Doubt it, happens very often, several times per round for random players
Not sure about exact frequency but I see it very often
ok good then you can log all the info plus do jip queue and log entities
Will calling exportJIPMessages "somefile.txt" suffice on stable server exe build?
and any errors server spits out?
Alright
i think what does it say on the wiki page
Was unsure if I needed prof exe or any will do
dwarden uses it in official servers so should be fine maybe
sorry to tagyou literally 24hs later, but regarding this yesterday i saw a player with the "empy" side in the player list, in a server with 100ppl it was just one.
idk if this is the same issue
@unique sundial Sharing a bit of observation. Ran each frame on a live server to find player units that aren't player:
entities "Man" select {toLower typeOf _x find "soldier" >= 0} select {alive _x} select {!isPlayer _x}
```(Only players use classes with "soldier" in it)
then logged how long they remain in this state.
19:27:06 [132279,[[24924ea2880# 1786670: ia_soldier_01.p3d REMOTE],[[true,<NULL-group>,UNKNOWN,"",false,"Slava",false,false,false]]]]
19:27:06 [132280,[[24924ea2880# 1786670: ia_soldier_01.p3d REMOTE],[[true,<NULL-group>,UNKNOWN,"",false,"Slava",false,false,false]]]]
19:27:06 [132281,[[24924ea2880# 1786670: ia_soldier_01.p3d REMOTE],[[true,<NULL-group>,UNKNOWN,"",false,"Slava",false,false,false]]]]
19:27:06 [132282,[[24924ea2880# 1786670: ia_soldier_01.p3d REMOTE],[[true,<NULL-group>,UNKNOWN,"",false,"Slava",false,false,false]]]]
19:27:06 [132283,[[24924ea2880# 1786670: ia_soldier_01.p3d REMOTE],[[true,<NULL-group>,UNKNOWN,"",false,"Slava",false,false,false]]]]
19:27:06 [132284,[[24924ea2880# 1786670: ia_soldier_01.p3d REMOTE],[[true,<NULL-group>,UNKNOWN,"",false,"Slava",false,false,false]]]]
19:27:06 [132285,[[24924ea2880# 1786670: ia_soldier_01.p3d REMOTE],[[true,<NULL-group>,UNKNOWN,"",false,"Slava",false,false,false]]]]
19:27:06 [132286,[[24924ea2880# 1786670: ia_soldier_01.p3d REMOTE],[[true,<NULL-group>,UNKNOWN,"",false,"Slava",false,false,false]]]]
19:27:06 [132287,[[24924ea2880# 1786670: ia_soldier_01.p3d REMOTE],[[true,<NULL-group>,UNKNOWN,"",false,"Slava",false,false,false]]]]
19:27:06 [132288,[[24924ea2880# 1786670: ia_soldier_01.p3d REMOTE],[[true,<NULL-group>,UNKNOWN,"",false,"Slava",false,false,false]]]]
19:27:06 [132289,[[24924ea2880# 1786670: ia_soldier_01.p3d REMOTE],[[true,<NULL-group>,UNKNOWN,"",false,"Slava",false,false,false]]]]
19:27:06 [132290,[[24924ea2880# 1786670: ia_soldier_01.p3d REMOTE],[[true,<NULL-group>,UNKNOWN,"",false,"Slava",false,false,false]]]]
19:27:06 [132291,[[24924ea2880# 1786670: ia_soldier_01.p3d REMOTE],[[true,<NULL-group>,UNKNOWN,"",false,"Slava",false,false,false]]]]
19:27:06 [132292,[[24924ea2880# 1786670: ia_soldier_01.p3d REMOTE],[[true,<NULL-group>,UNKNOWN,"",false,"Slava",false,false,false]]]]
19:27:31 [135145,[[24a12e20c00# 1787151: b_soldier_01.p3d REMOTE],[[true,<NULL-group>,UNKNOWN,"",false,"BigCoolBoy85",false,false,false]]]]
19:27:31 [135146,[[24a12e20c00# 1787151: b_soldier_01.p3d REMOTE],[[true,<NULL-group>,UNKNOWN,"",false,"BigCoolBoy85",false,false,false]]]]
19:27:31 [135147,[[24a12e20c00# 1787151: b_soldier_01.p3d REMOTE],[[true,<NULL-group>,UNKNOWN,"",false,"BigCoolBoy85",false,false,false]]]]
log is diag_frameNo, then entity and same array from original message I linked to
Gonna setup proper polling from each client later, but maybe this info can give you an idea what might be going wrong on engine side
what is the array format
respawn happens locally then unit sends the info to the server then server updates everyone. This is why it is important to know who sees what, you, server, client
just a hasty logging I did, list of problematic units, then that list with isPlayer, getPlayerUID commands ran on each item
Gonna setup some global polling later and let you know
the only difference is when player spawns for the first time when joining
then it is pretty much client driven
Array format is the same on as in linked message: [alive _x, group _x, side group _x, getPlayerUID _x, isPlayer _x, name _x, _x in allUnits, _x in playableUnits, _x in switchableUnits]
My mission uses client-created groups and units, lobby groups and units are abandoned once player loads, yet it leads to that same issue
if there is no group any commands about units would not succeed
yea thats how it appears
@unique sundial can we extend the "skipLobby" to allow connection to randomized slot
like skipLobby = 1; joins first available skipLobby = 2; joins random
with exception of headless client
this would bypass the "stuck on receiving data" issue
doubt it will solve it, need to find out why it gets stuck in the first place
Hello guys, short question. Im trying to implement respawn into my missions (first time!) and am trying to achieve different respawn templates for East and West.
I'd like for East to respawn after 5 minutes, in waves, inside their base. During respawn, they should have access to spectator mode.
For West, I'd like them to have the singleplayer death screen so that they get forced back to the Slot-In screen. ALTERNATIVELY, if that does not work, I'd like them to have access only to the spectator mode, and no respawn.
I added this to my description.ext
respawn = 3;
respawnDelay = 300;
respawnTemplatesWest[] = { "Spectator" };
respawnTemplatesEast[] = { "Wave", "Spectator" };
But BLUFOR keeps respawning after the timer ends. OPFOR is working fine and as intended, but BLUFOR keeps respawning inside their base unfortunately. Anyone know what I am doing wrong?
the issue is slot linked, so simply avoiding the bugged slot is a workaround ... randomizing which slot gets selected would workaround
I suspect theres an objnull/grpnull/"error: no unit" player actually in that slot
so it gets evaluated as empty and joinable
i never solved the "error: no unit" issue, just papered over it by not using (name player)
i guess i could boot the player back to lobby if their name is returning as error no unit
Does Bohemia have any documentation yet on utilizing terrain deformation? We were looking at creating a weapon that can "terraform", but I'm not finding much on the topic since it's so new. I'm pretty sure we can only raise/lower the terrain and can't use it to dig underground just with how the engine is, am I correct on that?
I didn't want to post this in #arma3_terrain since the use case is a bit different.
if you can send the code i will do some live server testing too
i can usually see the bugged player as they appear as yellow objects in Zeus
It happened on usual lobby units servers too
https://community.bistudio.com/wiki/setTerrainHeight
Because A3's terrain uses a heightmap system, overhangs and natural tunnels or caves are not possible, including with this command.
Yeah that's what I figured. Thanks for the link.
At least we can raise/lower the terrain, so it's use case for creating trenches is there. I come from sci-fi land so for us this would be nice to implement.
you can create tunnels by lowering the terrain first, then placing objects on top with the same texture as the terrain texture
any way of attaching curator EHs to zeuses that are created by other mods like ACE?
i guess this is what you want? https://community.bistudio.com/wiki/allCurators
im sure ace would have it's own events of some sort that you could hook into aswell
ACE probably does, but the other admin mods out there probably don't 😅
you can probably use https://community.bistudio.com/wiki/Arma_3:_Mission_Event_Handlers#EntityCreated
ah and filter that for "curator entities"?
yes
look into the config
The ammo the mine dispenser itself fires is APERSMineDispenser_Ammo, but you should look that up in CfgAmmo and see if it has submunitions, because I've got a feeling that's not the actual mines
You could also just spawn one, use it, and do typeOf cursorObject on one of the mines
ok so say you make a mod that changes the main menu background and one of the spotlights, but you want to also use another mod that has its own custom main menu , is it possible to choose which one runs / decide priority? or will they just clash? (this involves scripting so id assume its ok to ask this here)
im back bitches and i need help (again)
{
params ["_value"];
if (Six12th_Core_Settings_FreeFallHeight_Enabled) then {
player setUnitFreefallHeight _value;
};
this addEventHandler ["Respawn", {
params ["_unit", "_corpse"];
player setUnitFreefallHeight _value;
}];
}``` this script is run on the player after init or when the option is changed in cba settings, however doesnt actually seem to be changing the freefall height upon respawn
have any of you got any clue why that is
(it works upon initial spawning in perfectly fine, just not after the player has died in either mp or sp)
is this defined?
it is under CBA however i have tried using player as well and it did not work
this is usually only defined in the init box of an object, do you have a link to the cba documentation?
https://github.com/CBATeam/CBA_A3/wiki -- That's their github but I can't find the stuff for the pre/postinit bits, and either way replacing with player hasnt worked
welp time to add debug statements. add one before and after the if statement, one in the if code block and one in the eh code to make sure which parts of the code are failing. i also find the opening and closing brackets very weird, you sure this is correct?
For a trigger condition, can I use !Alive [vehicle classname], or is that only for specifically named variables?
What exactly you want to achieve?
A trigger to check to see if all of a vehicle class is destroyed. The vehicles are spawned with some randomization, so I'm not currently giving them specific variable names.
So would !Alive B_MRAP_01_F return anything?
No, alive only checks an object
Okay. I could use a count then and set it to == 0
Probably the easiest and reliable way is to use an array that contains all of your objects and check if all of them are dead
...meaning I'd need a way to name them all?
Is there some way to make something like this work?:
count [B_MRAP_01_F]) == 0 ...or countType ?
That's similar to what I found here:
https://forums.bohemia.net/forums/topic/232737-creation-of-trigger-condition-destroy-or-incapacited-tank/?do=findComment&comment=3429501
The last step I don't get yet is how to use the classname to populate the array.
Hello, I am asking for help from the community: In my mission, I am trying to create several triggers with the following conditions: - 1: only activates if one of the four tanks is considered destroyed or damaged at 80%. - 2: If two of the tanks are considered destroyed or damaged at 80%. - 3: sa...
You don't
Actually, you can, but I can say the way is performance unfriendly so I wouldn't recommend
Can you do this?
Yes. I hadn't considered that it'd be more performance friendly to do it that way, but I see at your link that it can stop when it finds one remaining.
Looks like the trigger modure doesn't like waitUntil as a condition: "Condition Type Nothing, Expected Bool". As far as I can tell this setup should return a bool:
waitUntil { [unit1, unit2, unit3] findIf { alive _x } == -1 };
Hello,
Is there already avaible "reArm" command, if not.
Which is the easiest way get unit starting medical items and rearm those from box without opening and selecting items. I mean if i have 10 bandage, 10 Morphine, 10 splint at start. I use 5 all of them. And when i click box it returns all med items back to 10.
waitUntil is redundant here. The trigger already tests the condition repeatedly until it returns true.
just get rid of the waitUntil. what you wrote is intended for code in the scheduler, not for triggers
That's left me with {["array"] findIf { alive _x } == -1 }; and it warns that the return type is code instead of Bool.
don't randomly put brackets around it
Yeah, just figured out they needed to have gone with the waitUntil.
Well, can't test quite yet due to some other issues, but that should get me started. Thanks all!
Im trying to get images on billboards, but only a white screen appears. Tried paa png and jpg and it finds the image, but displays a white picture.
Have you got the correct dimensions?
"All textures must have a resolution of 2^x × 2^y (16×16, 16×32, 64×256, 512×512, ...). The largest texture size supported by the RV engine is 4096×4096"
What is the best way to display information to the user besides a simple hint?
depends on what you want
there is hint, hintC, BIS_fnc confirmation dialogs, etc
I am gonna try giving custom hints another go, couldn't get them to be called using BIS_fnc_advHint last time
speak here if you encounter any issues, the channel is here for you 🙂
do all unscheduled calls run the same max time? like "EachFrame" etc
like scheduled has max of 3ms i think
unschd doesn't have any limit like I said
they all the same?
Yes
ok great, ty 🙂
Instead of a timer, your script directly affects the FPS when it exceeds a few ms
yep
So I am trying to get custom hints to work, here's how my files are setup within the mission folder,
cfghints.hpp:
https://www.sqfbin.com/evofibovikeratocabeh
(Disclaimer: I copy pasted the sample on the wiki to make sure of no human error, I have tried editing the sample before to suit my own needs but in game the hint does not change despite changing text in the file itself)
description.ext:
#include "hint\cfgHints.hpp"
My question is, how do I get the hints that the game reads to be from the mission folder instead of the arma 3 directory, it tries to find the custom hints in the arma 3 directory, is there a seperate syntax for that? Because I try using this, [["Common", "GPS"]] call BIS_fnc_advHint;, with the respective class names changed, nothing more is added
@plush belfry you probably need to put the CfgHints into description.ext
im only guessing because havent used this my self
@plush belfry It should work. BIS_fnc_advHint uses BIS_fnc_loadClass which checks missionConfigFile first.
(anything in description.ext goes into missionConfigFile)
maybe check in config viewer that your stuff is actually loaded.
All of the forums I've read all said 1024x512, or 512 x 512. Ima try other res and see if its works
okay ty
Well those are the official dimensions from the wiki
That's not an exhaustive list, it's a list of examples that fit the 2^x * 2^y formula
1024x512 is valid
Hi, I have an array of objects, how can I pick the closest one from the player? should I use apply?
seems like its not loaded, the only things that are under CfgHints in game are the default vanilla hints
apply is for if you want to change the values stored in an array. You want https://community.bistudio.com/wiki/BIS_fnc_nearestPosition
Thank you 🙂
huh, so it works despite not showing up in CfgHints, weird but I'll take it
If you're finding vanilla stuff then you're in the wrong place. Look in missionConfigFile not configFile.
Roger
question about setVectorDirAndUp and its reference frame
I've got this code snippet I'm executing from debug console while looking at the rear of the vehicle
_flag = "pook_Flag_vehicle_UNO" createVehicle position player;
_flag attachTo [cursorObject,[0.687,-1.482,-0.23]];
_flag setVectorDirAndUp [[0.988,0,0.15],[-0.15,0.011,0.989]];
_flag setPosWorld getPosWorld _flag
wait wtf... ignore for now 😄
is there any way to associate a piece of gear with a specific player?
I'm hoping to do something where everyone can put their gun in a car and easily find which one is theirs
I could always do an ace interact and just store the weapon and attachments into the "vehicle" and just shove them in the vehicle's varspace, but I was hoping to go through the regular inventory
Don't think there is any way that would work with duplicates
Init for unlimited ammo for mortar?
this addEventHandler ["Fired",{(_this select 0) setVehicleAmmo 1}]
is there a (vehicle player) variable but for other players?
not exactly, but you can obtain that
private _playersVehicles = call BIS_fnc_listPlayers apply { vehicle _x };
ah i was wondering if there was a way cause i'm tryna replicate Ace combat 7s intros but with the ability to choose your own vehicle.
you can use vehicle with any unit variable
yeah you right, idk why when i tested it earlier it didnt work i prob screwed up something but yeah thanks
are there any getters for setAmbientColor setLightColor?
No
maybe i can do a workaround with getLightingAt
Maybe, yeah
If it's your lightpoint, you could save a variable on it with its properties when you create it
Feel like i'm having an empty brain moment, is there a good way to get the distance between two objects? 'distance' 'nearEntities' etc all seem to use the model center.
The scenario i'm having is I have a grenade, I want to find objects within 2m of the grenade. But if the grenade lands behind or otherwise near to a tank, the tanks center can sometimes be greater than 2m away even though the grenade could be right behind the exhaust or next to the track
using lineintersects and taking the returned positions of the first intersect usually gives a more accurate distance but that seems kinda expensive
you could use the bounding box?
hmmm how so? I vaguely recall having done something similar in the past but I'm drawing a blank on the actual details 😬
Do something like tank worldToModelVisual getPosWorldVisual grenade and compare it against boundingBox tank
Probably can use position inArea [center, a, b, angle, isRectangle, c] with these arguments taken from boundingBox with whatever margin you want, might be faster than script ifs
yeah I saw that alt syntax for inArea and was curious how fast it was
boundingBox also returns boundingSphereDiameter, might be useful too
Won't be that good for long objects to check distance against, but maybe such error is acceptable for you
tanks and trucks are probably the biggest things I'm caring about
I'll play around with inArea with the boundingbox corners, seems like a good possible solution
@ivory lake Got curious myself and wrote this:
private _bbox = 0 boundingBoxReal tank;
private _center = _bbox # 0 vectorAdd _bbox # 1 vectorMultiply 0.5;
private _box = _bbox # 1 vectorDiff _bbox # 0 vectorMultiply 0.5;
tank worldToModelVisual ASLToAGL getPosWorldVisual grenade inArea [_center, _box # 0, _box # 1, 0, true, _box # 2];
tank worldToModelVisual ASLtoAGL getPosWorldVisual grenade inArea [_center, _box # 0 + _margin_x, _box # 1 + _margin_y, 0, true, _box # 2 + _margin_z];
```to add margin to bounding box in meters
Some bounding boxes make no sense though, so it will depend on how much modeller messed it up
tank is zamak, grenade is player and hint is output of the function on the screenshot, seems to work fine
Not really a distance to bounding box, but at least very fast calculation
Use the alt syntax for boundingBoxReal with clipping type 0 for a more accurate result
True, 0 boundingBoxReal fixes that
@ivory lake Forgot ASLToAGL, added to the snippet
0 boundingBoxReal on problematic Zamak
yeah without 0 the bounding box includes stuff like memorypoints and the like
so you end up with stuff like... that
diag_codePerformance => [0.00355,100000] 
that's definitely better than my first attempt with lineintersect
well, lineIntersects is just a true/false
lineIntersectsSurfaces would give you the intersection's posASL, from which you can get distance
that's what I meant sorry
ok just tested it out and yep its working great
even works well with units
👍
how do i make pistol ammo explode on impact?
"Fired" event handler + ammo event handler
serverCommand returns true regardless of whether password was correct or not 🤔
Return Value:
Boolean - true if password is correct
diag_log ["123321a" serverCommand "#logout"];
2022/09/14, 18:26:37 [true]
2022/09/14, 18:26:37 Failed attempt to execute serverCommand '#logout' by server.
diag_log ["123321" serverCommand "#logout"];
2022/09/14, 18:26:39 [true]
2022/09/14, 18:26:39 Successfull attempt to execute serverCommand '#logout' by server.
Anybody dealt with serverCommand and checking if password is correct?
interesting, i was actually thinking about this today. some guy reported our server restart system was not working, usually its a password issue (syncing with server.cfg to mission.pbo)
for most incorrect setups i have some logging, but i have nothing to log whether serverCommand will work
thanks for saving me the time of writing something that might not work !!!
2022/09/14, 18:49:55 [true]
2022/09/14, 18:49:55 Successfull attempt to execute serverCommand '#exec 1' by server.
2022/09/14, 18:49:55 1
2022/09/14, 18:49:57 [true]
2022/09/14, 18:49:57 Failed attempt to execute serverCommand '#exec 1' by server.
```same picture with other commands
I guess its a bug? @unique sundial
i mean i guess it always returning true prevents easy password cracking?
Brute forcing isn't that easy
Isn't easy in a sense that it would slow down the server to get decent rate, and since you hacked the server to execute SQF on the server side, might as well kill it in myriad other ways
Can’t tell you until I looked it up
OK the return bool doesnt make much sense
it is definitely not the password is right
there is no return on command fail or success
there is only return on whether the command when through all stages of verification and is attempted
Wish it was, to know if you can use server commands. My use case would be changing the mission with #mission through voting screen, but I'd like to know if provided server password is correct or not beforehand (so people don't vote and then nothing happens), if password is incorrect, then only provide voting options within current mission
As an idea serverCommandPasswordTest STRING with a 1 second timeout so you can't use it to brute force passwords
or serverCommandPasswordCheck
can't you just use serverCommandAvailable with admin-specific commands?
oh, I guess if you're using the password form...
Yeah, I want scripted admin command usage through serverCommand
passworded version is server only
are you planning to give people access to server side?
No, I just want to wrap up #mission command with a proper in-game UI
How can i set walk to default on a server ?
But I'd like to know if server admin provided the correct password beforehand, so I can hide serverCommand options if it isn't
Practically this ^
If server password is invalid, only show towns on current island
Otherwise also include other islands so server switches the mission once vote ends
Not critical as I can say its admin's fault for providing wrong password in config, but I expected serverCommand to work as described:
Return Value:
Boolean - true if password is correct
so you want to authenticate player by whether or not they know server password?
No, players won't do anything with the password or commands
Server admin provides password in server setup addon and I'd find it useful to check if password is correct and know that serverCommand will work, before I offer options to players
Expected to be able to check by looking at wiki, but apparently its not possible, thus the idea for command to check if password is valid before running serverCommand stuff
Ifs its a wiki description issue and not a bug and checking password validity is a security concern/philosophy issue then nevermind, I'll manage without it
There is some sort of counter of failed attempts so dont think brutal force will work, the client is free to ban itself after n attempts
Meant a brute force in case cheater gains access to executing any SQF on server-side
To then brute force it to find out server.cfg's serverCommandPassword
Not sure why they'd want that as they can already mess up the server as they want though
Quick question: Can the select command used like this duplicate the markers it adds to the "_activeMarkers" array or will it act more like "puchbackUnique"? sqf _activeMarkers = allMapMarkers select { private _markerPos = getMarkerPos _x; ((allPlayers - entities "HeadlessClient_F") findIf { (alive _x) && (_x distanceSqr _markerPos < 800^2) }) != -1; };
it won't have any duplicates as allMapMarkers doesn't
Small tip: move (allPlayers - entities "HeadlessClient_F") outside of select so its not calculated over and over for each checked marker
private _players = allPlayers - entities "HeadlessClient_F"; and use _players inside select
@meager granite clearly the wrong description on wiki
I cannot make it return true is password correct because it returns true for many other reasons as well
i don’t know what to write it returns true for many reasons inconsistently too
@wind hedge inAreaArray is much better than findIf+distance unless the findIf it hitting early almost every time. And yeah, pull the player array calc out of the select.
private _players = allPlayers - entities "HeadlessClient_F";
private _activeMarkers = allMapMarkers select {
_players inAreaArray [markerPos _x, 800, 800] isNotEqualTo []
};
Thank you!
ServerCommandPassword mission EH? Server only, params are client that sent password, true or false for the success
how to properly scale decals? if it is at all possible without side effects
its a server setup thing. my stuff uses servercommand for restart schedule. but if admin is inexperienced they can forget to sync server.cfg pw to mission pw. checking if the command fails allows us to pop a message explaining why their server restart isnt working
“hey your passwords arent matching. X and Y will not work”
i mean that would work. would help for security to put in same container as server.cfg events so it cant be removed?
in my opinion the EH should be baked into servercommand and we just have to define the code it executes
to put in same container as server.cfg
why? You get server log on every successful or unsuccessful attempt
Also this is not what @meager granite was asking, making it server.cfg event would be beyond useless
[true,"#kick 5","SERVER",2,""]
So in Ace3 im trying to have it so that if a person has a specific item in their inventory they can put it on ai or other players.
Ive been trying to figure it out but idk how to do it with the ace interaction menu.
I have the menu itself but just not the adding the item to the target
I feel like I'm missing something simple. When I try to call this script in an object init, it tells me undefined variables in expression "_this" and "_crate". There's a format for calling it that I'm not doing right, isn't there?
_items = ["ACE_quikclot","ACE_elasticBandage","ACE_bloodIV","ACE_bloodIV_250","ACE_bloodIV_500","ACE_epinephrine","ACE_morphine","ACE_tourniquet","ACE_surgicalKit"];
_crate = _this select 0;
clearBackpackCargoGlobal _crate;
clearMagazineCargoGlobal _crate;
clearWeaponCargoGlobal _crate;
clearItemCargoGlobal _crate;
{
if (_x != "") then
{
if ("B" in [_x splitString "_" select 0]) then
{
_crate addBackpackCargoGlobal [_x, 5];
}
else
{
_crate addItemCargoGlobal [_x, 5];
};
};
} forEach _items;
what is _this supposed to be?