#arma3_scripting
1 messages ยท Page 510 of 1
ive never tested though just wondering if you could place that code in the init of a "dummy" mapobject thats placed and called before the rest
I tried that with a logic and it still generated the error
it's probably I did something wrong though...
Define a function in cfgFunctions with preInit = 1;
ah yeah, that should work fine
yeh nice
Disregard
I didn't adjust the path properly
Perfect Thanks @languid tundra , @frozen knoll , and @astral dawn
waitUntil{ (_target doorPhase _door) == 1 }; is raising a "generic error in expression"
given that :
_targetexists_dooris a valid door on_target- I'm utterly tired
What am I missing ?
Are you sure you are running the script in scheduled env?
Gosh I'm an idiot...
Thanks mate, I think it's time to sleep !
Can only sleep in scheduled
^ ๐
"oh my, I didn't schedule my sleep I am gonna be sooo tired tomorrow morning!"
welp, you just read my mind...
anyone uses armadev on visual studio code?
i am getting this A proper PREFIX (x\your_addonname) is required for life_server\addons\life_server(editado)
and i have a $PBOPREFIX$ in the folder life_server with "prefix=life_server"
Best way to restrict ability to fly to a certain player slot?
I did a set variable and if false eject driver but it didnโt work
I created a addon for my vehicles variations. For now, just a different skin on a Quadbike. It works fine and I can see the vehicle in the editor and the skin works fine. However, when I load it up on my test server and spawn the vehicle in from a server script, it has a different skin. I checked and the addon is loading both on server/client (can see the config). If I search area objects, its my custom class. I'm stumped. Everything seems to be there, but the skin just doesn't show up on the multiplayer version. Heck, I figured the vehicle would be invisible or some such if the skin didn't work, but its not, its black. Anyone had experience with this? I just got done testing it in multiplayer editor and the skins shows up there.
slot can just be a unit varname check
I did that, it didnโt eject them, should I just use the vehicle init instead of mission folder init?
@stable quest can you show your code?
if it is short, in this chat within
```sqf your code here``` tags please, if not, pastebin.com
is there a way to change the render circle, into a render "ellipse"?
you mean the marker shape?
@high marsh not sure what that is. but i mean in game, the render bubble around the character that causes things to render in at a certain distance.
has nothing to do with "view bubble" and more about view distance and current lod of the object you're looking at
@high marsh ok. im working on a city map with 200 meter buildings, and in my mock testing i realize i need more horizontal rendering but less vertical rendering.
That doesn't make a lick of sense. The answer is no.
@viral ice your making a map? nice
@opaque birch trying to.
@opaque birch no thanks.
why not?
@opaque birch 1st im working on a dayz Enfusion engine map, in hopes i can port it to A4. next unless i can figure out a way to get smaller objects like desk, chair, and beds to load correctly and the way i want, the idea is pointless. lastly i don't work well with others.
How do you properly remove a pylon weapon via script? When I use this:
(vehicle player) setPylonLoadOut ["pylon1", ""];
I end up with pylon model gone, but the weapon is still on the vehicle, able to be chosen, but with 0 ammo
Ok so, if you use the setPylonLoadOut then it does remove the magazine, it is reported as just "" . The issue is not with the magazine, but with the weapon staying on the vehicle.
I also just checked, the weapons do stay, I used the setPylonLoadOut on both of the AH-9's pylons and the DAR launcher was still there with 0 ammo. The pylon magazines are gone, but the weapons command still shows that the helo has the DAR launcher weapon
If you do this by mistake if (_condition) then {code true...} then {code false...}; you will get no error message and your "if" will not work correctly. LOL, i lost some time on that.
How do I change data type from string to ... uh data? Basically I want to go from "CUP_PylonPod_CMFlare_Chaff" to CUP_PylonPod_CMFlare_Chaff
call compile "CUP_PylonPod_CMFlare_Chaff" will return the value of CUP_PylonPod_CMFlare_Chaff if it is a variable in the namespace ur executing in.
is that what ur after?
getvariable would also work (and is probably the better way to do it)
hi guys, Iam trying to exit a waitUntil loop in 2 different ways when 2 different conditions are met
waitUntil {
sleep 1;
if (_mainVehicle distance _position < 50) exitWith {[_location,"supply",100] call AS_location_fnc_set};
if ((_mainVehicle) getHitPointDamage "hitEngine" > 0.95) exitWith {true};
};
this is forever stuck in the loop, on condition 1 if (_mainVehicle distance _position < 50) exitWith {[_location,"supply",100] call AS_location_fnc_set}; id like to execute a code after exitWith
on condition 2 only exit the loop without any code executions
waitUntil waits until it returns true
exitWith ends the script
waitUntil
{
_crewCargoAndFFV = fullCrew [_veh, "", false] select {_x select 1 == "cargo" || _x select 4} apply {_x select 0};
sleep 1;
_crewCargoAndFFV isEqualTo [];
};```
you need to add a check at the end that will return true once the conditions are met
or just return true after the function call
hm, that makes sense, however Id like to check the distance and damage on loop and exitWith different code
so I shouldnt use waitUntil in this case?
waitUntil halts the script until its completed
so you still need to return true on it
so what I expected from the waitUntil was it checking the 1st if and if true it would exec the code after exitWith, then checking the 2nd if to get the damage and then just exiting the scope if condition met
so it just doesnt simply work that way, right?
waitUntil executes the code on a loop until it it runs to true at the end
look at my code above: it waits until all soldiers get out and keeps checking if there is anyone left, if there is none, the check at the end returns true and the loop ends
ok so I just dont want to use waitUntil in this case I guess
would you have any idea on how to set it up that it would check for these 2 conditions on a loop and then exec different code when any one of these is met?
so it would constantly check if either the vehicle is close to the position or dead? and then exec different code?
use II in an if check to get OR condition
if ((condition1 = true) II (condtion2 = true)) then {
ok the verical lines do not show up in discord
bascially the II
you get the I by using Shift+back slash on the keyboard
I had it set up this way before, but I want to exec different code on different conditions, not same code if any of the conditions is met :/
then case
that if condition would be only to return true if any of the condition is met, in order to end the waituntil loop
if ((condition1 = true) || (condtion2 = true)) then {
true;
} else {
false;
};
Ok now is my turn:
Why does this not remove the weapon from a vehicle?
(vehicle player) removeWeaponGlobal "CUP_Vmlauncher_FFAR_veh";
ok I figured it out, removeWeaponGlobal does not work on vehicle pylons, the removeWeaponTurret does work though
how do I deal with nestled for each loops like this one:
{
_weaponToRemove = getText (configFile >> "CfgMagazines" >> _x >> "pylonWeapon");
{
_veh removeWeaponTurret [_weaponToRemove, _z];
} forEach _vehTurrets;
} forEach _pylonsToRemove;
Turns out you don't need to do anything with nested forEach loops, you just use the _x for the nested one as well
each _x is in its scope, but if you want to access both in the inner forEach, you will need a temporary var yes
This is driving me up the bloody wall.
I want to load the ORBAT from the main menu.
I looked into BIS's code and saw they assign a script to uiNamespace and then spawn it. So I tried this. Mine doesn't work unless it's done in the editor.
class RscDisplayMain: RscStandardDisplay
{
class Spotlight {
class Viking_Welcome {
text = "VKN Offical Mod";
textIsQuote = 0;
picture = "\VKN_Misc\VikingLogo512.paa";
video = "\VKN_Misc\VKNLOGO_512x.ogv";
action = "disableserialization; _script = [] execVM '\VKN_Functions\Functions\fn_ORBATCreate.sqf'; _code = uiNamespace getvariable CUR_bis_fnc_credits; [_code] spawn _code;";
actionText = "Developed By The Viking PMC Dev Team";
condition = "true";
};
};
};
I first made it a function and tried it that way. Didn't work.
I then tried to do it all in a function, this didn't work either.
I looked at BIS's code and did the uiNamespace way, this kinda worked, but I only got it to work in the debug console.
The code in CUR_bis_fnc_credits:
https://pastebin.com/2L9k07WM
I think, as per, i've looked at it too long and am missing something super obvious, but that's what you lot are for (help :D)
I need some clarification about assignAs*** and assigned*** commands.
I've noticed that assignAsGunner can be replaced with assignAsTurret with proper turret path.
Is it true that absolutely all "gunner" seats are in fact "turrets"?
I would say yes. Drivers, gunners, commanders all have a corresponding turret path.
...drivers?
Allright let's check quadbike:
fullcrew [cursorObject, "", true];
[[<NULL-object>,"driver",-1,[],false],[<NULL-object>,"cargo",0,[],false]]
So, both cargo and driver seat have [] as turret path
Driver has [-1], but it's not reported by fullcrew I guess.
Well I can't make him get in as driver neither with assignAsTurret [] nor with assignAsTurret [-1]
No idea about that particular command. I used [-1] successfully with magazinesTurret, for instance.
Hmm yes I see. It says to use [-1] for driver turret.
https://community.bistudio.com/wiki/magazinesTurret
You see, I was going to write some functions that will assign units to vehicles plus do some other things.
I think I can just remove "assign as gunnerr" function from my function list because it can be replicated with "assign as turret" ๐คท @languid tundra
I have a script called from init.sqf, to modify case loadouts. Works fine on hosted server, but not on dedi one. Any ideas cheers.
if (!isServer) exitWith {};
_crates = [ammoCrate01,ammoCrate02,ammoCrate03,ammoCrate04];
{
clearitemcargo _x;
_x additemcargo ["rhs_mag_maaws_HE",4];
}foreach _crates;
Try addItemCargoGlobal
And probably clearItemCargoGlobal
@tame axle
Yeah, I guess gunner and commander should work, the rest with the cargo command. Not sure about the driver though.
For storing changed/new variables in a CBA perFrameHandler, is the best practice to store them in the passed array params? (setting the params array var values for changed/stored values) or is there a better way?
Is there an event or something to hook on when a player get's sighted by an enemy?
or attacked
@frigid raven No, as I know. You most likely will have to poll side knowsAbout ..., targetsQuery and such commands
ah alright thx
@slim oyster Do you mean that you must change some variables which will be accessed by the per frame handler without re-adding the same PFH with new _args value?
I am using a PFH as a loop that checks various conditions from multiple frames/passes of the PFH, and so far the only way I have successfully stored those variables is through set on an entry in a params array or through global vars.
I have looked through some ace 3 modules and they seem to use the params method, but I was wondering if there was a different standard/method as I am storing many vars and I don't know if this is efficient
@astral dawn A moment of your time please when you are available
Me? o_O I'm right here
@slim oyster I guess it's fine ๐คท I share data through a common array sometimes as well, it's a nice feature of an array that you can use it like a pointer to your data.
Copy!
This is in the "on activation" part:
0= [] spawn {
player in thislist;
while {true} do {
Mortar1 commandArtilleryFire [getposatl (thislist select 0), "rhs_mag_3vo18_10", 1];
};
sleep 5;
};
I am trying to get this script to fire at the triggering unit, but I keep getting an error that "thislist" is an undefined variable.
When I use "Mortar1 commandArtilleryFire [getposatl (thislist select 0), "rhs_mag_3vo18_10", 1]; " by itself, it fires fine. How can I fix this?
This is used in a trigger btw
I thought you had a different name?
Some guy was asking about a similar thing before ๐ค
Aha. Well, this script is sort of popular for some reason....
Did you find a solution?
Oh nvm I guess the other guy was talking about a different thing
I have no idea what thislist is, it's some global variable
0=[...] what does that even mean? ๐
even more, there is no use to use in command if you don't use the result anywhere else
I have stolen parts of this script, ripped some pieces out from some places and shoved them in here...
๐คฆ
Why ๐
Well, I had a sort-of functioning script at first, and then I tried to develop it, seeing as it was not working as wanted... What I want is just a mortar-script that is capable of firing multiple barrages
Computer programs don't tolerate this ๐ Be happy you are not writing some proper programming language as this would probably not even compile ๐
ad infinitum
I am very aware of this. Picked up scripting today so.... Newbie here ๐
Looks like it's from a trigger act
It is part of a trigger, yes.
What is your condition? Is it set to repeatable and for player side?
So... you probably have to rewrite it like this:
[] spawn {
//player in thislist;
while {true} do {
Mortar1 commandArtilleryFire [getposatl (thislist select 0), "rhs_mag_3vo18_10", 1];
sleep 5;
};
// sleep 5; Why sleep here if your code never reaches this place??
};
is thislist being passed to the spawn thread?
I'll try it out now! Thank you!
Is there something special needed for the commandArtilleryFire command? Why is it in a loop?
Also this addEventHandler ["Fired",{(param[0]) setVehicleAmmo 1}] in the vehicle init of Mortar1 might help if you don't want it to run out of ammo.
Got a "generic error in expression" message... The reason why I had the sleep so far down was because if I had it where you placed it, the game freezes for ten seconds. @languid tundra I already have that ๐
I want it to loop because it is supposed to be a vital part of the defence of a base, keeping the attackers pinned (of course, the "sleep" will be longer and more random when I get the script to work)
make a timeout/countdown in the trigger and set it to repeatable
OK! Thanks for all the help though! I'll get back to my work!
@celest plume
params ["_triggerlist"];
private _triggerPlayerlist = (_triggerlist select {isPlayer _x});
if !(_triggerPlayerlist isEqualto []) then {
private _roundNumber = 0;
private _playertarget = selectRandom _triggerPlayerlist;
while {(alive Mortar1) && {(_roundNumber < 3)}} do {
sleep (random 2);
Mortar1 commandArtilleryFire [getposatl (_playertarget), "rhs_mag_3vo18_10", 1];
sleep (3 + (random 3));
_roundNumber = _roundNumber + 1;
};
};
};```
Something like that maybe, it would be nice to have a fired eventhandler set a var that could advance the while loop for counting rounds since I don't think `commandArtilleryFire` guarantees a timely shot
Thank you! Will test this before I go to bed
THis fires the first set of round allright, but do I need to set it to "repeatable" for it to fire multiple salvos?
@frigid raven try detected by trigger
yes set it to repeatable to fire the rounds multiple times
You could also set the trigger countdown/timeout to delay the first round and then get rid of the first sleep in the while loop
no problem
do you guys know how I can get a legacy version of the game like the very old one so I could try to the some achievements like Puppeteer and Dressing Doll? all I got was the Arma3LegacyPorts that just revert like 2 versions.
@tough abyss what do you actually mean? Is this a command or do you mean I should create a Trigger around every enemy unit? Sorry a bit unclear - not used to triggers
You can create trigger with many different functions not just present not present, one of them fires trigger if enemy is detected
whats the most reliable to find an empty position/make a vehicle spawn into an empty position these days?
and how much delay do you need in MP when spawning multiple vehicles
I've rarely had issues with the alt syntax of createVehicle with the last argument being "NONE". If you need a position before spawning the vehicle you could try findEmptyPosition, from reading it, it sounds like it would do the job.
https://community.bistudio.com/wiki/findEmptyPosition
@slim oyster For storing changed/new variables in a CBA perFrameHandler, is the best practice to store them in the passed array params? Never heard of that practice, so far I always stored stuff in global variables. But yeah that could work, very nice idea.
It might even be more efficient than global variables.
@languid tundra what does that even mean? https://discordapp.com/channels/105462288051380224/105462984087728128/534497970981306398
If you don't have CBA, the script boxes in 3DEN throw a hissy fit when you try to execute code in there that doesn't end with returning nothing.
Nothing nothing I mean, not Nil nothing.
@astral dawn I have no idea what thislist is, it's some global variable The list of units that are currently inside a trigger, in the trigger condition or onActivation script.
@slim oyster is thislist being passed to the spawn thread? no.
@astral tendon all I got was the Arma3LegacyPorts that just revert like 2 versions. That's the oldest available. Only the Linux Client might be older ๐
@robust hollow doing both already (also tried canCollide)
the problem should be having multiple vehicle spawn "at the same time"
Well, RIP, any other way to get the achievements?
Why can't you get them?
Bugs :-0
@tough abyss arent trigger more mission/editor specific usage? I need the mentioned behaviour within a mods script. Or is it a common practise to create triggers via script to achieve this?
I know the paper doll one is bugged for sure. Unsure about the rest.
You can unlock achivements via script if you put them into the correct place ๐
A lot of work tho.. Not worth it unless you really need to have 100% achivements.

