#arma3_scripting
1 messages · Page 394 of 1
@meager granite everything only deltes next frame.
deleteVehicle only set's a toDelete flag. Had a lot of fun with that as deleted eventhandler might fire more than one frame before the thing is actually deleted.
And placing units in Zeus calls the deleted eventhandler but.. you are creating the units and they never become objNull although deleted is called
Not true. deleteLocation happens in the same frame.
deleteVehicle != deleteLocation
Yep. You said everything.
squint
everything only deltes next frame.
Oh... Meh.. 3 hours of sleep apparently not enough
https://community.bistudio.com/wiki/BIS_fnc_initLeaflet Can someone help me? simple situation. I want to fire trigger after player read the leaflet. Do someone see some solution? thanks
How do you read it? Walk up to it and press a button?
this addEventHandler ["killed",{playSound ["Play257C", true];}] how do i make that only the killer hear this sound?
Again with the unit inits?
if(unitInitGarbage) exitWith
{
hintSilent format["Don't do it, not even once %1",name player];
};
Naming a vehicle bis_functions_mainscope and playing in MP, huh.
Sounds fun... I guess
Throwing a monkey wrench into the system and to observe what happens is always fun.
Thanks for the tip Dedmen
That wasn't just a tip that was the solution ^^
Sure 😃
Hello, I only found this really dirty solution to test if a map object is a rock :
(_objects select 0) in nearestTerrainObjects [player, ["Rock"], 20];
Any better idea ?
umpf... I'd say no... Maybe you can get something from it's config class
How ? typeof and iskindof are not working on map objects 😦
Ouh.. That's a no then 😄
x) thanks @still forum 😃
I'm having an issue with a script on an OnLoad eventhandler in a custom dialog. Within the script I want to change the value of a listbox, the code I use is: ((findDisplay 10212) displayCtrl 1400) lbSetCurSel 2; This works if I set this as the action = in the config on a button, but it doesn't work in the script. Anyone have a clue what is wrong here?
findDisplay can only access displays after they are created. onLoad is too soon. Just use params ["_display"]; instead to retrieve it.
would anyone help me make a simple script
server should start locked, and after 5 minutes unlock (as my mission is having trouble if you join too early)
I think it will have to boil down to you fixing the mission so it does work from the start.
yeah but im making new mission or editing very soon so its just a temporary fix
Sounds like a locality issue for scripts maybe?
have you tried not running all code on all clients?
i havent im not really good at coding D:
but i tried putting password on server and waiting for the mission to be at playing, and after that i could join
but is there a way to start the server locked and then unlock it after 5 minutes for a temp fix
Not that I know of.
Yes
#lock and #unlock i know but im not sure how i should make it be locked as the first thing that happends in the mission really
_isOK = "MyServerCommandPassword" serverCommand "#lock";
apparently it's a viable example so it should work
hmnmm yeah i guess, but would i place it in the init.sqf?
You should run that as soon as mission is loaded, @little eagle how is that new lobby coming along?
Run serverCommand #lock
https://i.imgur.com/mFCCiqk.jpg
_group = ["Group 1", west] call Lobby_fnc_createGroup;
["Unit 1", _group] call Lobby_fnc_createSlot;
["Unit 2", _group] call Lobby_fnc_createSlot;
["Unit 3", _group] call Lobby_fnc_createSlot;
_group = ["Group 2", west] call Lobby_fnc_createGroup;
...
So that people can't slot up, but mission loads instantly
that way a soon as 1 person is in
it will run the init scripts
after a slight delay
ohhh right, but people need the slot selection its for a life server
I absolutely hate how I use arrays and synch them for every created slot, so I will have to redo the internals completely and I'll probably reimplement cba hash just to get this to work with reasonable looking code and avoid all mod dependencies.
You can also delete the slots.
And groups.
Sure, that is all details. One has to get the underlying system itself to work.
ok wait so, in the mission folder, init.sqf i added this
serverCommand #lock
[] spawn {sleep 300; serverCommand #unlock};
would that possible work? lock the server and after 5 minutes unlock?
do it on initserver
You need the password syntax I believe.
aight hold on
if you do it on init. it will lock every time someon logs
And it's either "unlock" or "#unlock", but not without quote marks.
Whats is the condition to check if AI is NOT a member of any player group?
aight, so i added it to the initServer like this:
serverCommand #lock
[] spawn {sleep 300; serverCommand "#unlock"};
should work?
!(_unit in units player)
?
Same thing about the quote marks with #lock.
And I still believe you need the server password syntax.
if ((allplayers arrayintersect (units _unit)) isEqualTo []) then {
hint 'unit is not in a playergroup';
};
maybe?
That looks great.
I'm trying to add new setting to ACE medical so the AI uncounciusness can be set to afect only player squad or player side
@little eagle ill try that if it doesnt work
Ok, now if I want to set int only for a player side, its it an MP scenario, then what would happen if there were player on all sides? The condition would have to be "if unit is NOT on a side where there are players". Hopefully it would make it work well in any combination, if say players were in co-op only on one side, on BLUFOR and OPFOR (INDFOR is just AI), or playrs in any and all factions.
Hey guys I want to understand the AI behaviour and combat stances, how they behave when in careless, safe, aware, combat, stealth and when set to never fire, hold fire - defend only, hold fire - engage at will, fire at will, fire at will - engage at will. And all its variations like when they on foot, when on vehicle etc... can anyone explain me / point me to the proper documentation for that?
if ((allplayers arrayintersect (side _unit)) isEqualTo [])
Would this work as a condition?
Anyone know of any references for how to make use of the custom user controls in Arma? I saw something about UserActionGroups but I couldn't find much info on it.
What is side_unit ?
Sorry, I forgot the space
Nah, arrayIntersect needs an array on both sides, not a SIDE.
hey guys, if I want to crate a display which works like a additional thing to the hud, like a money bar or something, how can I do this? (I know how to create display but not how to make them unclickable and such)
Don't. Use the mission display (46) and add controls to it instead.
In editor there is GUI editor AFAIK
That's by far the easiest method.
Even if it's rarely used, because people rather copy paste what others cooked up.
@peak plover you are dripping
so how can I check if an AI is not on a side where there are any players?
allPlayers select {side _x == side player}
something like that
Just get all players on that side. And if the array is empty then there are no players on that side
Makes sense to me.
hmm, I'm not sure this is correct, but then again I cannot script at all 😛
{side group _x == side group _unit} count allPlayers == 0
You should probably learn it though. It's really not that hard if you understand basic logic and don't apply it to everything BI does.
playableSlotsNumber side group _unit == 0
Probably closer to what you need.
Yeah, tried few times, but I just can't wrap my around scripting. I can understand the logic, but I just have no idea how to make stuff the way I want
switch(sqf) do
{
case "Broken" :
{
if(random 1 > 0.5) then
{
true
} else {
false
};
};
};
then {true} else {false}
Working out how to do stuff is often just searching around in the scripting command listing. After a while you have the basics of SQF itself in your head and a list of the common commands and capabilities and you get a better idea of what you can find and where. When I start a project I often spend time looking for what the API can give me and what it can't
btw
call {
if () exitWith {};
if () exitWith {};
if () exitWith {};
};
is a faster than
switch () do {
case () : {};
};
Switch is slow af
There is no magic to learning a new language other than doing stuff in it and gradually leanring more and more. You have to spend time trying to write stuff and time just exploring the things you don't know
@peak plover The if statements look like absolute shit
if 💩 then 🚾
if()exitWith{};```
Nu uh, I disagree
I dislike the logic of exitWith as most other languages would give us an explicit return or exit command, it doesn't allow you to have the logic the way around that is best for readability all the time.
Ever looked at scopeName and breakOut?
if ( 1 > random 2)
THEN {
cancer =
true;
};
It is what it is though, sqf is weird in a lot of ways coming from other languages. Being productive in it is a bigger bug bear honestly as its slow to write and test due to game restarts.
Candle, look at scopeName + breakOut.
@tough abyss Bigger bug bear, using that from now on
breakout is just like break
in sqf exitwith depends on what you do, is it a loop? is it a 💩
💩
What is enfushion using as its scripting language?
Enscript
english script
aka Enforce or how it was called
I really hope it's mostly english this time
They have tiny bits of code pieces release from dayz
Take a look for yourself
http://lystic.net/dayzwiki/
^
If they kept sqs for so long, then sqf will definitely be part of A4.
nah
Welll
All the sqf stuff was removed in Enfusion already (coming with 0.63 iirc)
They did keep ak's m16's humvees and hinds since ofp, but removed in a3
I'm glad it's going to be gone
NOTE: "Loaded" event handler should be added BEFORE the mission is loaded from save. Placing it in a function with preInit = 1; usually does the trick.
i dont get that, can some one give a exemple?
class PLUGIN {
class init {
file = QPLUGIN_PATHFILES;
class setParams {postInit = 1;};
class postInit {postInit = 1;};
class spawnUnits {};
};
change postinit to preInit = 1;
The note is absolute bs.
Obviously the one who wrote it doesn't understand how savegames work at all.
How do they work?
nigel, were i put that?
They work in a way where you can use Loaded everywhere, not necessarily preInit.
In your functions library
And preInit is not executed when loading a savegame.
Ahh
It's not what he wants. He wants an eh for the loading screen, not for resuming a savegame.
The note means that if it's not in preinit, it will load the function when you first play it and re-load when you load save
So that could cause double units to spawn
it is atually to resume a save game
The note means that if it's not in preinit, it will load the function when you first play it and re-load when you load save
No, loaded will never execute unless you load the savegame.
Ohh, right
becasue i have a problem that the mussic does not play when loading a save game, so i was trying to fix that with a EH
If you put it somewhere which runs after the game is loaded from save it won't even be processed
Well then I was wrong and loaded is exactly what you need. Sorry.
so it kinda makes sense?
No, it doesn't nigel.
So you adde the code to the EH, it will only run if it's added. If it's not added it will not run
Savegames carry over all mission/ object eventhandlers, global variables and scripts that didn't disable serialization.
that's not how EHs work
No need to add Loaded after the game was loaded from save once.
Would mean that the thing runs twice the second time you load.
[] spawn {
sleep 600;
>>addeventhandler loaded<<
};
//save game
now when I load the game I won't get code from EH
people! PEOPLE WOULD DO THAT
Ha
🤖
No one can save the game before postInit or any reasonable init.sqf
So it's no concern.
He probably needs to restart a new game from scratch and not load it, because the saved mission he's testing on still uses the old scripts.
Therefore no loaded event.
I've never used saves so a serious question
I spawned a loop to play music.
saved game
Does that script 'threaad' save?
when I load will it continue loop?
The loop will continue, unless you used disableSerialization.
Which is what the command is used for.
Ohh
That's.... opened up an idea
disable serilization vs sterilization, which is faster?
private _script = 0 spawn {
disableSerialization;
sleep 100000;
};
_script spawn {
waitUntil {scriptDone _this};
hint "loaded save!";
};
I gueses this is single player only?
disableSerialization
Wait... nvm
I can save mp games.
MP hosted games also have saves for the host, but it completely breaks stuff. E.g. clientOwner will no longer be 2 for the server.
That's why god(jay crowe) invented profilenamsepace. So I can save my game in mp
I gotta test the speed for disableSerilization 'tho
urg, sorry nigel, i did not get that, there is a better step by step to this?
Hmm I don't know because I assume music does not save? Did you try if your loop continues 'tho?
I assume your song is in a loop lik every few mintues it restarts?
Wait until it should restart and see if that works
i mean the code you give me
class init {
file = QPLUGIN_PATHFILES;
class setParams {postInit = 1;};
class postInit {postInit = 1;};
class spawnUnits {};
};```
Is there a gridview control in arma 3? like can i have multiple columns in one listbox?
What do you mean by multiple rows?
@astral tendon thats from the function library https://community.bistudio.com/wiki/Functions_Library_(Arma_3)
You can define functions to run in postinit or preinit there
nevermind, i decide to chagne order of saving to save before the handle starts
So i know that
[_this] joinSilent createGroup INDEPENDENT;
changes a units factions to independent
but how can I do it for the entire group?
ForEach?
wat if i want to change a single group
forEach.
Oh, even better.
units _group join createGroup INDEPENDENT;
join already can take more than one unit.
@jovial ivy i mean colums sry :D
flawless @little eagle
I try.
💩
😦
👁 👄 👁
The #arma3_scripting face
wheres the nose
you stole it!
does the nose know?
💯 👌🏿 👌🏿🇲 🇸
👁 👃 👁
👄
it doesnt, but use ||
if ((typeOf _x) isEqualTo "O_V_Soldier_JTAC_ghex_F" || ((typeOf _x) isEqualTo "CAA_CIS_magnadroid_E5")) then
{
What ever my code is gona be im lazt to type it i cant spell
}
``` So this is valid
yup
if ((typeOf _x) isEqualTo "O_V_Soldier_JTAC_ghex_F" || ({(typeOf _x) isEqualTo "CAA_CIS_magnadroid_E5")}) then {
extra pro
Hold my beer.
I wish i had a blue name and putting extra characters in front of your name to raise your spot in the list was a bannable offsense
if (typeOf _x in ["O_V_Soldier_JTAC_ghex_F", "CAA_CIS_magnadroid_E5"]) then {
then i'd be first 😦
If .Ghost can do it, so can I.
But.. Case sensitivity :x
He used isEqulTo, but I agree. Coding with case sensitive strings is a bad idea.
how do you check if a unit is in any player group?
I'm having a deja vu.
Yeah, the stuff I was editing before wasn't the thing that kept hostile AI alive
in ACE
But the answers we gave are still true.
turns out its the revive settings
I think you can scroll back on your own. :/
!((allplayers arrayintersect (units _unit)) isEqualTo [])
previously it was a check to see if the AI was NOT in any player group, this time I need to go other way, to check if the AI actually IS in any player group
would adding "!" to "((allplayers arrayintersect (units _unit)) isEqualTo [])" give me this result?
Yes.
At least read https://community.bistudio.com/wiki/Operators and https://community.bistudio.com/wiki/Control_Structures. They are better generally than what you'll get out of a chat. Everyone here assumes one knows how this works.
I know how the ! works more or less, I was just asking if there wasn't any weird combination with the condition itself. I assume that "(!((allplayers arrayintersect (units _unit)) isEqualTo []))" returns either true or false, right?
Yes.
The lowest priority command including after applying the parenthesis is isEqualTo and that reports a boolean.
The last command.
Can I plop a switch&case stack into an IF condition?
so some of the cases return true and some return false
and the overall condition will use that
Use a helper variable for that.
private _isX = false;
switch (blah) do {
case {...};
case {...; _isX = true};
};
if (_isX) then {
switch (_enableUncon) do {
case 1 {_isX = true;};
case 2 {_isX = true; };
case 3 {_isX = false; };
};
if (((_reviveVal == 1 && {[_unit] call EFUNC(common,isPlayer)} || _reviveVal == 2)) && !_force && _isX) then {```
dosen't matter now, got it working
You don't need the _isX = false; part.
Inside the switch I mean.
And rename it to something reasonable.
You will thank me later.
!((allplayers arrayintersect (units _unit)) isEqualTo []) did the job
Is there any way to spawn a grenade and blow it up? Similar to smoke grenades maybe?
Exactly the same as a smoke grenade.
Alrighty.
How can I embed a script in an addon so I can call it into whatever mission I want?
No.
😦
@astral tendon I think you rename the group in the editor that will be used for radio protocol
@little eagle I mean like adding the script to the game script library thing/whatever, not a function, so I can call it with stuff like this:
dummy = [this, units (group this)] execVM "scripts\automedic.sqf";
Yes. You do that by making an init function.
I want to add this auto medic script (compatible with ACE revive) so I can use it in any mission
https://forums.bistudio.com/forums/topic/165907-automated-medic/?do=findComment&comment=2899886
If it's for ace, then you might as well use xeh though:
class Extended_PreInit_EventHandlers {
class Taro_init {
init = "execVM 'scripts\init.sqf'";
};
};
Less verbose.
Pretty good, it still leaves the issue with units that join you after mission start, or ones you recruit.
However that is a less of an issue
oh, maybe a CBA button to re-designate everyone as medic, but it still leaves the issue of taking up a keybind
maybe I should add a new ACE menu action for that
Dunno, up to you. Could also be a setting.
Edited it, because that script obviously wouldn't work.
was wondering it someone could help me with some technical keywords so i can do some wiki/web searches. trying to setup a popup dialog that players will see and have to click accept when they join a public server. (to display rules ts info etc)
@thorn saffron That only chage the group call sigh, on the group chat they still being called by the number, on the Team chat by the group and a number
Oh you mean the names of soldiers
@little eagle Sadly due to how the script is set up, it throws an error when loading a map in editor if its on auto initialization
@little eagle did you add the . so that you're on top of the list? 😁
To troll Dscha, who apparently trolls back now.
lol
@little eagle Me? Trolling? never
I think I figured out a pretty neat solution to that automedic script thing: I think I would be able to add a new keybind with would let player call out for medic. The script would look for a closest friendly unit and the have it act as the automedic (move to player heal).
hmm, but this wouldn't solve the issue of medic not healing other soldiers
anyone know which file i could run a script in, so the script is ran before the mission even loads?
like at the part where the mission says setting up
Before the mission loads? I don't think that is possible.
ugh, cause the script i got working only locks the missing after the setting up part, which is the point of it D:
to be locked when its setting up 😮
You mean the briefing?
uhh i guess, yeah
i need the server to start locked, then unlock which works but it locks first when the mission is at playing
You should instead look into fixing your mission so it works from the start. I told you this before.
Yes, but im changing mission soon to altislife 5.0 but for now i need this to work :/
can i put a password on the server, and remove it in sqf?
What has that to do with anything? Fix the mission. A mission that doesn't work for 5 minutes is really really bad.
.
Not acceptable.
Cause i dont know how i would fix it
You can use serverCommand to lock / unlock server
i am
but its locking first at playing state
and if people join at setting up the server crashes
I'm out of this. My suggestion is ctrl+A , del.
Unbelievable that people cooked up something so bad.
Life ¯_(ツ)_/¯
can just tell me is it possible to remove the servers password once its started
does #unlock do that
Nope
Fix the code causing your server to crash, you can add code to kick players off server if they join to fast (before its locked)
If you want to lock server faster, you will need to use 3rd party rcon application to lock via rcon
List of rcon stuff @ https://community.bistudio.com/wiki/Multiplayer_Server_Commands
@little eagle before the mission loads __EVAL in description.ext
limited but.. In theory it's a script
I wonder if that could lock it.
But seriously. How crappy has your mod to be that it breaks the server for 5!!! minutes. xD
@tough abyss thanks, what code to kick players off if they join to fast?
crappy
very crappy
thats why im changing to altis 5.0 asap
I don't even know how one could manage to do that.
Commy:
Life
I blame excessive (>0) use of the scheduler.
That whole thing is a clusterfk
Simplest method is a publicvariable user gets kicked for.
Or remoteexec killing the main display i think works awell.
Or exile method is loop through kicking all the player slots via servercommand, after locking server
Few different ways of doing it
aight thank you
would this work? in the description.ext
__EVAL("password" serverCommand "");
woops i forgot #lock in the cmomand but u know
test it out and see
aight thanks
but wait wouldnt this be risky to have in missionfile too cause people can download it and get the command password
aight then, what if i put it in lifeserver and executed the script from the description.ext int he eval
Just execute from your server code in some init sqf file, ideally whatever is started sooner
But would like to know if EVAL method works, but not ideal for security reasons
but then it would still lock it after the setting up?
So you unlock it afterwards
@tough abyss Don't know if you ever found what you were looking for, but check out this page for the reference to dialogs that should prove very useful https://community.bistudio.com/wiki/Dialog_Control
im looking at trying to edit certain animation speeds within the ace mod any ideas?
Anyone know where this file "\bin\dikCodes.h" is in the arma directory, if it is in there at all?
@limpid pewter UI pbo
No idea where that is. I found core.pbo, bin.pbo and languagecore_f.pbo under the steamapps\common\Arma 3\Dta\ directory. With regards to the arma folder in steam apps, do you know where it is?
ahh yep, i found ui_f.pbo, ui_f.pbo and ui_f_exp.pbo. Thanks OPTiX and Dedmen
Is there any reason this would behave differently when hosted instead of ran on a singleplayer editor mission? https://github.com/DylanSMR/A3BaseWars/blob/master/functions/SQL/fn_getPlayerData.sqf - extDB3 seems to be returning a empty array, or [1, []] as in there was an error, Even though it runs fine on singleplayer. (Im hosting the server locally so extDB3 addon shouldn't be an issue)
Switch out the dll with the debug version & check extDB3 logs to see what commands you are sending it & what its returning
Also check your not running the sqf code on clients etc
Alrighty, i’ll test it out in the morn.
Hi, what command makes AI units go through walls (for easier path-finding)?
I think that is in some cases default behavior
try setDestination with LEADER DIRECT
Interesting
Any tips on how to best handle when a player presses ESC while in a menu? Atm i have an onUnload EH that will destroy the camera (The menu needs the camera as a backdrop) when the menu closes. The problem with this method is that it will also destroy the camera if i open up a small sub-menu off of that origianl menu (because it technically was unloaded i guess).
So if anyone has anyone experience with this sortof this can you tell me how you have/would go about it.
does that menu have a close button?
Attach an keyhandler to it (the display) and then handle escape in that handler.
onKeyDown eventhandler.
not needed
yes, but if they don't press the close button, but rather press ESC it will cause the bug that i don't want
It's sort of user error handlign i guess
shortcuts[]= {"0x01"}; in the close button class
yeah, it's a bit of a pain that it closes menus by default
If you disable the ESC key while in a menu, then you can't exit that game : (
@lone glade onKeyDown handles escape very well. How do you mean its kind of special in that regard?
display eh key down? Wonuldn't that stop if you close the display?
It would.
You are thinking of onUnload
@rotund cypress onUnload is what i am using atm
What is the purpose? What are you trying to do exactly?
nigel, i have tried that method too, and without a sleep statement in it, it will not reopen the menu
you have to spawn it
@rotund cypress Read the original post
old code incoming
hmm... maybe will try that if this doesn't work
_force = missionNamespace getVariable ['BRM_insurgency_respawn_force',false];
if (_force) then {
if !([player,true] call BRM_insurgency_respawn_fnc_evaluateRespawnTime) then {
[] spawn {
//uiSleep 1;
createdialog "RscInsurgencyRespawn";
};
worked when I spawned it
Oh use createDisplay @limpid pewter
If you do not want the original display to unLoad
_parentDisplay createDisplay "newDisplayClass"
thefuck is that horror nigel
^^
old code but I had a simliar issue
@peak plover tbh, that just don't seem to have anything todo with his issue.
macro
wtf?
in general ignore nigel
I wanted display to close only if the display was allowed to be closed
wow , bit mean XD
Pressing escape does nto close the display
yeah i get what you're trying to do
Hope scripting that is called.
I did try this before but never with a sleep statement
hm..
Otherwise it won't create it because it already exists or sth
yeah
not needed to spawn it
Heheh, new thread which doesn't need suspension. @peak plover
it just needs to be executed the next frame
sssure
There is always better solutions to making a new thread or putting a random sleep.
[{[_this select 0, _this select 1] call FUNC(openBox)}, [_target, _player]] call CBA_fnc_execNextFrame; I use this for ACE Arsenal through ACE interactions
@lone glade That shortcut thing worked as you said it would thanks
Can someone send a link to CBA_fnc_execNextFrame, I am quite curious on that function.
I don't use CBA so not really familiar with their folder structure.
niether
@peak plover I was just looking for that google tutorial thing haha.
Anyways @limpid pewter try createDisplay instead. It might solve your problem.
IIRC it wont unload the parent display
I take that back, it will not unload parent display.
nope it won't
Yeah thanks for all the tips. Will need to use a combination i think, the setup i have is a bit funky.
it's because you create the child on the same frame and the parent is tasked for deletion
A funky language requires funky solutions.
^
Funky and reckless are two different things though, keep that in mind.
In one situtation i want it to close on ESC and the other i don't. Like i said a bit weird. Thanks everyone
doesn't matter how you do it, it has to be on the next frame (or after)
just testing now
doesn't matter how you do it, it has to be on the next frame (or after)
if not using createDisplay, correct?
@lone glade
Yes, but it would not unload the previous display
yes it would 😄
It works 👌
i'm fairly sure you can't delete and create a display on the same frame
That i am not sure of, but I know that if you create a display on the game display, obviously it wouldn't unload the game display.
Maybe if you are creating them at the same frame.
nope it wouldn't, but I had that issue with the ACE interaction display when creating the arsenal one
and they are not linked in any way
Cannot really comment on that since I don't use it.
ACE Arsenal hasn't been release 😄 it's tasked for 3.12.0
I don't use CBA or ACE at all.
That's in test already with st NVG?
👍🏿
you NEED to use createDisplay on the next frame
I even tried with createDialog, same issue
createDialog will unload previous display though IIRC
Neither, in one situation the menu jsut closed, the other i close the current one and opened a new one with createDialog
Again it's funky.
that's not the issue here, he's trying to create a UI element on the same frame an other one is deleted
Can you not create 2 different elements on the same frame as well?
I remember the game crashing when doing that alganthe.
yeah, same here
altho it also simply didn't create the new UI element in some cases for me
better than crashing but worse than working I guess
Also neither createDialog nor createDisplay unload anything. That's false.
createDisplay does hide the parent display though.
nah
That's the point.
it depends actually, I have to hide the parent in ACE Arsenal's case
Anyway it works now. I didn't end up needing any createDisplays,CBA_fnc_execNextFrame's ,etc... Just executes code to destroy camera on the condition that certain buttons haven't been pressed and willnot destroy camera if those buttons were pressed,etc... Simple, not elegant, but works
3DEN display -> hides
Game UI -> doesn't hide
Arsenal display after loading the loadouts display -> doesn't hide
By game ui, do you mean RscDisplayMission?
all the HUD elements
The RscUnitInfo thingies?
yeah
shrug
Guys, Laws of War map objects are available to everyone right?
If it's on map people can still connect, yes?
I though apex items are now on all clients?
LOW should be, because it's just like (((karts))) everyone gets it. But not sure
What does that mean commy
apex
the top or highest part of something, especially one forming a point.
Low is bottom is the opposite of top.
well...it's the opposite of "high"...
Ohh no
not the code!
When writing a dll extension, is the working directory the root of the server's directory? So say I was writing to a file, I would write to say: logs\log_file.log
What would you guys say is the best way to lock doors for a certain playerside only?
Buildings or vehicles? If buildings:
_numberofdoors = getNumber(configFile >> "CfgVehicles" >> (typeOf _building) >> "numberOfDoors");
...
for "_i" from 1 to _numberOfDoors do {
_building animate [format["door_%1_rot",_i],0];
_building setVariable [format["bis_disabled_Door_%1",_i],1];
};
and if you want it for all players, do _building setVariable [format["bis_disabled_Door_%1",_i],1,true];
oh crap, playerside ^^ not player sorry there. but you should be able to adjust
Yeah I know how to disable doors.
I know how to disable it for playersides as well, but I am thinking what best way of doing it for one playerside would be.
How reliable is Unit capture and Unit play is in a coop scenario wtih 4 players in?
I don't trust it. Not sure
I've had problems even in sp
What are you trying to do?
In my mission the truck we are riding is followed by 2 tecnicals and we are in the back shooting
wile in SP its seens to work fine, i try to test it in MP with 2 armas open, my PC lagged like hell
so the shooting on the back was verry akward
"2 armas open"
yes, so i imagine that unit capture depends allot on the host PC to run well
than a AI actually driving
but you know how relible AI is for drivng...
Also, i got to test with 2 Armas because i need to be the host and the client, so i know the effects.
ABOUT LEAFLETS. To exec something after object is inspected: [missionNamespace,"objectInspected",{ hint "exec whatever you
need"}] call bis_fnc_addScriptedEventHandler; for example put this code to inspected object init field.
hello 22:27:03 Message ID without message 22:27:03 Message ID without message 22:27:03 Message ID without message 22:27:03 Message ID without message 22:27:03 Message ID without message 22:27:03 Message ID without message 22:27:03 Message ID without message
what problem ?
Message ID doesn't have a message
and 22:26:44 Server: Network message 5950972 is pending 22:26:44 Server: Network message 5950972 is pending 22:26:44 Server: Network message 5950972 is pending 22:26:44 Server: Network message 5950972 is pending 22:26:44 Server: Network message 5950973 is pending 22:26:44 Server: Network message 5950973 is pending 22:26:44 Server: Network message 5950973 is pending 22:26:44 Server: Network message 5950973 is pending 22:26:44 Server: Network message 5950974 is pending 22:26:44 Server: Network message 5950974 is pending
The Network message is pending.
😄
sounds like wrong basic.cfg settings
how to fix it?
Use the right basic.cfg settings
MaxMsgSend=2048; //MaxSizeGuaranteed=64; //MaxSizeNonguaranteed=64; MinBandwidth=16384000; MaxBandwidth=73886080; MinErrorToSend=0.001; //MinErrorToSendNear=0.04; MaxCustomFileSize=0; 3D_Performance=93750; Resolution_W=0; Resolution_H=0; Resolution_Bpp=32; Windowed=0; adapter=-1;
You should leave everything on Default and not mess with it if you have no Idea what you are doing
my basic.cfg
Take it to #server_admins
But delete it and allow the engine to determine proper settings.
If you have issues you can manually work with it.
I'm trying to fix a left shoulder weapon mod/script. I get this error when putting on a shoulder. The line bellow is reported as the source of the error
player setUnitTrait ["loadCoef", (player getUnitTrait "loadCoef") + _mass];
This is what RPT has to say on this matter:
sleep>
21:18:24 Error position: <getUnitTrait "loadCoef") + _mass];
sleep>
21:18:24 Error Foreign error: Unknown enum value: "loadCoef"
21:18:24 File AALSSW\aalssw_fnc_leftWeapon.sqf, line 75```
Odd, I checked the BIki and loadCoef is something that exist, with leads me to believe that the script is doing something goofy
it's not an error
it's just a message telling you BI fucked up, it's fixed on the dev branch / perf branch
it's not the origin of your issue
Well, I'll just comment out the line then, it will stop it from breaking the inventory weight
Hey guys, thanks for the help in this discord, another one of my missions is done.
http://steamcommunity.com/sharedfiles/filedetails/?id=1232220978
@lone glade Not really, it breaks the weight bar in the inventory
nope, it doesn't, I can 100% assure you that error doesn't do that
Hi, how to prevent AI units from going through the walls?
You can't.
Good job @astral tendon
a = "Land_Pier_F" createVehicle [0,0,0];
a setposasl [0,0,50];
player setposasl (a modelToWorld[0,0,8]);
d=0;
f=0.001;
onEachFrame{
a setVectorUp[d,0,1];
d=d+f;
if ((abs d)>1)then{f=f*-1};
hintSilent str d;
};
With this you can walk on air
Is this a new problem?
Or even intended?
I think the incremental increase is small enough to where it feels natural
You have to execute it and move around to understand what I mean 😉
It created a pier below me, and when I walked off the pier, I fell and died.
[_foreman] remoteExec ["SCAR_UCM_fnc_addActionRequestMaterials", 0, _foreman]; is my understanding correct that this will be executed on every JIP client that connects, as long as _foreman is still there?
If you trust in our overlords and their wiki.
lol
ok, my question is what happens if a player leaves the game, chooses another slot and reconnects
still run?
nope
who's the owner of that AI?
server
then it'll keep working
it’s there in mission on game start
ok
that’s what i expect but i am seeing issues. trying to tackle why this does not work.
might be related to something else.
So if locality changes for JIP target, then it breaks?
It shouldn't.
^ as he said
Then why it matter who is the owner?
It doesn't.
Tbh, the description is very strange on the wiki.
Object or Group or netId - The persistent execution of the given remoteExec statement will be attached to the given Object or Group, passed directly by reference or by their netId: _netId = "this is my car" remoteExec ["hint", 0, car]; or _netId = "this is my car" remoteExec ["hint", 0, netId car];Upon success, the command will return netId of the used Object or Group or netId. When Object or Group is deleted and becomes objNull or grpNull, the persistent remoteExec statement is automatically removed from JIP queue. Manual removal of the JIP statement could be done by passing either Object, Group or netId as usual:remoteExec ["", car]; or remoteExec ["", netId car];When JIP param is String in format "Number:Number", the string will be tested first whether or not it is the valid netId of an existing Object or Group, and if not the execution will be aborted, if yes, that Object or Group will be used to set persistent execution.
Seriously. I have no idea what they're talking about.
you know what, it's probably because the punctuation is fucking terrible in that block of text
Doesn't help, yes.
To be honest, I am quite skeptic about the system. Reading the part you link to .commy2 suggest the system is very fragile. You can attach the "execution" to an object or group. And you can cancel it by passing "". So you can only have one JIP entry for an object.
So if addons, or scripts, try to do more than one thing with the same object it breaks?
This doc was written on friday afternoon. I can tell.
Hey guys, I currently have a bug within my mission, and my mission is quite large so it could be a lot of things. Here is the issue: sometimes players get bugged out, they cannot scrollwheel on things, for example cant scroll in / out of map, cant scroll on actions (addAction) etc. Does anyone here have any clues of what this can be? I know this can be a hundred different things but maybe someone has any ideas.
dialog issues ?
Then how do the stack work:
if I do:
[data] remoteExecCall ["myFunc", 0, ObjX]
[data2] remoteExecCall ["myFunc2", 0, ObjX]
[] remoteExecCall ["", 0, ObjX]
And what if I leave out the last line.
you use different IDs
So what you say is I can use a string as a key as long as it does not match "Number:Number", like "jip_123" and "jip_124". For objects, e.g. Blufor 1-4 are automatically coerced into say "1:4" as the key?
id is the differentiator to remove a jip stack
damn, the more I think about it the more I prefer CBA EHs
To me it is all just a mess. If I use a non-netid string, it will not be attached to the object. Then the JIP ticket will remain forever, and I have to manually do a check in the callback to see if the object is still around. And for a group target, what will be a mess since they might be recycled.
And if I do use a direct object target, I risk collision with other mods/scripts.
Unless I misunderstand.
it's half finished
i'm fairly sure remoteExec setting mode 1 is still broken
aka transforms the jip stack into a spamfest for everyone else that isn't the JIP player
"Mode 1"?
What is a good way to transfer data between a client and the server without remoteExec?
setVariable public and publicVariable
I still use CBA-style event handler for logic, regardless of the underlying command to transport.
BIS_fnc_MP taps forehead
But the client might still need to be told to act on those variables at a specific time and that would require a remoteExec?
nope
I suppose it could use looping and waiting for a variable to change
what
publicVariableEventHandler
Though I did recently switch the underlying command from publicVariable to remoteExecCall because publicVariable sendings were no longer being broadcast. If anything I would have thought it the other way around. (at least in my particular scenario - no idea what would block it)
Ah. Good thing to know
I regularly see people on the forum and github making claims that remoteExecCall is much more efficient than publicVariable(Client). But don't see why, the same efficiency could then be implemented for publicVariable* commands. So I treat it as unsubstantiated.
It's newer, so it must be better, right?
also remoteExecCall is just a 100% this is gonna run unscheduled variant of remoteExec
they were made at the same time 😄
No, they were not.
I have an extdb3 problem if anyone can help. Trying to run a simple query to ge the name of a player (which I saved in the players table). I'm using youpala's API https://bitbucket.org/torndeco/extdb3/issues/69/set-of-functions-used-to-handle-extdb3-api and instead of the name returned I get [[any]] if there is a space in the name I get an error from the API itself.
No, but I'll do that now and see if I get anything
i'm faiiirly sure they got added by the same patch, 1.48 or 1.50 can't remember
oooh, I thought you mean remoteExec and remoteExecCall
Reading comprehension.
😄
:facepalm:
🍪 🥛
🥗
:empty-bottle: 😦
🍻
@lone glade how do you mean dialog issueS?
💳 🍺 @errant jasper
as in a dialog not being closed is blocking the scrollwheel
@subtle ore Remind of the Simpsons, where Homer wants peanuts, but only have 20 dollars, and his mind intervenes and explains he can trade money for goods or services, including peanuts.
Unfortunately most is closed, and I am in a foreign country.
@errant jasper Hey everything here is still open. It may arrive in two weeks lol. Where do you buy 20 bucks worth of peanuts?
@subtle ore Dunno, the same place you buy 2 bucks worth of peanuts. Do it ten times 😃
@errant jasper LOL. Usually it'll only be a pack for me. Homer must've loved his peanuts. I tried paying for breakfast at a place in dimes before (12 bucks) and the lady gave me a strange look
@subtle ore He just wanted one. Dunno if you may post videos here, but it is youtube ID: dgct3Jn8pFA
I buy tissues in bulk, same for anything that has a super long shelf life
just saves you trips to hell
Tried running it in debug mode @commy2 and doesn't appear to be anything out of the ordinary on the extdb3 side. I can only assume it's either a problem with the API I'm using or I'm passing incorrect arguments. Do you know why it's giving me returns in this format: "extDB3: Output to Server: [1,[[Numair Fogel]]]"
@little eagle
Isn't that correct?
I assume so. I don't know what the 1 means though, the name is
I don't know either.
0=ERRO, 1 = OK, 2=Multi Message (you can ignore that, it should be handled by your sqf code)
The issue is your returned result isn't wrapped in quotations, so when arma call compile / parseSimpleArray its going to be null
Depending on if you are using SQL or SQL_CUSTOM different ways to fix it
I assume I can just fix it by inserting it with quotes in the sqf, using SQL
Most likely some full screen one as well
What are you storing in the database ? Player name?
yes
Change the datatype to varchar and it should automatically get quotations added to it.
Assuming you are using SQL with TEXT/TEXT2 option https://bitbucket.org/torndeco/extdb3/wiki/extDB3 - SQL
The idea with SQL Protocol, you store strings in VARCHAR & arrays etc in TEXT datatype (Its basically legacy method)
If you use SQL_CUSTOM, you got alot more fine tuned control for what it will do
Is extdb3 expensive to use? I want to avoid actually storing arrays and using relationships between tables instead, but this will result in more queries
If you are using async method talking to extension, those queries are happening in another thread.
Best way is to just try it out, but you should be fine
Cool, appreciate the solution for my lack of quotes problem. Would have taken me a long time to figure that one out
Pretty sure thats the old method for writing c# extensions for arma, better ways todo c# extensions these days.
(Maca134 has a blog entry showing how, and same method used in a3 samples)
If you are talking about the c# database that used A2Net, i i was under impression extDB extensions replaced using it for Database communication.
(Firefly actually helped me out with intial switching over to CMake Build system)
Also under impression it was awkward todo multiple queries and it couldn't handle results that went over extension return size limit
But i never used it myself.
That is there issue, yeah a2net life servers had some bad code to make queries safe & make sure only 1 query ran at a time.
Also its completely beyound your ability to fix thoses issues, since you aren't server owner or dev
Also extDB extensions are flexible if something isn't working for something in particular i.e crates on a server. Its 99% because someone messed up SQL Queries or SQF code.
is there anyway to log the computers time in arma?
outside of extensions no
anyone have time to help me with a few grenade scripts?
mustard, tear, and sleeping gas
@rocky marsh there's time stamps in the rpt logs which are based off of the computers time, so technically sure
Am able to cycle through this loop fine, but only one marker gets made, the first one. Any obvious tells as to why that might be?
for "_i" from _y0 to _y1 step _secY do {
_y0 = _y0 + _secY;
_secArr set [1, _y0];
private _markerName = toString _secArr;
[_markerName, _secArr, _markerName, "hd_dot", "ICON", 1, [1, 1], "ColorBlack", 1] call RND_fnc_getMarker;
};
_x0 = _x0 + _secX;
_secArr set [0, _x0];
};```
getMarker just creates a marker with optional params
(Attempt was: start at xy coords, create markers at predefined intervals along y axis, return to x position, increment x by predefined number, repeat y increments, repeat all this until stepped through all increments of x. hoping to end up seeing a grid of markers, etc.)
Shouldn't it be createMarker, and not getMarker?
yep, but that's a function i wrote myself for practice
I don't see _x0, _x1, _y0 etc. being defined anywhere.
Error is probably somewhere not shown here.
Hm
Sure it only creates one marker and not thousands all in the same spot?
What is _secX supposed to be anyway? Distance between points on the x axis?
Yep
private _secY = _height / _rows;```
From
private _columns = floor(sqrt(_sectors));
private _rows = ceil(_sectors / _columns);```
Then why do you increment _x0? (x0 + _secX;) and not just use _x from the for loop?
For loop already increments it, so you're doing it twice for no reason. Making the function look more complex than it has to be and therefore harder to debug.
Also using floats as step in a for loop a bad decision imo. They usually operate with integers. I don't trust the rounding and how the game might handle the iterator being slightly larger than the final value.
for "_x" from 0 to (_colums - 1) do {
is usually what is done.
I'll give it a shot
Thanks!
Also I noticed this
"private <array>" and "private <string>" are deprecated. Consider using the private modifier directly at variable initialization i.e.: private _var = "value";
Does that mean I should be using private like this from now on? ```private _x0 = _p1 select 0;
private _y0 = _p1 select 1;
private _x1 = _p2 select 0;
private _y1 = _p2 select 1;
private _length = (abs(_x1 - _x0));
private _height = (abs(_y1 - _y0));```
Where does it say that?
The private tooltip in the VSC SQF extension I have
_p1 params ["_x0", "_y0"];
_p2 params ["_x1", "_y1"];
private _length = abs (_x1 - _x0);
private _height = abs (_y1 - _y0);
imo
I wouldn't call private string and array deprecated, but there is no reason to use them as the keyword version is better in every way. And everyone who disagrees is a fraud or contrarian.
Oh, wow, I can do that?
Yes.
Agreed.
Hell arma still supports SQS 😃
For everyone who wants to use goto I suppose.
I remember hearing about a big update to the scripting language not too long ago, is that still planned?
Not in A3.
Ahh
You are hearing voices
It told me to burn things
It forced me to make this script shit
Was described as C# like, which was nice
I think it actually tries to tell you to get some sleep xD
😃
Not 4PM here yet
But good recommendation either way
@little eagle By, not in A3, I assume that means you have info on A4
hmu with the secrets
There is no announcement for A4 afaik, ánd the C#-ish language is called EnScript or EnForce and they make it for the Enfusion engine iirc.
Which is a split from RV before A3.
Ahhhh, that's right, remember hearing that name
Guess I better add learnC# to the list
If I had to make a bet then I'd say sqf (and sqs) stays in A4. But what do I know.
I bet you're right!
Oh, as of today, Enfusion/DayZ game is 4 years old.
Was that ever usable by the public?
DayZ? Sure. They call it Alpha, but might as well call this game Alpha.
Oh, I meant Enfusion 😃
I haven't touched DayZ since launch though, maybe time to see what has changed
They kept developing and releasing 'dlc'. Which is pretty much another word for `It's alpha
Should do same for dayz, so we could get our hands on enfusion propper
I haven't touched it either. Don't own it and have no interest in it. And afaik, EnScript is still wip.
Also PUBG said they 'might' get modding in the future very early on
So I'm sure if they do, some modders move to that
I don't even know. Does DayZ have mods like A3?
So yes it does have mods?
Previous engine was copy pasta from like ToH
or some shid
So I assume everything for mods worked like in normal games
Can't find any news on EnScript that aren't like a year old. Who knows, maybe they've given up. ¯_(ツ)_/¯
Yeah, been quiet
i think dayz has been to release (current year) + 1
since first a release
Meanwhile modders have most of the dayz features in arma mods
That's what drives Arma. The scripting support. (Mission or mod is secondary)
So if you drop that = game is dead on arrival.
Yeah
So
Either they fully fledge it out 100% autist mode with deep features like clipping your toenails which grow to cleaning your gun and having to assemble a gun 1 splint at a time.
Or they have mod support so people can have features they would really like to have
We got enum warnings in an update 2 weeks ago. I can't believe they're going to get rid of SQF and waste time on stuff like that.
Although you never know.
Or they have mod support so people can have features they would really like to have
Really strange that what was essentially a mod forgot about that apparently.
ARMA3 The very first game to graduate from Early Access.
The oldest game still unfinished has been in Early Access for 4 years, 8 months, 22 days. DayZ in particular has been in Early Access for 3 years, 11 months, 26 days.
Funny how these things work out.
I liked the mod. Literally every other mod turned game
Well it's not like enum errors would be hard to add...
We already know they did it "quick quick" instead of implementing it properly
And how do we know that?
And even if it's easy, doesn't explain why you'd add it to something that's being phased out.
Alot of dayz has been rewritten, it prob would require to much work to add support for SQF i.e look what happend with java support in arma3.
Plus its alot easier to drop support for it when doing a new engine, otherwise why bother making up a new scripting language in first place.
I would suspect they would use/fork dayz sa engine, for next arma game (if/when they announce it)
Imo they prob just have some people to maintain arma3 to keep community alive until they release dayz modding support / announce arma4.
On plus side some of the small changes they been doing are aimed at content creators / catching common errors i.e skeleton errors / enum errors etc
it prob would require to much work to add support for SQF You mean no SQF in Enfusion because too much work to add?
@tough abyss
That is what I would assume, last I heard they were/had stripped out last bits of sqf. Or that could in next patch.
But I don't keep up in dayz SA Dev blogs
getDammage 2001-2017 'You've dammaged my brain
rip
Hmm
So.... everything sqf works in enscript?
Or only commands?
Until now yes. Might be removed later but we don't know that
Am on phone will link later. But they plan on complete sqf support removal from days sa
okay good
I know that they want to remove all SQF scripts. But I didn't hear a word about removing SQF support
That's what they wrote one sec
On
DayZ Status Report Highlight: 7 Feb. 2017 - 0.62, Beta & Animations Update
"complete removal of SQF support" interesting
interesting
P.E.R.F.E.C.T
hello everybody
if ((typeOf _container) in ["Box_IND_Grenades_F","B_supplyCrate_F"]) exitWith { _house = nearestObject [player, "House"]; if (!(_house in life_vehicles) && (_house getVariable ["locked",true])) exitWith { hint localize "STR_House_ContainerDeny"; true; }; sleep 3; [] call SOCK_fnc_updateRequest; };
how to add delay sleep 3; ?
sleep 3; [] call SOCK_fnc_updateRequest; don't work
add sleep 3 and don't run in unscheduled
Are there any known issues with radioChannelAdd? Im using it to add players to a few channels when they first spawn as well as respawn/get revived but for some odd reason the channels their meant to be in wont be available randomly. radioChannelAdd is being called on the client, using publicVariable'd channel ID's created on the server btw.
problem after respawn?
Honestly cant say ive identified when it happens, just that randomly people will complain that they dont have the certain channels. Issues only started happening when I changed from calling radioChannelAdd from the server to the client, but surely thats not the issue
@warm gorge Then have the idiots that complain a reason to give you when it happends
Yeah I wish it was that easy haha
Lol :D
it is, add logging, ask for RPTs -> done
The biki doesn't specify local or global effects for radioChannelAdd
@lone glade I am assuming in this case there were none
Yeah I think ill just add in some diag_log's to the script and whenever someone reports it just get em to send it to me. And yeah theres not much info on the command, however ive seen some people execute it on the server, and others on the client.
make 2-3 tests to determine if it's AG / AL and, or EG / EL and be done with it.
How could I do that in regards to this issue?
check if the command works when giving local arguments that aren't local to the machine running the command
check if the channel is added remotely if it's ran on an other machine
run command on server. see if there are resulkts on client
Why did I not think of this? What a trick
The radioChannelAdd takes clients in an array, so it's possible it's a global command
I used to run it on the server and it was fine. Now I run it on the client and its fine 99% of the time except it somehow bugs out every now and then
Thats for radioChannelCreate
I also wanna point out those are TKOH commands
Adding the channel though is different
considering radioChannelAdduses the ID returned by create the same limitations would apply
otherwise it'd be completely stupid design
If it could only be run on the server, I wouldnt be able to add units to them on the client which I can
That would make sense
radioChannelAdd should work on client
ever tried using https://community.bistudio.com/wiki/customChat instead ?
woops, wrong one
huh, I was sure there was an other way to create custom channels, apparently not
radioChannelCreate?
create on server and then use add on client to add that one to the client
@little eagle Wait wait wait
Gross
C#-ish language?
looking for tips for referencing jpgs located in A3\addons\editorpreviews_f\data\cfgvehicles. does anyone know how I should format the path? For example:
_pic = format["a3\editorpreview_f\cfgvehicles%1.jpg",_picClassName];
macrs are fine
@wind sapphire You shouldn't be having to do this:
private _classes = "(configName _x) isKindOf 'Car' && isClass _x" configClasses(configFile >> "CfgVehicles");
{
diag_log format["%1's Editor Preview Path %2",_x >> 'displayName',_x >> 'editorPreview'];
true
} count _classes;
I haven't had coffee yet so don't shoot me quite yet
@still forum I actually thought they had already removed all of SQF code
But I can still find plenty of them in the game files
There's only so much 1 man can do
Dan halls have his arms full juggling multiple games, removing sqf is last thing on his mind
Honestly, I thin we still have a few years left
and removing the sqf layer is a massive but required undertaking
Ermagherd
The new UIs are made with XML files
lol
// ---------------------
CGame CreateGame()
{
Print("CreateGame()");
g_Game = new DayZGame;
return g_Game;
}
Wait whaat
Wait im so confused
What the hell
class PluginDeveloper extends PluginBase
What kind of mix is this
This is more and more looking like a high level C language/java
DayZ SA?
no like the rework they were working on, is it realeased?
no
@subtle ore, I'll try that. I did before but perhaps I was using the wrong syntax. Thanks for the feedback and quick reply.
is there a function or simple to way if a vehicle has a proper gunner?
gunner vehicle is not proper?
or is one to iterate all turrets for hasGunner and skip the FFV ones
sorry - speaking of parsing cfgVehicles
fullCrew
primaryGunner = 1; should be it
Hello Friends,
Is there a way of displaying the vanilla score at the end of a mission without pressing "P" ?
like on Debrief or something
but this is for only one player ... how can i get the full scoreboard ?
foreach it for allPlayers
You will probably have to let the server store the information, if you want it to work at the end for players who disconnect ingame.
@simple solstice like this ?
{getPlayerScores _x;} foreach allPlayers;
Yeah, but you probably want to store it somewhere:
_scores = allPlayers apply {getPlayerScores _x;};
and then how do I display them on the screen ???
If it has to look better ugly, you probably have to make your own dialog.
Maybe the best approach would be to find out how to active the original scoresboard dialog, via scripting instead of pressing the key.
that's what I originaly intended to do ...
I'll do it another way. thanks anyways !
@quartz coyote Found it: createDialog "RscDisplayMPScoreTable";
@errant jasper you rock dude... Thanks a lot
createDialog "RscDisplayMPScoreTable";
private _display = uiNamespace getVariable "RscDisplayMPScoreTable";
private _ctrlGroupPlayers = _display displayCtrl 102;
private _ctrlGroupScores = _display displayCtrl 103;
private _y = 0;
{
private _name = name _x;
private _scores = getPlayerScores _x;
_scores params ["_killsInfantry", "_killsVehicle", "_killsTank", "_killsAircraft", "_deaths", "_killsTotal"];
private _ctrlScores = _display ctrlCreate ["RscDisplayMPScoreTable_LineTemplate", -1, _ctrlGroupPlayers];
_ctrlScores ctrlSetPosition [0, _y];
_ctrlScores ctrlCommit 0;
private _ctrlRanking = _ctrlScores controlsGroupCtrl 106;
private _ctrlPlayerName = _ctrlScores controlsGroupCtrl 107;
private _ctrlKillsInfantry = _ctrlScores controlsGroupCtrl 108;
private _ctrlKillsVehicle = _ctrlScores controlsGroupCtrl 109;
private _ctrlKillsTank = _ctrlScores controlsGroupCtrl 110;
private _ctrlKillsAircraft = _ctrlScores controlsGroupCtrl 111;
private _ctrlDeaths = _ctrlScores controlsGroupCtrl 112;
private _ctrlKillsTotal = _ctrlScores controlsGroupCtrl 113;
_ctrlRanking ctrlSetText "";
_ctrlPlayerName ctrlSetText _name;
_ctrlKillsInfantry ctrlSetText str _killsInfantry;
_ctrlKillsVehicle ctrlSetText str _killsVehicle;
_ctrlKillsTank ctrlSetText str _killsTank;
_ctrlKillsAircraft ctrlSetText str _killsAircraft;
_ctrlDeaths ctrlSetText str _deaths;
_ctrlKillsTotal ctrlSetText str _killsTotal;
_y = _y + (ctrlPosition _ctrlScores select 3);
} forEach allPlayers;
@quartz coyote
Maybe this helps you to find a place to start. This display is fun to work with.
@little eagle awesome ! Thanks guys !
Hmm. Also maybe try this? https://community.bistudio.com/wiki/showScoretable
I think in SP, it won't show anything
Yeah.
Guess mine is the more customizeable approach, while this might show the default in MP.
Agree. Dunno, if kill counters (kill events) are still broken with ACE, but if it is, you use a workaround, and then use your appraoch to display the real counts.
They are. : (
It should be better with the medical rewrite, but who knows if that ever finishes.
Seems like that if you want something, you have to do it yourself. ¯_(ツ)_/¯
why'd you think I wrote an arsenal clone
You got sick of the vanilla one.
me after using ACE Arsenal for a month while coding it:
"now that I think about it BI Virtual Arsenal can't be that bad"
30s later
"nevermind"
Remember, I had to tweak Arsenal also. Recall, it had some weird scope (config) issues
Think it has something like arsenalScope. And if it wasn't defined it would not be in the default arsenal. But if you made your own whitelist, it would still forbid items without the proper config scope.
I liked the concept. Just not the execution. And I also think it should work with limited amount as better way (cooler interface) to access an ordinary crate.
I should've named the project arsenal 2.0
Armory.
@lone glade ACA?
AAA
I'm obviously dislexic