#arma3_scripting
1 messages · Page 194 of 1
missions files should be loaded already but with file patching you can load them even from arma dir if you want to
Does anyone know if nearestObjects also returns simple objects?
You mean use a class name in nearestObjects, right
Heres my implementation
_nearSimpleObjects = nearestObjects [_pos, ArrayOfBlacklistedSimpleObjectClassnames[], _dist];
Will this not work, passing in a list of classnames?
Do I need to filter after the fact?
depends what kind of simple object you have
simple objects created from a class name do have class names iirc
but super simple objects (created from models) don't
Its a flat decal that spawns on the floor - it contains ablood texture
well how do you create them?
createSimpleObject [className, pos]
or
createSimpleObject [modelPath, pos]
typeof cursorObject returns classname for simple objects created with a classname, but nearestObjects with the classname doesn't return that simple object.
classname
nearestObjects with [] does.
hmm weird
then yeah don't use filter at all and just use []
Feels like a bug but who knows with Arma :P
you can filter it manually with select
So probably the best option is _nearSimpleObjects select {!(typeof _x in ArrayOfBlacklistedSimpleObjectClassnames)} ?
it's always a feature 
Does nearestObjects with blank parameter also return super simple objects as well?
I may convert the simple objects to super simple, if thats something possible with decals
yeah but why the []?
yes
ts just an example
I think it is possible
but I don't think you get any benefits
If im spawning a bunch of them in a short amount of time, with a lot of decals left over - you dont think it will increase performance?
btw if you have many classNames use a hashmap instead of array
hmm maybe yeah
iirc super simple objs are faster to create
but runtime perf wouldn't differ much
Afaik in should be the same lookup time as a hashmap, no?
No.
Hashmap is O(1), array is O(N)
in with an array just checks against every element in order.
So yeah, if you have much in your blacklist/whitelist arrays then it's best to convert them to hashmaps.
So this kind is ideal? Example 2: [1, 2, 3, 4] createHashMapFromArray []; // returns [[1, <null>], [2, <null>], [4, <null>], [3, <null>]]\ because im not associating the classnames with any value, just using the hashmap for lookup?
Technically you're associating them with the value nil, but yeah, it works.
Thank you guys for the help!
Hmm i seem to have an issue with spawning the super simple object:
When i provide the classname to createSimpleObject the normal simple object gets created, however when i provide the path to the model to createSimpleObject, the object does not spawn and returns objnull.
The class inherits NonStrategic in cfgVehicles
```class mydecal : NonStrategic
{
scope = 1;
author = "thehungryhippo";
destrType = "DestructNo";
model = "pathTomodel.p3d";
displayName = "mydecal";
faction = "Default";
vehicleClass = "Misc";
hiddenSelections[] = {"mydecal"};
};```
Anyone have a clue? Does something else need to be set up with super simple object, or is it only possible to spawn this type of object via class name (IE not super simple)
You're likely passing the path wrong
@tulip ridge
its the same exact path im providing in the config?
Well if that's your actual config, then that path is just wrong
Because you need to start it with a pbo prefix
type the path here
"\WIH_Blood\Models\Plane\Blood_Plane.p3d"
And in createsimpleobject i tried without the first \
how would you add an animation to a hold action?
like have the person doing the hold action do like a repair animation while they do it?
Add on
codeStart: Code - (Optional, default {}) code executed when action starts.
Switch move (your move)
And on complete switch move "" and same in if cancelled so it stop on complete / on cancelled
https://community.bohemia.net/wiki/BIS_fnc_holdActionAdd
https://community.bistudio.com/wiki/playActionNow
And you may need on progress start it from begin so it will loop it or add playmove eventhandeler and repeat (and remove on cancel/ complete)
thank you
Hello again, had another question regarding UGVs and deployables in general. I've got a script set up so an AI controlled unit places down a UGV, does some stuff with it, then picks it back up.
When simplified, it looks a bit like this
`_currBag = unitBackpack Soldier;
sleep 5;
Soldier action ["assemble"];
sleep 5;
Soldier action ["Disassemble",(nearestObject [Soldier, "B_UGV_02_Science_F"])];
sleep 5;
Soldier action ["TakeBag", _currBag];`
Everything works until that last part, as the unit plays the animation to pick it up, but does not actually do it. I suspect that this is to do with the fact that the disassembled UGV does not count as a backpack, despite the wiki stating that the disassemble action "Takes assembled weapon to parts (carry bags).". In that case I'm not too sure what action to use.
You need to fetch the backpack from the groundholder
https://community.bohemia.net/wiki/backpackCargo
How does one go about doing that?
ah thank you
What would the syntax of that command be to get the array from the groundholder? The wiki only mentions vehicle player, I haven't messed around with that sort of command yet
Looks like takeBag is broken
0 spawn {
_currBag = unitBackpack Soldier;
sleep 5;
Soldier action ["assemble"];
sleep 5;
Soldier action ["Disassemble",(nearestObject [Soldier, "B_UGV_02_Science_F"])];
sleep 5;
private _groundHolder = (nearestObjects [Soldier, ["GroundWeaponHolder"], 6]) select 0;
private _GHbackpack = (backpackCargo _groundHolder) select 0;
hint format ["DEBUGGY: %1", _GHbackpack];
Soldier action ["TakeBag", _GHbackpack];
}
Nvm with everyBackpack instead of backpackCargo it works properly.
0 spawn {
Soldier action ["assemble"];
sleep 5;
Soldier action ["Disassemble",(nearestObject [Soldier, "B_UGV_02_Science_F"])];
sleep 5;
private _groundHolder = (nearestObjects [Soldier, ["GroundWeaponHolder"], 6]) select 0;
private _GHbackpack = (everyBackpack _groundHolder) select 0;
Soldier action ["TakeBag", _GHbackpack];
}
@frail skiff
Thanks a bunch, you're a life saver, I'd never figure this out lmao
please how to deactivate a triger by other trigger
https://community.bistudio.com/wiki/deleteVehicle
deleteVehicle nameOfTheTrigger
or, if you don't want to delete the trigger, use myVariable = true/false
thank you … so much 🙌🏻🙌🏻
where shoul i put thise . pleas
in the trigger thats doing the deleting
In one trigger you need to create this variable, and the trigger you want to "deactivate" you put this variable in the condition, use the On Deactivation field aswell for this. But if you don't have any idea of doing this, check youtube videos, there are a lot of tutorials out there
its not that hard i know you can do it @haughty linden
Got it…! thanx for everything 🙌🏾
Any one has script for AC-130 support? It wil be cool to see Spooky action form infantry point of view. 🙂
have you tried those support modules? i dont know anything about them though 🙂
Would it be possible to port arma 2 environment sounds to arma 3?
I really enjoyed them
The wind blowing, Beach sounds. bird sounds
Arma 3 has all that
and yes you can put any sounds into Arma 3
but you cant really install them into a map like
unless you can map build
if they're part of the A2 public data yes. otherwise no. it's best to ask in #other_ip_topics to make sure
Is there a way to disable the AI reporting using SQF?
Or is the only way to do that selecting the no voice in arsenal?
(I am talking about the Man, 100m, front)
How to set vehicle variable name for later use on zeus?
you can set "novoice" as voice through SQF
I always loved you Lou 
(I will most probably actually implement it
)
You can also disableAI "RADIOPROTOCOL"
Is "head" really the only bone on a dog that allows the attached object to rotate?
dog = grp createUnit ["Fin_sand_F", getPos Cake, [], 0, "CAN_COLLIDE"];
bomb = createVehicle ["SatchelCharge_Remote_Ammo", ASLtoAGL getPosWorld dog, [], 0, "CAN_COLLIDE"];
bomb attachTo [dog, [0, 0, 0], "head", true];
All other bones like:
hips
neck
neck1
spine
spine1
spine2
Just makes the satchel sit staticly without rotating at all
I want to strap something that looks like an explosive to the back of the dog
Does anyone know how to turn an object into an explosive in arma using the init option in zeus?
with zeus enhanced?
yeah
and what do you want it to do? explode when someone gets near?
I'm mainly trying to turn an object into a bomb so when it touches or gets close to the group when dropped out of a plane it explodes
what you'll do is you'll create a munition after a condition (multi-conditional waitUntil) is met, at the position of the object, hide it, and detonate it, then delete the main object
are those selections or bones?
From selectionNames
waitUntil { sleep 1; isTouchingGround whatever };
use getBoneNames and getSelectionBones to see which bones they are attached to
Quick question, since getConnectedUav only runs local, is the easiest method to setVariable for that drone globally to just remoteExec setVariable for it?
I'm trying to "lock" drones from being used by people other than the one who assembled it
set the variable for who? and who broadcasts it?
if you want to set it for all (globally as you said) you can just use setVariable and use its public parameter
@opaque topaz sorry i just half read the convo lol
how can we retrieve the 3d values of a marker placed in editor, like the height/z value? getmarkerpos is only 2d
Use alt syntax of https://community.bistudio.com/wiki/getMarkerPos
sorry what is that
A command to get a marker position
Alt = Alternative so yes
ok thank u
im curious why returning boolean from exitWith doesnt work in some codes. Like in HandleChatMessage if you do this it wont return true ```sqf
addMissionEventHandler ["HandleChatMessage",
{
if(true) exitwith { true };
false
}];
it's a known limitation of events iirc
hmm if i dont remember wrong its not possible to use exitWith in some commands like select. (Could be some other)
just odd that exitWith does exit the code but doesnt return true
^ heh, that takes me back to when i tried using exitWith in a trigger
it might have to do with unscheduled
Can definitely use exitwith and exit in unscheduled
I wonder if exitwith would work here if you wrapped it in a call
not sure, but it may work?
i guess its similar to ```sqf
[0,1,2] select {
if(_x == 1) exitwith { true };
false
};
But in this case it's better to use findIf.
sure, just wondering if that select etc are fixable
I guess an error will be thrown.
How should that be fixed?
I mean you want a different return or just error like schatten said
it should return [1]
apply + select?
[0,1,2] select {_x == 1}
yeah this wasnt a question of how to do this but hoping the exitWith would work..
Are you looking some solution to your handlemessage, or you figured that out and just looking fix for exitWith ?
i got the HM working but was just curious whats up with exitWith , same thing with breakout i think
I wouldn't expect these to ever be fixed/changed. Would break backwards compatibility with existing scripts that might rely on this behavior.
yea i was thinking of same thing but then on the otherhand who expects boolean from select?
Hello All : is there a way to get all the city and town names in text, from a script, from Alits Island
private _allLocations = [];
{
_name = _x;
{
_allLocations pushBack [_x, locationPosition _x, text _x];
} forEach nearestLocations [getArray (configFile >> "CfgWorlds" >> worldName >> "centerPosition"), [_name], worldSize];
} forEach ["NameVillage", "NameCity", "NameCityCapital"];
funny, I was testing this yesterday. When you do the same thing but using "then" "else", it works normally
yeah its just problem with exitWith
exitWith is literal
I dunno if I'd describe that as a problem. To me that seems like what you'd logically expect it to do.
dunno, i was hoping it worked differently 😉
Actually, I think ace uses cba direct call because events have that problem
So yeah, wrapping it in a call will work
yeah there's even a note in the biki about this
but why
trying to get rid of '/' from string
private _hash = hashValue [systemTimeUTC,diag_tickTime];
private _name = _hash regexReplace [ "/", "*" ];
[_hash,_name]
_hash regexReplace [ "\/", "*" ];
also does not work
_name = (_hash splitString "/") joinString "*";
Can someone give me some input on why a certain script causes a good amount of lag whenever it is exec’d?
yes
Do I just copy/paste the entire script here…?
!code
```sqf
// your code here
hint "good!";
```
↓
// your code here
hint "good!";
If the script is very large, use e.g. Pastebin to avoid cluttering the channel
how do I do that !code on mobile?
@wicked roost described this.
I cant find the right ‘’’ for the sqf
If you use GBoard, press ?123, then =\<, then find the symbol
_Target = _nearestEnemiesCombined call bis_fnc_selectRandom;
//Call Virtual CAS - Taken from MIL_CAS
_logic = "Logic" createVehicleLocal getpos _Target;
_logic setDir getdir _Object;
_logic setVariable ["vehicle",_CASPlane];
_logic setVariable ["type",_CASType];
[_logic,nil,true] call BIS_fnc_moduleCAS;
deleteVehicle _logic;
Basically its creating the zeus cas effect on a target. It causes a massive amount of lag
Where is this executed?
On a trigger activation line
I only inserted the relevant part
Theres more to it but it would be a lot and I dont have pastebin account
What's the trigger condition and is it set to Server Only?
Pastebin doesn't require an account to use it
Ok, trying now
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.
Someone who has the game open will need to check this in the functions viewer, but it's possible that BIS_fnc_moduleCAS is not intended to be used in an unscheduled context like a trigger activation field
It works, just causes a massive amount of lag at exec. It also doesnt cause any lag on thr virtual “island”
How is this executed from the trigger? Is it just pasted plain like this into the activation field? Because... don't do that
No, with the call in the pastebin. At the top of the script
[ThisTrigger, EAST, False, 2, 10000, 5, False, 300, 600] execVM "Scripts\FireSupport\FireSupport_SectorControl_CAS_Virtual.sqf"
Okay, so this is all running scheduled, so that's not the issue
What is the trigger condition and is it set to server only?
I cant login right now so I dont know if it is Server Only. However, this is singleplayer, not multiplayer- playing via the editor Trigger condition varies.
The trigger condition is important. It could be repeatedly activating, causing duplicate instances of the script.
Umm, I can probably recreate the condition, one sec
_nearestMen = nearestObjects [_TargetedSector, ["Man"], _ScanDistance];```
This and the one for vehicles, with your parameters, are a potential issue; 10km scan radius is quite a lot if there are many vehicles and units on the map
Yes, the script is very unoptimized.
Yah, but I also use an AI virtual artillery script which uses the same distances, etc and it doesnt cause any lag
Im also a scripting novice
Non-critical: BIS_fnc_selectRandom is superseded by selectRandom. Not "big lag" difference in speed, but would be better to use the newer command.
Non-critical: the way this script sets up its params and variables is very annoying. Again, not the source of your problem, but using params and private would be better and tidier.
Im a novice….lol
The trigger conditions checks sector ownership and fires whenever the number of sectors controlled by a side exceeds a specified number. Ie East owns 4 or more sectors
@Bohemia.net
Can we get support for hashmaps added to findif in a future update?
https://community.bistudio.com/wiki/findIf
I see no reason why it wouldnt work (Have to resort to using a forEach for a workaround which is far slower than findif)
Non-critical: getPos is slow and should be used only in cases where that specific vertical format is essential. Otherwise getPosASL or getPosATL are faster.
Better yet, maybe add support for finding hashmap values using in?
if (_Loop) then {} else {_Go = False};```
_argh_
findIf has the same perf as forEach
if you need to search in values, why use a hashmap?
To do more advanced queries on your hashset
anyway, you can use in:
_value in values _hashmap
_hasValue = ((values _hashMap) findIf { ... }) >= 0;
Hmm well nvm that works well - findif would still be useful for hashmaps as they are more efficient than foreach
Me pointing this stuff out is part of how you improve from a novice. It is a criticism of the code but not of your personal character.
they're not really. they both do the same thing
if you do forEach + exitWith the performance is nearly identitcal
so whats better, values findif or hashmap with foreach exit?
im guessing hashmap with foreach is more efficient?
If the lag happens at the moment the CAS plane is created, it could be something the CAS module function does internally. It's a pretty old function and probably not super optimised. I don't have the game open to inspect it though.
I'd still like to know the trigger condition, though.
if you use values the game will have to create it as an array for you first, so it's probably less efficient
Yeah thats what i was thinking
also with forEach you'll also have the keys next to your values if you need them (_x and _y)
Oh I see you posted it. Okay, so that sounds dangerous
Yeah i thought so i read somewhere findif was a lot faster, but only for arrays it seems
No worries, I appreciate the feedback.
Count = 4; _Side = East
_Sectors = +BIS_fnc_moduleSector_sectors select {_x getvariable “owner” isEqualto _Side}
_Sectors >= _Count
Im going off memory but its something like that
it's not a lot faster
that example code is just written poorly
_someoneIsNear = {
(_x distance [0,0,0] < 1000) && { breakWith true };
} forEach allUnits;
that's the correct way
It lags when CAS is created
I'd still like to know the trigger condition, though.
huh i had no idea breakWith was a thing.
Is it better to use breakwith vs exitwith in a foreach?
We got that
ah crap 😄
So this is probably not activating repeatedly, unless the number of controlled sectors is rapidly flipping between enough/not enough. So that's probably not the issue
No, it doesnt happen that often
the reason I say mine is faster is because I removed the if and the false at the end (both were wasting performance a bit and giving unfair advantage to the findIf)
but both exitWith and breakWith are ok (in the case of my code I had to use breakWith tho)
Someone else might spot something I missed, but from this, my main possible culprits would be either that 10km radius nearestObjects check finding many vics/men, or BIS_fnc_moduleCAS just being horrible
hm i have scripts that use if exitwith inside of foreach, but seems like a replacement to breakWith using your example is a good idea?
if you have it exactly like that yes (that example is trying to return a bool similar to findIf)
otherwise no
When I was testing it i changed it to 500 and still had lag issues
A quick test you can do is to comment out the CAS function call, and stick a systemChat "activated now"; in the same place for reference. If it doesn't lag any more then it's probably the CAS function
Thats a good idea
If it is the CAS function then your only fix really is to find or write a better one. You can't directly change how the function works internally.
True. I have another script that just spawns a plane and gives it a waypoint. Might just use that since it has zero lag. The “virtual” one is more effective though
_createMarker = {
params [ "_pos" ];
private _marker0 = createMarkerLocal [ "marker_0", _pos ];
_marker0 setMarkerTypeLocal "o_unknown";
_marker0 setMarkerDrawPriority 1000;
private _marker1 = createMarkerLocal [ "marker_1", _pos ];
_marker1 setMarkerSizeLocal [ 50, 50 ];
_marker1 setMarkerShapeLocal "ELLIPSE";
_marker1 setMarkerBrushLocal "FDiagonal";
_marker1 setMarkerDrawPriority 1;
};
allMapMarkers apply { deleteMarker _x };
[ getPos player ] call _createMarker;
trying to have marker0 on top of marker1 using setMarkerDrawPriority, but with no effect.
I see, so if exitwith{} is still fine?
yes
Are there any good “ai clear building” scripts?
That symbol is transparent. I'm not 100% sure if it's under the circle or just the alpha channel doing its thing
All the NATO standard markers are partly transparent as an inherent part of the marker. You could try stacking two of the same marker on top of each other, but that's it.
Two question :
One.about assign variable like name to objects on the zeus( how to do?)
Two.i wanna spawn BIS_fnc_typeText2 on server
Code run in editor via trigger test successfully but not work on the server!
[
["Text","align = 'center'"]
,0,safezoneY + safezoneH / 2
] Spawn BIS_fnc_typeText2;
About the last one, use https://community.bistudio.com/wiki/remoteExec
hey guys is anyone experienced with Arma 3's coding language or PBO files? I want to edit the UNIT SFX mod so it doesn't play hurt sound when headshotting a unit, so like if the killing shot was fatal, no sound comes out out of entity/unit
eh, in the mean while I'll check if chatGPT will be useful
I can save you from testing,
isn't useful
hmmm okay
can you atleast tell me how to make this mod make sure that sound does not play when damage value given upon unit is fatal?
no?
Frick
there is this init.sqf file inside the PBO
for hit screams, this is the code
// Hit scream SFX
mrg_unit_sfx_scream = [
"MRG_scream_1",
"MRG_scream_2",
"MRG_scream_3",
"MRG_scream_4",
"MRG_scream_5",
"MRG_scream_6",
"MRG_scream_7",
"MRG_scream_8",
"MRG_scream_9",
"MRG_scream_10",
"MRG_scream_11",
"MRG_scream_12",
"MRG_scream_13",
"MRG_scream_14",
"MRG_scream_15"
];
mrg_unit_sfx_deathScream = [
"MRG_deathScream_1",
"MRG_deathScream_2",
"MRG_deathScream_3",
"MRG_deathScream_4",
"MRG_deathScream_5",
"MRG_deathScream_6",
"MRG_deathScream_7",
"MRG_deathScream_8",
"MRG_deathScream_9",
"MRG_deathScream_10"
];
// Array sizes (saves having to calculate them later)
mrg_unit_sfx_bodyfall_concrete_size = count mrg_unit_sfx_bodyfall_concrete;
mrg_unit_sfx_bodyfall_grass_size = count mrg_unit_sfx_bodyfall_grass;
mrg_unit_sfx_bodyfall_drygrass_size = count mrg_unit_sfx_bodyfall_drygrass;
mrg_unit_sfx_bodyfall_sand_size = count mrg_unit_sfx_bodyfall_sand;
mrg_unit_sfx_scream_size = count mrg_unit_sfx_scream;
mrg_unit_sfx_deathScream_size = count mrg_unit_sfx_deathScream;
(if flood, let me know and I'll delete
I posted it since init makes me think of initialize word
Hi. Can anyone help? When I'm knocking out enemy vehicle and repairing it to use it for my side, another my vehicles behave cautiously to the captured vehicle and they can even bombard it. Which command may help me to make this captured vehicle friendly to my units?
there is also mgr_fn_unit_killed
//_sT = diag_tickTime;
_unit = _this;
_unit spawn mrg_fnc_unit_sfx_hit;
if (player distance _unit > 50) exitWith {};
_surfaceType = surfaceType (getPosATL _unit);
_time = time;
_obj = "Land_HelipadEmpty_F" createVehicleLocal [0,0,0];
_obj attachTo [_unit,[0,0,1]];
_sound = switch (_surfaceType) do {
case "#GdtStratisGreenGrass";
case "#GdtGrassGreen": {mrg_unit_sfx_bodyfall_grass select floor random mrg_unit_sfx_bodyfall_grass_size};
case "#GdtStratisThistles";
case "#GdtStratisDryGrass";
case "#GdtGrassDry": {mrg_unit_sfx_bodyfall_drygrass select floor random mrg_unit_sfx_bodyfall_drygrass_size};
case "#GdtStratisDirt";
case "#GdtDirt";
case "#GdtStratisConcrete";
case "#GdtConcrete";
case default {mrg_unit_sfx_bodyfall_concrete select floor random mrg_unit_sfx_bodyfall_concrete_size};
};
//systemChat format["Killed | Process time: %1s", diag_tickTime - _sT];
waitUntil {(ASLToATL(eyePos _unit) select 2) < 0.8 || time > (_time + 2.5)};
_obj say _sound;
sleep 2;
deleteVehicle _obj;
//systemChat "done";
I suppose here I would need code to disable the code for pain sound?
I'll check what if I delete _unit spawn mrg_fnc_unit_sfx_hit;
does it have anyone in it?
@little raptor friendly units (new crew)
do you use AI mods?
lambs danger
what if you unload it? do they still target friendlies?
well if it's the AI mod that's causing the issue, you have to ask them to fix it
anyway, just try vanilla, put down an OPFOR vehicle, put a BLUFOR soldier in it, and then spawn some BLUFOR outside. see if they target the vehicle
@little raptor ok, thanks
It might be that they just don't have up-to-date intel on it being friendly yet. You could try using reveal on it to give your friendlies perfect knowledge.
@hallow mortar trying this, but doesn't help
@hallow mortar tank reveal [cursorObject, 1];
this way?
You don't have to ping me every time.
If we assume that cursorObject is the previously-enemy vehicle:
{
_x forgetTarget cursorObject;
_x reveal [cursorObject, 4];
} forEach groups side player;```
seems like reveal 4 helped
Yeah, this helps for sure!
Thanks guys.
Note that those knowledge commands are local effect, so in MP you may need to remoteExec.
Yet another question, how does one get an AI controlled vehicle to use its flares/countermeasures? I haven't found anything about it on the wiki, besides something that could be used for smoke launchers (BIS_fnc_effectFiredSmokeLauncher).
Thanks!
A short return to Arma 2 scripting after a while.
Is there a way to disable autolock for certain types of bombs with scripting only? (I guess there isn't.)
The problem is that players are locking target buildings and dropping precision bombs (FAB-250, Mk-82) from high altitude which kinda wrecks the game balance, so I'm trying to research whether it could be disabled or somehow circumvented in order to not have to remove the guided bombs from the mission.
A hacky way of implementing it could be adding some randomness to the bomb's trajectory, but I think it would be bad design since then it would indeed be random and not hard(er) to hit the target. Or maybe it could work if the error margin got smaller with decreasing distance between plane and target building, but it would still be hacky I think
Arma 2?
Unfortunately most (all?) of the projectile target management commands were only added in A3
tbh, if you want to prevent the bombs from self-guiding, then you may as well just remove them from the mission and replace them with unguided equivalents. It's basically the same effect.
I mean that's technically possible but it's not exactly good gameplay design
I mean, delete the projectile and add the ammo back, it's like never happened 👻
Is there a fix and or reason why the entitycreated eventhandler will occasionally miss units? (Ie a loadout script will not be applied).
show us your code
!code
```sqf
// your code here
hint "good!";
```
↓
// your code here
hint "good!";
I dont have it on hand - I did it in the past but scrapped it because it didnt work 100% of the time.
did you try now?
you'r asking for a fix for a unknown code🤔
Like this
addMissionEventHandler ["EntityCreated", {
params ["_entity"];
_entity execVM “loadout.sqf”
}];
The entity doesnt always exec the script. Usually runs into issues when a lot of units are created all at once.
what is in that code
script*
Just a loadout script - remove item, add unforom, helmet, etc.
personally I hadn't any problems with it
in this case, it's better to filter the units/entities
You mean kindof man, etc?
yeah
because it can get any object, such as vehicles, air, helicopter
it can throw an error (or a silent one) and your script just stop working (maybe by skipping some actual units)
Is it possible to use the flash light on the minimap effect from contact dlc in base game?
So I got all my scripting crap to work on a mission but I'm having difficulties getting a server to load some mods....
3:34:37 @icp | @icp | false | false | GAME DIR (Empty) | da39a3ee5e6b4b0d3255bfef95601890afd80709 | 11fdd19c | /home/customer/srv/a340k/@icp
3:34:37 @tiow | @tiow | false | false | GAME DIR (Empty) | da39a3ee5e6b4b0d3255bfef95601890afd80709 | 11fdd19c | /home/customer/srv/a340k/@tiow
3:34:37 @tiow2 | @tiow2 | false | false | GAME DIR (Empty) | da39a3ee5e6b4b0d3255bfef95601890afd80709 | 11fdd19c | /home/customer/srv/a340k/@tiow2
3:34:37 Grimdark Armory | @grimdark | false | false | GAME DIR (Empty) | da39a3ee5e6b4b0d3255bfef95601890afd80709 | 11fdd19c | /home/customer/srv/a340k/@grimdark
Thought maybe one of you might know why this happens. I'd like to test my mission on actual multiplayer server....
and yes all the mods are downloaded
It's Linux so it's probably a case sensitivity issue.
Make sure the folder names are addons not Addons
seriously??
Wrong channel btw. If you run into further problems you should post in #server_admins or #server_linux
I couldn't see those channels, I looked too xD
Hello All: i was reading up there lastnight and i'm not sure i understand,
i made a Steal the car mission,
And when you take Car1 its called, witch is a opfor car,
Some Opfor choppers = O_Heli_Light_02_F come after me but they don't seem to Attack me that much,
How can i get Chopper1 and Chopper2 and Chopper3 to Attack me Better
i have an interesting issue. I'm not sure if its a race condition or what, but i have the following being executed from data from a module.
// server function
if (!isServer) exitWith {};
params ["_carrier", "_side"];
private _carriers = missionNamespace getVariable QGVAR(carriers);
_carriers set [_side, _carrier]; // this is a hashmap
// yada yada stuff below
due to when modules initialize, i'm pausing it depending on gamestate:
// module function
waitUntil { (missionNamespace getVariable [QEGVAR(game,game_state), -1]) >= GAME_STATE_INIT };
// do stuff
so there are two modules, one for west, one for east. they should be editing the hashmap sequentially and gives the following results on SP and local hosted:
// SINGLE PLAYER AND LISTEN SERVER
22:22:43 [CARRIERSTRIKE] (game) INFO: InitCarrier | Carrier Added For Side: EAST
22:22:43 [CARRIERSTRIKE] (game) INFO: InitCarrier | All Carriers: [[WEST,<NULL-object>],[EAST,165284aa080# 627667: carrier_01_hull_base_f.p3d Land_Carrier_01_base_F]]
22:22:43 [CARRIERSTRIKE] (game) INFO: InitCarrier | Carrier Added For Side: WEST
22:22:43 [CARRIERSTRIKE] (game) INFO: InitCarrier | All Carriers: [[WEST,1656e422080# 626946: carrier_01_hull_base_f.p3d Land_Carrier_01_base_F],[EAST,165284aa080# 627667: carrier_01_hull_base_f.p3d Land_Carrier_01_base_F]]
this works as intended. however, on a dedicated server, I get the following:
// DEDICATED SERVER
22:28:59 [CARRIERSTRIKE] (game) INFO: InitCarrier | Carrier Added For Side: WEST
22:28:59 [CARRIERSTRIKE] (game) INFO: InitCarrier | All Carriers: [[WEST,1bafe462b00# 626946: carrier_01_hull_base_f.p3d Land_Carrier_01_base_F],[EAST,<NULL-object>]]
22:28:59 [CARRIERSTRIKE] (game) INFO: InitCarrier | Carrier Added For Side: EAST
22:28:59 [CARRIERSTRIKE] (game) INFO: InitCarrier | All Carriers: [[WEST,<NULL-object>],[EAST,1baff083580# 627667: carrier_01_hull_base_f.p3d Land_Carrier_01_base_F]]
they cancel each other out. its the weirdest thing...
this is the only place that the hash is edited. everywhere else its just pulling data from this hash
more debugging
// SINGLE PLAYER AND LISTEN SERVER
22:50:14 [CARRIERSTRIKE] (game) INFO: InitCarrier | Carriers Pre Edit: [[WEST,<NULL-object>],[EAST,<NULL-object>]]
22:50:14 [CARRIERSTRIKE] (game) INFO: InitCarrier | Carrier Added For Side: EAST
22:50:14 [CARRIERSTRIKE] (game) INFO: InitCarrier | All Carriers: [[WEST,<NULL-object>],[EAST,11c53eca080# 627667: carrier_01_hull_base_f.p3d Land_Carrier_01_base_F]]
22:50:14 [CARRIERSTRIKE] (game) INFO: InitCarrier | Carriers Pre Edit: [[WEST,<NULL-object>],[EAST,11c53eca080# 627667: carrier_01_hull_base_f.p3d Land_Carrier_01_base_F]]
22:50:14 [CARRIERSTRIKE] (game) INFO: InitCarrier | Carrier Added For Side: WEST
22:50:14 [CARRIERSTRIKE] (game) INFO: InitCarrier | All Carriers: [[WEST,11ac72f2080# 626946: carrier_01_hull_base_f.p3d Land_Carrier_01_base_F],[EAST,11c53eca080# 627667: carrier_01_hull_base_f.p3d Land_Carrier_01_base_F]]
// DEDICATED SERVER
22:49:04 [CARRIERSTRIKE] (game) INFO: InitCarrier | Carriers Pre Edit: [[WEST,<NULL-object>],[EAST,<NULL-object>]]
22:49:04 [CARRIERSTRIKE] (game) INFO: InitCarrier | Carrier Added For Side: WEST
22:49:04 [CARRIERSTRIKE] (game) INFO: InitCarrier | All Carriers: [[WEST,26c1a12a080# 626946: carrier_01_hull_base_f.p3d Land_Carrier_01_base_F],[EAST,<NULL-object>]]
22:49:04 [CARRIERSTRIKE] (game) INFO: InitCarrier | Carriers Pre Edit: [[WEST,<NULL-object>],[EAST,<NULL-object>]]
22:49:04 [CARRIERSTRIKE] (game) INFO: InitCarrier | Carrier Added For Side: EAST
22:49:04 [CARRIERSTRIKE] (game) INFO: InitCarrier | All Carriers: [[WEST,<NULL-object>],[EAST,26c1b206080# 627667: carrier_01_hull_base_f.p3d Land_Carrier_01_base_F]]
What sort of chopper exactly?
opfor choppers
@granite sky oh they are the umm armed base Opfor chopper O_Heli_Light_02_F
Well, you didn't mention the place where the hash was created? I assume that's with [west,east] createHashMapFromArray []?
to me it looks more like you're initializing the hashmap twice
You have proved that it's only called once?
oh my god... it could be an accidental isGlobal = 2 on the init module...
pathway
https://github.com/hypoxia125/Carrier-Strike/blob/master/addons/modules/modules/ModuleInitGame.hpp
https://github.com/hypoxia125/Carrier-Strike/blob/master/addons/modules/functions/fn_ModuleInitGame.sqf
https://github.com/hypoxia125/Carrier-Strike/blob/master/addons/game/functions/fn_Init.sqf
https://github.com/hypoxia125/Carrier-Strike/blob/master/addons/game/functions/fn_InitCarrier.sqf
and on another note, why are they even switching orders?
sp is east west, dedi is west east...
that I can't tell you other than wonky firing of modules
It's a hashmap, it's allowed :P
i think he means the processing of those modules, the order of them
yeah
will the isGlobal = 2 fire again on the server on a join? even if the function it calls is blocked by a server check?
no wait, its not firing additionally, I would have two sets of log messages
I wish there would be some event handler for tasks
as in?
yeah, its not this. This needs to be global persistance because it also calls the client's init
as you have basic event handlers ( killed, deleted, take, put, ... ), mission event handlers, ... something to track tasks, like task was created, updated, changed state ...
instead you need to do a loop to detect changes
if you're the one making changes, you know when they happen already
yeah I only get one set of messages:
22:49:04 [CARRIERSTRIKE] (game) LOG: InitGame | Saving missionNamespace game data...
22:49:04 [CARRIERSTRIKE] (game) LOG: InitGame | Data save complete...
so the hash isn't being created twice I think
fair, but if you have multiple triggers or ways to change task, then it would be beneficial to have one place to react to it, e.g. event handler
if you really want to do it that way, you know you can create your own event handlers right?
can you even use multiple triggers at once for a task? 
thats what a scripted event handler or a CBA event handler is for. making custom events
I do have this solution with scripted event handler, but would like something native, on engine level
use publicVariable EH too
just use task module's
maybe it's updated by a network msg somehow
You don't even really need to make a scripted EH for this. You can make a function and call that every time you do a task change. One line of code in the task change code.
- got this problem, that I cannot detect changes after task is completed. E.g. scenario that task is "success" and I will change task to "cancelled"
was that meant for me? or for a different message?
yeah
discord failed to make the reply it seems 🥲
oh no it is a reply 😓
you confused me for a sec 
yeah, but we were also talking about CBA events which use publicVariable events as well. so didn't know who you were referring to
but you say "I will change to canceled", so you know where you're doing it
Well, whenever you change the task to cancelled, just add a second line that calls your function or EH.
hmm, so wrapper for bis functions, that would work, just pain
no, just put your code after calling BIS_fnc_taskSetState
well easier to "connect" to BIS function, than rewrite every execution of tasks change in mission ( e.g. hundreds of condtions )
I said same thing
you said wrapper for BIS fnc
it's not the same thing
All that being said, since BIS functions are functions, it is within the realm of possibility that they could be updated to add a built-in scripted EH call. Such things do exist for other BIS functions, and SQF changes do happen. You may as well make an FT ticket for it.
it is, when you do TAG_fnc_taskSetState = { params, call BIS_fnc_setState, call scripted event }; , its a wrapper
thank you, somebody understands
I didn't say anything about a wrapper.
I said:
call setTask;
call fnc;
i thought wrapper was a guy that did dance music lol he he
easier just refactor the way I said, CTRL + F replace in code
I don't care what's easier or not and that's not the point
same thing, but you do you
When I said "make a function" I didn't mean a function to contain everything (although you can do that if it's convenient), I meant you could use a function to call your event instead of bothering with a scripted EH. Though it doesn't matter that much.
i think this is because of the pause on the modules such as:
waitUntil { (missionNamespace getVariable [QEGVAR(game,game_state), -1]) >= GAME_STATE_INIT };
that wait could be different between modules depending on init bog
I think what I'm going to do it go back to the way I had when I first started, which was make the modules add the data to an array to process, then after init, those arrays are processed to build the game data. almost like forcing the init order. instead of calling the functions directly
oh yeah that could be it if you have 2 spawns at once
its so annoying that the initialisation order changes with SP & MP
if you think that's annoying try getting a 2" ball into a 4-1/4" cup from 485 yrds
if you're on profiling or dev branch, try stable too
maybe there's something wrong with Dedmen's new networking improvements
yeah let me swap back to stable
nope didn't work.
I am getting a bunch of:
23:47:44 Server: Object 2:1568 not found (message Type_114)
23:47:44 Server: Object 2:1567 not found (message Type_110)
// about 25 lines total
between the logs of the carriers being added
but I do have a lot of local only objects
so I removed the hash from the main initGame.sqf and made it locally:
LOG_1("Carriers Pre: %1",missionNamespace getVariable [ARR_2(QGVAR(carriers), createHashMap)]);
private _carriers = missionNamespace getVariable [QGVAR(carriers), createHashMap];
_carriers set [_side, _carrier];
missionNamespace setVariable [QGVAR(carriers), _carriers, true];
LOG_1("Carriers Post: %1",missionNamespace getVariable [ARR_2(QGVAR(carriers), createHashMap)]);
// DEDI
23:54:32 [CARRIERSTRIKE] (game) LOG: Carriers Pre: []
23:54:32 [CARRIERSTRIKE] (game) LOG: Carriers Post: [[WEST,233df3b7580# 626946: carrier_01_hull_base_f.p3d Land_Carrier_01_base_F]]
23:54:32 [CARRIERSTRIKE] (game) LOG: Carriers Pre: [[WEST,233df3b7580# 626946: carrier_01_hull_base_f.p3d Land_Carrier_01_base_F]]
23:54:32 [CARRIERSTRIKE] (game) LOG: Carriers Post: [[WEST,233df3b7580# 626946: carrier_01_hull_base_f.p3d Land_Carrier_01_base_F],[EAST,233e0279600# 627667: carrier_01_hull_base_f.p3d Land_Carrier_01_base_F]]
so now its working... but I'm pretty sure that the initGame.sqf version wasn't being called more than once. Maybe something was happening during the transit of the variables over the network for the large set of data
should i post my issue 2x if i did not get help ?
I bet the 3rd time you will get 🥁 😀
o i C
lol
Hello All: i was reading up there lastnight and i'm not sure i understand,
i made a Steal the car mission,
And when you take Car1 its called, witch is a opfor car,
Some Opfor choppers = O_Heli_Light_02_F come after me but they don't seem to Attack me that much,
How can i get Chopper1 and Chopper2 and Chopper3 to Attack me Better
chopper AI is wonky. you need to make sure the chopper knows you are there. use reveal, but even still, they might only attack on certain runs. a better way to do this if you are going for cinematics, is to use unitPlay with fire data as well and make the gettaway car unitPlay data as well. You can then have them sit in the back and shoot out
AI aircraft are generally not super good at using fixed weapons against ground targets. They have difficulty lining up.
reveal is definitely the best way to get them to try it though - you can use it to give them perfect information about your position, which they will act on but struggle to actually obtain on their own.
i see thx guys
them wonky ai choppers lol
man, one time they shot the shit out of me, and the next time they just fly by, lol
i made it a long drive to get to the commander so i give the choppers a good chance
thx for the info guys !
someone can help me ? I want scripts for play with friend in Arma 3 to use UGV load injured player
I want to control the UGV and make it able to load injured.
AFAIK there aren't such unguided bombs in Arma 2, otherwise this would be perfect
is there a get equivalent for setVehicleAmmo ?
maybe https://community.bistudio.com/wiki/ammo, not sure
there are tons of commands like this in https://community.bistudio.com/wiki/Category:Command_Group:_Turrets . i think we need an expert here 😬
omg i love the Block thingy on Discord, its so Awsome, i love this program
@pallid palm AI attack helis are mostly useless unless they have guided missiles or a ball turret. Occasionally they'll land a rocket volley. Fixed guns either miss by miles or more often don't shoot at all.
Use a Kajman or the proper NATO attack heli if you want to die.
@granite sky well i did what them guys told me and holy shit, them choppers shot the hell out of me, in the enemy car, it was Awsome its working Awsome now thx m8
You can also use a fired event handler to veer the shots away from the car if you want to do it for cinematics without slaying the player
no no its working really good, from what them Awsome guys, told me, its Awsome
as a matter of fact i don't think i can even make it to the commander unless i drive like a zig zag them choppers are Awsome
talk about explotions all around me holy shit WOW
oh yeah, if you want them to miss then the light attack helis are fine.
{
_x forgetTarget Car1;
_x reveal [Car1, 4];
} forEach units _grp;
this did the trick
now they don't miss lol holy shit
i use that code in a Attack chopper script i made and WOW them choppers are good now
i got KIA every time
now i think i must make the drive way shorter just so i have a chance to make it to the commander lol
all from Awsome help from you great guys in Discord
i love you guys WooHoo Arma 3
now im kinda scard to play that mission lol
just think, you take the car and you think oh yeah i got it woohoo and then caboom all around you lol Awsome just Awsome
i think i'm going to add 1 more chopper then there will be 3 choppers lol
you can stop the car and shoot the choppers down, but if the car gets destroyed then is a mission failure
hey guys, im making a display for a small HUD type dialog however depending on what resolution i build the display affects other resolutions. does anyone know how to make the dialog adapt to the display resolution / ratio?
the choppers keep respawning too so well you know
10 player mission
^ thats the same dialog on 2 diff ratios / resolutions
chopper AI are not wonky anymore woohoo WOW
the 1st time i played the mission after the fix i was like omg holy shit Look out WOW
then the Taps music was playing lol
i don't think the mission can be Won with only 1 player now, We need Team Work Woohoo.
all my missions are based off of Team Work
respawn Options are
"infinite Respawns",
"No Respawn",
"5 Total Respawns",
"10 Total Respawns",
"Team Respawn"
Okay
thx for the ok m8 !
Yo, possible to get all players joining in zeus gamemaster 48+2 to spawn in as nato? i've gota script but it kicks me. thanks
!code
```sqf
// your code here
hint "good!";
```
↓
// your code here
hint "good!";
please help… I need a trigger that can activate if any opfor soldie shoot..
You should set a global var in https://community.bistudio.com/wiki/Arma_3:_Event_Handlers#Fired event handler, and then check it in your trigger.
Hey folks, is there any way to get configSourceAddonList to return all the class entries in CfgPatches? Trying to allocate all loaded addons to a game master.
activatedAddons works only in multiplayer, so when singleplayer testing it screws up the module
What do you mean by "all the class entries in CfgPatches"?
If you mean literally everything, just use configClasses
Unfortunately it just returns the config path and not the config class
Is there no way to get the state of disableMapIndicators ?
Works like a charm, once again, cheers Dart :)
[difficultyOption "mapContentFriendly", difficultyOption "mapContentEnemy", difficultyOption "mapContentMines", difficultyOption "tacticalPing"]
But is this from difficulty settings? Or not?
Could you check please? Turn on in difficulty settings, for example, tactical ping, turn it off using disableMapIndicators, and check what returns difficultyOption "tacticalPing".
hey guys, I've made myself a respawn point using a user texture with the following code in it's init as per the wiki:
if (isServer) then { ship_spawnpoint = [BLUFOR, getPosATL this, "My West Respawn"] call BIS_fnc_addRespawnPosition; deleteVehicle this; }
It works great when I use "run in MP" in eden, but when I run it on the dedicated it exhibits some interesting behavior. On dedicated MP it'll make the spawn point, but it won't give the spawn point a name, and will merely do the "X of Y" naming of a respawn point without a name value.
More importantly, attempts to use BIS_fnc_removeRespawnPosition in triggers will fail to remove the spawn point while running on the dedicated server via ship_spawn call BIS_fnc_removeRespawnPosition;
does anyone have any ideas? I've tried setting the trigger to execute only on the server, I've tried having it detect bluefor with the condition this && player in thisList
do you have to use a texture ?
the interesting thing is that I have a dynamic spawn point on the map that executes with
sh call BIS_fnc_removeRespawnPosition; sh = [west,sh01_3,"Safe House"] call BIS_fnc_addRespawnPosition;
but it put the name of "my west respawn" on the dynamic point and not the first point I have set
no, only using it because it's invisible
however, the behavior is the same if I put that spawn code in a trigger
markers can be invisible too
(minus the deletevehicle ofc)
the spawn is 7250m in the air
orbital drop
rgr
i see wow thats high, but i guess if youre sim-ing ET
doing a set of missions involving orbital dropping onto a hostile planet
i see looks cool
so you need something invisible up there hmmmm
Does hint show the message?
yeah i never had anything that high i'm not sure how to help m8
that one doesn't. Originally I was using the trigger to handle drop music to also remove the spawn
can you script a marker to be that high
I added that "if not present" to try and see if it would work, but it doesn't look like it
hint doesn't execute
the music one executes, but the problem is that it doesn't seem to work on dedicated
hmmm interesting
everything works in eden MP
but things like syncing a trigger to an eden infantry respawn module isn't working on the dedi server
Only music plays but the respawn position isn't deleted?
mhm
I have to execute globally on the debug console, and that only seems to half work
it probably doesn't help that my mission file is 25mb
What do you want? For the music to play for the player who entered the trigger and for the respawn position to be deleted?
yep
the ship is only to be accessible while they're on it and building their kits
once they drop, the ship is no longer accessible and they respawn on their medics and team leader + any safe house they can find
part of the problem is that the music is set to be local to each player
each player has their own independant fnc_jukebox instance to give them dynamic music
Then change:
- "Activation" to "None".
- "Condition" to
player inArea thisTrigger
- "On deact." to
{
ship_spawnpoint call BIS_fnc_removeRespawnPosition;
} remoteExec ["call", 2];
I put that code in "on deact," but it's still doing the bugs
"E of Zdrma" needs to be "Eyes Wide Open," and "Eyes Wide Open" needs to be "Safe House"
"E of Zdrma" also needs to be removed, and hasn't been
the code did execute tho
Unfortunately, I can't help here. Most likely, there is some kind of bug.
Does the trigger work as you need?
everything else on the trigger worked
and when I use the debug console global exec does remove the ship spawn point
With my suggestions for the trigger settings, has the respawn position been deleted?
this will execute, but it doesn't remove the spawn point
That's strange.
Unfortunately I'm on a computer that doesn't have the game installed, so I can't check.
I'm going to try remoteexec with 0 instead of 2
force it global instead of keep it on the server
I have another solution:
- Add this line after setting
ship_spawnpoint:
publicVariable "ship_spawnpoint";
- Revert the trigger "On deact." field value.
still no work
set to global doesn't work either
// if (isServer) then {
// Move current players
{
if (isPlayer _x && side _x != west) then {
private _grp = createGroup west;
[_x] joinSilent _grp;
systemChat format ["%1 was moved to BLUFOR.", name _x];
};
} forEach allPlayers;
// Handle future JIP players
addMissionEventHandler ["PlayerConnected", {
params ["_id", "_uid", "_name", "_jip", "_owner"];
["", {
waitUntil { !isNull player && isPlayer player && side player != west };
private _grp = createGroup west;
[player] joinSilent _grp;
systemChat format ["%1 was moved to BLUFOR (JIP).", name player];
}] remoteExec ["spawn", _owner];
}];
};
hint "good!";
fount it out
Just curious: i was told side group unit is "better" than side unit, anyone know why?
A unit's side will change depending on relation, i.e. it might be "renegade"(?) sideEnemy if they kill a bunch of friendlies
Some other cases like that
From wiki:
Returns the side of a unit, vehicle, object or location.
side of a renegade soldier is sideEnemy side of an empty vehicle is civilian side of a crewed vehicle is, if present, commander's > gunner's > driver's or > cargo's side, in this order side of a captive or dead unit is civilian. Use side group _unit to get the underlying side (see Example 2) you can use playerSide to know the real player's side
Ahh now i remember that yeah, thanks
Hey, had yet another question, hopefully the last for quite a while.
How does one go about showing subtitles (BIS_fnc_showSubtitles) over cinematic bars?
The weirdest bit is that it seems to work fine if the black bars are created in init.sqf and the dialog via trigger, but it stops working when using a script other than init
Kind of a related question then: should i do
side group _x == east && vehicle _x isKindOf "Air" && alive _x
};``` or
``` private _airAssets = units opfor select {
vehicle _x isKindOf "Air" && alive _x
};```
Second is less commands, which is usually faster
You can check with debug console though, there should be a code performance button which runs the code X times and averages how long it took per time
Oh there is! For the record the second one is over twice as fast, at least on the performance intensive mission im running right now
Thats actually a very cool feature
In terms of speed, aside from the number of commands, you can consider the number of items you're having to iterate over.
allUnits select { ... } is checking that condition for every unit that exists. That condition also has to have 3 parts, because it has to have a side check as well.
units opfor select { ... } only has to iterate over OPFOR units. Its condition is simpler, as well.
If you have 50 OPFOR units and 50 BLUFOR units in the game, the second option only has to iterate over half as many items.
However, because of units changing their apparent side under certain conditions (like being incapacitated or captive), the second one is a little less robust. If you aren't concerned about that, then it doesn't matter, but if you need to also detect units that are in these side-shifted states but originally belonged to this side, then the first option may be your only choice.
I see. Here's something else ive got going on that's weird. Here is a function called fn_isDebug:
private _debug = false;
if (_debugNum == 1) then {
_debug = true;
};
_debug;```
when I run ```MORK_fnc_isDebug;``` in console it returns some junk about isNIl random whatever, but when I run the code of the function it returns true, which is correct. Why is it doing this? I have other functions working so i dont think its a description.ext problem
Nevermind its because the function has to be called or spawned
If you type the name of a function then it'll return that function. A function in SQF is just a variable pointing to a code block.
Anyone know of a way to return an attachment position relative to the weapon/player? ex proxy:\a3\data_f\proxies\weapon_slots\side.001"
selectionPosition
From what I've found with testing, you can't select the weapon of a player normally.
Using cursorObject to get the weapon itself, it will return NOID mx.p3d for example, but every selectionPosition will return at [0,0,0]
I see the point
There is very scripted workaround
createSimpleObject the weapon and selectionPosition it
like this
Definitely saving that, much appreciated guys
any way to make a unit invisible but still able to take damage (hideObject makes it impervious to bullets)?
no, but you can make an invisible unit yourself (invisible = no resolution and shadow LOD) based on the A3 sample's soldier model
the game does have many invisible soldiers itself but iirc they also don't have fire geometry
I believe you can if its a VR soldier, as they can be made invisible via setObjectTexture, like this:
private _grp = createGroup east; private _ai = _grp createUnit ["C_Soldier_VR_F", [0,0,0], [], 0, "FORM"]; for "_i" from 0 to 5 do {_ai setObjectTextureGlobal [_i,""];_ai setObjectMaterialGlobal [_i,""];};
This is how I create invisible targets that AI will always target and shoot (like for hunting animals, I attach the VR dude to the animal)
they still have shadows tho don't they?
That is true, which blows.
I make them crouch when attaching so not that noticeable, and only attached for when I actually want some AI to target them.
why don't you use CBA invisible targets? (if you use CBA)
Cuz I was unaware!
I don't like the vanilla invisible targets because they stop bullets and make a metallic sound when hit. Do CBA targets do that?
they're probably better for what you're doing because CBA targets are tanks, but what you're using are soldiers with many bones + AI (bad for perf)
no iirc
I'll check it out thanks.
@little raptor have you ever experimented with being able to control/move AI units by playing animations? i have a script that lets me move/control any AI similar to the direct control mode in men of war if youve ever played it, except the movement gets stuck near objects, bodies, walls, in buildings, etc, not sure if youve ever experimented with this and found a solution
https://streamable.com/6jleh7
yes. to avoid that use disableAI "MOVE"
and don't use setVelocity on the units
Anything on this?
it's related to cutRsc layers. you can't fix it afaik (apart from what you said)
you can however create our own subtitle system (too much effort) or maybe the cinematic function
Bugger.~~ How would one go about creating their own subtitle system? It's only 5 lines, so I'm willing to do it if there is no other solution~~ nvm found it
hello all: i was woundering is there a way to Attach a flashLight to "arifle_SDAR_F"
No
there is flashlights in vanilla arma
Doesn't fit on the SDAR, it only has a top rail
No it doesn't have a top rail even
ah ic. wasnt sure if he knew there was flashlights at all
it does no?
Never does unless you mean a Mod
how do you turn on the light anyways? xp
with "top rail" i meant a physical top rail, but it only has an optic slot yes
No, it doesn't have optic slot
🤯
It doesn't have any slot
right
damn, i swear i remembered it with a top rail
nope no rail on the "arifle_SDAR_F"
it looks like theres a rail there but theres not
i mean when your in game it looks like theres a rail there but theres not
@atomic niche maybe we can put a rail on the side or the top of the "arifle_SDAR_F" that would be cool
Shining flashlight underwater would've been super cool
yes that works
if your gun has a rail and you go under water you can have a flashlight on it and the light works
but you can't fire unless the gun is a "arifle_SDAR_F"
i see some switch guns under water back and forth to get the light on it
like you can do a ammo box under water with a addAction in it, with diff Loadouts
Apparently it has all the model stuff needed for a top rail, but it's not config'd with a slot. I think a mod could enable it, and there may be one that does
no mods for me i only use vanilla
but thx m8
maybe Mr @atomic niche will do a vanilla rail on the "arifle_SDAR_F" woohoo
@proven charm
_x addPrimaryWeaponItem "acc_flashlight";
_x enableGunLights "forceOn";
is there a way to give an object a highlighted look, kinda like an outline on the object
if a 3d marker/draw is enough for you, you can try draw3d command
like so
Object outlines aren't really possible in scripting. Drawing lines at arbitrary screen coordinates is easy, but detecting where those coordinates should be to draw an outline is pretty much impossible.
You could draw an object's bounding box reasonably easily (like when an object is selected in Zeus or the Editor) but a detailed camera-relative outline isn't really practical.
An extension could possibly do it as a post-process effect. But that's an entirely different can of worms.
thx!
hmm, a box around units would prob look alot worse than a single small box on the center
isnt there new direct-3D interface that you can use for stuff like this?
For extensions, not through scripting only
right
Depending on how arcadey you want to get, you could try changing the object's texture to a nice bright flat colour
Shining a light on it could also produce an acceptable effect
I was thinking about attaching a unit thats scaled up by like 1.1 to the object at first lmao
Definitely, I will learn 3d modeling right now just to add a rail to the sdar 
It only took me like 20 hours from zero blender to stick a toilet paper tube on top fo the sample sight model. It'll be a cinch!
@atomic niche Awsome cool m8 Awsome
how do you define keybinds that have multiple buttons? i have { DIK_RCONTROL + DIK_M } but it results to "End" in arma
you mean in a script or in the settings
script or config actually , in the key Mappings
i just do it in the settings
yea this is like for the settings
oh yeah you can have like 5 keys on 1 control
yup
My very limited knowledge of blender extends to "borrowing" BI A3 models and fixing them up a little bit to 3d print 😂
aka messing around fixing non-manifold edges and deleting interiors until its sortof good enough
funnily enough we actually have the T-140K on printables https://www.printables.com/model/334365-t-140-angara-arma-3
red means conflict 
no no its ok, it does not mean that
its just telling you, you have some more keys on that control.
like i have at least 20 red collor controls in my settings for years
Can anyone help me fix this? Game won' t launch. Was working fine before
#arma3_troubleshooting / #linux_mac_branch for more specific help
There is a rail in the model, it's just not used in the vanilla game
You don't have to ping people all the time
copy that, sorry about that
got a problem in my project, curious if anyone has tips:
in editor i placed a unit, in unit init i call a script that runs on the unit, that script does an execVM to run a script inside the mission folder, but no matter what i try i get "not found" even though the path is 100% correct
maybe you need \ instead / ?
yes that was it, thanks
Heyo boys, got a troublesome one.
Started a new Dedicated server using FASTER and I'm using Extended Debug console to check test some scripts in game with a friend.
I can "watch" values but I can't execute commands to check for them, or execute code.
That goes for Server, Global, and Local exec.
Get Advanced Debug Tools instead, it's better.
Dunno why that one wouldn't work though. Looks like it's the same one we integrated with Antistasi.
ah yeah, I suck at names.
No worries haha
What's really weird is that I can force code to execute by putting it in the "Watch" section lmao
Host shouldn't matter. It's just a UI that runs remoteExecs.
@tough abyss Could you somehow explain to me what that code does? (I'm not new to scripting but still am Limited in my ability to understand some codes. E.g. I still nt understand what "select" and the 0,5 means xD)
[1,2,3,4,5] select [1,3]
-> [2,3,4]
I think you can figure it out.
[1,2,3] = [select 0, select 1, select 2]
^ what?
[1,2,3] select 0 = 1
[1,2,3] select 1 = 2
[1,2,3] select 3 = 2
[1,2,3] select 4 = Error 😄
Ah, missrad
Okay in your explanation I understand it, but in the practical use (like in the code @tough abyss send me, or that is used in many scripts) I don't really get what its doing. (E.g. "_obj = _x select 0;", "_target = _x select 1;" and "_specIndex = _x select 2;" from CHSA)
i can't tell, witch one of them Animations, is the Reload Animation
Use animationState and gestureState to find out.
umm i'm not sure what that means i'm new to Animations
i tryed using the animation viewer but i just can't tell witch one is the reload Animation
i'll keep looking
you would think they would have a list saying this is the Reload Animation
animationState returns the current animation of a unit. So you can just hint it in a loop and then reload.
oh ok i see let me try that
Reloading might be a gesture rather than animation. I wouldn't know.
oh noo lol
well i have my script working ,with out the reload animation for now, till i figure it out later, i'll get right i just know i will
i just call it Slient Reload for now lol lol 🙂
see i came up with the idea to remove a mag from the player and add the same mag back so i don't have to repack my mags
works Awsome i just want the reload animation or whatever it is to play as it happends
The wiki says for is much faster than forEach, example:
private _array = allUnits;
for "_i" from 0 to count _array -1 do { private _x = array select _i; _x setDamage 0 }; // 0.107 ms
{ _x setDamage 0 } forEach _array; // 0.0770 ms
is this still true?
yes
So then forEach should be replaced with this format of for. good to know, my mission has a lot of functions with forEach allUnits or large arrays of objects in general
forEach is faster
well I didn't read your post properly either. I thought you asked if forEach is faster and if what wiki said is still true
So then the wiki is wrong? It says for is faster but provides contrary examples
you sure? it says forEach is faster as far as I remember (which is correct)
and this also says that
Alright then
it even shows that in its timings, but still says for is faster 😅
it's not a lie. maybe a typo
thats what i mean :P
or maybe whoever wrote it was talking about plain for (which has nothing to do with arrays)
since functions pre compile code, is there any use to ever using execVM
not really. except if you're lazy and don't care about performance
darnit nothing will show me the reload Animation for the mxm
i mean the syntax
oh shit w8 a sec i know what to do woohoo, oh hell yeah i got it yeah woohoo Arma 3 hell yeah, works Awsome now just as i wanted ```sqf
if (needReload player == 1) then { reload player };
The wiki also says declaring private variables in loops outside of them is faster, which i understand, but does that mean that EVERY private variable I use in a loop should be declared outside of it? The example it provides is
private ["_a", "_b", "_c", "_d"];
for "_i" from 1 to 10 do
{
_a = 1; _b = 2; _c = 3; _d = 4;
};
// 0.0195 ms
for "_i" from 1 to 10 do
{
private _a = 1; private _b = 2; private _c = 3; private _d = 4;
};
// 0.0235 ms
``` , and ill do the first example for better performance but ive never seen it done in any script before
It defines variables. The better way to do it is to use params now though.
_x params ["_obj", "_target", "_specIndex"];
It's a perf vs readability tradeoff. Declaring a variable isn't super expensive.
I do it in a handful of loops. Not worth it anywhere else.
The page is partially out of date as it's missing any mention of inAreaArray or simpleVM.
The former's extremely powerful for various 2d searches. The latter means that most short code loops are far quicker than longer code loops.
so for example _array select { conditionA } select { conditionB} is often much quicker than _array select { conditionA and { condition B } }
And manipulations that require transforming arrays with simple apply code become a lot more useful.
TIL, i have a few chained conditions where that might be beneficial
yes me too woohoo
in my chopper scripts
and my LabTop script also
@granite sky thx for putting me in the right direction
no I'm sure this is wrong
private _var = has the same perf as _var =. in fact the first one is most likely slower because it also creates an array
and also, without private the game will have to keep going up the scope tree to find where a var is defined
so the only reason to ever put private outside the loop is if you need it outside the loop
also I forgot to say that you can measure the perf yourself. just press the speedometer button
(don't use it with codes that spawn something tho, because you'll get thousands of spawned code)
Not if _var already exists in the scope.
Creating a new variable in a scope has an additional cost, which is why pre-declaring is faster.
tested this on three of my loops:
- iterating over
vehiclesof 17 elements, five conditions
- 0.0433ms => 0.0317ms
- iterating over
groups opfor + groups independentof ~80 elements, 13 conditions
- 0.3131ms => 0.2210ms
- iterating over
allUnitsof 638 elements, 10 conditions
- 1.0330ms => 0.5897ms
- 0.4265ms if i reorder some conditions as well
i also get a big readability bonus, so i'll take this even if it wasn't faster
I think it's correct if you take into account the "if _x is not required" part. Compare the second type of for shown there (0.0170ms) with the equivalent first type of forEach shown there (0.0250ms). When you add in needing to operate on the array elements, then forEach becomes faster.
It just needs a little bit of rewriting to make it more clear what it means. Moving "if _x is not required" to the start of the sentence would probably help a lot.
Heya all! just a quick thing hopefully, I'm trying to give my players 'voicelines' to say with addAction, but I keep getting given an 'undefined variable: this' when using the action. 'this' obviously works for the action, but not for the say3D source. Any thoughts?
this addAction
[
"Hurrdurrdurr",
{
this say3D "placeholder.ogg";
},
nil,
1.5,
false,
true,
"",
"true",
-1,
true,
"",
""
];```
Edit: just confirmed that naming the object/player and using that as the source works as well
this is local variable (despite having no _) and only exists within "Init" field context. Actions create brand new context and local variables from other contexts are not available there.
addAction context has its own _this which include a lot of stuff in it
Could I do 'this = source' in my init field then put 'source' in the say3D field?
Parameters array passed to the script upon activation in _this variable is:
params ["_target", "_caller", "_actionId", "_arguments"];
_this is array of 4 items above
hmm well I tried putting _caller in the field as well, same problem
You probably didn't do params ["_target", "_caller", "_actionId", "_arguments"]; to use _caller
right yes! need to put that before hand. I'll try that now
params ["_target", "_caller", "_actionId", "_arguments"];
_caller say3D "placeholder.ogg";
```or just
```sqf
(_this select 1) say3D "placeholder.ogg";
```if you don't want to unpack `_this` into local variables
same thing
It seems to be solved! Just need to have fun adding them to CfgSounds now. Thank you!
Also I think say3D is local so only client pressing the action will hear the sound
params ["_target", "_caller", "_actionId", "_arguments"];
[_caller, "placeholder.ogg"] remoteExecCall ["say3D", 0];
Or that too, easy! Thanks Sa!
I think I remember you from my scripting adventures at least a year ago now, you help ALOT!
just got around to using this, thanks! im assuming its not possible to fix that with this you can move through objects and walls?
Just making sure, there is supposed to be a ; after the firstline, it just slipped your mind?
Yeah there is, I just copied the line from the wiki
and somehow missed ; lol
setVelocity can partially "fix" it
but it causes its own problems
which is why I said it's irrelevant for arrays
why would you iterate over an array if you don't need x?
well in this case yeah, since it's a loop
Fun fact, even if you don't use _x, forEach is still faster :P
anyone know how to define key mapping that have multiple keys? (in CfgDefaultKeysPresets) . i tried { DIK_RCONTROL + DIK_M } but it results to "end" key
that's the wiki i have been looking when trying to figure this out. I tried { "0x9D + 0x32" } but that also doesnt work.
DIK_RControl seems weird
Nevermind. I was thinking of INPUT_CTRL_OFFSET but that allows both ctrl keys.
if you read the whole sentence
wow that stuff is cool
If you need to do something based on the number of items in the array, it can seem like the most convenient and natural approach. Using forEach technically does what you need and is more compact than counting and using for. If you don't already perfectly understand the way SQF performance works (hence why you're reading that page), it's an easy "trap" to fall for.
Like, let's say you want to add 5 magazines to a box for each player in the game. Well hey, that sentence had "for each" in it, didn't it? And you can use forEach to do that, quite easily. A newer scripter who doesn't really know the detailed background of the different commands is probably not going to think any further than that. Until they read a code optimisation guide that explains it to them...
And then there's this intriguing claim. The performance numbers on the wiki examples don't seem to match that, has something changed since it was written?
Hey just asking is there a way to force snow to replace rain? I just wanna set it up for a mission as my players are going to be in Mountainous Afghanistan and I have all the weather timings set up I just need it to snow
I did find a script but it forces snow on the get-go and was just wondering if there was a simple script to just change rain to snow and have it gradually come in like rain does on overcast
You can use syntax 2 of setRain to set advanced rain parameters, including whether to use snow instead of rain. The command can be run at any time during the mission. You can then use the first syntax to change the rain density over time as normal.
The one thing you can't do is interpolate between rain and snow. It is either rain or snow; the particle type change can only be instant. If you need a smooth transition, you'll have to gradually stop the rain, change the particle type to snow, and then gradually start the rain again.
i thought it was saying its faster all the time, and recommended just if _x is not needed
I will clarify the sentence then - thanks for the feedback 🙂
done
Another feedback for https://community.bistudio.com/wiki/getSensorThreats
The last return value from the main array "sensor", returns an array not a string directly, e.g: ["radar"] not "radar" like it shows in the example # 1.
Should be like what's in https://community.bistudio.com/wiki/getSensorTargets
(fo'eal?)
let me double check it
getSensorThreats cas2;
// [[O Alpha 1-2:1,"locked",["radar"]]]
// [[620777: missile_sam_04_fly_f.p3d ammo_Missile_s750,"missile",["radar","missile"]]
How do i avoid nesting lots of if statements in a while loop? If i use exitWith it exits the while loop as well, right? But i need the loop running the whole time
sounds like a structure issue - what are you doing?
exitWith exits only the current scope
For some reason i cant send files right now: https://pastebin.com/HiYAPjcA
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.
I would write a function? 😄
It is a function, like functions for the things in this code?
Ah i see some ways to improve it
please guys I have 5 days trying to make a trigger that activate if opfor firing in the trigger area , I really need this
I already provided a possible solution.
yes I saw it sir but i dont have any idea in promation please can you give me more explication
i ve tryed anything but it doesn work , please sr i would apreciate more explication or a picture
What did you tried?
there's a bunch of tutorials in YouTube for triggers if you really have no idea at all how to work with them, go there first, then if you really need help, you come back
can you send me the link of the video please
"arma 3 triggers tutorial" 
You just want to detect if a opfor soldier fired, right? Schatten already provided you with a possible solution by using "Fired" event handler I think. Did you check what he sent to you?
@haughty linden
oh okay… i ll check it. thanks
this addEventHandler ["Fired", {
params ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile", "_gunner"];
}];
if i must us this in the soldier init what should i put in the trigger
soldier's init, but like Schatten said, you need to create a global variable so you can use in the condition of the trigger you want to activate
So your soldier is placed in editor? Only one soldier?
multiple unit
Are they all AI? Are they in the same group?
yes they are ai but different group
Is your mission for single player?
important question
player should rescue a hostage in area but if the soldier that infront of ther hostage hear any shotgun.
he should kill the hostage
yes for single player
the only thing that i dont have is the trrigger that should be activate if any opfor unite open fire.
OK, try this:
- Place in init.sqf:
{
_x addEventHandler [
"Fired",
{
params ["_unit"];
firedOpforUnit = _unit;
}
];
} forEach (units opfor);
- Trigger condition:
_unit = missionNamespace getVariable ["firedOpforUnit", objNull];
!(isNull _unit) and { _unit inArea thisTrigger }
Does anyone else have a problem with planes spawned by BIS_fnc_spawnVehicle starting at the right position but then immediately descending almost to the ground?
thank you so much sir but in the trigger it says : local variable in global space
Screenshot?
Remove ";" at the end.
in this case isn't better to remove the event handler once it fires?
I think it doesn't make much sense because it's added to group of units, not to a single unit. I would make trigger non repeatable.
I did but it keep saying “ local variable in global space
yeah its non repeatable cause whe the soldier hear shot fire on trigger activation the hostage wil setcaptive false this will allow the soldier to shoot him.
Strange, another my condition with a local variable worked fine: #arma3_editor message
Did you place all my condition to the field?
yes sir
OK, try this:
!(isNil "firedOpforUnit") and { !(isNull firedOpforUnit) } and { firedOpforUnit inArea thisTrigger }
where
The same field.
in the trigger sir ?
Yes.
sorry sir
There is "Copy" button, so just copy and paste, not type by hands.
Show what you did.
And? That's it?
yes sir with the init.sqf as you said
What's in init.sqf?
And you didn't add anything in "On activation" field. What should happen on trigger activation?
h1 setcaptive true;
h1 is the bluefor hostage name
perhaps i must sent you the mission
I don't have the game installed on my computer.
Make sure that event handlers and trigger fire.
ok i ll try , thanks for all
What's the file name in, for example, Explorer?
its a carpet with a mission sqf and a rehen,sqf file
and a init sqf file
in malden map with rhs usa mods
I don't see my code in init.sqf.
i was using a sample before puting it in the mission
i use to use a simple scenario with 2 soldier befor using it in the reel mission, it would take too much time to chek it
the problem is; i dont know scripting and im learning just for arma 3;
can you fix it in the mission file and sen it to me please 🙌
Well, that's a good starting point.
There is a trigger in the mission location center that is connected to several flares, when the opfor that is in the room hears shots from the opfor, he will kill the hostage that is in front of him.
continue is pretty useful for reducing indentation.
Is is possible to read or modify the Mission statistics on the map screen?
Any way to place mines on bridge, instead under it ?
using
private _pos = [ [ _marker ], [ "water" ] ] call BIS_fnc_randomPos;
_mine setPosATL _pos;
Getting the z-height of a bridge surface is a bit shaky because bridge objects are often incorrectly defined.
Worst case you can raycast the thing from above.
lineIntersectsSurfaces or whatever.
I think now, even the empty forEach should be faster.
Because forEach gets SimpleVM, while for doesn't
Could this be bugged , so that you cant have key combinations? i read from somewhere that some of this keybind stuff is newish
Excuse me for asking, but does anyone know where Leopard20 is? I noticed he's left the server and his workshop mods like Advanced Developer Tools are no longer available, which caught me by surprise when I had just installed it on my server last night and I'm now finding out that Steam silently uninstalled it from my launcher. Apologies if this isn't an appropriate place for this!
All his workshop mods disappeared, they are not on GitHub either, some of his GitHub repositories also disappeared. And he left Arma discord.
I would say.. expect it to not come back
I respect people wanting to take a step back from modding or the community etc. but I wish they wouldn't blow up everything they've ever released when they do it :U wouldn't hurt to leave stuff up after spending years getting people to rely on it
It's his decision and he has all the rights to do so.
I didn't say he couldn't. I'm not going to try to sue him over it. It's just a confusing decision to make.
It's not
Maybe he doesn't want to work on it anymore and also doesn't want it to get broken at some point.
And so the best solution to that is to simply erase absolutely everything, including one of the most relied-upon tools for modding and scripting, with no warning, no archives, no opportunity for anyone else to take over maintenance? I personally disagree, I think there were much more graceful options available. But again, I'm not going to try to chase him over it or anything. I hope he's okay.
Hopefully someone can make a replacement for the improved config and function viewers at least. Going back to the BI versions is going to be brutal.
What's the best solution, is for him to decide, he is the owner.
That's gonna make things quite difficult, are there any alternatives?
Dedmen has some debug tools, but haven't seen any other mods with an improved config viewer
Time to start working on ADT 2 I guess
I'm considering looking into making open source alternative but struggling with time, might end up on dead projects pile considering I barely do A3 stuff these times 🫠
What tool are you referring to, the one most used?
Advanced Developer Tools
Was also planning one making one, prs weclome
i'll contribute
We could consider hosting one under CBA or ACE maybe.
Community Developer Tools or smth
Would be nice
cba would be good because most people use it
I think they mean under the CBA name, not in CBA or ACE itself
Yes
They also left the arma discord, and told someone in ace to delete their reupload
They did not, the mod is gone, do not expect it to come back.
Won't and can't share more.
that sounds like a falling out
I'll probably start on one under me, can move it to CBA / ACE org if desired
We can organize on ACE Discord I guess. I'm happy to help/give blessing to get under GitHub org but my nearest free weekend to look more into it is in two weeks 🫠
does it delete their messages on discord? we were on a roll figuring out bounding box issues
CBA's organisation would be a sensible avenue to do it. It'd be preferable if that didn't lead to a CBA dependency though - no offense to CBA, but ADT being usable even while working on non-CBA missions was very helpful.
It does not
yeah i always had problems using macros with it
You'll have to search from:leopard20
Let me know if that happens, sounds interesting.
if you are lucky enough, you might able to find the mod on your local disk:
D:\Game\SteamLibrary\steamapps\common\Arma 3\2369477168
D:\Game\SteamLibrary\steamapps\workshop\content\107410\2369477168
F @Leopard20
@bitter heart <@&105621371547045888>
Time to ping that person whenever a mod's needed
Lol that used to be a spam/scam bot scheme, seems like we missed that one
huh?
bots named discord moderator with discord logo as avatar
I was pinging because of the name calling.
But you pinged a inactive scam bot account
uff
In the past typing '@@' brought up the moderator role
It does now too but immediately disappears
welp this sucks OOOOf
how will I run my skiptime 12 script now 
the same way? lol
ik its just I had a file saved just for that cause I got tired of typing it out
super duper lazy
make a mod for yourself, that binds the script to a key bind. embrace even more lazy
you also have 7erra's
2 scary
dang I wonder what I used before for config viewer
thats really the main thing cause base game one is a tad bit slow
Glad i recently updated my local dedicated test server with it, so i still have the last build 
Hmmm 🤔
7erra's config viewer is also very nice
I shall peep 🫡
Massive loss for the community, ADT were the best tools around
So if Leopard20 took down all of his stuff off of Steam Workshop, does that mean ADT is now technically abandonware?
Still can't reupload it, if that's what your question was gonna be
I wasn't going to ask that next question :P
Anyways, what I'm hearing is "yes, it is technically abandonware"? :P
I don't see any license on it, so the default legality is that you can continue using it if you have a copy, but you can't redistribute it.
W gatekeep
Rare Leopard20 L
Okay tested the things now. The real_date by KK does not work for me. The code from the BI wiki works kind of. It even sets the time while it somehow misses on the date. It gets day, month, hour and minute but the year is off. Right now the mission is set to 2013 and even with the script the mission stays at 2013. I'm mean its not the biggest of deals. I can adjust that but...its odd! xD
Hello guys, I have just came across this mod which claims to use visibility culling for building waypoints optimization. Do you know what exactly they meant by that and how it works? Thanks.
https://steamcommunity.com/sharedfiles/filedetails/?id=3341619606
Sounds like they're just not using the building waypoints that wouldn't be useful?
Custom waypoints sounds more interesting though.
Leopard20: he was a good guy, he helped me a lot, he will be missed
i wounder what happend
Yeah I only recently started using ADT and it's just poof gone
Wow. So sad to see Leopard20 go.
I have a script that I'm making and I don't understand why it doesn't work with JiP. I have code inside a remoteExec ["spawn", 0, true], but it doesn't activate for others in official public Zeus. Oddly, when I local host and connect to myself from a different instance, it does work.
I would think spawn is remoteExec blocked in public zeus.
Then how would I make it work?
You probably can't? Public zeus is probably quite limited in what global scripting you can do.
You'd have to ask the people who run the servers.
I mean official public Zeus. The weird thing is that the script works, but isn't JiP compatible. Would it just be doing call instead of spawn and ignoring sleep and stuff?
What's in your script? Maybe it executes too early for JIPs.
What do you mean?
If you do something that depends on fully loaded game it might not be loaded yet by the time JIP stuff executes
JIP functions execute very early in the client init order.
Just show your script
[[], {
while {sleep 0.5; handgunWeapon player == "hgun_esd_01_F"} do {
_antennas = handgunItems player;
if ("muzzle_antenna_01_f" in _antennas) then {
missionNamespace setVariable ["#EM_FMin", 78];
missionNamespace setVariable ["#EM_FMax", 89];
if ((missionNamespace getVariable "#EM_SelMax") - (missionNamespace getVariable "#EM_SelMin") != 1) then {
missionNamespace setVariable ["#EM_SelMin", 83];
missionNamespace setVariable ["#EM_SelMax", 84];
};
} else {
if ("muzzle_antenna_02_f" in _antennas) then {
missionNamespace setVariable ["#EM_FMin", 390];
missionNamespace setVariable ["#EM_FMax", 500];
if ((missionNamespace getVariable "#EM_SelMax") - (missionNamespace getVariable "#EM_SelMin") != 10) then {
missionNamespace setVariable ["#EM_SelMin", 440];
missionNamespace setVariable ["#EM_SelMax", 450];
};
} else {
if ("muzzle_antenna_03_f" in _antennas) then {
missionNamespace setVariable ["#EM_FMin", 432];
missionNamespace setVariable ["#EM_FMax", 434];
if ((missionNamespace getVariable "#EM_SelMax") - (missionNamespace getVariable "#EM_SelMin") != 2) then {
missionNamespace setVariable ["#EM_SelMin", 432];
missionNamespace setVariable ["#EM_SelMax", 434];
};
} else {
missionNamespace setVariable ["#EM_FMin", 0];
missionNamespace setVariable ["#EM_FMax", 0];
missionNamespace setVariable ["#EM_SelMin", 0];
missionNamespace setVariable ["#EM_SelMax", 0];
};
};
sleep 0.5;
};
};
}] remoteExec ["spawn", 0, true];
Your while loop ends as soon as player drops the spectrum device
Even with 0.5s sleep player might still not be loaded into the game during JIP so your loop ends and nothing happens
Then what should I do?
Why do you want your loop to end once player drops the spectrum device?
If they drop it and pick back up you'll no longer get your frequencies changing inside loop
I... uhhh... don't
while {sleep 0.5; true} do {
if(handgunWeapon player == "hgun_esd_01_F") then {
_antennas = handgunItems player;
//...conditions here...
};
};
I think it works now, thanks! ❤️
Is there a way to make the AI so skilled that it never misses its shots?
holy sheesh, advanced developer tools is gone
god bless local copies
I guess it's a matter of time now until a game update breaks it though
hope Leopard20 is ok, something must have happened to cause such a crashout
@haughty linden make your Game settings to expert and see what happends
How to open the rear door (ramp) on a (base game) chinook?
I've tried
chinook animate ["door_rear", 1];
chinook animate ["door_rt", 1];
chinook animate ["door_rb", 1];
chinook animate ["door_lt", 1];
chinook animate ["door_lb", 1];
chinook animate ["door_rear_hide", 1];
chinook animateDoor ["door_rear", 1];
chinook animateDoor ["door_rt", 1];
chinook animateDoor ["door_rb", 1];
chinook animateDoor ["door_lt", 1];
chinook animateDoor ["door_lb", 1];
chinook animateDoor ["door_rear_hide", 1];
And a couple of other things, too. Nothing seems to work at all.
animationNames chinook;
returns:
any fps friendly dust storm script? 🤔
What's the class name of it?
It's one of these, though I can't remember which:
cargoramp_open
Door_rear_source
Door_6_source
Door_1_source
https://github.com/DartsArmaMods/AimForTheBushes/blob/main/addons/common/CfgVehicles.hpp
Looks like it's been renamed by Aegis
but it's the base game twinrotor
I think it's Door_rear_source then, but you can try all of those
do I use animate or animateSource? I've only ever used animate
You legend this works perfectly. How did you find this animation?
Look at the AnimationSources class in the helicopter
Can that be done in-game or is it a case of pawing through the actual config files?
You can do it in-game, there's a config viewer tool
Thanks man I'll look into it, really appreciate the support 🩵
You can also look in the UserActions class, which is the script used by the scroll wheel action, and will tell you if it's animateDoor or what.
heyy whats wrong with the forums
under maintenance, as stated on the page that led you to ask this question
Yesss but it says "overwhelming spam", is this a reality? Or are you guys just making the forum sexier?
Never thought I'd see Arma forums get ddosed
Then it would probably say "we're making the forums sexier" 😂
not ddos, other spam issues
Fair enough 🤣, but you know, maybe that was the default manteinance screen and you guys didn't bother to change it.
taking a bit longer than we hoped but it'll be back at some point
Alright, thanks for info
hello @atomic niche how's the flashlight on the underwater gun going ?