#arma3_scripting
1 messages · Page 158 of 1
did you create a initplayerlocal.sqf ?
yesir
could the file you have be init.sqf.sqf ?
waitUntil{player == player};
uisleep 5;
hint "Test";
systemChat "Test";
diag_log "DEBUGGY: Test Call";
Maybe also check if the client rpt shows something.
Works for me, did it for years like that.
Probably another OneDrive mess
Well you can put it somewhere else and put a symlink to it in the missions folder but not sure if that'll help
I always disable OneDrive when I install windows 😅
Never had issues with ondrive and all my mod stuff is on it
ya but thats why cuz all of it is on it
I try not to use it, and it got saved there
you guys are big brains thank you
Also, I clicked on something and move objective move on a grib how do I undo this?
Any idea why when signed in as admin on a dedi im not able to change the ACE settings?
what ya mean you can't? like the menu is gray'd out?
hello, im inicializing 2 functions one for serverside and one for player, both have the tag postinit =1
how i made that the local one waits until the server one is executed?
ive tryed to use waituntil, but for some reason it dont work
i have variables there i need to wait
ive tryed to use waituntil to one of that variables, but no luck
i dont want to use initplayerlocal.sqf / initserver.sqf
any reason this isnt working ```// init.sqf or debug console
_spawnPosition = getMarkerPos "EnemyBase";
_unit = createAgent ["O_Soldier_F", _spawnPosition, [], 0, "NONE"];
if (isNull _unit) then {
hint "Failed to create enemy unit!";
} else {
hint "Enemy unit spawned.";
};
these docs are awful, I am trying to make enemies spawn but in waves and increase pre wave, didnt it was going to be hard until I start on this train wreck on code.
so my hints arent even working? init.sqf waitUntil{player == player}; uisleep 5; hint "Test hint"; systemChat "Test systemChat"; diag_log "DEBUGGY: Test Call";
Do you get the diag_log?
This directory
Press Windows+R, paste that and press Enter
You'll open logs directory
im also in the arma3 fiolder I dont see any .rpt
You probably have extensions hidden or something
ah let me check
Arma3_x64_2024-09-20_09-22-39 Typical log file name
Open one with latest date and search for DEBUGGY
oka i found it
dmn big ass file
okay found it
so copy and paste a few lines or what?
Means your init.sqf is working fine
It probably fires during loading or non-playable state of the game
init.sqf executes fairly early
well i have waitUntil{player == player}; uisleep 5; hint "Test hint"; systemChat "Test systemChat"; diag_log "DEBUGGY: Test Call";
so it should wait ya?
uiSleep sleeps during app operation, not gameplay so it can easily sleep through these 5 seconds while you're pressing menu buttons and loading
I think changing it to sleep should be fine?
The better threshold would be getClientStateNumber
Oh I just started this jornuy so you quick go over my head
waitUntil {getClientStateNumber >= 10};
waitUntil {!isNull findDisplay 46};
```Try these waits instead of sleep
ah okay ill give it a try
getClientStateNumber waits until you start the mission (briefing read, you press "continue")
ty for all the help so far
Display 46 is mission display which gets loaded sometime during loading, I think you need it to display hints
10 years later and initial loading still confuses me too
12 even 
y a man this is like 30 times hard then teaching myself python
like its like wild...
so now i am getting this error? Ugh, okay man, thanks for the help but I need take a break for a while, two days in and I haven't gotta anywhere. imo, its not a good idea to have an in-game and out-game editing. just confusing even more, I do do everthing in the game with triggers and shit or just code it? but idk. all I want to do I make where wave spawn in a warlord game mode so its like a defnde your castle kinda deal but fuck me if this shit is convoluted
My guess is that you're missing some module or object needed for Warlords game setup
No idea how it works to help you
By looks of it BIS_WL_base_EAST is not defined, I guess it needs OPFOR base or something
i tihnk you are right. i glad it aa while ago but delete trying to trouble shoot. ill look at it tomorrow, thank you.
No sorry, like i can change all the values but after i hit ok nothing saves or changes just reverts to default
i remmeber being able to just change on the fly as admin but doesnt seem to work anymore
Is there a way to make AI wait to start their animation? I'm making a mission and have a "dance club" but I want to have the AI to start dancing at different intervals so they are not all in sync with each other. Is that possible?
How do you start it in a first place?
they are just doing the ambient animation from the get go
Init field?
Post code
Its the Ambient animation you can select in the Attributes
Thats what I was going to try. Yes its MP
if(isServer) then {this setVariable ["no_sim_until", serverTime + random 5, true]};
this enableSimulation false;
this spawn {
waitUntil {_this getVariable ["no_sim_until", serverTime] < serverTime};
_this enableSimulation true;
};
Something like this
I will give that a try
doesnt seem to work.
Code didn't work but if I sync some of the units to a unhide module and set a trigger for the players. I can at least make some of the units not be synced with some of the others.
Might be other mods/scripts doing something with simulation
Try increasing random 5 to a bigger number
random 15 or something
maybe its just a fluke with low delay
maybe not one for here but worth an ask. Does anyone know the dialog name for the Vehicle Appreance dialog to chage vehicles textures? I want to open it from a GUI im making
simulation should halt the dance to a random amount
Garage?
No idea if you can use it during gameplay 🤔
dam, I know Zues Enhanced made there own one, but theres a chance someone might not have it loaded so I cant rely on it and use theirs.
Tried ["Open",[true, vehicle player]] call bis_fnc_garage;, nothing good
The display is RscDisplayGarage btw
Oh, createDialog "RscDisplayGarage" does work
ah it might not be virtual garage im looking for actually, its the Vehicle apperance window. Just where you can change the skins of the vehilce youve selected
but it lets you swap vehicles, not just change the properties
not create vehicles like the virtual garage
No idea what menu you're talking about then
hmm
example is this one but this is what zeus enhanced made, I thought there might have been a vanilla one but I guess im just too used to modded. I think their is only virtual garage
no idea, can't find it
yeah I have a feeling it dosnt exsist in vanilla 😦
theres this documentation but I think this is ment just for the virtual garage
https://community.bistudio.com/wiki/Arma_3:_Vehicle_Customisation
Nothing in https://community.bistudio.com/wiki/BIS_fnc_garage either
I love hashmaps 🥹
if!(server_vehicles_allTexturedObjects set [hashValue _vehicle, _vehicle]) then {
_vehicle addEventHandler ["Deleted", {
params ["_vehicle"];
server_vehicles_allTexturedObjects deleteAt hashValue _vehicle;
}];
};
No more pushBackUnique, no more find and deleteAt by index
Got another riddle. I got a radio that plays an audio clip when scroll wheel on it. But if you click play multiple times it restarts the audio and starts playing over its self. How can I tell it to stop the playing and then play again?
initplayerlocal
radio addAction ["Play Radio", {execVM "playRadio.sqf"}];
playRadio
[radio, [_sounds, 100, 1]] remoteExec ["say3D"];
say3D returns object that emits the sound, you'll need to delete it before starting again
You'll need a function that takes _sounds and RE it
Its set on a object. Does that matter?
No, its unrelated, say3D makes a new object each time that does the sound
BIS_fnc_garage3DEN is the vanilla version, but it only works in the editor.
["Open", [false, get3DENSelected "object"#0]] call BIS_fnc_garage3DEN
Define this somewhere (init.sqf or something)
mySay3DFunction = {
if(!isNil"radiosay") then {deleteVehicle radiosay};
radiosay = radio say3D _this;
};
Have your play radio do this instead of RE'ing say3D directly
[_sounds, 100, 1] remoteExec ["mySay3DFunction"];
@spiral canyon
whats this for? deleting an vehicles textures as it gets deleted?
Automatically removing object from the list when its deleted
No array lookup needed, super fast if you have 1000s of objects
Otherwise you'd need something like:
private _index = arr find _vehicle;
if(_index >= 0) then {arr deleteAt _index};
unrelated to garages
ah no I get the use of hashmaps there super useful and ahh makes more sense now haha
I need to be more mindful of using them over arrays and array lookups 😅
Practically speaking even looking up 1000 element array is a drop in an ocean for performance, unless you do that 100 times each frame
I just like how clean it is
truee haha yeah much cleaner on the readability
well I deicded as we always have zues enhanced in our mod pack to just use their created display for it, so I dont have to redefine another. I could just copy their display but that would be again the rules of steam 😄 and BI
more depencies yaaay 😦
Im not crazy! I found what I was thinking of, loaded arma with no mods. This is what im referencing, I was hoping I could launch this GUI for the vehicle the player is in.
Well now you need to figure how to launch it independently
ill keep at my deep dive but I wonder if any of the BI devs might be able to point me a rough direction of which PBO or section, im running threw the 3den and ui_f ones just hoping to find something 😄
thats the whole garage, if you see the screenshot im after just the vehicle apprance modification that you can get in eden. I dont want the user to be able to change the vehicle just the skin
I found this createDialog "BIS_fnc_initVehicleAppearance" and when running it is return fasle. So it is a resource display but just refuses to let you open it
I'd copy the function to the mission and then adjust it.
I havent found the function specially yet just a reference to it online
but no mention to where it is unfortunatly
and as is returned false not "error resource dosnt exsist" then its probably what im looking for.
I'd suggest checking the config and functions viewers [with Advanced Developer Tools loaded] rather than manually searching the PBOs
czesc, szukałem w internecie i znalazłem tylko eden skrypt ale on ma błąd, chodzi mi oto by freaze time script. I found one, but it doesn't work _initdate = date;
while {true} do
{
setdate _initdate;
sleep 60;
};
Gonna make time pass 10 times slower, could be enough for you
Thank you very much
_this setVariable ['BIS_EnableRandomization', false, true];
_this setVariable ['BIS_DisableRandomization', true, true];
Is there something else I have to do to disable unit/vehicle randomization, as this doesn't seem to work.
(BIS_DisableRandomization seems not to be a thing)
Got it from the initVehicle function
Hi guys!
Do you know a way to disable "loadouts" button in ACE Arsenal?
How can I check if a unit has a weapon?
I would think to use this command. https://community.bistudio.com/wiki/hasWeapon But this command only checks for specific weapons. I want to know of my unit is armed with any weapon at all.
this hasWeapon doesn't work
In general or in hands?
In hand, we'll say. Keep it simple.
Anything in backpacks or inventory I'd consider concealed but I may revisit that later.
keep in mind, that this command return the name of the weapon ( string )
So something like if (primaryWeapon this == "" && secondaryWeapon this == "" && handgunWeapon this == "") then {code goes here};
if this unit is unarmed, do stuff
Yes, but I suspect that this will probably not be the correct reference to the unit. this would only be a unit reference if we're working in the unit's init field, which would mean the check only happens once on mission start.
That is the desire at this time, to have it in the init field.
Although it's rather clunky I'll admit.
I'll explain what I am trying to do in full.
I have a script I want to run to check if a unit is armed when a unit is spawned by Zeus as part of a composition, or when that unit is placed in 3den. The problem with init is that it fires every time someone joins the damn server which I fear will cause issues, making the script fire repeatedly when I don't want it to.
I also may have future applications checking if a unit is armed, so I wanted to ask about it. In those I would not use this.
if (isServer) works for preventing the script in init firing over and over and over for 3den placed units, I don't know if it's a problem for Zeus placed units, and I can't test it.
use if (local this) then { ... }; to ensure the init only runs on one machine
Oooohh
It would be a problem for Zeus, because when a composition is placed in Zeus, the init is only run on the machine that placed it (as compared to Editor placement, which runs it everywhere), and that machine will not be the server on DS
Yeah, so I still need a solution for that.
I don't know if players will see the weapons that got spawned in.
Or, if that will fuck up
local this is that solution
Oh!
Bit of a weird one; anyone know if it's possible to make an object visible only to a specific player?
Depending on how you want this to work, you can either:
- create the object with
createVehicleLocal, running only on that machine - use
hideObjecton every other machine
In Case A, the object will literally only exist on that machine, and you cannot change that later. If you do it on multiple machines, each local copy will be a separate object and not synchronised together.
In Case B, the object will still exist on all machines, just hidden, which means you can change its visibility on any machine whenever you like. It's still the same object on all machines, too, so any change you make on the machine where it's visible will also synchronise to other machines as normal (though it will still be hidden).
Case B sounds like what I'm looking for, thanks
Unfortunately, my attempted testing doesn't seem to yield the desired results. The script doesn't fire at all whether I am spawning it with Zeus compositions or loading it in 3den as part of the mission.
if (isServer) then {...}; is the only thing that works and it doesn't fix my problem with the Zeus composition side of things.
Zeus spawned is not a server if you aren't the hoste.
So you need remoteExec stuff (event) on server if you want it only to be executed on the server.
Because if you check the locality of an object that is spawned / created event it's local on client who (Zeus) does that
Seam Nikko answered already for this
#arma3_scripting message
So, let me understand this then. If I make a composition, and I save code in the init field, then I spawn that thing with Zeus, assuming I am using remoteExec correctly; assuming the script work as intended, is that init field still going to fire every time someone joins the server, or no?
Is it different in that regard for people joining later?
That's the primary issue. I don't want the script to fire more than once. It doesn't need to and doing so will create problems.
I had this problem previously where I used an attachTo command to anchor something at game start, but then later detatched the item. However, when a player joined, it got re-attached no matter where it was on the map, which froze the object. Very annoying.
I wish there was init-field-but-only-activates-when-first-spawned
The problem with my current application is I have a script to generate weapons randomly on militants but if a player joins mid-game I don't want the script trying to suddenly respawn their randomly chosen weapon because it'll end up with something else.
Hey does anyone know why when I executed
[[], {selectPlayer mf_diver1;}] remoteExecCall ["call", Player_Ober];
[[], {selectPlayer mf_diver2;}] remoteExecCall ["call", Player_Hans];
[[], {selectPlayer mf_diver3;}] remoteExecCall ["call", Player_Jak];
[[], {selectPlayer mf_diver4;}] remoteExecCall ["call", Player_Sanish];
[[], {selectPlayer mf_diver5;}] remoteExecCall ["call", Player_Hannes];
[[], {selectPlayer mf_diver6;}] remoteExecCall ["call", Player_Alpha];
[[], {selectPlayer mf_diver7;}] remoteExecCall ["call", Player_Vudu];
it didnt work.
But when I executed it line by line, it did
So odd request. I want to make the character invisible except for the vest (or backpack i guess). Its a joke thing.
_this setObjectTexture [0, ""]; _this setObjectTexture [1, ""];
This sets the uniform texture, but its left with the characters head and hands. any thoughts?
Change uniform to a full body one
Vr suit
And hide that
ok tried it, it doesnt get rid of the face unfortunately
There are virtual men that are completely invisible. Dunno if it'll work tho
There is a uniform which will make you fully invisible, but since I consider it a sort of cheat I won't tell
VR Entity suit
its funny you mentioned that i thought the same thing 20 mins after searching but the function viewer still turned up nothing useful 😦
The init field executing on JIP happens because for Editor objects, it is executed on every machine as soon as they load the mission. isServer or local checks prevent this by making every machine skip it except the server (can't JIP) or the machine where the object is local (there can only be one, and a joining machine won't be the owner of an existing object yet).
When a composition is placed with Zeus, the init field only runs on the machine that placed the composition. Other machines don't do it, and so subsequent JIPs don't execute it again.
However, this also means that isServer is not a useful check for Zeus-placed compositions, because on a dedicated server, the server won't be the machine that placed the composition - meaning the init will never run in a place where isServer is true, and so it will always be skipped.
Use simple.
mf_diver1 remoteexecCall ["selectPlayer", Player_Ober]
/*
result for Ober "selectplayer link object" same "selectplayer mf_diver1"
Don't worry if in the game the variables have the same information.
*/
As a result, a link to this object from the executor will be sent to the player in the form of a right argument since there is only one. If there should be an array to the right of the command, then you need to cheat a little, but I don't remember how.
maybe
[nil,[num, num] ] remoteExec ["setviewdistanceobject",target]
quick question
in a LAN server
anyway to add a player to an existing group in the console? The U menu isn't available here.
or, where in the PBO can I activate that function or add it
This page has info on the Dynamic Groups system, including how to turn it on: https://community.bistudio.com/wiki/Arma_3:_Dynamic_Groups
To move people between groups with the console you can use the join command, but be aware you'll need to have a reference to both people involved. If one of them is you, then cursorObject and player will cover you, but if not it gets a bit trickier.
If you have access to Zeus, you can use ctrl+drag to connect a unit to the group you want to move it to.
CTRL Drag is perfect lmao. Thank you for the detailed explanation Nikko
Composition inits are not global like editor inits are.
Okay good to know.
Hello, so I found this composition that adds an action to animates the newer terminals. I would like to know how I could make it execute the same stuff but from within a script. Basically I want it to do the animation and sound n all that when I call the script. How can I do that?
Term1 addAction ["Open", {
_term = _this select 0;
[_term,['Terminal_source','Terminal_source_sound'],100,1] call bis_fnc_LinkTerminal_Animations},nil,1.5,true,true,"","_target animationSourcePhase 'Terminal_source' == 0",5,false,"",""];```
basically I want to do everything that is done following addaction when I do
execVM "Events\Box_Open.sqf";
Also how do I animate the progress bar
been a while since I've written sqf, are there any well maintained vscode extensions anyone can recommend
@tough abyss nothing else to say here
you covered the whole nonsense of this "PFHs over loops" shit
So i beleave that progress bar is a animation witch you can control with Animate:
https://community.bistudio.com/wiki/animate
to find all animation names of object you can run this code in debug console while looking at the object:
and then paste it in notepad with ctrl+V
private _anim = animationNames cursorTarget;
copyToClipboard str _anim;
and here is a super simple code for animating progression on object note you need to put correct animation name:
this addAction
[
"Terminal",
{
params ["_target", "_caller", "_actionId", "_arguments"];
[_target,_caller] spawn {
params ["_terminal","_unit"];
hintSilent format ["Termial Started by %1", _unit];
_terminal animate ["MyAnimation", 0, false];
sleep 2;
_terminal animate ["MyAnimation", 0.2, false];
sleep 2;
_terminal animate ["MyAnimation", 0.4, false];
sleep 2;
_terminal animate ["MyAnimation", 0.6, false];
sleep 2;
_terminal animate ["MyAnimation", 0.8, false];
sleep 2;
_terminal animate ["MyAnimation", 1, false];
sleep 2;
hintSilent "Done";
};
},
nil,
1.5,
true,
true,
"",
"driver _caller == player",
5,
false,
"",
""
];
thanks, forgot about that page
hey, does anyone have any idea why this isn't returning anything? I have a listbox of maps, which players can vote after each game. It's just a standard list, nothing fancy. After double clicking, a map is voted, and number next to map's name incerases by each vote. Now, I'm trying to kinda change that system, since previously it was 2 columns, one for OFPS mode for a map, and second for Low Tech mode, for the same map set. I want to change it so on the left column player first selects a map, and then right pane appears, and a mode can be selected. This code executes when player double clicks a map. The script correctly outputs the _index which player selected, but rest of the code doesn't return the _map, it's just empty
Old syntaxes by IDCs could be unreliable, try using alt syntax
_ctrl lbData _index
IIRC the direct-IDC syntaxes look up the control in the topmost dialog, which can be problematic.
yeah the code is pretty old and it's not me who made it, just adding new stuff. Also, I love your KOTH server, Sa-Matra speaks by himself!
ok thanks, ill try without the IDs
how I call this in arma3diag_x64.exe? :
diag_exportTerrainSVG ["C:\Users\Walzmine\Desktop\Lythium_Map.svg", true, true, true, true, true, false];
Thanks for the help
In the debug console ?
https://community.bistudio.com/wiki/Arma_3:_Debug_Console
you also have to be on Dev version of the game and not on RC or Main verion.
Saw that it was a guy who talked about a cool reinforcements scripts a few days ago but can't seem to find the finished product, anyone know how to create the script?
Spawn in friendly guys as close as me as possible, either one at a time or as a group. That would be frikkin awesomeness
I tested the mission, vanilla without mods, with the same scripts. I played for 35 hours and the game was smooth, fps normal. Apparently this is just because of mods. If I'm correct, is there a way to find out exactly which mod is causing it?
thats why i never use mods
there is a way; set 1 mod at a time then run game and see what happends
if i ran mods i would try each mod by itself, then stack 1 then 2 then 3 and so on
There's only a subset of mods that are liable to cause perf issues too, so there's not usually much to test.
Hello script wizards
I'm trying to use GetRelPos with an add action to get a relative position to a sign. It seems very very off. I tried with math aswell and it seems like it's exactly in the same spot.
Sign Position : [12022.2,17641.3,0]
Sign Direction : 45.517
logiSign getRelPos [5, 90]
[12025.7,17637.8,0]
I'm expecting 12018.64,17644.81
I feel like I'm losing my mind
Not really sure what is your goal but getRelPos also takes the object direction into the count IIRC. If that's what you mean
My goal is to spawn a box 5 meters to the left of the sign.
The box that does spawn (or rather the position that getRelPos outputs) is several meters off
Show your entire code
_crate = "Land_WoodenCrate_01_F";
_crateSpawnPoint = this getRelDir [5, 90]
_spawnMedicalCrate = {
params ["_target", "_caller", "_actionId", "_arguments"];
_crate = _arguments select 0;
_crateSpawnPoint = _arguments select 1;
_spawnedCrate = createVehicle [_crate, _crateSpawnPoint, [], 0, "CAN_COLLIDE"];
clearItemCargoGlobal _spawnedCrate;
_spawnedCrate addItemCargoGlobal ["ACE_elasticBandage", 10];
};
_spawnAmmoCrate = {
params ["_target", "_caller", "_actionId", "_arguments"];
_crate = _arguments select 0;
_crateSpawnPoint = _arguments select 1;
_spawnedCrate = createVehicle [_crate, _crateSpawnPoint, [], 0, "CAN_COLLIDE"];
clearItemCargoGlobal _spawnedCrate;
_spawnedCrate addItemCargoGlobal ["CUP_30Rnd_556x45_Stanag", 10];
};
this addAction ["Spawn Medical Crate", _spawnMedicalCrate, [_crate, _crateSpawnPoint]];
this addAction ["Spawn Ammo Crate", _spawnAmmoCrate, [_crate, _crateSpawnPoint]];
Expected destination is slightly off, I manually dragged it over using the eden editor drag function, but it's far closer than the actual destination
Are you REALLY sure 90 deg is the dir you want to place it
If I'm using a cardinal direction like 0, 90, 180, and 270, shouldn't the output be along the lines shown?
Your assumption doesn't really matter. Try it out
135 is significantly closer, but this doesn't help as to why
It does mean 135 is the answer
Because 90 is straight to East and has nothing to do with object's left?
getrelpos IS the objects relative left
if you are facing north, and turn 90 degrees to the left, you're facing east
🤔
And you're right "you shouldn't be turning 90 degrees to the left" I'd expect the number you want to be 270
135?
doesn't make sense
https://community.bistudio.com/wiki/getRelDir doesn't mention returning any positions at all, though
Okay one thing. What about other object like a car etc
like, instead of a sign, you want me to try on a car?
...Your code uses getRelDir
I'm cooked
Appreciate it thanks
Good call, I imagine I hit tab as I was typing and it autocompleted dir instead of pos. Rough
debug console told me missing ;
Are you sure you're running Diag exe
yep. installed development branch und started arma3diag_64x.exe with needed Maps to Export Map SVG. but ingame console Missing a ";"
What exactly is your error

So I have been trying to get a dynamic group marker to work in multiplayer. At first I thought it was as easy as just enabling the "composition: group marker" feature. Though the problem with that and multiplayer respawning is that the group gets deleted as people load in because they get "killed" leaving an empty group which gets deleted.
I then came up with this in the player slots ini and that works. This however only makes the marker work for that specific player slot.
[]spawn {
while {true} do {
"marker_01" setMarkerPos getPos unit_01;
};
};
So what I would like to do is attach the marker to the group leader of a squad and make it move to whoever is leading the group in case someone disconnects dies etc.
Just player or units too?
Just for the player squads.
There must be some kind of module that already does that or something
But otherwise I'd just script the whole thing
Yeah, that´s what I meant with the "composition: group marker" feature. It exists. The problem is that in multiplayer when you load in as a player the game kills you once to then allow you to respawn at a respawn marker. This causes the group you were in to be deleted as it is "empty" as you die.
This will be fixed with the next update.
addMissionEventHandler ["EachFrame", {
{
if(leader _x != _x) then {continue;};
private _group = group _x;
private _marker_name = _group getVariable "my_group_marker";
// First time marker creation for the group
if(isNil"_marker_name") then {
_marker_name = createMarkerLocal [format ["group_%1", hashValue _group], getPosWorld _x];
_marker_name setMarkerShapeLocal "ICON";
_marker_name setMarkerTypeLocal "b_inf";
_marker_name setMarkerSizeLocal [1, 1];
_group setVariable ["my_group_marker", _marker_name];
_group setVariable ["my_group_leader", objNull]; // To trigger leader change below
_group addEventHandler ["Empty", {
params ["_group"];
deleteMarkerLocal (_group getVariable "my_group_marker");
}];
};
// If leader changed
if(_group getVariable "my_group_leader" != _x) then {
_group setVariable ["my_group_leader", _x];
_group getVariable "my_group_marker" setMarkerTextLocal format ["Group by %1", name _x];
};
_marker_name setMarkerPosLocal getPosWorld _x;
} forEach allUnits;
}];
here you go, wrote a small script to dynamically create and name group markers
put into init.sqf
@cerulean cave
Change allUnits to allPlayers to not care about AIs
Won't show the marker for AI-led groups with players though
Hiya, I'm trying to diable the ACE3 advanced fatigue for only two Player units in a mission. I have tried the following:
Adding this setVariable ["ACE_isUnconscious", false, true]; this setVariable ["ACE_noStamina", true, true]; this setVariable ["ACE_noFatigue", true, true]; this setVariable ["ACE_Fatigue_enable", false, true]; to the init of each unit
Adding a custom script called "disableFatigue.sqf" and adding _unit = _this select 0; _unit setVariable ["ACE_isUnconscious", false, true]; _unit setVariable ["ACE_noStamina", true, true]; _unit setVariable ["ACE_noFatigue", true, true]; _unit setVariable ["ACE_Fatigue_enable", false, true]; to the script, then ```null = [this] execVM "disableFatigue.sqf";
So far, neither of these have worked.
Any ideas?
I don't want to disable ACE Advanced Fatigue for any other unit. Just these two player units. This means I can't remove the ACE Fatigue .pbo file, or turn it off in the mission settings.
thx, will try to understand this
no idea about ACE and its variables but if these are correct, you need to remove broadcast flag
Since its init field, each client including JIP will execute these lines
and set the variable on their client for that unit
But if you say it didn't work, its probably something in ACE (overwrites init field values, wrong variable names), I have no experience with it
Its in the init of each unit I wish to disable it for, not the global init
I'm talking with some peeps over in the ACE discord too and the first reaction of one guy was "Wtf is that even referencing" so 🥹
init field of any entity executes on all clients including server and JIP clients
Gotcha. But wouldn't it just repeatedly disable stamina that's already turned off in that case?
Yes it would, will just set the values over and over each time new player joins
Which I get is probably not very effecient tbh
But since you say it doesn't work, it must be wrong variable names or wrong way to do it
One of the devs over in the other server say you can't disable it on a per-unit basis
🥹
🤔
I did a fast google and there are mentions of doing enableFatigue false on a unit
Yeah it doesn't work, I already tried it
Dig into PBOs to find the vars then
I can't seem to find the variable that enables stamina
Sooooo than doing
mf_diver1 remoteexecCall ["selectPlayer", Player_Ober];
mf_diver2 remoteexecCall ["selectPlayer", Player_Hans];
mf_diver3 remoteexecCall ["selectPlayer", Player_Vudu];
mf_diver4 remoteexecCall ["selectPlayer", Player_Sanich];
will work? Because
[[], {selectPlayer mf_diver1;}] remoteExecCall ["call", Player_Ober];
also worked, but not
[[], {selectPlayer mf_diver1;}] remoteExecCall ["call", Player_Ober];
[[], {selectPlayer mf_diver2;}] remoteExecCall ["call", Player_Hans];
[[], {selectPlayer mf_diver3;}] remoteExecCall ["call", Player_Vudu];
[[], {selectPlayer mf_diver4;}] remoteExecCall ["call", Player_Sanich];
Hey @queen cargo, I noticed you commented on Killzone's getNumberPlate.dll page about potentially setting the plate. Did you ever get a chance to look into that at all?
When do you execute this?
Zeus, during the op.
I am doing the whole "change perspective" thingy when you start playing as different body
Executed the 4 lines above at the same time like its written and nothing happened. (was awkward)
But when I executed them one by one, than it worked perfectly
Do you swap player between each other or something?
Player play as one faction, and than you execute a command and they take control of AI bodies of different faction for example (NOT remote control, they actually become those AI (no longer ai) units).
This script is same as "teamswitch" in singleplayer.
My main question is why it works when I execute line by line, but not when I execute at the same time
Not really sure what your photos mean, did it work with your script? Its hard to know if you switched bodies when the map is all grey
My guess is some vars aren't available or something
I just wrote 2 lines in the console for each client. I literally did the same thing as you.
Player_* and mf_* ones
So did it work, those 2 lines made 2 on your clients switch bodies at the same time, no problem?
yes
Guud, thanks, I will test it out myself when I can
It is still confusing why original code didnt work
it looks proper, likely you didn't have some/all Player_ variables pointing to right players
Or players didn't have mf_diver* vars they supposed to switch to right
But than I would assume script would execute until the point until it encountered this "not correct variable" player
Use remoteexec ["call"] This is very stupid because instead of call it executes the function that you wrote in the arguments. And instead of call you can write the function itself.
A function is something else. An example for just one command.
selectFunction = {params ["_unit"];
selectPlayer _unit
};
[ [["Open", [true]], BIS_fnc_arsenal] remoteexec ["call",allplayers];
//same
["Open", [true]] remoteExec ["BIS_fnc_arsenal",allplayers];
//your original as fucntion
[ [mf_diver1], selectFunction ] remoteexec ["call",Player_Ober];//not bad but look bad
//same but no have args
[[], {selectPlayer mf_diver1;}] remoteExecCall ["call", Player_Ober];//very very bad for MP
//Using it as a function is much more convenient than just code.
mf_diver1 remoteExec ["selectFunction",Player_Ober];//not bad look and work good
//same but no function. You just send command and link on NetObject.
mf_diver1 remoteexecCall ["selectPlayer", Player_Ober];//good and work good
Hey I created a sector control mode and when I put it in multi-player, my unit respawns before I even spawn in. Can someone help me?
How do I make it so he doesn't respawn at the spawn screen? Cause I put him as playable but it makes the death sound when I get to the spawn screen and he starts with default loadout. Help
spawn screen?
You probably have "respawn on start" turned on in your mission respawn settings. It'll be either in the Editor mission attributes, probably under Multiplayer, or in the mission description.ext
I would have to test one of the mods every 10-15 hours to see if the game would fall down
Looking at this runway lights script by AUSTINATST, I understand that its creating this object Land_Flush_Light_green_F for example I know it's creating a green navigation light but can i change the the color of the object that's being created for example white? Here's the script
Find appropriate class name and, if it exists, add new option.
yea the class name exist but its for another object similar to it
And what is the name of this class?
Land_runway_edgelight this is the white one but its the edge light variant
I meant Land_Flush_Light, but white. Most likely it exists, and most likely its name is Land_Flush_Light_white_F, but you should confirm that.
oh, ok i'll look into that
regarding this, I tried doing that but still had no success
I'm getting an error that Class Conversations not found in CfgSentences, but it is clearly defined in description.ext :
class CfgSentences
{
class Conversations //See? It's right here.
{
class Intro1
{
file = "Intro1.bikb";
#include "Intro1.bikb"
};
};
};
I double checked the wiki. I don't see any difference.
description.ext.txt perhaps?
Windows file viewer just shows description.ext
with file extensions turned on?
The property tab shows this as well.
When I right click on the file.
Just verified file name extensions turned on in Windows.
have you checked this page?
https://community.bistudio.com/wiki/Conversations
the structure seems not to match
Yes that was my guide. If you scroll to near the bottom (just before the FSM) you can see the example I chose from. "A tidier way of doing so is to put all the...etc"
I wrote this guide 😄
Well let me say thank you for your contribution!
see the number of levels, the Conversations should not be there iirc
I un-PBO a mission off the workshop (with permission) and his is the same structure as mine but it work on his mission. I must be missiong something stupid.
I would be amazed if this dosent exist already and im hoping someone has a lead on where i can find it.
Looking to script a helicopter transport my players can use to move between specific pre-designated landing points (between fobs), but no where else.
this is required only if you want to use BIS_fnc_kbTell btw, kbTell alone only needs the first declaration
here we don't provide big ready-made scripts, but we can totally help you in reaching your goal 🙂
Totally get that, I just wasnt sure if smeone happened to know of one already existing. I'm looking into using the vanilla supoort request modules linked to specific units, my issue lays in figuring out how to limit the locations they can move to
I did this with scripted waypoints. It's a pain. Lemme go grab what I have.
I would say you can copy-paste the function from in-game and edit it for it to grab on click's closest location from previously-defined ones?
player addAction [
"<t color='#FFFF00'>Radio for Extraction</t>",
{
_group = HeliGroup2;
_markerName = "marker1";
_waypointPosition = getMarkerPos _markerName;
_waypoint = _group addWaypoint [_waypointPosition, 0];
_waypoint setWaypointType "LOITER";
_waypoint setWaypointLoiterRadius 100;
_waypoint setWaypointLoiterType "CIRCLE_L";
},
nil,
8,
false,
true,
"",
"ActionExtraction"
];
player addAction [
"<t color='#FFFF00'>Clear to Land</t>",
{
_group = HeliGroup2;
deleteWaypoint [_group, 0];
deleteWaypoint [_group, 1];
heli_2 land "LAND";
},
nil,
8,
false,
true,
"",
""
];```
This is an addaction that calls the heli to a marker and has it loiter. Then you tell it to land. Took me like 8 hours to get it to work.
I have the 3 levels though. Is that not right?
Interesting, I see how this is working
So in theory I could just create several markers, and create several add actions, which would create a "land" waypoint at the markers position
Correct
Awsome, Thanks for this
NP. I'm usually the one here asking questions. About time I actually had an answer for someone. LOL.
I just copy and pasted your example into a test mission and get the same error message:
player addAction [
"Call For Transport",
{
_group = HeliGroup2;
_markerName = "marker1";
_waypointPosition = getMarkerPos _markerName;
_waypoint = _group addWaypoint [_waypointPosition, 0];
_waypoint setWaypointType "LAND";
},
nil,
8,
false,
true,
"",
"ActionExtraction"
];
For some reason the addaction isnt showing up on the flag pole i pasted it into
ActionExtraction is a variable in the condtion field of the addaction. Simply remove it if you dont want a condition for the addAction.
ahh right, okay - let me give that a shot
Also if you want it on a flagpole then player addAction isn't what you want. You would change that to this addAction if your'e posting it into an object init field.
Seems im still missing a bracket somewhere and I feel blind. If its not apparent im still a novice at scripting
this addAction [
"Call For Transport",
{
_group = HeliGroup2;
_markerName = "marker1";
_waypointPosition = getMarkerPos _markerName;
_waypoint = _group addWaypoint [_waypointPosition, 0];
_waypoint setWaypointType "LAND";
},
nil,
8,
false,
true,
"",
];
remove the last comma
Notice how in mine the condition field is not followed by a comma. However in yours it is.
SQF parser error messages are not great
Also most languages will allow trailing commas in arrays.
(SQF does not)
What it usually does get right is the position of the error.
I don't think you should set the condition to ""
Actually funny timing because John is the one who actually helped me in doing those waypoint's I'm helping Sandman with. ITS COME FULL CIRCLE.
Okay so strange issue now, addaction shows up
way point is generated
helo does not move
LAND isn't a valid waypoint type.
Also thinking it would be good to add a "clear all waypoints" command before creating a new one to prevent multiple waypoints stacking
I'm not sure that advanced waypoints are actual unique waypoint types. I think they're just "SCRIPTED" with a prefilled script.
i think that may be right
ill give this a shot
I think that did it
oh you know what, I found the issue, the advancd waypoint isnt being called properly with "LAND" @blissful current @granite sky
so it just stays as a blank waypoint with no order attached
well, it's a fancy scripted waypoint so that's probably normal?
Yeah I would assume so
Ohhhh yeah. I remember now. I think I modified that script with https://community.bistudio.com/wiki/BIS_fnc_wpLand
I vaguely remember reading that function and it was bad :P
Gonna give
[HeliGroup2, [0,0,0], _markerName] spawn BIS_fnc_wpLand; a shot
Yes IIRC that's what did it for me to get it to land. AND IIRC you cant directly tell it to land somewhere else. You need a move waypoint in between somewhere.
So uh... it's now flying directly on the opposite direction
The blank way point changed to a "move" waypoint
But it's flying 180 degrees in the wrong direction
I'm so confused 😂
How do you see what the waypoints are doing in real time anyway? I don't know that one.
You go into zeus and you can see them listed
Ah very cool. I'll use that in the future. Yeah man like I said it took me like 8 hours to get what I wanted. Lemme go see if I can even find the test mission I had last summer.
oh i think i know what I did
i set the location to 0,0,0
so it tried to go to those coords... i think
hmm, still not landing
and do you have Sentences defined in kb\event1.bikb?
Yes. I copy/pasted this:
`class Sentences
{
class Sentence1
{
text = "This is sentence ONE";
speech[] = { "\Sound\hello.ogg" };
class Arguments {};
actor = "soldier1";
};
class Sentence2
{
text = "This is sentence TWO";
speech[] = { "Sound\gk.ogg" };
class Arguments {};
actor = "soldier1";
};
class Sentence3
{
text = "This is sentence THREE";
speech[] = { "Sound\bold.ogg" };
class Arguments {};
actor = "soldier1";
};
};
class Arguments {};
class Special {};
startWithVocal[] = { hour };
startWithConsonant[] = { europe, university };`
alsooo… how are you calling it?
(```cpp ^^)
Calling it directly as shown in the wiki.
["Event1", "MissionName"] call BIS_fnc_kbTell;?
Correct
now I'm curious, starting A3 to check
I'm playing with SOG but that shouldnt matter I dont think.
hopefully not yeah
Should be missionName not "MissionName"
Unless your mission's name is "MissionName", I suppose
Actually, no
"MissionName" would be fine EXCEPT that the MissionName (category) layer is missing from your CfgSentences
Yours:
class CfgSentences
{
class Sentence1
{
Correct:
class CfgSentences
{
class MissionName
{
class Sentence1```
no, that's the bikb / Sentences vs CfgSentences
@blissful current do you have that in the mission's config viewer?
I cant check in a bit. How do I access this screen you have shown?
Ugh that is frustrating to hear. OK, I'm playing a game with a friend at the moment. When I can break away I will test this ASAP. TYVM for the help. I am determined to learn this.
Sorry to ping you, but quick question - any idea why the helo is still not landing?
"Call For Transport",
{
_group = HeliGroup2;
_markerName = "marker1";
_waypointPosition = getMarkerPos _markerName;
_waypoint = _group addWaypoint [_waypointPosition, 0];
_waypoint setWaypointType "MOVE";
_waypoint setWaypointType "MOVE";
_group setCurrentWaypoint [_group, 2];
[HeliGroup2, [2824.13,6231.93,0], transportheli] spawn BIS_fnc_wpLand;
},
nil,
8,
false,
true,
""
];```
Oh i do see im calling the waypoint set type twice
Well, that won't hurt but it's obviously unnecessary
yeah, extra call that just adds excess load
I don't know what's going on with your setCurrentWaypoint.
2 is the third waypoint and it's not clear that it has a third waypoint.
On the wpLand line, transportheli is probably the wrong object unless you called a landing pad transportheli.
No i referenced the helicopter itself
I don't think that's what it's for.
do I need to reference the marker itself again?
But it's undocumented so I'd need to read the function.
It's expecting a target object so I'm guessing it's supposed to be a landing pad.
It seems after rre-reading you may be correct
that the object the waypoint should be attached to is the landing pad, not the helo itself
You're using it without a waypoint anyway. The function is really there for internal usage.
Wait for 2.18 and use landAt :D
whens is 2.1 releasing? lol
Well, land works, it just picks whatever landing pad it wants to.
Ah end of summer
does it?
interesting
let me try
Difficulty is scripting it in combination with waypoints.
Fairly soon. It's on Release Candidate right now. I think there's another RC update, then a bit more testing, so probably 2-5 weeks
So in theory if there is a helipad at the LZ
this addAction [
"Call For Transport",
{
_group = HeliGroup2;
_markerName = "marker1";
_waypointPosition = getMarkerPos _markerName;
_waypoint = _group addWaypoint [_waypointPosition, 0];
_waypoint setWaypointType "MOVE";
_waypoint setWaypointType "LAND";
},
nil,
8,
false,
true,
""
];```
Should do the trick
let me go try it
Nope
uh, you need to create each waypoint. So if you wanted to move and then land, you'd do something like this:
_wp1 = _group addWaypoint [_waypointPosition, 0];
_wp1 setWaypointType "MOVE";
_wp2 = _group addWaypoint [_waypointPosition, 0];
_wp2 setWaypointType "LAND";
I don't know if the LAND waypoint type actually works though. I was referring to the land command.
AH gotcha
hmm... so this is the closest ive gotten
he just sits there and hovers
so im assuming the "MOVE" waypoint doesn't function like I was hoping
Waypoints complete some distance before the target is actually reached.
Something like 100m for helis? I forget.
Try this:
_wp1 = _group addWaypoint [_waypointPosition, 0];
_wp1 setWaypointType "MOVE";
_wp1 setWaypointStatements ["true", "(vehicle this) land 'LAND'"];
gave this a shot and wound up in the same place, though notibly no way point is visible in zeus
"<t color='#FFFF00'>Request Transport</t>",
{
_group = transportcrew;
_markerName = "LZ1";
_waypointPosition = getMarkerPos _markerName;
_waypoint = _group addWaypoint [_waypointPosition, 0];
_waypoint setWaypointType "SCRIPTED";
_waypoint setWaypointScript "A3\functions_f\waypoints\fn_wpLand.sqf";
},
nil,
8,
false,
true,
"",
""
];
will try your script now
@granite sky @blissful current @tribal lark thanks for your help guys, finally got it working
"<t color='#FFFF00'>Request Transport</t>",
{
_group = transportcrew;
_markerName = "LZ1";
_waypointPosition = getMarkerPos _markerName;
_wp1 = _group addWaypoint [_waypointPosition, 0];
_wp1 setWaypointType "MOVE";
_wp2 = _group addWaypoint [_waypointPosition, 0];
_wp2 setWaypointType "SCRIPTED";
_wp2 setWaypointScript "A3\functions_f\waypoints\fn_wpLand.sqf";
},
nil,
8,
false,
true,
"",
""
];
Wow. I figures someone would have read my post by now.
They did
You can just search for your own message and look for responses.
Yes, someone responded. Two actually: #arma3_scripting message
So i have a tiny thing that triggers me a bit. Basically im creating tasks, and I've set up the triggers and sync so that Obj2 gets given after obj1. There is a slight issue where the popup "Task Created" Appears before "Task Completed". How can i delay obj2 just a few seconds, to allow Obj1 to pop up as completed first?
either use the delays at the bottom of the trigger, or write your own script that has a delay and utilizes the task framework functions to make your next task.
omfg im fucking thick
i tried to find the delays at the bottom of the create task not the trigger..... argh...
Sorry to probably ask a question that's been up before 😄
I wrote a message some time ago about a reinforcements script. Hope anyone knows what I'm looking fo:
"Saw that it was a guy who talked about a cool reinforcements scripts a few days ago but can't seem to find the finished product, anyone know how to create the script?
Spawn in friendly guys as close as me as possible, either one at a time or as a group. That would be frikkin awesomeness"
Oh, you're using lb commands on lnb
Also you set value but get data
I think some lb commands work with lnb?
Ah
Still, use correct set of commands
Ok I'll try it soon and let you know
value -> Number
data -> String
It actually does. But very messy to work with, so just use lnb
Ok so change all lb related commands to their lnb variant?
And don't get data but get value?
Depends on what you store. Data is string, value is number, they're stored separately
Also I think you're missing column when you set your value, idk if its allowed
lnb stores both data and value in each cell (row+column), not just row
lnbAddRow[300011, [_x, "0"]];
lnbSetValue[300011, [_u1, 0], _forEachIndex];
``` this is the way it was previously
_Bla setOwner 2; <- Server, right?
so that one was correct in terms of syntax?
changed that to this:
but still same result
and with this syntax same
yes
Use alt syntax, I remember old syntax which takes IDCs not being very reliable (missing for some commands, not working for others)
You're missing column index in your lnbValue
ok, then I did "lnbText" it kiiinda works, outputs the text
but yeah thats not the thing I want, since it displays map names in pretty way, while their real file name is different
Thx. Wasn't sure 😃
private _lnb = _dialog displayCtrl 300011;
private _row = lnbCurSelRow _lnb;
private _val = _lnb lnbValue [_row, 0];
Change lnbSetValue to proper syntax too to be sure
ok
ok I think I got it to work! Thanks for explaining how this works
hey does someone know how a work around for the vehicle respawn?
i used to have the script, but i lost it when i formatted my computer
it was something like newvehicle,oldvehicle or something
anyone? no?
work around what?
the vehicle respawn
its broken
ai doesn't respawn with the vehicle
i used to have a scipt that was something like oldvehicle,newvehicle
i don't rememeber what it entailed because its been about a year since i used it and i formatted my computer
Just use createVehicleCrew on the new vehicle
will that stick if its been destroyed?
its not working
maybe im not using it correctly
did you know that this can only be done with scripts?
ok looked up vehicleRespawn on bohemia's site. this is what im seeing
vehicle respawnVehicle [respawnDelay, respawnCount, deleteOldWreck, respawnOnServer, respawnFlying, respawnUnit, respawnMode, respawnSide, useRespawnMarkerDir]
so how would i use that to respawn my vehicle with crew and follow preset wapoints after being destroyed?
im trying to make a battlefieldesque sector control game.
i got the vehicle to respawn per the command, but the delay doesnt seem to work and ive changed vehicle from "car" to "Helicopter" and "heli"
and "veh"
are you using the vehicle respawn module?
its broken
why?
it wont respawn the vehicles with crew after being destroyed
i remember having to use a workaround because of it
yes, you need to create the crew
simply put in the expression createVehicleCrew (_this select 0)
let me try tht
give me a sec.
it seems to work! thank you. But one other question, the waypoints go away after respawn
well, of course, you will need to script those aswell
the old group of that vehicle got killed, so the new group created by the command doesn't have waypoints
The vehicle respawn system is a bit broken/limited. KK has been working on some improvements to it - I think those are supposed to be in 2.18, so watch out for that.
ok so in the expression field i have this
createVehicleCrew (_this select 0); _wp= _grp addWaypoint [GetPosASL Player, 100, "SAD"]
this is for the vehicle respawn
i want it to respawn with the same Seek and destroy waypoint
but it gives an error of _grp
the _grp is a undefined variable
so what do i put there then?
because according to the site grp is defined as either both linked units or individual units.
try (group _this select 0), dunno if it will work
Return Value:
Group - the group of the created crew (since
Arma 3 logo black.png
1.94
; before that returned Nothing)
oh yes
@inner flicker
_grp = createVehicleCrew (_this select 0); _wp= _grp addWaypoint [GetPosASL Player, 100, "SAD"]
try this
Why does the ammoHit eventhandler always return objNull as the hit object?
Is there some magical thing I need to do in the config
could be a bug or not fully implemented until v2.18

god damnit
any other way to detect what bullet hits?
Just add a hitPart to it when its fired?
HitPart EH goes to the target
?
Figured you meant the one listed under basic, yeah
which also is bit buggy... fix coming in next release i believe
does anyone have an easy paradrop script this one doesn't work on the server. parachutes are spawn but players arent put in the driver seat on the server
if (!isServer) exitWith {};
params ["_vehicle", ["_delay", -1, [0]], ["_parachuteType", "rhs_d6_Parachute", ["string"]]];
private ["_paras", "_crew", "_dir"];
_paras = [];
_crew = crew _vehicle;
// Calculate ejection delay based on speed if no custom value was provided
if (_delay isEqualTo -1) then {
_delay = (1 / (((speed _vehicle) max 55) / 150));
};
{
_isCrew = assignedVehicleRole _x;
if (count _isCrew > 0) then {
if ((_isCrew select 0) == "Cargo") then {
_paras pushBack _x
};
};
} forEach _crew;
_vehicle allowDamage false;
_dir = direction _vehicle;
ParaLandSafe = {
params ["_unit", "_parachuteType"];
(vehicle _unit) allowDamage false;
private _type = getText (configFile >> "cfgVehicles" >> backpack _unit >> "ParachuteClass");
if (!(_type isKindOf "ParachuteBase")) then {
private _para = createVehicle [_parachuteType, getPosATL _unit, [], 0, "NONE"];
_para setPosASL (getPosASLVisual _unit);
// _para setVectorDirAndUp [vectorDirVisual _unit, vectorUpVisual _unit];
[_para, [vectorDirVisual _unit, vectorUpVisual _unit]] remoteExecCall ["setVectorDirAndUp", _unit, true];
_unit moveInDriver _para;
// _unit assignAsDriver _para;
[_unit] remoteExecCall ["assignAsDriver", _unit, true];
[_unit] allowGetIn true;
// [_unit] orderGetIn true;
[_unit] remoteExecCall ["orderGetIn", _unit, true];
};
waitUntil {
isTouchingGround _unit || (position _unit select 2) < 1
};
_unit action ["eject", vehicle _unit];
sleep 1;
_unit setUnitLoadout (_unit getVariable ["Saved_Loadout", []]);
_unit allowDamage true;
};
{
_x setVariable ["Saved_Loadout", getUnitLoadout _x];
removeBackpack _x;
_x disableCollisionWith _vehicle;
_x allowDamage false;
_x disableAI "MOVE";
// unassignVehicle _x;
[_x] remoteExecCall ["unassignVehicle", _x, true];
moveOut _x;
// _x setDir (_dir + 90);
[_x, _dir + 90] remoteExecCall ["setDir", _x, true];
// _x setVelocity [0, 0, -5];
[_x, [0, 0, -5]] remoteExecCall ["setVelocity", _x, true];
[_x, _parachuteType] spawn ParaLandSafe;
sleep _delay;
_x enableAI "MOVE";
} forEach _paras;
_vehicle allowDamage true;
{
(group _x) leaveVehicle _vehicle;
_x enableCollisionWith _vehicle;
} forEach _paras;
_unit moveInDriver _para;
``` https://community.bistudio.com/wiki/moveInDriver needs local argument, so if thats run on server it wont work
Hello, is there a video tutorial or a web site that can guide me to making a vehicle mod from 0
Other than the wiki, probably not. And it's not going to be in a hand holding format.
Ok will do once I get home. Thanks!
Hello guys
Please help me get the following scripts for the "Rocket" model.
I need the script for the effect of smoke and fire emanating from the missile, and the script for the explosion and destruction
it did not work. it came back with "error type string, expected number"
I think it's missing the index parameter after the radius number. Also, use the posAGL format (it says that ASL is for negative radius number)
_grp = createVehicleCrew (_this select 0); _wp= _grp addWaypoint [GetPosAGL Player, 100, -1, "SAD"]
is there a function that will return a bool or something if an object is in motion or not?
ØŸ
ok. idk..but ill try that.
its coming back saying "error, missing ]"
Just check its speed
Or velocity
ah there it is, idk why i was looking through all the "getX" commands and didnt see a speed one
_grp = createVehicleCrew (_this select 0); _wp = _grp addWaypoint [player, 100]; _wp setWaypointType "SAD"
we have a winner! it works! thanks a bunch. now on to the next issue....how to make it so the loadout is selectable at the mission start screen where you spawn in.
currently, im using a AT missile specialist for my character. it wont let me select the loadout at the mission start
like in the apex co-op missions?
thanks that was one issue but I'm still struggling with this 😠, now only the first player gets ejected other player remains on the plane
https://pastebin.com/MZ5nCqbY
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
yeah
You can add Virtual Arsenal in a box, cuz for that kind of loadout, you need to configurate the loadout templates in the description.ext, something like that.
@thin fox ok thank you again for your help!!!
@fair drum thank you! i do appreciate all the help you guys have given me!
Trying to use the "gear scan" script to get info of all gears on placed playable units, but it won't capture all gear. alot is missing when I paste it to whitelisting
AllPlayableUnitsItens = [];
{AllPlayableUnitsItens = AllPlayableUnitsItens + [(headgear _x)] + [(goggles _x)] + (assignedItems _x) + (backpackitems _x)+ [(backpack _x)] + (uniformItems _x) + [(uniform _x)] + (vestItems _x) + [(vest _x)] + (magazines _x) + (weapons _x) + (primaryWeaponItems _x)+ (primaryWeaponMagazine _x) + (handgunMagazine _x) + (handgunItems _x) + (secondaryWeaponItems _x) + (secondaryWeaponMagazine _x)} forEach (playableUnits + switchableUnits);
AllPlayableUnitsItens = AllPlayableUnitsItens select {count _x > 0};
AllPlayableUnitsItens = AllPlayableUnitsItens arrayIntersect AllPlayableUnitsItens;
copyToClipboard str AllPlayableUnitsItens;
Is there a way to force the AI to turn out without using SAFE/CARELESS setBehaviour?
There is a vehicle that has a machine gun at top but for the AI to use it they need to turn out.
I think this is similar to how on hilux trucks the AI "turns out" when they're sitting in the truck bed and stand up to shoot.
Something like this:
//this in Eden:
{
_x action ["TurnOut", this];
}foreach crew this;
//this in zeus Init if you are using ZEN
{
_x action ["TurnOut", _this];
}foreach crew _this;
Do you mean you want getUnitLoadout
yes! i think haha
I also need some help to create a script that makes a marker have the same position as my player. it is for the spyder addon "vehicle spawner" and since it only spawns on a marker I don't want to run and get the new vehicle, I want it to spawn on my position. hope its clear haha
That unfortunately doens't work, they just get back inside
BUT
setting that specific unit to careless works, and they still fire their weapon so... 😂
are there any commands along the lines of "Fetch all entities" to grab all the editor objects and put them into an array? i thought i remembered something along the lines of "findAllOfType" but can't find anything on the wiki
allMissionObjects ?
Cheers
- entities
it worked perfectly thanks alot
allMissionObjects is extremely slow
use allObjects instead
The better way is creating layers in editor and using getMissionLayerEntities
I came across this video and wondering how to get or replicate ALS Lights seen in the video. I can’t find a mod for it, can someone please explain to me how I can make this
That seams simple all you need to do is create lights in a row and turn them on off with a delay. Here is a sample code for you that i made you can play with this and make it how ever you need it:
0 spawn {
private _numOfLights = 20;
private _currentPos = getPosASL player;
_currentPos params ["_currentX","_currentY","_currentZ"];
private _offset = 5;
private _lights = [];
for "_i" from 0 to _numOfLights do {
private _light = "#lightpoint" createVehicleLocal [(_offset * _i) + _currentX,_currentY,_currentZ];
_light setLightColor [1,1,1];
_light setLightAmbient [1,1,1];
_light setLightBrightness 1;
_light setLightUseFlare true;
_lights pushBack _light;
};
waitUntil {
{
_x setLightBrightness 0;
sleep 0.2;
}foreach _lights;
sleep 5;
{
_x setLightBrightness 1;
sleep 0.2;
}foreach _lights;
false;
};
};
I have a quick question about lights is there a limit how close lightpoints can be to each other ?
So have this code that i executed:
0 spawn {
private _currentPos = getPosASL player;
_currentPos params ["_currentX","_currentY","_currentZ"];
private _num = 20;
private _offset = 5;
for "_i" from 1 to _num+1 do {
private _ball = "Sign_Sphere10cm_Geometry_F" createVehicle [(_offset * _i) + _currentX,_currentY,_currentZ];
};
};
0 spawn {
private _currentPos = getPosASL player;
_currentPos params ["_currentX","_currentY","_currentZ"];
private _num = 20;
private _offset = 5;
for "_i" from 1 to _num+1 do {
private _light = "#lightpoint" createVehicleLocal [(_offset * _i) + _currentX,_currentY,_currentZ];
_light setLightColor [1,1,1];
_light setLightAmbient [1,1,1];
_light setLightBrightness 1;
_light setLightUseFlare true;
};
};
And this picture is the result. Or am i doing the offset wrong ?
there is no limit of distance, there is however a limit of lights
one cannot have 100+ lights
I don't remember the limit though
If you are further away, multiple close by lights can be combined into a single one
The limit also depends on video settings
But this also happends when i am close to basicly i am right next to the first light in this picture and there is a light missing on the second iteration.
I think i got it to work i change getposASL to getposATL it seems that CreateVehicleLocal can only have AGL position.
you can still setPosWorld it later 🙂
@fleet sand thank you I’ll test this out when I get home
So
Random question
Trying to set up a multiplayer campaign that uses the Chemical detector
I had an old script that used to work back in 2022, but got broken after the 2.0 update if I had to guess
cutRsc ["RscWeaponChemicalDetector", "PLAIN", 1, false];
0=[] spawn {
while {true} do {
sleep .5;
private _ui = uiNamespace getVariable ["RscWeaponChemicalDetector", displayNull];
if !(isNull _ui) then {
private _obj = _ui displayCtrl 101;
_obj ctrlAnimateModel ["Threat_Level_Source", parseNumber ((player distance threat)/10 + random [-.25,0,.25] min 0 max 9.99 toFixed 2), true];
};
};
};```
Second Half
```sqf
params["_unit", "_isJIP"];
if (!_isJIP) then
{
[_unit] call exp_fnc_playerSpawn;
// [object, maxDistance, minDistance, condition] execVM "chemicalDetector.sqf";
[test, 150, 15] execVM "chemicalDetector.sqf";
};
if (_isJIP) then
{
};```
I was hoping someone else has tried to update this script, or could at least make a guess as to what's wrong with it?
hello friends, I would like to know the best way to learn how to learn scripting
I know a very basic level but I do not understand a lot of thing that go on, nor do I know how to write my own script
just wanted to know where I should go to learn how to script
Check this page out https://community.bistudio.com/wiki/Introduction_to_Arma_Scripting
So
I fixed the problem
I replaced exp_fnc_playerSpawn with BIS_fnc_spawn
I am looking for a mod or script that will punish players for damaging friendly units or flashbanging them or whatever. I really like the Antistasi "watch the turtles" thing but I can't quite figure out how to pull that specific thing out of their mod. Does anyone know of anything that does this?
nothing plug and play for you. its not difficult though to make one yourself. just use an event handler(s) to track the teamdamage/kill then execute your teleport + disabling unit simulation so they have to sit there. wait a bit, then send them back and reenable
Okay I am looking at the event handlers thing on the wiki. How would I write it so also account for flashbangs? Do I need to put this in the init for every player role?
i'm assuming you are using ace for the flashbang system?
yes sir
if so, you have a cba event handler that fires when someone is flashbanged:
[QGVAR(flashbangedPlayer), [_strength, _grenadePosASL]] call CBA_fnc_localEvent;
you'll have to hook into that using the CBA event handler system (it functions similar to the vanilla scripted event handler system)
tell me when we are in over your head
Due to me not knowing scripting except for basic I'm tryin to run it by ChatGPT to see if it puts out something worthwhile lol, I'll put it in here and if you're curious if it sucks or not lol
chatgpt wont give you anything. it sucks at sqf
and doesn't know frameworks like cba
and the code it learns on is crap and outdated
what about the Arma 3 script GPT that some dude made? havent had a need to try it out yet until now.
you can try it, but none of us are going to troubleshoot it for you when it causes problems/doesn't work
we don't troubleshoot GPT here
fair enough
instead, just try making something that fires when someone is killed
would be a good starting point. the flash stuff is going to be over your head
the problem I'm trying to solve is players trolling at inconvenient times, and a slap on the wrist when the one or two decide to be dumb
if there is a big enough desire for something of a teamdamage/teamkill/anti troll thing, I can write one for modules enhanced in the upcoming month. but nothing immediate. I don't have too much time atm.
@dry cradle actually, I'll start working on it now. seems like a good addition to the mod. might come out in parts though.
Welp, that mods going into the modpack now lol
Hey everyone i created a light source:
light setlightcolor [1,1,1];
light setlightambient [255,255,255];
light setlightintensity 10;}```
how do i make it flicker indefinately after i created it?
delete and recreate the light or set intensity to 0 and back on a loop (make sure this is done LOCALLY with createVehicleLocal). We do not want any network traffic.
Thank you
@fair drum I did this but the light still remains there even with the intensity being 0
call{light = "#lightpoint" createVehicleLocal position ASL_1;
light setlightcolor [1,1,1];
light setlightambient [255,255,255];
light setlightintensity 10;};
sleep 0.5;
call{light = "#lightpoint" createVehicleLocal position ASL_1;
light setlightcolor [1,1,1];
light setlightambient [255,255,255];
light setlightintensity 0;};
sleep 0.5;
call{light = "#lightpoint" createVehicleLocal position ASL_1;
light setlightcolor [1,1,1];
light setlightambient [255,255,255];
light setlightintensity 10;};
};```
you have created 3 separate lights, with one of them having no intensity. there have been no deletions or modifications to the existing light.
@fair drum I thought that I'm creating the light on the object "ASL_1" and as of direction i just found this on the wiki:
https://community.bistudio.com/wiki/setLightConePars?useskin=darkvector
is this how i set the drirection?
in your current, you are creating a light1 and saving it as light. then you are creating light2 and overwriting light. light is now pointing to light2. then repeating for light3. you never did anything with light1.
Ok understood on that point
light cone params don't use a #lightpoint, they use #lightreflector
So then how do i alter the direction of the light
you use a lightreflector, but you won't have a "flare" unless you ALSO use a lightpoint, but that lightpoint will be 360*
do you have my mod modules enhanced? if so, use my lightpoint module. it will update in the editor. gives you a sense of what things look like and the differences between a light point, a light cone/reflector, with either or enabled
Its called lightpoint module
OK @fair drum i'll give this a try
lightcone only
vs
lightpoint (super low intensity) + lightcone + flare
vs
lightpoint + lightcone + flare
Are there any commands that i can use to induce ragdoll physics on MP bodies? i've noticed that if there are dead bodies in MP they don't ragdoll but instead play the default die animation. leaving alot of my decorations ruined.
https://community.bistudio.com/wiki/awake note the locality
@fair drum Can i make the light strobe with the module
not currently. haven't implimented that
Ok thanks @fair drum. check your DM
make an array of positions, then iterate through that array, creating lights as you go through, then adding a timer to delete them after a specified time
thanks for the help but i can't get it to work
what is the code you are using, and where are you using it? also, do you mean you are setting the units dead at mission init? if so, you might have to set a specific animation before they die so they die in a certain way. unable to tell without some picture examples of what you want.
It is pretty much a separate chunk in Antistasi. Just need to run the EH install function from initPlayerLocal and set a couple of global vars.
@fair drum to delete the light created should i just use deleteVehicle in this:
call{light = "#lightpoint" createVehicleLocal position ASL_1;
light setlightcolor [1,1,1];
light setlightambient [255,255,255];
light setlightintensity 10;};
sleep 0.5;
call{light2 = "#lightpoint" createVehicleLocal position ASL_2;
light2 setlightcolor [1,1,1];
light2 setlightambient [255,255,255];
light2 setlightintensity 10;};
sleep 0.5;
call{light3 = "#lightpoint" createVehicleLocal position ASL_3;
light3 setlightcolor [1,1,1];
light3 setlightambient [255,255,255];
light3 setlightintensity 10;};
sleep 0.5;
call{light4 = "#lightpoint" createVehicleLocal position ASL_4;
light4 setlightcolor [1,1,1];
light4 setlightambient [255,255,255];
light4 setlightintensity 10;};
};```
pretty much i've got some dead civilians to make a very grim scene. and it's just the slider from the editor set to 0 for health. problem is in MP instead of ragdolling into positions that make them look like they died where they're sitting they play the default death static pose. i tried the init files of the units to set them awake at game start. even tried setting them awake using spawn and then setDamage 1 to see if that would make them ragdoll. but every time they use the same default death pose. i tried the initServer.sqf file too where i put the code "{_x awake true;} forEach allDeadMen;". still did nothing
pretty much i've got some dead civilians
I got a set of fuel tanks as targets for a task. What is the code for the trigger so if any one of the tanks is destroyed you complete the task?
I know its not && but what is it for a "or" command?
[tank_0, tank_1, tank_2] findIf {!alive _x} != -1; for any dead
[tank_0, tank_1, tank_2] findIf {alive _x} == -1; for all dead
thanks
So I can’t hold a candle to the original video but why does the light point I create at the ‘yellow spheres’ illuminates the ground more than the top of the towers
cone light?
might be pointed down instead of up
yes it might but what does this mean _light setLightConePars [90, 45, 1]; for example, its says [outerAngle, innerAngle, fadeCoef] but i don't understand
I believe the outerAngel is where the light fades to, the innerAgle is the bright cone, the fadeCoef is the percentage of how quickly the light fades between the outerAngle and InnerAngle. Did you place the light cones your self?
No I did not. I just create a light source
light setlightcolor [1,1,1];
light setlightambient [255,255,255];
light setlightintensity 10;};```
you could try call{light = "#lightpoint" createVehicleLocal position [ASL_1, [-0.5,-0.25,1]]; then play with the numbers which are I believe are the x,y,z coordinates.
I’ll give it a try
when you guys reach an agreement on the whole pfh vs loop thing, feel free to let us know
i'll keep my whiles for now
Those extra calls are doing nothing for you
Hi. I want to use BIS_fnc_scriptedMove but have the issue that sometime Units get stuck and run on place. I wanted to write an exitcondition but I fear there is no way to exit BIS_fnc_scriptedMove when a unit is stuck for example. I tried to put code in the Code parameter which gets executed on each waypoint but there is now way of terminating BIS_fnc_scriptedMove. Any Ideas?
I would recommend you to use unitCapture instead scriptedMove.
https://community.bistudio.com/wiki/BIS_fnc_unitCapture
But How would I order a unit to move to a certain position with UnitCapture? my goal is to let Units move to a certain position even if other functions wont let them use domove....I can not capture these moves manually. My Input is an array of positions the unit needs to follow.
Why cant you use doMove ?
If Units are in combat domove is not working allways...especially with mods Like LambsDanger which do their own domove´s. I need Units to move at all cost.....the only way i found is to use BIS_fnc_scriptedMove.
You can enable and disable LambsDanger at will during play with this:
<unit> setVariable ["lambs_danger_disableAI", true];
Yeah I know..this does not help unfortunatly.. I tried that already...but I will give it another try
Here is a nice script from Jonnyboy for CQB movemnt you can open it and see how he did it with makeing units to go to a posision array.
https://forums.bohemia.net/forums/topic/222844-jboy-ai-cqb-movement-scripts/
So what you can do is have a group of units disable Lambs when you want them to do specific movemnt and when they are done re enable lambs.
JBOY AI Scripted Path - Beta Release 12/2/19. This script moves AI quickly through a path of positions while fighting. In this video we see a stack of 4 units clear a house, breach doors, and dynamically fight. Also this script can be used to create moving AI on static structures that have no AI ...
Thanks for that. I will look into that.
Hello,
Way to get true/ false if Zeus is remote control unit x, and if it's,
Way to get unit that Zeus is remote controlling?
Without plotted waypoints: when AI is requested to move on a map location with a single click.
Bar gates, are obviouksy considered as obstacles even with a trigger to open them.
Is there a way to tell AI it is safe to move through?
And, in a similar way, what is the best way to restrict AI to move through a location (map bounds, or breaching through walls to connect with a road)?
https://community.bistudio.com/wiki/isRemoteControlling
And here at the very bottom in notes try the code by thedawnofallwars - c
but i dont know if that is still working.
https://community.bistudio.com/wiki/remoteControl
https://community.bistudio.com/wiki/remoteControlled
Awesome, thanks.
@gaunt patio nope
@bold comet simple thing:
you got something that NEEDS to be evaluated every frame or all two? --> PFH is your friend
is your evaluation irrelevant and it is totally OK for it to take longer from time to time? --> spawned while loop
more PFHs = less performance per frame thx to the evaluation
whilst the while {true} do {... sleep 1;} loop is handled by the engine --> like 2k times faster
_targetPos = [32097.8, 25496.5, -0.0273666];
_missileObject = b;
_missilePos = getPosASL _missileObject;
_dirVector = _targetPos vectorDiff _missilePos; _dirVectorNormalized = _dirVector vectorNormalize;
_missileSpeed = 100;
_missileVelocity = _dirVectorNormalized vectorMultiply _missileSpeed;
_missileObject setVelocity _missileVelocity;
' ... Pos; _dirvectorNormalized = _dirvector
_missilespeed = 100;
Error Missing ;
|# |vectorNormalize;
There is no such command.
_dirVector vectorNormalize; -> vectorNormalized _dirVector;
this chat GPT 
Hello everyone
I'm working on a custom missile object in Arma 3 and I'm having some issues with the scripting. I need help to create a script that allows the missile to be guided towards a target using laser targeting or GPS coordinates.
I have tried a few scripts, but they haven't worked as expected. If anyone has experience with missile guidance scripts or knows of any existing scripts that could be adapted to my missile object, I would greatly appreciate your assistance.
Thank you!
dont use chatGPT for sqf
you are right friend
Do you have anything to help me with?
when you say you are working on a costum missile, you are doing in a mod?
💯 💯
since you can copy the propieties of tomahawks
Yes indeed
I created it and brought it into the game and it worked fine
The script of fire, smoke and explosion was introduced into it
The guidance and launch script remained
use the Tomahawk config then, you can use them to send misiles with laser targets.
to a GPS guided one, just create a laser target and assign the launcher to fire at that target, and thats it
Now all that remains is the guidance scriptand adjusting the missile head's direction towards the target.
?
You probably mean vectorNormalized
Oh that was a really old message
None of the other messages after that loaded for me
I don't understand how to use it
Maybe, start with this.
this addEventHandler ["Fired", {
params ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile", "_gunner"];
_projectile setMissileTarget some_target
}];
I'm having trouble stopping a script.
while {true} do {};```
I thought change `true` to `false` would solve this, how do you stop the loop
uh, if you change true to false in that snippet then the loop never runs at all.
So I don't know what you're trying to achieve. Need a more concrete example.
You need to use a condition to determine when you want the loop to stop.
Making it true means it will continuously loop. Making it false will make it never even start
checkout https://community.bistudio.com/wiki/setUnitTrait, hope that helps
does anyone know if theres a way to get exile dynamic missions to spawn in editor ??
basically for when servers are dead i want a SP scenario with missions that act the way they do on exile servers? also a way to save character progress maybe??
ive tried doing it with ravage but i can never load my save
Alright so ive been struggeling with trying to add a ACEX arsenal integration. Like multiple different variants of a similar type rifle.
class CfgVehicles {
class Weapon_Base_F {
// Base weapon class
};
class Weapon_Rifle_Base_F {
// Rifle variant 1
class TextureVariants {
camo = "path/to/camo1.rvmat";
camo1 = "path/to/camo2.rvmat";
camo2 = "path/to/camo3.rvmat";
};
};
class Weapon_SMG_Base_F {
// SMG variant 1
class TextureVariants {
camo = "path/to/camo1.rvmat";
camo1 = "path/to/camo2.rvmat";
camo2 = "path/to/camo3.rvmat";
};
};
};
This is the base ive been going off of. Where am i going wrong?
hey guys, I have a loop that spawn enemies. I'd like them to walk near a object with the varible name "EnemyObject" but they aren't moving. I figured maybe it's beause its in the loop, but I moved it outside the loop and nothing.
```sqf
waveCount = 1; // Start with one unit
spawnPosition = getPos EnemyBase; // Get the spawn position
[] spawn {
while {true} do {
// Notify the player that a new wave is starting
hint format ["Wave %1 is starting!", waveCount];
systemChat format ["Wave %1 is starting!", waveCount];
// Spawn units for the current wave
for "i" from 1 to waveCount do {
unit = createGroup east createUnit ["O_Soldier_F", spawnPosition, [], 0, "NONE"];
unit move (getMarkerPos "EnemyObject");
};
// Wait until all OPFOR units are dead before proceeding to the next wave
waitUntil {({alive unit} count (allUnits select {side unit == east})) == 0};
// Display "Wave defeated!" message
hint "Wave defeated!";
systemChat "Wave defeated!";
// Increment wave count to spawn one additional unit in the next wave
waveCount = waveCount + 1;
// Delay before starting the next wave
sleep 10;
};
};```
Greetings I'm looking forward to create arma 3 scenarios kindly let me know if interested on this project
Your script worked just fine for me in vanilla VR map. Make sure you actually have a marker named EnemyObject and it's not just "EnemyObject" in the text field.
Somehow Steerable_Parachute_F are killable during gameplay in KotH and what's even more bizzare they keep firing Killed event handler every few seconds until deleted 
Can't reproduce this at all, but I've seen it happen several times already
this is a place to help people with scripting. do you have a scripting question?
@hardy timber do not DM me with something like that. Your question belongs in #creators_recruiting .
Okay
Do you guys think it's possible to understand this enigmatic source of HAL's mod? 
https://github.com/vigilvindex/RYD_HAC
What about it?
I thought I will get some inspiration from it, but it's so huge and without any comments, that it's very difficult to understand the dots between all the functions.
Yeah, variable names are mostly acronyms, not very readable
but otherwise it is alright
I am baffled that anyone is even willing to create something so complicated in a single person. 😄 Debugging and testing it must have been a hell. Since the evaluation rate of the AI commanders is in minutes.
Not sure if there is some debugging stuff left, but the code is indeed will be hell to get back into
15 nested ifs are common occurence
Okay, can't really call it a mess, considering he's trying to control Arma AI which is already black magic by itself
But turning nested ifs into something neater could've helped readability
Going to be honest, not even close to correct, but also:
- This channel is for scripting, not config. Check out #arma3_config or better, the ACEAX discord, which should be linked on their GitHub
- Look at the ACEAX GitHub https://github.com/jetelain/AceArsenalExtended/tree/main?tab=readme-ov-file#sample
Their documentation will help you get it set up, it's not too bad, but can be tedious
what's a pfh? (sry, noob)
per framehandler
ah ok
fileExists doesn't work with system paths, any way to check if squadParams picture exists?
I've seen few cases where squadParams returned path to the picture but when you used it, it errored out with file not found
Any ideas how to validate the squad picture before using it? 🤔
Im having small trouble to get rid of one thing when using selectPlayer command in SP. Everytime when switching from old player (always squad leader) to another squad member who become new squad leader (and he is "away" - far away) at the point of switch and after, "away" tag new under player icon simply remains there forever . Im not able to get rid of this tag via all sort of related formation/Move/group/etc type of commands even when tried bunch of different timing and sequences. Does anybody came across this issue and best case does anybody know a solution for this?
to reproduce do just:
- Place two units in one squad into the map far away from each other where player is squad leader
- Use selectPlayer to switch to no.2
You should and up with infinite "away tag" under player icon.
(in picture no.1 was old player = dead. No.2 is new player)
don't think so
okay thanks, I'll double check this evening, also, does it matter what the objective is? like can I use a trigger area or like a random asset likke a flag pole?
To reproduce, you need to land at a horizontal speed of at least 10 km/h.
Actually I am working on updating its successor the nr6 hal. I have to use the GitHub search function a lot.
Do you have any kind of public repository?
Is there an Event Handler that I can trigger right after a unitCapture/Play scheduled event?
affected code fragment:
diag_log result of the to be created:
22:05:42
["B_soldier_LAT_F",[["arifle_MX_ACO_pointer_F","","acc_pointer_IR","optic_Aco",["30Rnd_65x39_caseless_mag",30],[],""],
["launch_NLAW_F","","","",[],[],""],
["hgun_P07_F","","","",["16Rnd_9x21_Mag",17],[],""],
["U_B_CombatUniform_mcam",[["FirstAidKit",1],["30Rnd_65x39_caseless_mag",2,30]]],
["V_PlateCarrier2_rgr",[["30Rnd_65x39_caseless_mag",3,30],["16Rnd_9x21_Mag",2,17],
["SmokeShell",1,1],["SmokeShellGreen",1,1],["Chemlight_green",2,1]]],["B_AssaultPack_rgr_LAT",[["NLAW_F",2,1]]],
"H_HelmetB_sand","G_Tactical_Clear",[],["ItemMap","","ItemRadio","ItemCompass","ItemWatch","NVGoggles"]]]
Error:
22:05:42 soldier[B_soldier_LAT_F]:Some of magazines weren't stored in soldier Vest or Uniform?
Problem is that everything is inside inventory, nothing is full. Unit not modified straight from the editor.
Ace - error shown with and without it.
the varDone parameter is the variable you set so that when it is done, it makes that true. You then wait for that variable.
so essentially, you make your own handler from it.
So I'm trying to learn the KBTell Conversation system. Nothing happens when I enter the trigger area, does this formatting look correct?
Marcinko kbTell [player, "Intro1", "StagingArea"];
did you add the topic first?
Topic is in a .bikb. And it is defined in description.ext, like on the wiki page.
You need to use kbAddTopic on both units, too
Ah, Ok I'm over my head it seems then.
I was using this and it seems to work but you can't have it just say a single line. Which is how I got here lol. I was trying to avoid having a million .bikb files in my folder.
The Conversations page has examples for manual usage in its first part
Does that code go in description.ext?
you can choose a starting sentence and ending sentence, thats how you pull out single lines
[true, true] call HYP_fnc_disableACEVolumeUpdate;
private _speech = ["intro", "IFA_UK_DES_M01", ["intro_1", "intro_1"], "SIDE"] spawn BIS_fnc_kbTell;
waitUntil {scriptDone _speech};
//stuff
[true, true] call HYP_fnc_disableACEVolumeUpdate;
private _speech = ["intro", "IFA_UK_DES_M01", ["intro_2", "intro_4"], "SIDE"] spawn BIS_fnc_kbTell;
waitUntil {scriptDone _speech};
which one 😄 your bikb files can remain untouched, but sqf goes somewhere else obviously
What does the side index do in this example?
I meant, does all this go in a descripton.ext?
its the radio mode. I'm forcing over side channel
thats all in sqf script
nonono, this is sqf script
Ahh so that would go in the on activation field of the trigger then?
better to keep it external and execute that script from the trigger instead
ideally in a sqf file you then call from the server's init (for intro)
I guess that's because the server will keep all the audio in sync for the clients?
you'll run into more problems due to JIP if you do it that way. server can load faster than clients, and even the first client can miss the intro (on dedi)
its partially why I created the multiplayer sync module (it sort of runs like a unscheduled version of APEX campaign's intro sync)
Why does yours says spawn but the wiki example says call?
are players counted in _Units
it really should be changed as internally, its making itself scheduled when you call it:
// BIS_fnc_kbTell
// This script needs to run on scheduled env, so make sure we can suspend
// Otherwise spawn function
if (!canSuspend) exitWith
{
_this spawn BIS_fnc_kbTell;
};
but if you call it, you lose the ability to grab the scripts handle so you can check if it is done later. So you should always spawn it IMO.
depends, how are you forming _Units? that is just a local variable, it could be filled with numbers for all that matters
guys, im sorry to ask it here, but is there any tutorial videos on how to begin modding? like a step by step?
not any good ones. what kind of mod are you looking to do? the wiki has a bunch of stuff on configs, and I suggest HEMTT for building the mod
im just extremely confused on how to make it work
i tried to change a few bits on open source mods
just to learn
if you tell me what you want to do, I can point you in the right direction
but always gives me a error like not finding the init.
i tried changing the settings of the SSPCM mod
I double check and it is correctly named. ANy ieas what it couldbe?
everytime i start it, it says that the preinit.sqf is not found
maybe im building it wrong
or just missing something
ah so you are modifying a CBA framework kind of mod. its going to be very confusing for you if you are just starting out
you kind of have to know how CBA works in order to do that
cba framework?
and use HEMTT to pack it
Hey guys, this move function isn't working, and the variable name is correct? Is it an issue that it is inside the loop? I moved it outside the loop and no change```sqf
waveCount = 1; // Start with one unit
spawnPosition = getPos EnemyBase; // Get the spawn position
[] spawn {
while {true} do {
// Notify the player that a new wave is starting
hint format ["Wave %1 is starting!", waveCount];
systemChat format ["Wave %1 is starting!", waveCount];
// Spawn units for the current wave
for "i" from 1 to waveCount do {
unit = createGroup east createUnit ["O_Soldier_F", spawnPosition, [], 0, "NONE"];
unit move (getMarkerPos "EnemyObject");
};
// Wait until all OPFOR units are dead before proceeding to the next wave
waitUntil {({alive unit} count (allUnits select {side unit == east})) == 0};
// Display "Wave defeated!" message
hint "Wave defeated!";
systemChat "Wave defeated!";
// Increment wave count to spawn one additional unit in the next wave
waveCount = waveCount + 1;
// Delay before starting the next wave
sleep 10;
};
};```
CBA is the base framework for many large/advanced mods. Its what ACE and such is built on
when you start seeing files like XEH_preInit.sqf or script_component.hpp, etc
also if I wanted to modify the asset list of warlords that's done by creating a "description.ext"?
The flag is an object not a marker. You need to place a marker (I used a dot marker) and give it the name EnemyObject and it ill probably work. Alternatively instead of getMarkerPos "EnemyObject" just use getposASL EnemyObject (no quotes)
@buoyant cairn now, they could just be doing their own preInit.sqf but you are trying to modify something without know how to to start, i would try to build your own mod first to learn the systems
okay susre, now I am a super noob, so when you say marker, you mean a marker on the map? and not a in-game object/asset?
that will be my goal then
pick something simple to start
i guess i could start with a simple inf ammo and damage mult?
correct. getMarkerPos is a command that gets a position of a "Marker" not an "Object". You can place markers in editor but everyone will see them on their map.
inf ammo doesn't need a mod, you can script it. damage multi as well (if using vanilla arma). try say.... making a few magazines hold 500 rounds.
what do you mean by i can just script it?
you can use an event handler to detect when someone shoots, then refill the magazine after every shoot, thus giving you that effect
i have no idea how to do that, but that would be a good start
maybe something that could work only for my player?
start here:
and yes, you can do that too
Is it possible to use this for multiplayer? I've adapted your example for my mission. When a player enters the trigger area the NPC talks to the player. That all works.
Where I'm getting caught up is the players can ask this NPC questions with addActions. But I get an error saying I can't use player. I can't use a variable name for the actor because I won't know which player is actually asking the question.
class Question1 { text = "Could this be a trap?"; speech[] = { "\Sound\question1.ogg" }; class Arguments {}; actor = "player"; };
im going to read it and try
mind if i come ask for help if i have any questions?
ping me anytime here or make a thread here
when you go to call the kbtell function there is a parameter to override the speaker
give it a speaker that the game knows, then override it later
also any reason why everything seemly moves on a grid instead of free moving?
like i used to not have to use the wegits to move and rotate the objects and now I cant?
completely depends on how you structure it. you can do local, or server, or a combination of both (with if then filters)
icon bar - turn off translational, scaling, and angle grid buttons.
@fair drum if (localplayer) then
{
addEventHandler ["fired",{(_this select 0) setVehicleAmmo 1}]
}
like this?
i did it on the notepad ++
Ok so I have an actor defined in the .bikb. How do I override that to have the player that activated the addAction play the audio file?
player is already local, so you don't need to worry about locality when you add it. It always points to the local player object.
but, your syntax for addEventHandler is wrong.
its one of the last args for BIS_fnc_kbTell to add an array of objects or a singular bool (for dummy)
where exactly?
you need an object for the event handler:
player addEventHandler ["Fired", {
// something
}]
and you should probalby do FiredMan instead of Fired.
ooooh
makes sense
do i need to set the "if (player) then" ?
or just call for the event handler by itself?
no, because even if you run it globally, player points to the local player itself. If it is run on the dedi server, player is undefined and won't run anyways and is skipped
so if were to run on a server that is lan and hosted by my friend
if it is in init.sqf, then your machine will run it, and point to you, and his machine will run it and point to him.
you make it. you put it in the mission folder along side the mission.sqm the game makes
and it will run on any missions?
that specific mission
got it
if you want it on any mission, then you will have to make a mod
okay okay
first let me begin with my own lan host server
then ill reach that point
i have to go step by step
just this? @fair drum
try it and see if it gives you the results you want.
in the mission folder, next to the mission.sqm that the game makes
did you make a mission?
hello, there is a way to make the ai dont able to open doors?
ai don't even use doors sometimes lol, they walk right through
yea... lets asume that problem dont happen lol
i have the kp liberation, only ever hosted it lan mode
you have the pbo of it? if so, unpack it
yeah, found the pbo in dcuments folder
so unpack it, and you'll find their init.sqf already in there, just ammend your stuff at the end of it.
then repack it?
also, i have no idea on how to use this hemtt thing @fair drum
downloaded it with winget
that's for making mods which you are not doing atm
use pbomanager or something for that
okay
nothing :/
unpacked it, placed the code line in the init.sqf
packed again and nothing lol
so you need to learn debugging techniques. see if it is be added. maybe its not giving you the results because you need to use a different way, etc, etc. start using diag_log or systemChat or whatever to track things.
made it work!! @fair drum
now, is there any scripts like this one to remove the bullet drop or something?
nothing probably made, that involves modifying the round as it is flying through the air, every frame
So I have this ```sqf
[] spawn {
while {true} do {
// Notify the player that a new wave is starting
hint format ["Wave %1 is starting!", waveCount];
systemChat format ["Wave %1 is starting!", waveCount];
sleep 15;
// Spawn units for the current wave
for "i" from 1 to waveCount do {
unit = createGroup east createUnit ["O_Soldier_F", spawnPosition, [], 0, "NONE"];
unit move (getPosASL EnemyObject);
};
// Wait until all OPFOR units are dead before proceeding to the next wave
waitUntil {({alive unit} count (allUnits select {side unit == east})) == 0};
abd I am trying to creat the group outside the loop so I can add other units to it. I am looking t the docs and it says I shoulsqf
EnemyGroup = creategroup east;
[] spawn {
while {true} do {
// Notify the player that a new wave is starting
hint format ["Wave %1 is starting!", waveCount];
systemChat format ["Wave %1 is starting!", waveCount];
sleep 15;
// Spawn units for the current wave
for "i" from 1 to waveCount do {
unit = createUnit ["O_Soldier_F", spawnPosition, [], 0, "NONE"];
unit move (getPosASL EnemyObject);
???
};
// Wait until all OPFOR units are dead before proceeding to the next wave
waitUntil {({alive unit} count (allUnits select {side unit == east})) == 0};
waitUntil { units east findIf {alive _x} == -1 };
okay so we are waiting to find -1 alive?
findIf goes through an entire array and returns the index of the first thing that meets the condition AND STOPS THERE
its useful for large arrays for performance
and that will add to the group?
what arry is it indexing?
EnemyGroup = creategroup east;
[] spawn {
while {true} do {
// Notify the player that a new wave is starting
hint format ["Wave %1 is starting!", waveCount];
systemChat format ["Wave %1 is starting!", waveCount];
sleep 15;
// Spawn units for the current wave
for "i" from 1 to waveCount do {
unit = EnemyGroup createUnit ["O_Soldier_F", spawnPosition, [], 0, "NONE"];
unit move (getPosASL EnemyObject);
};
// Wait until all OPFOR units are dead before proceeding to the next wave
waitUntil {({alive unit} count (allUnits select {side unit == east})) == 0};```???
move takes ATL position, not ASL
But I assume this was written by ChatGPT originally
Yes it works just fine without those corrections
and actually the ASL is recommened by someone on here the other day
EnemyGroup createUnit ["O_Soldier_F", spawnPosition, [], 0, "NONE"];
I never ever itrated to a global variable and wasn't even sure its possible 🤔
idk im just a noob
return of units east command
which is shorter version of your allUnits select {side unit == east}
and faster too (though in this context its a drop in an ocean)
ah I see what you mean, thank you for the help guys
@young current can you help me write the time multiplier to stop the time im still a little new to this
find its wikipage in the list I gave you earlier. it has examples.
I dont have time to get into it more deeply than this
i got it so the lower the number the slower the time? setTimeMultiplier 0.5;
got it! thankyou
I wanted to add a truck spawning in every 5th wave (wave 5 has one truck, wave 10 two has two trucks) I figuered if a soldier is add like this on wave one then should be the same for adding wave 5? but it is not```sqf
[] spawn {
while {true} do {
// Notify the player that a new wave is starting
hint format ["Wave %1 start!", waveCount];
systemChat format ["Wave %1 start!", waveCount];
sleep 15;
// Spawn units for the current wave
for "i" from 1 to waveCount do {
unit = enemyGroup createUnit ["O_Soldier_F", spawnPosition, [], 0, "NONE"];
unit move (getPosASL EnemyObject);
};
for "i" from 5 to waveCount do {
truck1 = enemyGroup createUnit ["O_G_Offroad_01_armed_F", spawnPosition, [], 0, "NONE"];
truck1 move (getPosASL EnemyObject);
};```
Vehicles aren't units, you need createVehicle
Try
if(waveCount % 5 == 0) then {
for "_i" from 1 to floor(waveCount / 5) do {
veh = createVehicle ...
enemyGroup createVehicleCrew veh;
};
};
oh dividing the wave by 5?
oh wait this will create the truck each wave
can i do like python wear I can divid by 5 and get a remainder , if it equals 0 spawn truck?
Fixed
Yeah, pretty much the same
add some position randomization for the vehicle so they dont spawn inside each other and blow up
check docs for createVehicle command
great idea
does anyone know how to get cars to run into eachother full speed in editor? im trying to make a scenario where someone comes across the street cause both sides of cars to ram eachother. anytime i set waypoints they just come to the middle, slow down, then stop
You'll need to take over cars somehow and emulate the crash
I'd start with disabling AI for units at some point and they applying setVelocity for some time