#arma3_scripting
1 messages · Page 533 of 1
Nvm figured it out
Good Morning !
I'm dropping a grenade at the player's feet and would like it to be his. I've done this but it doesn't seem to give him any kill points when that grenade kills an enemy.
martyrdomGrenade = "mini_grenade" createVehicle [getPosATL player select 0, getPosATL player select 1, (getPosATL player select 2)+0.5];
martyrdomGrenade setOwner (owner player);```
Can someone think of an other way of doing it ?
also tried this but didn't work either :
martyrdomGrenade = "mini_grenade" createVehicle [getPosATL player select 0, getPosATL player select 1, (getPosATL player select 2)+0.5];
Cid = clientOwner;
[martyrdomGrenade, Cid] remoteExec ["setOwner", 0];```
@quartz coyote setOwner is to change network ownership of an object. Try setShotParents instead
@winter rose cool ! Since it most be executed on Server, Would I need to remoteExec it ? Cuz the grenade vehicle is created locally on a client
or maybe example 2 is done on server, which would suit me cuz the grenade vehicle is created in a "Killed" EH. Could simply shift the EH from client to server
that or remoteExec it to the server yes
@winter rose perfect, it works !
also, something like this is more readable when you modify position height imo:
private _playerPosATL = (getPosATL player) vectorAdd [0, 0, 0.5];
martyrdomGrenade = "mini_grenade" createVehicle _playerPosATL;
and more performant too :u
yeah, single vectorAdd vs three selects
and 3 getPosATL's, and 3 player's
oh yeah right. 😄
thanks guys !
Hello poeple, how do i get the absolute temperatur value in Celsius from ACE? cant find anything online but i know its there, you can use a kestrel and it will tell you a temperature
feel kissed. Also i dont get how i keep forgetting Ace is on github
nice the ACE temperature even seems to recognize winter maps
that makes things a lot easier.
Not all winter maps
And it happens that you sometimes have 5°C at mid-day on takistan. Which makes no sense ^^
yeah its not perfect. chernarus covered in snow is at 5 ° C. Where snow would melt. but at least it somehow recignizes it a bit
enough for me
There recently was something in progress for fixing that. But it was binned as the proposal was just way too complicated and big
I only need rough values to change the lifetime of fires i spawn from exploding fuel trucks.
wouldnt it be possible to have custom values for each map? easier to just put in 0°C somewhere in a line than have an automation process to perfectly calcuate it
?*
Hi everyone! How i can convert result of getAllHitPointsDamage command to damage command? Is that a average of values in getAllHitPointsDamage array or something else?
Say what?
Bookmark this page:
https://community.bistudio.com/wiki/Category:Scripting_Commands_Arma_3
Read the "See also" on wiki pages of commands.
The returned value depends on the couple target/ammo fired. This value has no correlation with the sum of all hitpoints damage status and the effective status of the object.
Ok, i will be more attentive. Thanks.
Are you quoting from biki from alternative universe or something?
from a 4 year old note on damage wiki page
Hi again
If I do this locally, what will it do globally ? disable footsteps of the player ? or does it only affect AIs ?
player setUnitTrait ["audibleCoef", 0];
only ai
useless
okay thx
I guess disabling footsteps would be only through config ?
/ mod ?
I think so ye
crap
is there any way to make an object invisible only to an AI so other players and unaffected AI can see?
Execute forgetTarget repeatedly
would that work with a prop say a sofa?
Sofas are pretty deadly, you will need to removeAllWeapons sofa first
Too much alk?
I'm getting a prop to target and chase other players and ai
You sure?
that is why i need to attach it to a unit
Then you don't want the prop to be ignored, but the unit under it
Who needs comedy channel when you have #arma3_scripting
I understand that. However, when I uses something like this
while{alive player} do {
unit doMove (getPosATL player);
uiSleep 1;
};
if I attachTo a prop to it, the unit seems to freak-out
it doesn't follow the doMove but instead randomly runs in some direction
if I don't attach an object, the unit works fine
is the init.sqf executed on server + all clients ? cant find anything online about its locatily
Everywhere
IS it possible to limit a users access to loadouts via an add action for example, based on the units role description?
i.e. player chooses slot 'Team Leader'
Hence they can only see an addaction for teamleader, via something like this:
if (roleDesc == "Team Leader") then {
this addAction ["TeamLeader", "TeamLeader.sqf"]; };
roleDescription this == ...
@tough abyss CfgMagazineWells in config
yall know how to call a group of vehicles with almost the same class name?
like i want to call an a6 intruder (yes i know its a mod, ignore that fact lol) and set the ammo to 0
right now i have it written like this
if (typeOf _vehicleObject in ["uns_A6_Intruder_USMC_GBU","uns_A6_Intruder_USMC_CAS","uns_A6_Intruder_USMC_EHG","uns_A6_Intruder_USMC_CASD","uns_A6_Intruder_USMC_CAV","uns_A6_Intruder_USMC_SEAD"]) then
{
_vehicleObject setVehicleAmmo 0;
};
is it possible to do this?
if (typeOf _vehicleObject (is similar to(this right here is what i want to know)) ["uns_A6_Intruder_USMC"]) then
{
_vehicleObject setVehicleAmmo 0;
};
i dont really get what kind of condition you want in the second part
if (typeOf _vehicleObject (is similar to(this right here is what i want to know)) ["uns_A6_Intruder_USMC"])
what is that line supposed to check
you could go and check what kind of vehicle "family" your car belongs to. there is a hirachy with sub classes, like landVehicle -> tank -> tankClass1 -> greenbattletank
@compact wyvern
well like id like all planes with the classname similiar to uns_A6_Intruder be unarmed
basically all classnames similar to uns_A6_Intruder be set to 0 ammo
if that makes sense
similar or close to?
close to
hm
you could check all existing vehicles in the mission if the string "uns_a6_intruder" is part of their calss name
cause this mod has a master arm which adds all the different classnames to the dynamic loadout and your able to make them all change to whatever loadout you please
and i either want to stop the master arm all together
or change all ammo to 0
something along those lines:
{
if ("planename" in "classname") then {ammo = 0}
} foreach vehicles
sweet thanks!
I also need help myself. I ran into a problem concening sript adding weapons and ammo to AI.
when running on my pc its fine, but on the dedicated server, the units tend to not get the weapon. addWeapon seems to be not multiplayer compatible and BI wiki also says so. addWeaponGlobal is said to be broken in multiplayer. what should i use?
how can i provide a custom kick message?
"addWeaponGlobal is said to be broken in multiplayer" wher
@still forum quote BI website addWeaponglobal: "This command is broken when used on dedicated server"
@tough abyss was about the idea, not actual code
🤔
i take for your reaction that it is not broken
I guess it means If you do not remove weapon first, using this command from dedicated server will duplicate weapon.
ahhh okay well thats a whole different thing. I will use addWeaponGlobal
@tough abyss does it matter? i would like to provide a message to a player when they get kicked for the reason. right now it just says you were kicked. im trying not to have to write a script to freeze them in game and present a message and then kick them.
@spark turret try https://community.bistudio.com/wiki/addItem
m242 does is make a difference if i use addWeaponGlobal or addItem?
@still forum where did he say that?
Additem is not broken probably
uh sorry but that looks like a poorly formed question. my bad i guess. and thanks @tough abyss
Don’t think it is in stable yet as it was only recently added to dev
okay thanks m242, will use addItem.
Thanks mate it worked @tough abyss
Im getting an odd error when trying to assign a large number to a varrible. Here is the code
private _punishment_duration = 1440;
here is the error
19:06:56 Error Missing ;
goes a way when i lower the number. I thought i read the wiki right that i could assign number values that large with out issue.
that error is unrelated to the number
check the lines around that code
also check if there are any invisible characters in there
ok, im on it. thx
here is he org code which worked with no errors
//check for punishments to be applied
private _needed_punishment_id = 0;
private _punishment_duration = 0;
if (_player_current_civi_kill_count > 5) then
{
_needed_punishment_id = 1;
_punishment_duration = 1;
};
if (_player_current_civi_kill_count > 10) then
{
_needed_punishment_id = 2;
_punishment_duration = 1;
};
if (_player_current_civi_kill_count > 20) then
{
_needed_punishment_id = 3;
_punishment_duration = 30;
};
then i made this change for production and got the error for the line _punishment_duration = 1440;
//check for punishments to be applied
private _needed_punishment_id = 0;
private _punishment_duration = 0;
if (_player_current_civi_kill_count > 5) then
{
_needed_punishment_id = 1;
_punishment_duration = 360;
};
if (_player_current_civi_kill_count > 10) then
{
_needed_punishment_id = 2;
_punishment_duration = 360;
};
if (_player_current_civi_kill_count > 20) then
{
_needed_punishment_id = 3;
_punishment_duration = 1440;
};
so to try to isolate the error i did the following
//check for punishments to be applied
private _needed_punishment_id = 0;
private _punishment_duration = 1440;
if (_player_current_civi_kill_count > 5) then
{
_needed_punishment_id = 1;
_punishment_duration = 360;
};
if (_player_current_civi_kill_count > 10) then
{
_needed_punishment_id = 2;
_punishment_duration = 360;
};
if (_player_current_civi_kill_count > 20) then
{
_needed_punishment_id = 3;
_punishment_duration = 0;
};
everytime i ran the code it complained for the line that had 1440. with missing ; error. i know usually that error means that something above is busted but this code worked for days with low values. now that i got the kick functionality working i made the adjustments for production.
well "too big number" is bullshit. That's not whats the problelm
can you post the full error?
My main guess is a invisible unicode character in there.
You get that if you copy t hings from BIF
That error didn't match any of the pieces of code you pasted
19:06:55 PhysX3 SDK Init ended.
19:06:56 Error in expression <= 0;
private _punishment_duration = 1440;
if (_player_current_civi_kill_count>
19:06:56 Error position: <;
if (_player_current_civi_kill_count>
19:06:56 Error Missing ;
19:06:56 File...., line 41
the last code snippet matches
Ah :u
line 41 = private _punishment_duration = 1440;
Check if there is a invisible character between semicolon and the number
how do i do that? i got it open in notepad and i dont see anything. i use visual code with .sqf extensions
There is a function that gets all loadout of the player into a data array?
Just out your cursor after the semicolon. And press backspace
if you press it and nothing seems to happen, there was a invisible character
@tough abyss getUnitLoadout
@still forum
YES!!! you figured it out. Fixed it. Thanks mate. Took me an hour to try to debug this before i posted. thx
it is very odd. im just happy it works. i took it to notepad and removed all empty space that showed up where it shouldnt be.
Hopefully you mean Notepad++ and not Notepad?! 😉
no i def dont.
wat
real coders feel comfortable in notepad. but as i said, i use visual studio and all its products for development. but sometimes you just need to see code in its rawest state. ++ is just another IDE
i have NP++ as well
but to find these odd charecters needed it raw dog
A editor which handles unicode badly and linefeed not at all until recently is "rawest state"?
if you need raw state, use a hex editor 😄
this fire ['pipebombmuzzle', 'pipebombmuzzle', 'IEDLandSmall_Remote_Mag'];
Could someone please tell me why would this give "Cannot use magazine IEDLandSmall_Remote_Mag in muzzle PipeBombMuzzle"?
Trying to get a list of all models within X meters of me paired with their bounding box. This is what I have so far:
myList = nearestObjects [player, [], 15]; newList = newList + {str formatText ["%1,%2",(0 boundingBoxReal _x),getModelInfo _x];} foreach myList
That only gives me the last model though. So I think I need to be saving each one into an array and I think I'm not clear on how to do that.
Everyone can use what he like, of course.
But you can really work with Notepad? Puh... I can't 😛
@ebon ridge where did you get "pipebombmuzzle" from?
@hearty hound forEach returns the last value
all the examples i could find of how to get AI to plant explosive
use apply if you want each
e.g. unit fire ["pipebombmuzzle", "pipebombmuzzle", "SatchelCharge_Remote_Mag"];
Notepad++
with this addon: http://www.armaholic.com/page.php?id=8680
Is my way to work..
Actually also on the wiki in fire comment
unitname Fire ["pipebombmuzzle", "pipebombmuzzle", "pipebomb"];
It's possible pipebomb muzzle might not exist anymore. That example is 11 years old
how do i find the right muzzle for a mag?
DemoChargeMuzzle worked
@still forum thanks!
Awesome function! Thanks Bohemia!
Sadlly i did my mission when it was not avaliable!
@still forum Thank you for your help with "apply". I figured it out:
newLine = toString [0x0D, 0x0A]; myList = nearestTerrainObjects [player, [], 500]; newList = myList apply {str formatText ['%1,%2,%3,%4,%5,%6,%7,%8,%9',(getModelInfo _x select 1),(0 boundingBoxReal _x select 0 select 0),(0 boundingBoxReal _x select 0 select 1),(0 boundingBoxReal _x select 0 select 2),(0 boundingBoxReal _x select 1 select 0),(0 boundingBoxReal _x select 1 select 1),(0 boundingBoxReal _x select 1 select 2),(0 boundingBoxReal _x select 2),newLine]}; copyToClipboard str newList
str formatText == format
I was originally using that but then changed it to test something and never switched it back
possible to detect vehicle bump into a building with some EH?
or would one need thingX for it to work
@velvet merlin maybe this?
https://community.bistudio.com/wiki/Arma_3:_Event_Handlers#EpeContact
Sadlly i did my mission when it was not avaliable!
Too bad you cannot do anything about it
Hi all !
I draw an icon on my minimap but would like it to fade after 1 sec. How can I achieve that ?
_this select 0 drawIcon [_shotEnemyIcon,[0,0,0,0],shotPosition,10,10,0,"",1,0.03,"PuristaBold","right"];
You need to calculate FPS and how many frames it will take for 1 sec and then gradually reduce opacity and then remove icon from draw
it's about removing it from draw that i'm concerned about... how would I do that ?
if (drawit) then {drawIcon...} then set drawit to false
oh right
Or if you draw icon in own EH just remove EH
@tough abyss Oo calculate FPS?
Or simply something like while (curTime - startTime < 1) do marker setMarkerAlpha abs (startTime - curTime) (formulas may be wrong)
Nah, icon is icon @winter rose
Ah, my mind said Marker
I'm trying to set up waypoints and it seems that regularly the AI will complete the waypoint without bother to actually move to it. I'm trying to make them move somewhere, plant explosive, move away and then detonate it. But they just detonate it while still standing on it as often as not.
private _wp = _grp addWaypoint [_tgtPos, 0];
_wp setWaypointType "MOVE";
_wp setWaypointBehaviour "STEALTH";
_wp setWaypointSpeed "LIMITED";
_wp setWaypointStatements ["true",
format[
"this fire ['DemoChargeMuzzle', 'DemoChargeMuzzle', 'IEDUrbanSmall_Remote_Mag'];
_civie setVariable ['%1', true];",
UNDERCOVER_SUSPICIOUS]
];
private _hidePos = [_tgtPos, 50, 75] call BIS_fnc_findSafePos;
private _wp = _grp addWaypoint [_hidePos, 0];
_wp setWaypointType "MOVE";
_wp setWaypointBehaviour "AWARE";
_wp setWaypointSpeed "NORMAL";
// Enemy can shoot on sight!
_wp setWaypointStatements ["true", "this setCaptive false;"];
between 50-75 meters
it might be cos i was running accelerated, seems to mess up the unit AI :/
question, if I have two conditions for a trigger to activate, does it activate when both are fulfilled or just one?
Depends if you used || or &&
for the conditions?
because one is having independent not present, the other is having a trigger activated
I was going to say both, but then I tried it.
It appears that if your condition is triggerActivated trigPullMyFinger, it's irrelevant what the Activation and Activation Type are set to once the condition is met.
But not vice-versa - if the Activation and Activation Type are achieved, but the condition is not met, then the trigger isn't activated
For instance, in that scenario, if Player just shoots the Independent (thus fulfilling the Activation and Type element of the large trigger, that trigger isn't activated (no hint displayed).
If Player walks through the first trigger (trigPullMyFinger), then that trigger activates (any player present) which then activates the second trigger, even though there's still an independent in the trigger area.
If I take out the condition on trigNoIndiesAllowed requiring the trigPullMyFinger to be activated, then shoot the independent, trigNoIndiesAllowed is activated.
Weird... I'd have thought the activation and activation Type would have to be true in order for the condition even to be assessed, but it seems like condition is actually evaluated regardless of Activation and Activation Type (at least with triggerActivated as a condition)
I have some code for adding weapons and attachments to a container using the weaponsItemsCargo format.
clearWeaponCargoGlobal _container;
{
_x params ["_weapon", "_supp", "_laser", "_optic", "_mag", "_bipod"];
if !(count _x == 6) then {
_x params ["", "", "", "", "", "_ugl", "_bipod2"];
_container addMagazineAmmoCargo [_ugl select 0, 1, _ugl select 1];
_bipod = _bipod2;
};
_container addWeaponCargo [_weapon, 1];
{
if !(_x isEqualTo "") then {
_container addItemCargo [_x, 1];
};
} forEach [_supp, _laser, _optic, _bipod];
if !(_mag isEqualTo []) then {
_container addMagazineAmmoCargo [_mag select 0, 1, _mag select 1];
};
} forEach (_standard select 1);
I have this code in 2 places, once in a mod and once in a mission. The code is identical, it works fine in the mission but not in the mod. The mod will not add the attachments.
Is there a way to update the pathing of units so they dont drive into buildings which have been spawned?
Or are there any invisible "hints" I can give the AI so they they drive around spawned buidlings
IS there something I can put in the description.ext to enable script errors for remote players?
Do remote players errors appear in my server logs?
I could've sworn that ai pathing is automatically rebuilt anyways.
So I am still having issues getting and checking if a user is in a database for a whitelist System can someone post a server side example of onPlayerConnected code and how to endMossion on the client from the server?
I brain is used to c# so I not the best with sqf
@fringe yoke any reason you are not suing the global variants of the commands?
The container is created using createVehicleLocal
using the local or global variants of the command don't make a different in this use case. Everything except addItemCargo / addItemCargoGlobal work fine
is there a way to add/remove score for vehicles killed in multiplayer scoreboard? i know how to add or remove score but i want to add a positive vehicle kill from an eventhandler and im not having much luck from google searches.
@exotic tinsel would this help?
https://community.bistudio.com/wiki/addPlayerScores
@quartz pebble thankyou so much. i cant believe i didnt find that. thank you thank you. finally fixed this issue
if i use two scripts that both need a game logic object, can both of them use the same game logic or do i need to change one of the scripts to use server1 instead of server and have sperate game logics?
@kind marsh depends on the scripts 😄
i figured it out. just changed every ref to server to server1 in one of the scripts and it works fine now
Safest
is there any easy way to add horizontal scroll bar to this?
0 = 0 spawn {
disableSerialization;
_html = findDisplay 46 createDisplay "RscCredits" ctrlCreate ["RscHTML", -1];
_html ctrlSetBackgroundColor [0,0,0,0.8];
_html ctrlSetPosition [safeZoneX, safeZoneY, safeZoneW, safeZoneH];
_html ctrlCommit 0;
_html htmlLoad "http://www.bistudio.com/newsfeed/arma3_news.php?build=main&language=English";
};
one that doesnt require me to go create classes and what not
have you tried creating a controls group, and creating the html inside the controls group ?
im a total noob at ui stuff. this is my first attempt
so whats the problem at the moment, is it just not showing all the text ?
yes, hoping there is a simple solution that doesnt require me to get deep into it for now.
everything ive found has me doing stuff like what your talking about.
0 = 0 spawn {
disableSerialization;
private _display = (findDisplay 46) createDisplay "RscCredits";
private _group = _display ctrlCreate ["RscControlsGroup", -1];
private _html = _display ctrlCreate ["RscHTML", -1, _group];
_group ctrlSetPosition [safeZoneX, safeZoneY, safeZoneW, safeZoneH];
_group ctrlCommit 0;
_html ctrlSetBackgroundColor [0,0,0,0.8];
_html ctrlSetPosition [safeZoneX, safeZoneY, safeZoneW, safeZoneH];
_html ctrlCommit 0;
_html htmlLoad "http://www.bistudio.com/newsfeed/arma3_news.php?build=main&language=English";
};
``` try something like that?
you will probably have to resize the html control,
hmm. it just moved it off to the right and didnt add scroll bar. thx though
it will only add a scroll bar if the internal content is bigger
so
0 = 0 spawn {
disableSerialization;
private _display = (findDisplay 46) createDisplay "RscCredits";
private _group = _display ctrlCreate ["RscControlsGroup", -1];
private _html = _display ctrlCreate ["RscHTML", -1, _group];
_group ctrlSetPosition [safeZoneX, safeZoneY, safeZoneW, safeZoneH];
_group ctrlCommit 0;
_html ctrlSetBackgroundColor [0,0,0,0.8];
_html ctrlSetPosition [0, 0, safeZoneW, safeZoneH * 2];
_html ctrlCommit 0;
_html htmlLoad "http://www.bistudio.com/newsfeed/arma3_news.php?build=main&language=English";
};
forcing the SafeZoneH of the html to double of the controlsGroup, will give it a scrollbar.
ok yes it did add scroll bar, so i just have to adjust the ui size to get it back on screen right?
whats the issue with it ?
oh nvm
i just changed it
the x and y of the html are relative to the controlsGroup
@wary vine you are awesome MATE!!!! thanks so much
np
Has anyone tried to use connected clients as pseudo-headless clients? So I was thinking about moving ownership of AI groups to different player PCs to reduce the load on the server.
Few questions that I have:
.) Will I still be able to control them via Zeus?
.) Will they be transfered back to the server if I give them orders?
.) Any known side-effects?
.) Could this decrease/increase desync (Assuming the client PC is fast enough to handle a few AI units and internet speed is fine)?
By what criteria are you going to choose your victim? This is pretty evil to pick a player and fuck their FPS up with bunch of AIs
you could scan player fps and decide on that basis
but evil nonetheless 😄
control of zeus is independent of locality
thus they wont be transferred to server or your own pc (zeus spawned units are running on zeus client per default)
but why not use headless?
Hi anyone can tell how i can use createSimpleObject command with marker pos?
createSimpleObject ["Land_MetalCase_01_large_F", getMarkerPos "case_spawn"];
``` don't seems to work
createSimpleObject takes positonASL, getMarkerPos returns AGL or 0 height
meaning unless you're spawning on the ocean, it'll be under the ground
If only there were a command to convert AGLtoASL
😄
ASL pos of marker? AFAIK ASL is the same as world coordinates
at least its Z component?
Only difference between the types is the Z component
yes ASL should be same as world I think.
Might be a model relative difference tho
@tough abyss Hm do you think adding ~3 AI on a client would fuck up their FPS that much?
HC is currently not possible since I don't have access to the server to change settings and so I got that idea.
Dumb question because I'm not too familiar - how do you exit an FSM?
End state
So its possible to get the bounding box of objects, but how can you check for bounding box collision ? I know about the line intersect methods, but is there no bbox vs bbox function?
Is it possible to create a camera to spectate another player through binoculars?
I want to create an item that is a pair of binoculars, then have another player interact with a laptop or some electronic device and be able to see what the player is pointing their binoculars at
so
other_unit switchCamera "GUNNER";
```?
@fringe yoke I believe it should do the trick! Be wary it might not stop the player from moving though
Thanks, I'll give it a try. Didn't think it could work like that
(I'm not quite sure about it)
@oblique vale i have used a system where new AI and such are spawned on the client that has the most FPS. Not perfect, but shares the load
pay attention if you're doing anything to the units afterwards, some commands can only be used if the unit is local. Need to use remoteexec a lot.
Is there a way to get ride of the UAV symbols on the map if you have a Terminal equipped.
This one might brake a lot of missions and addons
Changed: createVehicleLocal was restricted in multiplayer - vehicles, shots, explosions and such are no longer possible to spawn (the old behavior can be turned on via "unsafeCVL=1" in the description.ext or server's config)
i mean, unmaintained missions are bound to break anyways
Luckily all missions and addons ever made are always maintained 🙂
🤔
Can't spawn vehicles with createVehicleLocal 🤔
I'm new to scripts
Well, at least for now createvehiclelocal still works in MP with the latest dev branch from today....
Could someone confirm this for me:
https://community.bistudio.com/wiki/ctrlSetAngle
with a 512x512 and on the 2nd run with a 1024x1024 Texture.
For me: It borks up with the 1024 Tex
Can't spawn vehicles with createVehicleLocal 🤔
Should not be able to spawn transport
How can i get last loaded magazine?
Situation - gun compatible with buckshot and slug magazines. Load slug, make a shot - when reload key is pressed - slug round will be loaded even when both buckshot and slug mags are in the inventory. How can i get this 'saved' mag type by script?
store it?
w. fired eh? ok, it is the option. But maybe there is some better solution?
Still sad 😦
e.g.: Preview Stuff on a Client would'nt possible anymore (like in a BuildMenu for example)
Yeah, this will break all current liberation forks, it uses local vehicles to show you preview of what will be built.
Or that one, yeah
Yeah -.-
Or we have to go back to SCREENSHOTS instead of the models -.-
Server Guys, yeah. But what else does this enable in the future?
I rly dislike the descision with cvlocal
@tough abyss
I know that I can easily fix this by adding one thing to description. But Liberation has a big community with many forks and derivatives. I guess most of them will be unaware and their versions will be broken.
@hollow thistle or using simple objects maybe?
Yet, no way to create a local one iirc… shame
We will just try to reach out to the community via our normal communication platforms/channels that they should add this in the description.ext of their derivatives.
If some derivative creator doesn't or is just not active anymore... well the players of all derivatives are seeking for support on our Discord instead of reaching out for the derivative creator in most cases, so the players of these need to change it on their own then, after they got the information on our Discord then.
I mean, they will notice when the patch comes out 😂
Yeah, indeed.
don't use unsafeCVL (that's there only if everything breaks and hell lose)
the main point is move onward with the CVL not causing global propagation in MP
both client and server needs to have build with the CVL change, the next profiling after today 1.92.145735 will have this too
@hollow thistle can use simple object for preview?
Ah, so just a misunderstanding. Thanks for the clarification, Dwarden.
Liberation is safe then. 😉😄
i think the reasons of this 'change' is quite obvious (plenty of public exploits in relation to CVL and multiplayer)
vehicles, shots, explosions and such are no longer possible to spawn
This gave me impression that it wont create anything at all
so if you want to do something globally, use CV
👍 thanks for the clarification. The changelog entry was looking like more breaking change.
that why it needs to be tested, carefully
We only use CVL for local build preview for building placement etc. before you „confirm“ it etc.
So everything is fine.
i would not be so sure, i need to investigate 😉
so , let me fix what i said, it is full block of anything prohibited for CVL
so, either you need use the unsafeCVL for legacy or adopt for modern safe-standard
first suggestion, use https://community.bistudio.com/wiki/Arma_3_Simple_Objects instead of CVL
second, use CV where it matters for global usage
SimpleObjects are the perfect solution here. Biggest problem though is that there is no "createSimpleObjectLocal"
So createSimpleObject and hide it everywhere but on one client i guess.
That's really needed IMO
Yeah could be nice replacement for CVL
And don't think it would be hard to implement to just not propagate over network
So far all CVL use cases I had were paired with enableSimulation false... so yeah createSimpleObjectLocal would be "good enough" replacement.
Yep, cSOL would be the better alternative.
if i can get this + set material/texture that works reliably that would be amazing
hello im trying to use this recoil script for the T-14s armata cannon but I cant excute is there anything wrong with it ? can anyone check it for me
vehicle player addEventHandler ["fired", { _wep = this select 1; if (_wep == "ACE_cannon_120mm_GT12") then { -veh = -this select 0; _ve1 = velocity _veh; _dir = _veh weaponDirection _wep; _veh setVelocity [ (_ve1 select 0) + (_dir select 0) * -0.2, (_we1 select1) + (_dir select 1) * -0.2 (_ve1 select 2) + (_dir select 2) * -0.2 ]; }; }];
@lavish ocean we use CVL for vehicles however would like to disable explosions/shots because hackers use CVL to spawn explosions and blow shit up
would of been better if we could pick what was disabled imo
that's why it was disabled in first place instead of trying to figure out edge case after edge case 😃
While it is mentioned in todays changelog cvl still works fine in MP (dedicated server with Dev from today)
@lavish ocean Would be better if a better alternative was made to createVehicleLocal such as the suggested createSimpleObjectLocal, then everyone would be happy.
it all depends of overhead, like if there would be benefit of CSOL compared to CSO
Well there are only positives in any situation where you only need that object to be local to the client that spawned it
So for the future it would be createSimpleObject + hideObject + remoteExecCall....
Wich is 💩 , tbh
^
Oh damn, we use createVehicleLocal for build menu preview too 🤦 @ebon ridge
Also that will give you a flickering object the CSO with hideObject
I'd be surprised if a createSimpleObjectLocal was not considered by them seriously. I mean they've just implemented extension callbacks, so they have at least one programmer over there that cares.... 🙏
@astral dawn Alot of peeps use it :/
Pseudo solutions to local objects such as hideObject RE is just horrible
Agree
Well we could also create preview objects globally somewhere and move the camera :D
"Nothing to see here, that's intended to be local. Look somewhere else"
Especialy when i think about gameModes like Epoch/Exile wich (i bet) uses some of that stuff
@astral dawn One which is also counterintuitive considering the amount of work BI and modders go through to reduce unnecessary network traffic
Almost every large project/mod uses CVL for multiple reasons
Maybe instead of disabled by default CVL should be just enabled by default? Like remote execution functions?
didn't Exile use it for their Traderzones?
TBH it feels a little bit shoved into our throats the same way the kickTimeouts were...
So more or less: You have to re-enable it again in the descr.ext or .. yeah... leve it broken.
why not opt-in
I prefer security improvement AND a feature that many people have already been wishing for quite a while (local simple objects)
Nah, out-out is better in that case @hollow thistle
Well as history has shown us, we're fairly unlikely to get a new command unless BI uses it in one of their own campaigns/scripted features. It's rare to get a command just from community suggestions.
At least there is an option
Yeah there is, good we can enable legacy behaviour not only via description.ext
This will allow to use old unmaintained missions etc. without modifying them.
Yes, that’s a relief at least.
The downside with mods: you’ve to tell that every complaining user which hasn’t read possible descriptions on workshop or similar.
With missions we can just deliver it.
Ah yes, you are right, damn 🤦
Can you help me with weapon class event handler.
I add to my weapon class
class EventHandlers
{
fired = "_this call dzn_fnc_switch";
};
and have function defined as
class CfgFunctions
{
class dzn
{
tag = "dzn";
class functions
{
class switch
{
file = "\dzn\script\fn_switch.sqf";
};
};
};
};
and EH doesn't work.
Should i set preInit=1 flag for function or what?
"It's rare to get a command just from community suggestions." worked fine for addWeaponWithAttachmentsCargoGlobal.
I'll happily do more ^^ I already have a todo list with tons more stuff
@short trout wrong function name in "fired" entry. it's not fnc_switch. missing tag
i missed it while edited. But it was there in config
and function was available from console
private _res = switch 2 do {
case 1: {"a"};
systemChat "past case 1";
case 2: {"b"};
systemChat "past case 2";
case 3: {"c"};
systemChat "past case 3";
default {"default"}
systemChat "past default";
};
systemChat str _res;```
can one please check what this writes into chat?
and afterwards, what this does?
private _cases = {
case 1: {"a"};
systemChat "past case 1";
case 2: {"b"};
systemChat "past case 2";
case 3: {"c"};
systemChat "past case 3";
default {"default"}
systemChat "past default";
};
private _res = switch 2 do {
[] call _cases;
systemChat "past cases call";
};
systemChat str _res;
Just move your whole switch case in the function
private _cases = {
params ["_toCheck"];
switch _toCheck do {
case 1: {"a"};
case 2: {"b"};
case 3: {"c"};
default {"default"};
};
};
private _res = [2] call _cases;
systemChat _res;
private _res = switch 2 do {
case 1: {"a"};
systemChat "past case 1";
case 2: {"b"};
systemChat "past case 2";
case 3: {"c"};
systemChat "past case 3";
default {"default"};
systemChat "past default";
};
systemChat str _res;
There was a missing semicolon
past case 1
"b"
@runic mica this is litterally a technical question 😉
need to know the exact behavior
or i cannot fix the bug correctly (https://github.com/SQFvm/vm/issues/85 this bug)
: is like a exitWith if the value matches.
default only executes at end of scope (AFTER local variables are already deleted)
private _var = 5;
default {_var} //_var is nil
private _cases = {
case 1: {"a"};
systemChat "past case 1";
case 2: {"b"};
systemChat "past case 2";
case 3: {"c"};
systemChat "past case 3";
default {"default"};
systemChat "past default";
};
private _res = switch 2 do {
[] call _cases;
systemChat "past cases call";
};
systemChat str _res;
Missing semicolon too
past case 1
past cases call
"b"
what if more then one call is added?
private _cases = {
case 1: {"a"};
systemChat "past case 1";
case 2: {"b"};
systemChat "past case 2";
case 3: {"c"};
systemChat "past case 3";
default {"default"};
systemChat "past default";
};
private _res = switch 2 do {
[] call { [] call _cases; systemChat "past cases inner" }
systemChat "past cases call outter";
};
systemChat str _res;```
eg this
for the missing semicolons i blame Dedmne 
private _cases = {
case 1: {"a"};
systemChat "past case 1";
case 2: {"b"};
systemChat "past case 2";
case 3: {"c"};
systemChat "past case 3";
default {"default"};
systemChat "past default";
};
private _res = switch 2 do {
[] call { [] call _cases; systemChat "past cases inner" };
systemChat "past cases call outter";
};
systemChat str _res;
missing semicolon...
past case 1
past cases call
"b"
check out this one -> https://atom.io/packages/linter-sqf
sure
if you check this out: https://github.com/SQFvm
i have to admit though, i already know the linter
Just for the missing semicolons ;D
at work right now, missing semicolons are copy-pasta issues 😉
writing directly into discord too
hmm apology accepted
new #perf_prof_branch with fix for the kickTimeout kickID vs lobbyIdleTimeout
note: createSimpleObjectLocal is now in internal discussion (or wip, depends what comes faster 😉 )
https://community.bistudio.com/wiki/disableAI
Using disableAI "CHECKVISIBLE" on players disable their ability to lock and find enemy jets/ground vehicles on the hud and on the radar., you can be right next to the jet abd it will not lock, tested today with no mods, can it get a note on that page? is also easly to replicate.
Test was done in a jet, not sure about how it effects AI and hand held lauchers.
"When removeMagazine working for Vehicles?" never
:sadcat:
A "remove random magazine of this type" though..... maaaybe. Probably still no tho
The ability to have a lot of low level AI commands so one could make their own AI using FSM would be great too
thx, but i have case with single round magazine (they dissappears when empty by default), so i now using fired eh to track last used magazine
im trying to show a custom dialog when a player gets completely in to the game but its popping up when they are still on the loading screen after the lobby.
ive tried
if (getClientStateNumber > 9) then
and
if !(isNull player) then
and
if (alive player) then
it still shows up before they are off the loading screen before being in game. any other methods out there?
iirc something like
initPlayerLocal.sqf =
or:
waitUntil{!isNull (findDisplay 46)};```
did the trick
if you're looking for a specific sate:
those didnt work either.
this is the screen its poping up on.
https://imgur.com/CGGBQZ8
waitUntil{clientStateNumber >= 9};
na didnt work
maybe the state is being changed but the game allows the loading screen to still be up a while longer.
Then:
waitUntil{!isNull (findDisplay 46)};
how are you executing this and where?
does it matter that im remoteExec on to client when they connect to server. everything else works fine where im using it.
i use a addMissionEventHandler ["PlayerConnected", and then send the code to the client. the dialog pops up no problem which is what im sending to the client. i put the waituntil before calling the dialog. its still pops up while on that screen.
trying this now
waitUntil{!isNull cursorObject};
That worked Yay
@high marsh Thanks mate for trying, i appreciate it.
like to thanks peps for taking the time. there are plenty who dont. Because you only have a cursorobject if your all the way in game. i assume.
hi, working on my own customized a3wasteland right now. i'm trying to combine both the gun store and general store dialogs into one by having buttons on both that close the currently open dialog and open the other one. the menus work great when i open them for the first time, and then press the button to switch to the other one. however, when i try switching a second time, the list of all the available weapons no longer shows up. does anyone know how to fix this issue? hopefully i've explained it clearly. i can provide my code as needed. thanks
Unsung has an option for players to throw smoke and explosive grenades out of a helicopter. Right now the grenade spawns under the tailboom, centered. Now I would like to enhance this with the grenade being spawned by an offset, depending on the side the player that creates the grenade sits. Any ideas how to calculate the side for the player? Do I need to work with global getPos and compare those or is there a local coordinate system available inside the vehicle?
You can get player's pos and convert it to local space of vehicle
Search for worldToModel command
Also I recommend to use *visual get pos commands
thanks, worldToModel might do the trick
about the CVL changes: what about light points and particle sources?
to clarify: i can create a car and hide it for everyone but one person. that's feasible. still retarded, but feasible.
i cannot do that with particles or lights.
Hello, can someone help me with the "InArea" command? its not working as it should.
{
hint str _x;
if ((_x inArea _GasArea) && (goggles _x in IRON_GasMasks)) then { //_x is every player in AllPlayers
hint format ["Name: %1, in contaminated area %2, taking damage",_x,_GasArea]; //debug command, will make players talk in chat when in gas area
[_x, 0.1, "head" , "unknown"] call ace_medical_fnc_addDamageToUnit; //schaden
};
} foreach allPlayers; //allPlayers = game updated "myagic" array containing all Players
i have placed down a marker with the variable name Gas_1. i tried _gasArea = Gas_1, also _gasArea = "Gas_1". its not working properly
scratch that im retarded. Its supposed to be !(goggles _x in IRON_Gasmaks. the whole thing never even fired up.
```sqf
Code
```
@spark turret
so, i got good news, what about new optional parameter to createSimpleObject, as bool, to enable local only effect
and what about just say, done 
what about light points and particle sources?
@random crescent those shall work fine for CVL
Even without unsafeCVL? Maybe that should be added to the Biki then.
Really nice we will get it 👍
IMO you should consider createSimpleObjectLocal variant instead of another param, it will fit more to commands like createVehicleLocal (^^), createMarkerLocal...
But that's just my personal opinion and regardless how it is implemented I'm happy it is implemented ;P
https://pastebin.com/Q6iitHAG here's the script im working on. Only problem I've encountered is that if I place the module on a vehicle with every vehicle having a different _speed and _angleLaunch, the values that were applied to the last placed module overwrite them all
I eventually found it, the google results were useless though
IMO you should consider createSimpleObjectLocal variant instead of another param same. :u
hmmmyup!
I'm having a small issue with waypointTimeout, I create a waypoint for a vehicle with
private _attackWP = _jetGrp addWaypoint [getPos _target, -1];
_attackWP setWaypointType "DESTROY";
_attackWP waypointAttachObject _target;
_attackWP setWaypointTimeout [120, 240, 300];```
But when I run `waypointTimeoutCurrent _jetGrp` 5 seconds later it returns -1, what am I doing wrong?
nvm, I'm an idiot
addWeaponWithAttachmentsCargo has now been completely implemented/fixed :3
https://s.sqf.ovh/arma3_2019-06-05_18-17-31.png
I'm having so much fun, and I think you can about imagine how much fun 😄
cursorTarget addWeaponWithAttachmentsCargoGlobal ["arifle_Katiba_ACO_pointer_snds_F", "", "", "", "", ["16Rnd_125mm_APFSDS", 50], 1]
now reduce the bullet reload speed so you can do this
https://streamable.com/l1gd3 (warning kinda loud)
many bullet
And just addMagazineCargo ["magName",ammoCount] to cargo and i would be so happy :D
Also removeOneItemCargo would be nice.
As right now i need to spawn bot, give him magazine with 20/30 bullets etc, do action to put it in cargo and then delete bot.
oh fuk, how did i miss that?!
Didn't check the "See also" on addMagazineCargo page? 😄
removeOneItemCargo would be nice. But I think it requires additional netcode addition
And it would be "remove one random item with this classname" which might not be useful enough
So that's done.
What next?
I think array reduce and surfaceTexture, these are "easy" to do.
https://s.sqf.ovh/firefox_2019-06-05_18-47-36.png more than enough stuff open
Okey so array reduce I currently have
_array reduce [0, {_acc + _x}]; // initial accumulator = 0
_array reduce {_acc + _x}; // initial accumulator = _array select 0
[1, 2, 3, 4] reduce {_acc + _x} == ((1 + 2) + 3) + 4;
[1, 2, 3, 4] reduce [0, {_acc + _x}] == (((0 + 1) + 2) + 3) + 4;
I already talked about this with baer, I kinda dislike adding a new "magic variable" (_acc) and I could use _this instead here. What do you think?
Maybe I'm overthinking this and it doesn't matter ^^
My thinking is people are already used to _this being a "magic" variable, same as _x
I agree on that too.
From ACE Slack I only got the answer by baer which I already knew as we talked about that months ago.
And commy who is arguing that it's a useless command because you can do the same with apply, and who wants a "sum" command instead
which is nice too. But a very specific thing for a usually generic scripting language
_averageDistance = (allPlayers reduce {(_this + (player distance _x))}) / count allPlayers
_longestString = ["a", "bb", "ccc"] reduce {[_this, _x] select (count _this > count _x)}
:3
@lavish ocean Good news on CSO with local param, cheers!
Does anyone know what _this is referring to in this excerpt?
if (!isNil "_this") then { _owner = _this select 0 };
Hello, guys! Rather obvious question, but i have not encounter this moment yet: How heavy is the mission trigger? Is is similar to waituntil {condition}
Paul, _this is an argument passed to function
Thanks for the quick reply. I understand that, but I don't know where it's being passed from
maybe I'm misunderstanding the way _this works
@calm bloom every 0.5 sec heavy vs almost every frame with waitUntil
trigger timeout is not the cycle period, right?
What do you mean?
I mean "timer values" field
"competition"
gimme your best switch code-cases you have (should all be deterministic in some way)
hint not related to SQF-VM test cases in any way 🙄
i will start to show some "example" of how a potention "case" may look like:
private _result = switch 1 do
{
case 0 : { "0" };
case 1 : { "1" };
case 2 : { "2" };
default { "default" };
};
_result // "1"
now it is your turn guys
do not be shy
all ingame-tested stuff is valid
anotherhint as said: not related to SQF-VM test cases in any way!!!1111elf
sorry, wrong discord))
You didn't say 'best' on which criteria so I assume best on insanity
_a0 = 0;
_a1 = 0;
_a2 = 0;
_a3 = 0;
_nExp = 9999; // Amount of experiments
for "_i" from 0 to _nExp do {
switch (0) do {
case (floor (random 2)) : { _a0 = _a0 + 1;}; // WIll happen 50% of time
case (floor (random 2)) : { _a1 = _a1 + 1;}; // WIll happen 25% of time
case (floor (random 2)) : { _a2 = _a2 + 1;}; // 12.5%
default { _a3 = _a3 + 1;}; // 12.5%
};
};
// Returns [0.5, 0.25, 0.125, 0.125]
[_a0/_nExp, _a1/_nExp, _a2/_nExp, _a3/_nExp]
Maybe if I thought a bit more I would come up with something more insane
i am totally not transforming that into some SQF-VM test-case @astral dawn
Lol you could check how random your random is with that
as random as one could get without "mod" but rather the "INT_MAX" trick 😉 😄
though ... rly ... need to get sober again ... that thing is horrible
Has anyone noticed that playSound3d is no longer broadcasted across the server like it used to? Wiki still says it should be but one of my scripts recently broke a while ago and I only just now got around to fixing it. Curious if anyone else encountered this.
Hello. I wish for PM from tows that can help me out here! :)
I am creating a mission in 3Eden and I have stumbled on an holdback.
BTW this is ACE and ALIVE relative!
I have used the ALIVE modules to make civilians spawn on the map. (Standard ALIVE Civilian spawn) And if I use Allow interact in the module "Civilian Population" We can interact with them in-game to detain, tell go away and so on...
But I wish to have this on the ACE interaction menu instead. This is script based function I believe so I might ask in the wrong Channel. But plz HELP :D
Regards!
(I ask in Script channel to.)
this is also posted in @mission_makers
is there a way to force a soldier to give his status update? Like when you use the "Report Status" order
if (isServer) then {
sleep 10;
{
_x addCuratorEditableObjects [playableunits ,true];
} foreach allCurators;
};
What can I replace playableUnits with to instead get all Blufor?
I have tried just simply blufor but no luck
wait, perhaps west
Nope, any ideas please ^^?
playableUnits select {side _x == west}
Okay, managed to get it right with
if (isServer) then {
_blufor = [];
sleep 3;
{
if ((side _x) == west) then {_blufor pushBack _x}
} forEach allUnits;
sleep 2;
{
_x addCuratorEditableObjects [_blufor,true];
} foreach allCurators;
};
@opal dawn Does anyone know what _this is referring to in this excerpt? not enough information to tell.
@vapid crypt playSound now has a volume limit. Make sure your not exceeding that.
{
if ((side _x) == west) then {_blufor pushBack _x}
} forEach allUnits;
That's literally what select does. @real moat
Hello beloved scripters. Does anyone know of a command to turn a marker transparent? there is a slider in the editor but i was not able to find a command on the BI website
ah perfect. dont know how i missed it
@real moat if you put the whole thing in a really slow running loop, its Zeus compatible.
assign each object that gets pushed into the array a variable that declares it "already checked"
How can I make an action (created by addAction) usable in an area. So you don't have to be looking at anything special. You just have to be in the area.
Do I need to add it to the player?
When I want to check position on a VTOL copilot, what is it then called?
its not a driver nor a gunner
I'm late to the party, but hoooo damn @still forum I wasn't expecting that when you said it was fixed 😄
(re: addWeaponWithAttachmentsCargo)
I have a script that replaces bullets with crazy stuff on the fly, but this is way better
You still can't reload tho. It just works because it sets the magazine on low level
ah, figures, but you can script your way around that so it's definitely useful 😉
on the subject of more inventory commands (e.g. removeOneItemCargo), I submitted a ticket a while back, perhaps something in here could be of use? https://feedback.bistudio.com/T124736
"designed to work with a specific magazine's UID" doesn't exist.
Items have no UID
All they have is "index inside container"
but if you have weapon(0),magazine(1) in a container. And remove the weapon. The magazine's index changes to 0
so that's basically useless. Unless combined with a command that lists all items in an array starting from index 0
hmm
could you see any use behind the output we're getting from soldierMagazines then? it spits out stuff like
["6.5 mm 30Rnd STANAG Mag(30/30)[id/cr:10002981/0](9x)
if i open a .sqf which will unhide markers using the setMarkerAlpha command via addAction will the markers be unhidded for all players?
and the id/cr:10002981/0 part was why I originally thought there was a UID
it's id and creator. Just like vehicle ID's yes
that might work for magazines. But nothing else
hm, shame
@modest temple setMarkerAlpha is EG, so yes
And you'd have to write extra netcode for these "remove" things. Which is too much work
EG?
Effect Global (Commands can have Arguments or Effects that are Local or Global. [AL/AG and EL/EG])
I guess BI noticed that themselves after they already started with these commands taking ID's and stuff
yeah, that would explain why the magazines have them
ah well, maybe in their next game they'll get round to it 👀
WARNING: this is HIGHLY experimental build
may break scripting which depends on createVehicleLocal (which could be insafe for multiplayer)
please update your scripting accordingly (either to use createSimpleObject or CreateVehicle for correct multiplayer global sync)
1.92.145742 new PROFILING branch with PERFORMANCE binaries, v07, server and client, windows 32/64-bit, included linux 32-bit server
- more crash fixes (not included in 1.92.main yet)
- scripting command createVehicleLocal was restricted in multiplayer
enter-able vehicles, shots, explosions and similar are no longer possible to spawn
(the old behavior can be turned on via "unsafeCVL=1;" in the description.ext or server's config) - new optional parameter added to scripting command createSimpleObject
createSimpleObject [par1, par2. local];// as bool, to enable local only effect
note: this is manual download only, not available on steam branch until some adopting/fixing/testing ...
note: it needs both client and server for the changes to have effect (the part affects local part not remote)
My last unit and now my new unit absolutely HATE this stupid idle timer for our small milsim groups. Whats the current news on how to disable it? Im really surprised there isnt more uproar about it because its one of those features that Im sure 99% of server owners never aske...
in short, many wished and asked for simple local objects ... now you got it 😃
details, feedback, the usual #perf_prof_branch
Hello everyone. How i can detect, that someone fix vehicle by repair kit? Maybe EH or something else?
That was one hell of a productive hour of work.
Cross your fingers that these will get through (except fix variable assignment) like addWeaponWithAttachmentsCargo did
If we're lucky we get that in 1.96
If you guys have more ideas then shoot them at me. Especially things that you think are simple. I won't get hard stuff done in the half an hour free time at work
supportInfoFull that actually does return all operators with their precedence, types, description, whateveristhere
[
"operator",
"b", // or u, n, t ... you know the deal
["STRING", "SCALAR", ...], // left-hand types
["STRING", "SCALAR", ...], // right-hand types,
4, // precedence
"moar"
]```
trim__ and assembly__ could also be useful (at least for me all that is) to have as real commands instead of sqf-vm only
or what about some equivalent to allfiles__ to loop through all files at a given path?
Would it be particularly difficult to add a getPlayerGUID command? Lazy me from years ago would have loved not having to tie in an external tool to convert SteamID to GUID
privateNamespace / localNamespace / whatever name is better to setVariable a private/local variable from a string argument of a variable name:
privateNamespace setVariable ["_myvar", 123];
I don't really remember why I ever wanted it but I remember that I wanted it very much so it might be important, maybe 🤔
But I don't understand, are you writing code for BI now, or just laying out these plans? 🤷
I don't know why your attackTarget isn't on my list I've heard you talk about it atleast a dozen times 🤔
assembly won't happen.
allfiles neither, security.
trim is a nice to have, especially when you can tell it which characters to trim.
also a stringReplace 🤤
setting a local variable?.. ugh... Would need to be a seperate command, local variables are not a "namespace"
getPlayerGUID is easy
Mh 🤔 getting my hashMap into the base game would be neat AF 🤔
but a string->any hashmap is boring, we already have workarounds to do that with namespaces
any -> any hashmap? 😛
we buy any car..any any any any
Yes any->any hashmap is what I have in intercept_cba and that would be really useful
Biggest issue is that it would behave like an array (by-ref, deep copy, publicVariable transfers WHOLE thing)
now think about it how you are going to serialize it
array of keys, array of values
and then serialize just like normal array is already serialized
many of the useful commands in the past were rejected because you have to provide the whole shebang including serialization
I already have serialization ready in intercept_cba I think 🤔
and thats a lot of code
Nah, not that much
yeah apply is like 10 pages
10 pages of post-it notes? 😄
It's on my todo. Will see.
I think I'll push that to top prio
you should be able to save game and load with all the data in containers as before, hashmap should load from save too
yeah. No problem at all
force AI to equip launcher and stay with it. As right now bots immediately switch back to primary/holster every weapon.
also, i can't order AI to force fire launcher reliably when they have any other weapon. I need to remove every magazine / weapon for them to shoot it 100% time.
AI stuff (most of it) is too high for me 😄
I can poke the room temperature air that's hanging out in the devs chair 😄
Remember guys. Easy stuff :D
And what about AI convoy mode, where they do OFP-like convoy that works? Wouldn't that be just disabling few "features"?
you can already use the new calculatePath and setDriveOnPath for that
Well it won't make them recalculate a path when a track blocks the points passed to setDriveOnPath, right?
Instead they will smash the truck with even higher, more violent velocity, probably causing quad dammage, intense explosions, vehicles being arma'd 200 meters into the air, etc
it would be nice if there was an option to:
-
Set specific regenerate factor for supression bots:
https://community.bistudio.com/wiki/setSuppression
As right now they are regenerate in like 1-2 seconds (as i tested some weeks ago) -
Maybe EH for
nearMiss? As the engine somehow know this, bots get supress when fired nearby.
yeye AI stuff i know, but allways 😛
Small question: What would the syntax be to call the same script in a subfolder? Bunkernyckel = compile preprocessFileLineNumbers "las_bunker.sqf"
Tried subfoldername/scriptfile.sqf , subfoldername\scriptfile.sqf but to no sucess
https://gyazo.com/24ef99a5e9a2f9dc534ca069e6518d62 include file x\cba\addons\main\script_marcos_common.hpp not found
Anyone know why sqf _serverpassword serverCommand format ["#exec ban %1", _UID];
is kicking instead of banning people?
https://gyazo.com/297e95e576dfca20f3ba539ce3d09a95 CBA LOADED. and above error.
send rpt
mine? or the servers?
Capwell
I have my answer to you written, but waiting for biki to load before I post it
not loading cba
??
Ah no wait.. wtf
=====================================================================
== C:\Program Files (x86)\Steam\steamapps\common\Arma 3\arma3server_x64.exe
== "C:\Program Files (x86)\Steam\steamapps\common\Arma 3\arma3server_x64.exe" -port=2302 "-config=C:\Program Files (x86)\Steam\steamapps\common\Arma 3\TADST\S1\TADST_config.cfg" "-cfg=C:\Program Files (x86)\Steam\steamapps\common\Arma 3\TADST\S1\TADST_basic.cfg" "-profiles=C:\Program Files (x86)\Steam\steamapps\common\Arma 3\TADST\S1" -name=S1 -filePatching -autoInit -mod="C:\Program Files (x86)\Steam\steamapps\common\Arma 3\!Workshop\@CBA_A3;```
Usually all pbo's are listed on startup, there are none in your log.
Well something must be wrong with cba pbo's
Yes, because it isn't getting that far
maybe typo in path, or corrupted files
@wispy cave how do you know that it only kicks? can the "banned" player just rejoin?
it doesn't create a entry in bans.txt?
https://gyazo.com/30d28e6f756b759be66da4f8391e8fdf cba_main.pbo
the player that was banned rejoined right after that command was issued and he was kicked of the server
he was manually banned by an admin not long after
maybe missing file permissions to load that cba pbo.
The server isn't just crashing randomly. It's crashing because that file is not there, and that pbo is not loaded properly.
Maybe some other addon has same pboprefix and is overwriting the cba one
Your tons of DShouses errors right before it kills itself don't instill confidence that your addons are set up correctly.
Could use a little help on how to write an IF statement that checks for multiple player classes like B_T_Helipilot_F and B_T_Helicrew_F. I am trying with a long list of ||'s but it only checks on the first 😦
show what you've been trying
Send the full if statement
[west, "BLU"] commandChat format ["Na na na, didnt say the magic word %1.", name _enterer];
if ((_position == "driver") or (_position == "gunner")) then {
_vehicle action["getOut",_vehicle];
};
sleep 0.1;
if (isEngineOn _vehicle) then {
_vehicle EngineOn false;
};
biki is bad right now yes
@languid schooner what are you actually trying to check
that check doesn't make sense logically, it will always be true
if they are one of those classes they pass and are able to stay in
because if they are not one of the pilot classes they should not be allowed, and then in the else i approve them
You are mixing up "and" and "or"
those || are or's right?
yes
I dont see how I mix it up then, please explain 😃
You want only red cars and green cars to come in.
You are checking
if not a red car, OR not a green car, then don't let in.
Well a green car is not red, so the first part is true. So green cars are not let in
and a red car is not green, so the second part is true. So red cars are not let in
And a yellow car is also not red nor green, so both parts are true. So yellow cars are not leg in.
No car can ever get in.
Let's turn this around and swap the or with a and.
if not a red car, and not a green car, then don't let in.
green car is not red, but green car is green! So it can get in.
red car is red! it can get in!
yellow car is not red, and also not green, so it can't get in.
geez
i get the picture
it works now 😃
private ["_vehicle","_position","_enterer","_enterer_class"];
_vehicle = _this select 0;
_position = _this select 1;
_enterer = _this select 2;
_enterer_class = typeOf _enterer;
if ((_position == "driver") or (_position == "gunner")) then {
if !((_enterer_class == "B_Helipilot_F") || (_enterer_class == "B_T_Helipilot_F") || (_enterer_class == "B_T_Helicrew_F")) then {
[west, "BLU"] commandChat format ["This is carrier command, calling unit %1.", name _enterer];
sleep 3.0;
[west, "BLU"] commandChat format ["You are not authorised to fly that aircraft, leave it immediately."];
if ((_position == "driver") or (_position == "gunner")) then {
_vehicle action["getOut",_vehicle];
};
sleep 0.1;
if (isEngineOn _vehicle) then {
_vehicle EngineOn false;
};
} else {
[west, "BLU"] commandChat format ["This is carrier command, broadcasting to all units!"];
sleep 3.0;
[west, "BLU"] commandChat format ["%1 have been deployed for CAS support.", name _enterer];
sleep 3.0;
[west, "BLU"] commandChat format ["Squad leaders may call in air strikes or surveillance missions on the radio."];
};
};```
oof
please use params
and don't use private ARRAY 😄
there are multiple ways to solve it.
A different way would be "if class is not in list" -> throw out
btw dedmen, I figured out why it wasn't banning them, my own fault
It's a script i found that i am trying to modify to work for my needs! 😦
oof. If only people would update their year old scripts regularly in case anyone copy-pastes them 😄
well i think someone reposted it, it wasnt from github or anything like that
was a forum post on armaholic i think
Yeah A different way would be "if class is not in list" -> throw out has been something I was thinking about too
v2.
And also... is there really no other option to set group names other than with CBA?
I am trying to avoid using addons on the server
And thanks btw Dedmen (and Capwell) 😉
currently having an issue with my ORBAT
trying to have 3 companies under 1 main battalion, it doesnt seem to work however
{
class 3rdRecon
{
id = 3;
idType = 1;
side = "West";
size = "Battalion";
type = "Recon";
commander = "Price";
commanderRank = "Major";
text = "%1 %2 %3";
textShort = "%1 %2";
assets[] = {{B_UAV_02_F},{B_T_LSV_01_armed_F,50},{B_Heli_Light_01_F,6};
subordinates[] = {1Company};{2Company};{3Medic};
class 1Company
{
id = 1;
idType = 1;
type = "MechanizedInfantry";
size = "Company";
side = "West";
commander = "Beauregard";
commanderRank = "Captain";
text = "%1 %2 %3";
textShort = "%1 %3";
assets[] = {{B_Heli_Light_01_F,2},{B_T_LSV_01_armed_F,5},{B_APC_Wheeled_01_cannon_F,8};
class 2Company
{
id = 2;
idType = 1;
type = "MotorizedInfantry";
size = "Company";
side = "West";
commander = "Wykes";
commanderRank = "Captain";
text = "%1 %2 %3";
textShort = "%1 %3";
assets[] = {{B_MRAP_01_hmg_F,10},{B_Truck_01_covered_F,10};
class 3Medic
{
id = 3;
idType = 1;
type = "Medical";
size = "Company";
side = "West";
commander = "Victor"
commanderRank = "Captain";
text = "%1 %2 %3"
textShort = "%1 %2";
assets[] = {{B_Heli_Transport_01_F,2},{B_Truck_01_medical_F,6};
};
};
};
};
};
};```
what have i fucked up here
aparrently something is wrong with line 14, assets
{ instead of =
but that doesnt make sense bc the BI wiki says it should be {{
does anyone know how to use breakpoints to debug and test?
revised code
{
class 3rdRecon
{
id = 3;
idType = 1;
side = "West";
size = "Battalion";
type = "Recon";
commander = "Price";
commanderRank = "Major";
text = "%1 %2 %3";
textShort = "%1 %2";
assets[] = {{B_UAV_02_F},{B_T_LSV_01_armed_F,50},{B_Heli_Light_01_F,6};
subordinates[] = {1Company, 2Company, 3Medic};
};
class 1Company
{
id = 1;
idType = 1;
type = "MechanizedInfantry";
size = "Company";
side = "West";
commander = "Beauregard";
commanderRank = "Captain";
text = "%1 %2 %3";
textShort = "%1 %3";
assets[] = {{B_Heli_Light_01_F,2},{B_T_LSV_01_armed_F,5},{B_APC_Wheeled_01_cannon_F,8};
};
class 2Company
{
id = 2;
idType = 1;
type = "MotorizedInfantry";
size = "Company";
side = "West";
commander = "Wykes";
commanderRank = "Captain";
text = "%1 %2 %3";
textShort = "%1 %3";
assets[] = {{B_MRAP_01_hmg_F,10},{B_Truck_01_covered_F,10};
};
class 3Medic
{
id = 3;
idType = 1;
type = "Medical";
size = "Company";
side = "West";
commander = "Victor"
commanderRank = "Captain";
text = "%1 %2 %3"
textShort = "%1 %2";
assets[] = {{B_Heli_Transport_01_F,2},{B_Truck_01_medical_F,6};
};
};```
still not working btw
so idk what is wrong with this code
@astral dawn I am trying to test particle effects one class at a time. Currently I am commenting out everything but 1 classes. Test . then the next and next. to see exactly what each particle effect is doing. But a better way must exist. I was currently looking into breakpoints and stepovers as a method.
@granite mist breakpoints/stepovers you mean you want a real debugger. There is only one debugger api for Arma, and currently 0 working UIs for it.
But, reading what you wrote tells me you don't actually understand what breakpoint/stepover means and does. And it's probably not what you want.
There is a live particle editor tool thingy mod. Don't know it's name
should be easy to find on steam workshop if you search for particle
Btw guys, #arma3_config is two channels below
How do I properly the CuratorGroupPlaced EH to a virtual zeus unit? What's the best practice? Do I use addEventHandler or addMPEventHandler, and when? Object init, init.sqf, or something else?
Whatever I tried it's not firing
CuratorGroupPlaced is a eventhandler, not a MPEventhandler
And you add it to the curator logic, not the unit that uses the logic
I'm adding it to a VirtualCurator_F that's playable
in initServer.sqf: `_code = {Zeus addEventHandler ["CuratorGroupPlaced", {
params ["_curator", "_group"];
hint "spawned";
}]};
[[], _code] remoteExec ["call", 0, true];`
Event did a JIP remote so I'm sure it's added everywhere just to test and still no hint
VirtualCurator_F is named Zeus
what is "Zeus"?
Ah
As I said already. you add it to the curator logic, not the unit
what would that be
I only have the VirtualCurator_F which is a virtual unit synced to 2 modules: Game Master and Gametype Game Master
I thought VirtualCurator_F was the logic
Game Master <-- that.
oooh the Module?
thanks for your help, I don't know how I missed that from the BIKI
it's all good now
_hashMap = creeateHashMap;
_hashMap setVariable ["key", player];
if ("key" in _hashMap) then {
(_hashMap getVariable ["key", player2]) setDamage 1;
} else {
{
(_hashMap getVariable _x) setDamage 1;
} forEach allVariables _hashMap;
}
Anything major missing? It's a hashMap container that is basically like an array, just a string->any hashmap.
I don't want to add new special commands, so I reused the variables names
Sadly only string keys for now. ANY key is technically possible but I need to discuss that.
Yeah. But that's not essential. You can do the forEach allVariables like I did above.
[["key", <value>]]
have you also thought about adding a corresponding copy operation?
aka:
private _copy = +_hashMap
+ operator takes ANY afaik
If I would add a constructor that takes pairs
createHashMap [[key,value],[key,value]] if I do that, then I'll add a allPairs I think.
that would actually be awesome
hashmaps already allow me to start my OOS project again
as that will make stuff WAY more simple
So if I setVariable "key" to "nil", " key" in _hashMap is going to return false as usual?
You can already make hashmaps, by creating variable namespaces
yes, setting to nil will clear. Good point! I forgot that.
but i need to explicitly delete them
OOS was supposed to be "garbage collected"
while we are at "clearing"
what about clear _hashMap
not really
you create a new hashmap
that is not the same
especially since hashmaps are also copy-by-ref instead of copy-by-value
So what's the point of this? As you say we can fake the hashmap with an object. Is it supposed to be lighter? Or serializeable or smth like that?
Everything is copy-by-ref 😄
no deleteVehicle @astral dawn but rather auto-delete when no longer used
It's alot lighter, it's serializable ofc (objects are too), it garbage collects automatically
My plan was a Any->Any hashmap, and I will expand this if I'll do that.
If not then we'll still get a efficient String->Any hashmap that acts like an array, instead of an object.
Also big part will be that you can make it final (cannot modify) to cache values from preStart (which we currently have to turn to string, and compileFinal in code so that noone can manipulate)
well ... as i said: clear is mandatory if you ask me
for arrays, it is _arr resize 0
and whilst one is implementing a clear
one could do also clear ARRAY too
So I will be able to setVariable in profileNamespace to a hashmap value and then retrieve it back, as I understand... it's pretty cool I think 🤔
yes, you could. But might aswell directly use a variable in profileNamespace 😄
Just put a tag infront of it
Well point of that is to avoid tags
I've put clear on my list, will see if I find a better way to implement than a seperate command
only thing i can imagine being even more fancy would be some garbageCollectible type:
[] call {
private _gc = createGC [{ /* callback when GCed, gets passed the GC ref */}, createHashMap]
gcvalue _gc setVariable ["_foo", 1];
};```
Don't think the type system allows nested type
mhh?
gcvalue _gc missed that part
yup 😄
that there would be awesome
actual object oriented language could then be implemented ontop of SQF
as right now, deleteVehicle is a horrible thing ... 🙈
as those vehicles outlive everything
Oh yeah me and Bill also wanted that sweet callback when a variable is deleted...
and then, createGC [{ deletevehicle gcvalue _this }, createVehicle [...]]
and poof, it is gone when no longer refered by anything
literally a smart pointer in SQF
Maybe @ebon ridge has some good ideas for new SQF commands
your GC with getValue unary command seems easy. I'll put it on list. I'll have my bare hashMap implementation done later today. GC thingy shouldn't take much longer than an hour or so.
Though I don't like the name "GC" because Arma doesn't do garbage collection
Need some better name.
It calls a function on destruction. Destructor wrapper.. wrapper. something
Maybe "CreateReference"?
It's basically a container that contains a single variable.
You'll also have to do _gcVal setValue _newValue to set what's inside it
i do not like the idea of having to use setValue too ..
simply because it creates a disconnection between those two
// New Type: REF
<value:ANY> createReference <callback:CODE>
createReference <callback:CODE>
getValue <reference:REF>
<reference:REF> setValue <value:ANY>
```maybe this?
should make all happy 🤷
plus you avoid nil references
yeah that's better. I'd put the value to the left tho.
Depends on how you are thinking about that, if it's just a variable that you wanna see when it gets deleted, you can set new values to a variable..
Maybe also a handler for when setValue is called, with old/new value.
🤷 possibilities are endless 😄
with code on the right, one also could make some unary variant (updated top post)
You could also just use array as value if you want to be able to modify it. So maybe we don't need setValue
Oh yeah. I haven't thought of that, that's also neat
though ... then the reference part makes less sense without setValue
are you considering stuff to add to Arma itself, or is the intercept plugin you are writing?
Same as addWeaponWithAttachmentsCargo
I didn't know about your addWeaponWithAttachmentCargo but I've found this msg of yours:
Dedmen12/13/2018 Kllrt gave me the ability to bring some new script commands into the game. If that works out in the end maybe I can get that one too
Now I understand what you are talking about
Contacts shifted around a bit since then
off the top of my head: return
: atleast not if it's anything more special than if true exitWith {_value}
More like exit current call{} block with result
but the garbage collection callback would be top of my list anyway
It's not forgotten. its right at the top
Moved it to in progress now. Will definitely be together with the other stuff I submit for 1.96
Is this for intercept or are you submitting stuff to BI?
(haventfollowed this channel in a while)
For the third time today: same as addWeaponWithAttachmentsCargo
is this for intercept? or are you submitting stuff to BI?
I don't know whats up with addWeaponWithAttachmentsCargo 😄
because i didnt check anything arma scripting out
ITS WHY IM ASKING YOU FURRY
So submitting to BI?
Will definitely be together with the other stuff I submit for 1.96 what that might mean 🙃
😛
🍿

Would some magical c++ thing be (a lot) faster when drawing a lot of bounding boxes?
if !(isNil "_entry") then {
_entry params ["_object", "_corners", "_color"];
(_corners select 0) params ["_x1", "_y1", "_z1"];
(_corners select 1) params ["_x2", "_y2", "_z2"];
drawLine3D [_object modelToWorld [_x2, _y2, _z2], _object modelToWorld [_x2, _y2, _z1], _color];
drawLine3D [_object modelToWorld [_x1, _y1, _z2], _object modelToWorld [_x1, _y1, _z1], _color];
drawLine3D [_object modelToWorld [_x2, -_y2, _z2], _object modelToWorld [_x2, -_y2, _z1], _color];
drawLine3D [_object modelToWorld [_x1, -_y1, _z2], _object modelToWorld [_x1, -_y1, _z1], _color];
drawLine3D [_object modelToWorld [_x1, -_y1, _z2], _object modelToWorld [_x2, _y2, _z2], _color];
drawLine3D [_object modelToWorld [_x2, -_y2, _z2], _object modelToWorld [_x1, _y1, _z2], _color];
drawLine3D [_object modelToWorld [_x2, -_y2, _z2], _object modelToWorld [_x2, _y2, _z2], _color];
drawLine3D [_object modelToWorld [_x1, -_y1, _z2], _object modelToWorld [_x1, _y1, _z2], _color];
};
Basically this but then in one command?
no
And I prefer to add things that were simply not possible or add new possibilities. instead of just making things easier for you
Was just wondering about things that might be quite simple on the backend, instead of calling a bunch of sqf
but okay
well that's all i have :3
Well you don't NEED to throw work at me
i was just thinking if i had any gud ideas, but i think all the ones i have would fall under the category "already possible, just not very ideal"
I mean a setRagdoll thing would be really cool I guess
is already on list. I already implemented that in Intercept, so should be easy to do
nice!
it's no NEED, it's FUN 😋 @still forum
F is for fire that burns down the whole town
U is for uranium, bombs
N is for no survivors when you...
Hey, is there a param to extend the time to endless in this funiction: [_target, true,15000] call ace_medical_fnc_setUnconscious ?
just use 9999999999
kk
or 1e10
hopefully i dont need to wait extremely long for this information:
If i want the config name instead of displayname, what is what i have to write where i have "displayName" written?
_displayName = getText (configFile >> "cfgWeapons" >> _selectName >> "displayName");
dang, wrong question. Fuck, i was searching in the wrong direction. To get the base config name. Because i have backpacks with items because "coolBackpack_npcMedic" but the origncal classname would be "coolBackpack"
i give up... searching: not solved. chat: not solved and forum takes way too long for making it quick... iam so frustrated about finding my way around with arma scripting. Especially since i am learning c# and see how easy it can be working with unity and/or unreal engine...
If i want the config name instead of displayname, what is what i have to write where i have "displayName" written?
_displayName = getText (configFile >> "cfgWeapons" >> _selectName >> "displayName");
just _selectName?? @keen bough
ah sorry it wa answered already
i got it now on my own
i do not even understand that question
_baseConfig = configname (inheritsFrom (configfile >> "cfgvehicles" >> _selectName));
so it literally is that lil google search away
@keen bough it will get less frustrating the moment you understand how to use the biki
i use biki, i use forums, i use google. Yet i did not stumble at this. And if i stumble about something that has no explanations and/or examples it gets even more frustrating
biki is not ideal if you don't understand what you want
but even if you do, I spent like 10 minutes today trying to find an explanation if I can make an array of arrays in config and still failed to find it 🤷
yes @astral dawn, you can
Yeah, and now you learn something in c# that its super easy, because the documentation of unity and unreal engine arent totally... crap...
i wrote thousands and thousands of lines of code now for armed assault(3) and i did struggle alot to finde the correct informations.
and oh boy, dont get me started on all those 'tutorials' with their "i explain you now this, but let me tell you about my plans what i gonna eat tomorrow" 10 minute youtube intros...
BIKI is maintained by the community mostly
think it is crap? feel free to join
the command you have been looking for literally is named configName
though ... it does not show up in google at first sadly, it would have if one would look for "config" in the first few ones
well, biki is maintained by community as I understand, and you can't blame community for not doing something
probably proper thing to blame is company itself
If you dont know exactly what you are looking for you use keywords like "backpack base name" or "get base class of item" and such
i fully blame BI for this and without the community there would not be as much modders out there as they are. Because the community at least tries to do something. That makes me happy
you work with configs
use the config stuff
not some crypting "i am a rookie" stuff
you programm, so act like one who is capable of thinking like one rather then some mindless sheep who is barely able to understand that if something then {...} is checking wether or not something is true
@keen bough You explicitly asked for 'config name' in your question, did you not just Google that?
The additional information would've revealed inheritsFrom to you
Lets see if there was a good example.
if not, add it 😛
nope, there wasnt. Not for what i wanted.
i tried to do example os many occassions but everytime i try to, nothing happens.
and those fucking kids out there driving me nuts. No, not the kind of giggling and happy kids. Just screaming on top of their lungs and shrieking... how am i supposed to focus on freaking scripting?!
@keen bough ipconfig /release
Neat, now some backpacks are going to be 'bag' as origin... great. Yeah, thanks for putting in backpacks with like "fill it with stuff because you have the _isNPCbackpack"-Extension... how am i supposed to script around this bullshit?
I am totally crazy right now, seriously.... If we/i want a prefab backpack i have to write at least a big script or two scripts (neat). But freaking npcs have npc-backpacks that autofill whenever you create them.
And no no no no... its not like players dont add ALL backpacks to cycle through the unlock-script. No... oh wait, yes they do. Because... ARGH i think i stop now... just for another few days. That alone drove me totally crazy now
now i have to write a script to detect "Are you a prefilled npc backpack?" -> "Yes? I make you the origin-backpack" -> "No? I add you as you are to our storage" ...
coolBlackBackback -> give me the original config name, because maybe youre an npc backpack -> totalUncoolBackpackNow
You sound like you need a break to calm yourself out indeed.
i even have proof.
npc backpacks transform into their non-npc backpacks, but some other backpacks transform now to "bag"-backpacks
What do you even want to achieve?
first i have to calm down for a day or two. top of the lung screamers/shriekers and horrible script-documentation are too much for today... sorry
bad combination.

What i want to achieve is very very simple.
If you kill a specific npc, they, of course, drop their equipment. But sometimes, some of those NPCs have Backpacks that get PreFilled with Stuff. Those are mostly config-Named like "awesomeBackpack_viperOperator".
I have a script that sorts out "unlimited" from "limited" stuff and packs limited-stuff in boxes to store them (and to get to them after a map restart and so on... you know, persistence)
Now, i have a black assault pack. And it seems, that the original/inherent (whatever you wanna name it) is a very simple backpack, that gets created instead.
Normally my script says "Hey, i have you unlimited. I dont need to do something with tou" but now it says "Hey, this black backpack may exist but its original config name is not black backpack but uncool backpack - i create you now in the limited backpack box"
@winter rose
if not, add it 😛
Is registration at biki allowed again or is it still closed?
Registration to biki is PM dwarden
If i do that:
_privateArray = [1,2,3];
_privateArray2 = _privateArray;
_privateArray pushBack 4;
_privateArray2 will be [1,2,3,4], right?
And if i do:
_privateArray = [1,2,3];
BRPVP_publicArray = _privateArray;
_privateArray pushBack 4;
BRPVP_publicArray will NOT be [1,2,3,4], right?
Thanks!
"_privateArray2 will be [1,2,3,4], right?" yes
"BRPVP_publicArray will NOT be [1,2,3,4], right?" no
you can use + to copy a array
@still forum hi i fixed my post
@still forum Are you sure about the first one?
Because pushback is after _privateArray2 is created, so it does not know about the 4
@still forum fixed line BRPVP_publicArray will NOT be [1,2,3], right? to BRPVP_publicArray will NOT be [1,2,3,4], right?
_privateArray = [1,2,3];
_privateArray2 = _privateArray;
now the _privateArray2 containts 1,2,3
_privateArray pushBack 4;
_privateArray = [1,2,3,4];
privateArray2 still should contain only 1,2,3... Because the pushback came after the declaration of what array2 should contain.
see #perf_prof_branch aka unsafeCVL is now in legacy mode by default
@still forum you mean **BRPVP_publicArray ** will be [1,2,3,4]?
after the end of the code
yes
Arrays are set by reference.
everything is assigned by reference.
huH? Okay
= sign doesn't copy anything, ever.
also, about your hashmap @still forum , probably it would need some hasmmapNull, isNull thing
Just one more thing:
0 spawn {
_array = [1,2,3];
BRPVP_publicArray = _array;
};
(seconds later...)
diag_log str BRPVP_publicArray;
diag_log str BRPVP_publicArray; will return [1,2,3] or nil? Because _array dissapeared.
1,2,3
ah, ok, thanks
well, I do _veh = createVehicle ..., then I do deleteVehicle _veh, _veh becomes objNull 🤷 I mean this behaviour when we delete the hashmap
but you have thought of it already I think
"when we delete the hashmap" and how do you intend to do that?
But you can't delete it.
Same as an array. You can only make it empty.
(at least not directly)
at some point it can get unreferenced completely like _hm = createHashmap, _hm = nil; or whatever?
Then it's nil.
(the var)
But if there is no explicit "delete" command for it there is no need for null type
If it's unreferenced completely, how would you refer to it to get the "null"?
so you want to say that we won't be able to delete the hashmap? 🤔 if X39 wants to use it for his OOP thing, and if I used it for my OOP thing, I would want to delete the hashmap to free memory
if hashmap is associated with an OOP object
but then I can just set my variable reference to nil myself, yeah...
If you don't have any references to it, it will be gone and free the memory
then it's cool!
no
that's not how that works.
it seems... launcher... are not in cfgweapons?
they are in cfgweapons.
and why does my script create now an error... as the baseClass name of a launcher is determined "cannot create scope-private" or something...? but with weapons it works? I ... literally am spitting fire right now
are you trying to createVehicle a weapon class or addWeapon a vehicle class?
what is your "baseClass" name?
imagine you liberate 5000 very small pieces of memory... 100% fragmented... its not a good memory
pool allocators.
for [{_loop = 0}, {_loop < _weaponCount}, {_loop = _loop + 1}] do
{
private _selectName = _weaponnameArray select _loop;
private _selectAmount = _weaponamountArray select _loop;
private _weaponBase = configname (inheritsFrom (configfile >> "cfgweapons" >> _selectName));
weaponBox addWeaponCargoGlobal [_weaponBase, _selectAmount];
};
clearWeaponCargoGlobal merc_arsenal_box;
"thisisaNPCweaponWithPreAttachements" -> "thisisthebaseconfignameoftheweapon"
arifle_Mk20_GL_F as the npc weapon of choice with pre-attachments whenever you crate it.
test1 = configname (inheritsFrom (configfile >> "cfgweapons" >> "arifle_Mk20_GL_F"));
test1 contains now "mk20_base_F"
btw, now i have unusable weapons in my box, since i dont know what, it broke arma somehow...
i was wrong. Box was just full and didnt cycle weapons
or whatever... i am totally down
mk20_base_F is not a valid weapon
arifle_Mk20_GL_F has no base weapon, and has no attachments on it either
why the... unbelievable extreme-super-ineedanewwordforthis-F word is arma then creating weapons with attachments? Am i dreaming or something? Do you want to tell me that? I mean, i dont create it with attachements but heeeey, i am dumb, and cant script like it seems.... i have it, in front of my own, dreaming eyes... god i am so unbelievable down, everytime i script something...
i literally want to cry now -.-
There are weapon classes with pre-attached attachments
but you will never get that classname when you look what a weapon a unit has
if you add a weapon with pre-attached stuff to a unit, it will immediately convert to the base weapon, with attachments on it
the classname you get is always the baseweapon
time to restart the server and throw that config cfg shit out... i dont wanna deal with it anymore
For example.
when you addWeapon arifle_Mk20_GL_MRCO_pointer_F
Which is a weapon with scope and laser pointer pre-attached.
and then check primaryWeapon classname, you will get arifle_Mk20_GL_F which is the base weapon
it's already replaced at the time you do the addWeapon
yeah, and i dream that those items in my box are without attachments, since they get created in there, in the box, with attachements. And without attachments, when i get the baseconfigname via the cfgstuff
i tell it another way:
super-viper-soldier
kill that one
take his npc-pre-attached-attachements-weapon
put it in sort-box
box creates it in limited box as it was
part2
same stuff again, but this time with cfg-shit to get the base weapons name. Now it gets created without attachements. But now other weapons are created and/or start to have massive problems and even be "arifle" in box...
so, what i do now, is fuck this shit, throw this cfgshit out of the freaking open window and say "Fuck it, let have players early unlocks of scopes and silencers, because either way, i have to script shitton around to undo it or whatever"
"take his npc-pre-attached-attachements-weapon" you cannot detect if he had a gun with pre-attached stuff
you know that i want to scream, right? I HAVE IT IN FRONT OF ME! i seee it!
Btw the baseWeapon of a weapon, is the baseWeapon config entry in the weapon class
not it's parent
oh and btw, i have testet this on the server... guess what, i cant change stuff in the editor anymore, i have to restart arma...
if this kind of stuff keeps happening i am done with it.
Why do you have to restart arma? There are multiple workarounds to not restart arma
kill viper
put weapon of viper in box1
getWeaponsCargo box1
create weapon from box1 in box2
weapons has pre-attached attachments.
great, @astral dawn Sorry if i write super-pissed. But i dont know those workarounds. I tried to edit that shit 5 hours in a row and was fighting with it for that time until i figured out i had to restart arma.
I googled for a whole day but no, i did not get an answer because either i am a freaking idiot in googling, or those are so deeply hidden informations, so unbelievable specific that i have to use extreme specific wordings. Argh i am... done. I am out for today, baba peace out.
You guys are great! you helped me more than any wiki-entry ever from bi-wiki
mabe there is a hidden feature to load my mission in editor from start-menu. But i didnt find that either.
"<path>\mission.sqm" Load a mission directly in the editor. Example: "c:\arma3\users\myUser\missions\myMission.intro\mission.sqm"
Never tried it myself
or actually right above it
-init=<command> Run scripting command once in the main menu. For example to start a certain SP mission of choice automatically. Example: -init=playMission["","M04Saboteur.Sara"]. See also playMission. The Mission has to reside in the "arma3\Missions" folder, NOT the user directory.
You know what i wanted.
parameters? No. Main Menu -> Load Editor with my Mission. I could even load a fart sound over parameters...
If they ever do Arma 4 and the same shitty scripting will be there. I am done, and not touch arma anymore...
IMO point of a company is to make game, not programming language, so I wouldn't count on it to be much better
yeah, thats okay. It will be my personal choice then to leave this series. I keep my words on those things... I know, i wont be a loss at all - i know.
Is there any way to script a command to make vehicle pylons like DAR's or skyfire rockets single fire instead of mag-dumping default?
Probably
You can add 1 and fire rather than loading a bunch and letting engine decide
for the callextension developers, who somehow missed recent 1.94 dev branch entries:
Added: RVExtensionRegisterCallback and "ExtensionCallback" mission event handler
Fixed: The RVExtensionVersion function definition not matching the Windows one (the "int outputSize" function arg was missing)
Changed: RVExtensionRegisterCallback provides three arguments now: extension name, function name, and data
you can now do more CRAZY stuff with the callExtension callback and it's mission event-handler 
I'm unhappy with the amount of work this gives me, as I now have tons of more TFAR features to implement
Can't bring the "can't efficiently do callbacks without intercept" argument anymore
is there some sort of equivalent of ctrlShow for an entire display/dialog?
good day everyone, just a small question. I pass an argument to a function that can either be an unit object or a group. I want to test if the argument is one of both types. Does (_arg isEqualType grpNull) work in this case?
okay exactly as i thought merci
Hi, somebody can explain me how i can ban a player automaticity with a reason? because i deal with #exec ban server command but i can't add any reason.
why can't you add a reason?
When player join is just You were banned no reason.
u sure?
no
wiki just says "optional text" but what else would it be ^^
will try but where u find bis said u can ban with reason with #exec ban?
https://community.bistudio.com/wiki/ArmA:_Server_Side_Scripting ban has "sometext" argument
server.cfg
according to wiki atleast
should be like that? ```sqf
['#exec ban "%1" ("MY TEXT")',_UID;
without ()
don't seems to work 😂
the wiki is lying :U
|| 😂