#arma3_scripting
1 messages ยท Page 302 of 1
@tough abyss again: We gave you the Examples above, how to do it.
We haven't even started with wheel hitpoints yet and their physx integration with the wheels class.
You should know that every vehicle, even cars have technically 8 wheel hitoints...
bla bla bla
Or more
It's overcomplicated and broken.
For each wheel?
No, 8 per vehicle
Oh and the depends entry! For helicopters with multiple engine hitpoints...
Tracked vehicles use HitLTrack and HitRTrack
here is what should happen in Arma 4:
- scrap old system
- make a better one
Thats it (taken from one of my Cars)
class HitLFWheel;
class HitLF2Wheel;
class HitRFWheel;
class HitRF2Wheel;
So 8 is simply not true
There might be some Emptry Entrys from the baseClass, not nothing more.
The other four are inherited from class Car
They would
You can have 20-30-40 HitPoints
They're only inactive, because they have no valid selection in the model
No, since there don't get dmg assigned, if there hitPoint won't be addressed
Exactly.
So they might be in the Cfg, but are not in use
But I said technically they have 8.
technically can there be 1000 ๐
God no why.
Sure, and without getAllHitPointsDamages it would be difficult to tell which ones do stuff and which ones don't.
That's all I said. : )
If you got ppl, who don't follow the "Standard"-Naming its even worse!
like:
Wheel_1_1 = Reifen_VL
-.-
I like how your car technically has four front wheels and no rear wheels
Or any other custom name for Standard Stuff ....
Have you checked the Vanilla Cars? ๐
I think the Kamaz was it
Or like ActsPercMstpSnonWunaDnon_sceneNikitinDisloyalty_Bardak.
WHY amovpercmstpsnonwnondnon_acrgpknlmstpsnonwnondnon_getinhigh?
One pair of the rear wheels is named front wheel or something like that.
I think 2_3 was in the middle, and 2_4 was the last one. Something was strange there
Yeah, or something like that.
Lol.
amov perc mstp snon wnon dnon
Gesundheit.
iirc yes
There you got it, why you ask then ๐
FAKE!
๐
Sometimes... only sometimes... i wanna move to czech and steal a tank. Not giving it back, unless Females are in and all bugs are fixed ๐
The tank?
This was my rant of today. Tomorrow: PhysX. Don't miss it.
Looks for trash emote.
๐ฉ
Close enough ๐
We come back in 15min. If you don't have a working script... erm... idk.....
i send you a pic of Commy, in the bathtub.
Come back when you've written something like this: https://github.com/CBATeam/CBA_A3/blob/master/addons/hashes/fnc_parseYAML.sqf
Boy if I could write working scripts in 15 minutes.
14min left.
};
};
};
};
};
};
};
};
};
[_pos, _data, _error]; // Return.
};
๐คฆ
๐คท
A script in 15 minutes? sleep 900; done!
Well that's dangerous, what if simulation is slowed? Then it'll be longer than 15 minutes
uiSleep 900; FTFY
but...
Looks more complicated ( == better, for most of the peeps)
_start = diag_TickTime;
waitUntil{ ((diag_TickTime - _start) >= (15 * 60))};```
I don't think uiSleep does what you think it does, Penny.
It does
https://community.bistudio.com/wiki/uiSleep
uiSleep is a sleep method to delay script execution where script time/simulation time is stopped. uiSleep is basically using the system time (uiTime more specifically) and not simulation time
I don't think uiSleep is using the machines clock like diag_tickTime does.
uiSleep is basically using the system time (uiTime more specifically)
vergleichbar mit, aber nicht das selbe:
It just uses the simulation time without respecting time acceleration and simulation suspension (esc in SP, setAccTime)
Like diag_TickTime, iirc
The machine clock will still tick faster under heavy load.
When the game is slowed.
I'm not so sure about that. Dedmen should take a look at the internals.
yepyep
I think to remember it uses systemTime. Will check when WoW instance is done
instance? Dungeon? what's it called in english
Dscha - Today at 4:58 PM
uiSleep is basically using the system time (uiTime more specifically)
(edited)```
ยฏ_(ใ)_/ยฏ
uiTime is indeed not related to systemTime. It get's updated every frame by the time that was spent inside the frame. ignoring acceleration
@jade abyss I don't have a working script. Send @little eagle's photos.
I can't. Geneva Conventions
^can confirm
Meaning UITime stops when game doesn't render. Like.. not having -noPause set in singelplayer and being tabbed out. But the whole engine stops at that point so.... yeah
diag_ticktime still works with the game paused. Essentially using elapsed systemTime since first time someone called getTickTime in the engine
Nice info, thanks
simuation time (sleep) != ui time (uiSleep) != clock / tick time (diag_tickTime)
Obviously uiSleep is also serialized in savegames, which wouldn't work if it were the same as diag_tickTime
wiki wrong again
KK made that page in 2015, so maybe he has learned since then, or you can educate him ๐
I'd like to be educated in a good method of silencing footsteps via scripts as opposed to my switchmove spam and animcoef at 0.2
It's so easy and rational to see the dichotomy: sleep + time vs. uiSleep. Clearly diag_tickTime is for uiSleep what time is for sleep. Problem is that it isn 't true.
You cannot silence footsteps with scripts.
SwitchMove spam it is
the "cost" is not existing
there is no cost when spawning
you just add something to the scheduler
and it will be executed
spawn and a loop
a thousand?
spawning that however will take a noticable ammount of time longer
But I have to spawn it, it's a loop with sleep
otherwise it's checking every frame :S
???
let me start different
what do you want to archive
as it looks to me that you did some mistake on the way to it
a building search spawned is fine
with sleep it is not as it will suspend the finalization even further
best practise for whole map building search: do it in the very begining serverside
best practise for partial map building search: depending on size, do it direct or suspended
the later however will require some "framework" as you usualy want to do somethign with those buildings
Sorry to interrupt a conversation, but wasn't there a nice way to automatically have something executed in an infinite loop with automatic sleep?
That's actually a really good point for the building search
FSM script @peak plover if it is AI behaviour
nevermind, that was waitUntil, and it was a different thing
Soo fsm is faster than normal checks and loops ? I've had bad experience using ai mods
it is a state machine
if correctly used, it will be faster
it is not simple though ...
but it will be easier as soon as you understood how FSM works
he wants to implement AI behaviour for building search
@peak plover using spawn is fine.
just make sure the script is exiting once the AI group or whatever doesn't need it anymore
Ok thanks
I guess I'll look into FSM later, as it might provide really cool things
Have you had any noticable performance drops or issues when running more than 5 instances of a ai building search script at the same time ?
Ok, would about 100 cause issues?
Actually I'll make this and then I'll change according to the results I gather
Not today, but maybe one day
My dream is to clear out all buildings by 2020
It would depend how long the searching takes
If it's going to take a second to run, and you have 100 instances, they'll start to bottleneck
YES SIR
http://i.imgur.com/f3rpoNP.jpg
I really have to try out FSM later 'tho
This looks really interesting
Immersive AI that patrols around and stops to talk to other patrols etc. would be possible with this. This all looks so amazing
"Bad guy passed" --> "Idiot"
I think its to be understood as a flow of things, where one state can have various things that can happen based on current conditions, which then lead to other states. Atleast thats what those graphs make it seem like
how does it work from a scripting perspective
What do you mean by scripting perspective? ^^
FSM's are just that: States with conditions leading to other actions resulting in being in another state. Every condition has a priority assigned so when multiple conditions are met, the one with the highest priority will be activated, leading to an action (script command like you are used to) which leads to another state with different conditions. Atleast that's how I understood it (Doesnt mean I can explain it). Oh also, FSM's are done in the editor you saw in the screenshot above. Disclaimer: I have never worked with that stuff like, ever so you are free to correct me if I'm wrong
the editor is horrible don't bother
What's wrong with it? Haven't touched it myself so I cant tell ๐
the creation of boxes works, but writing any sqf in the small textarea is horrible, and provides no help
it's better to just call functions directly from there
Is that the only major issue?
try it yourself and see if you enjoy it :p
I have hardly enough brain power left to do my video compilations of gameplay clips, and then I need to try to master the art of displays and dialogues first but then I may try that FSM stuff for custom AI
Ive started to love displays and dialogues.
do you mean call functions from FSM instead of writing code inside of it?
what has changed @subtle ore
Quick question for the professional code monkeys. Does anyone use Visual Studio Enterprise?
what you need it for @open vigil
most of the time the community edition is more then enough
there are just a few "edge cases" where that is not true
I use Eclipse at the moment, but have the opportunity to get VS Enterprise. I'm not worried about it being overkill, I just dont want a reduced feature set that community may have.
you get pretty much everything
if the switch is worth it, you have to decide yourself
yeah, I was having a look at that, but just wanted personal opinions before I get it.
reason for eclipse > vs community?
because that most likely also applies to that
๐
@open vigil Yes I do! why
I'd always take VS over eclipse.I need Enterprise for the Better profiling and testing tools. But I'd say that VS Community is enough for the avg dev
I take visual studio over eclipse too but i only use community edition :/
Ive started to love displays and dialogues.
Sounds like: "my child is mentally challenged"
Love probably wasnt the right word to use, it works.
It's fine. Believe me. No one wants these things to happen.
Im not following.
๐
๐
it is ok @subtle ore
commy2 is weirdo
so ... what did changed that you now enjoy UI stuff?
He already said it. "It works" now.
@queen cargo i just find its easier to use than other ui systems i suppose. For example UMG has a little bit of a learning curve in ue4.
@little eagle "it just works" - Todd Howard
ahh ok
well ... it is extremly simple ... so ... as soon as that abstract concept is out of the way, things get easier
It always does. Except when it doesn't.
using some UI-Editor makes it even more simple
Yep.
And now explain to me why I can't use ctrlShow for sub controls in controls groups.
obvious question, obvious answer: you are stupid
ohh ... and it does not work
๐ข
๐ฎ
๐
Oh god, these emoji things are taking over.
๐
๐ค
Sa-Matra, I been meaning to ask you actually
Do have any tips for someone trying to make a scoring system since the default scoreboard sucks
tag the man!
@plucky beacon is too nice.
I'm just extra careful
about bothering people
:I
Tfw you like being tagged but always worry about tagging everyone else.
just ignore commy @plucky beacon
aww
Hello, any help appreciated as this is not my specialty.
Trying to create a script that sets variable name of specific object (Land_Cargo10_yellow_F). Needs to name the object box1 or something similar.
@tough abyss The trick is, it has to reference the classname of the object, then apply variable name.
@tough moth so ```sqf
_object = "Land_Cargo10_yellow_F" createVehicle pos;
_object setVariable["box1", nil];
The scenario is: box gets spawned, needs to be named
other than that, im not sure i understand what you're asking ๐
Thanks! I'll give that a try.
MyTag_MyFancyBox = "Land_Cargo10_yellow_F" createVehicle pos;
missionNameSpace setVariable ["MyTag_MyFancyBox",MyTag_MyFancyBox,true];
Box is now known on every Client as "MyTag_MyFancyBox"
@jade abyss why not just set the public flag in setVar to true?
i thought it transfers the var globally
Erm... it is set to true?! oO
@jade abyss nvm im drunk or smth
k, + No need to highlight me, when we are currently writing oO
o.O
yeah mb
No
DriftingNitro, if only everyone was that conscious about not tagging people.
Yeah, only Highlighting if important. Right? @deft dock
๐
I am having an issue with this piece of code
_markers = allMapMarkers;
_selectedMarker = str(_markers select 0);
hint _selectedMarker;
[getMarkerPos _selectedMarker, WEST, 5] call BIS_fnc_spawnGroup;
The units never spawn. Am I doing something wrong?
ah gotcha! that works! thanks
_selectedMaker = allMapMarkers select 0;
perfect thanks!
@tough abyss hm. you could do a scope filter too but i think the problem is that you want to go against the nature of simpleObject, right? it being just a model, which just can be used by several classes. nothing you can do there i think.
only reverse as in defining it when you create the simple object
typeOf works if you used the classname syntax instead of the model path syntax of createSimpleObject
Otherwise there is no way to distinguish between two CfgVehicles classes that use the same model
@tough abyss ^
All entries in the list you generated are equally valid.
If you generate the simple object by using getText on the "model" entry on a classname, you could just store the original classname on the simple object using setVariable public, but you might as well just use createSimpleObject classname at that point. Which is preferred for some reason according to the wiki, because:
Objects created with Syntax 2 can be textured. The default direction should match the direction of the object if it was created with createVehicle.
Since Arma 3 v1.67 simple objects support setVariable and getVariable
What does not work on simple objects is the type filter of nearestObjects etc. They are always filtered out if the filter wasn't [].
select {typeOf _x == "blah"
is the slow work around
entities "" select {isSimpleObject _x}
The biggest thing I've seen not working is simple objects and AI
That's the point.
wait
aww, I didn't save my repro
oh, there it is
_type = "Building";
_pos = [1000, 1000, 0];
_obj = createSimpleObject [_type, AGLToASL _pos];
systemChat str nearestObjects [_pos, [_type], 1];
systemChat str nearestObjects [_pos, [], 1];
systemChat str(nearestObjects [_pos, [], 1] select {typeOf _x == _type});
first doesn't show
second shows it
third shows it (and would filter out unwanted objects at that position)
creating a simple object with the Building base class
This isn't normal usage?
Well, name a different classname
B_MBT_01_F
ok
Land_Crane_F
Ok, radius 100 and Land_Crane_F
same result
_type = "Land_Crane_F";
_pos = [1000, 1000, 0];
_obj = createSimpleObject [_type, AGLToASL _pos];
systemChat str nearestObjects [_pos, [_type], 100];
systemChat str nearestObjects [_pos, [], 100];
systemChat str(nearestObjects [_pos, [], 100] select {typeOf _x == _type});
first one shows nothing
second one shows my "Building" + the crane
third one shows only the crane
systemChat str nearestObjects [[1000, 1000, 0], ["Building"], 100];
Same mission, still empty
Doesn't work.
ah yet another count abuser ๐
QS, that code doesn't show the crane created next to me.
To make sure I used it right, I removed the "Building" in the filter and it showed a white ring
readded the filter: ring disappeared
Conclsion:
A type filter removes all simple objects from the array, even if typeOf would be right
Now the question is: would isKindOf work?
onEachFrame {
{
drawIcon3D [
"\a3\ui_f\data\IGUI\Cfg\Radar\radar_ca.paa",
[1,1,1,1],
position _x,
1,
1,
45,
"",
1,
0.05,
"TahomaB"
];
} count (nearestObjects [(position player), [], 100] select {_x isKindOf "Building"});
};
testing this ^
select {_x isKindOf "Building"}
works
typeOf works, isKindOf works, filter in nearestObjects: broken
๐
I even made a post about it, but was ignored:
https://forums.bistudio.com/forums/topic/151099-scripting-discussion-dev-branch/?page=49#comment-3165046
Oh, one diff is, that I'm on the profiling branch of 1.68
the one with the weird steam password
So it did at one point and they borked it.
I made my post and I have a work around good enough for me.
But will this only work for simple objectomondo?
works on the crane
can confirm
Btw, I used the classname syntax and not the model path syntax and the crane automatically was placed on the ground and not inside it.
So I guess that syntax respects the SimpleObject class stuff automatically.
Yeah and the position I used was z=0 with AGLToASL.
Any reason why you use the model syntax and not the classname syntax?
p3d in mission pbo?
ok
I created 50k of the Building (empty model) and it reduced FPS from 80 to 77 only.
Local hosted MP
Doing a check on my Dedi
i am lazy, do you have a command? ๐
(or at least a Classname)
_type = "Building";
_pos = [1000, 1000, 0];
_obj = createSimpleObject [_type, AGLToASL _pos];
systemChat str nearestObjects [_pos, [_type], 1];
systemChat str nearestObjects [_pos, [], 1];
systemChat str(nearestObjects [_pos, [], 1] select {typeOf _x == _type});
in a for loop with from 1 to 5e4
if (!((_model select [((count _model) - 4),4]) isEqualTo '.p3d')) then {
What if if someone writes "My_model.P3D" ?
checking my Bundeswehr mod configs
inb4 the jet DLC will have them all uppercase file extensions
Dedi Server FPS is always <= 47 for me.
It's a 2012 then I guess (it's my comms server actually, I just hijack it for my testing)
This simple object stuff is exactly what Arma needed and has great potential for building bases. Now we need mission makers. ๐ฆ
๐ฆ
another 10k, omnomnom
Spikes on all CPUs ^^
FPS down to 17 (10 Threads running that:
[] spawn
{
_Pos = [10,0,0];
for "_i" from 1 to 1000 do
{
_Pos set[0,((_Pos select 0)+4)];
createSimpleObject ["B_APC_Tracked_01_CRV_F", AGLtoASL _Pos];
};
};
Yeah, currently waiting for them to finish
oh, btw....
Memory used is at -1880MB again in #monitor XD
๐
-2007MB
Looks like that atm:
http://i.imgur.com/AdIPNF0.jpg
\o/
overflow
Build a base at spawn.
Maybe some ambient cars or road blocks using simple objects too.
some*
all
AI walks through them according to the wiki though
So? The road block if for the players, not the AI
Civilian cars shouldn't be used by the military anyway.
yeh without AI it seems like it should pretty much always be used
Sounds more like something for the new dynamic simulation thing
Yeah, doesn't make much sense to use simpleObject for that (extra load to replace models)
they treat them like terrain objects
Well, AI do walk through solid walls if they move in a group, so ...
It's not GTA, a parked car = no key = no moving it around.
ai vehicles do bump into everything
CPU: I7-6700k (4Ghz - 8 Cores (incl. HT))
Yeah. Exactly that is what I'd imagine.
No more leveling the base with artillery, but whatever.
animateSource?!
Intersect?
constant Check -> Add to button -> Profit
??
You make no sense again
yeh that's awesome.. i haven't bothered for barriers and stuff because the wiki explicitly says they walk through walls
i guess it should say 'but no more than usual'
Anyone know how to reduce the Performance/Server drain of multiple mines on a multiplayer server? but still have them function?
You could write a mine handeler, which deletes the mines and only puts them back when there are players in a 100 meter radius
Can activateAddons be used on PBOs which aren't inside the "Addons" folder of a mod?
@tough abyss I don't know of any PBO's that are getting loaded that are not in a Addons folder.. well... besides the dta\ stuff. So not really. activeAddons shows everything that's loaded into the Game.
Introduced_with_Armed_Assault_version_1.00
This command will activate addons that are referenced via scripts but not included in a missions required addons section.```
I don't understand...
hm. that's actually neat
No, its not what you imagine it is.
if (isClass (configFile >> "CfgPatches" >> "some_mod")) then {
activateAddons ["some_other_mod"]; // some_other_mod.pbo is inside the "optionals" folder
};
``` Not that?
does it mean that a player that joins a mission that has nothing in the required addons list but has spawned something through script that is from an addon will then get a message and get kicked?
as if the addon was required by the sqm
?
Spawning something from a script doesn't get you kicked.
Calling activateAddons with an optional PBO just causes people that don't have that PBO to be unable to play the mission
I found something about that you cannot use createVehicle for stuff from Addons that are not activated. But.. Everything is loaded at gamestart anyway...
What are you trying to do with activateAddons?
You can't load PBO's with it if that's what you are trying to do
who? me?
no @tough abyss
http://i.imgur.com/Ke4oJXF.gifv did I post this already?
:P still hoping DLC makes this view an option without the stuttering
is that a scripted camera?
oh wait. is the fact it rotates with the plane not a feature of the default camera?
i see. that would be nice then
hm. i wonder what in the config determines camera behavior. if anything. probably can only change position
you can change the position for infantry third person, but vehicles are programmed to always be level like a gyroscope
sure, don't see why not
Hey guys, what is the difference between x = "safezoneX + 60 * (pixelW * pixelGrid * 0.50)"; y = "safezoneY + (13 + (5 + 2)) * (pixelH * pixelGrid * 0.50)"; w = "safezoneW - 1 * 60 * (pixelW * pixelGrid * 0.50)"; h = 0; and ```` x = 0.811438 * safezoneW + safezoneX;
y = 0.0974 * safezoneH + safezoneY;
w = 0.175313 * safezoneW;
h = 0.352 * safezoneH;```?
I take it using the above would be better for relation between different resolutions?
Change your InterfaceSize ingame
I only use Safezone:
x = 0.811438 * safezoneW + safezoneX;
y = 0.0974 * safezoneH + safezoneY;
w = 0.175313 * safezoneW;
h = 0.352 * safezoneH;```
different grids
The first one looks weird tho. h = 0 ???
That means the control is invisible.
Is it possible to over ride an entire function in the scripting commands? I want to reroute the functions logic
Yes. You can overwrite the CfgFunctions entry to redirect it to your file
http://i.imgur.com/y0ZZaw0.gifv Thanks to badBenson this camera works much better, but it still has no UI or controls beyond movement :/
What's the best place to request this an official option anywy?
i think you can make a ticket. there should be feature request ones aside from normal bug reports. also make a nice video of the one without stutter and mention it in the dev branch discussion thread
Cool
Someone on the subreddit told me the dev branch already had this
hm. we need someone to confirm. sounds promising
It's just a a bit smoother on dev. Not like your script
Ah I see
camera roll still stays fixed
damn
I want mah roll with aircraft tick
LOL someone replied to my reddit post with an account called downvote3rdperson
Someone doesn't like third person I guess
I can see that. Makes ARMA feel less Simulation. I don't mind it for driving though if only due to the fact that you don't have peripheral vision
But that's what I love about Arma, you can be playing an arcadey score attack one minute, and then in the trenches using TFAR coordinating an airstrike with a 9-line the next.
There's a toggle for 3rd person, and even script solutions if you don't want it on certain vehicles
The only one I really have had issues with is in RHS Liberation the mobile respawn vehicle. The driver position is squished into the side of the cabin and even with trackIR and leaning to the side your entire left field of view is non-existent
You have to constantly schwiggle the vehicle to make certain you aren't going to lose your tires to a low wall or rock
Mods and stuff, RHS has some great interiors and a bunch of finniky ones
So for a scripted solution you could even check that if you're in that specific classname of a vehicle to allow 3rd person
While I am at it. Might as well add that post to here just in case...
Posted this earlier but my group is wondering if anyone knows a way to set up Liberation with RHS to provide weapon and equipment unlocks for capturing towns instead of just vehicles @ mention me if you have any input on the matter.
We are hoping to start a round of liberation with nothing but bolt actions and have town captures unlock newer and better gear along with vehicles.
It is.
Anyone know if it's possible to change the volume of a sound (played with playSound) outside of the sound's config? (e.g. in scripting)
what if I wanted to change the volume of an individual sound?
commands like playSound3d have that built in
but that's more for global sounds not local
it seems like there might be some variables that could be used in the sound confg. e.g I see examples where the cfg volumn is setup to be "db+0". Wonder if there are other variables.
I've used say3d before, but it seems like the volume stays the same regardless of how far away you are.
it is kinda finniky i know
and then just cuts out if you're beyond the specified distance
just thinking of ways to make some simple sounds for the trains
was thinking of just having the general track sound get louder/softer based on the speed and distance to train
great idea
playsound3d then
say3d should get quieter with distance. maybe your sound config settings where wrong
hy guys!! who can help me ?
No one if no one knows what the problem is
lol
Does allUnits return only persons or also eg. empty vehicles?
only units
Lol. Internet mind reading should be a thing... oh wait it is :D
all we do here is type our stream of concious anyway
cue Dream Theater
Anyone still scripting ?
yes?
No one ๐
no one is scripting ever again, it's illegal now
this is a legacy channel, if you leave it, it will dissapear
we're part of a secret undeground scripting league fighting the system from under their nose as freedom figters of community content
Lol, quick question here. Does the unit audbility coefficient only affecf the ability for ai to hear you, or does it actually effect the volume of the unit's footsteps?
Rule one of scripting club: No talking about scripting club. Rule two of scripting club: the blues have invaded
@tough abyss question is, how do we know about scripting club? Rule one must have been broken somewhere along the line.
Secondarily, who affiliates themselves with this so called. Scripting Club.
@subtle ore "no one is scripting ever again, it's illegal now
this is a legacy channel, if you leave it, it will dissapear"
@subtle ore only to AI and makes them unable to track you if not by sight when set to 0
@plucky beacon damn it.
So ya it doesn't make you go ghost
@tough abyss 0_o . If its illegal, why havent the enforcers of the law annexed this channel?
They can't find it
@plucky beacon well, i was hoping for things like stealth, itd make it somewhat useful
Anyone not in it can't see or join it
Woah.
Lol, he said woah too many times to count throughout the three movies.
Igiload? @tough abyss
Ohh..i have no idea. Are you using attachTo? Last i knew of, it didnt have any collision with anything when attached.
don't think they do, but he means after detaching, not while attached
Anyone knows, how the new hitPoint "Incapacitated" is calculated, on Infantry Units?
@vapid frigate ahhh... Duh
other than expectedDestination, it's not really possible to predict the path a unit will take from A to B is it?
Anyone still scripting ?
No, writing documentation :/
Unless its documentation about possibilities to use functions from a mod
Yes
I didnt learn how to add custom ace actions by reverse engineering ace
Or to check and set radio frequencies via scripts in TFAR
No learning = no knowing
The process of gaining knowledge is called learning
Patch notes arent a waste of time though
Also the patch notes do not include the keybind
You can also tell people 1000x to not throw grenades at base
Yes, people still do the "G is not freaking gear" mistake
Its an unsubtle attempt at killing everyone
Literally
When everyone is at one arsenal box and someone throws a nade cuz they are too lazy to rebind
I did it much simpler
have you tried tutorials, quik
exactly; show, dont say
its an interactive medium
If you throw a nade inside the "Dont throw grenades" zone, it would just delete the grenade and it would show a hint message with the player who messed up
create a pop up dialog "are you sure you want to throw it" every time they press G ๐
The danger is instantly removed and the person messing up gets instant karma'd
@digital pulsar they'd mistake yes for no
Though the hint message is already the nerfed version of the script
Previously I'd just put them at setpos [0,0,9999999]
but write the correct answer next to the question
I liked it but they didnt
so they have to read it and type it in, thus learn it
The best way to learn is by activly using it
Getting a sense that when scenario X then Y
You dont want everyone to remember the text box as scenario X
Action menu is only cursed because the LOS check on building doors is non existant
yeah good point mason but you gotta start somewhere
And when you have the tripple warehouse door, which "Open door" opens the small door inside the bkg door?
i managed to throw a grenade through a closed door lately
Wow
AI can see through it too
@tough abyss having doors on interact is so much better
but i scripted AI so i take the credit ๐
how so
myeah, but that doesnt really solve the problem does it
How can one figure out the geo LOD's?
its no use if the engine cant figure out which selection you're looking at
Huh, well too bad im not at home to test that
same as this pretty much
except it handles the vectors for you
Array - array of intersections in format: [[selection, distance],...], where
selection - name of intersected selection
distance - distance from begPos
The results are also sorted, closest selection first ```
the main issue with doors is that it allows you to open one that you are not looking at
based on distance i guess
You know the tripple warehouse doors?
ye, hellish
3x "Open door"
I rememember some houses in lingor had it when you would open dorr, it would open the one a floor below you
guys pls stop. you're giving me scroll menu PTSD
it's like a riddle
a minigame
three doors that are the same but diffrent, which one is the one open to escape an Ifrit
yea the type of riddle from a SAW movie. solve it or you get shot in the ass
How to use intersect properly (e.g. getting rid of the "open Door" ScrollMenuEntry): =}
https://pastebin.com/uva6RFta
Look at the Description of Animate and AnimateSource
It is recommended that animateSource command is used instead of animate whenever is possible, as it is more efficient and optimized for MP
https://community.bistudio.com/wiki/animateSource
https://pastebin.com/Pm0ZTjDf for detection
Way to complicated
works fine for me yet is abit unmodular
_ObjData = ([_CTarget,'GEOM'] intersect [(asltoagl (eyepos player)),(screenToWorld [0.5,0.5])]) select 0;
_Target = _ObjData select 0;
_Target = "Door_1" for example
If the Model has standard Naming (wich it SHOULD HAVE) -> You just need to add the _Blabla_Source to it
systemchat the _Target data
and then might check in the Config, what the source name of the Animation is,
It CAN be door_1, it also can be something else
"small cargo post" <- Pic
And you wanna know the Hatches? (doors are working, i just did that yesterday)
it can also be good to look for intersection in the fire geometry lod additionally. sadly even BI models are pretty inconsistent. so some glass doors work some don't. since different modellers seem to have followed different standards
stupid hatches, when they are open, you can't properly aim for them... hm.... i got an idea.
btw, about those hatches. i noticed when i had to update my door code that they now insta open. that's the animation range isn't it? there's probably a way to get that part too i'm guessing
might be because screentoworld is used. positionCameraToWorld is better for these things
Got an idea, how to fix that Quik
i use this
_range = 1.55;
if (cameraView == "External") then
{
_range = _range + ((positioncameratoworld [0,0,0]) distance (player modeltoworld(player selectionposition "head")));
};
_posa = positionCameraToWorld [0,0,0];
_posb = positionCameraToWorld [0,0,_range];
_int = ([_obj, "GEOM"] intersect [_posa, _posb]) select 0 select 0;
pretty old code. might be some dumb stuff. but works great in 1st and 3rd person
this has been done for ages. i wish BIS would jump on the hype train. no idea why they are stubborn about doors being done with a scroll list. it's mind boggling
i'd sign that. you also got the order of priority right imho
although some might care more about repack than blockign out annoyingly loud choppers ๐
Those Hatches are some nasty motherhuggers
lol
lets just request a global repo like pull requst system combined with voting
This... is not a bad idea, tbh^^
they can have a look at the pull requests, modify if needed, then just implement
But wait... the old Feedbacktracker had something like that ๐ Now... with Phabricator (i hate it, tbh)... nah
like a community library
+What the hell is wrong with the stupid Hatches?? -.-
Why don't you take your oppinion and shove it up to a place, where even you mother didn't want to look at.
(your face)
๐
read what i wrote before, about animate
currently playing around with a mix of Intersect and if he doesn't find any model -> lineIntersectObjs
hmm.. or Surface... hmm...
"nice hatch"... my ass
iirc one was for the Door one was the handle
IIRC!
Just test it out
stupid Hatches
line?
@tough abyss Your converter is broken!!111oneoneone
btw. did you noticed, that the hatches move a bit "hacky"?
@tough abyss
They also move a bit strange
Not in a fluid Animation
Is this for tank hatches?
Ahh.
@jade abyss yea i could swear though this didn't happen with my old code so i think their range is smaller than 1 or something, which both our current codes don't consider
Okay...
Elitness tells me -> Not even a Hatch Source in the cfg oO
mom, i hope i selected the right one^^
Of course, i did not
something is odd with the Hatchet
I ignore the hatchets, pff... something too strange in them
sec
@polar folio
Thats why:
class Hatch_1_source
{
source = "user";
initPhase = 1;
animPeriod = 0.001;
};```
animPeriod = 0.001; <-- ???
lol. makes sense then
btw. when you said "hacky" did you mean like low frame rate or insta animated?
private ["_test", "_test2"];
_test = bis_functions_mainscope setPos (position bis_functions_mainscope); if (isnil "_test") then {_test = false};
_test2 = bis_functions_mainscope playMove ""; if (isnil "_test2") then {_test2 = false};
if (_test || _test2) then {0 call (compile (preprocessFileLineNumbers "a3\functions_f\misc\fn_initCounter.sqf"))};
};
line 530
i mean its just for shits and giggles but well..
Open/Close hatch -> Look at the ANimation of the Hatch. Its not even close to fluid
Its like... erm... a 10FPS Movie on a 144Hz TV
you mean the cargo tower hatches?
hm yea. because i always had it look choppy. even when my door code was just checkign the condition and then executing the statement from class useractions. i wonder if choppiness is a side effect of that super low animperiod
like some engine bullshit
Yes Nitro.
I just think they didn't use many animation frames
it just not looks nice and "fluid"
Nitro
Go back in the Corner, do your homework.
*slap*
I am doing my homewo- ow!
*is searching his leather belt*
domestic violence
But: Would be nice to know, why the AnimPeriodis 0.001 in the first place. That makes no sense to me, tbh.
statement = "([this, 'Hatch_1_rot'] call BIS_fnc_HatchOpen)";
statement = "([this, 'Hatch_1_rot'] call BIS_fnc_HatchClose)";
Lets see.
HatchOpen.sqf
_null = _this spawn
{
_count = (_this select 0) animationPhase (_this select 1);
_stepDif = 0.08;
// open the hatch with decreasing speed
while {_count < 1} do
{
(_this select 0) animate [(_this select 1), _count];
sleep 0.04;
_count = _count + _stepDif;
_stepDif = _stepDif - 0.0016;
// Prevent _stepDif from becoming too small so the hatch would never fully open
if (_stepDif < 0.01) then
{
_stepDif = 0.01;
};
};
(_this select 0) animate [(_this select 1), 1];
};```
wow
Who's idea was that?!
sleep 0.04;```
why? *cry*
that's like, what, 20FPS or something
So, long story short -> No chance for animate the hatches, without beeing extremely hacky
who needs hatches anways? ยฏ_(ใ)_/ยฏ
that also
didn't someone make a mod where you can manipulate hatches?
+Also no need to rework the Button Solution again ๐
in the end, lets just make a upgrade addon which replaces all hatch handles with door handles, which can be animated
Explains why the game seems to run along aty 20 fps all the time, its literally written into the game /joke
@rancid ruin
cursorObject animateSource ["Hatch_1_source",0.5]; //50% opened
if (fps == good) then {sleep _enoughToMakeFPSBadAgain}
boah.. who said that... erm... someone mentioned, that the targeted FPS was ~30
16ms is frame time for 60fps if i remember correctly
well, I dont think sleep will help so much
Yeah it was a dev talking about dev on one of their tech talk things
No clue who said it.
I just know -> I ignore the Hatchets for now and don't need to update the OpenDoor thingy ๐
I recall it was in one of the pre Tanoa talks they were doing showing off the new stuff coming. Which one and when I just don't remember.
Although if the target is 30 why animate at 20 fps the hatches?! I think its possible to get that fixed.
Of course, just add set the animPeriod time higher. Done.
proably because they felt the hatches opened too fast
The whole Engine is an LeftOver from OFP.
90% is what it feels like
Imagine RV as ... erm...
nerfed hatch speed by 33%
that weight to power ratio though
wasn't mr. porsche a nazi?
No Politics here @rancid ruin
it's history not politics ^_^
and this is scripting Chan
you started it
you brought up the porches on a tricycle!
oO
All my fault I offtopiced.
anyway... silly arma^^
You rly have to love it or be an extreme Masochist, to continue doing something in it. I am still not sure, to wich side i belong.
Anyone who scripts this game knows how much they hate it. Its a bad habit we all know we should quit
i dunno, i quite enjoy SQF and dicking around with scripts for arma
i think the frustration comes when you try to get something PERFECT
Or when you find some basics missing
Like: ( i love that example) Remove a single Item/Magazine from a Vehicle!
yeah, a lot of compromise is needed to save your mental state
I have been working on a dynamic skill system but I falling into a lot of compatibility issues with other mods, as they all do their own way of setting the real base skill of the unit. Anyone know of a skill pipeline system that I ought to be using so they can be compounded properly? Its a hard concept to explain potentially but setting subskills directly looses information.
Skill = AI?
Yep AI sub skills
@jade abyss I said targeted FPS is 30 ^^ The engine is automatically cutting down on some tasks when fps is lower. Atleast it was like that a couple years ago. I didn't check if the values are still the same
No clue, but i am pretty sure, it came from on of the Devs.
anyway, no clue anymore. Too long ago.
I sometimes sound like a dev. I think...
I heard it in an official BI presentation early last year from a BI dev
I seem to recall right after talking with others about it on reddit. I don't think its BI's official position, their position seems to be "performance is what it is", but a target of 30 fps explains a lot.
Sounds familiar Candle.
And updated Door thingy script stuff (incl. lockedDoorCheck) =}
https://pastebin.com/uva6RFta
But on most systems 30 fps Arma is just realistic. Even if they moved that limit to 60fps it would probably just cause systems to not get enough processing time because the engine is trying to reach an unreachable fps target
have faith in enfusion engine
i was amazed when i was getting 60FPS in chernogorsk on dayz last time i played it a few months ago
prior to that, the last time i played it was months before, when i ragequit cos i was getting 17FPS in chernogorsk
Yep
truth be told, i will miss SQF in some ways when engines switch though
their new scripting language isn't as n00b friendly as sqf, even if it will probably make more sense and be less retarded
I must agree @rancid ruin
I rly like sqf, to be fair.
BUT: Lets see how Enfusion scripting will be =}
Can't be harder than c#
looks quite good based on a screenshot of it
what is hard about C#?
like a C#/C++ type thing
Thats why i mentioned it @tough abyss ๐ Its pretty easy
ah k
being object oriented will be a huge plus, but the syntax will definitely not be as easy to pick up for noobs
my converter should be running again. I hope ^^
Gimme a call, i can test it out if you want to
much easier to pick up for programmers though by the looks of it
yeah, pros and cons
(entirely based off http://i.imgur.com/kZbq4oll.png )
@jade abyss just test it if you want. it's online ๐
Hey guys, any reason why my script doesn't work when I use '<=', This is the concept of my script ```SQF
_time = "0";
if (_time <= "0") then {hint "test";};
that's a string not a number
because "0" is a string, not a number
remove the " around 0
isnt _time reserved?
you know what, reserved variable names can fuck off
it doesn't even tell you they're reserved in the error message
it says some stupid shit which is totally unrelated
I'm not actually using _time in my script, just used that as an example to show you the concept of my script
it was reserved in sqs times
yeah, I am old ๐ฆ
That reminds me: I opened old scripts from AEF back in 2004 ๐ ooohhh myyy
Don't tell me -.-
ok. biki says _time is sqs only
btw.:
Do you remember Lester and Dschulle?
yes
WRPEdit / ODOL Explorer oh myy
Yeah, i was working with them in the AEF-Mod, back in 2003-4.
So... you are not old alone ๐
great ๐
Not great, we are old ๐ฆ
Uh! But think about this: We are old. Most of the Bohemia Guys are "very old" oh myy
It looks like C++ CLI
It looks to small, imho
can barely read it
Files are .pbo, or?
@vapid frigate
(wanna know, before i dl dayz)
i got that screenshot from http://steamcommunity.com/games/221100/announcements/detail/129819371753526293/
afaik DayZ standalone is completly ebo
dayz appears to be pbos
kk, loading
it was pbo last time i checked
you were able to un-pbo the terrain, remove a few things, then load it up in arma 3 not long ago
Last time I checked was before they switched to that new graphics engine. How long ago was that?
6 months or so
no idea.. i haven't played since before there were any vehicles or anything
it's still a bad game, but the tech is getting more impressive
paves the way for dense urban terrains in future
will be able to do fallujah in arma 4 without it looking and playing shitty
This crashes the game claiming that "\userconfig\nev_debug_menu\settings.hpp" can't be found: ```SQF
KK_fnc_fileExists = {
private ["_ctrl", "_fileExists"];
disableSerialization;
_ctrl = findDisplay 0 ctrlCreate ["RscHTML", -1];
_ctrl htmlLoad _this;
_fileExists = ctrlHTMLLoaded _ctrl;
ctrlDelete _ctrl;
_fileExists
};
// FilePatching was enabled when testing, and "\userconfig\nev_debug_menu\settings.hpp" wasn't present
if (isFilePatchingEnabled) then {
_fileCheck = "\userconfig\nev_debug_menu\settings.hpp" call KK_fnc_fileExists;
if (_FileCheck) then {
#include "\userconfig\nev_debug_menu\settings.hpp" // User defined settings
} else {
#include "\@NEV_Addons\settings.hpp" // Default settings
};
} else {
#include "@NEV_Addons\settings.hpp" // Default settings
};
Sure, #include etc are preprocessor commands which are executed when reading in the scripts. So he will try to include all files, and he does not care about the sqf code
Any way to avoid that?
What you want to do is to include different files based on if they exist or not. But that needs to be done in another way
I have no idea, i never had the need to inlude a file only if it exist. Make it easy and make sure that is exist anyway. You are using a mod called NEV_Addons? then make sure its packed inside
"\userconfig\nev_debug_menu\settings.hpp" Did you intend for the leading \?
Yes, @dusk sage. Otherwise it doesn't work.
There is.
Where*
...?
?
I don't need to have the whole path there.
Looks like you were attempting to make a relative path but didn't
Thing is, @barren magnet. You can have people downloading your mod's userconfig stuff through the workshop.
It works if "\userconfig\nev_debug_menu\settings.hpp" is present.
if people download you addon through workshop i dont see a reason not to pack it into the addon
Would the userconfig folder be placed in the correct location?
๐คฆ
Where is your dir located
Inside the A3 root.
See that was easy
#include "\userconfig\nev_debug_menu\settings.hpp" by itself works.
Thanks for the tips the other day, got my building search script done now http://i.imgur.com/61MzLMI.jpg
I thought that was obvious ๐คฆ
I doubt people would go out of their way to work on an addon with me. Therefore, I only ask what needs to be asked.
I can post all 33 files here, but I don't see how that would help.
So you've said it works if you place the file in the correct place :/ ?
If the settings.hpp file is just setting variables then you may be able to just do call compile preprocessfile @tough abyss
But generally the way you are doing it is a security risk. People could put any script they want in there and could execute that on a server that requires bisigns
Basically: When a user downloads a mod which uses some sort of userconfig for settings from the workshop, there no way for the mod auther to have their userconfig setting placed in the right place automatically. Therefore, I try to check if the user has the needed settings file in their userconfig, if he does - great, let the mod use it. If he doesn't have the settings file, I fallback to the default one, located within the download workshopp mod.
Give me example content of the settings.hpp file please. Just a few lines
// Side of spawned units (west, east, independent, civ)
NEV_groupSide = west;
// Array of units to spawn as a group
NEV_group = ["rhsusf_usmc_marpat_wd_riflemanat", "rhsusf_usmc_marpat_wd_autorifleman_m249", "rhsusf_usmc_marpat_wd_rifleman", "rhsusf_usmc_marpat_wd_grenadier", "rhsusf_usmc_marpat_wd_squadleader"];
// The max distance from the player groups will be spawned at
NEV_maxDistance = 250; // Default is 325
// Note, the max distance must be higher than the min distance
// The min distance from the player groups will be spawn at
NEV_minDistance = 200; // Default is 250
Yeah
That's the whole thing.
just use call compile preprocessfile
But be aware that any user could put any script they want into your userconfig file and get it executed
I understand, thank you all.
Is more secure if the the contents of settings.hpp are used in a script, which is executed by a dialog button, and the dialog is opened by an addAction which is only added to an admin or an SP player?
who was the guy in here who wanted to make a company of heroes style RTS in arma?
he mentioned it like a month ago
It is kinda more secure but not really.
Most secure and easy way would probably be to store the variables as an array and parse it using parseSimpleArray instead of the whole file just being executed.
There is no secure way if you #include them or call compile them.
Always a way to abuse the system.
What about compileFinal?
same as compile
Ah.
compileFinal is pretty useless outside of caching functions in ui namespace
I think a lot of people are missing the point and think it's a magic security command or something
Meh, there is always someway to abuse it like you said.
Well, except if you parseSimpleArray it
There is no real way to have settings for addons in A3, which is why I made that CBA thing.
@little eagle which is always useful (cba)
Update soon. Then it will be useful!
didn't handleDamage EH ADD the amount to the existing Dmg, that it is passed?
no, set
Yeah i saw the stuff you had been changing on the cba github @little eagle
Is it possible that you can "remove" or hide the action to enter a certain vehicle for certain units / players only?
I think best you can do is kick them out every time they use the action
cause lock has global effects
Cuz someone was just telling me that he was NOT able to mount the F-22 was a russian the regular way
Hmmm, I guess thats basically it
Preventing entering vehicles without waiting for them to get in and then kick them out again
I would've probably just placed a == there for readibility and I've never really got what exitWith does. Yeah ik it does smth with exiting the current scope but that basically still doesnt help me understand it >_>
Please stay patient while my Arma 3 boots up
hmmm, interesting
Me trying to think code while being like super tired
exitWith ends the current scope and executes the codeblock instead if the condition is true. It's used with if instead of then.
unless:
waitUntil
No
or
wait
fml, i forgot
too late for me -.- i give up today.. silly HandleDamage.
In waitUntil it doesn't leave the scope, but still ends the iteration and the return value of the code block can be used as substitude of the one of waitUntil. Because fuck consistency.
Oh yeah, eventhandlers are broken with exitWith when used in the main scope.
that also, yeah (exitWith not usable to exit/leave current EH).
I think you can on the one hand go overboard using exitWith, especially when you introduce more exit points in your functions (complicated code), but on the other hand, you can save some indentations with it.
Oh yeah, Bananas. I do like Bananas.
๐
I'm so silly and tired it hurts. Attempted to use getCursorObjectParams then I realized http://i.imgur.com/k7MqfDn.png wrong branch
Orange is a hard colour to see sometimes
There, get an ๐
๐
๐
btw. any news to ๐ DLC?
What's the use case of getCursorObjectParams ? Outside of debugging.
Getting the geometry LOD for the new addAction optional selection thingy
So debugging.
C++
posngposfngaswdg
I would've called it newline, but no one asked me.
Wich is good
prolly
"Wich"
otherwise 90% of Arma would consist of Macros who lead to other Macros, within a Macro
Macroception basically?
just the other day in this channel i was saying how stupid a name endl is for a function
#define ASCII_NEWLINE 10
#define NEWLINE toString [ASCII_NEWLINE]
Worse, Mason
๐
BIS function naming conventions are totally fkn random
๐ซ ๐บ
inb4
count endl // 2 - Windows, 1 - Linux
How could i miss that?
https://community.bistudio.com/wiki/setVelocityModelSpace
use math you lazy bum
Yeah
Arma open source when ๐ฆ
Dream = Shattered
Open source arma would be pretty neat though
Am I the only one thinking it's weird that so far, there is no scripting possibility to change the height of a waypoint?
Every waypoint related command places it on the ground, pos 2D. EVERY SINGLE ONE OF THEM, except "move"
setWaypointPosition ignores z ?
yes ๐ฆ
idk if waypoints even work in 3d. That would only make sense for helis, no?
You can make the AI go to the upper floors
It can also define the diving depth
Helis and jets don't care about the WP height (they only care for distance2D) but they also have flyInHeight commands
So far only the "move" command placed the waypoint in the correct Z value resulting in the AI being able to go upstairs on the exact level and pos I was on
Waypoints are only 2D