#arma3_scripting
1 messages ยท Page 331 of 1
TBH I don't see why it shouldn't be allow. Yes, it's a shitty move, but we're not really hurting anyone by discussing it, are we?
Yes, you are. You've been made aware of the rules. It is non-negotiable.
it's their rules and you're using their chat server
untelo said "hex editor" + "google", i mean that's not exactly enough info to do much is it
actually if not done right, it causes gains ๐คฃ
@pliant stream Last warning
@open vigil I'm not negotiating or trying to change the rules. Aren't we allowed to discuss the Discord's rules?
Eh what did he do this time
Yeah don't blame @pliant stream, I asked it.
๐จ
Once again
Discussions about copy protection or copying, backing-up, hacking, cracking or reverse engineering of any of BI's products or the products of any other developer will not be tolerated and such discussions will be deleted immediately
Any continued discussion on the matter will not end well.
@open vigil so are we allowed to talking about this Discord's rules, or not?
Forum rules
Both, really.
You can discuss them with BI's legal team, Bohemia Beck or Dwarden., but not in a public format.
@open vigil care to explain the backing-up part?
Just another way of saying reversing I think
i'm selling atari cassette bootlegs, hmu if u interested
Some people take extracting mods or doing your own fixes to other peoples mods really badly and seriously. They have the delusion that they will "get famous" and their fame is being stolen or that they are losing something when these acts are taking place.
just don't discuss it and you won't be banned ๐
Somone else fixed my mod and reupped it? Well he will probobly get that job in video game industry that I always wanted. I want to include these mods in my portfolio.
I suggest strongly to not discuss it
lol what, that's totally different nigel
greed has no limits
I saw that thread about somones mod being extracted for learinng purposes without permission
Don't do it (talk about it)
It's best to just avoid trouble
Arma mods
Portfolio
delusions
I don't think any modder minds people de-pboing their work to learn from it. re-uploading someone else's work is 100% a dick move though.
Cookies! ๐ช Man #arma3_scripting somehow always goes offtopic ๐
not even in the same ball park as reverse engineering arma itself
that was quick
You will notice someone has left us.
Yes. sure, but think of it like this: You make some fun scripts for you and your friends to play with. You upload a mission with it to github/steam workshop. Somone from arma life steals your script and makes ~5k per month from arma life
Would you care about your scripts?
does it matter if the author cares? no
arma community standing up for IP rights and morals is pretty unique among games. we should encourage it.
#ip_rights_violations has hammered valve with more DMCAs than probably any other game i'd bet
Man, it's a matter of where you are from. I for one will never mind if someone takes assets or scripts I create and makes a few bucks off it. I don't care for money, but the majority does
release your work under MIT. done.
๐ต It's fun staying at the DMCA ๐ต
Yeah
Who else sang that in their head
anyway fadeMusic does it work?
99% sure
guys pls, we are way to on topic now ๐
I tried yesterday and used playMusic and then followed with fadeMusic 300; It blasted at the desired level for about half a second until it went back to normal volume
It's always worked fine for me. Maybe you need to define the time.
10 fadeMusic 0; // Fade out over 10 seconds
I tried with 0 and 10 and 100. I guess I have to try without mods today to see if it was a mod or mission that had something breaking it
@peak plover Using ACE?
Yes
ACE hearing resets fadeMusic on Intervals (every few seconds)
I think same with fadeSound
lol
@peak plover
Untelo banned ๐ฎ ?
Yep
Ever see those people that get pulled over for a traffic infraction and they say "yup, sorry about that, won't happen again" and they get off with a warning? Untelo was the one who got argumentative and ended up being tasered and handcuffed and had his car impounded.
Things could have been much easier, but nooooo.....
any one know the terrain object name for rocks on malden ? Rock, Rocks, Hide dont work
Also case sensitive?
"Land_Limestone_01_01_F",
"Land_Limestone_01_02_F",
"Land_Limestone_01_03_F",
"Land_Limestone_01_apart_F",
"Land_Limestone_01_erosion_F",
"Land_Limestone_01_monolith_F",
"Land_Limestone_01_spike_F",
"Land_Limestone_01_wallH_F",
"Land_Limestone_01_wallV_F"
awww did I miss some drama entertainment again? ๐ฆ
@peak plover https://github.com/acemod/ACE3/pull/5320
Just needs to be implemented via ACE Settings for merge
Hello,
If possible would any of you be able to help me, I need to pick which array is the one which has matches something which has come through as a parameter, then select that array to get the 3rd (2nd) element from the selected array.
Thanks in advance,
Dom
_plantsArray = [
["plant1",300,0],
["plant2",500,0],
["plant3",800,1]
];
_plant = _this select 0;
(_plantsArray select {_x select 0 == _plant}) params ["", "_one","_two"];
[_one, _two] // return
So that checks the first element in each array against the param'd plant
then spits out the other 2 elements
actually that won't work my bad lol ๐
typing on phone sucks
need to select 0 after the select {}
๐
(_plantsArray select {_x select 0 == _plant} select 0) params ["", "_one","_two"];
[_one, _two] // return
Mhhm?
should be good but like I said you'll return the cost and amount instead of only the amount like you first wanted
or w/e those numbers are
So just to confirm, that'll go down and check which param'd plant it matches up to, then pick that line, push out the remaining part of the array, then I can use that remaining part to do with whatever I want?
well almost, select is a filter which picks matching elements and returns a new array
in this case it would be nested, but it can still contain more than one element
if the first element isnt unique
so the 'remaining part of the array' as I said, would technically be a new array?
it doesn't modify the original array
it returns a new array with the elements of the original that returned true from the {} code part
the rest are gone so there's no remaining (only the original array)
So if it was 'plant1' for example, _one would beEqualTo 300?
yep
_plantsArray = [
["plant1",300,0],
["plant2",500,0],
["plant3",800,1]
];
_plant = _this select 0;
(_plantsArray select {_x select 0 == _plant} select 0) params ["_name", "_time","_illegal"];
hint format["%1",_name];
_plant setVariable ["growthTime",_time,false];
if (_illegal == 1) exitwith {
deleteVehicle _plant;
};
So that'd be OK?
And the return for plant1 would be growthTime being set as 300, and it not being deleted?
Yes
anyone got any experience dealing with https://community.bistudio.com/wiki/addScoreSide
ive tried trigger it on clients, server only and all , still cant get it to work on Dedicated
It would be easier if you stick to one channel.
Is it possible to include game files in the description.ext?
For example, if you want to base your own interface controls directly on the Base classes inside the game files rather than pulling the Base classes and defining them yourself in your missionfile
No, it will crash on a dedicated server unless the mission is unpacked. This is only for addon space files though. It works fine with files inside the mission folder.
It was broken around the time Eden came out and hasn't been fixed since.
Commy is talking about #include
I think you are talking about pulling classes from game config into missionConfig? Never tried that. I guess that won't work
But inheriting classes is not #include
Because I don't like defining those again and again in missions when I need dialogs, because they practically already exist
But you need to include them
Inside the missionfile, stuff like RscText is unknown
Yeah. Exactly. stuff like RscText is unknown that's what I meant by Never tried that. I guess that won't work
so yeah. #include is broken if you export pbo from Eden.
You can try packing the PBO yourself and see if that changes anything. Because afaik Eden exports are missing part of the pbo header
Yeah so because I know that isn't working, I asked whether I can include the game files, however that doesn't seem possible anymore atleast packed :P
Urgh
I assume it will be fixed when DayZ standalone goes release
Yeah guess I'll have to do it the old way then for now :/
I assume it will be fixed when DayZ standalone goes release best meme 2017
@still forum no, will not work at any given time
both config trees are completly different and to make it work, it would be required to either change the config system (by adding a real refer functionality) or by adding the mission config below the base config
Yeah that's what I thought with ever tried that. I guess that won't work
including game files should however work
Doesn't tho. (#include)
Broke in Eden update
Any way to make object emit sound?
is there a way to return the id of a open dialog?
Like in first mission of "Adapt" chapter, when you have to pick up radio that makes sound.
And now is next question: Can I add my own sound? e.g. custom music that will play from radio.
Sure
How?
See Wiki page of say3D or playSound
oh, ok, thx ๐
https://community.bistudio.com/wiki/playSound3D That's probably what you want though. And probably also easiest to use
Thanks! ๐
It works! ๐ Thanks again @still forum ๐
@peak plover yes
Great news ๐
while {true} do {
waituntil {sleep 0.1; servercommandavailable _serverCommand};
missionnamespace setvariable [_adminVar,player];
publicvariable _adminVar;
_respawn = player addeventhandler ["respawn",format ["%1 = _this select 0; publicvariable '%1';",_adminVar]];
waituntil {sleep 0.1; !servercommandavailable _serverCommand};
missionnamespace setvariable [_adminVar,objnull];
publicvariable _adminVar;
player removeeventhandler ["respawn",_respawn];
};
line 255 @functions_f_curator\Curator\fn_curatorRespawn.sqf
Infinte loop
im so triggered
But it does nothing for 99% of the time
Shock horror
A scheduled script runs for exactly 3ms before it is put in suspension to be resumed on the next frame
so why does the 3ms thingy matter here?
I'm more worried about it taking up a scheduler thread and periodically checking for the waitUntil condition instead of just setting a eventhandler that removed the respawn EH again. But that EH doesn't exist sadly
servercommandavailable event wud be nice
adminStateChanged you mean. CBA could add that in their custom eventhandlers but that would waste time every frame
Yeah well tbh it's silly. It's marginal difference, but still.
@still forum Scripts with infinite loops or waituntils just add additional time to the scheduler
20 scripts that only do waituntil equal 20*3ms of waiting time
Each script unscheduled has 3ms runtime
before its suspended and then the next script gets 3ms
runs for 3ms at max != 3ms runtime
Yes
But a waituntil with a condition that doesnt become true so quickly takes up 3ms, everytime
until the condition is met
No.
It doesn't.
when a waituntil condition is not met the script get's suspended immediately. That's why it's WAITuntil.
Same as Sleep and uiSleep do
Is there any documentation on whether waituntil only evaluates once per timeframe or as often as it can?
no. But I as the guy that writes such documentation can tell you it evaluates once per frame (If the script even get's scheduled. Which doesn't happen if it hits the 3ms limit before it get's to the script)
Also Each script unscheduled has 3ms runtime is also wrong
still wrong
The scheduler runs as many Scripts as it can until it detects that it ran for over 3ms
If only one script takes up these 3ms then no other scheduled scripts will execute that frame
300 scripts that take 0.1 ms is still 30ms
yes.
only 30 of these scripts would execute that frame
and the next 30 the next frame. and so one
and after 10 frames it starts from the first script again
And if you have < 10 fps any sleep 0.1 would sleep for more than 0.1 seconds because even if the sleep is over that script won't get executed until there is space in the scheduler. Which is why you shouldn't use sleep as a reliably way to measure time
So the scheduler only executes 3ms per frame in total?
yes
or less if there is less work
if a waitUntil condition is false that script is considered done for the current frame. And won't be executed till the next frame
And we are actually talking rendered picture frames?
yes
What's the reason this system was put in in the first place?
I mean.. I don't see a reason why there couldnt be a different management solution
So that if you run thousands of demanding scripts you can't hurt the FPS
what different solution would you choose?
Ohh that's still bad, because it won't hurt the fps, but a script that would normally take 10 seconds, takes 60
I personally find this sentence quite confusing then A scheduled script runs for exactly 3ms before it is put in suspension to be resumed on the next frame, again for another 3ms and so on until the script is finished. The paragraph is only slightly hinting at the fact that all scheduled scripts have a total execution time of 3ms, it actually sounded like each script has 3ms, hence my confusion.
yeah true. Quite bad .. writing
Well, learned another thing about this crap ๐
It's really not that great when you can't really rely on the wiki providing sufficient information but rather have to fall into a trap to be taught the correct
All scheduled scripts can run for a maximum of 3ms in a frame. Each Script that runs add's up to the total runtime and as soon as the total runtime of 3ms is reached the current script is paused and the Game continues calculating everything else it needs to calculate that frame. On the next frame the scheduler again starts to run Scripts for 3ms. Starting with the script which hasn't been executed for the longest time.
is that better?
Gimme the wiki link please and I'll edit that
is there a way to check if a missile has been launched (lock on) to the target (air vehicle)?
fired eventhandler probably. But that would need to be added on the guy launching the missle
@still forum sorry to tag your specifically, but do you know if the IncomingMissile eventhandler will work?
no never tried
What does "["<spawn>","",true,1]" mean in diag_activeSQFScripts? Trying to debug serverside lag issues, and seeing a whole bunch of these, dozens.
Just wondering because if its a spawn in a script, it would usually say which script, but this is blank.
not sure, but guessing it would do that if you do [] spawn { some big loop }
if not, maybe event handlers or something
Yeah probably, cheers
How can I add my own scroll wheel action? Like I want to shut down smartphone which is playing music.
Thanks xD
Was there a recent update to the text dialog controls, I'm having sudden problems with them having a weird font and size?
@hasty pond Yes, it broke in the latest Arma 3 Hotfix.
They're aware of it but it hasn't been fixed yet
is there a way to order the units to turn out if they are in armored vehicle?
Set them to safe or careless
@warm gorge any workaround as of yet?
Not that I know of
Alright, thanks!
np
Is there a feedback tracker thing open for it? Tried to find it but couldn't.. ๐
Interested, I haven't encountered any issues with dialogs after the hotfix.
Have you not noticed map markers text off-centre and weird looking?
Has anyone used the new RscControlsTable yet? Theres like absolutely no documention oni t
@warm gorge nope.
@warm gorge Lecks is right. But spawned scripts can only run for 3ms per frame. So it's probably not the issue if you have lags.
You should try running profiling branch on your server and do real profiling although that's a bit more advanced
Yeah I think I might give that a go, profiling branch that is. Not entirely easy determining whats causing server lag from just diag_activeSQFScriptss
Because activeSQFScripts only tells you the cause of 3ms of every frame. But at 50 fps serverside every frame is 20ms long
How would i go if i want to get every map object if near from trees to lamps to walls to bushes to buildings and fences in a range of 5meter ๐ is there something?thats where im at atm: _Objects = ( nearestObjects[player, [] 5]);
jesus... thanks commy2 ๐
why do they make nearestObject and nearestTerrainObjects? ๐
nearestObjects is from A2 and it reports objects belonging to the mission and not the map / terrain.
hmm ๐
They complement each other.
Because objects and terrain objects are a different category in the engine. That's why there are two commands
I must be doing something stupid wrong. Can someone help me to find out why ArmA doesnt think that this becomes a string?
'info': {
'serverName': '" + serverName + "',
'worldName': '" + worldName + "',
'worldSize': " + (str worldSize) + ",
'serverFPS': " + (str diag_fps) + ",
'missionName': '" + missionName + "',
'uptime': " + (str round diag_tickTime) + ",
'playersIngame': " + (count allPlayers) + "
'gameVersion': " + (productVersion select 2) + ",
'gameBuild': " + (productVersion select 3) + ",
'gameBranch': '" + (productVersion select 4) + "',
'OS': '" + (productVersion select 6) + "',
'architecture': '" + (productVersion select 7) + "
}
}"```
try to use format?
hm, that could work, i will try it, thank you
missing a comma after " + (count allPlayers) + "?
true, but that comma shouldnt matter because it is in a string. i will try that tomorrow
ahh
Why?
Json doesn't need newlines anyway.
quick question about this // <params> spawn fnc_someScriptedFunction; <params> remoteExec ["fnc_someScriptedFunction", targets, JIP];
assuming targets = 0, if i have fnc_someScriptedFunction defined locally but other clients don't, will it work?
locally as in on the machine but in mission scope
idk but I guess:
wiki says - "functionName: String - function or command name.
While any function can be used, only commands and functions defined in CfgRemoteExec will be executed."
because those function has to be defined in description.ext - CfgRemoteExec class it should be known by all clients because description.ext is the same everywhere,
But you could transfer the code itself to clients and then clients don't need a known function.
just look at Revo's note bout revealing:
[_desired_object, {player reveal _this}] remoteExec ["call", 0];
so u can do:
[<params>, {yourCodeHere}] remoteExec ["spawn", 0];
this will work for sure, i used it already in this way. But it is a bad manner because it causes much network traffic. It's better to define the function on each client.
is there a diffrent way to check if something is equiped or in inventory? instead of using if("item" in assignedItems player)
yes
and the solution is ?
if ("item" in (items player)) then
and does it then check in inventory or everywhere?
"everywhere" ?
hmm...
What exactly are you trying to check for
because if("item" in assignedItems player) does not recognize TFAR items....
Don't be shy... you can tell us
assignedItems only reports what's in the GPS / Watch / radio / map / compass slot
and you probably want radio slot for TFAR. What exactly are you trying to do
I don't think it reports what's in the NVG slot despite that being a item that can be used with assignItem iirc.
the tf_fadak is in the Radio slot but it does not get detected....
Keep in mind that in is case sensitive.
tf_fadak is not in the Radio slot
This is how TFR detects all the short range radios on the player
o.O sure it is its a short range 5km range radio that goes into the slot
it get's automatically replaced by a Radio with ID. That's why checking for classname doesn't get you results
BOOM^
you have tf_fadak_17 or tf_fadak_35 in the slot. not tf_fadak
so i need to find the numbers or do they switch ?
ok so i need to use the TFAR function to check then
yes
What you can also do is
what nigel posted
TFAR_fnc_activeSwRadio returns the classname of the Radio that's currently in the Radio slot
do you only want to check if player has a Radio or if it's a fadak?
doesnt realy matter ๐
Sooo.. what?
(call TFAR_fnc_activeSwRadio) select [0, count "tf_fadak"] isEqualTo "tf_fadak" that should work
get's the radio. cuts of everything after the 8th character and compares that
but that may error if the player doesn't have any radio :u
hmmm...
nil by default for activeSwRadio
because then TFAR_fnc_activeSwRadio returns nil. But.. That gives you a Idea
TFAR should be how VOIP works in arma ...sadly it doesnt ^^
No. The Arma solution should be better
with checks for AI so if ur talking in their range ai recognizes that ๐
TFR 1.0 has an optional pbo which does that
TFAR already has that
but Arma not
what's wrong with arma's von?
The new VON sounds pretty decent
no Radio frequenzes and sometimes the quality of the range is weird in TFAR u can change between the range with wisper normal and loud ๐
is VON 3D sound any good?
same goes for most ace things they made so clever stuff like the shovel and the sandbags and all these little things and i would say the most realistic sniping in a video game
The real question is, could you use aritculate to the point that the AI would intercept your communications and understand what you are planning
No.
And not everyone want's ACE like realism
Wants*
in a way siri understands u and directions and other words gets detected ๐
the REAL question is if the AI would do something close to what you wanted even if they fully understood
"ok google" works really well as well. I'm not a native english speaker and google knows what I'm talking about all the time
๐
oneoh, I want enemy AI to be like "ok found enemy radio 15 m, east." and then they pick up my teammates radio and listen to where we are going and ambush us
Maybe in arma 4
AI disobey even if you script them specific instructions sometimes ๐
Ohh yeah, that they do. Mostly because combat state
sometimes they are quiet "simple" minded ๐
Took me like months to figure out autocombat and enableAttack
hopefully one day arma AI is good...that way we could make proper CQC missions and we won't need SWAT 5 cos we could just make it in arma
and on other days they shoot you when u want to sneak up on them and one way shooting under and through a container
Ok, so you guys go walk to that town. Just straight to it... What? Umm, you want to split up and just go into the forest and take like forever?
not that arma AI is "bad" now...just looks bad close up
I think the arma ai is pretty incredible
High command is still hella fun to use and there's plenty the ai does for the scale and complexity of the game
But there are some basic things that seem to be kind of missing from the base game
Like shooting some guys and then 300m later there are soem guys who don't even seem to care
i saw a pretty cool gamemode where someone made a Commander and counquer with arma 3 where u watch from above and controll ai looked pretty nice ๐
yeah sadly they hold back DayZ Standalone...
There's players that play the game for what it is. And then there's people that hang out here, the people who break the barriers and do whatever they want, however they want
Well, DAYZ is in development, allowing people to mod and edit it at it's current development state would be bad for everyone
as everythign is changing and there are new things every update. Mods would break every week
When they release a full project, modding would be nice, yeah
i would disable the zombies tbo ๐
the animals ok but not zombies ...idk ๐
the "hype" is over ๐
When mods come out sure
i think exile would be quiet at the top then if they make it for dayz sa
soo AI still can't drive on most bridges in tanoa https://feedback.bistudio.com/T124620 - anyone have a workaround? thought about trigger area on either side to setPosATL across?
If #dev_rc_branch I guess ๐BIS_fnc_addStackedEventHandler no longer supported (on dev branch, at the moment), why are they fixing issues related to it?
~~From the last changelog: ```
Fixed: The BIS_fnc_addStackedEventHandler function did not accept object argument or function name
Fixed: The BIS_fnc_addStackedEventHandler function was missing some native parameters, such as _pos in onMapSingleClick
Wasn't there a script command that the cars would drive like slalom with?
@peak plover that's the default AI behavior ๐
follow path something
If the ArmA AI is bad, which game has better AI?
quick question, is || the same as or?
Yes
@random estuary yes
thx, had a brain fart ๐
the next big step could be maschine learning AI or something, but i think its hard to massively improve the current AI
a "urban behavior toggle" or script command sounds easy, but ArmA AI has to be able to work with all types of modded houses, objects, terrains, etc... that makes it very hard for Bohemia i think
Well
There are different military doctorines and drills for dealing with combat
I've been using suppressFor
Works on my machine
You should be looking at real life combat and then try to come close to that instead
You want AI that metagames?
what is with https://community.bistudio.com/wiki/commandSuppressiveFire ?
@boreal edge It's the same as selecting an ai unit and holding ALT and selecting [suppress] from the command menu
That command does not always even work when using the command menu
lol @peak plover that slalom was crazy. gonna test setDriveOnPath later
See, I'd liek too see advanced movement and things that are used in real military things like bounding overwatch
But you see a lot of it comes down to the mission / situation that you are in
There are a lot of commands that you can use to customize your ai to fit your situation / mission
That's realy what arma does, it delivers a platform.
See, if they didn't do that
I think they could have had a lot more special AI configuerations
pre-made in the game
Platform is the reason they put effort into functions / commands supporting modders etc.
There is NO other platform like this, it's not an excuse it's definately something to brag about
Can't do this shit in battlefield or call of duty
It would be nice if ace3 filled this modular/configuratable AI hole that arma has 'tho
Yes
What issue did you have with ai?
So, you want
No flanking
or advanced flanking
For example
Ahh, well this would take TONS of time
But you could write a script that takes in factors like
Ohh man this wold be heavy on the engine, but you can check if the ai is in open
If it gets engaged you can determine the direction of the enemy that has been spotted and determine if there is any cover
Yes
SQF will be slow and it will take a lot of processing power
Hmm, yeah
Would be great to get like a backdoor straight to the engine and do shit to process the ai and find out what's what
Yeah, also different training levels for ai would be nice, like less trained units from 3rd world armies would shoot from hip and not use cover correctly
Different animations, different rates of fire
Well, I still feel like there are no other games where I can be like, this ai did something stupid, how do I change this.
Like shooting at some guys and having enemies 500m away not giving a fuck
have you guys figured it out yet?
Ohh yeah, there are so many variables to take into account and so many things
Yeah, it really is a shame they have not added more ai things, with zeus or 3den
And yeah you are completly correct
When doing the ai stuff, it eats a lot of performance
Was that with your cop thing?
There are still some tiny improvements
But nothing REAL
Yes, but it shows that some tiny things are still being used
But looking at the DLC way of things
It seems that they take an area of the game and improve it whenever a dlc is coming, like jets/tanks etc.
There is no AI dlc
So yeah, like you said, it will never happen
Nope
arma AI still kind of sucks overall I think
Doubbt it
authentic military gameplay, which makes the best use of our sandbox
The ai that they want is already in their sandbox
manglement doesn't want to touch the legacy code
hoping there is a much more extensible interface to the engine someday
or the new engine or whatever
how about they just source-available it?
๐
when games really, truly want modders to do their thing, they slap the code on github
Intercept is not enough for you?
Ideally you'd want a way to change the different moduels of the engine, like change parts of the ai.
intercept won't help really with ai
haven't had a chance to look at intercept closely yet
they let you select a custom memory allocator which is kind of weird
are there even any others?
I can't really think of any advantages to using intercept for ai
They don't let you select a custom memory allocator.
yeah they do, or they used to
One of the Intercept guys is writing a Zombie AI FSM in Intercept
they don't now and they never did.
Screenshot inbound lol
How would you benefit from intercept? You still have to gather information from the sqf
This is the memory allocator startparameter setting thingy
that's not intercept
0% connected to Intercept
I never said it was connected to intercept
just standard arma launcher params
haven't had a chance to look at intercept closely yet
they let you select a custom memory allocator which is kind of weird
that's rather confusing then ^
ye
But what's the deal with that? Is there any info on the API that your allocator has to provide?
Intercept can also gather position data without SQF. In Parallel/multithreading. And Positioning is quite important for AI. But yeah, Intercept is only faster SQF besides that position thingy
Yes
What kind of information does intercept have access to? Didn't know it can get position without sqf
That's the only thing it can get besides sqf.
Well. No. It can also list every file in all the loaded pbos. Which is probably not useful for most people
anything is possible in theory with enough effort ๐
stop talking about that
not allowed to chat about that here
there we go
better
anyone tested allMissionObjects "#crateronvehicle" recently? it's allways empty for me, I'd expect to find hits on walls / buildings / vehicles here.
I just analyze the game through human-computer psychic communication
works every time though
I think it's the crater on the ground under a crashed vehicle
not bullet holes on walls and stuff. Because that's something completly different
Crash a plane into the ground and test it. It should return the crater the plane created as it drilled itself into the ground
impacts on the ground are #crater and work just fine. It's for an old script that used #crateronvehicle to detect hits on a target. so it has worked before ...
What would a crater on a vehicle look like?
the bullet hit decal
a big dent from a projectile
*it was used on a wooden sign and was no dent but a black dot.
a decal is not really a object
sry I don't know why it worked before but stopped.
#crateronvehicle was mentioned several times to be the way to detect the hit position.
Started with arma 2 and I guess it is just outdated with the hitpart events.
i was stuck
for an hour
because a command is missing from biki's script commands page
and it also doesnt have its own page
amazing.
the only place it was documented is here
i never knew about this page. and i think this is the first non pornographic hyper text page i've seen that gave me a boner.
What command
Sound exclusive limite edition to me
@mortal halo this is some serious sqf-porn, i think half of the channel isn't even allowed to see this ๐
is there any workaround for the drawback mentioned in the comments? https://community.bistudio.com/wiki/ctrlSetBackgroundColor
in short. i need to change a button's color on the fly. so far no bueno ๐ฆ
Use two button controls and hide the one you don't want.
honestly, i never use buttons.
man
yea i should just make my own buttons. this is stupid
enabled rsctext is the best thing, you use onMouseButtonDown
that gives you so much info
@commy i don't wat to make button configs. so i'll need a way to change hte button's color either way
can't use onMouseButtonDown must be MouseButtonDown if it's a ui event handler
depends where you put it - in the config or event handler
but yeah eventhandlers omit the on prefix
all good guys. i know the difference
if it's an event handler than it can't have the on prefix
thx for the quick confirmation that arma has no way to change button colors. expected ๐
^^
benson - use enabled rsctext. im currently making a new inventory system from scratch and buttons are out of the questions. rsctext is honestly all you need.
or more likely - mousebuttondown is all you need
how do you mean "enabled"? you mean RscActiveText?
no
im not sure if this can be done by config, but in script you can go _ctrl ctrlEnable BOOL
enabling a control basically lets the user interact with it
ah k. thx
so you can use the mouse event handlers
just do note you don't enable ALL controls.
if you enable a background gui element for example if a user clicks on it - it goes to the top of the ui - therefore covering the other elements
as a general rule of thumb - enabled controls should only be controls at the top of the ui ( no other element is above them )
You sound too excited about this, Yuval.
He, nice.
once dwarden makes me a biki acc im gonna fucking note the whole UI sections
literally been sitting for hours trying to understand why wont my eventhandlers work
why would my game crash on controls deletion
why some commands are missing
got everything figured out haha!
have you tried scripting control groups?
im pretty sure the whole 'make control groups a functioning part of scripts' was skipped
ah cool. useful info. thx for that. should prevent some predetermined headaches
yeah, if anything doesnt work ask
have you tried scripting control groups?
https://github.com/CBATeam/CBA_A3/blob/master/addons/settings/gui.hpp
https://github.com/CBATeam/CBA_A3/blob/master/addons/settings/gui_createMenu.sqf
I've written all of this ^
deleting controls inside a group control crashes the game
also, deleting a group control all together crashes the game
most frustrating shit ever sitting infront of my pc for 2 hours figuring out, one systemChat "hi" after another why the game crashes with memory addresses all over the screen
im UI god damn hardened. and now i need to get back to my listboxes
good luck everybody and happy hunting
yeah, i took a few PPC flights in the last couple of days - been good relaxation
haha i was just gonna say. you sound like me when i had way too much coffee
@mortal halo so how do i center the text like on a button? i used RscStructuredText to be able to center it horizontally but vertically it's still at the very top. which makes sense. so i'm guessing there is no way to set the style of a control in some way? ๐ฆ
good question. i haven't got into that. i think there is a way to do it (not using style= for sure)
I keep seeing people using a center style. I'm pretty sure you can just get half of the width and height and set the position there.
nah halfing the scales makes it a quarter of the original
when scripting UI with SQF
you need to adapt yourself to the concept of making alot of elements
@polar folio
now what I'd do is I'd make 2 elements
one background and one text
adjust the pos and w/h of your text element so it will be vertically centered
now there might be a config solution for this
or search supportInfo / the magic biki page i've found for commands
- red commands (commands with no page) are the most interesting
there are alot of ways to go with this
i've once made a complete library of UI functions for this very purpose
encapsulating ui elements inside eachother
grouping them and moving them collectively (yeah, it was 6 months ago and i didnt know anything of control groups... AND I SHOULDNT!!!)
it's not documented in anyway except some really minor comments at the top of every file so.. if i ever go on releasing it - i'd have to document it better cuz i keep all the documentation as a single string variable in my head
it's really time consuming but go ahead and make a couple of functions of your own
such as [CTRL1, CTRL2,MARGIN] call ui_encapsulate
essentially you put CTRL2 inside CTRL1 with a margin
so you get a nice rectangle inside a rectangle
now everytime you wanna have it set, you use this function
going back to the original suggestion,
do not be afraid of using more than one element for your stuff. the worst case scenario is you throw those two elements into a controls group and add mouseenter mouseexit eventhandlers to the group
or to the backmost background element
i went with structured text starting with a line break for now, which is totally fine for my purposes. but thx for the taking the time to write a detailed response. i mgiht use this for other stuff
@mortal halo acidentally spike your coffee with something ? ๐
dude i had a cup of coke 3 hours ago
he's on fire!
thats all caffaine consumed today
understand the amount of frustration behind that excitement
please do try.
(help me)
lol don't shine too bright. you'll burn out fast
@mortal halo use relative values isntead of grid and there is no such thing
yeah well if you have w / h only, the element will be 1/4
gl hf
ty
onto some other kind of stuff
im looking for a way to build a large array of container items
these shall include all items, equipment
magazines with the amount of bullets in them
weapons with all attachments + magazines (also amount of bullets in them)
is there a simple way?
Run X39, Commy might be around ๐
automation is the way to go
using the BI functions for exporting the equip of VirtualArsenal is useful
what would he want to do @subtle ore? flame around like usual?
@queen cargo Who knows, may be worse this time ๐
i don't think there's an easy way. but i haven't touched that stuff in a while. there might be some new fancy commands. to my knowledge you might even have to have some invis dummy unit pick stuff out of the box so you can get all the data. not sure you can get bullet count for example from inside a box
yeah well virtual arsenal doesnt save the mags (as in bullet count for each of them)
and it's too large scale
im looking for specific containers
so i could input backpackContainer player
but also groundweaponholder
and also zemek truck
it needs to be a very generalized function that deals with any and all possible containers
@mortal halo isKindOf "Ammobox_F" versus isKindOf "Truck" ?
lemme explain better
say i put my MX with a 25/30 mag inside my backpack
and i run my function on the backpack container
then i put it inside an ammobox
and run it
it will result the same, and keep all the information
if you put a weapon with a 25/30 mag inside your backpack, export and import in the arsenal
the mag will be 30/30
same for just putting a 25/30 mag inside the backpack
Maybe write something to keep mag progress, even if it is a headache and just runs a fire event and sets progress that way
meh i guess i'll try do it myself brb
Yuval, you crack me up real badly. Lol
yeah well heres the deal
so you have weaponsItemsCargo that is basically just what I need weapons wisely (array with all weapons and their attachments / mags with bullet count)
now for actual magazines in the container theres magazinesAmmo and magazinesAmmoCargo
and i cant damn tell the difference
Well I would assume Cargo has a dynamic target and magazinesAmmo is strictly for the player?
well no
both take vehicle
and when used with backpackContainer both bring up the same array (checked with isEqualTo)
well maybe one is old ๐คท
yeah both are from arma 3
one is like 0.7x
other is 1.2x
in arma 3 versions
what i suspect is one function also includes ammo reloaded into the vehicle
if it has guns which i dont want
well didn't you say that both returns the same values?
well for my backpack
now that i put my mags in a vehicle
seems i was right
magazinesAmmo is for the ammo loaded into the vehicle
magazinesAmmoCargo is for the container
so cargo is my go
I swear they had a different command for ammo loaded in a vehicle, very strange.
nvm
Return Value: Object
say i have a unit
and i have a vehicle
i am using nearSupplies to access their containers
how would i differ from one to another
for me, they both could be a vehicle or a unit
if(cookieContainer isKindOf "ReammoBox_F") exitWith {hint "It's a cookie jar!"};
Not sure what you mean.
lemme ask that again, and also add another condition
say i initiate a nearsupply
how do i differ between a unit, a dead body and a vehicle/ammobox (treat them the same)
now that's tough
obviously, alive is to differ between a unit and a corpse
so that kinda minimizes it to is it a unit or a vehicle
if((alive _x) && (_x isKindOf "ReammoBox_F")) exitwith {hint "alive and a ammo box"};
and a vehicle is an ammobox?
No, that's just returning the vehicles parents. Think of how it's sort of identified I suppose
all the vanilla ammoboxes have that same parent name
the thing is
the HEMTT ammo has a unique and specific parent called B_Truck_01_mover_F
i have 2 categories here : Unit/corpse | GroundWeaponHolder/Vehicle/Ammobox
would it make the difference here
Well, how are they assorted?. Because I can do something like this: [["Closed",Closed"],["Open"]]
a one dimmensional array
[man, dead, car, groundweaponholder,us_ammo]
basically the return of nearSupplies
if(_x isKindOf "Man") exitWith {//not valid supply source};
wait what
hold on
ok
GREAT
now
i'd have to deal with units / agents seperately
because an agent's container is different
but for now
theres unit/corpse
and there's vehicle/groundweaponholder/ammobox
from the top of your head
would you say
this is categorized enough in order to search inside the containers? the categorizing is done due to the fact players dont have items directly on them but rather on their backpack/vest/uniform containers
Sure, all you really have to do is make sure you're now selecting everything but the players or whatnot.
oh damn
one more thing i forgot
see when you deal with dead bodies and groundweaponholders
there's SimulatedWeaponHolders
i see them spawning on the corpse
i have no idea what they are
they're to place the player's items in
what do you mean by that
essentially the corpse's inventory. Otherwise, you just have the lifeless body with nothing else. The ground weapon holder stores the dead player's weapons so other players can pick them up
Anyone know how I could hide the ammo count on the top right of the screen (the unitinfo box) like ACE does it, but without ACE?
@tardy yacht look at the biki's info on the description.ext : https://community.bistudio.com/wiki/Description.ext with the showHUD parameter. You can specify which elements you want and do not.
yeah disableHUD
showHUD
but you see @subtle ore the copses body is already there, as the dead unit
ontop of it, there's the weapon holder
simulated
@mortal halo Yep, once again. The weapon holder holds the dead unit's weapons.
damn i see
essentially when you go inventory on the body, the weaponholders' stuff are included
but they aren't part of that body?
Yep
I've looked into this already, I want to keep the actual element, I just want to grab the control that shows the bullet count and set its fade to 1 or just delete it. The weapon name, firing mode and all information excluding the current mag's bullet count should remain.
@tardy yacht look in the config viewer for the weapon information display
@mortal halo Don't know what to tell you. Are you running mods?
wouldn't make sense since that's the point of the weapon holder is to hold the unit's weapons.
well
objectparent on both returns objnull
BUT
weaponCargo returns the MX on both of the containers
getweaponcargo and weaponsItemsCargo only returns the MX on the weaponholder
gg bohemia
gives me a headache
me to
i have to wake up in less than 5 hours
i guess im gonna have to deal with it tomorrow
anyway man, thanks!
you've gave me alot of help here..
understanding how this mechanic work
for that i give you a cookie out of the cookie jar midnight addweapon (((weaponsItemsCargo cookieContainer) select 0) select 0)
good night
I think I've found it. Although I can't seem to affect it in any way. I've tried deleting it, setting its fade (and committing), setting its position (committing again) but nothing seems to change. For reference, I think it should be control #184 in display #300.
Thanks for the suggestion but it's not working. Can the control somehow be forced on screen and ACE are somehow over-writting through their mod?
@tardy yacht yes of course, why didn't you mention ace was loaded. They have a ui module so you can disable and enable ui elements
ACE is not loaded, I'm trying to emulate its behavior. At least the hiding ammo count part.
@tardy yacht (findDisplay 46) closeDisplay (yourIDCNumberHere);
It's not a Control though
Oh, I thought he was talking about the weapon information in general.
yeah
ctrlEnable
yep
ctrlEnable only enables / disable user interaction
i dont think it is an enabled control
ctrlShow doesn't seem to exist.
but it does
Hold on now, take a chill pill.
try control ctrlShow false
idc: Number - control ID
generally try to stick to controls rather idcs when doing ctrl* operators
first param in ctrlEnable
ctrlShow [idc, bool];
unless you can grab that weapon counter as a control rather than an idc I wan't to know
yes ofcourse
shoot
I just did that, both return no error but I see no progress on screen.
Oh, well. No challenge here my friend. My brain must've been off the track here, totally forgot about that.
With IDC and with actual control.
listen
when you use ctrlShow [idc, bool]
you use it for dialogs
this is no dialog
this is a display
what's the point of closeDisplay then?
a dialog is unique. only one exists at a time
display is part of the ui
like
actual hud for example
Oh my god, I'm stupid.
idc is just a control id inside a display
but
you have tons of diaplays
displays*
so..
Yep.
its like going to a crowded area yelling "Jack come here"
there are alot of jacks
see?
Yes yes, I was not thinking that through.
_ctrl = ((findDisplay 300) displayCtrl 184);
_ctrl ctrlSetFade 1;
_ctrl ctrlCommit 0;
dialog is like one level under mutual assured destruction kind of bad
I have the actual control, it just won;t do anything.
how about settextcolor to red
I'll try that
Nope
well
either make sure saving = 0 in description ext or disableSerialization at the tope of the code
I'll try and analyze ACE's way of doing it, but their stuff is way too advanced for me.
yep disableSerialization
i hate saving so for me saving is off all the time
Yeah it pisses me off too
Wait a minute
saving =0; ftw
yeah
I'm in an unsaved map in the editor, could that be fucking up my attempts?
Debug
init line? consol
oh
yeah
dont
do that
for so many reasons
init.sqf
addaction
whatever
Eeeekkkkkk, addAction why not jsut run it locally initPlayerLocal then go from there?
because its an editor map
it has no other context than running local and spawning rabbits
Don't forget the souless goats
Never.
and its better for everybody
no
goats are bad
we have snakes
and rabbits
mamie
im giving up sleep hours come on resultsssss
I'm trying that right now with the addAction thing
init or desc
Goat_random_F
๐ฆ
yeah
Tuna_F
Lol, okay.
@mortal halo http://imgur.com/a/jj87K
Still doesn't work the addAction way.
๐
Thanks for the help dude I'll keep you updated.
Maybe stupid question but I try to understand:
In wiki (https://community.bistudio.com/wiki/Scheduler#Where_code_starts_scheduled) u find the information that code starts scheduled from
-init.sqf
-initServer.sqf
-initPlayerLocal.sqf
-initPlayerServer.sqf
and also
-code execution with call from a scheduled environment
assuming this is all true. I can't imagine how to start something unscheduled in a script (preinit scripts excepted).
Most (nearly all) scripts I write have there execution origin in on of those init.scripts and these are in a scheduled environment. If I call a script from scheduled e. then the called one is in scheduled e. as well.
What do I miss here? I can't see how to do it unscheduled.
what is the basic process for adding a new type of ammunition that can be used with a weapon?
can you even make a new ammo type for an arbitrary gun that you didn't make yourself?
with configs yeah
Although, mod makers will definatley not like that
For vanillia there should not be a problem
why won't they like it?
Because all the fame and praise you will get off their work will make them mad
That's what some of them think atleast
I'm going to make ammo types for personal use on my machine. They are gonna have to find a way to cope lol
You should message mod makers and ask them, since they are also not one concious hivemind, but every mod maker has a personality of their own
What I do on my machine is none of their business
Yes, that's good.
Do I need to decompile the weapons into the .pbo's (or whatever files they start as) or do these configs exist in plaintext somewhere?
Some mods like 3cb, have some kind of encryption on their files so you gotta figure out the classnames
that's no problem
@peak plover I dont get that. what has function library to do with it? it's just another way (the better one) to compile. It shouldn't change anything with code execution.
There shoudl be a config viewer in-game as well, but if you can extract the .pbo and use binarized (arma 3 tools on steam) to unbinarize the .bin
config.bin into config.cpp
What's the better way to compile?
it's kind of funky that they use encryption though, i've seen tons of mod makers rip weapons from other games
TBH sounds like a nice challenge
I had an issue with the 3cb mods that I could have probobly solved myself, whenever I had 3cb mods loaded, some guns made no sound when they were fired on remote clients with single fire mode
configs aren't "encrypted" they are binarized and can be de-binarized
Clearly a config fuck up on 3cb part, but I could not do anything about it because they closed up .pbos
No, you can't even extract the 3cb pbos
yeah, the standard bin-debin process is fine, that's how arma workd. But if they go further it's kind of lame
*works
too bad that encryption will come down to a single point where the key is loaded into memory and used
oh I see that's probably Mikero's tools at work ๐ฆ
Yeah, what a bunch of nerds, considering they didn't even make all the assets themselves
all you need to do is use your computer telepathy to find that exact point and transfer the key to your mind for future use ๐
I'm glad my teachers thought me about the goodiness of open source, etc. Scripting would be so much more difficult for beginners if all code was kept to only the makers. If no one shared and everyone was competing, if there were paid mods this would suck ass
you can just export the configs from inside A3 though
If you want money for your time, make something else. Mods are supposed to be free, not paid/sold
oh can you?
that makes it even more funny
they use their cute little encryption, only to have arma promptly decrypt it and make it available
I should do more arma modding. I've currently done none
If you want to make money/fame you can make a unreal engine game now, so modding should be left to free people who don't make money off it.
Config viewer should appear in 3den editor
UE4 is glorious