And if you're going to hack the achivements anyway there are easier ways than that. Just google for it
You can create triggers editor or script the only limitation of script you cannot trigger attach object afaik. @frigid raven
Is there a command to check if a player is in a certain unit? as in units.arma3.com unit
Ahhh squad params, thanks I had no idea what to look under
@velvet merlin maybe setVehiclePosition with radius?
will try
@tough abyss alright gonna try that - thanks a heap
[_PC,"Contact NATO", "\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", "_caller distance _target < 3", {hint "Started the usage of the radio tower"}, {}, {hint "NATO contacted"}, {}, [], 60, 0, true, false, ] remoteExec ["BIS_fnc_holdActionAdd", 0, PC];
Why does this not work?
its gives error
what might that magical mysterious error be?
"On activation: Generic error in expression"
Any more to that error in RPT?
RPT?
22:11:57 Error in expression <false>
22:11:57 Error position: <false>
22:11:57 Error Local variable in global space
22:11:57 Global namespace not passed during: false
22:11:57 Error in expression <false>
22:11:57 Error position: <false>
22:11:57 Error Local variable in global space
22:11:57 Global namespace not passed during: false
22:11:57 Error in expression <false>
22:11:57 Error position: <false>
22:11:57 Error Local variable in global space
22:11:57 Global namespace not passed during: false
22:11:57 Error in expression <false>
22:11:57 Error position: <false>
22:11:57 Error Local variable in global space
22:11:57 Global namespace not passed during: false
22:11:57 Error in expression <false>
22:11:57 Error position: <false>
22:11:57 Error Local variable in global space
22:11:57 Global namespace not passed during: false
22:11:57 Error in expression <false>
22:11:57 Error position: <false>
22:11:57 Error Local variable in global space
13:13:58 Wrong color format
13:14:09 Error in expression <ontacted"}, {}, [], 60, 0, true, false, ] remoteExec ["BIS_fnc_holdActionAdd", 0>
13:14:09 Error position: <] remoteExec ["BIS_fnc_holdActionAdd", 0>
13:14:09 Error Missing [
13:14:09 Error in expression <ontacted"}, {}, [], 60, 0, true, false, ] remoteExec ["BIS_fnc_holdActionAdd", 0>
13:14:09 Error position: <] remoteExec ["BIS_fnc_holdActionAdd", 0>
13:14:09 Error Missing [
13:14:09 Wrong color format
13:46:43 [CBA] (settings) INFO: Checking mission settings file ...
13:46:44 Wrong color format
13:47:36 Error in expression <ontacted"}, {}, [], 60, 0, true, false, ] remoteExec ["BIS_fnc_holdActionAdd", 0>
13:47:36 Error position: <] remoteExec ["BIS_fnc_holdActionAdd", 0>
13:47:36 Error Missing [
13:47:36 Error in expression <ontacted"}, {}, [], 60, 0, true, false, ] remoteExec ["BIS_fnc_holdActionAdd", 0>
13:47:36 Error position: <] remoteExec ["BIS_fnc_holdActionAdd", 0>
13:47:36 Error Missing [
13:47:36 Wrong color format
13:48:04 Error in expression <ontacted"}, {}, [], 60, 0, true, false, ] remoteExec ["BIS_fnc_holdActionAdd", 0>
13:48:04 Error position: <] remoteExec ["BIS_fnc_holdActionAdd", 0>
13:48:04 Error Missing [
13:48:04 Error in expression <ontacted"}, {}, [], 60, 0, true, false, ] remoteExec ["BIS_fnc_holdActionAdd", 0>
13:48:04 Error position: <] remoteExec ["BIS_fnc_holdActionAdd", 0>
13:48:04 Error Missing [
13:48:04 Wrong color format
13:48:23 Wrong color format
13:48:25 Wrong color format
13:48:27 Wrong color format
that it?
Yep that looks like your code
Error Missing [ Well..
true, false, ] what is that last comma doing there?
i dunno ๐
lemme try without
well
it's not giving me any errors
but it's not doing anything
Maybe _PC vs PC ?
i honestly have no clue which it's supposed to be
lol
i figured it out
it was in a trigger's init but i forgot to make the trigger activate
would this be the syntax to check for two items in a vehicle cargo? if (item1 && item2) in (vehicle1) then {do thing}
@marble pasture nope, && would require 2 booleans
Try something like sqf if ((item1 in items vehicle1) && (item2 in items vehicle1))
woops ๐
What's the most convenient practice to get something like a C struct?
I do it by using an array and defining the ID of each field through #define like this:
#define MYSTRUCT_ID_SOURCE 0
#define MYSTRUCT_ID_VALUE 1
#define MYSTRUCT_ID_WHATEVER 2
...
but it's not convenient, also I have to redo the enumeration manually if I decide to change something.
Maybe there is a better way?
Do that in TFAR too
Could use CBA namespace and then use names, slightly less efficient tho
Oh allright... we need meme support now, 'I feel your pain' meme ๐ฆ
It's not fun if people just add their own values onto that struct
And then you want to add new ones too
Maybe at least there is some way to make enums through defines?
Maybe preprocessor can auto increment somehow...
could use line numbers ๐
But they are resolved after your #define is resolved. So already too late
There was some project which was an arma IDE but they made another preprocessor and named it SQF++ or something like that... can't find it
Oh maybe it's this one
http://typesqf.no-ip.org/
Yeah. could be
No... i remember that project had some OOP stuff in it
@astral dawn There are numerous of those
ObjectOrientedScripting is my personal one
NouberNou also had one
and there was some other ... where i forgot the name
code34 has one
I also have one
But that TypeSQF has its own preprocessor, so I thought maybe it has some other nice features like C-like enums or structs
Hmm so you have your own preprocessor/compiler as well?
OOS? yes
If I'm about to do reference counting, smart pointers and similar concepts in SQF, probably I have gone too far ๐ค
reference counting/smart pointers doesn't make much sense as that's already done internally
Unless maybe some object that won't be deleted, because the world itself holds a reference to it
yes except i must manage creation/deletion of my fake OOP objects
How to make a default param value for code?
params [["_array",[]], ["_predicate", {}]];
??
yep
thxy
Iโm going to try this question again. Does anyone know how to make the attributes of a SL apply to the rest of the squad when a trigger is activated?
I thought you could do this โvariablename = group this;โ in the init of the SL
and the trigger would apply to the rest of the squad
Any idea?
You can access the group members with {hint str _x; } forEach units group _sl;
and then inside the forEach you can do whatever you like.
Awesome! Many thanks for the reply
@astral dawn there are enums in RV engine
// destruction types
enum
{
DestructNo,
DestructBuilding,
DestructEngine,
DestructTree,
DestructWall,
DestructTent,
DestructMan,
DestructDefault,
DestructWreck
};
enum {StabilizedInAxesNone,StabilizedInAxisX,StabilizedInAxisY,StabilizedInAxesBoth, StabilizedInAxesXYZ};```
Is it SQF?
preproc
Wait, really ...
Hey @velvet merlin, would you happen to know if that OOP for Arma 3 works with Arma 2?
@tough abyss Look above, we have discussed all the OOP extentions a few hours ago
Soo... I guess all the made OOP extentions should work both for arma 3 and 2
YES
@edgy dune ๐
my brain struggled, apologies
it's just types yes
you hopefully don't have to type in 1,2,3,4,5,6,โฆ ๐
maybe a BIS fnc that I don't know of, but not natively
you can make array 100 elements long with one command but not with ascending numbers
nil
hello everyone
this my initpaycheck file : https://hastebin.com/oxekukecig.cpp
this error (client .rpt): ```sqf
0:25:50 Error in expression <
case 3: {life_paycheck = life_paycheck + 6500;};
case 4: {life_paycheck = life>
0:25:50 Error position: <+ 6500;};
case 4: {life_paycheck = life>
0:25:50 Error +: Type code, expected Number,Array,String,Not a Number
0:25:50 File life_server\Client\core\functions\fn_initPayChecks.sqf, line 54
What a problem ? ๐ฆ
iirc they compileFinal those values,so just do (call life_paycheck)
@rancid pecan Changes The Player(s) paycheck depending on what rank/level they are in the Police/NHS/Donator. I should hope that last one isn't something you're doing. If you are, you're violating monetization policies

@copper raven i don't understand you sorry ๐ฆ
iirc,life_paycheck is compileFinal'd
you can't just reassign it
life_paycheck = (call life_paycheck) + 6500; wouldn't even work
@velvet merlin
Are you sure that this thing is supposed to be compilable by SQF?
enum
{
DestructNo,
DestructBuilding
};
G_destructNo = DestructNo;
G_destructBuilding = DestructBuilding;
It gives me an error when I do this
copytoclipboard str compile preprocessfilelinenumbers "test.sqf";
what error?
0:49:16 Error in expression <ject_0\Project_0.Stratis\test.sqf"
enum
{
DestructNo,
DestructBuilding
};
G_des>
0:49:16 Error position: <{
DestructNo,
DestructBuilding
};
G_des>
0:49:16 Error Missing ;
0:49:16 File C:\Users\s-tron\Documents\Arma 3 - Other Profiles\Sparker\missions\Project_0\Project_0.Stratis\test.sqf, line 2
Me neither, but kju gave this: https://cdn.discordapp.com/attachments/105462984087728128/534832488045084672/commonDefs.hpp
defines is not sqf file
where do I use this then? I thought it was meant to be #included then compilePreprocessed
you can include it in config or mission config
Pretty sure enum is restricted to configs.
Allright, thx
@frigid raven tested detected by trigger, it does what it says on the tin, triggers with knowsAbout showing 4. The problem however is with AI as it has eyes on the back of its head
Hmm I see - ok thanks for the insights. I will see how I gonna implement the feature. Gonna report back if I found a "nice" way
alright this should be my last issue with these damn barrels. I've got this checking to see if a barrel is loaded onto a truck ```
["ace_cargoLoaded", loadtracker] call CBA_fnc_addEventHandler;
loadtracker = {
params ["_item", "_vehicle"];
if (_item in [toxb_test]) then {this}
};
Hi I am having trouble with ambient animations, when the unit gets killed it just stays in the animation like a statue. I want the animation to be ended when the unit is killed so it will be actually on the ground like a dead person is. Can anyone help with that?
How do you play the animation? IIRC I didn't have this problem
Hmm can't help you with this, sorry, I just used plain switchMove for my AIs. I guess you'll have to look inside BIS_fnc_ambientanim if noone can help you here ๐คท
How was the switchMove one?
well it requires more manual messing around rather than the BIS function
Thats fine
probably the BIS function disables some the AIs of units with disableAI command
Yes looks like the do disable AI
{_unit disableAI _x} forEach ["ANIM","AUTOTARGET","FSM","MOVE","TARGET"];
Maybe you can just re-enable some of them after calling BIS_fnc_ambientanim with enableAI, not sure which ones you should enable though
hey guys can any one give me all arma weapon list script to put it in my admin menu what i mean like this:
_david = (findDisplay 45856) displayCtrl 7777 lbAdd "---- Weapome List ----";
{
_david = (findDisplay 45856) displayCtrl 7777 lbAdd name _x;
(findDisplay 45856) displayCtrl 7777 lbSetData [_david, getPlayerUID _x];
}forEach allPlayers;```
so the script that is down not weapons list its player list so i need a all Weapon script to spawn weapons
Is it possible to parse a saved profile namespace? Outside of Arma?
Like if I use saveProfileNamespace to save a string, is it possible for me to extract the string from the Arma3Profile file?
Yes, you need to derapify the file first @surreal vapor
@prime horizon you can store control in a variable you know
@tough abyss Do I need to use Mikero's Dos Tools for that?
Probably
Cool, thanks!
Trying to see if there are any free tools that do it too, but maybe I'll just bite the bullet and pay up
I don't know much about them, but there's some info here: https://community.bistudio.com/wiki/Mikero_Tools
@astral dawn as @tough abyss says you can only use enum in config/mission config
You can but it is no use as it is just ignored like a comment
@surreal vapor you can derap using Arma 3 Tools from steam.
@surreal vapor I do not know what you want to achieve but sounds for a better job just storing those variables in extDB3 and read out of that sql database then trying to parse saveProfileNamespace
Hi guys, I am not sure if anyone has asked this before. But is there any standalone script where, say for instance, you capture enemy vehicles, weapons and ammo and it gets added to a "virtual arsenal" you can grab from?
If not, could anyone point me in the right direction on how to make one? I
Probably the closest thing available is this: https://github.com/Jeroen-Notenbomer/Limited-Arsenal
It's the arsenal from the Antistasi mission
Wow. Thank you. I was looking for this but couldn't find it.
I am not sure if it has API documented but it should be currently operational
Yeah I am not sure either, but I believe it has a readme. I'll check it out and let you guys know later it is runs fairly well outside of Antistasi
hey there. to check wether a unit is inside a specific building i use the bouningbox of it.is there a way to use the boundingbox minus like 40cm at the x,y,z borders?
so say,"unit doesnt stand directly at the wall"
Is it possible to open the virtual arsenal that uses a specific box inventory, but using a script to open it? I want a script that opens a virtual arsenal box, while the player and the box are on opposite sides of the map.
Id look at the add arsenal zeus module, and see its add action,see wat function is called
No add action, I want it run from the code straight up
Well i mean the action should have the function to open arsenal inside it so wouldn't knowing how it does so work? Sorry im not at my pc rn,im in class rn actually xd
Ok, I looked through the arenal function and I found this:
["Open",[nil,_box,_unit]] call bis_fnc_arsenal
I think this might be what I'm looking for
Yup that was it
hi, i need help with a mission that i'm making. i want to use this script https://forums.bohemia.net/forums/topic/210678-share-simple-motion-detector/ for an aliens mission. the script works fine the only problem is that the maximum range of the default mine detector of the game is 15m, is there any way to increase that range? thanks
Do you guys know how to revome all ace actions?
https://github.com/acemod/ACE3/blob/master/addons/interact_menu/functions/fnc_removeActionFromObject.sqf just do that but skip the check for a particular action and delete them all.
Any exemple?
It just amounts to _object setVariable ["ACE_interact_menu_actions", []];, I think.
cursorObject setvariable ["ace_interact_menu_actions",[]];
cursorObject setvariable ["ace_interact_menu_selfActions",[]];
The unit still have the actions
Because Scratch that, was thinking you mean another player unit had actions on his character objectcursorObject's variable on its local machine didn't change
So, what to do?
or are you trying to remove the class actions as well?
Just a Agent actions
Are you trying to remove actions added by ace or a mod, or through a script in your mission?
No, the default ace actions like healing
Remove all actions from scripts: object setvariable ["ace_interact_menu_actions",[]]; object setvariable ["ace_interact_menu_selfActions",[]];
Remove all actions from class/configs: ace_interact_menu_actnamespace setVariable [(typeof object),[]]; ace_interact_menu_actselfnamespace setVariable [(typeof object),[]];
The last one works, but it also remove all action from units that are from the same type, is there a way to only remove that unit actions?
The class actions are created to the custom namespace, they aren't specific to the unit
Is this for players in MP?
or for AI in MP?
why not the #arma3_config way of using delete instead of script?
For AI in MP
oh sorry nvm
put that code in a !hasinterface block
Nevermind, this isn't going to work for you since actions are created upon menu load for client on object
how?
ace_interact_menu_actnamespace setVariable [(typeof object),[],true];
ace_interact_menu_actselfnamespace setVariable [(typeof object),[],true];
maybe this for mp compatibility?
If it is only disabling medical options for AI, isn't there an ace medical CBA setting for that?
and no that will remove all actions of that class
Not tested, but I think you could overwrite some of the canInteractWith conditions to make them also check for AI/Player state.
So, how to espesifie the action I want to remove? like only the medical but I want the player to still have the ability to carry and load the unit in a vehicle
Are you sure there isn't a CBA mission setting to disable ACE medical on AI?
Never check that.
But do you know were I can get all the actions name to remove only especific ones?
getVariable
?
The list of actions is held in the object variable ace_interact_menu_actions. use getVariable to get it.
cursorObject getVariable "ace_interact_menu_actions"
returns nothing
Can you confirm that cursorObject is returning that it's supposed to?
R Alpha 1-3:2
hi, i have a problem with ambient anims. sometimes, but not always, the units move about 3-4 meter when a player joins the dedicated. tried the various versions from the wiki, always the same. at the moment i use this in the init field of the units: if (isServer) then {[[this,"STAND_U2"],BIS_fnc_ambientAnim ] remoteExec ["call",0,true];}; anyone got an idea ?
Anyone knows how to use the ace_unconscious event handle? and even a exemple?
if (isServer) then
{
_handle = "convoy\convoyInit.sqf";
_handle = [["pos_1","pos_2","pos_3","pos_4"],[c1,c2,c3,c4,c5,c6], 35, 500, 1, "NORMAL", "CARELESS"] spawn DEVAS_ConvoyMove;
};
How do i put multiple scripts into the init.sqf
Apolgies in advance new to arma 3 scriptin
as in how do u run multiple scripts? one after the other... is your problem with _handle = "convoy\convoyInit.sqf";? cause looking at it, it should probably be execVM "convoy\convoyInit.sqf";
@robust hollow thank you
if (isServer) then
{
_handle = execVM "convoy\convoyInit.sqf";
_handle = [["pos_1","pos_2","pos_3","pos_4"],[c1,c2,c3,c4,c5,c6], 35, 500, 1, "NORMAL", "CARELESS"] spawn DEVAS_ConvoyMove;
};
I had it like this b4
when it comes to multiple scripts do i have it right?
just have them under each other after the ;
yes like this: _handle = [["pos_1","pos_2","pos_3","pos_4"],[c1,c2,c3,c4,c5,c6], 35, 500, 1, "NORMAL", "CARELESS"] execVM "convoy\convoyInit.sqf"; _handle2 = [["pos_5","pos_6","pos_7","pos_8"],[c1,c2,c3,c4,c5,c6], 35, 500, 1, "NORMAL", "CARELESS"] execVM "convoy\convoyInit.sqf";
@slim oyster Appreciated
so I have to have them numbered
unless you use _handle later on in the script you dont really need to set it, is unnecessary.
No, you don't need a handle unless you want to terminate/manipulate it later
mhmm
basically
am tryna run a convoy script
// Tested with Development Build 1.66.140687
Thanks to Norrin for the initial scripts and idea which I used as base for my version
To use:
1. Copy the convoy folder into your mission directory
2. Create a convoy of AI vehicles, not grouped. Make sure each vehicle is named in the editor
3. Add markers on the map that you want the convoy to move through
4. Call "convoy\convoyInit.sqf" from your init.sqf to initialize the scripts (this must occour before step 5)
5. Add the code (see below) either to your init.sqf (which will start the convoy right away when mission starts) or to a trigger to start the convoy
6. convoy\ConvoyEnd.sqf is called automatically when convoy reaches the final marker. Any further actions which convoy needs to take can be coded in this file by user.
Check ConvoyEnd.sqf file for further information.
Code:
if (isServer) then
{
_handle = [["pos_1","pos_2","pos_3","pos_4"],[v_1,v_2,v_3], 35, 500, 1, "NORMAL", "CARELESS"] spawn DEVAS_ConvoyMove;
};
The code parameters in the script-call are:
1. An array of moveTo Markers for the convoy eg. ["pos1","pos2","pos3","pos4"]
2. An array that contains the names of the vehicles in the convoy eg. [c1,c2,c3,c4,c5,c6]. This array should not have any " symbol
3. Speed limit for convoy. I tested it with 35. This value can be time to time less due to speed corrections
4. Enemy search range. Enemies in this range will be considered as danger. Minimum value for this parameter is 300.
5. Convoy ID. It provides the ability to the user to branch the code in ConvoyEnd.sqf based on the given ID in case there are multiple convoys in map
6. Speed mode of convoy. I suggest to use Normal. It should match to speed limit which is given.
7. Behaviour. For a convoy careless is suggested behaviour so it can follow the roads without a problem.
License: These scripts are not to be altered or used for commercial or military purposes without the author's prior```
this is the instruction it gave me
I am confused on "4. Call "convoy\convoyInit.sqf" from your init.sqf to initialize the scripts (this must occour before step 5)"
that is defining functions for use later when you send the parameters (settings sent to the script/function)
call compile preprocessfile "convoy\convoyInit.sqf"
it will start and finish the script before the next one starts. spawn and execvm puts it in a scheduler so they run side by side kind of.
{
call compile preprocessfile "convoy\convoyInit.sqf";
_handle2 = [["pos_1","pos_2","pos_3","pos_4"],[c1,c2,c3,c4,c5,c6], 35, 500, 1, "NORMAL", "CARELESS"] spawn DEVAS_ConvoyMove;
}; ```
so should it be like this ^
use ``` for multiline blocks
yea that should work fine @tough abyss
@robust hollow @slim oyster tryin it right now appreciate all help
I dont know the particular script/functions, some require all clients & server to have an init called, some only for the server. Since it is an AI script and doesn't mention a headless client I am assuming it should be fine
if (isServer) then {
_handle2 = [["pos_1","pos_2","pos_3","pos_4"],[c1,c2,c3,c4,c5,c6], 35, 500, 1, "NORMAL", "CARELESS"] spawn DEVAS_ConvoyMove;
}; ```
Would be for a init that needs to be called globally, then a spawn for using the function/script
there is an example mission off the forum post showing the init only called on the server.
"call compile preprocessfile "convoy\convoyInit.sqf";
if (isServer) then {
_handle2 = [["pos_1","pos_2","pos_3","pos_4"],[c1,c2,c3,c4,c5,c6], 35, 500, 1, "NORMAL", "CARELESS"] spawn DEVAS_ConvoyMove;
}; "```
so this is what i should have in the init.sqf
no, this is what you should have
if (isServer) then
{
call compile preprocessfile "convoy\convoyInit.sqf";
[["pos_1","pos_2","pos_3","pos_4"],[c1,c2,c3,c4,c5,c6], 35, 500, 1, "NORMAL", "CARELESS"] spawn DEVAS_ConvoyMove;
};
Thank you, @robust hollow Do u have any idea whether i should have names of vehicles in the variable name box after clickin on the vic or should i have it somewhere else?
Cant get this darn script too fkn run probs cuz am fkn -65000iq
@everyone who evez can help
idk. why dont you look through the sample mission to see how the dev does it?
@robust hollow if you dont mind me askin where does it exist?
on the forum post you linked
Hey guys, quick question, just wanted to confirm before I abandon it, is there absolutely no way to intercept or disable the default ammo/refuel/repair truck functions only with certain vehicles? I can't really empty the cargo of all default trucks since my replacement system is only for aircraft.
@foggy moon you could empty or disable simulation the truck while a plane is nearby?
Any one can help my error?
@winter rose hmm, true, looks like a 1 second nearEntities check might be cheap enough
menu looks nice
but I kind of dont get when u would use it?
I guess im used to having a zeus or a arsenal?
oh okay i see,i forget is the engineer role/medic role in vinilla or ace? so something like that, where u need special perms
i think its nice, but the lag before the menu comes up?
can u select which plane to spawn? also that sound ,that lilttle humm
oh okay thats balance stuff I guess, but the menu is nice,id like to learn how to make some but ๐คท time
yea thats nice, if they had this would there be any need to re join?
100%?
no special case where they would need to rejoin?
@tough abyss did you save role of player in player namespace? Like:
player setVariable ["var_role", "PILOT", true]
I want to create sytem of roles changing for players on my polygon mission
And want to equip player from sqf file named:
[player] execVM "equip\<side_variable>\<role_variable>.sqf"
Your system looks good, @tough abyss
Were i can learn how to create dialogs like that?
With that command i don't need to create classes in description.ext?
Quick question, when it comes to the client ID. Does the client id change when the player disconnects? So let's say I join and my ID is 7, I disconnect, would the id of 7 be assigned to someone else or would is be empty?
So I would get the ID of 7 back?
Oh ok thank you.
Also I have another question, are there any good antihacks or any good methods to use to make an antihack that are publicly available?
@tough abyss thx for your answer. Good luck with your work!
I'm wanting to get rid of infistar as I don't really trust it much and I feel like something custom would work out better as far as performance and protection goes.
Well I know of a method that's pretty common as far as injecting code goes and I'd definetly like to fight against it. Or detect it then kick people for it.
Hence the client id question. I want to make a kick function but make it so it can only be remotely executed on yourself. So I wanna check for the owner using remoteExecutedOwner
That way someone doesn't just try kicking or banning everyone once they've found the function.
Also there's obvious methods like detecting if someone's disabled allow damage or not.
I'm just fishing for ideas here haha
What are some methods used for detecting cheaters?
@torpid grail battleye? ๐
Does that disable is in the mission functions?
Like if I had function that used the hint command, would it block the hint command
Bruh I'm about to block all the commands then ๐
I'll have to mess with it because if that's the case then I'm about to compile a list of every single function Arma 3 uses haha
Do I need the targets and args parameters
@tough abyss would you like to get in a voice call?
Haha damn alright I'll be back later then thanks for your input
Does anyone know the execution order of CBA XEH with the server or client prefixes? Does the main init get executed first or do the specific/server & client ones get executed first?
@tough abyss To cheat server, the cheater at least have to join the mission server, so server entry log is remained ?
https://discordapp.com/channels/105462288051380224/105462984087728128/534832543992905728 No enums are not preproc. They are config parser.
@astral dawn @velvet merlin
@tough abyss you can make array 100 elements long with one command but not with ascending numbers
Well.
_array set [200,0]
_array = _array apply {_forEachIndex} ? Something like that? does apply have forEachIndex?
Btw https://discordapp.com/channels/105462288051380224/105462984087728128/534840558875836426 who were you talking too?
@astral dawn Are you sure that this thing is supposed to be compilable by SQF? No.
@tough abyss defines is not sqf file It is.
@surreal vapor Trying to see if there are any free tools that do it too, but maybe I'll just bite the bullet and pay up Mikeros tools are free.
Arma 3 Tools can also do it. Armake can also do it.
I think mikeros tools even crash on profileNamespace stuff. Atleast i could only get it to work with BI tools. Don't remember what problem mikeros tools had.
@astral tendon Do you guys know how to revome all ace actions? What are you trying to do? You cannot remove actions that are defined in configs. You might be able to disable interaction completely though.
@slim oyster no ordering. The one that's defined first in config, comes first.
serverInit = ..
clientInit = ...
serverInit comes first. Other way around clientInit would come first
does apply have forEachIndex? no
It is it is not. commonDefines.hpp is meant to be used in configs
you said defines
preprocessor and defines work in SQF scripts too
you can use commonDefines.hpp in sqf scripts too... Actually.. You can use 98% of commonDefines.hpp in SQF scripts too. If those enums/class weren't there ^^
but it has these enums
which make an error in sqf
maybe if it's inside an #include block, it gets ignored?
nope. include block just copy pastest stuff
What I mean is M242 said "defines is not sqf file" but #define does work in sqf
wait, but when I tried something like
enum
{
DestructNo,
DestructBuilding,
DestructEngine,
....
};
I got sqf errors
Yes
because that's not preprocessor
Preprocessor works in SQF just fine, nothing stops you from using it
But enums are config. Not preprocessor
I meant commonDefines.hpp was lazy to type it all
name is actually CommonDefs.hpp. I wrote it wrong too ๐
Also some of those hpp files use __EVAL and __EXEC if I remember correctly which also wonโt work with sqf
Heh discord got confused
@still forum Thanks, best option. As long as I know that I can get a global init before client/server that is perfect.
but i got that enum from commondefs.hpp which you said was supposed to be used by sqf
All a giant confusion of people mixing up what's preprocessor and what's not.
Any one can help my error?
https://s.sqf.ovh/firefox_2019-01-17_15-25-18.png ๐ค I doubt it
the car script
@lean aurora what they are trying to say is that you must ask your question properly and on one channel to get help
So, what is your script, and what is the error you get @lean aurora ?
why is here straw?
The car script or anything
@queen cargo
And why do you have a mask on ? ๐
german identified
ALARM ALARM ... another movie ๐ ๐
Do anyone know how to add ACE action to a vehicle accessible from passengers ? I realize I've never done such a thing, and it could be pretty useful
(although I know this channel is normally not dedicated to ACE questions, very sorry...)
Oh I see, I didn't understand the wiki that way... Considering that some actions are accessible from both in and out of the vehicle, I thought it was the "0" type actions displayed inside too. Let's try with "1"
Yep, it works. Perfectly clear now, considering that you are adding it to the vehicle's selfActions. So when a player is "in" the vehicle, he kinda "become" the vehicle, replacing his external actions with selfactions from the vehicle. Makes sense. Thanks !
out is interaction, in is self interaction ?
basically yes, but you are accessing vehicle's self actions with the same key than usual external actions. Hence my confusion
yea, I personally went the config way
Just like ye olde fleximenu
// ยฉ v.2.5 MARCH 2016 - Devastator_cm
private _vcl = _this select 0;
private _last_marker = _this select 1;
private _convoyArray = _this select 2;
private _c = _this select 3;
private _ConvoySearchRange = _this select 4;
private _vcl_behind = objNull;
private _vcl_ahead = objNull;
private _destinationEnd = getMarkerPos _last_marker;
private _unit = objNull;
private _enemySides = objNull;
private _enemies = [];
private _enemySides = (driver _vcl) call BIS_fnc_enemySides;```
if (_c < (count _convoyArray) -1) then {_vcl_behind = _convoyArray select (_c + 1)};
if (_c > 0) then {_vcl_ahead = _convoyArray select (_c - 1)};
while {alive _vcl && !(_vcl getVariable "DEVAS_ConvoyAmbush")} do
{
if (_vcl distance _destinationEnd < 10 * (_c + 1) && _vcl getVariable "DEVAS_ConvoyCurrentMarker" == _last_marker) then {_vcl setVariable ["DEVAS_ConvoyDestination",true, false];};
_aliveConvoy = [];
{
_unit = _x;
_enemies = (_unit neartargets _ConvoySearchRange) apply {_x select 4} select {side _x in _enemySides AND {count crew _x > 0} AND typeOf _x != "Logic" AND !(_x isKindOf "Air")};
if (canMove _x && _enemies isEqualTo []) then {_aliveConvoy pushBack _x;};
} forEach _convoyArray;
if (count _aliveConvoy < count _convoyArray) exitWith {_vcl setVariable ["DEVAS_ConvoyAmbush",true, false]};
if (!isNull _vcl_behind) then {
while {_vcl distance _vcl_behind > 60 && _vcl distance [getmarkerpos(_vcl getVariable "DEVAS_ConvoyCurrentMarker") select 0, getmarkerpos(_vcl getVariable "DEVAS_ConvoyCurrentMarker") select 1, 0] < _vcl_behind distance [getmarkerpos(_vcl getVariable "DEVAS_ConvoyCurrentMarker") select 0, getmarkerpos(_vcl getVariable "DEVAS_ConvoyCurrentMarker") select 1, 0]} do {
_dir = getDir _vcl;```
if (((sin _dir) * (velocity _vcl select 0)) > 3) then {_vcl setVelocity [(velocity _vcl select 0) - (1 * (sin _dir)), (velocity _vcl select 1), velocity _vcl select 2]};
if (((cos _dir) * (velocity _vcl select 1)) > 3) then {_vcl setVelocity [(velocity _vcl select 0), (velocity _vcl select 1) - (1 * (cos _dir)), velocity _vcl select 2]};
} else {
if (((sin _dir) * (velocity _vcl select 0)) > 1) then {_vcl setVelocity [(velocity _vcl select 0) - (2 * (sin _dir)), (velocity _vcl select 1), velocity _vcl select 2]};
if (((cos _dir) * (velocity _vcl select 1)) > 1) then {_vcl setVelocity [(velocity _vcl select 0), (velocity _vcl select 1) - (2 * (cos _dir)), velocity _vcl select 2]};
};
sleep 0.1;
};
};
if (!isNull _vcl_ahead) then {
while { (_vcl distance _vcl_ahead < 40) || _vcl distance [getmarkerpos(_vcl getVariable "DEVAS_ConvoyCurrentMarker") select 0, getmarkerpos(_vcl getVariable "DEVAS_ConvoyCurrentMarker") select 1, 0] < _vcl_ahead distance [getmarkerpos(_vcl getVariable "DEVAS_ConvoyCurrentMarker") select 0, getmarkerpos(_vcl getVariable "DEVAS_ConvoyCurrentMarker") select 1, 0]} do {
_dir = getDir _vcl;
if (((sin _dir) * (velocity _vcl select 0)) > 1) then {_vcl setVelocity [(velocity _vcl select 0) - (2 * (sin _dir)), (velocity _vcl select 1), velocity _vcl select 2]};
if (((cos _dir) * (velocity _vcl select 1)) > 1) then {_vcl setVelocity [(velocity _vcl select 0), (velocity _vcl select 1) - (2 * (cos _dir)), velocity _vcl select 2]};
sleep 0.1;
};
};
sleep 0.1;
};
_vcl doMove getPos _vcl;```
Maybe use pastebin?
truxd
Can anyone confirm if this is related to anything that has to do with distance between convoy vehicles
So in the past I've used code like this in my description.ext to customized vehicles and their inventory when spawned
class Extended_Init_EventHandlers {
class B_T_LSV_01_unarmed_F {
init = " (_this select 0) call (compile preprocessFileLineNumbers 'vehicleLoadout.sqf')";
};
};```
The other night I changed the classname to an ammobox and used the script to empty the box, then load it with the gear I wanted.
Problem was some people could see the gear but not actually get it out of the crate, others had no issue. Is this a JIP issue or what's going on? Any ideas?
don't execute global inventory commands globally
only execute them once. at best on server
you are globally adding/removing items several times in just a few seconds.. arma get's confused
@leaden summit oh no this is a convoy script named devas convoy script
Basically I wanted to edit a variable in the script files to change the distance between the vics when convoying
"Details are in readMe.txt inside the zip. Examples about how to add custom code or introduce a patrol behaviour are inside ConvoyEnd.sqf. Sample mission can be found above."
Ahhh ok, so if I'm trying to make custom filled ammo boxes that can be spawned during the mission how would be the best way to do that?
No xd
am trying to put less distance between the vehicles in the convoy when they are moving from point A to Point B
Well the first thing I would do is start playing around with the line that says if (_vcl distance _vcl_behind <= 100) then {
@leaden summit changing init = to serverInit = would only call the script on the server
should i give it a go
allright leme give it a try
i will change it to maybe half that number as a test
I'm far from what you would call an expert, I have no real idea what I'm doing but that's where I would start
Hmm, anyone tried using an extension to makefile a description.ext? Trying to parse mission.sqm for current mission through an addon without the users having to make a description.ext manually
how can I make a task marker appear when further than 6km away?
Thanks can this be changed through scripting?
Also that appears to be for unassigned markers I am looking to increase the distance of an active marker
@slim oyster what do you mean? Mission does not need description.ext. EXT means extended so that you can extend mission config How do you autogenerate it with what params?
Is there another way to parse mission.sqm 3den entity attributes?
they are accessible through a description.ext include for the mission.sqm but not in mission without the include of course
Do you guys know how to use the ace_unconscious event handle?
no
but here's a code example
["ace_unconscious", {
params [["_unit", objNull],["_state", false]];
if(_unit != player || {!fp_ragdolling}) exitWith {}; // only ragdoll players and only ragdolling if it active
if(_state && {vehicle _unit == _unit && {!([_unit] call ace_medical_fnc_isBeingCarried) && {!([_unit] call ace_medical_fnc_isBeingDragged)}}}) then {
// ragdoll player
_unit setUnconscious true;
};
if(!_state) then {
// player woke up before ragdolling was finished
_unit setUnconscious false;
};
}] call CBA_fnc_addEventHandler;
by donig this
["ace_unconscious", {
systemChat "hi";
}] call CBA_fnc_addEventHandler;
It fires if any unit get unconcious
I dont feel like this is good for perfomace.
If you check if(_this select 0 != player) exitWith {} at the top it will be negligible
@robust hollow @frigid raven @Dedmen Thank you guys for the guidance on possible ways to deal with parsing saved data. I'll check out extDB3 and using Arma Tools.
@astral tendon I dont feel like this is good for perfomace. That tells me you don't know how eventhandlers work.
@surreal vapor there is a Intercept based Database extension too ;)
In case you don't want to go to the hassle of configuring extDB https://github.com/intercept/intercept-database/releases might be easier to use.
But you'd be my beta tester if you used it ๐
Yeah, im not that deep in scripting
Hey guys, is there a way to block the player when he's doing an animation, so he cant do 360 ? But only can move his head ? ty
How to create compositions like unit squads?
I would like to create a hole squad in one go than have to creat each unit and then group they.
I'm sort of having a hard time with the logic here... how would cursorTarget be useable in multiplayer?
Yeah... it's really screwing me up that you can specify a target to execute it on if that makes sense
What? you can't
like it just checks the player... do you just have to run it locally on each player or what?
It returns the cursorTarget of the local player
Unless I'm missing something
so if you want to check cursorTarget you just have to have each playing running it themselves?
understand how it works
same as player command. Or any other local command
Alright, thanks
I've got a question about this: https://github.com/acemod/ACE3/blob/e2ac18a05d5f646bc7cbc043bcc148fde4c0f5dd/addons/arsenal/functions/fnc_handleMouse.sqf
From what I understand, that updates the cameraPosition array based upon mouseButtonState which is itself written by mouse button event handlers. Then in the background there's a mission event handler that moves the actual camera position depending on any changes to cameraPosition
What I don't understand is that in this: https://github.com/acemod/ACE3/blob/e2ac18a05d5f646bc7cbc043bcc148fde4c0f5dd/addons/arsenal/functions/fnc_onArsenalOpen.sqf
The function to handle the mouse is only called once (at the bottom), meaning that although mouseState is getting updated, cameraPosition isn't updating in turn because the function to update it is only called once at Arsenal open.
What am I missing?
Brilliant! Knew I just have been missing something. Thanks, Dedmen ๐
wtf?
21:02:45 "Marker_90923,[10854.5,12898.9,0.1]"
21:02:45 "Marker_45214,[10456.8,19097.6,0.1]"
21:02:45 "Marker_73410,array"
What is 'array'?
a nil value
that should've been an array
You probably passed nil to getPos or getMarkerPos
oh god, really, nil, forgot this
_list = player nearEntities 20;
radius here is in meters aye?
Yes
In dollars
@astral tendon I would like to create a hole squad in one go than have to creat each unit and then group they.
in 3den : press F2 to go into group mode, select in the list, click on the map, ???, profit
So, how to do that in game with out zeus?
in game? via the debug console? BIS_fnc_spawnGroup indeed; I was pointing out the solution in the editor
does someone know how distance2d is calculated in here ?
yes
It's like... distance between two spots you would see on the map... because you don't take into account the altitude of two objects
hmm I am getting different values than from the arma engine
๐ค So what exactly are you doing?
cordsa = [1560, 1670,0]
(3)ย [1560, 1670, 0]
cordsb = [1562, 1676,0]
(3)ย [1562, 1676, 0]
Math.hypot(cordsa[1]-cordsa[0], cordsb[1]-cordsb[0])
158.4171707865028
this is javascript
[1562, 1676,0] distance2d [1560, 1670,0]
6.324 meters
You should do
Math.hypot(cordsa[0]-cordsb[0], cordsa[1]-cordsb[1])
no else after exitWith possible?
wouldnt make sense for else to work after exitWith. if you havent exited the script then ur continuing past the if anyway.
There is no exitWith-else structure. Sounds like you want ```sqf
if (_someBool) exitWith {_this};
_that
exitWith works without else because... SQF ๐คท
If you think else after exitWith would make sense then you don't know how else works
else is a binary command like +
CODE else CODE returns the array [CODE, CODE]
And then takes array as argument on right side
So I'd like to make a zeus module to set variables on an object - anyone know of a fairly clean way to get a reference to the object the module was dropped on from inside the module attributes dialog?
afaik the module's init script get's the object it was dropped on as parameter
it does, but the curatorInfoType display does not
what arguments do you get there
just the display
is it simple to add voice overs ? am curious but never heard any custom ones in a mod yet
Well you need to write the whole dialogue with subtitles. And I think voiceovers have special format with lipsync stuff
Never did it. And don't know anyone who did
@frigid raven I did radio VO which is pretty easy, just make an .ogg audio file and set it up it in CfgSounds. I didn't do lip files but it looks like you just run it through WaveToLip.exe in the BI sound tools and place the .lip file in the same folder as the ogg. Then just use the say command.
also, found out after many issues, if you make a logic radio speak (createLogic, etc) give it an identity (any, like "Armstrong" for example) else voices' pitch gets random
So I have to chose a pitch template then?
only if you're using a logic or something without one, normal units should already have it
kk
@foggy moon
The way BI is referencing the Zeus module in their dialogs is that they have a helper function called BIS_fnc_initCuratorAttribute.
e.g. RscAttributePunishmentAnimation config has the line below:
onSetFocus = "[_this,'RscAttributePunishmentAnimation','BootcampCommon'] call (uinamespace getvariable 'BIS_fnc_initCuratorAttribute')";
'BootcampCommon' is a class defined in CfgScriptNames, which specifies where Arma should look for the script file. 'RscAttributePunishmentAnimation' is the name of the script file located in that directory. RscAttributePunishmentAnimation.sqf will then be called with the arguments ["onLoad", _params, _logic]. _params select 0 is a reference to the display and _logic is your module. I assume you know how to get your object from _logic.
Ah, awesome. I had found most of that structure but didn't notice the script would get the logic argument. So theoretically via addon I should be able to add a class to CfgScriptNames and make it call my script from onSetFocus using the helper function, right?
Exactly. We did this in Achilles for adding new attributes to the attribute window, but it should not be different for a module.
Perfect. Very much appreciated!
hi guys, quick question, ive got a function that outputs 2 things - object and a position. Iam then trying to do a select on both and distance between them in the sqf file. this however gives me Error select: Type Object, expected Number. not sure why. anyone any ideas?
0:22:58 Error in expression <nvoystate;
if ([_convoystate] select 0 distance [_convoystate] select 1 < 100) >
0:22:58 Error position: <distance [_convoystate] select 1 < 100) >
0:22:58 Error select: Type Object, expected Number
_convoystate = [];
_convoystate = [_x] call AS_fnc_base_resupply;
if (_convoystate select 0 distance _convoystate select 1 < 100) .....
this is what the function outputs if I copytoClibpoard - [O Alpha 1-1:8,[17436.4,13169.2,0]]
try (([_convoystate] select 0) distance ([_convoystate] select 1)) < 100, I'd guess it's order of operations getting confused
yeah, let me give this a try!
Oh, hang on, [_convoystate] select 1 won't ever work, is _convoyState your array?
If so drop all the brackets
[_convoystate] select 0 will just give you _convoystate
the brackets are somehow only there in the error from .rpt
they are not in my code
but it didnt throw any errors so far after trying it with the additional ()
that's interesting, well if it works it works
thanks very much man!
if (["KA_proving_ground","PA_arsenal"] apply {isClass(configFile>>"CfgPatches">>_x)} findIf {_x} > -1) then{
endMission "END2";};```
Im attempting to block Personal arsenal and proving grounds. Its working to Block Proving grounds not for PA
```cpp
class CfgPatches
{
class A3_Anims_F_Config_Sdr
{
units[] = {};
weapons[] = {};
requiredVersion = 0.1;
requiredAddons[] = {"A3_Anims_F"};
};
class PA_arsenal
{
units[] = {};
weapons[] = {};
requiredAddons[] = {};
author[] = {"Drakeziel"};
};
};```
what u mean "block" ?
For some reason, linkItem does none of the following: create item in inventory, assign item to correct slot.
same with assign item after addItem creation. Bug? Doing something wrong? I'm at a loss
ex:
player addItem "Rangefinder";
player assignItem "Rangefinder"; //created, not assigned
player linkItem "Rangefinder";
//not created, not assigned
The interesting part is that in the example for assignItem, the NVG example does work. But wtf is up with the rangefinder?
Block as it ends the mission and kicks the player that has the mod to the role selection. I had a comma in the ",PA_arsenal" string.
{
private _unit = (_forEachIndex select 0);
private _seat = (_forEachIndex select 1);
_unit addAction ["Copy Loadout",{
(_this select 1) setUnitLoadout (getUnitLoadout (_this select 0));
},nil,3,true,false,"","true",5,false,"",""];
_anim = selectRandom ["SIT1","SIT","SIT3","SIT_U1","SIT_U2","SIT_U3"];
[_unit, _anim, "ASIS", _seat] call BIS_fnc_ambientAnim;
} forEach CAP_Loadout;```
{
params ["_unit","_seat"];
_unit addAction ["Copy Loadout",{
(_this select 1) setUnitLoadout (getUnitLoadout (_this select 0));
},nil,3,true,false,"","true",5,false,"",""];
_anim = selectRandom ["SIT1","SIT","SIT3","SIT_U1","SIT_U2","SIT_U3"];
[_unit, _anim, "ASIS", _seat] call BIS_fnc_ambientAnim;
} forEach CAP_Loadout;```
Neither of the above work. ^
CAP_Loadout = [
[loadout_0,seat_0],
[loadout_1,seat_1],
[loadout_2,seat_2],
[loadout_3,seat_3],
[loadout_4,seat_4],
[loadout_5,seat_5],
[loadout_6,seat_6],
[loadout_7,seat_7],
[loadout_8,seat_8]
];
diag_log format["%1",CAP_Loadout];```
(_forEachIndex select 0) That makes no sense. You cannot select from a number.
what exactly about that doesn't work? The action doesn't get added?
It returns that _unit / _seat undefined
You mean, loadout_x and seat_x?
yep
They're all defined as objects
Did you check in debug console whether they really are?
Are you listening?
debug console.
in game
Maybe add a diag_log at the time you set CAP_Loadout to check
Output: ```sqf
14:13:55 "[[loadout_0,seat_0],[loadout_1,seat_1],[loadout_2,seat_2],[loadout_3,seat_3],[loadout_4,seat_4],[loadout_5,seat_5],[loadout_6,seat_6],[loadout_7,seat_7],[loadout_8,seat_8]]"
Changed above CAP_Loadout
Okay, so _x select 0 etc
no
https://community.bistudio.com/wiki/params example 9 shows how to use params with forEach
When I use postInit = 1; on two of my functions, the game will be stuck in an endless loading screen. As soon as I take it off, it loads fine, but the function doesn't run, any help?
awwwwwwwwwwwwwww thnxs I didn't see that example!
your script needs to exit
Would having a new function with postInit that calls these two functions work as a work around??
no
the loading screen waits till all postInit scripts are done
you can just spawn the content. such that you return right away
Oki
i have a problem
http://prntscr.com/m9aydj i use "safezone" but text do not appear
all buttons
Looks like buttons are obstructing each other? Try to set alpha of every button to 0.1 and it will be more clear what is going on
Any one know how to use the BIS_fnc_moduleCivilianPresence function?
i don't understand @astral dawn
I supposed that your buttons were having wrong coordinates and drawn at the top of other buttons. So I suggested you to make background of your buttons more transparent so that it's easier to troubleshoot this and see what is behind what. @rancid pecan
Also you should probably explain your problem better so that others can help you,
hey guys
newbie from garry's mod here
can i take the invade and annex framework
and create my own campaigns and missions
instead of running default ones set within invade and annex?
it looks like i can turn off their missions
but since zeus is built in i'm assuming i can add in my own missions
but can i just add within their mission folder
and add my own campaigns?
Using the gui editor was a mistake
@austere granite What should I use?
i don't know how to use.
๐ But there is a nice GUI editor actually
Did you know about this one @austere granite ?
i did but still not a huge fan
then again i guess my UI stuff is a little out of the realm of normal behavior and more often than not heavily influenced by scripts
I guess if you want a pretty static one that should be quite good akjsually
Personally, I hope enscript will make things easier
I think it already has a gui editor, right?
correct
haven't looked into enscript usage to actually edit the UI dynamically though
Iโm probably gonna hold back and develop the older Armas and let BI fix the bugs etc when Arma 4 finally releases.
@still forum well technically you can sleep/waitUntil in postinit, it is just that everything else will get delayed and if condition depends on something that comes after that never comes the game hangs forever
Question: If a object with a variable is deleted, does hes variable also gets nill for a JIP player?
Was actually talking about bindings
Should really Look into enscript...
Object oriented way makes it fairly easy to implement bindings myself though if not natively available
Because later in a mission on a dedicated server seems that the deleted object also lost hes variable by a isNull check
But I still wait for somebody to provide me with the Info required to recreate the vm itself ๐คทโโ๏ธ๐คทโโ๏ธ
If the object gets deleted all variables set on it get deleted. When you say later you check variables on deleted object, you canโt, the object is no more, so you cannot query its variables. If however you do objNull getVariable "whatever" the result is nil @astral tendon
I mean the variable we give on the editor
like isNull MyObject
Because it does return true to me in a single player test
like myCar
deleteVehicle myCar;
isNull myCar; // true
// JIP
isNil "myCar"; // true or false? ```
False, not nil
@tough abyss and I think you are gonna argue that people are "technically" not idiots?
Well whoever decided to call postinit functions instead of spawning sure thinks highly of humanity
That is my question, because I cant do a JIP test
@winter rose how is that you understand what people ask and I donโt?
ยฏ_(ใ)_/ยฏ
"Object with variableโ FFS! How did you know it is not object with variable set on it but variable which has object assigned to it?
He said I mean the variable we give on the editor
That was like miles after
But before Lou responded.
You say that, but I reckon he new this all along
Lou responded half an hour later ^^
Not a very dedicated follower of this channel ๐
Hey! I have a life so he said, alone in his apartment
SQF code downloads -> https://www.sqfi.com/resource-center/sqf-code-downloads-edition-8/
Does it have the car script?
page 42
Im trying to assign some a player with the var name z1 to currator from debug using z1 assignCurator myCurator;
currator name is Zeus
and...?
its not working,
r u server executing it?
yes
is the curator already assigned?
yes to z1, but he does not have access
other option would be to assign the Logged in admin
Anyone have a script that would make the logged in admin Zeus?
there's an option to select it in editor
from the Debug, Already in an operation the editor is not an option at this point.
Maybe unassign it first?
Ive tried it, ```unassignCurator Zeus;
z1 assignCurator Zeus;
How do you create the logic?
Place down in the editor prior to mission . The module for not have a variable name. Itโs name is Zeus and assigned to z1
Interface is not available. For the player logged in. Iโm wondering if the module is bugged out.
Try respawning
Did , even had him log back in .
I can easily fix this in the editor, but currently in operation. Iโm attempting to fix through Debug.
Wait it doesn't have a var name? Isn't that what assignCurator needs?
z1 assignCurator "ModuleCurator_F";```
z1 assignCurator myCurator; ive tried this and nothing .
myCurator is a curator module?
''z1 assignCurator ModuleCurator_F;''?
i dont understand what curatorObj is for the syntax
usualy i can figure out basic things Im all messed up on this one
ive looked at the fuction you made @still forum and the advice you have given others on the fourm.
private _module = (createGroup sideLogic) createUnit ["ModuleCurator_F", [0,0,0], [], 0, ""];
z1 assignCurator _module;
diag_log isNull getAssignedCuratorLogic z1;
try that,and check server rpt
It'll just be a line saying true or false
17:26:55 false
So it worked
worked he has zeus now thanks @copper raven I understand what you did now, thanks for showing me .
how does the server mission list display get the mission data for description/mission name? Can other values be fetched?
test = cursorObject;
deleteVehicle test;
isNull test; //return false on the first try then true on the second
There is a note on the deleteVehicle page saying about that the object becames null on the next frame, can some one add another note saying that is important so commands like isNull that if they are cheking on the same frame without a delay will return false even tough the object was deleted
That is what it says in the note already, in its own note box to stand out because it is important
Hey guys, I have been breaking my balls for a few hours on this (Such an easy piece of code I don't understand why I can't get it xD)
I wanted to make a small function which would move someone who joined a pilot slot to a specific marker but everyone else to another marker. Here is what i have so far:
_pilots = ["pilot_slot_1","pilot_slot_2","pilot_slot_3"];
if (player in _pilots) then {player setPos(getMarkerPos "spawn_pilot")} else {player setPos(getMarkerPos "spawn_default")};
Pretty sure I must be making a stupid mistake somewhere but if someone could open my eyes to it I would appreciate it!
ohh nonononoooo
player is an object
_pilots contains an array of strings
private _isPilot = false;
private _player = player;
// check pilot_slot_<0 to 10> for player
for '_i' from 0 to 10 do {
private _unit = missionNamespace getVariable [('pilot_slot_' + str _i), objNull];
if (_unit == _player) exitWith {
_isPilot = true;
};
};
// set the pos based on _isPilot
player setPos (getMarkerPos (['spawn_default', 'spawn_pilot'] select _isPilot));```
I'd do sth like this
I see. Thanks will give it a try!
@peak plover Works great. Thanks!
@wise frigate you can give unit role description in editor and then check if player matches that description with roleDescription https://community.bistudio.com/wiki/roleDescription
@tough abyss Also a good idea, Thanks!
Another generic option, assuming no other roles are of the pilot class, is checking their class: if (typeOf player in ["B_Pilot_F"])
Little question is a Eventhandler an unscheduled enviroment? -> addEventhandler?
should be. you can use canSuspend to double check if you need.
the event handler script is unscheduled
I read up today since i had problems yesterday now i looked again at the enviroments it isn't clearly declared on the arma page but i read related problems. That sleep already paid of from yesterday. Thanks for the information
So since everything is timing specific i have now to change the code a lot for better fault handling and bug fixing in the future.
How would I check if the player is wielding a weapon?
OK, solved the problem sorry
!weaponLowered player
``` @mortal nacelle
thank you
Anyone else had a problem that some UI control is weirdly squished, even tho it is configured as a square?
I am currently working on a mod and some people reported a bug which shows the main control squished. i cannot recreate it and so wanted to ask if someone had some similar problem
Maybe you configured it wrong and it is dependant on user video settings
thje height and width are configured as such,
w = "pixelW * 128";
h = "pixelH * 128";
they are also set in sqf at some point but same rule here as well
always pixelX * _value
I assume you read and understood this https://community.bistudio.com/wiki/Arma_3_Pixel_Grid_System
Curious why you ignore pixelGrid https://community.bistudio.com/wiki/pixelGrid
thanks i'll try that
You can, if you give it correct path
@tough abyss i need to create prefix file?
when i try use addon for that - getting game crash, not found file
but path is correct
What path you give?
#include "\terrano\scripts\macros.sqf"
And what is your addon called?
terrano
path is current
on that addon i have pictures and textures. They works fine
And the error, it should give the path it is looking at
How do you pack your addon?
Please someone link me a decent tutorial on how to make a Status bar for wasteland, Ripping my hair out here and PC may get thrown out the window
Works fine for me without prefix @dusky pier
don't include it so it doesn't crash at first, try loadFile it from debug console until you find the correct path
shouldn't @ be used in front of an addon path? or only for addons sounds?
So on toolboxselectedchanged event I am trying to set a variable to the value it has set it as
_id = _params param [0,4,[4]];
systemChat str _id;
RLRP_nemesis_selection = switch case(_id) do {
case 0: {west};
case 1: {east};
case 2: {independent};
case 3: {civilian};
default {"EMPTY"};
};
systemChat str RLRP_nemesis_selection;
But Its just going as default
Used systemchat and it does return a number, then the second systemchat returns the default which is EMPTY So My issue is that the checking is not going quite well
...switch case(_id) do {... Try the documentation for switch https://community.bistudio.com/wiki/switch_do
@peak plover That isnt My issue
@tough abyss Already checked Couldnt find anything I was doing wrong
Ok then
@mint kraken
switch (_CONDITION) do { // not case (condition)
case 1: { hint "1" };
case 2: { hint "2" };
default { hint "default" };
};
great minds think alike
great minds read the wiki
I didnt see the case there Thanks @winter rose for calling it out
& @tough abyss & @peak plover ๐
@winter rose there it goes again, are you a wizard?
\o/
Well I would thank them but then I would have to thank myself because I Said the same thing to myself โCheck the wiki the answer might be thereโ. Which is why This was My last place to ask
Next time you should just ask yourself
So, pretty basic script, and I've done scripts like this before - but it doesn't work. No errors, but it doesn't play a sound.
Ideas?
this addAction ["Ship Horn", {playSound3D ["sounds\shiphorn.wav", boat1, false, getPosASL boat1, 1, 1, 1000]}];
Testing in singleplayer, boat1 is the name of the ship in which I am using the addAction.
Look at Jacmac's example on the playSound3d wiki page, sounds in the mission directory need absolute pathing
is native wav supported though? (I don't remember)
@eager prawn what if you just playSound, does it work?
playSound takes a CfgSounds classname
Ah yes indeed
@foggy moon I guess it will be for MP useโฆ @eager prawn you could use boat say "cfgSound1" as a workaround
can I path it straight from C:/ drive? - as it's only running on one server (doesn't need a defined mission space)
and no, say goes over VON
I need this to be a ship horn that only travels 1000m
the odd thing is that it doesnt tell me the .wav file is missing
so it sees it in preprocessing... it just doesnt play it?
you can remoteExec say
Anyway, I don't know about playSound3D, so I let @foggy moon on the front line ;-)
lol I've fought long and hard with it
gah still nothing
It seems you would need the file on every client too
Also, if soundPosition is specified, the passed object is ignored
So yeah, Jacmac's note on playSound3d
_soundPath = [(str missionConfigFile), 0, -15] call BIS_fnc_trimString;
_soundToPlay = _soundPath + "sounds\some_sound_file.ogg";
playSound3D [_soundToPlay, _sourceObject, false, getPos _sourceObject, 10, 1, 50];
And seems buggy according to KK's note
@eager prawn I just remembered I actually used KK's function on the mission I used 3d sounds in http://killzonekid.com/arma-scripting-tutorials-mission-root/
alright, I'll give that a try tomorrow. Thanks
Who, what, where?
Hello guys. I would like to add options to set 3rd person view to be available only in vehicles. Is there any event handler that runs when player switch his view? Or there is only way to use eachFrame event handler?
if(difficultyOption "thirdPersonView"==1)then{
if(vehicle player==player)then{
if(cameraView == "External"||cameraView == "Group")then{
vehicle player switchCamera "Internal";
};};};}];```
Thank You
@eager prawn you could make it a fake weapon and put that in some invisible turret and fire it in command
if (["KA_proving_ground",
"NSS_Admin_Console",
"MGI_TP_V3","MGI_TG",
"XEDOM_AdminTool",
"SSPCM","Revo_DC",
"mcc_sandbox",
"mcc_sandbox_curatorExp",
"sn_backpack_air",
"sn_backpack_tt",
"sn_backpack_sw"
"SPCONTROLMOD",
"targetedBUGHANDLER",
"TPW_HUD"] apply {isClass(configFile>>"CfgPatches">>_x)} findIf {_x} > -1) then{
["Admin_Mod", false, 2] call BIS_fnc_endMission;};
//Mods banned off the Server
if(["tf47_launchers",
"ravage",
"BloodSplatter",
"BloodlustLITE_Auto",
"BloodSplatterLITE"] apply {isClass(configFile>>"CfgPatches">>_x)} findIf {_x} > -1) then{
["Restricted_Mods", false, 2] call BIS_fnc_endMission;};
//arsenal Block
if (["PA_arsenal",
"VAS_Diag",
"Gear_Loadout",
"KA_VAA",
"nks_arsenal",
"Roys_Arsenal"] apply {isClass(configFile>>"CfgPatches">>_x)} findIf {_x} > -1) then{
["Arsenal_Mod", false, 2] call BIS_fnc_endMission;};```
Iโm probably missing something simple, when testing each works in the debug. When together in the init doesnโt seem to work .
not sure why you need to use apply
if (["tf47_launchers",
"ravage",
"BloodSplatter",
"BloodlustLITE_Auto",
"BloodSplatterLITE"] findIf {isClass(configFile>>"CfgPatches">>_x)} > -1) then
it was a missing comma after "sn_backpack_sw" as far as apply vs find if im trying to understand that now.
@slim oyster https://discordapp.com/channels/105462288051380224/105462984087728128/536397089777909760 engine stuff. No can't.
@astral tendon can some one add another note saying that is important so commands like isNull that if they are cheking on the same frame without a delay will return false even tough the object was deleted Why? The not is already saying exactly that.
is there any difference between _array select {true} and _array findIf {true} ?
yes
regarding performance etc
one selects. The other finds if
eh
they are completely different things
select copies every element that returns true
findIf finds the first element that returns true
completely different
Well then it makes no sense that I answer your stupid questions if you cannot read my answers
quick question: will "string1" trigger both blocks or just the first one?
case "string1";
case "string2": { hint "string1 or string2" };
case "string1";
case "string3": { hint "string1 or string3" };
default { hint "default" };
};```
It does exactly what the hints already tell you^^
wait a minute ... why do you have "string1" twice?
that's the question, I'm trying to trigger all applicable code blocks
"string1" gets caught by the first case. It will never get to the second one
So I need to drop it through an if tree. OK, thanks
Ello you lot, need a hand with something:
Error at:
onEachFrame format [
"
onEachFrame
{
ctrlActivate (findDisplay %8 displayCtrl %9);
onEachFrame
{
importing using #include "\A3\Ui_f\hpp\defineResincl.inc"
no.8 is IDD_MULTIPLAYER and no.9 is IDC_MULTI_TAB_DIRECT_CONNECT.
Error:
11:01:32 Error in expression <
onEachFrame
{
ctrlActivate (findDi>
11:01:32 Error position: <onEachFrame
{
ctrlActivate (findDi>
11:01:32 Error Generic error in expression
11:01:32 Error in expression <
onEachFrame
{
ctrlActivate (findDi>
Not sure what the problem is? (or is it not located here?)
using this
https://forums.bohemia.net/forums/topic/218185-server-spotlight/ with a small tweak to not require the password in the args, instead use CBAs server + password cache.
My code is here also https://pastebin.com/kivrdrZ2
no.8 is IDC_MULTI_TAB_DIRECT_CONNECT and no.9 is IDD_IP_ADDRESS no they aren't.
you are off by one
In what I said or the script?
you said
Ah
and the script
That onEachFrame nesting looks so horrible ๐
well mb
Like.. what you said and the script don't match
Hi. How to use addActions on the side SERVER.
On the server side I create vehicle.
_veh = createVehicle ["FlagPole_F", [8778.79,13252.6,0.00133514], [], 0, "NONE"];
_veh addActions ["Hi", {hint "Hello"}];
dont work(
@still forum
dont work
_veh = createVehicle ["FlagPole_F", position player, [], 0, "NONE"];
[_veh,["Hi",{hint "Hi"}]] remoteExec ["addAction"];
should
@still forum
not((((
position player if youโre on dedi, that will not work.
What kind of server is this? Dedicated?
@copper raven why cross out?
Guys. Why create circular progress bar?
I don't know. Maybe people think it looks fancy?
@tough abyss Thought he had success in creating the object, just the way he wrote ๐คท Didn't understand what doesn't work, object creation ,or the addAction
@fleet hazel sqf // on dedi private _flag = createVehicle ["FlagPole_F", [8778.79,13252.6,0.00133514], [], 0, "NONE"]; [_flag, ["Hi", { hint "Hi!"; }]] remoteExec ["addAction"]; // will add the action to -connected- players. [_flag, ["Hi", { hint "Hi!"; }]] remoteExec ["addAction", 0, true]; // will add the action to every player, even JIP
also, do not create on player's position, because the mission can be player-hosted or run on a dedicated server, where player is null
@winter rose Thanks for your help. I will start it at the very beginning of the start of the mission.
@winter rose I will use two version you code
@fleet hazel two versionsโฆ?
@winter rose [_flag, ["Hi", { hint "Hi!"; }]] remoteExec ["addAction", 0, true]; // will add the action to every player, even JIP
Oh version #2, ok
is there a location for the images/videos that are used in the arma loading splash screen? like, when you use -skipintro
Hey, haven't done too much research on this topic and I'm not sure where to start. I'm looking to create a script for my unit due to often arsenal-abuse by certain individuals. Especially when players make their own modified version that bypasses our blacklist for mods. Is there a way to create some sort of mission script which would make a text notification in side chat in case someone opens an arsenal or executes a script through a debug console?
hi, not sure if im in the right area but a mission maker i know is trying something out, he knows how to get custom sounds into a mission file using cfgsounds and say3d but is there anyway you can call these sounds from a custom modpack rather than adding the files into the mission file to keep the size down for the people that play it. ive tried things as simple as changing the file path which allows the mission to boot with no errors but no sound plays
Hello!
Is there any specific way I can set a dialog to be displayed on top of AAAAAALL the other dialogs?
like the very very first layer
@tough abyss As far as I know it's a case of enforcing signatures & use something like ACE's PBO whitelist
Wouldn't that result in the "Mission Won" screen for those who don't have whitelsited mods
Negative. You can set it up to either warn or kick them, and if warned it also pops up in global chat
Hm interesting, so it will essentially issue a warning if someone is using something other than the whitelisted mods, correct?
Correct
In terms of making sure they don't modify other mods to "sneak" mods in, if they're really doing that I'd look at how important they are to the community with an obvious disregard for regulations. BUT that's not the purpose of this channel lol. If you want to stop them smuggling, you need to sign everything and verify signatures
Yeah of course, we just like to make sure to have evidence before proceeding with anything in the unit.
And we always like to confront them directly with solid evidence, so the warning thing would work perfectly for us.
But that ACE feature could very well provide us with what we're looking for.