#arma3_scripting
1 messages ยท Page 602 of 1
ah I see. Thats cool
timings are off and audio is missing, but meh
because some doors would open on you in arma, so i decided to make breaching just slightly warp the door and allowing it to be unlocked
also, the animations are from the mocap melee mod
?
im using cursorobject just to lock the door
in the debug
the actual script is in an addon
oh alright
Yeah I got mine to 50% work
for instance it also gets stuck on the animatino
use playmovenow
Ok
is there a way to guide a bomb dropped by an AI plane into a target/position (outside scripted flight path via setVelocity)?
Yeah, i think it was mentioned there somewhere
I have an array of strings that I need to convert to an array of integers (yes they're valid numbers), best way to do this?
_array = _array apply {parseNumber _x};
(Name) = "groundWeaponHolder" createVehicle getpos this; (Name) addWeaponCargo ["Weapon classname",1]; produces the weapon but without a magazine inserted. Is there a way to place weapons with magazines inserted?
@bright steeple https://community.bistudio.com/wiki/addWeaponWithAttachmentsCargoGlobal (edit: the one i linked has global fx, looking at your example, you don't want that, https://community.bistudio.com/wiki/addWeaponWithAttachmentsCargo in that case)
#creators_recruiting @tough abyss
Hey! I Wonder if it is possible to setup MechanizedUnits in warlords through description.ext for blufor and opfor? It says in the wiki that only independent side utilizes groups and as there is no example saying mechanized for blu/opfor I figured it might not be possible...
@copper raven thanks!
@copper raven There it is! Cheers
i have the arma 3 garbage collection running, it will automatically remove corpses to prevent lag. Is it possible to exclude specific corpses from this? I have dead bodies that are hand places as part of the missions story, only for them to be gone in game.
@velvet merlin setMissileTargetPos perhaps?
also, you could play with setVectorDirAndUp to turn it towards the target
@ornate prairie yes, see https://community.bistudio.com/wiki/removeFromRemainsCollector
Lou i think the problem is we disabled the auto homing of the bombs
(but even with this one by default it doesnt work/depends on the sqf cmd and if it defines a target)
also, the target has to be in the missile aiming cone too
Hey guys, so I made this Medical stomper which basically has some stretchers on top of the vehicle. Now I am wondering how I would make a script to put the wounded on top of the stretchers, while remote controlling the UAV ofcourse. is this possible?
Can I not use addAction n on the data terminal? I have this in my init.sqf:
DataTerminal1 addAction ["Deploy close range targets", "Range1CloseDeploy.sqf", "nil", "1.5", "true", "true", "", "true", "5", "false", "", ""];
DataTerminal1 addAction ["Deploy close-medium range targets", "Range1Close-MidDeploy.sqf"];
Neither works, the scripts mentioned do work as I have tested them by calling them from the debug console
It should work, I consulted the wiki. I can move it to another object like a laptop or even every player's action menu if you think that would help, but I would like to save the player action menu for other things like activation of bullet tracing (firing range setup)
so yeah, your above code is wrong
you added quotes everywhere
the second one should work, note that your scriptnames are different
Yeah, they're different scripts. I changed the first one to include all parameters in the wiki in case that changed something. Also, can I specify the range (5) without specifying the (default) parameters before it, or should I write it all out?
all before
alright
and 5, not "5"
I'll try moving it to another object, maybe something about the data terminal is messing it up
you could have a "removeAllActions" somewhere yes
I doubt it as I just started working on this and as such have maybe 50 lines of code in all the scripts combined so far
I'll see what I can do
also, mods?
... a fair amount (smallish unit modpack). Only Aegis and Ace are required by the scenario though
try in vanilla
@foggy hedge it might be one of the mods
in your init.sqf, maybe wrap all this with a spawn:
[] spawn {
sleep 1;
stuff addAction stuff;
};
After placing some debug hints around it looks like errors in the init before the addAction stuff was causing the init.sqf to abort, interesting stuff
Fixed now, thanks
always code with -showScriptErrors enabled - saves you from some unnecessary headaches @foggy hedge ๐
I... may have been ignoring the script errors that were popping up during loading after solving them and creating new bugs multiple times
All fixed now
... probably
Thanks for the help!
I... may have been ignoring the script errors that were popping up during loading after solving them and creating new bugs multiple times
๐ฅ ๐จ
Thanks for the help!
With pleasure ๐
I'm doing this wrong and I'm not sure how. (gofordrop == true) is a perfectly valid condition, isn't it? Or did I make a stupid spelling mistake
because its giving me a generic error on it
Are there any invisible characters that can move around in base arma? I'm attaching units to another unit to give the illusion of movement. I used a civilian with hide object, while it works in SP the civilan does not get hidden in MP.
_dummy hideObjectGlobal true;
[_dummy, true] remoteExec ["hideObject ", 0];
Neither line hid the civilian.
no need for , 0 in remoteExec
where did you run this code @thorn saffron?
you also have a space in your remoteExec string, I suppose it breaks it
derp
[_dummy, true] remoteExec ["hideObjectGlobal", 0]; This would run it on every machine including server, right?
how do i test for a variable being a marker?
after all its just a string.
maybe _marker in allMapMarkers? that would test for existance.
getMarkerType? Will return false if is not a marker, i.e. does not exist as a marker
@thorn saffron ```sqf
[_dummy, true] remoteExec ["hideObjectGlobal", 2];
// or
[_dummy, true] remoteExec ["hideObject"];
ah cool, does work for other field types as well?
i want to test if an object is already an ACE arsenal. any function for that?
i want to test if an object is already an ACE arsenal.
objects "are" not arsenals, objects can have arsenals on them. Via ace interaction menu, or normal action menu, or whatever other method that you cannot possibly know about or even imagine (stand near it lie down and turn around 5 times then stand up and jump twice then crouch down, boom arsenal opens)
.. not sure if trolling but i wouldnt be surprised if ace does that
magic arsenal dance
you can check for variable "ace_arsenal_virtualItems" existing on the object, but the variable existing doesn't mean that there is currently a arsenal on there, and the variable not existing doesn't mean that there is not an arsenal on there
thats a boolean or an array of the items available in said arsenal?
first result on google: "Nondescript variable names are not particularly helpful ..."
so nondescript = no value assign, just declared?
the datatype doesn't matter is what I'm trying to say
only checking for defined/undefined is important here
why does additemcargoglobal seem to do double the count value I put in on a dedicated server?
either that or I messed something up. which isn't out of the realm of possibility lol
maybe run from an init and therefor on all clients + server?
ahhhh i bet thats what went wrong. i had it placed in the init of a box
using this additemcargoglobal blah
you can put safety measures:
if (!isServer) exitWith {};
will terminate if run on anything but the server
so it wll only run once, independent from where it was run
big brain. ill remember for next time
learned that after testing worked on testing and packed 800kg loadouts into AI during the mission. so heavy they couldnt move
HI guys! I'm trying to find the Id for my BIS_fnc_HoldAction that I made to go on a computer. No others actions on it. Where can I find that?
The purpose is to run BIS_fnc_HoldActionRemove to get rid of it, and for that I need the Id for the action as a parameter
the add function returns you the id
Today i learned the joy of binding
[cursorObject, true] remoteExec ["engineOn", 0]; to a hotkey
why , 0, tho
because arg local and I'm lazy
I mean, just remoteExec ["engineOn"] - and it's lazier!
Ah. How would I go about saving the returned actionId into a variable from?
Script looks something like this:
[
manual_override_computer,
"Access Computer",
"\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa",
"\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa",
"_this distance _target < 2",
"_caller distance _target < 2",
{},
{},
{
hint "Test";
},
{},
[],
2,
0,
true,
false
] remoteExec ["BIS_fnc_holdActionAdd", 0, placeholderTarget];
@still forum I mean,
args remoteExec ["command", 0];
// equals
args remoteExec ["command"];
```right?
dunno
Am I making sense in what I want to do?
Yes, but you would have to run with remoteExec a local script
like
{ stuff to exec } remoteExec ["call"] @surreal anvil
Hm
@still forum I mean,
args remoteExec ["command", 0]; // equals args remoteExec ["command"]; ```right?
@winter rose yes
yay, I got that right!
Hola, I'm not sure if I'm just being dumb or if I should just go to bed
This var: _hitselection which I put into a global var to check it's content in the debug menu returns "_hitselection" as string and not "arms" or "head" or "body" as it's supposed to be:
_damage = getAllHitPointsDamage _target select 2;
_inj_head = _damage select 3;
_inj_body = (_damage select 5) + (_damage select 6) + (_damage select 7);
_inj_arms = (_damage select 9) + (_damage select 10);
if (_inj_head > _inj_body) then
{
if (_inj_head > _inj_arms) then
{
_hitselection = "head";
};
};
if (_inj_body > _inj_head) then
{
if (_inj_body > _inj_arms) then
{
_hitselection = "body";
};
};
if (_inj_arms > _inj_head) then
{
if (_inj_arms > _inj_body) then
{
_hitselection = "arms";
};
};
["_hitselection"] spawn
{
params ["_hitselection"];
_target = p1;
hitselection = _hitselection;
};```
p1 is my unit.
this code is very much simplified so I could find where the error is
ohh, so if I have multiple variables there, let's say I want to also foward _target would I just put it like this: [_hitselection,_target] spawn ?
Yep
You just passed a string as argument, not the variable itself
The rest seems good!
Roger, much appreciated ๐
@winter rose I think I know what you mean, just haven't gotten an opportunity to try it yet, hence my "hm"
okido
biki 1.0 release soon? https://community.bistudio.com/wiki/To-do
It's in alpha state, we may remove commands from it
Biki 2.0 is in the works ๐
was
Wait til Lou sees how much he's gonna have to do for ARMA 4
zdahp reminding meh!
Lou, you can always blame the devs for not documenting their code ๐
Blame Dedmen? Or have they stuck him in the SQF closet and thrown away the key?
Why not both?
@restive leaf no api
None that you've seen anyway ๐
Well, more seriously there is already a basic enforce syntax document available... question is how much it changes
But no function references or the things we've come to expect on the ARMA section of the biki
Though outside of Bohemia there is more documentation around...
If no one is willing/able/capable to add stuff to the wiki than it won't be added ๐คทโโ๏ธ
if there is a release, they will provide a basic documentation like export, and we will get to do fill it more
I don't believe an Arma 4 would be released without a beta anyway
Alsoโฆ #offtopic_arma or #community_wiki ๐
EDIT: Nope crashes the game.
whoa just found a new way for recursion.
_a = [1,1,2];
_a apply {
if (_x == 1) then {_a append [3]};
_x
};
_a // [1,1,2,3,3]
in this case not but i have another application that does
_ctrls apply {
_ctrls append ("isNumber(_x>>'type')" configClasses (_x >> "controls"));
_x
};```
especially useful for getting the controls from controlsgroups
Actually it is a bad idea. it crashes the game on some instances...
probably if the array resizes ๐ฟ


i was kind of expecting it to mess up but not on such an seemingly random basis
it probably happens at specific array sizes.
like when appending on an array of size 8, or 32
something like that
hmm i executed the same script with the same array 4 times and it crashed but on another one just once was enough
it probably happens at specific array sizes.
array size was always max 3
protip: don't edit something you iterate ๐
Solution: Message before it executes: "The game might crash in the next few seconds. Dont know dont care."
getCursorObjectParams doesnt return selection-name for vehicles. Intentional or bug?
never heard of that command ๐
really handy
i use it in my action-menu replacement scripts
video of the script below:
https://streamable.com/z2apfr
Use the lineIntersect instead
more precise
to be precise:
https://community.bistudio.com/wiki/lineIntersectsSurfaces
this doesnt return selections, does it?
Nope, not the ones you want
Oh, you mean using returnUnique false @jade abyss
Me neither tbh
still doesnt help
If you say so
im looking to get the name of the selection of a vehicle you are looking at
LineIntersectSurface nor intersect return the selection
so it's not me saying so
it's the wiki saying so
Finds named selections in object which are in specified LOD, intersected by given section of a line. Return value is in the form of [selection, distance]. Multiple returned arrays are nested within a single array. No intersection returns []. lodName could be one of the following:
Yeah... it was the fact that you also use intersect I think
Thank you for you help โค๏ธ
it's otherwise great, but doesnt return the selections of a door on any of the LOD's, strange
car-doors, that is
You mean the V3S?
no, like vehicles
actual cars
it finds the glass, bumbers, wheels etc.
but doors are not selections, even on "VIEW"
The Ifrit has doors iirc, but I don't know if they are still openable now
Lou, can we get an update here:
https://community.bistudio.com/wiki/getCursorObjectParams
no
ok
Update about?
oh, yeah, never mind
it's not wrong
it's jsut that those aprts dont have selections
strange
because the doors are in "selectionNames"
ifrit doesnt have door selections either
only wheel, glass etc.
like they dont show up in any of the commands, only in selectionNames
Does anyone have a ready script for saving/exporting certain groups {, / with} vehicles and objects ?
to clear/restart map and move assets
typeOf _ac
,getPosWorld _ac
,[vectorDir _ac,vectorUp _ac]
,call{ _v_s = everyContainer _ac;
{ .. } foreach _v_s; .. }
..
best way to get a group to follow a single unit? no vehicles involved.
does the follow waypoint actually work? i read a lot about how its just a heli waypoint that works clumsy
or is that old info
yup follow waypoint does nothing on infantry
Does anyone know if a pylon's weight value is updated when the magazine is empty?
hmmm how can I get this to work?
[Main_Entrance, Docks] execVM "scripts\teleports\tunnelTeleOptimized.sqf";
_entrance = _this select 0;
_exit = _this select 1;
_entrance addaction [
("Teleport to " + str _exit),
{
_target = _this select 0;
_caller = _this select 1;
_caller setpos (getpos (_exit))
}
];
I get a failure on getpos (_exit)) saying undefined, but I thought I did earlier in the code. I'm trying to make this teleport script work with arguments so I don't have to type every single possible location.
_entrance = _this select 0;
_exit = _this select 1;
_entrance addaction [
("Teleport to " + str _exit),
{
_target = _this select 0;
_caller = _this select 1;
_caller setpos (getpos (_this select 3))
},
_exit
];
the addAction code is a new scope, so local variables from the script it was added in arent available.
oh I see. derp
@fair drum
Take a look at https://community.bistudio.com/wiki/params . Might help clean up your code 
is it possible to change a cfg value of a vehicle in game using setVariable?
Impossible
unfortunate
How to pass the arguments into the function that can be seen in this addAction sqf soldier1 addAction ["Test action",{_this call TEST_fnc_onLoadFunc},"Test_Access",0,false,false,""];
when not using addAction but something like this soldier1 call TEST_fnc_onLoadFunc
In this case Test_Access is passed into _this select 3
Should be yes, I guess.
But what I'm trying to ask is that how do I pass those arguments when not using addAction. I have this now and does not work the same way as with addAction
[soldier1,["Test_Access",0,false,false,""]] call TEST_fnc_onLoadFunc;```
*edit: ok so first of all I needed to get rid of the unneeded addAction specific parameters. Then I needed to change the parameters in TEST_fnc_onLoadFunc to match the caller (in this case soldier1) and the arguments (in this case "Test_Access"). Got this part working now as I need it to*
Hi, one tough question. Does anyone know how to create a "someone is calling me" effect like in Old Man when main character has been called?
Obviously it's playSound, but in terms of graphics being shown on the screen?
BIS_fnc_OM_phone_incomingCall Maybe? Or you could check inside of some of functions to emulate it
how would one disable a respawn point that was made using the respawn position modules?
ah ok
Most likely use this https://community.bistudio.com/wiki/BIS_fnc_removeRespawnPosition
salamibean, you can also use enableSimulation on those vanilla modules. With respawnModule_1 enableSimulation false you can disable the module

Is that so
Never used the Editor respawn modules, but i think that's noteworthy if not yet documented
I don't think so, because most modules are just script and variables "holders", but some scripts may take simulation into account
Well.. I have been using that enableSimulation for just that
edit: I mean for enabling or disabling vanilla BIS modules on the go that are available in the Eden editor
I tend to make my own respawn scripts with cardgames and street performers
i will delete and disable simulation just to be safe lol
i need it off permanently so its not a big deal
how can i get units group into an array of strings?
Strings representing what, their names?
yeah i want to do a getartilleryammo but can't use units group cause getartilleryammo requires an array of strings and units group gives me an array of objects
units _theGroup apply { name _x };
But it won't work for this usage
GetArtilleryAmmo does not take unit names ๐
Yup, Return value
so doesn't units group give me an array of units then since a unit is an object?
Yep
so i should expect getArtilleryAmmo units groupname to return an array of strings of every possible ammo in each of the units in the group?
units artygroup returns: [arty1D,arty1G,arty1C,arty1D_1,arty1C_1,arty1G_1]
therefore, getArtilleryAmmo (units artygroup) should return: ["ammo1","ammo2"...]
but I get a []
Did you try returning their vehicles instead of the units?
I personally dont know the command so not sure, but that may work
getArtilleryAmmo [
vehicle ((units artygroup) select 0)
]
I did this and it worked, so yes, you are right
end result
https://pastebin.com/P44HzihW
i know. if they are all the same arty, it shouldn't matter right?
hi again,
is it normal that no matter how many scripts i try i cant simply get a player to respawn with the gear they died with? whats most interesting is sometimes it works.....
you want the gear that they had at the time of death or the gear they had at the start of the mission
locality usually messes me up. check that
i wouldnt mid so much but 1/10 times it works
How can i test to see if a script has run?
is there a command to add a value to a single component of a coordinate position? Let's say i want to increase the height of a position without having to redefine every single component of it?
or just add vectors together?
i guess it's gonna be the later one
This is probably one of the simplest methods, although vectorAdd will do the same things (if not better)
// move object 1m higher
_object setPos [_object getPos select 0, _object getPos select 1, (_object getPos select 2) + 1];
@exotic flax vectorAdd is better, also getPos _object ๐
I was on my phone
forbids phone
is there a way to enable mouse-cursor in the camera?
(camera created through camCreate)
Maybe via making a dialog?
Does exitWith {0} in a handleDamage eventHandler count as returning 0 for the purposes of the damage handling?
It seems like that would exit the call but not the EH
I think I've just figured out an alternate route though
it does, and thats the same thing
if the whole EH is a call, exiting the call will exit the EH
I was confused by how to format that so I just modified an existing if into an if else, which also works but has the added benefit of my thick head understanding it
So I return, once again trying to remove a BIS_fnc_HoldAction from my object. I tried this:
[manual_override_computer] remoteExec["BIS_fnc_holdActionRemove",0];
It didn't work though. No errors, just didn't get rid of the old HoldAction. Am I doing it wrong?
holdActionRemove requires you to provide the ID of the action to remove
the ID is returned when you call BIS_fnc_holdActionAdd. You'd want to store it as a variable at that time, then reference the variable when you want to remove it. In your remoteExec, you would reference it like so:
[[manual_override_computer,_yourIDvariable]] remoteExec ["BIS_fnc_holdActionRemove",0];```
Depending when/where you add the action to begin with, you might need to convert the ID from a local to a global variable when you store it, then back again when you reference it.
Hm
The holdAction I want removed is created like this:
[
manual_override_computer,
"Access Computer",
"\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa",
"\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa",
"_this distance _target < 2",
"_caller distance _target < 2",
{},
{},
{
hint "UNAUTHORIZED ACCESS DETECTED! PLEASE REMAIN WHERE YOU ARE, SECURITY WILL BE WITH YOUR SHORTLY... HAVE A GOOD DAY..."
},
{},
[],
2,
0,
true,
false
] remoteExec ["BIS_fnc_holdActionAdd", 0, securityCodeMan];
That's the only code in it
one sec
I appreciate the help a lot, by the way
It returns the variable the same as any other script command returns it: silently, and only storing it if you tell it to.
You tell it to store it like so:
_yourIDvariable = [ ...etc
Alright, and it still creates the holdAction if I do it that way?
It returns the variable the same as any other script command returns it
no it doesn't. remoteExec doesn't
I was just thinking that
Think that might've been me, too. This is the continuation of that
use local code as I told you, and use another local code to remove the action
It looks like the action ID is passed as an argument to any of the code results of the action, so it's a little more complicated but not unsolvable
I'll fiddle some more and see if I can make it work
Right. Some refactoring has been made.
_actionId = [manual_override_computer, "Access Terminal", "", "", "_this distance _target < 3", "_caller distance _target < 3", {}, {}, { hint "Test";}, {}, [], 2, 0, false, false] call BIS_fnc_holdActionAdd;
What I'm doing here is simply to try and store the Id.
I then try to convert it to a global variable like this:
publicHoldActionId = _actionId;
publicVariable "publicHoldActionId";
I THEN try to use the public variable as a parameter in the remoteExec. It's not working though, and now I'm truly stumped.
Sorry for my stumbling, but this is somewhat difficult for me to grasp
Okay, how would I change that around to actually let me use globally?
Every player when you assign an action gets a different ID. Therefore, you need to retrieve them and remove them accordingly. You can do this easily by storing the variable on player by setVariable, so when you want to remove, you can then get the ID on each player and remove them that way.
where/how do you add that action?
I think he had written a remoteExec code before
this is not a simple question that can just be answered with a solution without all the information about what you are actually doing
so this is just a snippet of actual code
remoteExec and that code snippet above are doing VERY different things.. soo
what doing, exactly?
Is there any way to reliably check if a mod is loaded?
Besides making it a dependency of course, as I'd like to make a mod an optional dependency which provides extra functionality
isClass'ing CfgPatches is the best way IMO
Yeah true. I'll explain in full in a bit what my desired sequence of events is
is there any way to detect dummyitem.p3d any more accurately?
the hitboxes for them are HUGE
for so small items
or to have items in a ground-container that isnt as big as the sun?
i dont really feel like making a custom object for all arma 3 items
maybe i'll try lineIntersectsSurfaces instead of lineIntersectsObjs
not expecting much
Right, so. Explaining what I'm trying to do with these holdActions:
There are two objects. A man, and a computer.
The computer creates a BIS_fnc_holdAction on itself.
The man has a BIS_fnc_holdAction that, when run, creates a new holdAction on the computer.
All of this works. What I WANT to do is remove the already existing holdAction that the computer has. This would likely be done from the man's holdAction, as it creates the new action to begin with.
Does that make sense?
is there some event which I could use to detect if vehicle is transporting something (ViV)?
https://community.bistudio.com/wiki/getVehicleCargo @dim terrace
not event, but you can use this to detect
can i somehow change the size of a dummyitem?
How do I modify the following to include distance parameter?
[player, "music1"] remoteExec ["say3D"];
I tried:
[player, "music1", 200] remoteExec ["say3D"];
But that doesn't work...
try
[player, ["music1", 200]] remoteExec ["say3D"];
QQ: Is there a real difference in performance impact waitUntil { time > 2400; sleep 1; }; vs. waitUntil { time > 2400}; ? It seems obvious to use the sleep, but the command is so simple that it might not even be measurable unless you spawn thousands of waituntils? (aside from the fact you cant do that command because it returns nil)
afaik does waitUntil normally run every frame (as long as the code inside allows it), so adding a sleep inside it will simply slow down the check to once per second instead of once per frame.
and I'm not sure how long a frame takes, but it's certainly more than once per second, meaning it will cause extra load when not limiting it
at 60fps a frame might be 16ms long. Which means waitUntil would check its condition 60 times a second
with sleep1 it only checks "is the sleep over yet?" 60 times a second
you mean 1 time per second?
oh wait, no, sorry i misread
it was about checking the sleep and not the condition
nah, i meant what I wrote ^^
@lost copper
TheRecord = player createDiaryRecord ["diary", ["Test", "Test"]];
// ...
player removeDiaryRecord ["Diary", TheRecord];
```works! going to fix removeDiaryRecord page too
What's a better way to check whether a vehicle has a primary gunner seat?
fullCrew [_vehicle, "gunner", true] isEqualTo []
is there any difference between:
fnc_someStuff = {
if (condition) then {
/* some code */
};
};
and
fnc_someStuff = {
if !(condition) exitWith {};
/* some code */
};
?
* the = was added later
what am i doing wrong?
fnc_someStuff = {/*smth*/};```
nvm, sorry for the very crucial typo
aight, now, what is the difference between the two?
Well, the difference is โdifferent codeโ after all. It would does the mostly same thing but you know there's always hundreds and hundreds way to do the same thing so...
yeah, thats practically no difference, thanks a lot!
@digital hollow you could always look at the config ๐คทโโ๏ธ
Morning,
any idea what this could mean in my server rpt. mission doesnt run
mission.sqm, line 10248: '._plyr': '๏ฟฝ' encountered instead of ';'
Everything works fine before i pack it
"pack" it?
export to .pbo
with what?
the game. 'Export to multiplayer'
sure
you have an undefined character at line 10248
have you tried not packing it or using something else?
๐คทโโ๏ธ
have you tried packing it using something else?
are you running mods?
are you using non-ascii characters in the mission?
ha, no idea, it worked, then it didnt, trying to debug it now
that line is nothing special
Fixed it ๐
Is there a way to identify the approximate size class of a projectile based on the information in a handleDamage EH's _projectile param? Other than matching it to a list of classnames?
specifically I want to be able to differentiate between hits inflicted by a rifle and an HMG
@lost copper
TheRecord = player createDiaryRecord ["diary", ["Test", "Test"]]; // ... player removeDiaryRecord ["Diary", TheRecord]; ```works! going to fix removeDiaryRecord page too
@winter rose yes, example on removeDiaryRecord page looks like cool. Thank you, now my idea works perfect!
Hi guys! Back yet again, and I think I've made some progress.
Like I said, I'm trying to remove the holdAction from my computer from another object.
I've changed the code around so the first holdAction is created like this:
private _holdActionID = [
manual_override_computer,
"Acces Terminal",
"\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa",
"\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa",
"_this distance _target < 3",
"_this distance _target < 3",
{},
{},
{
hint "UNAUTHORIZED ACCESS DETECTED. TERMINAL DISABLED. REPORT TO FACILITY MANAGER TO UNLOCK TERMINAL.";
},
{},
[],
2,
1,
false,
false
] call BIS_fnc_holdActionAdd;
manual_override_computer setVariable[ "intelActionID", _holdActionID ];
If I understand the code right, it now stores the actionId as a variable on the manual_override_computer.
What I need to do now is access the actionId from another object. How would I go about doing that in this situation?
getVariable?
Does that work despite setting the initial _holdActionID as private?
yes, because you set the value of _holdActionID on the computer's namespace
Ah, so any variables I assign to the computer via setVariable become publicly accessible?
Oh my God, it works!
Thank you so much, @winter rose!
you are saving the value "in" (on the object of) the manual_override_computer yes.
you are using setVariable without the "synchronise network" flag (you don't need it), therefore the value is local to the player's computer.
be sure to use manual_override_computer getVariable ["intelActionID", -1] syntax - so in case you reach this code without have set the value first, it doesn't error and still return a default value (here, -1)
Ah, do I need synchronise network to make it work in multiplayer?
nope, not at all
because the index can be different for every client, which is why it is important -not- to override values
Hm, okay!
This is what I'm doing on the other object, and it works like a charm!
_holdActionID = manual_override_computer getVariable[ "intelActionID", -1 ];
[manual_override_computer, _holdActionID] call BIS_fnc_holdActionRemove;
So, once again, thanks a bunch, Lou, and all the others who've helped me out during these days. I truly appreciate it
Here's what's bugging me though. Do you want the action to be removed for everyone? Because I think what you've got might only remove the action for whoever the removal code is local to.
(Lou might correct me on that, but that's my reading of the existing code)
I do want it removed from all clients, yes. I'm not terribly competent with Arma scripting but I don't see why it wouldn't remove the action from all clients?
Because BIS_fnc_holdActionRemove is only being called on the one client, and it has local effect
to be fair, BIS_fnc_holdActionAdd is also local, so if it gets added to a single person it also can be removed from a single person.
So the question is whether or not this action is added to all players and subsequently removed from all players, which is the intended effect?
If you check example 2 on the wiki of BIS_fnc_holdActionAdd, it will use remoteExec to add the action to all players (including JIP).
But as the note by R3vo mentions, it will also run for new players even when the action is already removed beforehand.
So instead of removing the action I would simply add a condition (5th param) to only show when it should be available
yes, in the "action completed" code, set a global variable like "actionDone" to true (and make sure it's global using setVariable's arguments), and in the condition to show the action have a check to only show if that variable is false
Does this mean I have to rewrite the script to run remoteExec instead to make sure it applies to all players?
Because the issue I was having with remoteExec was storing the actionId
if you're not removing the action, you don't need the actionID
That's... very true
Right, I'll write up a separate function with remoteExec and see how that works
Add this to the action completed parameter in holdActionAdd:
[missionNameSpace,["actionComplete",true]] remoteExec ["setVariable",0,true];
and in the condition to show the action parameter:
(_this distance _target < 3) && ((missionNamespace getVariable ["actionComplete",false]) == false)
(had some bracket formatting issues. All fixed as of this message)
Meanwhile, can someone who knows things confirm whether this would cause an error if _projectile was an empty string?
if ((_projectile isKindOf "BulletBase") or (_projectile isKindOf "RocketBase")) then {
_projectileType = typeOf _projectile;
_calibre = configProperties [configFile >> "CfgAmmo" >> _projectileType >> "caliber"];
if (_calibre > 2) then { ... };
};
well, since "nothing" is not in CfgVehicles is shouldn't work, but out of my head I don't know if it will render an error (SqfVM doesn't btw)
although you can prevent it with
if (!(_projectile == "") and {(_projectile isKindOf "BulletBase") or (_projectile isKindOf "RocketBase")}) then {
@hallow mortar It's giving me a "Generic error in expression" when trying to implement ```sqf
(_this distance _target < 3) && ((missionNamespace getVariable ["actionComplete",false]) == false)
You definitely put that in the "condition for action to be shown" parameter?
@exotic flax thanks
Yep. I think it might be throwing it because that variable doesn't actually exist until I run the other holdAction. Possibly?
It shouldn't be that, because the false argument in getVariable is a default value to use if the variable doesn't exist
This is how I implemented it:
[
manual_override_computer,
"Search For Intel",
"\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa",
"\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa",
(_this distance _target < 3) && ((missionNamespace getVariable ["actionComplete",false]) == false),
"_this distance _target < 3",
{},
{},
{
hint "UNAUTHORIZED ACCESS DETECTED. TERMINAL DISABLED. REPORT TO FACILITY MANAGER TO UNLOCK TERMINAL.";
},
{},
[],
2,
1,
false,
false
] remoteExec ["BIS_fnc_holdActionAdd", 0, manual_override_computer];
You forgot the "" around the condition parameter
" (_this distance _target < 3) && ((missionNamespace getVariable ["actionComplete",false]) == false)"?
yes, it's a code string (don't ask me why)
do this:
"(_this distance _target < 3) && ((missionNamespace getVariable ['actionComplete',false]) == false)"
because you can't use quotes within quotes ๐
Oooooooooooooooooooh
or escape them:
"(_this distance _target < 3) && ((missionNamespace getVariable [\"actionComplete\",false]) == false)"
(should work as well)
Next error: "Type Bool, expected Number, String"... etc
Does it give a position for that error?
That would do it, and also change it accordingly in the getVariable parameter and the setVariable operation
or change == to isEqualTo
Right, I'll try those
Easier to just change to isEqualTo then you don't have to change anything else
absolutely baffling that == doesn't work with booleans, but there you go
isEqualTo solved it
Yeah I've never understood why booleans won't get checked the same way other types are, but hey
Thanks, @hallow mortar and @exotic flax! I think the code's ready to be implemented now
Another reason to go full on night of the long knives on the booleans
0/1 > true/false
is there a default animation for slinging a weapon
ok thanks
what's wrong?
so how do you go "undercover", other than setting the variable UNDERCOVER ?
yeah, i think this is a little bit too little context
An OldMan variable maybe?
no, OldMan is doing it the correct way ๐
is old man doing it with captives?
of course, it's the only way to make it work properly
if !(params [
["_unit", objNull, [objNull]]
])```
Wha...?
there are soo many things wrong in that script...
When talking about "group", is it referring to a collection of units or is it referring to the side such as "OPFOR" or "BLUFOR"?
I wish to change the side such as "OPFOR" of a specific player unit.
https://community.bistudio.com/wiki/joinSilent
group is a group, like a group of units
oh
Group is group, not a side. You can dosqf createGroup OPFOR;to make an empty group
I want to change the faction of the player though.
It's impossible directly
You can't change the side of a group neither
your best bet is to take the unit's loadout and spawn a new one of the faction of your choosing and set their loadout
and then set the unit to control that
a little hacky
wont move variables or eventhandlers
So you can make a different side group and join it. But it's rather buggy IIRC
hm
yeah, joining other side's group gets really glitchy
Also depends on the situation, you can use setFriend command
because I'm trying to make a quick system where they turn to the civi side when in a specific building
as in a safe zone where enemies won't kill them
Then setFriend
setCaptive
but i want them to still be able to move freely with their gun
Mark a unit as captive. If unit is a vehicle, commander is marked. A captive is neutral to everyone (belong to civilian side), and will not trigger "detected by" conditions for its original side.```
that's the only thing it does
it wont make your gun go away or anything
oh right
sorry it's because I thought of captive as in the Zeus version of captive
it just makes them civilian, essentially
where you're handcuffed
thanks
and then when it's false, it will return to the original faction?
yes
ok
or better said; enemies will attack again, it won't change sides
so to a zeus curator, would they appear as a civilian (purple) or would they still be the faction colour, just voided by enemies
I believe purple, but not sure...
Yes, they'd appear purple
So what I'm doing is making robot soldiers that are super hard to kill and have witty dialogue lines.
This version of my eventHandler works fine - it plays the lines (hitEvents.sqf) and makes any incoming damage have a value of 0.01.
https://sqfbin.com/hagibafabicehipinaya
Then I tried to make it detect high-calibre weapons and have them inflict more damage.
https://sqfbin.com/ikepegemabujorafelaf
Now I'm in Nested If Hell, dialogue lines still work, but as far as I can tell no damage handling at all is taking place.
I have not observed any script errors or RPT errors.
Anybody know a emp script
Anybody know why
11:33:01 Unit R GraveYard:1 (0x73c36080) - network ID 2:3194
11:33:01 - no person
would be getting spammed in my server RPT? I feel like it probably has to do with a dead AI being moved to another client.
@nimble compass what do you mean with "emp script"
Eletro magnitic pulse
Nvgs gps
and to disable planes/cars
but only works with vanilla stuff
Also optics
Someone did a EMP script with a EMP mine to place
Can tou send me a link off to it
i believe it's an older one
An older but functional one. Works for every vehicle also addons not only vanilla
vehicles are not the issue
optics and nvg's you can only disable if they have a disabled variant
vanilla items should have
but modded ones are down to mod author's whims
Havent tested for nvg's and such stuff, but thats the emp mine yes.
there was a script aswell
but it's like a walk in the park to write a script to disable all engines/turrets in a radius
lights are a little funnier
but doable
For me is only important to disable vehicles and this emp mine is doing the job well
Good evening. For those of you who recognise my name you may know Iโve been failing for some time to get a simple respawn with gear I had and remove my body script to work on my dedicated server.
I now have it working but not every time. I know that the clean up body works every time from within the playerlocal.sqf.
So at some point either the onplayerkilled or onPlayerRespawn is not working. But it does sometimes.
Any thoughts on why this might be?
would have to see the script
[player, [missionNamespace, "inventory_var"]] call BIS_fnc_saveInventory;
[player, [missionNamespace, "inventory_var"]] call BIS_fnc_loadInventory;
Itโs the only thins I can find that works. Mostly.
We spoke before about โplayerโ not being a great variable
we did?
what is "inventory_var"
you arent using BIS_fnc_loadInventory correctly here
take a look in the biki:
https://community.bistudio.com/wiki/BIS_fnc_loadInventory
Ok, so I respect that. But why would it work most of the time!?! ๐คฆโโ๏ธ
actually, im not quite sure
the biki is using the comma incorrectly
so im not quite sure if it's a list or what
it's too ambiguous
so i can only assume that the second array takes one parameter
and i cant say why it worked "most of the time" without seeing the script itself
Thatโs literally it. One line.
that's 2 lines
Save in playerkilled. Load in playerrespawn
Delete body in playerlocal works perfectly every time
So something Iโve written does ๐
so there is more to it?

i cant help you without seeing all that factors into the script
sorry
I mean you have. The remove body thing is not an issue. Itโs just the save inventory in killed and load inventory in respawn. There is nothing else.
I appreciate any and all advice. Thanks.
At this point Iโm beginning to think itโs not actually possible. ๐คฃ
it's very much possible
Ha. Youโd think
Itโs funny really, Iโve been trying to make it work for like 2 months ๐คฃ
I have tried and adapted and written everything I have learnt and found online. Nothing works reliably
Any sane person would go back to COD
Hey guys I was wondering if anybody knew how exactly I can use a trigger to activate a distant custom sound effect.
I've been using playSound3D[filename, soundSource, isInside, soundPosition, volume, soundPitch, distance, offset] but haven't been able to get it to work.
maybe its too far away to be heard
maybe however, when trying to put it right next to my testing ai it doesn't work
I've double checked my custom config for the sound in description.ext, i've also double checked the trigger, so I believe it may be something in the actually playSound3D line itself
try playing some vanilla sound then
so far i've tried this
oh damn thanks killzone
Can someone explain me how lifeState works?
Is there a distance above which it's not syncing anymore for performance reasons (aka optimization)?
lifeState command returns incorrect results for distant players.
Sometimes "lifeState somebody" might return "HEALTHY" though the player is in fact "DEAD" or "INCAPACITATED", and vice versa.
And the command starts returning the correct result only after you approach (approximately) to the distance of visibility or some closer.
this is what I was thinking
The server should know though (โฆI suppose?)
but is there a distance or what are the conditions for this not to be synced anymore
fixed value? if yes, what the value
no fixed value. the error is configurable in server config
IMO life state should be important tho ๐ค
what would be the solution to "fix" this?
because I've seen other missions not having this problem, but I think they're using some heavy methods to avoid this
wouldn't say so
because when you're observing other players on map to direct them to take something or explaining where enemy is etc, it's very useful to see where they're look at, to correct/guide them
looks like they chose to send numbers every framr but arrays and strings only if close enough
orientation is array
Direction is array
no
the script command calculates a bearing number from the direction vector.
The engine doesn't have a bearing.
hi, how to get the player camera ?
hi, cameraOn to get the object on which the camera is, or
positionCameraToWorld to get the camera current position
oh ok thx i will try
@winter rose the "positionCameraToWorld" doesn't get the current camera position you need to put a position so how to get the "camera object" or the camera position ?
[0,0,0] to get the camera pos I suppose
@winter rose yes it work but how to do the same thing of the spectate zeus cam ? because when you are in the zeus you can press "Numpad Enter" on the selected units and you see his camera view ? so how to do the same thing of the "Zeus Spec Cam" or the spectator cam in multiplayer ?
/* some code that has _param1 */
_thing1 = [_param1] spawn {
params ["_param1"];
_thingToUseLater = _param1 call function1
};
/* some code that uses _thingToUseLater */
i feel like i am missing a very simple thing here but, how do i use _thingToUseLater outside the _thing1 block?
revision 2:
/* some code that has _param1 */
thingToUseLater = objNull;
_thing1 = [_param1] spawn {
params ["_param1"];
thingToUseLater = _param1 call function1
};
/* some code that uses _thingToUseLater */
set it as a global variable
also, _param1 call function1 will not work because of scope change
@waxen tendon โ
thanks
how about revision 2?
yep
thanks!
the script command calculates a bearing number from the direction vector.
The engine doesn't have a bearing.
even characters? As I understand, their vector up always looks up
how should I go about adding all units of a side into an array?
if (side _x == civilian) then {
_civilian = _civilian + [_x];
} forEach allUnits;
i have something like this so far, but obviously I'm missing some stuff
this is my try so far
allunits select {side group _x == WEST}
well then. i was overthinking this obviously lol
Your code is not wrong ๐ค should have worked
then and foreach using the same curly braces
did you define private _civilian = [] ?
oh yeah ๐ his code is wrong, I didn't notice
_civilian = [];
if (side _x == civilian) then {
_civilian = _civilian + [_x];
} forEach allUnits;
i think i forgot to define something
wait, so it is even more wrong ๐ค
_civilian = [];
{if (side _x == civilian) then {
_civilian = _civilian + [_x];}
} forEach allUnits;
``` is what u would have needed
excuse the formatting
gotcha
params ["_prison"];
private _civilian = allunits select {side group _x == civilian};
{_x addEventHandler [
"MPKilled",
{
params ["_unit","_killer"];
_killLocation = getPos _killer;
_killer setPos (getpos _prison);
hint "Have a timeout for killing too many civilians";
waitUntil {
serverTime == serverTime + 120;
};
_killer setPos _killLocation;
hint "Don't kill civilians this time!";
}
]} forEach _civilian;
so if I have something like this, will the param "_prison" be used by the scope under "MPKIlled"? or do I have to redefine it in there as well
yea that wont work
also ```
waitUntil {
serverTime == serverTime + 120;
};
will never be true
okay noted. will the _prison param work though?
no
eventhandlers start a new scope. local variables from the script it was added in arent available.
if the code doesnt execute as part of a function, it is a new scope. so event handlers, addactions, spawns, etc.
mk would placing the _prison param under the scope of the addeventhandler still reference the original arguement outside of the script using [] execVM?
how do you mean? like how addaction does it? no.
https://community.bistudio.com/wiki/Variables#Local_Variables_Scope have a read @fair drum
Given that I've verified that _projectile is a valid projectile classname, why would this return an empty array?
_calibre = configProperties [configFile >> "CfgAmmo" >> _projectile >> "caliber"]
(I've also verified that the projectile class in question really does have a caliber property defined in cfgAmmo)
getNumber (configFile >> "CfgAmmo" >> typeOf _projectile >> "caliber")
_projectile is already a string classname so I don't need typeOf, but I'll try getNumber
I'm curious why configProperties doesn't work, given that this appears to be the exact purpose it's intended for
configProperties does work only for "class," not value inside class
IIRC so. Kinfa hard to describe the difference tho
I see.
I have a bunch of scripts which store displays and controls in variables, but I don't use disableSerialization in the scripts. However KK's note says I have to use it. So was something changed at some point? (My scripts work fine btw)
Iirc it is only mandatory for saving/restoring
However, you should just change it to non-variable Variant
Does anyone know the if the RTD commands (https://community.bistudio.com/wiki/Category:Command_Group:_RTD) have local or global effect ?
I'm guessing local since they're all from ToH
local probably
Because less possible issues arrise then
Accidentially putting a control into a global for example
Or someone does indeed cause Script serialization and thus your Script gets invalidated when deserialized
First point is not an issue for me since in GUI scripts I very rarely work with global vars.
Seconds point. Hmm could happen, but for my UI's not a big deal since everything is reinitialised when the UI is opened again.
The downside I guess is that it would be more writing since I need to always grap the control again and again.
So to summarize it, since I work in Eden Edtitor where saving is not an option, I can forget about serialisation?
Does anyone know how to convert between eden and game rotation?
I can sort of do it, until I rotate more than one axis at which points the numbers don't match up at all
what are you trying to achieve?
I want to convert vectorDirAndUp into the appropriate values so I can set the eden attribute
Because the eden values are three numbers between 0 and 360
convert bearing to vectorDir?
if object always looks up then vectorUp is [0,0,1]
vectorDir is
[sin bearing, cos bearing, 0]
It's the other way around, I have the vectorUp and vectorDir, but I want to set the eden attribute for rotation
bearing is x atan2 y... or y atan2 x, I can't think about this triangle at this time of day xD
Oh I see now, it has three angles in the editor
Some command wants string instead of code, how would I convert my {code} to a compatible string the easiest way?
Found a solution:
#define CODE_TO_STRING(code) 0 call {private __codeToStringTemp = str code; __codeToStringTemp select [1, (count __codeToStringTemp)-2];}
str {systemChat "hello"} will wrap everything inside {}
_condShow = format["_target = _originalTarget; _eval = %1; [""%2"",""%3"",""%4""] call bis_fnc_holdAction_animationTimerCode; _eval",_condShow,_title,_iconIdle,_hint];
Why would someone write this, why

tint_fnc_test = {
private ["_obj","_pitch","_bank","_yaw","_vdir","_vup","_sign"];
_obj = _this;
_vdir = vectorDir _obj;
_vup = vectorUp _obj;
_vcross = _vdir vectorCrossProduct _vup;
_pitch = (_vup#1) atan2 (_vup#2);
_bank = asin (_vup#0);
_yaw = (_vdir#0) atan2 (_vcross#0);
[[360+_pitch] call CBA_fnc_simplifyAngle, [360-_bank] call CBA_fnc_simplifyAngle, [360+_yaw] call CBA_fnc_simplifyAngle];
};```
For anyone who is ever stuck with a similar problem, here's a function
use params, use private keyword, not private command
i m having a small problem, i figured this fits into this channel as its scripting related
i m trying to use cbchecked on a checkbox, but, i seem to not understand how to actually select the control
this is what my take on it is so far
_displayAllPlayers = ctrlChecked 762800;
i also tried cbChecked
both output "control expected" as error, but i dont seem to get how to get a control....
762800 is a number/scalar, not a control
there is a command to get a control by number
displayCtrl maybe?
okay, gonna look into that
i m sorry if my question might be stupid, i m just super tired right now 
awesome, it works now
_whitelist_menu = findDisplay 76111;
_displayAllPlayers = cbChecked (_whitelist_menu displayCtrl 762800);
so, i basically had to first use the finddisplay to find the dialog, and then use displayctrl
Where does the game search for stringtable.xml? On wiki it says that it searches mission root, but in my case the xml file is in a subfolder and the game seemed to resolve it anyway.
i guess same folders as config.cpp, meaning every folder
Does it search for config.cpp in every folder? ๐ค
yes, but only at startup when loading mods
...all folders in an addon .pbo file, correct?
Then it explains why it has resolved the strings for me in my case. Because it has found the stringtable in the addon pbo file, not in the mission file.
ye
is there a function to check if a key is down? I was going to try the approach of checking if a key is down within an onEachFrame event handler
the closest i could find to what im looking for is inputAction https://community.bistudio.com/wiki/inputAction
the only problem with this however is it doesnt work with a dialog open ๐
You wanted to do it while a dialog is open?
yeah essentially i guess what im trying to replicate is something like the 3den editor in that you have what im assuming is a dialog(?) but can still move the camera around
making a kind of RTS prototype
Then probably (on)keyDown UIEH?
the only issue with that though is i need it
to be oneachframe because that event handler doesnt seem as responsive to holding down keys, etc
and if i have it in my OnEachFrame event handler then i can lerp the camera movement
if that makes any sense im probably just not picturing this correctly right now
i think i might have an idea though

Y U NO exist? https://community.bistudio.com/wiki/currentSystemTime
has global effect
So now all we have to figure out which time it took ๐คฃ
Can we get a dateUTC function as well so we don't have to convert it ourselves please? ๐
you'll need to convert it anyway, because dateUTC would return [2020, 7, 7], which still isn't a valid date ๐
it is already date?
LOL... We also would need a timezone function returning a new config entry from the map's CfgWorlds... What a pandora's box Dedmen has opened ๐
Date is the local time, not UTC
non-utc version is local time
Description for date explicitely says "Returns the current local in-game date."
Ah I see. No.
๐คฃ That took longer than I expected...
Fancy watch you got there with 2 readouts
private _hour = currentSystemTime select 3;
if (_hour > 22 || _hour < 8) exitWith { hintC "Go to bed!"; };
currentSystemTime doesnt exist
If with function that to do like [9] call BIS_fnc_currentTimezoneTime it's really handy
Because he just made it
hm
just saw it, yea
I also imagine Dedmen being "okay, here's my to-do listโฆ oh hey, which command did I miss last time? let's do that instead"
I honestly can't wait to test next Dev-Branch
Hi guys, me again! Quick question: is there a way to make a user added action be at the top of the list of available actions on an object when you use the scroll wheel? For instance, a vehicle.
It's a holdAction in this case
the priority parameter does that yes ๐
Ah, nice. Is it descending or ascending priority? As in, is a 1 higher on the priority than a 10, or is it the other way around?
bigger = higher
Thanks! ๐
I'm too lazy to upload this somewhere and do stuff with it but if anyone would like to have a script that replaces ravage zombies on spawn with ryan zombies ( a mixture of different ones with set ratio's ) + a script that adds "screamers" that spawn extra zombies in feel free to ping me here and ill share it here
just got into arma scripting since last week but I've done some scripting before so its been relatively easy to pick it all up ๐
now all i need is a melee mod/script that does not activate the "Fired" event or whatever event ryanzombies/ravage listen for


Overkill!
only 100ns resolution
is there a way on how to tell "how good a car can go through offroad terrain"? a friend made stronger camera shake for offroad driving to encourage staying on roads but a city car shouldnt have the same wobble as a Humvee.
looking for an easy way to automatically assign wobbling factors.
Ill check that out thanks
Next: datetime SQF basic type which supports comparison
Dedmen left the chat
Hey guys, I'm currently enhancing a zombie scenario and am trying to add a listener to whenever a unit gets damaged.
Everything works like a charm but for some reason out of all the following eventhandlers the "Dammaged" fires most frequently, yet not every time a unit is hit by a zombie.
Is there a way to lower the damage treshold on which the eventhandler activates?
Player addEventHandler ["HandleDamage", {systemChat "StartNow1"; }];
Player addEventHandler ["Hit", {systemChat "StartNow2"; }];
Player addEventHandler ["HitPart", {systemChat "StartNow3"; }];
Player addEventHandler ["FiredNear", {systemChat "StartNow4"; }];
Player addEventHandler ["Fired", {systemChat "StartNow5"; }];
Player addEventHandler ["EpeContactStart", {systemChat "StartNow6"; }];
Player addEventHandler ["Dammaged", {systemChat "StartNow7"; }];
HandleDamage is the one you need to increase/decrease damage
the issue is that that one rarely even fires
getting hit doesn't mean getting damaged ๐
and since you talk about zombies, which means modded gameplay, it also might be an issue of the mod you use
i feel like that is the case
here's a img to see what event triggers on hit: http://prntscr.com/tdkb38
I think the mod uses some sort of silent damage script then
@sonic thicket https://imgur.com/VaMr89U im wondering if this is why its not firing
im not completely sure though
well, the issue is in the mods (and I see enough stuff in that screenshot which I wouldn't trust), because HandleDamage is the only way to modify damage (and not only registering it)
yeah, but i've used more then just that handler:
Player addEventHandler ["HandleDamage", {systemChat "StartNow1"; }];
Player addEventHandler ["Hit", {systemChat "StartNow2"; }];
Player addEventHandler ["HitPart", {systemChat "StartNow3"; }];
Player addEventHandler ["FiredNear", {systemChat "StartNow4"; }];
Player addEventHandler ["Fired", {systemChat "StartNow5"; }];
Player addEventHandler ["EpeContactStart", {systemChat "StartNow6"; }];
Player addEventHandler ["Dammaged", {systemChat "StartNow7"; }];
The dammage one makes sense but the weird thing here is....
- the dammage event triggers so the game knows about the damage, and if it knows about the damage, shouldnt the other events trigger too?
currently the only thing I can use is the fact that the character screams every time it gets hit, so soundplayed is my best bet then to trigger every time a person gets hit. The downside is that I will need to find the nearby entity that caused the sound to trigger and then execute the whole underlaying script
That is definitely ryanzombies itself, it works perfectly with ravage haha
yeah i'd try to avoid that work around if i could tbh, might be something to do with how the zombies deal damage? unsure
I even tried upping the zombie damage but then they knock me out in 1 hit
I kind of want to test this but just to be sure
the zombies are ryans zombies and thats really the only mod you have on?
Not the only mod I have on, I'll try testing it with only ravage & ryan
in terms of like the enemies
im using the ravage as framework and ryan as actual zombies
gotcha okay
best of both ๐
not if it breaks the game ๐คทโโ๏ธ
haha true, the ravage zombies are so dull though but heck it got a nice system with the bandits and all
I'm not sure if mapContentFriendly=1; in the server profile also applies to arty computers, otherwise I don't think it will show any players/AI/etc.
At that point just give them Zeus with only the fire support modules ._.
or have a real player giving coordinates and making sure the rounds are on target ๐คทโโ๏ธ
i apologize ((
@sonic thicket from what i can see it looks like its how ryan zombies works thats making the event handler not fire
@astral dawn
Next: datetime SQF basic type which supports comparison
I thought about it, but you can make script functions to do that so no
Yeah agree
@still forum if we provided functions, could they be implemented?
Integrated into BIS_fnc I think so, for that talk to BIS_fnc_KK
the RAVAGE zombies fire off an invisible ammo, which i assumed ryans zombies would aswell but it looks ilke it doesnt!
Ravage Zombie with HandleDamage (Works) : https://streamable.com/o8npj5
Ryan's Zombies with HandleDamage (Doesnt Work): https://streamable.com/0j1poc
I already see how I implement sorting of saved games by their system date and write a function to compare datetimes ๐
That is quite annoying, really wanted to add in screamer type of zombies they scream when they hit players and only certain type of zombies do that so you need to kill them before they get close
What i need is an event to trigger whenever the ryanzombs hit someeone basically
there still might be a solution somewhere but im trying to think how you'd go about it
the roundabout on player screams event seems like the only way ๐
it might be quite buggy though but I can live with a random nearest zombie screaming instead of the actual screamer screaming
Oh wait i can filter that too
search nearest zombie that is a certain type ( screamers are selected on type that have white clothing )
Thanks a ton for testing that for me haha, you were a hell of a lot faster then me ( I was still sitting in arma3 launcher ) ๐
I'm not sure if
mapContentFriendly=1;in the server profile also applies to arty computers, otherwise I don't think it will show any players/AI/etc.
@exotic flax
well the first option is off the table. it is a faster paced pvp mission in project argo, in a very small area, comically small for mortars at all, but its a "fun" game where people just want to collect kills. (project argo doesnt allow change the profile)
this also leaves the second option off the table. i can open zeus in argo myself, but it doesnt have full functionality. im hoping there is an idd i can find. the game is also in arma , its almost a cross between gun game for its speed and koh for the one sector objective.
Project Argo also doesn't allow mods afaik
and this is an Arma Discord, not Project Argo ๐
@sonic thicket no problem! it would seem that ryans zombies is so weirdly made that even disabling damage on a unit, you can still be killed by zombies lol
XD that is weird indeed lol
Project Argo also doesn't allow mods afaik
@exotic flax
im not making a mod... project argo is just a cut down arma. i cant say for sure but maybe 80 % of the functions exist, some edited. it has an editor. the same mission wouldnt also exist in arma if that was the case. it just happens to be it sees more play in argo.
It's a free and extremely limited version of the Arma 3 engine, and the editor only exists to make new missions and not make fully scripted stuff like in Arma 3.
And afaik are there PA like missions for Arma 3 (small scale PVP), just not that common since Arma 3 can do much more.
If everything that's possible in Arma 3 would be possible in PA, than no one would buy the game anymore
its not a dispute. the mission already exists with hundreds of hours of play
Is there any way for mods to have custom mappings to analog axis controls similar to CBA keybinds works?
@void ivy you can use CBA as a dependency and use their system
@half monolith well, you won't find much help on this Discord since all the solutions we have are for Arma 3 which won't work for Project Argo...
@exotic flax I wasn't aware those gave access to controllers, let alone their analog axes. Is there something special there or am I just missing it?
afaik does CBA not support controllers out of the box (due to the way Arma 3 handles it), although you should be able to set defaults with proper DIK codes: https://github.com/CBATeam/CBA_A3/wiki/Keybinding#additional-dik-codes
@half monolith well, you won't find much help on this Discord since all the solutions we have are for Arma 3 which won't work for Project Argo...
@exotic flax this is also in a3 in the same format literally copied and pasted over. so from here on out im trying to find the idd in a3๐
i have two fully scripted servers in project argo. for years. some missions direct ports. think of it as the same as a2- a3.
@half hornet Haha, even soundplayed does not trigger XD Now the next best thing would be a "while" script, ugh or a on fire bound to player. If you want i can ping you with the solution to this issue, although it be a very, very roundabout one. Ill also probably will give up once I need to resort to while loops
how do i increase the max ammo in the ghost hawk mini guns?
You can add magazines @silver mauve
how do i do that?
@silver mauve addMagazineTurret https://community.bistudio.com/wiki/addMagazineTurret
best way to create a map border with kill zone for MP? I was thinking about doing a trigger set to activate when any player isn't present which then kills the player but I'm unsure how to implement it in a MP fashion. do triggers placed in the editor typically run local or global? cause I see an option for server only.
createTrigger is global, but you can make it local (3rd param)
@fair drum they run locally - it would be better if you made your checks server-side though
i was wanting to use something simple like player but if it was serverside that should be null. I don't have a need for security as its not an open server and its just a mission.
and I would make 2 areas; a "soft border" which gives a warning to the player and a "hard border" which will kill or damage the player (eg. 10% per second)
@sonic thicket maybe animation event handlers then? not sure
If it's got a unique animation when a player is hit then yes
ill try that
its gonna be a bit vague though as it will trigger when the zombie animates but misses
It feels kinda hacky and vague, when scripting I usually script for server environments so i kind of want it to be clear when something is happening. However as I've only been playing with my brothers as I started playing arma since 2 weeks i could make an exception to this rule.
I've learned scripting because it allows me to do anything i can possibly think of (and is within the limits of the game engine) so i will have a hard time accepting something that is half baked ๐
But! ill figure it out and that is what makes scripting fun, the feel of accomplishment ๐
Arma is actually pretty predictable when it comes to scripting, or at least can be explained when it's not.
And the sky is the limit, it just depends on how well you know the engine and how far you're willing to go develop ๐
damn ryan zombies is a weird mod, whatever hits me doesnt seems to exist XD
gives null errors haha
lets see what anim does
Arma3 is pretty straightforward but I feel as if the library could be a bit bigger
So after alot of searching around I cannot find a good answer.
Is there a way to add sfx sounds to the arma 3 module "Play Sound"?
I have looked into the module itself but do not quite get it.
fn_moduleSFX.sqf
_logic = _this select 0;
_units = _this select 1;
_activated = _this select 2;
if (_activated) then {
_sound = "";
_soundSource = objnull;
while {!isnull _logic} do {
waituntil {
_soundSource setpos position _logic;
sleep 0.1;
((_logic getvariable ["RscAttributeSound",""]) != _sound)
||
isnull _logic
};
if (isnull _logic) exitwith {};
_sound = _logic getvariable ["RscAttributeSound",""];
deletevehicle _soundSource;
_soundSource = createsoundsource [_sound,position _logic,[],0];
};
deletevehicle _soundSource;
};
I believe I need to attach the sound to the RscAttributeSound but I have no clue what Im looking at here.
When I search for the Rscattributesound all I get is that this is the "menu" that the curator sees.
Question is how do I add a custom sound to this list?
I know it gotta be possible somehow since I can confirm the mod plp_containers adds one.
Any clues?
Thank you!
Arma3 is pretty straightforward but I feel as if the library could be a bit bigger
@sonic thicket
There are 8000+ commands and functions in Arma 3 (vanilla), and a lot more can be added through mods (especially CBA which adds a lot of useful stuff).
I don't know any game engine which is that extensive without mods/plugins/whatever, while still being compatible with itself and other creations.
the events seem lacking though ๐
no, just incorrectly used
and like I said; CBA adds a lot extra stuff, including new events
Hmm i see, i think one could even make its own events so there isnt really a limit to it
just gained a bit of info on that, I do use CBA though
some events are handled by the engine, but technically you can make events from everything
Yeah, that is on a whole new level though ๐
It shouldnt be hard though, whenever a function is called { add listener }
for animation work; #arma3_animation
for modding in general; search the forums and wiki for more information, or Google for tutorials
A lot of people here would be able to... including the original authors. If they haven't then it is fairly unlikely to happen now I would have said...
@obsidian violet
https://discordapp.com/channels/105462288051380224/105463219954442240/697095440826368024
https://discordapp.com/channels/105462288051380224/105463219954442240/697096432771137556
(My previous answer in #arma3_audio for same question)
does anyone know how to convert https://community.bistudio.com/wiki/getMousePosition coordinates into actual pixel coordinates? trying to wrap my head around the UI coordinates
I tried that because i thought that was it initially too, but the bounds of the MouseX variable in my case are like -0.712121 to 1.7096 which is super weird
ah
bug on that was fixed in next update
if you have different render resolution
not 100%
oh weird, it says mine its 100%
let me try something if its this
oh nevermind i thought maybe it was maybe something to do with my multiple monitor setup or something
I have been searching for a way to check if a string contains a set of words and while they activate if it is a 100% match it doesnt activates when it is a partly match.
To put it in script ( and possibly easier to understand )
_zombietype = Ryan;
if (_zombietype in "RyanZombieB_Soldier_05_f" || _zombietype in "RyanZombie31" || _zombietype in "RyanZombie29") then { systemChat "Ryan in string"; }
However "in" does not seems to work in this case, is there anything that would work?
_zombietype find "Ryan" != -1
thanks ๐
it seems that the _variable1 find _variable2 != -1; needs to have a shorter variable 2 then a variable 1. Solution to this is to use count and save the biggest count in variable1
Im enjoying myself, scripting again after what is probably a year or more
yes
it finds text in _variable1
if text is longer than whats in _variable1, it can never find it
just use the command correctly.
y find x
find x inside y
Yeah, im not sure why I did that in the first place
Any guess how can I print on screen "It's mandatory to choose SL slot" if some player doesn't choose SL slot? The problem: when I use on Condition !alive _slSlot nothing happens in-game because probably the _slSlot doesn't exist to be dead. The message bellow works only when I choose the _slSlot hehehe but I need totally the opposite way.
Condition:
!(_slSlot isEqualTo objNull);
On Act:
Hint "It's mandatory to choose SL slot."
If you say that your condition works for a situation, then the opposite of this condition will work for the lack of that situation ๐คท
so removing the logical inversion ! should work
also you can just write isnull something instead of something isequalto objnull
Condition:
isNull _slSlot;
It didn't work.
Condition:
(_slSlot isEqualTo objNull);
It didn't work.
variables starting with _ are always local variables
maybe the game searches for a local variable?
I'm writing _slSlot just here. In the true I'm using "devTeamSL"
you should verify with your debug console, what does devTeamSL return
is it nil or nul?
you should verify with your debug console, what does
devTeamSLreturn
@astral dawn how can I do it? "Verify by debug console...?
yes, with debug console ๐ค
Sorry @astral dawn, I never has used the debug console, so I am not sure what you recommended me to do.
then you should learn how to use it, before trying to mess with the code
you can access it if you launch your mission in the editor and press escape
It just runs whatever sqf code you type into it
you type 1+2, push local execute, it returns 3
you type random 3, push the button, it returns a random number... you see?
let me try... wait.
I actually don't know how to solve your problem but I am rather giving you information about how to solve it ๐
Ok, gotcha, but what do you recommend me to try right now on debug console?
return devTeamSL
nothings happened hehehe
try
devTeamSL
then try
isNil {devTeamSL}
then try
isNull devTeamSL
there is no return statement in SQF
value of last statement is the return value
isNil {devTeamSL} = TRUE
ok
so does it work?
nope. I am waiting a friend of mine who can look that closer. Hey @astral dawn, thanks for recommendation about debug. I do believe is the best way I first of all understand that tool. Cheers.
aaa = cursorObject getVariable "Ship CIWS";
{aaa set [3, false]} forEach aaa;
hint aaa select 0 select 3; => true
mmh something isn't right
but i don't get what, it seems ok
on a second thought i think that's because i am foreaching the content on the object itself and that's why, if it proves true i'd shame myself
how do i prevent the spawn "menuPosition" from showing all AI units as part as high command
I don't want the high command icons to show for players
Can anyone help me with this? I've been trying to get 3rd person to only work when in vehicles, but cant seem to find a working script. I've tried searching it in google but nothing has popped up thusfar.
if you know how to script you can use cameraView and switchCamera to make something.
@mighty cargo an engine difficulty setting for this is being added soon. It's currently on dev branch.
@hallow mortar Do we know when it would come out on official branch?
Most likely whenever the next update is. I would expect within the next month or two since they'll want to implement the winners from that contest thing, but nothing has been announced.
Ok
im curious how to find out what display ID the camera has, if once created. (for cutscene purposes). findDisplayยดs commands dont get me further;-=(
hi, i have a question ? the "setDriveOnPath" command work only for vehicle or it can work for plane and unit ?
units, I don't believe so, maybe planes - try and thou shalt see
if you have new data, I'll add that to the wiki
@winter rose ok thx btw i want to create a script who change the camera vision of the player so how can i do that ? because i want to create a script who can change the normal vision to the thermal vision or night vision same on an LVN.
(NVG* ^^)
if it is for the player, you can only add him an NVG/thermal and use it
if it is a cinematic camera, you can use e.g camUseNVG or setCamUseTI
yes but i want to use nvg or thermal without a nvg
i have found that : player action ["nvGoggles", player]; and it work if you don't have "NVG"
but how to enable the "TI" ?
@winter rose no it doesn't work
i have found that : player action ["nvGoggles", player]; and it work if you don't have "NVG"
so this ^ work or doesn't? @faint oasis
yes that's work but if i add 2 lines i can't get the thermal vision he stay on NVG but for NVG it work
maybe "tiGoggles", but I don't guarantee anything ๐
@winter rose very good but i have already tested and it doesn't work xD


