#arma3_scripting
1 messages ยท Page 445 of 1
@lone glade Which is exactly what I said
well...... DERP
@warm gorge As already mentioned, any trigger can easily, and more flexibly, be done using spawn with waiting/sleeping and condition checking. However, triggers run their code unscheduled, so if you need that be sure to wrap the corresponding parts in isNil.
triggers only run the condition in unscheduled
I know that user actions run condition unscheduled and statement scheduled, but I have no idea if this is the same for triggers actually.
I think I saw somewhere people creating triggers via script so that they can get their code to execute unscheduled
Ofcourse we use isNil for that because we have brains...
offcause
triggering intensifies
I don't know what you mean
and add a space
alganthe went off course.
I will make you write of course instead of ofcause or ofcourse ded, I will
Is this your *than or what?
yes
if you do that than it is bigger then other things
it's more triggering then the white flag jokes.
and even than, that's kinda fine
huehuehuehue
Did you feel how much writing like this hurt youselves?
yes
definetly yeah ๐
I felt pain on a metaphysical level, I have regressed as a being
See? And my superior empathy makes me call you all out every time.
if (getDammage player) than {getDammage leader group player)
ded, if I had support for saving backpack vars for loadouts, should I add support for other varspaces like vest / uniform?
I think so yeah
:/
Never seen anyone use these. But I guess they could be useful
you could ofcause just argue Never seen anyone use these. And because of that I think they aren't useful
know what, i'll just add backpack first then add the rest if needed
while (alive _this) do {timer = timer - 1; sleep 1;};
this is apprently missing a ; but i dont see it
while CODE do CODE
I think I puked a bit in my mouth
alive _this is BOOLEAN, not CODE
Why do you scream these DATATYPES SO LOUDLY
meaning?
good point
I didn't see that error even. Maybe because I don't use while ^^
You need to use {} instead of ()
It means while needs a CODE block.
Reliable way to detect unscheduled environment?
ooooh fuuuuuuuuck ded you made me remember something
canSuspend
@errant jasper canSuspend
canSuspend is false for on act of trigger
and condition too?
maybe that number not being equal to itself but being a number still was because it was a different datatype
But NaN doesn't store a value
๐
so it cannot be a 8
Booleans are just retarded numbers.
never forget:
#define true 1
NaN sometimes gets serialized in different ways, so I guess that is kind of a value, even though comparison with == as well as isEqualTo always reports true for some reason.
canSuspend is false for condition too
now ```sqf
while {timer = 0} do {
is giving me an error
while requires the condition returns a boolean. You perform an assignment '='.
Probably meant to write ==
while {alive _this} do {timer = timer - 1; sleep 1;};
changed () to {}, still missing a ;
maybe the ; is above or below that?
(this is to a question couple messages above, not the 1 right above
what's the RPT entry?
^
RPT entry? the black error box ingame?
no, the error that is logged
%LOCALAPPDATA%\Arma 3
Wait, what! We have LOCALAPPDATA now? My days of writing "%appdata%\..\Arma 3" are over
though I do have to type two extra letters. Hmmm.....
This has been a thing for like 20 years dude.
wich one of the RPT files?
most recent one
They're named by the timestamp the session was started.
Muzzleflash, if you hold down shift before right clicking a file or folder in the windows explorer, you get the additional context menu entry "copy path".
14:59:54 File C:\Users\Tuiderru\Documents\Arma 3 - Other Profiles\Spc%2e%20Tuiderru\missions\EFT.chernarus\spawn_shoreline.sqf, line 17
14:59:54 Error in expression <f time";
sleep 5;
_this setDamage 1;
}
while {!alive _this} do {timer = timer ->
14:59:54 Error position: <while {!alive _this} do {timer = timer ->
14:59:54 Error Missing ;
This blew my mind a few months ago and changed my life.
You need a semi colon in the last line before the while.
Actually you can just copy a folder CTRL-C and if you paste in a path window it pastes the path
sleep 5;
_this setDamage 1;
} <<<<<< here
while {!alive _this} do {timer = timer
planes without physx float at mission start - when there is any interaction, they drop to the ground as expected
the idea would be now to use initEH to force this on mission start - any thoughts what to apply best?
this setDamage damage this
inside init box?
That's how I make detached boxes stop floating.
Probably works for planes too... maybe not.
That looks like weird ununderstandable sqf magic
ok will try
0 spawn {
private _worldCenterPos = getArray (configFile >> "CfgWorlds" >> worldName >> "centerPosition");
SR_worldWarehouses = _worldCenterPos nearObjects ["Land_i_Shed_Ind_F", 25000];
SR_worldWarehouses = SR_worldWarehouses call BIS_fnc_arrayShuffle;
};
Any idea why this script would cause the game to freeze up for a couple of seconds, even know its being scheduled?
the 25km scan doesn't help, really
scheduler can only pause between instructions
scheduling won't stop the command from being hungry yup
the extremly slow nearObjects call is a single instruction
you can reduce that slow by making multiple calls to nearObjects
I can definitely reduce the distance, considering its a radius and this is for the Altis map
nah, it's the world center config lookup slowing it down ded /s
btw you can also look up worldSize and use that as radius. Instead of blindly using 25k
honestly you could just do:
[worldSize / 2, worldSize /2, 0]
too bad we don't have the kappa emote here huehuehue
he wanted world center ded, he got it heheheheheheheh
https://github.com/X39/XLib/blob/master/X39_XLib_Core/XLib/Functions/mapOperations/getAllHousesOnMap.sqf
should work better scheduled
both will ruin your framerate
but the center on a 2D map is not the center of the world. World center is deeeeeeeep down under the ground
lies ded
private["_i", "_array"];
_array = [];
for "_i" from 0 to (_mapSize / _gridSize) do
๐คข
everyone knows the center of earth is at the surface
yup
could also have linked to this here: https://github.com/X39/XInsurgency/blob/OOS_Insurgency/InsurgencyModule/src/X39/Insurgency/Square.oos
but i think nobody can read OOS properly
kinda funny now looking back onto it how clean it actually looks
([] call {private "___tmp___"; ___tmp___ = (_vehicle); ___tmp___ = (___tmp___ getVariable [ "IsInsurgencyObject" , false ]); ___tmp___}) breakOut "_FNCSCOPE_";```
beautiful
return vehicle.getContext().getBool("IsInsurgencyObject", false); in OOS
or
_vehicle getVariable ["IsInsurgencyObject", false]
without OOS.
optimization was never something that was in OOS
The SQF variant is shorter than the OOS variant.
Cheers for the help guys. I think im gonna use worldSize / 2 and maybe put it in a preInit function with CfgFunctions rather than on demand
the OOS variant is auto-generated without knowing what happens ๐
due to statement being > getContext it automatically moved into the tmp thingy
getContext just is assigning the variable and getbool then using that with getVariable
could be optimized, yes
but as OOS was just some project nobody ever used besides me, why bother?
serverCommand doesn't allow you to use custom messages when kicking correct? Just simply says "You were kicked from the game"?
no it doesn't, correct
ok ty
https://community.bistudio.com/wiki/serverCommand for reference
Yer, wasn't sure though if there was something else to it. Seeming I've noticed not all of the commands on the wiki are fully detailed.
if you have a list of commands to improve, I gladly take it
I couldn't be bothered creating a list sorry :L
np, we simply look to improve the wiki and keep it as complete as possible
๐
@peak plover not mandatory.
How do you remoteExec addAction properly?
you remoteExec ["addAction"]
What do you mean by "properly"
it's exactly the same as any other command
How to send arguments to client from server, a-like adding action to a server created unit.
what arguments?
Arguments are passed on the left of remoteExec and I know that you know that
addAction consist of arguments like object, title, code, conditions... etc. Im asking how do you format that with remoteExec?
Thanks
Anyone know how I can prevent popup targets from falling down, I'm trying to manage the popup and pop down myself. I've tried
targetToKeepUp removeAllEventHandlers "HIT";
But still no success
disableSImulation
Is in the onPlayerKilled the "old Unit" the dead body or the player who was in said body?
@still forum sadly didn't do the trick, I tried disabling the damage as well, nothing. :/
if you enableSimulation to false it will never ragdoll, either do any physics, event dont calculate dynamic lights, so you've done something wrong
@unborn ether Not sure how I would do anything wrong, what I did was placing a normal popup target, disabled simulation, shot it, fell over. Or is the enable simulation bugged in the editor?
objects without simulation shouldn't be able to play animations
Well if its actually an animation and not some kind of setVectorDirAndUp
Ikr, let me try and manually disable it again when in-game through the debug.
Also, the animation is acutally performed at its 1 frame, so if you switchMove to some animation, you will see the first frame of it. So if the first frame is like its downed already, that might be it.
Ehm, there is no way to like cancel the animation via a event handler say the hit one for example, as I tried poping it back up once the event handler was fired but that didn't do anything to it.
tried it in debug now, still doing the same when I manually disabled it as well.
Try removing HandleDamage along with Hit also, as it might be there too.
Unfortunately it didn't solve it, but thanks ๐
thou hast raised my curiousity, I shall start A3 to try and find
I can't confirm this yet, but I'm fairly sure it's in hitPart
so Pop-up Target 1 for example, right?
Yea, any of them I use TargetP_Inf2_F to be more exact
enableSimulation and allowDamage didn't do anything indeed
dirty trick: set variable nopop = true then hit the target, then setDamage 1 ๐
class TargetP_Inf_F: TargetBase //inherits 12 parameters from bin\config.bin/CfgVehicles/TargetBase, sources - ["A3_Structures_F_Training"]
{
class EventHandlers //sources - ["A3_Structures_F_Training"]
{
hitPart = "_this select 0 execVM '\A3\Structures_F\Training\data\scripts\TargetP_Inf_F_hitPart.sqf';";
};
};
The script is recompiled for every hit it receives -.-
Ahh, thanks both of you. I'll look into that and hopefully get it running correctly ๐
There is a protected class called TargetP_Inf_NoPop_F, which is a carbon copy of TargetP_Inf_F, but has this script/eventhandler disabled.
Are you using any mods?
Ahh, but u can still animate that manually?
I use a bunch of mods, RHS, ACE, cba, etc
nice, sec
popupTarget animate ["terc", 0]; // raises it
@inland badger You could open the mission.sqm file and mass replace
TargetP_Inf_F
with
TargetP_Inf_NoPop_F
Then load again the mission in the editor, and save and export it.
I currently use this ```sqf
_targets = [range1_9, range1_8, range1_7, range1_6, range1_5, range1_4, range1_3, range1_2, range1_1];
{_x animate ["Terc",0];} forEach _targets;
{
_x addEventHandler ["HIT", {
(_this select 0) animate ["Terc",1];
(_this select 0) RemoveEventHandler ["HIT",0];
}
]} forEach _targets;
but I was thinking more of like adding extra data to it, say u have to double tap some of them before they go down and so on.
@little eagle will do, thanks! ๐
Otherwise:
if (isServer) then {
private _pos = getPosWorld this;
private _dirAndUp = [vectorDir this, vectorUp this];
deleteVehicle this;
private _new = "TargetP_Inf_NoPop_F" createVehicle [0,0,0];
_new setPosWorld _pos;
_new setVectorDirAndUp _dirAndUp;
};
This into the objects init box.
How can I get what speed the bullet has when hitting a target?
track the bullets speed until it hits.
wouldnt the equ for impact velocity work on this? Or is arma physics special
You could estimate it with that I guess, but good luck handling ricochets and bullets that already penetrated an object in front of you.
HitPart Eventhandler
but it's limited iirc - only works for the one who fired the projectiel if memory serves right
Currently there is only one EVH HitPart which is able to detect velocity of the projectile on hit, but that doesn't help much about shooting in the air as its object based.
well that much is obvious... no impact, no event to detect impact velocity xD
Otherwise you can detect that by speed in Fired* EVH, but you need to have some "hooks" on where and when that happens.
Stupid question here but how do I check if a parameter exists
isnull and isnil both throw generic errors at me
doing
someVariable = isnull(_this select 0);
"18:26:27 Error select: Type Object, expected Array,String,Config entry"
// Fire on target.
while {[_targets] call ORMP_fnc_numberAliveInGroup > 0} do {
["INFO | ORMP_fnc_sniperFire | Checking target validation"] call ORMP_fnc_log;
private _targ = selectRandom units _targets; // select rand victim in group
_sniper reveal [_targ, 4];
// If in view, take the shot.
private _vision = [objNull, "VIEW"] checkVisibility [eyePos _sniper, aimPos _targ];
if (_vision >= 0.2) then {
[format["INFO | ORMP_fnc_sniperFire | Good shot, %1 vision, needed 0.2", _vision]] call ORMP_fnc_log;
[format["INFO | ORMP_fnc_sniperFire | Good shot, %1 is primary target.", _targ]] call ORMP_fnc_log;
["INFO | ORMP_fnc_sniperFire | Taking shot"] call ORMP_fnc_log;
_sniper doTarget _targ;
_sniper doFire _targ;
_sniper forceWeaponFire [primaryWeapon _sniper, "SINGLE"];
sleep 5;
} else {
[format["INFO | ORMP_fnc_sniperFire | No shot, %1 vision, needed 0.2", _vision]] call ORMP_fnc_log;
_sniper setUnitPos "MIDDLE";
_sniper forgetTarget _targ;
sleep 5;
};
_sniper forgetTarget _targ;
sleep 3;
};
In the above, when all conditions are met, the sniper will not fire.
lol
I know.
It makes no sense.
It works like 20% of the time.
Even when vision is returning 1, which is perfect los I think
he won't pull the trigger.
Even the forceWeaponFire doesn't work..
D:
0 spawn {
private _sniper = createGroup east createUnit ["O_sniper_F", player modelToWorld [0,1000,0], [], 0, "NONE"];
private _units = units group player;
player allowDamage false;
while {{alive _x} count _units > 0} do {
private _targ = selectRandom (_units select {alive _x});
_sniper reveal _targ;
_sniper doWatch _targ;
hintSilent str _targ;
if (([objNull, "VIEW"] checkVisibility [eyePos _sniper, aimPos _targ]) >= 0.5) then {
_sniper setUnitPos "DOWN";
_sniper doTarget _targ;
} else {
_sniper forgetTarget _targ;
_sniper setUnitPos "MIDDLE";
hintSilent "no target";
};
sleep 10;
};
};
``` in the console ^
-1 https://gyazo.com/5e236a43722d71384c209dca5def7d0f
-2 (player in cover lol) https://gyazo.com/781347d00452f6e195723b0b89edc8c7
player selected https://gyazo.com/248b307a64cc418f0b8b9d8d3ee2c527
the end https://gyazo.com/4d859fd803c8624895e536eb058b2fac
ยฏ_(ใ)_/ยฏ
also that code ^ is just test example... tried to stay close to what you doing (you will need make better version, kinda bad way), Jay
Yeah, go put him out on a hill someplace in stratis
and then try it.
When there is NO objects at all, it works.
When there is anything, it seems to break.
My code works on the flat airstrip.
But not when I place him someplace more "realistic"
But, I think you made me see a few flaws.
Let me try this real fast.
Yeah, still not shooting.
Would it have to do with this.
// Set danger level
if (_danger) then {
["DEADLY ENABLED -- "] call ORMP_fnc_log;
_sniper setUnitAbility 0.9;
_sniper setskill ["aimingAccuracy",0.9];
_sniper setskill ["aimingShake", 0.9];
_sniper setskill ["aimingSpeed", 1];
_sniper setskill ["Endurance", 0.8];
_sniper setskill ["spotDistance", 1];
_sniper setskill ["spotTime", 1];
_sniper setskill ["courage", 1];
_sniper setskill ["reloadSpeed",0.1];
} else {
["DEADLY DISABLED -- "] call ORMP_fnc_log;
_sniper setUnitAbility 0.9;
_sniper setskill ["aimingAccuracy", 0.02];
_sniper setskill ["aimingShake", 0.9];
_sniper setskill ["aimingSpeed", 1];
_sniper setskill ["Endurance", 0.8];
_sniper setskill ["spotDistance", 1];
_sniper setskill ["spotTime", 1];
_sniper setskill ["courage", 1];
_sniper setskill ["reloadSpeed",0.1];
};
So, I am wanting to switch the sniper between deadly, and not so deadly.
By adjusting the skills.
afaik setUnitAbility < also disabled
Okay, so removing that.
Like I said, my shooter takes the shot in certain areas.
I don't think the check vis is working.
Even tho it tells us he can see the target, I think he doesn't actually see him.
And thus, is not shooting.
Target unit will fire the specified unit's position in the target vehicle's (can be the unit itself) weapon mode index
BI wiki.
wat
where is it ?
760~
Using a svd
Sorry
m14
Should be more than enough.
I don't understand...
Is there no functions that let me say, aim at this, shoot at this regardless of range, etc.
He won't even fire from force weapon fire..
Which makes no sense.
can you replace your sniper with this O_sniper_F ? ๐
@valid dew Join the right side of history and abbandon all _this select N for params.
โ Amen, brothers!
@valid dew in your case _this exists. But it's not an array you can select from.
you can try param instead of select. It also gives you a default value
Okay; I'll have to look at those
I've just started on a few projects; but eventually I'd like to make a more up to date version of BECTI
Using Zeus rather than the build script thing and arsenal rather than the arbitrary gear menu that's pretty shit
Just getting a working knowledge of SQF and I already hate it lol
Editing Zeus is not entry level, although very possible, and I guess it's nice to aim high.
Editing the arsenal on the other hand is pretty intense...
I will refuse to call the ACE Arsenal "good" as long as it doesn't have dynamic searchbars.
Why don't you just look at the code
it's not a hashtable. It's CBA_Hash
actually has nothing to do with hashing at all
["#CBA_HASH#", ["key1", "key2"], ["value1", "value2"]]
Just use the namespaces. If your keys are objects, use BIS_fnc_netId to serialize them.
CBA namespace is just a Location or simpleObject
private _elementNr = (_keys find _key)
private _value = (_values param [_elementNr,_defaultValue]);
yes
interdasting
But depending on your needs, I would probably go for namespace instead. If all the keys are known, just too cumbersome to use cba_hash
prviate _value = _myNamespace getVariable [_key,_defaultValue];
is faster amirite
And I can also save everything from mynmaspace into profilenamespace pretty ez
or extDB
getVariable uses a real hashtable/hashmap.
it's not always faster.
the getVariable lookup is basically always the same time.
But with find it increases linearly the further it has to search.
find is really fast if the thing you are searching is right at the start of the array. Probably even faster than getVariable.
But if you have dozens of entries and want to find the index of the last.. it's incredibly slow.
getVariable only supports string and is case-insensitive though. Which is probably the only reason why CBA hash is still around.
Until you use Intercept_CBA which has a real hashMap container.
And I can also save everything from mynmaspace into profilenamespace pretty ez
Which is probably the only reason why CBA hash is still around.
oh yeah. CBA hash has a function to export/import to/from namespace
I'd say one major benefit of those CBA hashes is, that they can be stored in profile namespace (and the mission.sqm as 3den setting).
oh yeah. CBA hash has a function to export/import to/from namespace
Just tried CBA_hash vs CBA_namespace with just one entry. CBA_namespace is almost 10 times faster at setting and almost 5 times faster at reading. And this even includes an additional 'str _key' conversion for the namespace.
Yeah, it's an old mediocre and superseded idea, and is only really used by me for what I wrote above.
My main worry in using cba_namespace is in how much do these buggers location/simpleobject use of. Like can you spray namespaces around as often as arrays?
anyone and their mother has a hash func in their mod these days huehuehue
Another failure of language, that it's called hash, while the not-hash (namespace) actually uses the hashtable.
I was reading about reasons why OOS is bad and memory allocation issues with it
tho life servers have them for different reasons entirely ๐
OOS is bad because it isn't as optimized as normal script would be.
That parts liek that can be in different parts of memory causing pointless cpu bandwidth
Any shitty written script might be worse or better than any OOS script
And almost every sqf instruction causes a cache miss unless you have tons of cache on your CPU
faster things than setvariable
I don't remember if I benchmarked if my hashMap is faster than setVariable... I probably did test that though
you're thinking too narrowly ded
I wish we just would get a engine-based hashfunction
My main worry in using cba_namespace is in how much do these buggers location/simpleobject use of. Like can you spray namespaces around as often as arrays?
Think you can have literal millions of them, and they only reduce perf on the map, and that is really minor unless you have unreasonably large numbers of namespaces.
command you mean. Not function ^^
create a bogus display and store shit in it's namespace, repeat, profit huehuehue
true, Dedmen
I can see them becoming too costly if you start to dynamically create namespaces in some n^2 fashion.
or better, create helipads and then store shit in their varspaces ๐
helipads are slower than locaitons
alganthe, that is the same thing, except worse than pseudo namespaces.
that's the point ๐
100k helipads kills fps, when 100k locations only affects fps when on the map
or using any location related command
Really? The only I can think of is nearestLocations at whereever they're created outside the map (-1000,-1000 iirc).
You'd have to use a script containing a loop iterating through the nearest locations of a point inside the map with a > 1.41 km radius. Somehow I doubt anyone does that.
cough my namespaces are completly free cough
?
Intercept.
or just use parsing namespace, who else uses it anyways /s
BI does for some function now and it makes me mad.
How will such things pan out in enscript?
Also what was enscript resmbling again?
C++?
C#
I haven't seen hashmaps in enscript yet
you can see some example of enscript in take on mars
taaaaaaaaaaake meeeeeee ooooooooon, take on me
I haven't seen hashmaps in enscript yet
This. Only a failed attempt at OO.
C#?
Great
Just started learning C3
C#*
C# is actually where I found out about it's slowness
"it's"?
"her's"?
Did you just assume C#'s gender!
And using poop.liquidity for ex is slow
Well, OO being suboptimal is in the nature of the beast.
And for example in c++ OOP is essentially free if you crank the optimizer to max
OO is more logical and faster as it represents how we understand objects irl
Crank optimizer?
The what now?
Do we have a optimizer we can crank for sqf?
yes. compilers have optimizers
OO is more logical and faster
Compared to what?
\๐ฎ \๐ณ \๐น \๐ช \๐ท \๐จ \๐ช \๐ต \๐น
Are you trying to imply that Intercept has a RPT?
Also you should give the optimizer a cool code name, say: Optimizer Prime
Nooo.
@still forum When do you think this optimizer will become usable ?
It's already usable ยฏ_(ใ)_/ยฏ
But carries the usual Intercept stuff. aka no battleye on clientside.
And I didn't test it on linux server yet and it's incompatible with my profiler.. I think.. maybe... maybe not actually... gotta test that
oh shit, maybe brofiler works on the RC @still forum
nope, still no scopes :/
only compile
also, wrong tag I guess ^^
๐ฉ .
huh what? scopes missing means there is probably something wrong with the cert. If it picks up anything that means Intercept works and that means everything it needs works.
Are you using the latest rc build thing?
latest RC build, I also tried dev, can't use stable right now for reasons
do I need steam branch access code for RC?
yes
gimme that. I guess I can update to RC and try it out
Arma3Update182RC
Just wondering right now... Are those optimized Scripts transfered in optimized state? Or in the "old" state?
scripts are transferred over net in string form
Guys, I am trying to use setObjectTexture but with no luck for now. I added selection name to hiddenSelections[] in config, in model.cfg in class cfgModels I added same selection inside "sections[]" and it still doesnt change the texture. What should I do else?
sections[]
๐ค
Afaik the selection doesn't even need to be in model.cfg. But I'm not sure because this is #arma3_scripting and not #arma3_model
The selection has to be on your model. If it isn't then it can't know what texture to change
@still forum That's what bothers me too, becouse on the wiki it says "Don't forget to add the model and the selections in the CfgModels" and I am not entirely sure what that means, becouse I dont see selections in CfgModels
And yes, my model has a selection named correctly etc
@lone glade profiler works just fine on RC for me. atleast it shows stuff like ace_nametags_fnc_onDraw3D and BIS_fnc_loop.. wait... BIS functions never worked before ๐ฎ What's this.
CfgModels ???
Do you mean the model.cfg?
send me your current build ^
@little eagle yes, class CfgModels inside model.cfg
Does your config.cpp have
hiddenSelections[] = {"camo", "camo1"};
hiddenSelectionsTextures[] = {"a3\structures_f\training\data\target_longrange_co.paa", "a3\structures_f\training\data\target_figure_co.paa"};
too?
Yes indeed
camo and camo1 are the selection names.
Previously , hiddenSeections[] had 10 elements, I added one , so AFAIK the command should be :
_FA18 setObjectTextureGlobal [10, _map];
true. Maybe there is a max limit of them but never heard of that.
The others still work fine? What if you change the order. aka put yours at the start
does the texture you define in the config take effect? Or that also not?
Ingame I run script getObjectTextures player vehicle and it returns the previous ones aswell as added one by me
I will try reordering them, but as for limit, on the wiki it says that array max size is 10 elements, however I checked on different plane and it had its map texture on 13 element so yeah
Hmm still no luck. Might it be that its original texture is rendersurface or the fact that it is on View-Pilot LOD?
Would
MissionNameSpace setVariable ["Plane", this, 1]
be a public alternative to Plane = This?
no
well.. somewhat "public"
Owner number 1 will get it too. Unsure what that is. 2 is server
If you want it public then use true
or just
plane = this;
publicVariable "plane";
Nobody is 1.
I could swear 1 was "run for all" >_>
And that that exists - guess I was more checking the idea than anything else.
missionNamespace setVariable ["Plane", this, true];
is the same as:
plane = this;
publicVariable "plane";
0 was everyone. But not on setVariable
true is run for all.
1 or any number is run for one client with that id. Nobody has 1 as id. It starts as 2 in MP for the server and continues with 3, 4 etc. for clients, as long as no savegame was loaded, in which case the server is also something > 2.
Quick question. How do I get the classnames of custom Ie (CUP) uniforms? Do I have to equip them on NPC and then copy one by one?
Well, how would you equip them without knowing the classnames?
by retrieving them by classname?
filter out anything that starts with CUP in cfgWeapons that is also type I don't remember for uniforms
vehicleClass uniform or something along those lines
Yeah, filter out by the CUP tag and maybe check that itโs ItemInfo has the uniformClass field
Just look at the entries for any uniform vehicleClass make sure they match with your selected config entry
Or maybe just use https://community.bistudio.com/wiki/BIS_fnc_itemType
To check if itโs a uniform
type = 131072;
Or
_uniforms = "isClass _x && getNumber(_x >> 'type') == 801" configClasses(configFile >> "CfgWeapons");
the fuck are you on about
you forgot to use single quotes and the uniform type is 801
Yeah...
fuck, know what, gimme 2 minutes
Happy now?
no because you're still missing the fact that you're using the wrong type entry and not checking for cup uniforms
I thought that was implied?
"Well, how would you equip them without knowing the classnames?" - Via edit loadout in the Editor, how else?
private _uniformArray = [];
{
if (isClass (_x >> "ItemInfo")) then {
if (getNumber (_x >> "ItemInfo" >> "type") == 801) then {
_uniformArray pushBack (configName _x);
};
};
} foreach ("tolower (configName _x) find 'cup' > -1" configClasses (configFile >> "CfgWeapons"));
_uniformArray
something like this in the debug console, there might be a few false positives
Isn't there a way to check which addon a config came from?
yes, but that would've taken me more than 2 minutes
now I need to figure out why my dev branch build shit the bed....
Carpal tunnel?
Can I create camera which will show particular LOD of vehicle? For example to make camera in cockpit?
sweet tks
I normally get my classnames through virtual arsenal, but thatโs just me.
Not always used for manual data. I've used something similar for filtering out ammunition boxes or va items
player playMoveNow "Acts_TreatingWounded01";
Any idea why this animation isn't playing properly? None of the animation commands seem to work for it, I tried switchMove.
Hmm. How to make aunit dead in a chair?
would be cool if couldge tunit dead in a chair. even better if slumped over table
yourUnit playAction "Die"
works inside of vehicles too
need to be executed locally, page here:
https://community.bistudio.com/wiki/playAction
Question about locality
Let's say object is local to player1 and he disconnects, when handle disconnect triggers on server, is the player1 object and any objects that were local to that player local to the server now?
they will get transferred
if player1 object doesn't disappear
but not sure if they are already transferred when handle disconnect fires
Before or after handleDisconect?
ahh yeah
It doesn't get dissapeared
If handleDC returns false then or sth liek that
ah yeah true
okay
so
Man I'm sure this has been done before
people loading ai duty onto player clients
yeah definetly
I just had an idea
for my ai script to add client hosted ai
But my issue right now is
There is no way to check poing
ping
afaik
I guess intercept can do it?
Hmm
Damn
I figured out
I'd measure client fps and get avergage
If client is above average it can take an ai group to handle
And then having a rating based on clients previous performance
So for ex. if client disconnects before mission end, he left or crashed therefor his rating drops
And if client drops below average with ai then this rating drops
etc.
But my issue was ping
no good if a guy with 300 ping gets all the ai
oh shit a chair
you have to play the death animation for the person
without falling from chair
the one for sitting
check the anim viewer for the correct anim and attach the unit to the chair
cool how to attach it?
you use the attachTo command
there's probably a BI func for those ambient anims tho, you'll have to check
thanks iwll try.
player attachTo [car, [0, 0, 1] ];
what are the numbers?
Sorry noob here
Error Type Number, Not a Number, expected Number
๐ญ
@astral tendon Error Type (Number, Not a Number), expected (Number)
There. more readable ^^
Still funny when I read that
those numbers are like the x y z of the object, you can set the facing using setdir
i have a problem with the camCommit, for some reason it gives a anoying zoom that i cant remove it, and i need that comand so i can use camSetTarget
Any way to fix that? also move the camera far is not a optiom because the target is inside of a building and the camera is created above him
grrr
unit falls through table after all that
ANyway to avoid that
or just arma limitation
with the attachto?
yeah
@astral tendon https://community.bistudio.com/wiki/camSetFov
setFov does not matter, is at its minimal
Well otherwise that means your camera is like point-blank to a target, so its looks like zoomed, set relative position off your target
Added: A new "#" script operator (works in the same way same as select, but is shorter to write and has higher priority than math functions)
Nice little addition
unless you absolutely need to have a higher priority array select indexand can't use () for some magical reasons
that's legit the only use case for it
alganthe:
private _uniforms = "true" configClasses (configFile >> "CfgWeapons") apply {configName _x} select {_x call BIS_fnc_itemType select 1 == "Uniform"}
oh
lol
We are literally talking about that right now cloud
hmmm guess theres no way to stop non collision with objects
I would've preferred a way to add weapons with attachments to boxes over that crap that literally no one really needs
Fixed: The setUnitLoadout command could cause lag / FPS drops when creating entities Thank you BI.
hey ded, at least we got findif
Would you now please also fix the useless entities and the RPT spam?
@unborn ether
_CivThatDied = player;
//camera
_CutSceneCamera = "camera" camcreate [0,0,0];
_CutSceneCamera cameraeffect ["internal", "TOP"];
_CutSceneCamera camPrepareFOV 0.1;
_CutSceneCamera setPosATL [(getPosATL _CivThatDied select 0) + 0, (getPosATL _CivThatDied select 1) + 0, (getPosATL _CivThatDied select 2) + 2];;
_CutSceneCamera camSetTarget _CivThatDied;
_CutSceneCamera camCommit 0;
_CutSceneCamera camSetRelPos [0, 0.5, 1.5];
You see, its above the target
nope ^^
well, I checked and entity spam is gone
unless they reintroduced it in a later patch but I doubt it
Entity spam gone? That would be nice
_CutSceneCamera setPosATL [(getPosATL _CivThatDied select 0) + 0, (getPosATL _CivThatDied select 1) + 0, (getPosATL _CivThatDied select 2) + 2];;
->
_CutSceneCamera setPosWorld (getPosWorld _CivThatDied vectorAdd [0,0,2]);
Nice, thanks
Well according to changelog BI fixed a bug that never existed. So... I'm not too confident with their fix
Wait, entity spam as in: "21:27:31 Error: Object(2 : 3070) not found" which spams my RPT logs all day?
Ah okay
@astral tendon One more do you actually understand that camCommitPrepared and camCommit and all related commands are diffrent, so as I see you prepare fov, but your target is not prepared. So FOV is not applied AFAIK.
setUnitLoadout didn't delete previous containers on the player, meaning at some point you ended up with thousands of backpack entities
well then consider it fixed ๐
I do use setUnitLoadout, so probably is. Thank god.
I remember some feedback tracker ticket about it thats been around for years which heaps of replies on it, I think thats related
Jus t to be clear
Unitds wil lalways go through for example a table then?
setUnitLoadout didn't delete previous containers by saying did you mean thats fixed for now?
nvm
afaik that's a script / function referencing a deleted unit / object @warm gorge
looks like you need to edit that object geometry
@unborn ether According to their changelog they didn't fix that.
But it seems like they fixed it too according to alganthe. I don't remember the results of the last tests
ok cool
This was the ticket I was referring to https://feedback.bistudio.com/T82940 named "Deleting non-local object produces RPT spam"
I tested it on dev branch and that was fixed @unborn ether
no more thousands of ghost entries in the log that was produced by logEntities
@unborn ether "prepare the target"?
@astral tendon Yes, there are commands to preprare the cam, prepared cam commands commit only with camCommitPrepared
so just change to camCommitPrepared?
depends on how far from your render point that cam is created, prepared cam renders all around it. You use mixed, but only do camCommit
its better to use prepared OR unpreared, not both.
Added: A new "#" script operator (works in the same way same as select, but is shorter to write and has higher priority than math functions)
So the same as @ in o2script? ๐ฎ
Well, i kinda fix that by adding a negative number on camPrepareFOV
don't use it
_CutSceneCamera camPrepareFOV -0.1;
for the love of god
Use it exclusively
I swear someone need to remove this from the changelog
camPrepareFOV will not fire without camCommitPrepared in your case anyways, since you only use camCommit
so i just need to change the order?
because you kill him, move him into the animation you want, disable animations
the actually important commands are not on changelog. But the useless thing is...
I wonder how that will conflict with preprocessors
People already tried
and found that conflicts exist
in the dev branch feedback thread on bif
first thought as well. but it's just a shortcut for select, no performance, no nothing? I didn't follow the last news
do i put playe playaction in his init field
well...
๐ ๐ ๐
๐ ๐ ๐
๐ ๐ ๐
@thick oar https://forums.bohemia.net/forums/topic/143930-general-discussion-dev-branch/?page=949&tab=comments#comment-3273639
https://forums.bohemia.net/forums/topic/143930-general-discussion-dev-branch/?page=949&tab=comments#comment-3273843
https://forums.bohemia.net/forums/topic/143930-general-discussion-dev-branch/?page=949&tab=comments#comment-3273855
Also it's literally only array#index. any other form of select doesn't work
Anyone know who "SilentSpike" is?
He/She added the extra on the wiki about SQS/SQF meaning "Status Quo Script" / "Status Quo Function".
As far as I knew, it was never revealed what SQ* stood for
So yeh, I'd like some sources and citations for that ๐
FUUUUUUUCK!
#define # select
What if you do #string then though
Anarchy.
classic case of
#define false !true```
#define true (random 2 > 1)
#define # define?
true = false was still possible in Arma 2 (-:
not via SQF anymore, they implemented keywords and protection (player = 5 would throw an error)
#define player 5 still works
You can use protected variables as object variable names by editing the mission.sqm.
Naming a box items is a classic.
@thick oar my citation is in the old scripting skype group somewhere ๐
pretty sure one of the devs said it, which is why I updated that
And you can still assing anything to numbers, but you only retrieve the value if you use:
0 = 127;
missionNamespace getVariable str 0 // 127
Ah hey cool, do you know who? I poked a few old timeys of them and they never knew.
Honestly nope ๐ It's entirely possible I misremembered that to begin with, that was quite some time ago
I presumed sqs was short for "sequence script", as the original purpose was cutscene control, and well, a script is used in a scene, and multiple scenes form a sequence in filmmaking. maybe I'm interpreting too much logic into that. ๐
it's either a mandela effect or me being insane but i'm fairly sure I saw status quo referenced a few times
Doesn't matter if you have no original source. You might've fallen for an urban myth.
true.
I tweeted at the man himself, lets see if Maruk will provide a quotable source. ๐
inb4 random letters
sed
maybe dvorak
gdr intensifies
Lmao is this what #arma3_scripting has become? ๐
"become"?
begone
t h o t ?
Assassinate me, and it will be as boring as it was in the beginning.
Sun Tzu says "Know your enemy". Seems pretty relevant =D
b e g o n e t h o t
\๐
Well.
BIS_fnc_addStackedEventHandler allows for this, and if you reuse the id, you overwrite. I think that is pretty handy.
Here's the code. Would they, be 0 , 1 , 2. respectively?
if (alive currentDrone) then {
drone_sign_1 addAction ["<t color='#34495e'>A Drone is still <t color='#27ae60'>'ACTIVE'<t color='#34495e'>. <t color='#e67e22'>(You cannot have two drones at the same time.)", {}];
drone_sign_1 addAction ["<t color='#e74c3c'>DE-ACTIVATE: <t color='#d35400'>Drone!", {
_action_sure = drone_sign_1 addAction ["<t color='#e74c3c'>DE-ACTIVATE: <t color='#c0392b'>Are you sure?.", { currentDrone setdamage 1; removeAction 2;}];
}];
};```
It would be _action_sure
tried that. didn't work.
if no actions were added before them and the first action index is 0 then yes
why removeAction 2? Why don't you just use the action's ID?
that's what i'm doing..?
No
My text editor froze sec
You are expecting that a ID that might be random will be 2
random 500000 == 2
Just use the actual ID instead of guessing and expecting that no mod or anything else might possibly interfere
the action ID is in _this
@drowsy axle What does the user do if he presses DEACTIVATE Drone and then is prompted to press again but he wants to cancel
just keep the latest action you added in a variable or something
private _args = [];
private _action_sure = drone_sign_1 addAction ["<t color='#e74c3c'>DE-ACTIVATE: <t color='#c0392b'>Are you sure?.", {
currentDrone setdamage 1;
removeAction (_this select 3 select 0);
}, _args];
_args pushBack _action_sure;
I've not got that far ๐ @tame portal
There, pass by reference array, yolo sqf
wtf commy
i like it
_this select 2. And done
oh select 2
Oh, that is a thing, lol
didnt know either
Boring though.
same with eventhandlers
drone_sign_1 addAction ["<t color='#e74c3c'>DE-ACTIVATE: <t color='#c0392b'>Are you sure?.", {
currentDrone setdamage 1;
removeAction (_this select 2);
}];
boooring
its only leetQF if you do it with hacky solutions
Yep.
I have a live stream going, if you want to watch / having suggestions.
Twitch is stuttering for my shitty connection here @720p
aww ๐ฆ
paste bin of code: https://pastebin.com/VUjHbPqN
actionCompletedis a very dangerous variable name
I have this: ```sqf
if !(alive currentDrone) then {
_droneBoardAction = [
drone_sign_1, // Object the action is attached to
"<t color='#27ae60'>Activate<t color='#34495e'>: A Drone", // Title of the action
"\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa", // Idle icon shown on screen
"\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa", // Progress icon shown on screen
"_this distance _target < 3", // Condition for the action to be shown
"_caller distance _target < 3", // Condition for the action to progress
{}, // Code executed when action starts
{}, // Code executed on every progress tick
{ actionCompleted = true;}, // Code executed on completion
{}, // Code executed on interrupted
[], // Arguments passed to the scripts as _this select 3
12, // Action duration [s]
0, // Priority
true, // Remove on completion
false // Show in unconscious state
] remoteExec ["BIS_fnc_holdActionAdd", [0,2] select isDedicated, drone_sign_1];
};
where are you from commy that you have such a connection? Germany :kappa:
as if lol
changed: actionDroneCompleted
germany cant be the only country with bad internet
I'm sitting here in a NVA barracks.
You can basically feel commy whipping out his KGB knowledge
brb getting food
Yeah, rule 1 is to brag about it on the internet.
No one would believe you, the perfect cover up.
Makes you less suspicious
I disagree with you
Hm well I expected you to say "Bot" now but I was let down
Brain has too low capacity to play the long term jokes.
lol
Whats the approach for letting an AI gunner look in a specific direction? tried sqf (gunner this) setDir 181; (gunner this) setFormDir 181; on a MGS without success. Is that maybe because I'm the commander?

gunner this lookAt (this getPos [1000, 181])
No idea if this works from the init box.
Quick question, anyone know how to run a script only through a headless client, like if I execute it from the addaction but I want the script to be executed only on the headless client machine?
remoteExec?
{
if (!hasInterface && !isServer) then {
call My_fnc_whatever;
};
} remoteExec ["call"];
I'd say.
worked, thanks commy
No interface, but also not the server == headless client.
worked, thanks commy
lol nice, I just made that up and never used lookAt in my life.
@little eagle thanks, I'll give that a go and see if I can get it to work, got weird problems with event handlers, for some reason only works if I have a headless client on the server as well, dunno why ^^
Ok so should we be using # instead of select or whats it for
@tame portal Do you have any idea why this is failing with the action* not being defined? sqf if (alive currentDrone) then { action_active = drone_sign_1 addAction ["Drone is still <t color='#27ae60'>'ACTIVE'<t color='#ffffff'>.", {hint format ["Drone Location: %1", droneSpawnPos]}]; action_deactive = drone_sign_1 addAction ["<t color='#e74c3c'>DE-ACTIVATE: <t color='#c0392b'>Drone.", { action_deactive_sure = drone_sign_1 addAction ["<t color='#ffffff'>DE-ACTIVATE: <t color='#c0392b'>YES, I want to delete the drone!", { deleteVehicle currentDrone; sleep 0.5; drone_sign_1 removeAction (_this select 2); drone_sign_1 removeAction (action_deactive_cancel); drone_sign_1 removeAction (action_deactive); drone_sign_1 removeAction (action_active); drone_sign_1 addAction ["<t color='#27ae60'>Activate<t color='#34495e'>: Drone.", { actionDroneCompleted = true; }]; }]; action_deactive_cancel = drone_sign_1 addAction ["<t color='#ffffff'>DE-ACTIVATE: <t color='#27ae60'>NO, I want to keep the drone!", { drone_sign_1 removeAction (action_deactive_sure); drone_sign_1 removeAction (_this select 2); drone_sign_1 removeAction (action_deactive); }]; }]; };
_action_deactive_cancel is undefined.
Different script instance, local variable doesn't carry over. Seems like we have to go crazy array again.
Would making them global make it work?
(action_deactive select 2) you can't use select on a number
?? I dont understand
(action_deactive select 2)
should be
action_deactive
((action_deactive = _this ) _this select 2)
No, that's not valid.
ok
edited above
works woop
while {alive currentDrone} do {
action_active = drone_sign_1 addAction ["Drone is still <t color='#27ae60'>'ACTIVE'<t color='#ffffff'>.", {hint format ["Drone Location: %1", droneSpawnPos]}];
action_deactive = drone_sign_1 addAction ["<t color='#e74c3c'>DE-ACTIVATE: <t color='#c0392b'>Drone.", {
action_deactive_sure = drone_sign_1 addAction ["<t color='#ffffff'>DE-ACTIVATE: <t color='#c0392b'>YES, I want to delete the drone!", {
deleteVehicle currentDrone;
sleep 0.5;
drone_sign_1 removeAction (_this select 2);
drone_sign_1 removeAction (action_deactive_cancel);
drone_sign_1 removeAction (action_active);
drone_sign_1 addAction ["<t color='#27ae60'>Activate<t color='#34495e'>: Drone.", {
curentDrone = "B_T_UAV_03_dynamicLoadout_F" createVehicle position droneSpawnPos;
curentDrone setDir droneSpawnDir;
}];
}];
action_deactive_cancel = drone_sign_1 addAction ["<t color='#ffffff'>DE-ACTIVATE: <t color='#27ae60'>NO, I want to keep the drone!", {
drone_sign_1 removeAction (action_deactive_sure);
drone_sign_1 removeAction (_this select 2);
}];
}];
};
while {!alive currentDrone} do {
drone_sign_1 addAction ["<t color='#27ae60'>Activate<t color='#34495e'>: Drone.", {
curentDrone = "B_T_UAV_03_dynamicLoadout_F" createVehicle position droneSpawnPos;
curentDrone setDir droneSpawnDir;
}];
};``` Would this break my game?
I think I need to put this both as functions?
Ehm so it's the first time I've ever tried using remoteExec & the call, but this is this right?
{
if (!hasInterface && !isServer) then {
call {[1, 5] execVM "test.sqf";};
};
} remoteExec ["call"];
so then for example, would work?
{
if (!hasInterface && !isServer) then {
[1, 5] execVM "test.sqf";
};
} remoteExec ["call", hc];
that looks good
Thanks, works like a charm! ๐
oh. good to know
If you already have the id of the hc, you might as well just write:
[[1, 5], "test.sqf"] remoteExec ["execVM", hc];
best part of the changelog from today
Tweaked: The 3rd, 4th, and 5th parameters in the createVehicle script command are now optional
finally
Hot damn that is good
When you do if (condition) exitWith {} and leave the {} empty, does it return null or nil?
Alright, thanks
Hey guys, low level problem here.
{
TR+_i addEventHandler ["hitPart", {
TR+_i animate ["Terc",1];
}];
};```
I want to have an incremental variable creator which reads off TR1, then TR2. How to i format this code so that it does that?
@raven oracle
You can get a variable by a string with <namespace> getVariable ["variablename", <defaultValue>]
so for example in your loop you could do
private _object = missionNamespace getVariable [format ["TR_%1", _i], objNull];
if (!isNull _object) then {
_object addEventHandler ["hitPart", {
(param [0]) animate ["Terc",1];
}];
};
although generally, I advise you to store the objects youre referencing in an array instead and work with that
it's just a cleaner solution and helps avoid errors which become annoying to debug
yeah, cutting corners. Have 2000 objects named too similarly.
im not 100% sure if my snippet will work but it should, put it into the for loop
how are your vehicles named?
in what scheme
could you explain what each bit of that does?
TR_1, TR_2,... and so on?
yes
OK
terrible i know
missionNamespace getVariable [format ["TR_%1", _i], objNull];
basically getVariable takes a string and an optional default value and returns you whatever is stored in that global variable in the namespace youve defined
your variables are most likely in missionNamespace anyway so dont bother about that
format ["TR_%1", _i] results in whatever number is stored in _i
so in the first iteration it will become
"TR_1"
second
"TR_2" and so on
so the script (in each loop run) gets the variable value from "TR_1", then "TR_2" and so on
objNull is just a default value in case your variable does not exist for whatever reason
it then stores it in the local variable _object which is marked as private (meaning you cant by accident override other variables which are named _object and which are defined in a parent scope)
rgr. Thank you for your time
private _a = 1;
if (_a == 1) then {
private _a = 2;
hint str _a;
};
hint str _a;```
will hint 2 and then 1
and the rest is basically the same as your existing code
Well thank you for that, I appreciate you walking me through that.
i changed TR+_i animate ["Terc",1]; to (param [0]) animate ["Terc",1]; as the vehicle youre attaching the handler to is passed into your script which runs when the handler is fired as an argument
not used to SQF proper yet. Not creating it from scratch
the other option would be to hardcode which object you mean in each defined code segment.. but thats very dirty
this method instead just takes the object the handler is assigned to
Why would the "dirty" way be well. "dirty"?
the issue is that somethign i define in my script like _a wont carry over into the eventhandler
(any local variable)
this wouldnt work
right, so thats why it wasnt working. Thank you
_object addEventHandler ["hitPart", {
_object animate ["Terc",1];
}];
because the code you give your handler to run when it fires is not in the same context as the script youre currently writing
it doesnt know _object and will error or maybe dont even error at all
so your dirty workaround would be to either have the code know a global variable to fetch from
for example if i only had one vehicle i could do this
myVehicle addEventHandler ["hitPart", {
myVehicle animate ["Terc",1];
}];
but this isnt suitable for your application and certainly not a clean solution
so best way is to just use the reference the eventhandler passes into your code snippet
this way you dont have to keep track of the vehicle in a variable somewhere for the eventhandler to find it again when the code runs
the handler knows what its attached to anyway
rgr.
HOLY SHIT!
Thank you for the explanation
It was the god damn rain!
give this chat 12 hours and it will be flooded of messages what i did wrong (probably) ๐
hahahaha, no worries, you helped me immensely
@little eagle @meager heart it was overcast / rain that caused snipers to not work.
@tame portal This doesnt seem to be picking up any of the objects
@tame portal How should I be calling this?
?
not sure where to put this , but is it engine based, restricting what weapons can be shot from the back for 4x4's or benches of helis ?
Added: A new "#" script operator (works in the same way same as select, but is shorter to write and has higher priority than math functions)
Example: _x # 1; equal - _x select 1;
Right?
I think, try it
Ya know, I have been playing arma for like..
many years, have not had a single unit I have been in, where there is another person instrested in scripting / dev of missions..
D:
I've met a lot of people that like to piece things together with waypoints and simple placement of units,
but never any sqf sure
I'm having problems in the Bounty Hunt script in Altis Life, the actions in the NPC do not work and when someone buys a license they do not register in the Data Base.
@plucky mauve ask on the official altis life forums...
@hearty plover not sure about rain (i just always manually set it 0)
but i never had any troubles with overcast, even with multiple skipping/changing time and weather conditions during the mission ๐คท
Just a quick word to the wise: as of 1.82 hit point strings returned using commands (getAllHitPointsDamage) or passed to event handlers (HandleDamage, Dammaged) are now forced lowercase. Something to now keep in mind for anyone using statements such as _hitPoint in ["HitBody", "HitHull"] or _hitPoint isEqualTo "HitBody".
I have no idea why this wasn't documented in the changelog, but it certainly has caused me a few minor issues after updating to 1.82.
Tfw u were a 13 yold kid trying to put ur squad in ur heli in arma 2 and kept going to BI fourms to copy paste the getincargo script ๐
@meager heart I removed rain/oc effects and the AI shoots now, however on my dedicated server they do not...
would it be practical to recreate units on a headless client if say a zeus placed them?
add a curator event handler for a place object, delete them recreate them on headless and add them to editable objects on the curator?
yes^
that's basically what most headless scripts do otherwise it's a fucking nightmare to transfer stuff
Okay sweet ๐
Any ideas why im having so much trouble playing the "Acts_TreatingWounded01" animation? No matter what I use, playMove, switchMove, whatever, it just either doesn't play properly or partially plays it and just bugs out
I had that so I went another route
{
player playMove _x;
[player,_x,true] remoteExecCall ["life_fnc_animSync",-2];
} forEach [
"ainvpknlmstpsnonwnondnon_medic",
"ainvpknlmstpsnonwnondnon_medic0",
"ainvpknlmstpsnonwnondnon_medic1",
"ainvpknlmstpsnonwnondnon_medic2",
"ainvpknlmstpsnonwnondnon_medic3",
"ainvpknlmstpsnonwnondnon_medic4",
"ainvpknlmstpsnonwnondnon_medic5"
];
seems to work for me
@warm gorge use playMoveNow
it's also possible you're switching to an other action while it's playing
remember that those actions are supposed to be chained
it's the start of a loop of actions
@lone glade playMoveNow made no difference. No matter what I try I can't seem to get it to work :/ @wary vine That works, but not the animation I wanted
Remote exec in a loop like that ๐ฏ ๐ฉ
@warm gorge does the animation "freeze" after the first loop?
if that's the case it's perfectly normal, like I said it's the start of a loop
My character does a weird animation to pull out a weapon, but then just goes to idle standing animation and I can hear the animation play but can't see anything happen. What makes it weird is sometimes if I switch into first person I can see the animation playing normal for a couple of seconds. Not sure whats going on
dunno, the start of the loop plays for me :/
Yeah im testing this in singleplayer, not sure if that will affect anything, but yeah the unit is local
Would it have anything to do with the character/side? Im using a civilian for this
a lot of animations based on unit weapon position, like in hands/on back... lowered, also weapon type... pistol/rifle/launcher/throw... maybe that is the problem
ah, true
no idea about civilians... but afaik doesn't matter (side i mean) ๐คท
Hello, does BIS_fnc_getVehicleCustomization bug ?
11:34:16 Error position: <select _foreachindex) < 0) exitwith {_se>
11:34:16 Error Diviseur nul
11:34:16 File A3\functions_f_mark\Vehicles\fn_getVehicleCustomization.sqf [BIS_fnc_getVehicleCustomization], line 28```
At least for the "B_LSV_01_armed_F" (https://feedback.bistudio.com/T127868)
btw we have getObjectMaterials and getObjectTextures
you need "Animation Sources" also ?
you can get them ^ from the config, if yes...
Hey I have two questions, related to each other:
I'm working on a sector control mission. The idea is that once the sector has been captured a transport boat should spawn in the river nearby the sector. This is the script I'm using for it:
`ship_safepos = [getPos module, 1,150,10,2] call BIS_fnc_findSafePos;
ship_marker_name = format ["mrk_ship%1", random 100];
ship_marker = createMarker [ship_marker_name, ship_safepos];
ship_marker setMarkerType "hd_dot";
ship_marker setMarkerText "Transport";
ship = "uns_PBR_M10" createVehicle getMarkerPos ship_marker;
if (isServer) then { ["SpawnNotification",["A Transport ship has just spawned in"]] remoteExec ["BIS_fnc_showNotification",-2,true]; };
if (!isServer) then { ["SpawnNotification",["A Transport ship has just spawned in"]] call BIS_fnc_showNotification; };`
Code itself works, HOWEVER - the ship spawns near the beach and it's getting "beached" - meaning I can get inside the ship but I can't move since it's stuck on the ground. Do you know a simple way to prevent that? (Changing findsafepos parameters doesn't solve the issue).
Related question: To have a workaround for this issue I've put together a script that would push the boat a little bit and get it unstuck for the ground:
if((veh isKindOf "Car") OR (veh isKindOf "Ship") OR (veh isKindOf "Air")) then { displayName = getText(configFile >> "CfgVehicles" >> (typeOf _veh) >> "displayName"); upp = format["Pushing %1",displayName]; hint upp; speed = 8.5; veh setVelocity [ (vel select 0) + (sin dir * speed), (vel select 1) + (cos dir * speed), (vel select 2) ]; };
This works locally, but not on dedicated server, I guess battleye prevents execution of this script because of considering it a cheat? I wasn't really able to properly diagnose what's the issue here. Does any one of you have a "vehicle push" script that would work on the server?
Making shoreMode = 0 in BIS_fnc_findSafePos didn't help?
It's default, yes, but this is arma 3 ๐
Also you could blacklist an area with blacklistPos in BIS_fnc_findSafePos if your boat spawns at exact place
Hmm... I've set only waterMode = 2 so it must be in water.
I didn't set shoreMode, as you said default = 0 => does not have to be at a shore, but, as you said - IT'S ARMA. LOL ๐
I will try setting the shoreMode explicitly to 0, but frankly I doubt it will help.
don't use findSafePos, use selectBestPlaces instead, you're much more likely to get a better spot
aaah, I see, and then do a spawn_position = result select 0; for getting the position, right?
yep
just don't use a precision that is too high, 5-10 sources max
https://community.bistudio.com/wiki/Ambient_Parameters more info for the params here
Does anyone know where I find the RscDebugConsolePublic display class?
In ui_f_data.pbo there is directory under \GUI\RscCommon\RscDebugConsole but I'm not sure if this is what you want.
So there's the "user" animation source that allows script-driven animations in weapon.cfg. Any idea if it works? I wasn't able to find any weapons with defined user animation sources.
I'd like to hide/unhide part of vest depending on scripting
@formal vigil Since those are all .paa files, I don't think that's exactly what I'm asking for, but thanks for trying, I'm searching for the sqf implementation of RscDebugConsolePublic, you can call it via the admin cรกmera by pressing F1, or via the debug console createDialog RscDebugConsolePublic
Those .paa's appear to be more engine related
I think they're just images you can open with TexView containing the elements for that window you're referring.
Yeah they are pictures used in the ESC-Screen regular engine debug console aswell as the dialog I'm looking for, I just can't find the code for it.
Gotcha
You won't find a SQF implementation for something that was not implemented in SQF
Are the displays not written in SQF?
displays are usually not written in SQF no
I'm sorry I'm fairly new to this as you can tell
Alright
What is it written in though?
Config
as you said the RscDebugConsolePublic display class class. Aka config class
How the UI looks will be in config. Maybe some button actions will have dedicated scripts
Ingame config viewer
Isn't the debug console hard coded? I don't think it works when disabled.
Even if you create the display, the engine implementation is disabled. And if it were enabled, you could just open the pause menu.
the disabled code is scripted
is it possible to do this "_Whitelist = [] spawn TW_fnc_name;"
or this _Whitelist = buttonSetAction [1603, "[] spawn TW_fnc_name"];
Spawn returns the ID of the spawn code, not what the code returns https://community.bistudio.com/wiki/spawn
And buttonSetAction returns nothing https://community.bistudio.com/wiki/buttonSetAction
So neither of those will do what you want
If you can use call in the first example it should work
https://community.bistudio.com/wiki/call
Well both set a variable. And both are possible so the answer is yes. Though it doesn't make much sense to do it
Good answer.
sorry for asking alot but can someone review this please https://hastebin.com/atecisafap.coffeescript
It's a big array. that you are not using. and some listbox code.
you are missing private twice.
Don't know what else to review
no
https://community.bistudio.com/wiki/private alt syntax 2
private _text = and private _index =
That's a deprecated syntax, and if I recall correctly it's slower than using private as a keyword
Inb4 slow life code