#arma3_scripting
1 messages ยท Page 594 of 1
I could do something similar to this
if ((_veh isKindOf "landvehicle") && (driver _veh == player)) exitWith {
But for air
it's all possible;
- in trigger you can get a list of all units inside it (
thisList), so you can filter the player and the heli - I'm not an expert on waypoints, but shouldn't be too hard to use HOLD waypoints and only trigger them when a player is in the trigger (and loop over ID's)
although you could also have multiple pickup points, so the player has to pickup from multiple helipads which each have it's own AI group
EH "Take" is being fired when you reload. Any ideas?
is that a question or statement? ๐ค
question if i have done something wrong or is the actrion just being handled as taking
because I've never seen that behaviour
no, CBA only extends on existing EH's, not adding behaviour to it
Probably not intended, wouldn't make much sense, as there is Reloaded eh already
it would make sense; since you take a magazine from your inventory, although I doubt it's supposed to do that...
^
yeah, it makes logical sense, but probably unintended
Is there any scripts running besides that?
Better try it in vanilla just to make sure
Just a mission with only a soldier?
empty stratis map with one ammo bearer
Wonder if put would fire, if you put the magazine from the weapon back to your inventory ๐
๐ค
here's the debug copnsole scripts:
player addEventHandler ["Take", {
params ["_unit", "_container", "_item"];
systemChat "take";
}];```
no other script is running
it's kind of bothersome
it's not even that the player is the container and the unit
but the unit is a groundweaponholder
the container is the player-unit
tested on VR, single unit, and it does indeed trigger the magazine loading from dummyweapon.p3d
Hello, someone can help me ? I want to use "AnimChanged" Event Handler. But they don't detect any animation when i switch weapon. Only when I move. How can I have a detection of the animation when I switch a weapon ? Thanks you.
Changing weapon is something different than regular animation so that's why not working in this context; maybe checking the weapon every frame is the way?
isnt there a change weapon eh?
IIRC not but might wrong
Don't need to use a while, addMissionEventHandler ["EachFrame",{/*yourcode*/}]; is slightly better
Each frame isn't the same system ?
action EH?
switchweapon is an acvtion
so you could trigger on all keydown events and if the keydown is for action to switch to antoher weapon, execute the code
One can switch weapon without using action menu
For the moment I'm using "actionkeys". The concern is that I'd like my script to run, once the end of the animation of the change of my weapon.
actionkeys is what i would use
Each frame isn't the same system ?
You compare withwhile? That's a nono
but there are a dozen of different keys which could switch a weapon...
there are also a dozen of actions ๐
i remember doing this to check for players opening interrupt menu
Yes, and i have write all this keys ^^ But that execute my script when I press my key
switch-case
But i want to execute my script only when i have change my weapon
Bind to the action is a massive no (for me) since you can only assign one EH to the action menu today
waituntil and then oneachframe check until weapon is desired
Ok, thanks you ๐
btw @ebon citrus https://feedback.bistudio.com/T151351 ๐
onEachFrame is also a big no because of the same reason, could cause a conflict between scripts; addMissionEventHandler ["EachFrame",{}] is better
Not Fixable
F
When unit reloads it takes current magazine and puts it in uniform or vest or backpack and takes another magazine from those containers, so the magazine changes and the action of putting or getting a mag from a container triggers the EH. Granted that the firing on addprimaryweaponitem is a bit odd, however at this point we are not going to touch it as it could introduce unexpected behaviour and break existing functionality in scripts. AFAIK no tweaks have been done to these EHs for a long long time.```
fair enough
it's fixable; just would take too much time and effort for something that small
"if it's broken but fixing it breaks other things, dont fix it"
it's a feature now
might want to add this to Biki on the note for "take" EH?
to let people know it fires on reloading aswell
Gib a bit
Nah, it's too late, just a sentence before sleep
Just to make sure, it happened when a unit reloads right?
Okay, consider it done
but not switching attachments
anyways, i have to figure something else out
might have to override the "take" action from ground-items
So I have managed to make the script only trigger if its a helicopter, thats landed and isnt moving. How do I now tell the AI to get in the heli, I try waypoints in the SQF but nothings happening. I know the scripts running
Is it because I haven't referenced the units before?
can you share the code?
BIKI updated
cheers
Basically I need to find a way to make AI placed on the map by another script, be commanded by this script.
Condition:
call{{_x iskindof "helicopter" && isTouchingGround _x && speed _x < 1} count thislist > 0 }
On Activation:
call{_handle = [(thisList select 0)] execVM "Scripts\JAC\Transport\Task1.sqf";}
Then inside that SQF is:
private ["_veh","_vehType"];
_veh = _this select 0;
_vehType = getText(configFile>>"CfgVehicles">>typeOf _veh>>"DisplayName");
if ((_veh isKindOf "helicopter") && (driver _veh == player)) exitWith {
hint "bing pot";
};```
Inside the QRF is where I need to then order the AI to board the heli thats triggered the condition.
Hi I have a question regarding the SQL_CUSTOM protocol in extDB3.
For the normal SQL protocol, you can use the TEXT parameter to make it wrap string datatypes in quotes.
Example: "extDB3" callExtension "9:ADD_DATABASE_PROTOCOL:<DATABASE_NAME>:SQL:<PROTOCOL_NAME>:TEXT"
How can I do the same with SQL_CUSTOM protocol? When I look at the example in the docs, there doesn't seem to be any place to add those parameters:
"extDB3" callExtension "9:ADD_DATABASE_PROTOCOL:<DATABASE_NAME>:SQL_CUSTOM:<PROTOCOL_NAME>:<SQL_CUSTOM_FILENAME>"
Do I have to define this somewhere else?
EDIT: Managed to find the solution. It's enabled by defining OUTPUT=string in the sql custom ini file
deleteVehicle nearestObject [getMarkerPos "Respawn_West_1", "Campfire_burning_F"];
"Respawn_West_1" setMarkerPos getPos tester;
"Campfire_burning_F" createVehicle (tester getRelPos [1, 0]);
wow that's formatted a bit nicer on my screen. anyway, looking for help creating an object directly in front of the player
i've tried using "direction", "getDirVisual", "getDir", and now "getRelPos"
the object is sometimes off by as much as 30 degrees
What I've done to do this before is you could attach the object to the unit and then detach it right afterwards
Personally I don't like doing trig just to create an object lol
Some other person prolly has an easier solution but attachTo will work if all you're doing is just putting it in front of the unit
Hmm that's not a bad idea....
Just obj attachTo [unit,[0,distance,(this one will take testing cause sometimes 0 is in the ground)];
Actually wait it's for a campfire right? @spark rose
yep
hm. think i may have to modify it but i think your idea will work
Np, it worked for me when I made my knockoff Squad logi system lol
yeah it's not bad (i use Bis_fnc_holdActionAdd), but i don't like how (as opposed to how i was doing it) that it doesn't follow terrain well
hmmmmmmm
yeah thats the only issue, i kinda forgot that cause my build system has a keybind for changing elevation
_pos = tester getRelPos [3, 1];
createVehicle ["Campfire_burning_F", _pos, [], 0, "CAN_COLLIDE"]
best solution thus far
can_collide results in the exact position, but similar to your attachTo and detach method, sometimes the orientation relative to terrain is a bit off
Is there a way you can find out which vehicle just entered a trigger, then get AI to load into said vehicle.
I manged to do find out if its a helicopter or land vehicle but its as far as I got
_veh = false;
{
if !(vehicle _x == _x) then {
_veh = vehicle _x;
};
} foreach thisList;
I'm on a phone... Blame Google ๐คฃ
And no, it's not THE solution, but will help you to get the correct way in your case...
does this syntax look correct for the objectsmapper function? I'm getting a "generic error in expression" from the objectsmapper function itself when running this
0 = [TaskManLocations, 0, call (compile (preprocessFileLineNumbers "TaskMan\compositions\tentcamp.sqf"))] call BIS_fnc_ObjectsMapper;
TaskManLocations is a global variable (or atleast it should be, I was told to just leave out the _ prefix that assumedly used when making local variables) i made in another script file that runs execVM on the separate file that contains the objectsmapper line above, the variable contains an array of markers
TaskManLocations = ["loc","loc_1","loc_2", "loc_4"];
Can You attach a player to a Geometry point?
0 = [TaskManLocations, 0, call (compile (preprocessFileLineNumbers "TaskMan\compositions\tentcamp.sqf"))] call BIS_fnc_ObjectsMapper;
```Parameters:
position: Position - (Optional, default [0,0])
azimuth: Number - (Optional, default 0) the template orientation
objectsArray: Array - created with BIS_fnc_objectsGrabber
badChance: Number - (Optional, default 0) must be in range 0..1. Chances of object non-creation for each object ```
`TaskManLocations` is not a position it's an array
@hidden talon
you want
how would I redefine it as an array in that line?
i mean you have an array of strings
so you'd have to do a bit of conversion on taskmanlocations to get positions out of that
oof, that's far beyond me
i can help you
what is "loc", "loc_2", etc
are those actual things or are you using them as placeholders?
they're marker names, yeah
okay
so here's what you'd do
to get a position of a marker, you use getMarkerPos
since we have an array of these markers, it's impractical to go
_pos1 = getMarkerpos "loc";
_pos2 = getMarkerpos "loc2";
//etc
of course, hence why I made an array for them ๐
instead, what we can use is called a forEach operator
well
not operator
forEach construct is more apt
anyways
what we'll do, is we'll first assign an empty array for the positions we want to store to be fed into
so I would string together a "forEach in array" ish line?
_myMarkerPosArray = []```
so we have our empty array defined with the variable _myMarkerPosArray
is it possible to define that as a global variable, or is it fine to define that multiple times locally in each of my script files where I need to create a composition with the objectsmapper?
now we need to put things in that empty array, which is where our forEach construct comes into play
or rather one time each for my composition scripts, not multiple
i try to avoid gvars wherever possible, if i have a variable that's existent in one script that i need to get into another i'll do everything in my power to just pass that variable along to the new script
but if you're just starting out and you want to get your foot in the door, it's OK to use gvars
it can just make things sloppy when you end up having a lot, since they all need unique names and can cause problems if you accidentally use the same varname for different things
you want to keep your variables in-scope unless you have to take them out
anyways, back to your code
that's what I was hoping for, i basically have a script file that is ran during the mission, which holds the locations array as a global variable, to make it easier on myself i'd rather define the empty extra array in that single file, instead of having to have it locally in each of my individual composition spawner files
and i need to be able to communicate between the file that selects a position, and the composition files
myMarkerPosArray = [] //Now a gvar
{
private _newPos = getMarkerPos _x
myMarkerPosArray pushback _newPos
} forEach taskManLocations;```
so, i did a few things here and i'll explain each one
first i'll explain the forEach construct and how it works
forEach is what you want to use when you want to act on many different values within an array
like we do in this case, for instance
what I assume its doing is going over each element in the original array, and grabbing their positions and storing them in the dummy array?
correct
and we needed to define that myMarkerPosArray as an empty array, because without it the game would go "what the heck is this" and not know that you wanted to stick these new values in an array
so to summarize, forEach will execute code using each element of an array as an element wherever you define it in the construct
which leads me nicely into the first line of the actual working of the code itself
private _newPos = getMarkerPos _x
Sorry to interrupt your explaining but just quickly encase anyone knows.
Im trying to set the groups variable name when I spawn them in a using a sqf. Anyone know how, I tried a few things but no idea.
This is how I spawn them in:
Spawnteam1 = [[6862.94,1083.6,0], WEST, ["rhsusf_usmc_marpat_wd_squadleader"], [], [], [], [], [], 308.080] call BIS_fnc_spawnGroup;
so this is pretty straightforward. i've defined a local variable, _newPos, to be used exclusively within the scope of this forEach construct (since we don't need it elsewhere)
@high silo will help you when i'm done with tin, one sec
anyways
_newPos is a local variable, as distinguished by our underscore in front of it
and i actually just amended my code to include private, which is a simple command that tells the game that this variable should only be available in the scope that it's defined in
i'm still very fuzzy on scopes, I assumed scopes was basically the equivalent to wether a variable is local and global, but it seems to not be the case
i don't want my global variable to be private if private means it's local, when I need to reference it in a separate script
private just means it's only accessible within that scope
a scope is different from locality in the sense that a scope is an independent part of your code, whereas locality is where the code is being executed in the game
anyways, back to the example
private _newPos = getMarkerPos _x
myMarkerPosArray pushback _newPos
so we've defined a new variable, _newPos, to temporarily store the value given by getMarkerPos _x
For everyone; all the information provided by Vauun is also available on the wiki, or part of any starter programming course online
^
i will provide helpful links when i'm done
now _x is what's known as a 'magic variable'
it's a bit special
i'm aware of the wiki, I just have alot of trouble with figuring out syntax, very new to this
we all start somewhere ๐
but _x is special because it's representative of the variable currently being operated on in the array provided to forEach
so for each time forEach runs
it will step through the array you give it
and effectively replace _x with whichever value in your array that it's on
so _x is only very temporary, until when and if you replace it anywhere else?
yes, but you're not replacing it, the game is
well, yeah ๐
as i understand it now, its basically a temporary variable that can be whatever you need it to be
yes
without having to create a new variable to "take up space"
in essence
yes
basically, this is keeping you from having to manually write out
newPos = getMarkerPos "pos1"
newPos = getMarkerPos "pos2"
and then manually putting all that in an array
so now i just need to pull _x out of the dummy array in some way, and communicate it to the separate script, assuming that's the entire conversion process
nope
_x only exists in forEach
all it is is a variable
you don't need to reference it anywhere
the return of our values comes in the next line
myMarkerPosArray pushback _newPos
oh i see, its already set as the new current variable in the dummy array
so i can just use the dummy array
one sec there's a house fly that's really bothering me
alright there's that problem solved
also let me write what this forEach is doing, might make it a touch more understandable
// what we have in our SQF
myMarkerPosArray = [] //Now a gvar
{
private _newPos = getMarkerPos _x;
myMarkerPosArray pushback _newPos;
} forEach taskManLocations;
//what the game sees
{
private _newPos = getMarkerPos "loc1";
myMarkerPosArray pushback _newPos;
} forEach ["loc1","loc2","loc3"];
// myMarkerPosArray is currently [[x,y,z]];
{
private _newPos = getMarkerPos "loc2";
myMarkerPosArray pushback _newPos;
} forEach ["loc1","loc2","loc3"];
// myMarkerPosArray is currently [[x,y,z], [x,y,z]];
{
private _newPos = getMarkerPos "loc3";
myMarkerPosArray pushback _newPos;
} forEach ["loc1","loc2","loc3"];
// myMarkerPosArray is currently [[x,y,z], [x,y,z], [x,y,z]];```
so while all WE'RE putting into the game is ```sqf
{
private _newPos = getMarkerPos _x;
myMarkerPosArray pushback _newPos;
} forEach taskManLocations;
the game sees and does all that additional stuff below
and the result is an array of the positions for each marker
also i'm bad and forgot my semicolons in the earlier examples
that's all making my head hurt to try to interpret, but i think i got the gist of it (mostly at least)
exercising your brain is never a bad thing
pushback is pretty straightforward - all it does is appends a new value to the end of an array
so now that we have our positions from our markers
we can do a similar thing for your original code
{
0 = [_x, 0, call (compile (preprocessFileLineNumbers "TaskMan\compositions\tentcamp.sqf"))] call BIS_fnc_ObjectsMapper;
} forEach myMarkerPosArray;```
how would it know what _x is since it's in a totally separate file?
like i said _x only exists within a forEach loop
so _x is _x everywhere where there is an _x for that moment?
yes, in that forEach construct
how does that not cause conflicts with other scripts defining their own _x?
or is that where scope comes in
well for one you can't assign _x as a variable
but yes, it only exists within the scope of your forEach
oh i see
i think i understand that a bit better now then, _x is not a real variable in that sense, it's not a string, integer or array, etc, and it doesn't change itself into one, except the game sees it as one within the scopes you're using it in
yes and you can only use it in forEach afaik
as for @high silo
Spawnteam1 = [[6862.94,1083.6,0], WEST, ["rhsusf_usmc_marpat_wd_squadleader"], [], [], [], [], [], 308.080] call BIS_fnc_spawnGroup;
i see you're trying to use an RHS group to spawn, you need to use 3DEN's config editor to actually get what you seek. the game doesn't know what["rhsusf_usmc_marpat_wd_squadleader"]is. you need to specify a path to a config entry
to do so, open your config viewer in 3DEN, (i think it's Tools > config viewer) at the top
in the left hand pane, scroll down to cfgGroups
expand that
and then go find the group that you want to spawn
at the bottom there will be a long entry that looks
something >> like >> this >> which >> is >> a >> path
copy/and past that in parenthesis
instead of that array
Spawnteam1 = [[6862.94,1083.6,0], WEST, (something >> like >> this >> which >> is >> a >> path), [], [], [], [], [], 308.080] call BIS_fnc_spawnGroup;
configFile
you can specify your own mission configs but i don't think you're doing that
How will I know which is the right one, theres tons
you have to click through the cfgGroups entries. they are pretty self-explanatory by name, i think it starts with B / O / I / C (for respective factions) and then it gets more narrow in scope from there
thanks, it's claiming _x is an undefined variable, but I'll have a look through the page on it and see if I can't figure it out I guess, thanks for the help so far
can you show me your code?
I found RHS but dont know what im looking for directly
Its just giving me all the RHS equipment
if you single-click on the various group entries and then look in the large, main window it will have a definition in there that's the actual name you see when clicking for groups in the 3DEN editor
https://www.youtube.com/watch?v=lM7IHPun3eE > ArmA 3 Editor Tutorial - Config Viewer - Finding Classnames
oh I think it's because i did a whoopsie and left out the curly brackets, i've got another issue with a simple switch where I do the actual random array element selection
can't boot up arma right now to show you
i'll plop it on pastebin, it's quite alot
sure
pastebin screwed that line 1 up, don't worry about that
getting an error at line 22, etc where I'm trying to select random from a missions array at the bottom
Ohhh I get it
it claims the syntax is wrong but i've tried embracing the cases with brackets, then curly brackets, it seemed to work for a time but I'm out of my depth on that I think
aha, you're using case wrong but i see why you're making that mistake
configfile >> "CfgGroups" >> "West" >> "rhs_faction_usmc_wd" >> "rhs_group_nato_usmc_recon_wd_infantry" >> "rhs_group_nato_usmc_recon_wd_infantry_team" >> "Unit5"
@high silo yep, you got it. though i think you drilled down too deep, remove >> "Unit 5" from the end
I already struck oil?
you certainly did, Mr. Pink
_team1 = [[6862.94,1083.6,0], WEST, [configfile >> "CfgGroups" >> "West" >> "rhs_faction_usmc_wd" >> "rhs_group_nato_usmc_recon_wd_infantry" >> "rhs_group_nato_usmc_recon_wd_infantry_team"], [], [], [], [], [], 308.080] call BIS_fnc_spawnGroup;
switch (VARIABLE) do
{
case ANYVALUE1:
{
STATEMENT;
...
};
case ANYVALUE2:
{
STATEMENT;
...
};
...
default
{
STATEMENT;
...
};
};``` @hidden talon
see, case doesn't REQUIRE an integer to work
even if I have a limited amount of integers in my array?
case will match the value given to it against the variable in parenthesis in switch
the variable and values can be anything
oh I think i see it now
they don't have to be numbers
the _objtype already picks a random value doesn't it?
sec
@high silo close, but you're using [] instead of ()
(configfile >> "CfgGroups" >> "West" >> "rhs_faction_usmc_wd" >> "rhs_group_nato_usmc_recon_wd_infantry" >> "rhs_group_nato_usmc_recon_wd_infantry_team")
_team1 = [[6862.94,1083.6,0], WEST, (configfile >> "CfgGroups" >> "West" >> "rhs_faction_usmc_wd" >> "rhs_group_nato_usmc_recon_wd_infantry" >> "rhs_group_nato_usmc_recon_wd_infantry_team"), [], [], [], [], [], 308.080] call BIS_fnc_spawnGroup;
yep, you got it
I can wait till your done Vauun ๐
So how do I now define the group name
you did already, it's _team1
_objType = floor(random(11)); i'm not sure what you're trying to do here though @hidden talon
So why didnt it work before?
do you just want a random event to happen?
So why didnt it work before?
i mean that function you wrote works, but you may be trying to reference the variable somewhere that variable isn't available
it's a local variable so you can only use it in the same file unless you pass it to another
(or make it global)
depends on your environment. show me all your code
i'm not sure myself, I admit i grabbed the basic switch setup from a reddit post explaining how to spawn pre-made compositions, I had a look at the random wiki page but wasn't sure what the 11 is supposed to be there for, other than possibly adding extra numbers to look for?
i believe originally it picked a random composition file to spawn, and may be leftovers I didn't delete from that, since the random mission switch at the bottom is supposed to deal with that, I commented it out and had the switch reference _rndLoc instead like it probably should, and it magically solved the syntax issue - the script isn't quite working out at all though unfortunately, on the + side there are no more syntax issues
Random script is selected to run, giving them a task to land at a LZ pick up the infantry there and transport them.
Units are spawned in "Task1Units.sqf"
_team1 = [[6862.94,1083.6,0], WEST, (configfile >> "CfgGroups" >> "West" >> "rhs_faction_usmc_wd" >> "rhs_group_nato_usmc_recon_wd_infantry" >> "rhs_group_nato_usmc_recon_wd_infantry_team"), [], [], [], [], [], 308.080] call BIS_fnc_spawnGroup;
When the heli lands at the LZ its checked to see if it is a heli, if its come to a complete stop and which heli it is. From there the AI spawned in the other script is then ordered to load in that script. "Task1.sqf":
private ["_veh","_vehType"];
_veh = _this select 0;
_vehType = getText(configFile>>"CfgVehicles">>typeOf _veh>>"DisplayName");
if ((_veh isKindOf "helicopter") && (isPlayer driver _veh)) then {
if (team1 distance heli1 < 30) then {
_tra1 = _team1 addWaypoint [[6869.75,1081.69,0],0];
_tra1 setWaypointType "GETIN NEAREST";
};
};
Can I just add this in the "task1units.sqf"
publicVariable = "_team1";
i would avoid using publicVariable instead just pass the variable
how ๐
- side there are no more syntax issues
@hidden talon it's the little victories! i've been doing SQF for four years now and i still have trouble sometimes, so "no syntax errors" is cause for celebration to drink sometimes
i'm just glad I learned a bit about variables and the magic variable today ๐ i've been trying myself for a few years, had a hiatus until now when I'm experimenting with random task generation
always had issues actually learning though when my native language isn't english, and i'm a bit of a thick head unless there's visual learning
i got my start by doing eventhandlers that shot jeeps out of a machine gun
i thought that was so amusing i decided i wanted to learn about more than what i could do
now i've done things from fully-MP compatible cutscenes to todd howard boss fights to ace-combat styled 20v20 furballs over takistan at the end of an op
@high silo to answer your question
lmao that's a whole lot of progress for 4 years
how are you executing task1units.sqf
It will be randomly using the init.sqf but atm to test locally
I havent gotten to coding that part yet, hence locally tested
The init.sqf will just exec the main script, which will pick a random script to trigger from a selection I give it. Once a mission is complete it retriggers the main script in a endless loop untill we get bored and stop
because its the easiest way for me to do it and understand what im doing
you're making more work for yourself tho
hold on
if you want to define a bunch of different groups that have the potential to spawn
you can just stick them all into an array
and then select randomly from that array
and pass said value into your spawnGroup function
You lost me
ye so you can just
_groupArray = [
(configfile >> "CfgGroups" >> "West" >> "rhs_faction_usmc_wd" >> "rhs_group_nato_usmc_recon_wd_infantry" >> "my_group_1"),
(configfile >> "CfgGroups" >> "West" >> "rhs_faction_usmc_wd" >> "rhs_group_nato_usmc_recon_wd_infantry" >> "my_group_2"),
(configfile >> "CfgGroups" >> "West" >> "rhs_faction_usmc_wd" >> "rhs_group_nato_usmc_recon_wd_infantry" >> "my_group_3")
];
_groupToSpawn = selectRandom _groupArray;
this will randomly select one of those config entries for use in your spawnGroup function
so you'd then have something like
_team1 = [[6862.94,1083.6,0], WEST, _groupToSpawn, [], [], [], [], [], 308.080] call BIS_fnc_spawnGroup;
such as?
So I now have randomish units spawning at the pos, I still need to order them to get in the helicopter when it lands close enough to them.
And create markers for the pilots to head to.
I have a way of telling if the heli is stopped, which heli but I cant order the AI around because they are not defined in that script
Sorry to interrupt, guys, but I have a question that I think should be easy to answer, but I'm having difficulty finding the answer.
I want a script to start when a player walks into a trigger. How do I reference that player? How do I assign them to a variable?
Use a trigger?
In the condition:
if (A distance B < number) then { script here };
Or just use a area trigger like the 10x10x10
Ah, so the player is implied and does not need to be explicitly defined?
Depends what you have the trigger set to
When anyone enters zone
In the trigger you can set the size, type activation etc
Can set it to Blufor, anyplayer, anybody etc...
I am wanting a player to join a group when they enter the trigger zone, but I do not know how to define the player
Or reference them
[_unitOne, _unitTwo] join (group player);
That's where I am on, I am having difficulty referencing the "_unitOne" when that unit is the player joining a different group
So
[Player21] join (BingPot);
Unitone is the variable name
Double click on the player, at the top will be a place where you can assign its variable name
In this case, it will be whichever player enters the zone, so I cannot statically assign it to a specific player
I apologize for the noobie questioning. I am extremely new to this.
I am a C++ dev, but writing my first scripts in Arma.
if (A distance ZoneA < 6) then { [A] join (BingPot); };
if (B distance ZoneA < 6) then { [B] join (BingPot); };
That should work
Just do that for every player
Probably a easier way
But thats how I would attempt it
Great! Thank you. It's something I can work off of, at lease.
Connor here might give you a better way
why wouldnt you just execute the trigger on clients and do player in thisList as the condition, and [player] join myGrp on activation?
I see him typing /
im not seeing a need to define a distance check for every unit
That sounds like a *great idea. So you just create an array on mission init and work from there, I assume
.. no?
idk, depends on how you specifically are trying to do it, how i described it the only thing you would need to do in advance is assign a variable to the group so you can reference it.
Ok, thank you. I appreciate the help.
@robust hollow sorry to tag you, but I spent 6 hours trying to work this out but still can't.
I want to spawn a AI squad in one script and assign it's group variable name. So I can then give it a waypoint in another script. Without making it a public variable or running the other script. Any tips?
As atm the other script is saying the group is not defined in its script...
Similar but it didn't actually fix a issue just solved one I already knew how to do
Same as this question just re worded as I think i didn't explain myself correctly
that is the correct way to assign the variable. is the group created and given a waypoint on the same client?
No it's created on one script, and assigned in another that's my issue
But I can't create it and assign it in the same script, as one creates the AI and the other checks to see if the player is close enough for the AI to then climb onboard.
not quite what i mean. is it a sp or mp mission?
I am working on this problem for a client of mine on Fiverr.
The problem sounds simple but of course that is never the case with code.
We are trying to add a tab to the shop in the warlords addon. In the shop we are looking to add a a section where the players can purchase an airstrike on a location, Done by A.I. We are having trouble finding where in the .pbo file, the code for the shop is. If we did know where the code location was then it would be more simple to add that section to the shop in the warlords interface.
If anyone could help find, or make this happen, then please let me know. If you need more details let me know about that too.
Mp
Yes, they play mp
No I was answering Connor
oh
so i mean is the group created on the server and the waypoint is assigned on the server, or do the two scripts execute on different clients.
@tough abyss what pbos have you looked in?
So they are spawned on a server level, but triggered with a player on a client level
But they are both in a sqf file
and why would you like to avoid a public variable?
Going to be multiple of them and don't wanna increase strain on the server if possible
There gonna be repeating every 15mins for about 3-4 hours plus other stuff running at the same time
doesnt sound so bad
When I tested it with a public variable it didn't work, unless I was assigning it wrong will have another look then
try functions_f_warlords.pbo -> \warlords\fn_wlpurchasemenu.sqf
idk if thats the right function but it sounds like a shop menu to me
Ah, yes, Warlords. The Warfare lite
Boy do I miss Warfare BE
where would I find the warlords file?
inside the pbo
You will probably find that inside of the .pbo
where in the pbo. Does it need to be opened as a file and not notepad?
what? you open it how you normally do
same as how you looked at missions_f_warlords
in addons right... because we have been opening it in notepad and looking through the lines of code that are there
๐ฌ
I take it theres another way that we have over looked
yea. any pbo unpacking tool.
oh
I linked it above, but I suppose any would work.
that armaholic link is one (though it is outdated)
ok
though if you are unaware of pbo tools then I'm not sure how much success you're going to have modifying the warlords shop. you shouldnt be modifying it directly in that pbo
we havent modified anything. We have just been looking so I think were safe on that one.
ok ๐
Are you just trying to add assets? The wiki documentation details how to do this.
Ah, that's far beyond me.
How the heck do I use the fricken Pbo manager. the file icon is just a blank piece of paper.
I wanna say something, but Connor will just destroy any semblance of knowledge I pretend to have.
You click the green arrow on the upper left and navigate to the .pbo you want to open
Once opened, you right click -> extract the .pbo to a location
Ah, yes. It is zipped using 7z
yea
I highly recommend 7z for all of your compression and extraction needs ๐ฌ
https://www.7-zip.org/
It's lightweight and portable
end ad
Think Winrar, but it doesn't make you depressed
Plus it isn't popping CVE's every couple of years...
https://www.cvedetails.com/product/3768/Rarlab-Winrar.html?vendor_id=1914
what am I opening this file with.
Yeah ok
Can this be cleaned up at all?
this addAction
[
"<t color='#96afff'>Gear Up</t>",
{
params ["_null", "_caller"];
_arsGroup = groupID group _caller;
switch (_arsGroup) do
{
if( groupId (group player) == "BlackOps") then
{
default {[blackops_box, _caller] call ace_arsenal_fnc_openBox};
};
if( groupId (group player) == "Undercover") then
{
default {[undercover_box, _caller] call ace_arsenal_fnc_openBox};
};
};
}
];
I'm not in game to try it, so I'm not sure from looking at it if it'll even work
whats the point of declaring a switch statement if you use an if statement to decide what exists inside it? just scrap the switch all together
Fair point. I thought I had to define caller in some way like that.
so haven't used initPlayerLocal.sqf yet. Can I put any normal .sqf scripting commands in there or do I have do some extra parameter setup or anything.
works same as everything else. its only special because it is automatically executed for you.
mk so if I use the variable player in the initplayer, it only targets the player that connected just then? such as,
if (isServer) then {
[player, "AfricanHead_03"] remoteExec ["setface", 0, player];
};
or do I have to use playableUnits
well.... initPlayerLocal is only going to execute on that player... so unless that player is the host, an isServer if statement is completely useless.
https://community.bistudio.com/wiki/Event_Scripts#initPlayerLocal.sqf
look at initPlayerLocal and initPlayerServer, together they might achieve what you're after
ok then so I should be able to just do
player setface "AfricanHead_03"
and it will apply that skin to every player that joins the game since player is local in the initPlayerLocal
no, because only the connecting player would see the changed face.
initPlayerLocal does not execute on all clients every time a player connects. it executes on the client connecting. it is called initPlayerLocal so you can tell it apart from:
init - which executes on the server and players as they connect
initPlayerServer - which executes on the server when a player connects
and initServer - which executes on the server when the mission starts
so you would still want to remoteexec setface
mk... so use initPlayerServer with the remoteExec above. i saw a clause saying avoid using initPlayerServer.sqf so I was trying to avoid that
yea
would I still use the player variable? how would I tell it to modify only that player that connected? would I have to var every playable unit in the mission?
it only executes on the connecting player, so you can either use player or _player from params ["_player", "_didJIP"];
kk ty
oops, partially misread ur message. with initPlayerServer player wont work so use the param variable.
just read the wiki its all very straight forward ๐
thats what i was wondering. so _playerunit
yes
so I will have to do it for a specific unit var as _playerUnit is undefined until mentioned. I don't want to have to var every playable unit though. what about something like:
{[_x, "AfricanHead_03"] remoteExec ["setface", 0, _x]} forEach playableUnits
u saying ur going to run that every time a player connects?
nah just wondering if that would work so I don't have to do something like unit1, unit2, unit3... etc individually
whats wrong with _playerunit?
well i get an error when I use:
[_playerUnit, "AfricanHead_03"] remoteExec ["setface", 0, _playerUnit]
saying its undefined
I guess I haven't learned that yet
........ legit just paste it on the line above the remoteexec
Oh. Guess I need to look up how params work in the grand scheme of things. It seems obvious to you but I thought it was telling me something else.
usually, parameters are provided in the _this variable.
params "names" and "filters" elements of an array
if no left-argument is provided, params uses the _this variable
params ["_playerUnit", "_didJIP"];
// is approximately the same as
private _playerUnit = _this select 0;
private _didJIP = _this select 1;
```@fair drum ๐
is there a way to trigger MEH Ended also if you quit a mission via ESC menu?
can i attach a variable to a ctrl?
it's a string variable, so i could use text, but i need text to display texture
setVariable also accepts a control as argument yes
is there a way to detect if a magazine is for a primary weapon or handgun?
if the answer is crawling the config, i'll do that myself, im just asking if there exists a way
no command for that afaik
i see
im stuck in the config aswell
there isnt specificly linking anything
i basically need to find out the weapon that uses a specific magazine
and i feel like iterating through the whole config is a bit time-consuming
a magazine can go in many weapons (see "magazine wells" in config)
oh yeah, i forgot this part
basically i need to find out if the magazine is for a primary weapon or a secondary
but that wont work
since a magazine for a pistol can be used in some primary weapons
can i find the "first" magazine well a magazine can fit into?
might just have to make a list of magazine wells?
or make a lsit of magazines
i really hate hardcoding
can i find the "first" magazine well a magazine can fit into?
There is no ordering in config like that
you can parse all weapons, and iterate through all magazines for all weapons and find the ones that fit
that's exactly what i want to avoid, but if need be, yeah
parse magWells, stop at the first that has the magazine, parse all weapons, stop to the first that can take that magWell
that's so heavy XD
would have to parse at mission-start
"bake" the config for my kind of use
why is legacy arma stuff so hard in arma 3
yeah, that's good
thanks
yep, it looks like i'll have to make a list of magazines
ok, hey
usually, secondary weapon ammo doesnt fit into primary weapons
except for the kriss
and sting (scorpion evo)
9mm is a b****, innit
it is
but with the mods i'll be running, the magazines wont have cross-compatibility between sidearm and primary
i'll just array intersect a list of primary weapon mags and one for secondary weapons
and then find in the primary array
or make just one for secondary mags
and all the rest are either grenades, primary weapons, missiles/rockets or extra
yeah, that would work
Thanks Lou and ded!
hmmm
is "weaponClass" the config entry for the weapon name?
i cant open the config with the mods loaded and im too lazy to launch without mods ๐
for foxes den, how do i get the className from the config
because there doesnt seem to be any standardized data-name for it
i tried _generalMacro
but CUP doesnt like that
can i jsut use the end of the config?
configName

๐จ
Improving a skill be like
i continued my project of writing the arma 2 inventory in arma 3
for my arma 2 arma 3 conversion mod/collection
is there a command to remove a magazine from weapon?
or will i just delete the weapon and add it back without a magazine ๐
does removeMagazines also remove the magazine in the weapon?
There's no direct command to do it, but setUnitLoadout will do some workaround IMO
mmmh
Oh wait a minute...
Correction: removePrimaryWeaponItem/removeSecondaryWeaponItem/removeHandgunItem do the thing
What do you mean?
never mind, weird edits
i was wondering because i had some strange values in known variables
but it was just windows
yep, it works
๐
now shower
I need to get the classname of a squad from a display name that has been filtered to a faction.
("true" configClasses (configfile >> "CfgGroups" >> _side >> _curSelFac >> "Infantry")) apply {
systemChat str _x;
lbadd [2102, getText( _x >> "name")];
};
``` is my current code, basically i'm asking how can I "backtrack" from a displayname, simple loop that iterates with given displayname, or is there a better way?
When im trying to get AI to load into a vechile, is it better to use getpos or getposatl
A = getPosATL heli1;
_tra1 = team1 addWaypoint [A,0];
_tra1 setWaypointType "GETIN";
https://community.bistudio.com/wiki/getPos has some examples of the different results each one will give, it depends on the location of it
Example no.2
Im using ATL atm, it moves the AI just right of the heli. I dont understand why.
Thats what im reading through now
I tend to just play around with the ones that are relevant until they're what I need
Each time I run it they goto the same pos, which is strange and dont get in
I would have done team1 addWaypoint [Heli1, 0];
addWaypoint [heli, 0]
If its moving it wont update iirc
addWaypoint takes an Object too
https://community.bistudio.com/wiki/addWaypoint
Yeah that ^
Will try that and change the waypoint from GETIN to Load as its going to run on a dedicated server
โฆwut? what is the difference, dedi or not?
According the the wiki under Get In Nearest "On a dedicated server, an AI unit will only get in vehicles that are empty."
So I updated the script, and the AI still move but dont actually get in the helicopter... Idk why. They just crowed around it
Maybe its because load only works group to group... Will have to play around
Get in nearest, not Get in
That doesnt work, thats my issue
did you attach the waypoint to the vehicle?
They just huddle around the vechile
I placed it on the helis pos
addWaypoint [heli, 0]
not enough, I believe
Ya just googled that, reading up on it now
zdahp ninja'ing meh or i ban u D:
Bump on my question ;)
I dont know if this is true in arma 3, but i recall waypoint under helicopters being set off to to the side in arma 2
Move waypoints would always be placed in a circe around the helicopter instead of right under it
Get In Nearest
The group will only move to the waypoint if there are any empty vehicles, or vehicles on the group's side with empty seat spaces, that are within about 50m of the waypoint's location.
...
On a dedicated server, an AI unit will only get in vehicles that are empty.
Possibly to make AI not walk under a landing heli
@brave jungle you can't exactly backtrack precisely, as groups could have a same name (e.g BLUFOR/OPFOR Scout)
I feared that too, just not sure how to retain the classname for later use
can't you use stuff like lbSetData or lbSetValue as hidden variables?
So im looking at something like this?
_tra1 = team1 addWaypoint [heli1,0];
_tra1 setWaypointType "GETIN";
[_tra1, 2] waypointAttachVehicle heli1;
private _classPath = _x
lbEntry setVariable _classPath ?
_tra1 = team1 addWaypoint [heli1, 0];
[_tra1, 2] waypointAttachVehicle heli1;
_tra1 setWaypointType "GETIN";
```maybe this ^ is better
Ugh... more rework of my code :c
Didn't think the setData etc
so i'll look into it
you can hopefully store config, yes ๐
no idea how it works though... never got into GUI stuff myself that deep...
backtracking would be awful really ๐
backtracking would be awful really ๐
Yeah in hindsight if it errored it would be catastrophic hah
infinite loading screen
So with [_tra1, 2] waypointAttachVehicle heli1; I got a error saying it got a array but expected a group...
Will changing the _tra1 to the group fix that?
@brave jungle
// just kidding, don't try this at home
private _t = time + 10;
private _thread = [] spawn { /* backtrackingCode */ };
waitUntil { time > _t || not isNil "TAG_resultVariable" };
if (isNil "TAG_resultVariable") then {
terminate _handle;
};
@high silo
_tra1 is absolutely not speaking. would you have named it _getInWaypoint, you would get it ๐
Well either way, hes running to the same bush like a moron. And not getting in the heli right next to him.
_getinwaypoint = team1 addWaypoint [heli1, 0];
[_getinwaypoint, 2] waypointAttachVehicle heli1;
_getinwaypoint setWaypointType "GETIN";
``` Better ๐
no
waypointAttachVehicle takes a waypoint
So this?
_getinwaypoint = team1 addWaypoint [heli1, 0];
[team1 , 2] waypointAttachVehicle heli1;
_getinwaypoint setWaypointType "GETIN";
``` cos if yes it still doesnt work
have you considered, you know, using _getInWaypoint?
๐
you don't have to number them manually, the engine does that itself
grab the waypoint reference from the addWaypoint, and only use this from there
also, don't blindly copy/paste from the wiki ๐
I think I get what you mean
_getinwaypoint = team1 addWaypoint [heli1, 0];
waypointAttachVehicle heli1;
setWaypointType "GETIN";
Or am I completely missing it
and should just cry in a ditch
waypointAttachVehicle takes a waypoint
setWaypointType takes a waypoint
sooo use the waypoint ๐
_getinwaypoint = team1 addWaypoint [heli1, 0];
_getinwaypoint waypointAttachVehicle heli1;
_getinwaypoint setWaypointType "GETIN";
``` **cries** this?
YESSS yes, that is it ^_^
So it worked but only one got in, so now I have to backtrack and find where I went wrong.
Thankyou btw ๐
Is there any way to check if an item is going to cause a premium content DLC message when attempting to pick it up?
https://community.bistudio.com/wiki/Arma_3_DLC_Restrictions
If you only need a document, here's the thing
I've got a very broad question, but I would like to modify an Official BIS mission function, and I was wondering how I should go about doing that? Of course I cannot modify the pbo, but can I just rewrite the function locally in description.ext or something like that?
You're true
@rancid basalt you cannot override a BIS function unless you use a mod
you can create a new one if you want.
thanks @warm hedge
I'm looking for some of the inventory items added by Old Man, I think they may be too recent for this list though, unless I'm typing my classnames wrong
the list is for A3 v1.98, it should be fine @shut shadow
Maybe they aren't listed, suppose aren't restricted tho
@winter rose Alright, thank you. I was, specifically looking to add a menu tab to the Warlords game-mode to add the ability to purchase groups into High-Command. I noticed Jezuro made an edit to Warlords where he added some menu features.
i guess there is no script to remove a magazine with a specific ammo count from a unit's inventory
addMagazine takes a parameter for ammount, but removeMagazine doesnt
looks like i'll have to write my own function for removing loadout-elements
Remove all, add whatever you need ๐ค
i was expecting embed, but i guess that's disabled for a reason
or...
setloadout
im just going to write a function that gets loadout, removes whatever is needed and sets loadout
getloadout -> modify array -> setloadout
exactly
but in function form
because it's a repetitive task
not really a question
just something i found curious
wouldn't be hard to do, engine-side
Get and set loadout are actually functions in Arma ๐คฃ

i guess there is no script to remove a magazine with a specific ammo count from a unit's inventory
addMagazine takes a parameter for ammount, but removeMagazine doesnt
magazinesDetail gives a list of magazines with ammo count, although afaik it's not possible to remove by ID.
Although you could see how many have x amount ammo, and then remove (or not add) that amount of new magazines
is there a wildcard parameter in sqf?
i need to find a an array inside an array
but one of the members of that array is unknown, but irrelevant
if it is a "pair", there are the findInPair functions
Me again... Im trying to spawn random group at a random location. It works but they keep spawning in the same location each time I execvm the sqf. Anyknow know if a script thats been execvm once it gives the same results every time?
_locationArray = [
([6864.03,1092.65,0]),
([7307.99,744.952,0]),
([7441.67,849.606,0]),
([7389.13,456.576,0]),
([7591.29,340.919,0]),
([7888.78,434.569,0]),
([7759.82,517.202,0]),
([7593.39,690.979,0])
];
_locationToSpawn = selectRandom _locationArray;
Thats how im picking a random one.
Does it save the location once picked unless restarted?
assuming container to remove item from is unit's uniform
params["_unit","_className","_count","_container"];
_unitLoadout = getUnitLoadout _unit;
switch ( toUpper _container ) do {
case "UNIFORM": {
_uniform = (_unitLoadout select 3);
_uniformItems = (_uniform select 1);
_index = _uniformItems findIf {_x select 0 == _className && _x select 2 == _count};
_item = (_uniformItems select _index);
_item set [1, (_item select 1)-1];
_uniformItems set [_index, _item];
_uniform set [1, _uniformItems];
_unitLoadout set [3, _uniform];
_unit setUnitLoadout _unitLoadout;
systemChat "dropped";
};
case "VEST" : {
};
case "BACKPACK" : {
};
};
passed arguments are ["_unit","_className","_count","_container"]
where _unit is the unit, _classname is the className of the magazine, _count is the amount of rounds in the magazine and _container is the inventory-item. HAVE NOT CONFIGURED VEST AND BACKPACK YET
Nevermind, its picking at random each time. But its the marker im using the check thats not working. Nevermind ๐
Does it save the location once picked unless restarted?
it can't
Ded, can you check if my code is stupid?
it works ๐คทโโ๏ธ
but im not confident
looks pretty annoying to read
i hate not being able to array[index][index]
uffโฆ https://sqfbin.com/ please
_uniformItems set [_index, _item]; useless
_uniform set [1, _uniformItems]; useless
_unitLoadout set [3, _uniform]; useless
what?
code is too short to need sqfbin
ok, im coming from C
same thing in C
every variable in SQF is a reference to a value
i thought it returns a copy of the array
not a pointer to the array
is there a copyarray?
+_array
so thsi would return a copy of an array?
_item = ((_uniformItems select _index)+[]);```
still a stupid way to do that
it would result in a copy
but thats not what I wrote
weird, and inefficient.. but yeah
would that do the trick?
if _item is an array then outside + will copy less
yeah. but outer parenthesis not needed
does it matter in performance?
but in your code snippet above, I see no reason to copy
yep
does it matter in performance?
parenthesis no
i jsut wanted to know what was the syntax for copy
thanks for the quick lesson
_uniform = (_unitLoadout select 3);
_uniformItems = (_uniform select 1);
_index = _uniformItems findIf {_x select 0 == _className && _x select 2 == _count};
_item = (_uniformItems select _index);
_item set [1, (_item select 1)-1];
_unit setUnitLoadout _unitLoadout;
systemChat "dropped";```
better?
dont focus on the systemchat
that's jsut for debug
+[] please don't
that is for concatenating two arrays, the copy is a side effect
that'll work.
you could do
_uniformItems = _uniformLoadout select 3 select 1
to shorten it
yep
i can do (_uniformItems select _index) set [1, (_item select 1)-1]; aswell?
or is that too unreadable
it would save me one variable
no, _item would probably be undefined in your snippet
whether you get rid of _uniformItems or _items... not much difference`
besides that _items is much more useful
anyways, thank you lots
i would totally not have noticed that pointer-related mistake
is the effect of addMagazineAmmoCargo global?
im blind
it is...
can i get a hammer?
@exotic flax magazinesAmmo seems more useful than MagazinesDetail for scripting
magazinesDetail seems more about string representation, giving you an easy way to display magazine info for the user
magazinesAmmo gives an array with 2 elements per magazine, one for the classname and one for the ammo count
yes and if you want more detail, ie location of magazine in containers (uniform,vest,backpack) and whether its loaded or unloaded in a weapon you could use magazinesAmmoFull which comes in handy sometimes, idk what your end goal is tho
understood
been a while since I've played A2 I cant even remember the UI if I tried lol
a lot of way to go, but i'm somewhere. Here is a screencap:
https://imgur.com/CdeZJXP
still need to move the pistol magazines to the pistol-bar
whole backpack is unfuctional
need to do that
im just fixing stuff with the main inventory still
that looks pretty good though
im assuming the map, compass, etc would go on the bottom boxes?
gotcha, that one will be pretty straight forward, assignedItems would be the backbone prolly
https://community.bistudio.com/wiki/assignedItems
๐
all planned out
there is just a lot of script that needs to be written to handle all kinds of edge-cases
but it's progressing
why? Idk, im pissed that i couldnt finish it a few months ago and gave up
now im back
i feel that
but yeah, i handled that issue already
:O
Arma preprocessor deletes commas from a string passed as macro argument?!
#define STUFF(text) [text]
STUFF("Hello,,, 123")
If I preprocess it, I get this:
[""Hello 123""]
Macro arguments may be composed of any characters, as long as they do not contain a comma (because commas are used as argument-delimiters).
Jesus Christ... (this atop of all other problems with this preprocessor)
Have fun ๐
(โฏยฐโกยฐ๏ผโฏ๏ธต โปโโป
Spent so much writing my beautiful framework for managing text to meet this in the end
Note however that although the macro gets resolved properly, the comma gets removed from the String *(probably a bug)*.
I know but I don't want to have missing , in my texts. Any workaround for this?
https://community.bistudio.com/wiki/PreProcessor_Commands#Arguments
#define HINTARG(ARG) hint ("Passed argument: " + str ARG)
#define array1 [1,2,3,4,5,6,7,8,9,0]
HINTARG(array1); // SUCCESS
Yo, its a bit easier for me to ask here than to search so: If I have a variable that represents an object or a marker, and I delete that object/marker, does the variable automatically get deleted after some time because it's value is nil?
No, variable will become objNull for the object case
isNull
but not nil
marker reference is just a string, when you delete marker the variable will remain in its previous value (string)
regarding my problem: another idea - make string not part of macro
So to get it deleted, do I manually have to nil it?
you should, but if you are using global variables, you should rethink if you really need them
perhaps you can just ignore this issue, unless you are having 1000s of such variables, and in this case it gets quite interesting, why would you have it like this
what's the error?. Error emssage attached below:
https://imgur.com/a/WQPbLu6
right is 0
can i not compare numbers with != ?
_right has to be a number
:DD
lol
@astral dawn Im working on a system that can create random missions. With such a system i need a good cleanup script. My cleanup script works perfectly when it comes to automatic detection of enemies that should be deleted, however I'm looking for a way to pass additional garbage to it. My issue comes from the fact that the missions are completed trough a trigger so I need a way to pass this variable on trigger activation.
fixed a dupe-glitch in my inventory
@astral dawn Im working on a system that can create random missions. With such a system i need a good cleanup script. My cleanup script works perfectly when it comes to automatic detection of enemies that should be deleted, however I'm looking for a way to pass additional garbage to it. My issue comes from the fact that the missions are completed trough a trigger so I need a way to pass this variable on trigger activation.
You should consider using OOP for this
|| i must hide myself, the hate for OOP is incoming||
if the target had no gun, but you had a gun, the game would swap your gun to the target but retain a copy with you because the target's gun was none-type
I'm looping to add each config path for each squad via a list box selection (was talked about earlier today here, got busy) via:
_squadArray = "true" configClasses (configfile >> "CfgGroups" >> _side >> _curSelFac >> "Infantry");
{
lbadd [2102, getText( _x >> "name")];
lbSetData [2102, _forEachIndex, _x];
} forEach _squadArray;
then simply attempting to extract via lbData and using the lbCurSel , however it returns as "" meaning lbSetData isn't working, anyone used this command before and can shed some light on it?
lbSetData only takes strings as the data
https://community.bistudio.com/wiki/lbSetData
data: String
lnb > lb
fight me in a civil manner which wont involve any arguments or flaming/trolling
๐ฑ๐ณ๐ง

is in case sensitive with strings?
In think so
time for toUpper
See example 6: https://community.bistudio.com/wiki/in (and the header note)
Pistol magazines now in pistol-belt. Image attached below:
https://i.imgur.com/wTp3fc0.png
are you redoing arma 2 inventory?
and some unfortunate bystander's 6.5 mags to show it separates primary and secondary mags. Image attached below:
https://i.imgur.com/u3GbIIC.png
yep
i think it is
and you couldnt
because some of the stuff arma 2 inventory evidently relies on is not present in arma 3
and it's not a for the end goal
it's for the journey
Suggestion for that Inventory would be to change the colors and thatโs it would looks amazing with different colors
Ik itโs based on Arma 2 colors but yeah just a suggestion
you can change the colors, that's not an issue
Yeah ik
Why?
the very very background is a static image
because i couldnt get the arma 2 cut corners in arma 3
Oh ok
because i couldnt get the arma 2 cut corners in arma 3
You can just create images for these cutted corner ^^
yeah, but that would defeat the purpose
im pretty sure you can change the colour still
arma 3 can tint pictures in controls? irhgT?
well, will have to look into it at a later date
there's a lot visual-wise that's still WIP
mmmh
I'm pretty sure that it can recolor a blank white picture so yeah probably
im tackling the backpack-code next
the backpack or the description box
either one
๐คทโโ๏ธ
i need to change the scrollbar of the inventory to the arma 2 one aswell
non-issue, i've done it before
Imo, the best is to do that brown rectangle with the cutted corner an image and the rest just static things, then you can recolor it easily (if you want)
yeah, youre right
but that's visual stuff
i need to adjust the alpha and the fonts aswell
but im doing the stuff that actually matters first
this inventory wont allow you to change uniforms, vests, hats etc. either
and it probably wont work with all uniforms out-of-the box
since you need to configure the uniforms to have sick inventory capacity
but im including modded uniforms with it
arma 2 dealt inventory capacity in slots. Arma 3 deals in weight
so either i have to change all item weights... or i can make the uniform inventory huge
not a difficult one
you wont be able to overfill the slots, though
and if you want a magazine to take more than 1 slot, you need to configure it with the mod
unfortunately
i'll probably configure all vanilla-items
but modded items will be up to you
i'll work through all the modded items in cup etc. as i have time
and make them into compatibility patches
that's the plan, atleast
the backpack is weird
hmmm
might do it in my own way
i dont like hardcoding it
i'll see to improving it later
and i know
Alright so im trying to make it so SWAT can use UAVs on my server. I set their character slots to UAV operators, which is fine if they go up and "hack" the uavs, then it gives them control to them (even though they are spawned in by the altis life vehicle buying system), but I want to know what code runs when you say to "Hack UAV" so I can make it automatically happen when they buy one
ummm...
check the script that's attached to the action?
take a look here for hints: https://community.bistudio.com/wiki/connectTerminalToUAV
if (typeOf _vehicle == "B_UAV_02_F") then {
player connectTerminalToUAV _vehicle;
};
I'm doing this, but it doesnt seem to do anything..
Do they have a UAV terminal sided with the UAV in question?
They also have to have it equipped when the command is run
Yes, NATO uav terminal.
if I spawn it through infistar then hack it, it works
through infistar, I need to spawn it then hack it, then it works fine. If I hack one spawned by altis life's vehicle system, I cant take controls but I can connect to it..
Oh, don't know anything about Altis Life...
my code looks fine though?
Nothing wrong with that piece of code, but can't tell how bad the rest is...
well the rest is all stock.
Arma 3 stock? Or some Life framework stock?
And which side is SWAT? NATO, OPFOR, INDEP?
(since it's not A3 vanilla)
@exotic flax the tonic framework
is there a way to detect if a display is destroyed by ESC. Im having no luck with onDestroy
sahInvEh = (findDisplay 5730) displayAddEventHandler ["Destroy", {
systemChat "closed";
(findDisplay 5730) displayRemoveEventHandler ["KeyDown", sahInvEh];
}
];```
@warm venture player is a local variable
are you running this code in server-environment or client-side?
_vehicle setVariable ["vehicle_info_owners",[[getPlayerUID player,profileName]],true];
thats in the altis life script.
player is the player object
it works fine in all other aspects
where is this running?
it works fine in all other aspects
so the script is client-side ๐
fn_vehicleShopBuy.sqf on altis life 5.0
@winter rose As I said, its running on the server, in a client script.
its not a mod.
"running on the server, in a client script" makes absolutely no sense
the file is on the server
"scenario script, executed client-side" maybe more
you'll have more help on the Altis life discord or whatever
they're worthless
player connectTerminalToUAV cursorTarget; running that through debug on local doesnt work
is the terminal already connected?
If UAV is already connected to another terminal, this new connection will fail.
check the return
its not connected to anything
if (isUAVConnected cursorTarget) then {hint "Connected";};
doesnt hint, so shouldnt be
Its disabled
even filtering it when run from a script?
it's local
if youre running it from the client, then YEAH
isnt that obvious?
make sure it's not being filtered out
do be filters go in battleye/launch or just battleye
ask altislife discord
i dont mess with that stuff
or ask someone smarter here
๐
Most of whom also don't mess with that stuff ๐
isnt it universal? for epoch, exile, wasteland
in the same way that linux is universal with windows
bad example
but the context is too much
someone who does not work with the framework will have a hard time just getting up and saying what's wrong with it
but im suspecting it's BE filters
or spy-gass
no offense to tonic
all the offense
deleted it so i dont get another warning for saying a naughty word on an 18+ game
11 year olds these days swear more than adults.
it has cussing, blood, extreme violence and spiders
spiders
Which is completely irrelevent to a policy on what is acceptable in a company discord...

