#arma3_feedback_tracker
1 messages · Page 4 of 1
@dreamy bane ↑ here's your shot!
IDK if it can be reproed in vanilla, I found out this issue with IFA3 planes
but like Lou pointed out it just takes couple of line changes, to fix it
I remember we had to workaround that in Antistasi and I don't think it was IFA planes at the time.
no vanilla assets with "airplane" sim
needs a mod for a repro
but you can make a simple override mode for one of the vanilla planes
Would it be worth making a ticket for a new Eden Eventhandler? It's lacking a "entityCreated" EH
It might well be but we don’t add things without testing
understood
would nearGroups and nearestGroups be feasible and considerable better performance wise vs doing that in sqf? (especially with an optional side filter)
atm we do allGroups, side/friend relation and then distance checks, or nearEntities, get the leader and from that the group - but not ideal and quite expensive if you have a lot of groups (150+)
in the same vein would be allLeaders <side> and nearLeaders [distance,side]
there is https://community.bistudio.com/wiki/groups but you still need to iterate over it to get the leaders, https://community.bistudio.com/wiki/inAreaArray helps here too
@real bronze i am asking about performance optimization
if you have many groups, reducing the initial set via engine itself is crucial
filtering via sqf is way way more expensive
i know, i should've mentioned that what i wrote is +- to improve what you described as your current solution 😄
@sterile nova any chance the configs of the Contact DLC Offroad variants can be applied to the base game Offroad? they are quite simply better, but players cannot use them if they dont have the Contact DLC, even if they look identical
contact DLC offroad has "Vehicle Cargo" transport carrier configs while the base game ones do not, for instance
however they're behind a paywall :\
Didn't that cargo clip with the characters in the back?
For contact it was acceptable since over there we could script it
ah ok. i havent tested that stuff. a non-paywalled variant of the contact offroads would be good though
I use both base and 'covered' contact variant, players are not understanding why they can get into one but not the other, due to the model being the same
left is paywall, right is base game
To be clear, this is about offroads that are Contact DLC assets but not exclusive to the Contact Optional Data, right? So they're still in the game outside of the campaign scripted context Reyhard mentioned, they just have normal DLC access restrictions
yea they are available without running Contact DLC, but yes they have DLC access restriction. i think in this case they should not as they're a variant not a separate base model
and for mission maker, they are simply superior since they are vehicle cargo enabled. you can see them in menu (eden and zeus) as "Offroad (Covered)"
https://community.bistudio.com/wiki/getTurretLimits would it be possible to change the behavior of this script command to have a minimum elevation that's above 0 degrees?
ops
i meant this one
Posted on FT:
[Feature Request] SQF command nearGroups: https://feedback.bistudio.com/T170144
[Feature Request] SQF command nearLeaders: https://feedback.bistudio.com/T170145
how would nearGroups determine the group pos though? by leader?
can we get a new syntax for count? "string" count "substring"? (counts number of times "substring" occurs in "string")
"aaa" count "aa"
1 or 2? ^^
use case? I was considering that but it made it too easy to create scripted aim bot
should be 1
1
yeah
any units of the group
added that clarification
nearGroups would look for any unit within the radius - not just the leader, and would add that group to the return.
i was just thinking how accurate that would be if the group's units are scattered
That doesn't exist?! Wtf that'd be the first thing that comes to mind when making Eden handlers
if you want the leader, there would be nearLeaders after all 😉
at times its not just about the leader. think of radio simulation, combat shouts, AI stuff, 3d unit visualization, etc
yea I just think what if one guy is 100m away from another , how do you count the group pos in that situation
see above: #arma3_feedback_tracker message
Ah, I probably misread something earlier 🙂
np
technically nearGroups and nearLeaders would be based on nearEntities but with different result filtering (and possible an additional parameter for simulation state)
seems to also be present in TB, not an extreme altitude change either
I checked the biki page twice, maybe it's not documented? I was very surprised that it does not exist as well.
https://feedback.bistudio.com/T170168 Ticket for entityCreated EH.
add entityDeleted for Eden… and missionEH too :p
OnDeleteUnits
When entities are deleted.
No arguments```
Dedmen hope you dont mind me touching that subject 🙏 Did you ever look into the particle implementation of RV engine?
Potentially one area with the biggest FPS wins? or is this all due to using outdated DX tech?
¯_(ツ)_/¯
any other *takers? 😬
no
The current particle implementation is incredibly stutter inducing for sure. That lack of fps stability and the sudden fps drops caused in part by particles is probably an important part of the puzzle of the reasons why A3 is perceived to be so unoptimized. Would be great if there was a way to disable particles entirely just to see how much fps and how the sudden fps drops improve without them
Well you kinda can but look towards and away from smoke - but even with modern hardware you can easily loose 10-30 fps with a couple in the screen view
yeah turning down particle quality helps. but i also noticed vehicle smokescreens seem to impact perf less than smoke grenades 🤔
it has been a while since i've delved into it though. At one point i thought it was a CPU limitation but that needs to be verified.
I also think there's a difference between the smoke being very close or farther away
While the hand held smoke screens seem to be the biggest offender, there are many other particle effects that seem to also impact performance too heavily, bordering on the stutter inducing frame drops. Those include the muzzle flashes on certain weapons and the explosion effects of vehicles etc.
The Splendid Smoke Rework mod tries to fix the vanilla smoke screen issue and does a fairly good job at mitigating the issue as much as a mod is able to
here is the link to the mod: https://steamcommunity.com/sharedfiles/filedetails/?id=2421048459
Thank God for mods! What would Arma be without them!? 🥳
I know what Arma 3 would be without them: DEAD

Only details he gives regarding the mod are:
i changed particles, and how big the cloud gets and such
probably worth doing some sort of sensitivity analysis w.r.t performance and usability vs AI, that varies smoke properties and figures out an optimum
wonder if there are new PhysX particle effects that are more efficient 🤔
The PhysX particle feature has been removed from PhysX version 4. The standalone library PhysX FleX is an alternative with a richer feature set.
Docs exist for PhysX 3.4 though https://docs.nvidia.com/gameworks/content/gameworkslibrary/physx/guide/Manual/Particles.html
But the fact that it is removed from 4.1 and Arma uses 4.1.1 makes me think that Arma doesn't use PhysX for particles at all...
PhysX 5 exists too now https://developer.nvidia.com/physx-sdk
they were tested out at one point, the property still remains but it c rashes your game if you use it now
Just tried the mod for the first time and not only now the smoke blocks Ai view better now but also the performance hit by each smoke grenade was reduced on my system by around 40%, looks pretty solid, I am kipping the mod. I wish the same config was used for vanilla so that players won't complain so much about the smoke grenades
Well, the following can only be modded, but I would love to see this done via the missionfile.
So that you can create your own face with a custom texture from the missionpath and load this texture multiplayer capable on a unit.
E.g. something like this setFaceTexture "faces\bruceWillis_co.paa";
But maybe also with a cfgfaces entry in the description.ext, so in the way it is modded. I don't know how this could work best. Anyway, that would be cool for some custom characters in missions, without extra mod dependencies needed.
I haven't opened a post in the feedback tracker yet because the google account login still doesn't work. But if this would be considered useful here, I can post it there again with a new account ✌️
Ooh that's encouraging to hear, thanks for testing!
There are a couple of tickets on this, first from... 2013 (lol) about how smoke grenades cause a large perf hit https://feedback.bistudio.com/T71128 and the other from 2015 that says FSAA + smoke grenades causes a performance hit
https://feedback.bistudio.com/T84621
maybe worth adding the details of the mod and performance uplift to the first ticket?
idea: what if you pass non-local argument to command that requires local argument, could there be error message if so?
Could
Pushing up in the hope including them in the 2.12 update
https://feedback.bistudio.com/T117142
https://feedback.bistudio.com/T169972
few ctrl+c ctrl+v work 
hope is zero
too late, RC went out yesterday
and 2.14? :3
2.14, all data charges need to be reviewed and approved for quite a long time now, regardless of how simple.
so 2.12 is only getting hotfixes on new/changed stuff, right?
so this fix not incl in 2.12, correct? because i can't hear fixed sounds in RC now
There will be atleast one more update to RC
I haven’t looked at rc yet but you can check config and tell me if those INTs are now Exts
It is not in RC. The RC build that is currently live is from Jan 30
Is it possible to have an optional bool flag for getVariable to set the variable automatically if it doesn't exist?
_obj getVariable ["var", default, setIfDoesntExist]
“It is always possible if we struggle enough” - Dedmen, most likely
That would be convenient. Should it also get the public flag from setVariable?
Also secret spam: https://feedback.bistudio.com/T76820#2405253
I just deleted it, let's see if the account does more to it 👀
+1, very handy for arrays when modifying by ref, then no need to run setVariable
Mashallah
public flag? oh you mean to set it publicly? dunno 
I guess no
Any workaround for this? https://feedback.bistudio.com/T169734
(posted similar question in #arma3_questions but this channel is more appropriate and I found the ticket as well, not duplicating post intended)
The workaround I would advise is to wait for the update fixing it to come out. The change is already applied to the internal build as KK noted on the FT ticket, so it will be in either 2.12 (next update, currently on RC branch so probably arriving in the next month) or 2.14.
RC build is from 30th as Neil said above. According to ticket KK fixed it on 5th feb
Yes, but it was also said that there will be another update to RC before release, so it could still make it to 2.12 if we're lucky.
It didnt
Then that's unfortunate for people who like to drive cars into rivers, I suppose.
Well, the best workaround is still to wait for 2.14. In the meantime you can always spawn a new one.
Agreed, best workaround is not to drive into water 😅
For the moment yes the solution is to spawn a new vehicle, I wanted to avoid this for several reasons (depending on how the mission is build). I wanted to check if there's something better
Thanks for replies indeed
Dedmen as well, thank you
oh sorry wanted to thank for reply
Edited thank not tank XD
need a sanity check by someone before posting on the FT
p:\A3\functions_f\respawn\fn_getRespawnPositions.sqf
Description: Return scripted respawn positions available for the given unit Parameter(s): 0: OBJECT, GROUP, SIDE or NAMESPACE 1 (Optional): BOOL - false to return positions, true to their names (default: false) NUMBER - 1 to return positions, 2 to return their names, 3 to return show info
_target = _this param [0,player,[objnull,grpnull,sideunknown,missionnamespace]];
...
switch (typename _target) do {
case (typename objnull): {
_objectPositions = if (isnull _target) then {_default} else {_target getvariable [_varName,_default]};
_groupPositions = if (isnull group _target) then {_default} else {(group _target) getvariable [_varName,_default]};
_sidePositions = missionnamespace getvariable [_varName + str (_target call bis_fnc_objectSide),_default];
};
case (typename grpnull): {
_groupPositions = if (isnull _target) then {_default} else {(_target) getvariable [_varName,_default]};
_sidePositions = missionnamespace getvariable [_varName + str (_target call bis_fnc_objectSide),_default];
};```
so if you supply a group, it tries to `_target call bis_fnc_objectSide`
however p:\A3\functions_f\sides\fn_objectSide.sqf
/*
Author: Karel Moricky
Description:
Returns object side as defined in config (i.e., not affected by dynamic changing)
Parameter(s):
0: OBJECT
1: BOOL - false (default) to return actual object side, true to return the default one (set in config)
Returns:
SIDE
*/
private ["_object","_static"];
_object = _this param [0,objnull,[objnull]];
_static = _this param [1,false,[false]];
if (_static) then {
(getnumber (configfile >> "cfgvehicles" >> typeof _object >> "side")) call bis_fnc_sideType
} else {
if (_object call bis_fnc_isUnitVirtual) then {
_object getvariable ["bis_fnc_objectside_side",side _object]
} else {
if (isnull group _object) then {side _object} else {side group _object}
};
};```
Error in expression < ["_object","_static"];
_object = _this param [0,objnull,[objnull]];
_static = _>
Error position: <param [0,objnull,[objnull]];
_static = _>
Error Type Group, expected Object
File A3\functions_f\sides\fn_objectSide.sqf..., line 16
➥ Context: ...
[] L45 (A3\functions_f\respawn\fn_getRespawnPositions.sqf)
[] L53 (A3\functions_f\respawn\fn_getRespawnPositions.sqf)
[] L19 (A3\functions_f\sides\fn_objectSide.sqf)```
so why is bugged here:
a) if (isnull group _object) then {side _object} else {side group _object}
or
b) _sidePositions = missionnamespace getvariable [_varName + str (_target call bis_fnc_objectSide),_default];
(or both 🙄)
[my take is b]
if this is the error then neither
_object = _this param [0,objnull,[objnull, grpNull]]; should fix it
well depends if fn_objectSide is meant to accept groups or not
well yeah that too. tho idk why they would call it if it doesn't 
https://community.bistudio.com/wiki/side
Returns the side of a unit, vehicle, object or location.
can you do "side terrainObject/missionObject" ?
anyhow this list missed group
_sidePositions = missionnamespace getvariable [_varName + str (_target call bis_fnc_objectSide),_default];
this seems also bad as addRespawnPosition stores it as:
_varName = "BIS_fnc_getRespawnPositions_list";
_target = _targetOrig;
if (typename _position == typename objnull) then {_position = _position call bis_fnc_objectVar;};
if (typename _target == typename sideunknown) then {
_varName = _varName + str _target;
_target = missionnamespace;
};
_positions = _target getvariable [_varName,[-1,[],[],[],[]]];
...
switch (typename _target) do {
case (typename missionnamespace);
case (typename sideunknown): {
_target setvariable [_varName,_positions];
publicvariable _varName;
};
case (typename grpnull);
case (typename objnull): {
_target setvariable [_varName,_positions,true];
};
};```
_sidePositions = missionnamespace getvariable [_varName + str (side _target),_default];
this should be the correct one imo
missionnamespace getvariable ["BIS_fnc_getRespawnPositions_list" + str (side group player),"default"];
[0,[0],[[8416.69,11340,0.00143051]],[""],[true]]
with
_respawn = [independent, getPos player] call BIS_fnc_addRespawnPosition;
TLDR:
p:\A3\functions_f\respawn\fn_getRespawnPositions.sqf
L53
_sidePositions = missionnamespace getvariable [_varName + str (_target call bis_fnc_objectSide),_default];
=>
_sidePositions = missionnamespace getvariable [_varName + str (side _target),_default];
seems broken since the dawn of times 😬
Is there a way to remove all of the respawn points added through BIS_fnc_addRespawnPosition? For example... [_myGroup, hq_spawn] call BIS_fnc_addRespawnPosition; [_myGroup, fob] call BIS_fnc_addRespawnPosition; ... and so on ... // LATER ON IN THE MISSION [_myGroup] call BIS_fnc_removeAllRespawnP...
Please nevermind, it could be TADST too that's messing up things because I just noticed it has " -filePatching" in the parameters field even when I tried to disable filepatching
i only discovered due to testing towing/ropes as a means to pull vehicles from water
has probably been an issue for 9 years but no one noticed 😂
can community vote to delay 2.12 for a couple weeks to allow time for some small tweaks? there were a couple nice fixes/tweaks that didnt quite make the deadline (heli rollover and water engine dmg), and it seems about 6 months between updates now
all in favor of 2.12 being pushed back 2 weeks … @jaunty narwhal @solid marten
back with some more weirdness i am not sure its a bug:
emptyPositions still considers dead bodies in the vehicle - is this intentional/meaningful or rather a bug?
like you can assign units to these positions, so technically they are not blocked and thus be considered empty, no?
When players go into a vehicle they pull the dead body out as well. So why should it be different for AI?
Or is emptyPositions not seeing them as empty?
correct
Uhm, yea that would be weird 🤔
you need to use atm: {alive _x} count (crew vehicle) vs available crew positions
"emptyPositions" needs another position "Turret"
https://feedback.bistudio.com/T75127
can be closed - i guess. well maybe not. would still be handy
emptyPositions "" return value is wrong on some vehicles.
https://feedback.bistudio.com/T164497
this is also strange (if true). that command could benefit by some attention
https://forums.bohemia.net/forums/topic/182946-emptypositions-gunner-bug/ seems the same/related
https://forums.bohemia.net/forums/topic/236150-looking-for-advice-on-emptypositions-command/
another potentially related problem is when players get out of a vehicle, they still remain assigned to that vehicle and position - doubt this can get changed/fixed
yet if emptyPositions relies on position assignment, this would also "skew" the return
however emptyPositions also doesnt act like unassignedVehiclePositions as you can still order units to replaced the dead in the vehicle or player assigned positions
I will check if still true will add
I remember something about it, could have been config fixed please retest
currentvehicleRoles?
all those ^^^ issues are long annoyances that were alleviated here and there with additions of the new commands over the years, if still true should get fixed finally
https://docs.google.com/spreadsheets/d/158L7awYg1O5Qlc6Z_Nu_CL1chivSHXJ4LzdR2tiiEO4/edit?usp=sharing
Sheet1
class,crewCount,transportSoldier,all,turret,commander,driver,gunner,cargo,cargoNoFFV,cargoFFV
PaperCar,1,0,1,0,0,1,0,0,0,0
B_TargetSoldier,1,0,1,0,0,0,1,0,0,0
O_TargetSoldier,1,0,1,0,0,0,1,0,0,0
I_TargetSoldier,1,0,1,0,0,0,1,0,0,0
B_HMG_01_F,1,0,1,0,0,0,1,0,0,0
O_HMG_01_F,1,0,1,0,0,0,1,0,0,0
(ran with 2.10 - so "turret" doesnt work yet)
BIS_fnc_countCrew also supports cargo. could be added to the overview as well
https://feedback.bistudio.com/T164497 - seems wrong/outdated
that said above checks only with empty vehicles. there is a slight chance if you had people get into a vehicle and leave again/getting killed inside, emptyPositions gets "confused"
what would that return specifically - what positions are taken in the vehicle by alive crew?
i guess desirable would be sth along the lines of:
- total amount of free positions and per type akin to emptyPositions // or extend that command with an alive parameter
- specific occupied like [driver,[turrets],[cargos]] with turrets and cargos to have the turretPath and cargoIndex respectively
emptyPositions doesnt count cargoFFV as part of all ("") - might be risky to fix now tho?
certainly some weirdness to emptyPositions
but also with BIS_fnc_crewCount (or just emptyPositions bugged/weird in multiple ways - probably more likely)
what on earth are you working on kju
to get AI to board vehicles again after respawn
while we're at boarding vehicles, was the issue - where player's squad wouldn't board an IFV/APC if player was inside as a commander - ever addressed? It got pretty notorious recently but I was unable to reproduce it in 10/10 tries yet
you sure? I just fixed the bug where second gunner wasn’t counted, afaik all cargo was counted. Try it next dev and report back.
@sterile nova what are the chances of getting these two objects (or clones) set up with "vehicle in vehicle" support?
they have no drivers so how would unload vehicles from it in vanilla?
_child = cursorobject; objNull setVehicleCargo _child // child unloaded from parent
being able to natively load a pallet with a couple ammo crates and then sling load it, or load the HEMTT rack with bunch of stuff and then sling load it, would be pretty handy for vanilla
I know that are script commands for it
problem is that you would be able to lock your vehicle on such asset - without ability to unload unless there is script for it
it could be perhaps solved by disabling ViV on init (some vehicles are already using it) so there is a chance though
Well, you can get into the vehicle that's loaded, and unload from there. You don't have to be the driver of the transporting vehicle to do it.
So you'd have to do something really incredible to get your vehicle stuck in one of those
Theoretically a crewless object like a supply crate would become stuck, since you can't get into those either, but you also can't load those in the first place without scripting, so that's not really a problem.
child vehicle has an "UnloadVehicle" action from driver seat, ensuring the child vehicle wont get stuck. i believe this is native vanilla
Would it be possible add so that weapons/muzzle attachments could effect submunitionConeAngle just like how muzzle attachments can effect dispersion with dispersionCoef. I guess sometime like coneAngleCoef
that'd be nice - there's already fireSpreadAngle that was for the shotgun simulation (shotSpread iirc?) but it does nothing despite being set on the two contact shotguns
they have the same spread atleast I couldn't notice much of a difference with shots diag
by 'does nothing' I mean it doesn't work on the shotSubmuniton based shotgun shells contact uses
I believe that was for shotguns before submunition worked for bullets (so pre contact)
I remember mods like RHS had it, and its like fixed 9 pellets
with what I am asking, u could have a short barrel and a long barrle shotgun use the same mag, but the long barrel would have the spread be smaller
or add choke attachments
yeah I understood, I was suggesting reusing it to also affect submunition
the mention of contact is because their two shotguns have it set up (0.95 for the full barrel, 1.25 for the sawn off) but they don't do anything
https://community.bistudio.com/wiki/Arma_3:_Startup_Parameters#Developer_Options
"<path>\mission.sqm" Load a mission directly in the editor. Example: "c:\arma3\users\myUser\missions\myMission.intro\mission.sqm"
When I activate this, theinitEHs for Eden Editor don't fire, do we need a ticket?
I mean, it is not that too annoying until I make a Mod that makes some changes into Eden
https://feedback.bistudio.com/T139493
Oh there's already one by Asaayu, understandable 😄

Not-so-serious feedback be like! 😄
I remember it was quite annoying when I was working on SOGPF campaign. Still broken 
I will have a look no promises
I have been summoned 🪄
It's almost it's forth birthday 🎂
has there been a build (dev/prof) with that already or still to come?
I noticed if path finding distance is under 7k the path finding works but if its over 7k the pathing never works and car stays put, need repro/ticket?
Tested with setDestination command
which terrain?
I'm pretty sure distance is irrelevant
tested, its stuck alright
I've tested it before and it doesn't get stuck 
I meant at least not because of distance
even when you give them paths across the whole Altis it still works
didn't test with setDestination tho
wow I got this problem with VR
nope, all I gotta do is create the vehicle like 30 meters closer and it works
here's my code (copied from wiki): https://pastebin.com/84rFBHtx
the car goes from player pos to cc marker pos
I'll return to this tomorrow
well your code isn't exactly correct if you run it more than once
next dev
is this not a bug?
#arma3_config message
(getEventHandlerInfo and CfgVehicles event handlers)
setDestination can have problems for too large distance (aka vehicle wont move)
true (The marker) but point is it never works if dist is over 7k
but that's only for agents, not normal units?
originally i had this problem with normal units
looks like same problem with doMove. distances over 7k wont work
infantry moves though
thanks, nuked
u sure ur sayin dat word to me
…soz? 😄
well I meant I nuked it I mean I was not calling you nuked but omg who would do that and I swear I did not mean to offend you I'm so sorry really that's not who I am I mean—
oki it doesn't work 🏳️
FFFUUUUUU...
…Eden Editor initialisation, or mission initialisation from CLI params?
yes
…both 😄
Hard
The display exists but it doesnt
That's Arma
I fixed it locally but it wont make it to the dev for awhile as it needs both engine and data changes and data is under strict lock until 2.12 release
did some more testing. in VR. man pathing works but not car when the distance is too long. So: (calculatePath ["man","SAFE",markerpos "st",markerpos "fi"]) works (calculatePath ["car","SAFE",markerpos "st",markerpos "fi"]) doesn't do anything
Will this be fixed in the upcoming 2.12?
https://feedback.bistudio.com/T167742
no
Or probably ever, sadly.
I wanted to disable the amphibious flag for the Antistasi mod but it was vetoed because "players might want to joyride across lakes" :/
May I ask why? This is a pretty serious bug 
I think the devs just feel ill when they consider looking at the pathfinding code :P
I don’t know who Alith is so no idea
Ah wait it is topic starter thought it was an assigned dev, then the answer is not, it wasn’t even assigned
2.14 then? 
LOLOLOLOLOLOLOLOLOLOLOLOLO—
tbh all vehicles that are amphibious can't really detect obstacles, this includes boats too (numerous times I've seen them constantly trying to swim through a pier), I guess that's a cost of unit just being able to drive straight
Tracked amphibious vehicles appear unable to cross rivers entirely
There are none in vanilla but it breaks stuff like GM, which being CDLC should probably get engine support 😛
They basically just wade into the water and sit in the middle of the river, and aren't able to cross
Repro is basically just "put down M113 on side of a river, give it a move order on the other side, watch it fail and get stuck in the river". I had tested on Livonia with GM tracked vehicles.
I don't have a feedback ticket for it unfortunately, although I can make one
(note speed)
Because that topic turned out so well the last time you tried it
@near cedar I think the RHS M113s get there eventually. Maybe the GM ones are lacking sufficient propulsion.
Dunno, it's not like they can't move. They just get to the middle and sorta stop. I also don't have the ability to diagnose the issue further (don't have a PC anyway to re-run vs RHS).
Here we are https://feedback.bistudio.com/T170421
I just went back through chat history and saw, as per GM devs it's an engine issue #568048835306455060 message
¯_(ツ)_/¯
@solid marten small unrelated FYI, locking inventory does not remove the rearm user action
Made a bug report about the maximum allowed move distance bug https://feedback.bistudio.com/T170428
7000m - isn't that outside of the VR terrain by any chance?
nope I placed the vehicles and dest marker in the editor, within the map borders
updated the zip..... forgot to save the mission
can repro - 3 vehicles
- w/ 1 WP @ 4 km
- w/ 2 WPs @ 4 & 8 km
- w/ 1 WP @ 8 km
the first two move, the third doesn't - and isn't unitReady
interesting, didnt try with WPs
Also PathCalculated EH doesn't trigger for the vehicle that is unable to move
bro remembers 💀
well most likely because it would move otherwise
yes
I only added lock to backpack afaik, @untold sky should know about the rest more
Is it one waypoint to another or first waypoint to last when several are placed? In any case it sounds like an engine limitation as calculating path is costly, unless you have legitimate reason why do you need to plan such long journey in one go, I probably won’t look at it
I wouldn’t be surprised if this one is intended
it's using doMove command. of course pathfinding is costly but it only takes few seconds for the vehicle to find the path so why limit that?. and 7k isn't that long when in CTI mission
So from pos1 doMove pos2 which is 7K away? what if you have another wp in between?
Lou did a test with WPs: #arma3_feedback_tracker message
Could be engine limitation indeed
is 20 speed limit on ropeUnwind engine limitation or stupid people limitation?
let's say Batman's grappling hook was cut content due to copyright infringement issues
im on my fourth rewrite of my grappling hooks :(
ropeCut frequently doesn't work for one reason or another but its not too noticeable to me just wondering if there was a reason why
RopeBreak doesn't fire when rope is broken by being shot, bug or intentional for use with ropeDetach instead?
https://community.bistudio.com/wiki/forgetTarget imagine a "forgetFor" alt syntax so we could set how long the target is forgotten for
<shooter> forgetTarget [<target>,<duration>];
-1/false to "remember" and cancel, true to apply permanently
the stealth mission makers would rejoice
nah - script it yourself 😛
and all the questions that would arise:
"forget for X time"
- does the usual "forget" timer keeps on counting?
- does the unit re-remembers them as if their knowledge had been suspended?
- what if the unit sees them again in the meantime?
too specific for a command, too prone to error, I'd say use forgetTarget and knowsAbout to script it
I don't really see a useful application that would deserve this command
im currently using "forgetTarget" to prevent AI from locking on to player vehicle through smoke countermeasure
maybe a "ignoreFor" then - visible physically but invisible on sensors and for AI
yea something to that effect
so the AI is still alerted and they don't suddenly relax
i dont script stealth/covert missions but i do have a use for brief periods of AI not targeting
i dont like fiddling with the groups/captive state to achieve stealth. seems to be an attack vector for MP bugs
and "forgetTarget" needs to be used in tight loop/PFH to be effective currently
many modern games have ability for AI to forget about the player after short time
disableAI?
https://community.bistudio.com/wiki/difficultyOption a "difficultyOptions" command would be handy. list of all difficulties in ["option",<value>] format
this is not how the engine treats it. would be quite a hassle to implement
rather a flag to make AI invisible for awareness could work
you can grab the options from config space and just loop through it?
https://community.bistudio.com/wiki/needService - does this also cover infantry with needRearm, or vehicle only? and what does the 0-1 range express - from its maximum capacity to current?
if it does not cover infantry, would it be feasible to have needAmmo for infanty?
there is https://community.bistudio.com/wiki/needReload and https://community.bistudio.com/wiki/someAmmo - these are too basic and general
like you would want to know if the primary, secondary weapon, pistol or throw muzzle runs out
the engine should have already flags and triggers for that with AI shouting on radio or acting upon it (trying to rearm nearby)
1 = needs service, 0 = doesnt need service
for repair its basically (needservice vehicle) == (damage vehicle)
for refuel its (needservice vehicle) == (1 - (fuel vehicle))
rearm is like "setvehicleammo" but it only tests the top most magazine
super basic. we just requested so that we can both detect and/or block vanilla service
it says
Values are in range 0..1: 0: no need, 1: maximum need
so you are saying the docu is wrong?
ok so it is a range
can we block it now?
ah allowService.. right I saw that, it being only on the ammotruck side is kinda annoying
Workthought: onCommitted control EH
another thought: createComposition ...
we need ways to spawn compositions outside of 3den and Zeus
Good though 👍
what do you mean?
Well at least for me personally it's usually I want to stop particular vehicles from resupplying not particular resupply vehicles from being able to
Hmm yeah i can think of cases in which both situations are possible, e.g. in my case i wanted to control which supply vehicle was used by an artillery vehicle. But the artillery vehicle would automatically go rearm to the nearest one, so my workaround was to use setAmmoCargo 0 on the supply trucks and manually control the resupply via script.
So I could just replace it with allowService, although the effect is the same as setAmmoCargo and thus redundant to have it work on the supply vehicle
It might make a difference to secondary explosions and stuff with mods like ACE though?
Anyway, having this option would be good too. Maybe just see if the passed vehicle is of type "ReammoBox_F" or not and act accordingly? (Although that might not make sense with the type param)
what sort of data would feed into it?
compared to bis fnc objectsgrabber/objectsmapper
it is the function of supplying vehicle and the checks are done by the supplying vehicle and whether or not to show the action to the player, to move it to the supplied vehicle would require a lot of rewrite
@solid marten not worth it to rewrite. main thing is we can now detect and block. we can do the rewrite with custom script
So will this not affect AI resupply behaviour?
selectCall could be a useful function. never liked how when using [A,B] select boolean that both A and B are evaluated
some syntax where only the selected value is evaluated, would be useful
Did the 'Service' eventhandler get added then?
oh yep:
Killzone_Kid — 29/12/2022 07:54
Next dev:
needService
allowService
allowedService
"Service" mission EH
documentation incoming
that was what I missed, I thought it was just the commands
call ([{A}, {B}] select <bool>);
yea then we have the call overhead tho :\
i guess it would sort of be the same with selectcall
i just dont want both A and B evaluated
is there any chance of getting the ability for ground weapon holders (or any other "proximity" containers for that matter) to stop having their items appearing in inventories? enableSimulation false, setDamage 1, lock true all don't do anything like this, just stops it being able to be moved
Did you try lockInventory?
Have just done that, doesn't work
Just ends up with it being red once you try transfer it and fail in doing so
i mean thats pretty good if its red and cant transfer
there is no way atm to stop/cancel https://community.bistudio.com/wiki/playSoundUI right?
also cant override it (which is also good)
playSoundUI is the only way to play during briefing and debriefing phase any audio - quite unfortunate its not more flexible. its very powerful for voice over or music use in these phases
or also mid mission to make sure you have best volume to understand conversations
yet if people want to skip or mute, cant be done atm is seems 😦
@desert trench sell it to me! There is no object for this kind of sound but it can be found. What are the benefits of this kind of sound vs all other sounds we have already?
@solid marten as said only playSoundUI works in debriefing phase or debriefing phase, and its best for conversations atm - only downside is you cannot stop/cancel or adjust their volume (only with the next event)
could this be used to solve https://community.bistudio.com/wiki/Description.ext#onBriefingGear onBriefingGear/onBriefingGroup/onBriefingPlan?
should yes (aka if same tech is used as playSoundUI is using)
@solid marten which dev to look at broken weapons? PCML top attack mode is ineffective, most likely bugged
honestly pcml is not working properly in general, it keeps hitting the ground because of its exaggerated sine-wave like trajectory
probably something from reyhard in general. might be config setup or engine tho
is it a bug that dynamic sim only works of the canTrigger state of a vehicle or should it also check the crews canTrigger state?
You have to tell me more than something is wrong with it
It's kinda hard to tell. It looks visually like it's working but does very little damage.
Like the subprojectile is missing the target.
I don't really know how those things work though.
Yeah. Subprojectile seems to go at an angle that either misses or hits sloped armour
It triggers potentially too quickly (easy to see with splendid cam)
And like I said, the trajectory is prone to hitting the ground, especially the first dip after launch in direct attack mode (and maybe top attack too but i don't remember). (easiest to see in VR)
when i get home ill do some drawline3d stuff with the submunition if someone doesnt beat me to it
basically the top down mode does about 10% of the damage that regular mode does against armor, which seems counter intuitive
like just makes the missile do 90% less damage
i believe that has been addressed for 2.12, or at least there was a recent note about it on the forums
is there a particular reason why createVehicleLocal does not have the newer createVehicle [] syntax which is way more efficient as the engine doesnt have to find a suitable position?
laziness 😅
i have thought about that a few times, but never brought it up. figured it was just my OCD
local flag in createVehicle so we can just ignore it entirely
So I can make playSoundUI and playSound3D return id and then you can skip arbitrary number of seconds when wav is playing using this id, or finish the playing altogether with -1, sounds good?
yep would be great 👍
Workthought: a command to make AI plane/heli go anywhere forcely, even if I order them to do kamikaze, will do
Like setDriveOnPath for more simulations
id be happy if we can just set their Z axis offset so they dont ram the ground when strafing
they are aligned to ASL 0 on strafe, so performing a gun strafe at any elevation they will invariably ram the ground
doesn't flyInHeight help any?
no
when they are strafing, its like _targetpos = agltoasl getPos target and then alignment is ASL, so they crash into terrain
outside of strafe they can avoid terrain, but when attacking they do not
since we are talking about this I have also seen plane crashing on the side of a aircraft carrier when using auto-landing
that happens if you start the landing from too low..
(starting landing above the carrier, but not high enough)
Here's a strange one I noticed.
'GetOut' eventhandler doesn't seem to fire when the 'Unload Incapacitated' action is used (ie. unconscious units are inside the vehicle)
getOutMan set on the units works but getOut on the vehicle does not
Can't seem to find an existing ticket on the feedback tracker
Yeah make a ticket, that’s odd both EHs should be triggered by the same event, one could be missing or something else
is ropeBreak eh supposed to be fired when rope is cut by being shot out too as will send a ticket if so
make a ticket with repro, sounds like it should fire
roger i shall do so later today unless @west onyx would like to
maybe there should be a RopeCut one since the behaviour is slightly different. with RopeBreak the rope is dead, its almost like "Rope Killed" event
with RopeCut the rope is still alive, just not connected
the rope creation is handled, but it would be good to detect that a rope was cut but still exists
when a rope segment is destroyed a "RopeCut" event should fire with the rope as param, with ideally the old child object passed as well
so we can see what was disconnected
speaking of which, can rope segments take event handlers
*dun-dun-dunnn*
Why not add param in ropeBreak that's true/false depending if rope got cut?
currently ropeBreak doesnt detect the rope being cut at all
ropebreak is just misnamed, it is more accurately "ropedestroyed" or "ropekilled"
Yea so why not add a param to it instead of creating a whole new event. Seems less work.
Well there are plenty of things mis-named.
yea that could work. not sure how it would affect existing mods though. we would now have an event handler firing where it didnt used to
rope killed parameter added at the end sounds like itd be the easiest "fix"
As it's not existing right now no change as they wouldn't use that variable.
though cant you just check if rope object is objnull when its fired
Ah you mean if they add it so it triggers for when the rope is cut. Yeah that might be something to watch out for.
i just did some rope stuff a month or two ago and i couldnt tell you what would happen if the ropebreak started firing when rope segment is cut 😄 no idea at all, as rope guys have used it as more of a "ropekilled" event
Yea might be saver to make new event then. Only thing I'm thinking about what use does it give? As you are cutting it by function, so whatever happens after you can do. Sure it's more useful especially for script/mod compatibility.
ropes can be shot out which isnt easy to detect
Yea but that would be a ropeBreak right? Or is ropeCut not referencing to cutting via command?
the RopeBreak event is more accurately the "RopeDestroyed" event when the entire thing is destroyed
so ropecut just removes a rope segment, but doesnt destroy the rope
shooting a rope segment is just like ropecut
Ah so it leaves it on the ground
im confused where we are in this conversation
yea just laying there
yea so we have the ropedestroyed event (called ropebreak), but nothing for when the rope is cut by gunfire or whatever
so the parent vehicle can become detached from the child with no event detection
But shooting the rope cuts it then? I've never done it. But if that's the case yea the naming is weird and an new event would be useful.
so if you attach rope and pull out and it detaches does rope break fire?
killing a rope segment does not fire the RopeBreak event (for instance with gunfire). in my opinion its too late to make this change to RopeBreak due to mods relying on the Ropebreak to act more like a RopeDestroyed
does ropeCut command trigger rope break EH now?
i am testing now for the first time in 2.12 and it seems to be firing for both
when i was working on ropes in 2.10 it wasnt firing for the gunfire cut (never tested ropecut)
Hi, since the 2.10, the thermal imaging became a little bit too buggy so i wanted to know if something was planned to patch these problems. Actually like this report : https://feedback.bistudio.com/T167451 the thermal imaging is now almost completely useless and i'm not the only one in that case.
When close to the ground, it's almost impossible to distinct a man in the grass from the grass, because the grass, glow more than a human and the time doesn't matter "day/night".
When far from the ground, it's very difficult or even impossible to distinct a man from a little rock. The terrain is loaded around your position, but start to be less detailed more further and i think this is a question of "performance", but this is a problem because you are not able to distinct a head from a little rock, because the rock exactly like the grass glow more than a head and the "day/night" doesn't matter.
In conclusion, since the 2.10, use the Thermal Imaging is almost completely useless and is even worst than the normal mode, because you don't have the time to compare the rocks to a human especially when you are viewing this through a drone. Suggestion : I think, you should add a new option in the difficulty called "Thermal Imaging Type" where we can select which type we want, so the users like me that want the 2.08 back will be happy and the others can still use the 2.10 version.
TBH i dont have a problem with thermal nerfed. anywhere its available it gets abused
only issue I have with new thermals is weird clipping/blinking on dust/smoke particles and that on longer distances it has a weird graphical artifacts like you would get with some textures when ambient occlussion is enabled (but this is somehow fixed when using A3TI)
Spam comment: https://feedback.bistudio.com/T170174#2412195
so no issues in 2.12? 🙂
i dont know, it is slightly confounding but im not interested enough to look into it. as long as the scripts work and nothing breaks then all seems fine
has it been decided if the pathing bug will be fixed? (https://feedback.bistudio.com/T170428)
you sure this is a bug?
depends on how you look at it 🙂
but definitely not a good thing
I dunno, I feel like if your main problem is that vehicles won't path over 7km then you haven't been doing a lot of AI work :P
well if i have to make my own pathing code then I have done plenty of AI work 😉
When you do, you will discover that vehicles cannot consistently drive a 500m road path
Well, sometimes
has this issue with some GM trucks...
Original Antistasi has a fairly simple workaround for the 7km thing. You define a handful of crossroad points on each map, and if a path is too long you throw in one or more of those.
We replaced that with some super fancy shit
sounds like you got it working
I didn't get the GM trucks working yet
Or bridges with CUP vehicles (and a few others). Or making amphibious APCs stop humping buildings. Or making an HEMTT drive down that road into Therisa without randomly swerving into a tree.
yea not easy
why not make multiple waypoints in between?
the water is biggest problem for that
in what sense?
you can use the road network for the WPs
in the BIF there are couple of algorithms to find shortest route and such
that's one option. i was thinking of the gulf in Altis map, need to make WPs around that
but that's only if the devs wont help here 🤞
help how?
by making the AI movement work at distances over 7k
I am not going to go into much detail, there doesn't seem to be a limit on distance. There is however cost associated with path calculation that takes a lot of different params including even the gradient of the the road. So when the distance is great the cost goes up and if it goes over certain threshold it is rejected as too costly. Will devs fix this? No there is nothing to fix, it is not a bug.
ok well I appreciate the answer KK
though I was hoping a script command to set that max cost
There is a reason its not done - aka its too expensive calc
You can freeze the game if you have WPs too far part through complex terrain
editor's decision 😄
no
There are cases when vanilla wheeled and tracked vehicles will stop randomly in the middle of a road and refuse to move further
It happens incredibly randomly and can behave differently between server and client
And issues when vehicles overshoot on turns and crash into kerbside objects
Honestly would be nice if devs/QA could make a substantial pass over AI driving logic, because it can be immensely frustrating at times
I've had GM M113s try and drive up house walls in Malden when left without waypoints
Vehicles also know exactly who shot them and from where, so if you shoot out a gunner then the driver will drive up all the way to find you and then park next to you in anger 😂
This is an old problem, first reported this in 2015 (see case 2) https://feedback.bistudio.com/T85165
@solid marten unitIsUAV player will be able to detect if player is remote controlling a uav in 2.14?
also is there a difference between the detection in cursorobject vs getcursorobjectparams ? there are times when getcursorobjectparams returns an object where cursorobject fails to
for instance when looking at the back rest of a camping chair
that’s what I wrote in the ft ticket
is blockAIVisibility (config value) 1 by default or did BI not able AI viewblock for any effect?
as in configs there is only =0 set (for all non smoke FX - which indicates =1 is the default if not set)
blockAIVisibility = true; // sets if particles are in the AI visibility tests (default true) - false for better performance but AI is able to see through particles
https://community.bistudio.com/wiki/Arma_3:_Particle_Effects
seems to be the case indeed
idea: OOP in SQF with little effort using hashmaps, with destructor support:
_class = [
["constructor",
{
_thisObj call ["SomeMethod", _this]
}
],
["SomeMethod",
{
_someObj = createVehicle ["bla", [0,0,0]];
_thisObj set ["mVehicle", _someObj];
}
],
["Method", {...}],
["mVehicle", objNull],
["destructor", {deleteVehicle (_thisObj get "mVehicle");}
];
_obj = createObjectFromClass [_class, [_constArg1, _constArg2]];
_obj call ["Method", _args];
under the hood, _obj is just a hashmap (typeName _obj == "HASHMAP"). createObjectFromClass simply does this:
createHashmapFromArray _classcalls the"constructor"(see below forcallbehavior)- sets a flag on the hashmap in the game data:
map.treatAsObject = true
we also need an overload of call: _hashmap call ["method", args]. the only difference between this and normal call is that it also defines a magic variable _thisObj when it calls the method
and finally, when the game wants to destroy the hashmap, if map.treatAsObject is true, it calls the destructor (if it exists)
feels weird, arbitrary and can be done with macros / wrapper funcs.
I know, except for the destructor
that was the sole reason I proposed this
I was actually gonna write this in like 10m using a couple of very simple macros and post it on the github. then I realized that without destructors it's just pointless
but then again there are also many other weird things in SQF 😛
the point is convenience
some sort of EH to fire when variable is destructed would be more generic.
yeah but that would add way too much overhead
thousands of variables are being destroyed in the game every second
we can even have inheritance 😛 (no need but I'm just proposing it for fun)
_class2 = [
["moreStuff", ..]
] extends _class1;
extends creates a new array and does 2 things:
- adds the new members to _class1 and overwrites existing ones.
- adds a new member
["base", createHashmapFromArray _class1](e.g. to do_thisObj get "base" call ["constructor", _this])
this one is not needed tho. we can do this ourselves
made a ticket:
https://feedback.bistudio.com/T170647
hiding gui in splendid camera doesn't hide script errors, intended or ticket time?
script errors aren't splendid camera gui, though. And not any other scriptable gui for that regard
I would say intended and desirable
If you don't want script errors then turn off the launch flag
the hide gui button seems to hide all gui that i can figure out albeit one or two needing time to not be 0 to properly disappear 
If you don't want script errors just fix your script 5head
script errors shouldn't show in stable only dev
Not to cast doubt or anything but I've caused a lot of script errors in my time and almost all of them were on stable
-showScriptErrors or simply Eden Editor do show script errors
tbh
script errors disabling without having to go back to launcher would be nice because i really dont care for other peoples script errors inside while true loops
buuut not a huge deal
well, you can have a shortcut/setup for development, and another one for playing, that's not uncommon
that or play non-buggy missions
yeah but still requires me to relaunch the game :(
i could spend that 5 whole minutes doing something like errrrr
not playing buggy missions/using buggy mods
they should be disabled by default on stable
I never turned script errors on intentionally either but I would've done by now regardless
i always nope out of a server if i get hit with a wall of script errors on join, usually a bad omen
this was splendid camera not being considered when the mod maker made the mod
eh?
some error related to not having something equipped being looped over and over when in splendid camera
shrug
not the biggest issue in the world but it didnt seem intentional for splendid cameras hide gui to not hide script errors
if it is intentional for them to not be hidden then i can be ignored
Nobody likes my OOP idea? 😢
I don't expect this to get fixed but it is something to note and be aware of now that we have servers running with uncapped framerates.
https://feedback.bistudio.com/T170678
well diag_frameno is a float
after about ~16M / 1000 / 60 / 60 ~= 4.44 hours it won't be accurate enough to represent integers anymore
so there's not really anything to fix 
what's the use of diag_frameNo on servers in this case
CBA uses it for CBA_fnc_execNextFrame but it seems like for the most part its fine as long as you don't make a destructive operation loosing precision, just being dumb not thinking about how it's precision works after X amount of time
p:\a3\functions_f\debug\fn_isdebugconsoleallowed.sqf
has
// == SP MODE ==
if (!isMultiplayer) exitWith
{
allDisplays find findDisplay 313 in [0, 1] // 3DEN preview
||
{allDisplays find findDisplay 26 in [0, 1]} // 2DEN
||
{(configFile >> "enableDebugConsole") call {isArray _this || {isNumber _this && {getNumber _this >= 1}}}} // allowed by mod
};```
why is the mission specific parameter (enableDebugConsole in desc.ext) not taken into account for SP?
this doesnt make sense to me. so you are forced to do testing via Eden, or need a config mod to enable the console globally
what am I missing with this design?
(the check is done below but just for MP)
TARGET = XXX findNearestEnemy POSITION;
WAYPOINT = GROUP addWaypoint [position TARGET, 0, 1];
WAYPOINT setWaypointType "DESTROY";
WAYPOINT waypointAttachVehicle TARGET;```
is it considered a bug if the WP position remains on the initial location and doesnt follow the attached target? (even with knowsAbout level/direct view on the target)
i use in scheduled scripts to just wait a couple frames
waitUntil {diag_frameno > _f}```
diag_resetFrameNo?
since making string alternative is not an option due to performance
Can't reset because that would break every mod that tries to use frame numbers for time reference 😄
Well even if you did make a string version you still couldn't use it for comparison and stuff 🤷
You'd still be conerting it to a float for comparison, etc.
You could use extensions but that too is meh
it would be an option for mission maker to decide
Mission makers shouldn't decide whether to break mods. neither the mod authors nor the people playing the mission would know why something impossible just happened and went wrong
string would be slower, but way fast enough still
I always kinda wanted to have 64bit int datatype. but implementing all the commands for it yuck
You could wrap at 16M :P
Right so we never added anything that had potential to break someone’s mod
Wrapping is just as bad as manual reset command.
That would turn quiksilvers example into a (almost) endless loop.
16m would be brokenish- but quiksilvers code would still not break
Yeah I think you'd need an extra command/syntax either way.
old Mods/missions break all the time anyway, the community will update them if they are still being used or if not active modders will upload a fixed version anyway, like it already happens with outdated mods like Enhanced movement which has several "community fixes"
Moving forward regarding performance and much needed features is far more important than old mod compatibility IMHO. "Old mods compatibility" can also be too easily used as an excuse
There is a difference between "this is broken and doesn't work anymore and has to be fixed" and "when someone uses this script command (which is rare), some mods will break in a weird way that noone expected and that cannot be detected, diagnosed or work-arounded"
The first one is a clear issue, that is usually easy to figure out and then fix.
The second one happens randomly every few months and makes players angry at mod dev's who aren't at fault, and makes mod devs rip their hair out
So far I haven't seen anyone actually say that they have a problem that needs fixing. If that time comes and we actually have a usecase, we can think about solving for that usecase.
after running the game for 4+ hours
Quiksilver's example might wait a few more frames than desired, but his code is scheduled so it already does that anyway.
CBA example might make execNextFrame skip a few frames. ExecNextFrame is in vast majority used to just delay something by a short as possible time, it being delayed for a tiny bit longer won't affect most things. And if someone finds out that it does, it would be solved very easily with a variant that returns the number as string, which will not break any mods.
Actually if I see that right it doesn't even make it skip, or one frame at most.
Moving forward regarding performance and much needed features
None of that applies here
If none of that applies in this particular case then please disregard what I said
Hmm. That one might explain why ACE actions get really slow after a few days of server uptime.
Although I'm not sure why they'd be using frame counts rather than time...
That would likely be CBA_missionTime which does have an open PR (that's been open for years at this point) attempting to fix the precision issues after a long period of uptime (7+days)
https://github.com/CBATeam/CBA_A3/pull/1324
https://feedback.bistudio.com/T169970
Is something like this feasible to happen 🙂
Why not introduce a 2nd diag_tickTimePrecise ?
diag_tockTime
tbh my situation is not a problem, i do fine with it
as a suggestion tho, “EachFrame” and “Draw3D” events should have frame number in params as special variable
“_thisframe”
They use it to flip between "current" and "next" frame. Depending on if your "execNextFrame" runs early or late inside the frame.
It doesn't introduce time delay
And that returns string?
We have the system time stuff already, doesn't that also return milliseconds?
https://community.bistudio.com/wiki/systemTimeUTC Yes. Precise time down to millisecond.
And it doesn't loose precision, atleast not for 16 million years XD
So if you want precise time that doesn't loose precision, there ya go.
I wonder what would happen if we just change the scalar type from float to double XD

(Lots of things would convert back to float and loose precision) but for things like this, it may work 🤔
addMissionEventHandler [
'EachFrame',
{
hintsilent str _thisFrame
}
];```
It's slow 
any chance in this being looked into or is there no possibility of it being added so no point in ticket?
No alive in 10000 ms, exceeded timeout of 10000 ms
No alive in 21125 ms, exceeded timeout of 10000 ms
No alive in 31859 ms, exceeded timeout of 10000 ms
wasnt this timeout to be increased?
(at game start)
there are multiple places with different timeouts
alright. is this to be posted on the FT with logs?
I need to know what it does during the freeze, and most likely need to reproduce it too
Showerthought: Is it reasonable to update the engine so PhysX object can have collision with attached to object?
I just want this in more authentic way, currently we don't have a proper collision in such case 
#general_chat_arma message
Ran into this: https://feedback.bistudio.com/T123355
I suspect this is destructive for our use cases (large handleDamage functions on AIs, some fired EH hacks). Any chance of it getting fixed soon?
pretty sure Dedmen fixed it
Did you try the stress test in the feedback?
Ah nice
Could I get some feedback on requesting angle clamping commands?
https://feedback.bistudio.com/T170798
Hmmm. At least a function is good
Currently I have a function, but it's kinda bulky calling it every frame to clamp the angle.
You can use macros instead
And clamping doesn't need a new command. We already have linearConversion
You can also use min max
#define CLAMP(x,a,b) (((x) max (a)) min (b))
For the vector we have vectorNormalized all the rest can be achieved with clamp(val, min,max) which is fine I can add that. I think minMax would be a good name for it
clamp works too
Having said that, if the speed improvement is insignificant in comparison with macro provided by 🐆 we’ll just leave it
And since it would take array for the range, that alone might make it not worthy
CLAMP will not work
as Angles need to be between 0 and 360
if you pass in angle of 400 the macro will return 360, which is not the correct angle of 40
Angles aren't linear
they are linear. what you see is due to its periodic range
which is very easy to correct: (a % 360 + 360) % 360
#define CLAMPANGLE(x,a,b) (((((x) % 360 + 360) % 360) max (a)) min (b))
Well, i'm still not sure that would work with, say, -1000 🤔
it does
(-1000 % 360 + 360) % 360 = 80
IIRC Arma usually does the periodic range adjustment itself so you can normally skip it.
a%b returning between -b and b is hella clunky
You can always do a%180 :P
Well, the original question was to, say, clamp 1000 degrees between -25 and 40 degrees 🤷♂️
That's kinda poorly defined. Like where would you want 190 degrees to end up?
though when you think about it clamping an angle can be ambiguous
e.g. let's say I want to clamp 50 between 10 and 350
do you say it's 50, or 10?
it can be both depending on how you look at it
it would return -25
that's subjective
as I showed here it has 2 answers
I have already implemented the commands I have requested, heck I even provided the source code in the feedback
It doesn't matter they are conterminal angles
🍿
so 10 and 50 are the same?!
/*
* @brief returns a value between 0 and 360 degrees
* @param angle float angle in degrees to be AxisClamped
* @return float clampedAxis
*/
float clampAxisInternal(float angle)
{
angle = std::fmod(angle, 360);
if (angle < 0)
{
angle = angle + 360.0f;
}
return angle;
}
/*
* @brief returns a value between -180 and 180 degrees
* @param angle float angle in degrees to be normalized
* @return float normalized angle
*/
float normalizeAxisInternal(float angle)
{
// make sure angle is with in (0,360)
angle = clampAxisInternal(angle);
if (angle > 180.0f)
{
angle = angle - 360.0f; // in the range of -180,180 normalized
}
return angle;
}
/*
* @brief clamps an angle in degrees between min angle and max angle.
* @param angle float current angle measurement
* @param minAngle float min allowed angle to clamp to
* @param maxAngle float max allowed angle to clamp to
* @return float normalized angle
* @warning coterminal angles are handled, 400 -> 40
*/
float clampAngleInternal(float angle, float minAngle, float maxAngle)
{
float deltaAngle = clampAxisInternal(maxAngle - minAngle) * 0.5f;
float centerAngle = clampAxisInternal(minAngle + deltaAngle);
float centerDisplacement = normalizeAxisInternal(angle - centerAngle);
// clamp values here
if (centerDisplacement > deltaAngle)
{
return normalizeAxisInternal(centerAngle + deltaAngle);
}
else if (centerDisplacement < -deltaAngle)
{
return normalizeAxisInternal(centerAngle - deltaAngle);
}
return normalizeAxisInternal(angle);
}
/*
* @brief clamps all components of a vec3 between 0 and 360
* @param x float x component
* @param y float y component
* @param z float z component
* @return vec3 clamped vec3
*/
vector3 clampInternal(float x, float y, float z)
{
return vector3{clampAxisInternal(x), clampAxisInternal(y), clampAxisInternal(z)};
}
yes
One on the reasons why linear conversions doesn't work well
it works if the angels are in the normal range of 0 to 360, but it fails once you go out of the range
oh, 10 and 350 are the same
not 10 and 50
no they're not. read what I said again. as I said, clamping an angle is subjective
I know, you said 10 and 50
I meant 10 and 350
also 10 and 350 aren't coterminal. it would be 10 and 370 that are
how 10 and 350 are the same, one is 10 degrees one way another is 10 degrees another way
it's wrong (I'm wrong)
what is wrong
also 10 and 350 aren't coterminal. it would be 10 and 370 that are
i messed up and said 10 and 350 are conterminal
which is incorrect,
10 and 370 are conterminal
actually this thing is not so subjective if you define a direction. which naturally should be in the positive direction. so the answer is 50. clampAngle [50,350,10] would be 10
yes
Stealth spam comment (although they seem to have forgotten to include an actual spam link 🤔 ) https://feedback.bistudio.com/T170687#2416280
thanks - removed 😄
way to get the "muted" state of a player
// from client
_muted = muted otherplayer;
would allow some ability to filter out text chat from the voice-muted player.. so player can apply both voice mute and text mute
isMuted* plz
Do we have some command that returns playerinfo including pings and bandwidth values that are on map screen?
Can we add it to that?
There's a server only version
iirc it was called allUsersInfo or something
getUserInfo 
sad, as mute is also on map screen next to these.. but ugly eh probably good to make separate command :sad:
is there anything "getUserInfo" could return if called from client?
Well client also displays the users ping and bandwidth info on map screen.
So client also has that info
not sure if client has headless,clientstate,adminstate info. But I think besides that it should have all the others
getUserInfo would be a good candidate for it
i would just allow "getUserInfo" to be called from client and insert nil returns to those server only values ... then add muted state on the end
on the topic of players and such, this is a bit of code i see frequently and wish there were a better method...
issue is that headless clients appear in "allplayers" list
allPlayers - entities "HeadlessClient_F";```
ideally headless clients would be removed from the allplayers list
since we can more precisely access them with the entities "headlessclient_f"
There might be code depending on them being in allPlayers though :/
new command:
allPlayersReal...
allHeadedPlayers
Aside from actual players and Headless Clients allPlayers also comes with Virtual Spectators and Virtual Curators, i.e. it returns all occupied slots in the lobby.
So technically you actually need something like allPlayers select {!(_x isKindOf "VirtualMan_F")} instead of allPlayers - entities "HeadlessClient_F". Of course, the latter usually works too, but only because except for Headless Clients, VirtualMan_F instances are rarely used by the community.
I probably should have updated the Wiki when I figured this out, but it's so niche ...
getPlayers [getRealUnits, getVirtualUnits, getHC] 😛
I think the bots are utilizing AI to quote and reply to comments now 😄
human farms > AI :p
AI can’t « but we can need to it ». Agree with Lou
Interesing
This is actually useful to know, we do use virtual spectators and curators
i think better would just be a “players” unary command
players west, players east
Well, that was a joke about engine limitations and boundingBoxReal. I have no idea if a new command is really what's needed.
I found a bug, heavy vehicles don't skip waypoints they can't reach like light cars.
If, for example, you place several waypoints on the water and several on the ground, a light car will skip those on the water and start moving to those on the ground. But other vehicles, such as tanks or APCs, will simply stand idle
Spam: https://feedback.bistudio.com/T170919
Spam comments:
https://feedback.bistudio.com/T159245#2418011 (ticket can also be closed as resolved)
https://feedback.bistudio.com/T170174#2418002
https://feedback.bistudio.com/T166378#2398358
https://feedback.bistudio.com/T168444#2391883
thanks, cleaned
Any chance of getting insert functionality modified to take -2 for example as inserting 1 value in from the back and so on?
private _arr = [1,2,3];
_arr insert [-2, [4], false];
_arr //[1,2,4,3]``` for example. currently returns `[1,2,3,4]`
cleaner than _arr insert [(count _arr) - 1, [4], false]; etc
cant use set for that?
nope as want to preserve whats already in the array
would it make sense for "EachFrame" mission event to have special variable with frame number
addMissionEventHandler [
'EachFrame',
{
_thisframe // 24792
}
];```
Isn't it diag_frameNo?
BIS_fnc_arrayInsert?
insert works for them, they just want the same negative index syntax that was recently added to select, for convenience
^ it'd just be a nice feature that's all 🤷
I suggested a negative index for select and got denied, so don't keep your hopes up
.........it was added in 2.12
clearly someone else needed to suggest it 
KK like a horse, need to know how to whisper to it
how to lead a horse to water, make it drink, etc
I'm about to make a ticket asking for difficulty setting overrides in description.ext, but I just thought I'd check whether that's an "instant no" first. I know there are some things that are just not possible to do in mission config because of enginestuff.
if (index < 0) // -1 insert at end, people can just use append command, but may aswell just allow it
index = array.size();
would be quite simple to do. And it was already recently done for other commands, it makes sense.
Ticket plox
roger thank u i will do when im home
thanks
is it possible to get grenade throwing re-enabled underwater or is this a design choice that wont be reverted?
it was a thing years ago but for some reason was removed and dont quite understand why
have you ever tried to throw grenade under water?
If you want to self-annihilate that's your business :U
I think the main issue is probably that it also stops you dropping chemlights
or do you know someone who did and lived to tell the tale?
I also tried to enable it via modifying put config (or is it throw? either way was the correct one) and also did not work -- no chemlights underwater is quite annoying
do they work under water?
yes
but can you throw a grenade above the surface?
also, popping a smoke from underwater is a nice thing to do too
bring back underwater grenade throwing! so people can accidentally kill themselves too!
those do not work underwater
but given you can just throw them into the water i dont really see why it's a thing to not be able to throw them underneath 🤷
because the water won’t let you swing?
yeah it will
ok
There's no way you can throw them very far, but you should be able to basically drop them at your feet
drop yes but please don’t change the subject of throwing
you could still "throw" it, it just wouldnt go very far
I think "throwing" was used in the sense of "use the throw weapon to dispense a grenade" not in the sense of getting it to go further than 3 feet
your arm going over your head with a grenade in hand and grenade being able to leave said hand
smoke under water https://youtu.be/BTgCFzI16WE
not lobbing it 50 meters
you can swing and release underwater it just doesnt go far 🤷
slower animation and lower range
then you can’t call it a throw, dunno what it is
dropping yeah could work
put
either way
you are still capable of dropping objects underwater
but no idea how it is handled in the engine and if simple to add
whether a new animation for that is possible at this stage in development i do not know which is why i said slower animation 🤷
not as simple as if in water -> slow down?
I think the distinction is between "throw" (arm the grenade and make it live) and "drop" (inventory drop)
I don't mind if the animation remains the same, just that with water resistance the grenade should stop after 50cm 😄
yeah basically
no idea gonna look weird
fair
literally let the put weapon use grenade mags? not even just underwater, all the time xD
can finally just drop a throwable.
That's a nice idea in principle, but with how put works, the action menu being suddenly full of chemlights and smokes would be a potential concern
let throw use explosives too then 😇
||/s||
I had assumed at the beginning of this discussion that grenades were already affected by water physics and would stop when entering it (by whatever means). Surprised to discover that they actually aren't, and instead behave basically the same as if they were in air. IMO that should be fixed, and if it was fixed then just enabling throw underwater would be fine. Obviously that's likely to be considerably more of a challenge, though.
in the absence of being able to alter drag underwater (which i assume wont happen given my request for being able to alter gravity was denied and its a similar principle) then just being able to throw shit underwater would be nice
Put does not work underwater
Or basically when surfaceIsWater is true
You can't even place explosives i ankle deep water.
I had to script in water explosive placement for SOGPF.
fire in the sky?
https://feedback.bistudio.com/T167433
Can be added a horizontal slider if briefing imagine is too big for player's screen or auto scaling to be able see full img?
Spam account:
https://feedback.bistudio.com/p/pauldupont/
@solid marten https://i.imgflip.com/7ep16z.jpg
It's not great but you can use a EachFrame EH and set setWeaponReloadingTime to 1.
yea a formal method would be good
other way is animations can disableweapons but its not a good solution unless the idea is to like lock the player in place or something
Underwater throwing with just a low power throw/drop might be enable-able in engine.
But then you still have the issue that we only have above land throwing animations?
use put animation?
is there any interest in fixing icon config path requiring a preceding backslash too or is that too high effort for too little reward
little reward
valid
if distance commands took string and used markerpos when string detected
player distance "respawn_west"
What is the intended order AI should get into vehicles if you order them (get in) but without position?
I assumed its 1) driver 2) gunner 3) commander 4) other turrets 5) cargo
however it seems 1) driver 2) commander 3) other turrets 4) gunner 5) cargo
There seems to be no way to influence that via config values
Aka is it bugged? Or the get in order outline is intentional?
moveInAny docs claim driver->commander->gunner->other turrets->cargo
But the getin waypoint could be completely different for all I know.
i am testing with GL orders, but probably should behave the same way
@desert trench fwiw if you move in units via 3den then it's always driver > commander > gunner > other turrets > cargo
although i might have seen exceptions with respect to gunner and other turrets when dealing with mod vehicles... unsure.
for our tanks its
driver-commander-loader-gunner-other turrets (if available)-cargo (if available)
or even
driver-commander-loader-radio operator-gunner
my best guess its based on the turret setup structure/turret inheritance as there seems no config parameter to influence that (not via commanding or proxyIndex)
would it be possible please to check how the engine determines the logic, so it can be put into the wiki? 🙏 (moveInAny should be a good starting point to find it)
Walkthought: is it a good idea to have an option for attachTo, which tries to follow the bone/memory point rotation?
Which I mean, not the bone that rotated but the axis of it. It is hard to explain using my poor vocab but, let's say,
If I have a door bone, which has no child bones, so currently it is not possible to rotate the attached object while I wanted to rotate it with the door (AFAIK)
Also, another suggestion: throw a selection (visual LOD?) and returns influenced bone/memory point
The new groups command is nice ty for that devs. could it also be possible to have alternative syntax that can return groups of more than one side?
like groups [west,east]
why not just do groups west + groups east?
slow :/
the perf won't be much different
everything in engine side is bit faster though
Very nice indeed
Someone posted awhile ago about enableEnvironment not muting wind on top of Tanoa volcano, should work from next dev test it please
Also script error on mission selection reported here should be fixed
with this there could be only one loop in the engine and not two or more
yea that was me
also a players [<array of sides>] command would be nice
players [west]
or to get headless clients players [sidelogic]
east and west players [east,west]
so we dont have to do this awkward line _players = allPlayers - entities "HeadlessClient_F";
would also be nice if "players" command wasnt delayed like allPlayers is ("mission start in multiplayer"). not sure if that's possible though?
setMarkerZIndex incoming? 😄
setMarkerDrawPriority?
Z is better IMO, priority could mean something else too
could also be confused with x,y,z
Hmm true
is it working with "layers" (0 1 2 3 99 165749) or providing an array of markers to draw them in that order? (also is there a getter?)
float -....+ yes getter
@untold sky
Would've been good if that watch field for the players position would contain the players position, and if I'd know which terrain this was on
any terrain is fine.
but i wanna sample object
ok wait one I'll get you one
nvm first tree I found works
well I told you any terrain is fine 😅
You said some terrain objects, I didn't expect literally all trees
Only objects with config class supported. Trees don't have config class
though... I don't see why the type was requried.
It checks that type is present, but then doesn't use it for anything 
yeah named props are stored in object model (p3d) itself
I just removed that check, seems to be useless. Works now 
[["canocclude","0"],["dammage","tree"],["map","tree"],["class","treesoft"],["shadow","hybrid"],["sbsource","explicit"],["prefershadowvolume","0"],["frequent","1"],["armor","1000"],["viewdensitycoef","10"]]
dammage? 😆
https://feedback.bistudio.com/T166739
namedProperties with specific LOD.
I'm inclined to make the syntax
object namedProperties [lod]
for possible future expansion
So possible to get if a model is an amphibious?
wat
I thought it is controlled by properties... or, just realized that if there is a valid Buoyancy LOD it is amphibious
Ahhh now I see, well.. yes I guess then

👀
don't forget to update BIS_fnc_vectorAdd with it 😁
I generally don't update data so I will most likely forget
Sadly now you reminded me and I have put it on my todo
does it make sense to have vectorDot with arbitrary number of elements?
🤔 Would you want a dot product of Vector2/Vector4/Vector5/... ?
same for vectorMagnitude...
for add/subtract yes.
For Dot/Magnitude/Distance I would enforce both to be same size
oh nvm I was confusing it with vec dot multi not dot product 
was there even a command for it?
I meant this [1,2,3] * [1,2,3] -> [1,4,9]
multiply with other vector no. Only multiply by single number
this would be nice tho
instead of vectorMultiply overload * (so we also have [1,2,3] * 2) 😛
Yeah I'll add that too then..
Would that enforce same number of elements, or allow extra elements and substitute multiply by 1?
I think same sizes
I'd say 1 is probably the safest? or 0?
I mean you can always resize if you don't need the rest 
Well if people wanna be safe they can just pass same sized arrays
I'll use 1, aka do nothing and pass value straight through
Result:
0.0009 ms
Cycles:
10000/10000
Code:
[1,2] vectorMultiply [2,5]
Result:
0.0008 ms
Cycles:
10000/10000
Code:
[1,2] vectorMultiply 2
Barely slower than the old code
Hey I found my note from when I did this.
Dang my PC was slow xD
Now just the question. vectorDot and vectorDist and vectorMagnitude for arbitrary sizes too? 🤔
I use the vector functions a lot and I've not had a need for them.
dist is not needed because
vectorMagnitude (a-b) is distance anyway
Unlike a quick function to set a vector's z to 0 :P
Common one is that you have a 3d vector and you want to make a normalized vector from two components. That's either two expressions or vectorNormalized [_v#0, _v#1, 0] at the moment.
Don't think there's a solution there except for adding a command though.
vectorDist no. vectorDot would be nice tho
you can implement vectorDist yourself with it too 😛
- and + overloads for vectorMultiply and vectorAdd would be nice though.
hmm. Why?
array + already exists
…it has
you would know if you blindly bought each and every BI titles
Dang I had a bug in my code 
When checking the input types, I was copying the type of every element, and even with that it was still just as fast as the original vector2/3 version
now its a 🤏 faster again
All setPos* commands does not work on mines.(Only local effect)
Can it be fixed?
This issue makes mines, placed by ACE, invisible.
private _explosive = createVehicle [_ammo, _pos, [], 0, "NONE"];
_explosive setPosATL _pos;
createVehicle is not precise at placing. For example _pos with z-axis -0.06 will spawn object at ~ -0.148
Second line should fix that, but it have local effect only for player that placed mine. Everyone else does not see mine because it is under ground.
Moving mine 3km away also does not trigger pos sync over network.
i vote for this
or setMarkerDrawOrder
or setMarkerLayer
vectorNormalized [1,2,3,4,5,6,7]
now that's a bit extreme, or is it? 🤔
Welp doesn't hurt more than 10 minutes of my time so 
diag_codePerformance [{vectorNormalized2 _this}, [1,2,3]]
[0.00048,100000]
diag_codePerformance [{vectorNormalized _this}, [1,2,3]]
[0.00059,100000]
The new one does more, and is consistently faster too.
diag_codePerformance [{vectorNormalized _this}, [1,2,3,4,5,6,7,8,9]]
[0.00059,100000]
diag_codePerformance [{vectorNormalized2 _this}, [1,2,3,4,5,6,7,8,9]]
[0.00063,100000]
Dang (ofc the old one is slower, because the old one only does 3 elements)
Now I have to rerun the old vectorAdd and see how much difference that is.
testing with the array creation removed from the measurement
diag_codePerformance [{_this vectorAdd _this}, [1,2,3]]
[0.00063,100000]
diag_codePerformance [{_this vectorAdd2 _this}, [1,2,3]]
[0.00055,100000]
well neato
I do think "units <side>" and "groups <side>" should take array of sides
for my uses at least, factions are not fixed and often we are calculating
example: sqf (units (player call BIS_fnc_enemySides)) inAreaArray [<spawn point>,...];
could also take array of groups
units [grp1,grp2,grp3]```
units [east,west,resistance];```
flatten ([grp1,grp2,grp3] apply {units _x})

Its specialised code instead of abstracted general code.
instead
value.to_float
which does virtual function call to get thing. I know value is float type, so I can skip that and directly call the correct function
[[2,2], 2] call BIS_fnc_vectorDivide
0.0069ms
[2,2] vectorMultiply 1/2
0.0008ms
😢
Actually... I wanted to replace BIS_fnc_vectorAdd and vectorDivide and vectorDiff with the new one.
But.. I can't because backwards compat 2D input must produce 3D output...
And the BIS functions return same number of outputs as they get inputs..
Well I guess I can always add a resize 🤔 Yeah that will still be faster but man, this one small change to (badly) implement 2D support back then now turns this fun project into pure hell.
_input call BIS_fnc_unitVector
0.017ms
_result = vectorNormalized _input;
if (count _input == 2) then {_result resize 2}; // vector commands need to return 3D result on 2D input due to backwards compatibility, but the script function doesn't
_result
0.0019ms
😠
That's what I'd love to do
_result = vectorNormalized _input;
_result resize count _input;
_result

must be faster
or _result resize [2 max count _input, 0]; (forcing it to be at least 2D)
0.0015ms, is faster
2 vectorNormalized _input
😛
new command overload 😛
Well I consulted, and decision has been made to break backwards compat
if you expect that 2D inputs to a addition results in 3D output, and you require that for your code to work then...
Sorry
This was only added in 2.00, so chances are the authors are still around to fix their stuff if affected
if we see something blow up on dev or profiling, we'll see if its needed
BIS_fnc_pow
wow. A script function, to do something that we had a command for since OFP that is 7x slower. Why even
yeah, I didn't get that one either - did we miss a functionality that the command doesn't do?
command doesn't have default values if you pass nil
"yay"
#ButKeepSetDammage
btw Ded did you remove this error from log?
No point in selection
it's really slowing things down when using selVecDirUp or selPos 
if you don't want to remove it at least move it to diag exe 
actually I think you fixed selPos? but vdup is still throwing errors
selectionVectorDirAndUp
Its still there if you're looking for firstPoint, which you cannot specify in selectionVDAU
remove it? 
there was one by POLPOX iirc, but for selectionPosition
I don't want to go dig and search 
ok 
I missed it because apparently I had the bright idea to copy-paste code, and then only update one of the copies 😠
❤️
if you want another one let me know
Ah well the copy paste makes sense so I shall be excused.
I'll just link to the old ticket
Won't make it to prof tho, big sad
I only care about dev 😛
The wait is on 
btw does the game store the list of bone/selection transformations, or does the command recalculate it all over again every time your run it? 
the command animates the bones, and resets them again
Leo
map call ["methodThatDoesNotExist"]
what do, silent ignore and return nil?
if method entry is non-code, it throws type error and returns nil
yeah that would be fine I guess
yeah makes sense
(also plz ping me next time 😅 )
Leo
constructor can be called from the createObject command, but what about copying, copy constructor
Copy brings up a question. How to handle the constructor on copy.
Have extra constructor for copying that just gets the old one as arg?
dunno. I mean you could just copy the map 😓
I would. But I guess afterwards I'd call "CopyConstructor" method if it exists
_class = [
["Method", {"testo"}]
];
_hm = createHashMapFromArray _class;
_hm call ["Method"];
-> "testo"
Got this working, very simple
_class = [
["Method", {_thisObj}]
];
_hm = createHashMapFromArray _class;
_hm call ["Method"];
-> [["Method",{_thisObj}]]
heh
but do we even need a copy constructor in SQF?
in something like C++ it makes sense
in SQF... 
I don't know.
I think what killerswin meant is. He'd have one "template" class.
And everytime you create a instance of it you copy..
But.. No then you'd just call createObject on the template array thing so nevermind
Problem with your example.
If you create a temporary copy, the destructor would delete your vehicle, even though the main instance is still alive
So you would want a Copy handler, that either creates a new vehicle for the copy, or null's the vehicle on the copy
If you create a temporary copy
I don't know what a temporary copy is 😅
in that example I just create a map then assign it. then engine shouldn't destroy the map then
ObjectThingy = createobject...;
{
_cpy = +ObjectThingy;
do stuff
} // _cpy Destructor is called and deletes mVehicle that was owned by ObjectThingy, because the mVehicle value was copied over too
ah 😓
So you'd do
["CopyConstructor" {_thisObj set ["mVehicle", nullObj]; /*Don't copy mVehicle from source*/}]
MyMethod = {_thisObj};
_class = [
["Method", MyMethod]
];
MyObject = createHashMapFromArray _class;
diag_codePerformance [{MyObject call ["Method"];}]
```[0.00107,100000]
`diag_codePerformance [{MyObject call MyMethod}]`
[0.00105,100000]
As expected I guess
MyObject call MyMethod
_thisObj would be nil then?
ye
it would make more sense if it was like:
["CopyConstructor" {_this set ["mVehicle", nullObj];}]
```?
(like "moving" the obj ownership)
ah yeah could
(_this is what's copied)
if you wanted a "move" copy you could do that
I assume most people will not handle copying at all.
Could also forbid copying 😄
I mena optionally forbid copying
have space for some flags
Currently hashmap value itself is 16 bytes.
If I add a bool, that'll pad to 24 bytes so I'll have plenty space to spare
this syntax of copyConstructor is fine I guess
it still acts like a hashmap right? so _refCopy = myclass is not a copy and you won't be bothered by errors?
ye
uhhh. I have 4 bytes of padding space inside the refcount 
I really should not do that... :x
huh there is already 8 bytes of padding on the end 🤔
but why 🤔
OHHH the readonly flag,
Nevermind we have 7 bytes of free space without me having to use any more space 
Well now readonly takes up one bit of 64, instead of a whole byte with 7 bytes of padding 🍿
Fun 🎉
If you have more ideas, shoot.
So far Readonly, IsObject
We can add forbid copy. Maybe I'll store there if we have constructor/destructor/copy to speed up a bit
btw when do you set the readOnly and forbidCpy flags?
I mean in SQF
will there be a command for it?
readOnly was a WIP thing I never finished.
Probably compileFinal _hashMap returns readOnly copy. Main idea for preStart loading of data that currently uses compileFinal of a func that usually returns a array.
forbidCpy will be some way to pass it into the createObject command. Maybe a specific "key" name for flags or special properties
ah yeah that makes sense: createObjectFromClass [_class, _args, _flag1, _flag2, ...]
I was thinking inside the class.
Because a no copy is more likely to be property of the class "template" itself, rather than just a thing you can choose when creating an instance
like
_class = [
["_flags", ["NoCopy"]],
["constructor", ...],
["Method", ...]
]
Like, "constructor" and "destructor" are basically already "reserved" words with special meaning, so we might add a "flags" reserved one too
what about reading the class from config class rather than SQF?
oh wait it would have problems with code {}
You can do that in SQF.
You can write yourself a script that transforms the config class, into the SQF side array
We can just list that script on wiki page, much easier than trying to add engine support