#arma3_scripting
1 messages · Page 96 of 1
Does anyone have any experience using kb_fnc_kbTell in multiplayer? I've gotten it to work by getting the server to execute the function via remoteExec, but every time the conversation plays, the radio subtitles blaze on by and aren't done in time with the speech.
i'm trying to get the ils info for each ussr freedom that is placed in editor how would i do this?
I really suggest you read ALL of the ACE documentation. It changes too many things to not read it.
instead of remote executing kbTell, create a proper function that knows what to say according to parameters and remote execute that instead, its faster, easier and cleaner
Bet you're not spawning it.
[blahblahblah] spawn bis_fnc_kbtell
Make my own bis_fnc_kbTell?
I'm not sure how remoteExec looks on the other machines, but I thought bis_fnc_kbTell spawned internally
You can pull the code with function viewer and work from there.
BIS functions are often best used as example code.
Guess I know what I'm doing tonight.
Maybe I can fix it to where it reads textPlain from missionConfigFiles, too
Kb tell function works fine but takes a really strict config set up as well. Follow the conversation wiki guide to a T
And you don't have to remote execute it at all
Which might be your problem too. It does its own remoteexec internally
I’m sorry for interjecting, I have a small question. What is the difference between enableAI and enableAiFeature? :)
enableAIFeature's primary syntax is meant for working with only two particular AI features. I don't know what they do and it's probably not important - it's pretty niche.
enableAIFeature's alternative syntax does exactly the same stuff as enableAI and disableAI, except it's slightly more convenient to use in some cases, because it's one command with true/false to enable/disable, instead of having to use two separate commands.
Could anybody please tell me the appid for Tanoa/Apex? To check if somebody owns it using the 'getDLCs' command?
Enlist for active duty with Arma 3 Apex and be deployed to a brand new warzone. With its distinct geographical features, the South Pacific island archipelago of Tanoa introduces fresh opportunities for all types of combat operations. Engage in Arma 3’s tactical gameplay, where movement, shooting, and teamwork truly matter, and make use of new ve...
$24.99
2316
74
How do I start co10 escape with weapon. Spawning in escape with weapon instead of nothing. Can someone point me right direction? Is there a script I should put to into intplayerlocal.sqf or int.sqf? Please help, searched google for hours and can't figure it out.
player addWeapon "WEAPON_CLASS"; , and a bunch of addMagazine
addMagazines is fine
does aimedAtTarget only work for vehicles? what i'm trying to do is, when player's aiming a gun at someone, make them angry
oh ig cursorTarget is better for this
Which .sqf file do I add this to? Thank you very much.
init.sqf in the mission folder
unless the player is spawned and initialized by something else in which case all bets are off lol
or just do it a few seconds later to make sure your adding weapons is happening after everything else
Thank you
I will try it
What is so confusing about weather commands ?
Oh so you are confuesed about Locallity of commands So here is a good read becouse of that. https://community.bistudio.com/wiki/Multiplayer_Scripting#Locality
So if you look at that page you will see that ha LE simbol witch means Local Effect And you need to remoteExecute it for each player and for that it would be something like:
[60,0.5] remoteExec ["setOvercast",[0,-2] select isDedicated];
Also here is a simple random Weather script that i found on Forums:https://forums.bohemia.net/forums/topic/237633-ombra-random-weather-scriptfunction/
Hi everyone, Ive created this script to create a random weather and random forecasts each time you start a mission. It automatically passes all weather data to clients. The script is able to filter different kinds of weather based on supported terrain position: - Mediterranean islands; - Europe; ...
Here is an example you could do of wheater change every x amount of minutes: BTW untested i just wrote it up in notepad.
0 spawn {
ActiveTimer = true;
private _timerDelay = 30*60;//minutes
private _const_max_fog_level = 0.6;
private _const_max_rain_level = 0.6;
private _currentOvercastCoef = 0;
private _forecastOvercastCoef = 0;
private _currentRainCoef = 0;
private _forecastRainCoef = 0;
private _currentFogCoef = 0;
private _forecastFogCoef = 0;
private _windSpeedN = 0;
private _windSpeedE = 0;
private _windDirection = 0;
while {ActiveTimer}do {
_currentOvercastCoef = random[0,0.5,1];
_forecastOvercastCoef = random[0,0.5,1];
_forecastRainCoef = random[0, _const_max_rain_level/2, _const_max_rain_level];
_forecastFogCoef = random[0, _const_max_fog_level/2, _const_max_fog_level];
_windSpeedN = random[0,10,20];
_windSpeedE = random[0,10,20];
_windDirection = random[0, 180, 360];
//forced Weather
[0,_forecastOvercastCoef] remoteExec ["setOvercast",[0,-2] select isDedicated];
0 setRain _currentRainCoef;
0 setFog _currentFogCoef;
setWind [_windSpeedN, _windSpeedE, true];
0 setWindDir _windDirection;
forceWeatherChange;
//SmoothWeather do eather or
[_timerDelay,_forecastOvercastCoef] remoteExec ["setOvercast",[0,-2] select isDedicated];
_timerDelay setRain _forecastRainCoef;
_timerDelay setFog _forecastFogCoef;
setWind [_windSpeedN, _windSpeedE, false];
_timerDelay setWindDir _windDirection;
sleep _timerDelay;
};
};
myb instead of setOvercast try using Bis_fnc_overcast
https://community.bistudio.com/wiki/BIS_fnc_setOvercast
Yea well it seams there is no way to change the overcast with out skipTime or desync or with out the hiccup that is caused with forcedWeatherChange.
my paranoia simulator works and is in playable state
had some actually scary moments just as inteded by design
What's that lol?
Paranoia sim?
what would be the better approach to create this kind of feature (A2+, not for OFP):
you get into a car driven by an AI agent as a passenger, and tell him where to go (ideally on the map). the AI agent is not part of your group.
I'm very interested in this
yeah like, you're stalked by local villagers that could ambush you but you also need them to get information
here's the description
the mechanics are already a bit deeper than described there though
This might be helpful: https://github.com/AmauryD/A3GPS
Also here's a fixed version so that the path shows in ingame GPS too: https://github.com/Ezcoo/RevolutionRPG-Arma3/blob/main/core/gpsRouting/menu/hud/fn_drawPath.sqf
it creates a widget with a map you can click on, and connect it using events to something else?
You could maybe give the AI waypoints with the path segments (?) that it generates
the important part for me is clicking on the map and sending that position to AI (but only when the context is right, not every time you open the map)
Yes, it supports it
The code needs to be modified to some extent in any case, but I guess it could be doable
Also note that the project has GPLv3 license, so your license needs to be GPL compliant as well
Yo, I'm having issue with a code of making an ellipse marker shrik by 100m, every 10s.
I'm having this error Error Missing ] line 5 and I do not know how to fix it, I looked up forums and all:
_marker = getMarkerPos "clutchzone"; _radius = [1300, 1300]; while {true} do { if ((_radius select 0) >= 50 && (_radius select 1) >= 50) then { _radius = [max ((_radius select 0 - 100), 50), max ((_radius select 1 - 100), 50)]; // the error happens here _newmarker = createMarkerLocal ["newzone", _marker]; _newmarker setMarkerShape "ELLIPSE"; _newmarker setMarkerSize [_radius, _radius]; _newmarker setMarkerColor "ColorGreen"; sleep 10; }; sleep 10; };
that's not how you use max
50 max (_radius select 0 - 100) is correct syntax. Broken syntax = error messages
Welp thank you, but now it's saying Error Zero divisor
50 max ((_radius select 0) - 100) or 50 max (_radius#0 - 100) then 
It worked thank you<3!
that is deprecated AFAIK, server automatically syncs weather on the engine side, most commands have to be done from server too.
if needed something more specific maybe take a look as EO's sullen skies mods
I have this line of code while {_pkloivar = true} do {, and it's returning this error Error CSIR:GNIAC stack size violation. Can someone help me?
= is to declare, == is to compare
I still have the error
Then somewhere else is
clear the do and just test with a hint, if the issue continues then its you conditional, if not, its your do code
although, you are referencing a private there, is it available in the context of the script?
while { _pkloivar } do
{
// ...
}
be sure to have an exit condition in there
exitWith()?
that or _pkloivar = false;
Wanna make an addon to add a boolean to set if a object should be makered on map like how zeus enhanced does it, but in the eden editor. Debating whether I should try to make it only when in game, or also while in the editor-
Is it possible to make localization options for players?
So players with same language in-game could choose in-mission language and have different lines picked from stringtable?
you cannot select the translation language from in-game no.
You could manually make your own string selection system to do that :D
Thank 10x for previous replay unfortunately it didn't work. It appears like the weapon is loading for a brief second and than is taken away by escape mod. Would you be able to provide me with delay script that will delay the addweapon command?
are scripted event handlers local or global? if I execute the call on the server, will it raise the events on the clients as well?
I'd assume local as I'm pretty sure clients don't get each other's arsenal events.
He's on about this I believe, https://community.bistudio.com/wiki/BIS_fnc_callScriptedEventHandler
Which is local I'm guessing.
Yeah, the BIS arsenal is about the only thing we use those for.
Hello, how would yall set up a thing where the player starts in a plane and then later has to do a halo jump?
Feels like spawning in a vehicle with sim turned off is not optimal
you mean walking inside of a vehicle?
nah just some way to be inside of it without having sim off
Sitting in it is fine
Just as long as it does not need to loop around in the air for an entire breifing
Its for a WW2 thing
place them as cargo then?
to prevent it from moving, that's a different story
attach it to an invisible vehicle?
I feel dirty making my script use someone elses variable names :I
But I need to for compatibility 😅
my script
someone else's variable names
you don't need it, unless you edit a script (or this is a child script that is awfully called from the parent?)
It's to make building markers then zeus enhanced can see.
although now that I think of it, why would I want to remove the marker if I set it in eden?
Hi, does anyone know how to get the Name/Variable of a dead Unit inside a BodyBag (ACE3).
I'm trying to create a script that detects if a certain unit is in an area but dead and in a body bag.
you may want to ask in ACE Discord (link in #channel_invites_list), they are more likely to know
Alright I'll try that 🫡
Is there any way to check if the vehicle colliding with something? (terrain/map objects/other vehicles/etc)
you may try
EpeContact / EpeContactStart / EpeContactEnd Event Handlers
https://community.bistudio.com/wiki/Arma_3:_Event_Handlers#EpeContact
A bit cumbersome, but if there is no engine command... thanks, will look into it. By the way, do you know if this will work with hidden objects?
I suppose it should
and what kind of "engine command" would you like? an event is better at that than a hypothetical isCollidingWithAnything _obj
Event handlers (except Scripted EH) are an engine thing
What it really needs is a command that tells you if an object would collide with anything before you spawn it.
but that's probably beyond the capabilities of the engine.
At least a bounding-box collision check.
Sometimes you have a position where you'd like to spawn something, and you just want to check if it's going to be sent into orbit.
Best you can do is line intersection checks but those often miss small objeccts.
this! 👆
I've written one myself, but sometimes it results in vehicle losing its wheels cause of terrain collision )= And it's still more complicated than I would like it to be.
Would disabling a Unit's AI have the same performance effect as if they were made as an agent? Such as, for stand-still NPCs in a mission?
I'm trying to put some NPCs at a location where they don't need to do much other than stand around and look military, but while the mission is ongoing, I don't want them changing states or being a factor on performance.
Hard to say, but probably in the same ballpark.
Right? Agents seem to just have a simple FSM, if a unit has no FSM, I would hope that would mean even better formance.
formance?
Performance.
Bear in mind that client performance is still heavily impacted by both simulation and rendering costs of units. Often more expensive than the AI.
Would setting units as hidden and dynamic simulation help with that part?
Hidden at a certain distance, that is.
Assuming that it does hide objects and disable global simulation, yes.
I haven't tested how this interacts with object draw distance. I'd hope that a client doesn't have any simulation cost for a non-local unit that's out of draw distance...
FindSafePos does a bounding sphere check afaik
You mean findEmptyPosition or BIS_fnc_findSafePos?
I think findEmptyPosition does a very buggy bounding sphere check and BIS_fnc_findSafePos does an object radius check plus a single-point line intersection.
Can I put a marker behind a location marker? 😅
Building marker adding- looks ok, other then the text
I forgot to thank you! Sorry and thank you again
[2, 4] call BIS_fnc_randomInt
Is something wrong with this code?
Alternatives if not fixable?
Does anyone know how to disable weapon removal in CO10 escape that happens right before person spawn?
@unborn rivet If that's the mission I've played then you get a backpack full of handguns in your prison shack.
Doesn't look like it? What's the issue?
It's supposed to return a random integer, inclusive, between 2 and 4, and I consistently get results between 137 and 139
I dont know, maybe it's an outdated script that doesnt work for A3 maybe?
I spent... a good few hours trying to figure it out last night
Box1 addItemCargo ["rvg_canOpener", [2, 4] call BIS_fnc_randomInt];
I'm pretty sure that's all.
Hi John. It is correct. The backpack has weapons. However you spawn with no weapon. I'm trying to make the player spawn with weapon, and tried Player AddWepon code however the weapon least brief second during spawn and is taken away immediately.
@chilly fog That's not even the whole line :P
General rule: If you stared at something for a while, the error is probably not where you're looking.
Let me see if I'm missing anything, cause I'm pretty sure thats all I put in
addItemCargo is a binary command.
along with some other lines, that were essentially that line but with different numbers/items
uh
Like obviously you need to tell it what to add items to?
Are you putting stuff in an editor init box without any understanding of scripting?
Yeah, pretty much. I'm pretty new to this
In an editor init box, this refers to the object that the init is for.
so this addItemCargo ["someclass", 2]; would be valid. Ish.
oh yeah I did forget something... Thanks for reminding me
Box1 (I forgot this when I initially wrote my message) addItemCargo ["rvg_canOpener", [2, 4] call BIS_fnc_randomInt];
Maybe break it down a bit. First remove everything in the init box and see what spawns there. Then add one line at a time with increasing complexity.
Noted, thanks & will do
You can also run these lines live in the debug console in the editor to check them.
Make sure you enable show script errors in the Arma launch parameters.
@granite sky thanks for the help, mate and apologies for the frustration caused by me being and idiot and forgetting about literally the first word I wrote in those lines lol
figured it out.
I had copied the box and its code, and forgot to change the item they all added to, so every one of the 15 or so boxes was routing their items into one box lol
(In my defense, it was 3am and I was growing increasingly frustrated by the minute as I was writing my code yesterday, which didnt help me in the slightest lol)
PS. Thanks for telling me about using 'this' as a destination, much easier than what I was going to do, which was create separate variables for all boxes
if (leader group player == leader player) exitWith
{
_resetPosition = getPos player;
_x setPos _resetPosition;
_x setBehaviour "AWARE";
_x setFormation "WEDGE";
_x setUnitPos "AUTO";
hint "Squad Reset complete";}forEach units group player;
Hint "You are not a group leader!";
Line 8 undefined variable in expression _x
I don't get it
ive tried this a cpl times but just want to be sure, are nested if's faster then switch? every time i make a cpl nested if's into a switch the speed is slower
so i dont anymore*
@vague harness The code is executed by the exitWith, not the forEach.
@granite haven It depends :P
Generally there's not much difference with any method except the hashmap switch.
switch is typically a bit faster than other methods if the cases are values rather than conditions.
(except the hashmap, which destroys it)
I like call-exitWith because it's fastest for a lot of cases and formats better.
added extra {} and it works
hello everyone!
So, I'm writing a config for a mod and I want to add an EH to it.
So I have, within cfgVehicles/class CAMan, the following:
class eventhandlers: eventhandlers
{
class CUAS
{
fired = "[_unit, _weapon] call RUF_fnc_CUAS";
I'm planning on having RUF_fnc_CUAS all in another, separate file. Would this work? Or should I do, instead of call, execVM?
Or, to ensure the separate file is compiled, do I need to define that function in Cfg Functions in my config?
I'm pretty familiar with scripting that I manually place in Eden, or that I compile and add into an operation's init.sqf file, but I'm not really sure how it works for a mod.
OR, instead of going the way that I did, would I be better off just adding a CBA_ClassEH for CAMan instead of this? I've already got CBA as a dependency anyways.
(I put here instead of config_makers bc of the question of call vs. execVM. But I realize could go in either)
This is the straightforward way:
Or, to ensure the separate file is compiled, do I need to define that function in Cfg Functions in my config?
Awesome, cool.
Any thoughts on using a regular fired EH added through the Cfg Vehicles to class CAMan vs a CBA classEH?
I don't know CBA's codebase very well.
Adding a fired EH to CAMan sounds expensive in general.
I’m making a counter-UAV gun. Its got blank ammo and scripts that do all the work for downing/disabling UAVs. It seems to me a fired EH, with a check to make sure person has the gun equipped, is the only way to go
So more like, the code executed by the EH is, if (drone gun) then {call RUF_fnc_CUAS}
I cant really think of an easier way to do it.
if weapon != dronegun exitWith {}
Yeah thats what I have, but it still does mean adding a firing EH to every person character
huh, is there not a WeaponChanged EH
maybe there's a trick for it
They added SlotItemChanged in 2.14 and there's nothing for weapons?
Hey guys, i have tried to do this with workshop modules but have come up slightly short.
im looking for a way to spawn random weapons in the buildings around the players but only spawningstuff from a mod the TIOW mod to be specific, i have no expereience using scripts or even know where to start, so im hoping/praying one of you geniuses can help me
Ah okay I got it :)
I also want to ask (sorry for interjecting) uh how do I use removeExec for disableAi? It doesnt work in multiplayer if triggered by a script (I want to disable 'move' ability of a group using a script :) (sqf)). I am sorry but I dont understand how I would write this code in the syntax examples provided ;-;
btw player is different group and the group that will be getting 'disableAi' will be different group
[leftArg, rightArg] remoteExec ["command",targets,JIP];
_unit disableAI "FEATURE";
[_unit,"FEATURE"] remoteExec ["disableAI",_unit];```
ooooo THAT WILL BE A LIFE SAVER!!!
ohhh feature as in the type
I see
like command i mean
Uh should I put it in place of ```sqf
_x disableAi "MOVE";```?
[_x,"MOVE"] remoteExec ["disableAI",_x];```
yeah ofc with _x but like this right?
{
[_x,"MOVE"] remoteExec ["disableAI",_x];
} forEach units convoyGroup;```
You want to do it for each of the units, so you must put the command in the forEach. That part doesn't change when you remoteExec it.
yeah oka just making sure ^^
I want to try this myself so tell me if I am right ^^
{
[(vehicle _x) remoteExec ["forceSpeed", convoyMinSpeed];];
} forEach units convoyGroup;
No, that's not correct
oof ;-;
Read the first bit of this again: #arma3_scripting message
Let me show you the remoteExec layout again.
[leftArg, rightArg] remoteExec ["command",targets,JIP]```
Your left argument is `vehicle _x`. Your right argument is `convoyMinSpeed`. Your command is `forceSpeed`. You might be able to see how this goes together.
OHHHH
Left-right I see
{
[vehicle _x, convoyMinSpeed] remoteExec ["forceSpeed", vehicle _x]
} forEach units convoyGroup;
I think that works? ^^
No ; after the last _x
; is an "end of command" signifier, you don't want to do that before the actual end of the command (the closing ])
I am on the struggle bus with the kbTell stuff. Is there some reason as to why my conversation plays in the editor testing, but not on a dedicated server? bis_fnc_kbTell will play them on dedicated, just not well. When the function is played locally, each sentence waits for the 60-second timeout in the function, when the function is played on the server, the server just blows through the conversation because it can't load the ogg files.
I'm trying to just hand code the kbTell stuff, but I cannot seem to get it to work in a dedicated environment. I am trying to see what I'm doing differently from the function, but I can't quite hash it out.
Aha noted :)
{
[vehicle _x, convoyMinSpeed] remoteExec ["forceSpeed", vehicle _x]
} forEach units convoyGroup;```
this should do then i guess
Very simply, for testing.
winslett kbTell [player, "sitrep1", "Sentence1"];```
The above works in editor testing, but will not run live in a dedicated environment.
What if you run both of those local to the player?
btw there will be a ; after last ] right?
Still no effect
I don't know what the function is doing right and I am doing wrong to get it to work.
In this context it isn't strictly necessary because there's } after it, but you can put one and in other cases it is necessary
kbTell is Local Argument, and if winslett is an AI it's likely to be local to the server
BRILLIANT
That's a step in the right direction
That would explain why player worked in singleplayer
The receiver also needs to be local to the machine calling the command
oh, I thought that's what you tried first.
I think I misread the whole locality on the arguments
I had the player entity in as the recipient, so it wouldn't work on either server or local.
So how do you make it work given that the AI and player don't have the same locality?
winslett kbAddTopic ["sitrep1", "kb\sitrep1.bikb"];
winslett kbTell [winslett, "sitrep1"1", "Sentence1"];
Winslett talks to himself, that's how bis_fnc_kbTell does it. I didn't understand why it defaulted to that, but I understand it now
If there's only one actor in a config, it will set it as the recipient instead of round-robinning the actors in the conversation.
Hey, dont mean to double post so soon but does anyone have a direction they can point me in?
Hmmmm
I suppose, you could make an array of the classnames of the weapons, and then create them at buildingPositions inside certain buildings.
okay explain it too me like i have never done this before XD
there is this script i found that seem to match exactly what i want, how to i "add" it to my multiplayer OP -https://forums.bohemia.net/forums/topic/222828-release-sarogahtyps-simple-loot-spawner-ssls-v-12/
Sarogahtyps Simple Loot Spawner - SSLS V-1.2 Spawns weapons, items and bags in buildings near to alive players maybe inside a trigger area or marker area. Deletes stuff if players are not close enough anymore. The script doesnt care about any trigger preferences except the trigger area. Soft dela...
_exclusive_loot = []; //add classnames here and nothing else will be spawned (whitelist)
I haven't looked too deeply, but it looks like that's the limiter you're looking for.
yeah i saw that, but my issue is every other Op i have run for me and a few friends has only involved steam workshop modules, this is my first step into scripts
The initServer.sqf it talks about goes into the mission folder where the mission.sqm is. The code under that in the forum post goes there.
Judging by the compileFinal, you'll put the script file in the mission directory as well, and modify the settings directly.
_trigger_array = []; // contains the names of triggers/markers in which area loot should spawn. This will determine where your items will spawn, triggers with variable names can be put here.
_exclusive_loot = []; //add classnames here and nothing else will be spawned (whitelist) This will determine what will spawn, and only what will spawn. Using this seems to lock out anything else. So get all the classnames of your mod weapons and put them here.
It will look something like ["AK47_FIOW", "AK47_rainbow_2", "HK-47_blue",]
okay how would i set a trigger to be say a player
i think (think being the oporative term) figured the other stuff out
but to make sure im not a massive idiot as soon as i run this OP the loot shouldjust spawn
The triggers determine where gear will spawn
It seems to accoutn for the players approaching by its own logic.
okay so if i set a trigger to be the whole area, i put in that array the trigger and it'll spawn shit in the area of the trigger?
That's what it looks like to me.
okay cool, cheers bud this has really helped 🙂
i might be back in panic XD
S'lright, the details section has a small guide to the settings.
i am assuming i can test this in the editor
Im sorry for annoying you again
{
[_x,"MOVE"] remoteExec ["disableAI",_x]
} forEach units convoyGroup;```
this works and i disabledAi BUT
```sqf
{
[_x,"MOVE"] remoteExec ["enableAI",_x]
} forEach units convoyGroup;```
this wouldnt :(
Yeah, 'initServer.sqf' works for SP Editor
🤷
The code appears correct. I have no idea what else might be happening in the script or mission that could interfere.
:(
Maybe check your logic on localhost first.
it works on local host :)
yeah I just checked on the localHost but same thing, I can do enableAi in Zeus (execute script).
hmmmmmmm
It's not like enableAI somehow doesn't work when remoteExec'd.
;--;
let me try to test a script with just 2 functions on and off
// resume command function
resumeCommand = {
resumeReply = selectRandom [
"Affirmative, moving forward on your command."
];
leader convoyGroup sideChat resumeReply;
{
[_x,"MOVE"] remoteExec ["enableAI",_x];
_x enableAi "Move";
} forEach units convoyGroup;```
this is my whole script
well a function
of the whole script
resumeCommand = {
There's no matching }; at the end, this tends to break things
HECK
I see why ig
no wai
act
it is there
i just didnt copy it
// resume command function
resumeCommand = {
resumeReply = selectRandom [
"Affirmative, moving forward on your command."
];
leader convoyGroup sideChat resumeReply;
{
[_x,"MOVE"] remoteExec ["enableAI",_x];
_x enableAi "Move";
} forEach units convoyGroup;
};```
yo i found the issue
wait
resumeCommand_ACE = ["resumeCommand", "Resume", "", {
call resumeCommand;
}, {
true
}] call ace_interact_menu_fnc_createAction;
[curatorName, 1, ["ACE_SelfActions", "convoyControl"], resumeCommand_ACE] call ace_interact_menu_fnc_addActionToObject;
the call resumeCommand; was set to call resumeConvoy; BRUH Im dumb
so after a bit of trial and error i can confirm everything seems to be working
you, my friend, are godlike!
the "delay" is just sleep 5; (or however many seconds it needs). however, if that mod will consistently remove weapons, then you have to also re-add them consistently every tick
It's a one-off removal on init, but I'm not sure on the mechanism.
my mod also takes away player weapons..by using removeAllWeapons lol
what else could it be
you could waitUntil { (primaryWeapon player) == ""};
player spawn {
waitUntil { (primaryWeapon _this) == "" };
_this addWeapon "YOUR_WEAPON";
};```
@unborn rivet try putting this into init.sqf
(this assumes that player starts with weapons... if player starts without weapons, then receives them from some script, then they get taken away by that other script, than this won't work)
Heck yeah, man. Hope you guys enjoy it.
I appreciate, will test it
i made it so all cars start locked so you have to kill the owner to unlock it, but if you do it in town then everyone will attack you
In the Eden Editor, what's the easiest way for a trigger to repeat itself continuously once a unit enters it? I want a bunch of Howitzer ordnance effects to trigger individually at random intervals forever, but not until someone has entered the trigger
is there a script for a trigger that changes greenfor from friendly to enemy when triggered?
setFriend
yeah i found it right after i asked
when player creates a map marker, what is its auto-generated name? i need to reference it in script
It's in the docs for allMapMarkers
or you can get into their car as passenger and they transport you to a point you set on the map. they could still kill you when an opportunity appears and if you ask too many questions
(i used onMapSingleClick for now)
I dont like using respawn modules as they show on the map all the time. Instead Ive used the "empty" markers in the past but once you die the respawn automatically becomes available where ever you are on the map. I however only want this respawn point available once you get to a certain location.
I have placed my marker where I want the respawn point and have given it the variable name of "respawn_west". I then have placed a trigger in the nearby town and given it an area that covers the entire city and have set the activation to BLUFOR Present. What script would I place in the "on activation" field to have the respawn point only show once this trigger fires.
Was making a keybind to make a marker on the player's position, and wanted to make it fit the normal user-defined format (_USER_DEFINED #<PlayerID>/<MarkerID>/<ChannelID>), but how do you get the id the marker will have with createMarker?
private _marker = createMarker
[
format ["_USER_DEFINED #%1/%2/%3", getPlayerID player, <markerID>, _channel],
position player,
_channel,
player
];
If there isn't a way, it's not a huge deal to me, I was previously using the time (I think diag_tickTime specifically, could be wrong) which was working fine.
_marker itself is the id
afaik
there isn't a "Marker" type, it's just a string containing the id
oh i see what you're trying to do now
Yeah, basically just tying double click on the map to a keybind lol
Am I missing something obvious?
I have this as part of a CfgVehicles entry, for CAManBase (all human characters). For some reason, my weapon check is not working; my EH keeps triggering and calling RUF_fnc_cuas no matter the weapon. Its late and Im tired, so I feel Im missing something obvious.
class eventhandlers: eventhandlers
{
class cuas
{
fired = "if (currentWeapon _unit != 'RUF_DroneGun_Tactical') exitWith {}; [_unit, _weapon] call RUF_fnc_cuas";
};
};
};
(yes, part of a config, but involves a dumb scripting weapons check)
you could iterate from 0 to 999 and use the first one that isn't already used by a marker (check if it is with (markerType _marker) != ""; )
try```sqf
if (currentWeapon _unit == 'RUF_DroneGun_Tactical') then { [_unit, _weapon] call RUF_fnc_cuas };
I'll just stick with using the time, don't see a point in doing up to 1000 iterations for just a marker
Was mainly asking in-case there was some parameter passed to createMarker or something like that I couldn't seem to find
i doubt it would ever do even more than 10 iterations. you just exit the loop when you found an unused ID
it might be the last one created in allMapMarkers
i'm actually unsure if the engine even releases the used IDs, from my tests today it seemed like even after you delete a marker, its ID won't be reused again
wait
how do you get the id the marker will have with createMarker?
wat?
you set it on creation
I mean the one used for user-defined markers:
_USER_DEFINED #<PlayerID>/<MarkerID>/<ChannelID>
it seemed like the engine has an internal counter that counts up every time you create a marker, but never counts down
so, creating and deleting a marker 100 times would give you ID 101 even if it's just 1 marker on the map (i might be wrong though)
Looks like it yeah. although ACE apparently adds in some extras:
// allMapMarkers -->
[
"_USER_DEFINED #2/0/1",
"_USER_DEFINED #2/1/1",
"_USER_DEFINED #2/2/1",
"_USER_DEFINED #2/3/1",
"ACE_BFT_group_0",
"ACE_BFT_group_1",
"ACE_BFT_group_2",
"ACE_BFT_group_3",
"ACE_BFT_group_4"
]
is it just me or is FlyInHeight broken?
i'm using this flyInHeight 50 on the mohawk and it gets down to land
if it's flying right now, it'll nosedive right into the ground
if i use flyInHeightASL instead, it won't do anything
is it just this specific aircraft or all of them
same with hellcat
dev branch?
seems to work correctly with forced flag. but the old synax is indeed broken
i always hated when they didnt want to fly as low as i told them to, but this is a bit too low 😄
hm yeah. with forced it seems to work
I tried that and now the EH is not firing at all.
I'm really confused. I don't see what's wrong haha.
_unit is not even defined
neither is _weapon
goddamnit. I need params in there.
I KNEW IT WAS SOMETHING STUPID BC ITS ALMOST 3AM!
ahhh!
lol thanks leo
for CAManBase (all human characters).
for men you should usefireManEH
+d
What's the difference here between firedMan and fired? BI wiki says that fired won't trigger if a unit fires out of a vehicle. Does that mean both firing a vehicle's turret, or firing out from a vehicle (say, in a turn out position)?
So, given that I'm writing a weapon check anyways, for this specific EH, fired vs firedman won't make a difference?
I guess you could just leave it as Fired if that weapon is indeed infantry weapon
(I get the distinction for other cases, though)
cool, glad to know Im not a complete idiot at 3am.
what version
was wondering if there is a way to make trigger act when inventory item drops on the trigger zone as a condition
this is a big deal
also because it has _shift and _altparams
i can use this for both calling the helicopter and calling taxi
without the need to create a separate GUI widget
of course, scan supplies in trigger zone and if they contain item in question
how does AI choose the side of the road they are walking on? I placed waypoints on its right side, unit immediately goes to the left. I thought of recording the path for it to bypass that but then how can I make it cancel the unitPlay once it's threatened/switches to combat?
BIS_EndCapture = true
Trying to both print which object position is used and also use it for the spawn position of the bomb, but it complains about string usage in getPos selectedPos?
selectedPos = (selectRandom ["arty1", "arty2", "arty3", "arty4", "arty5"]);
systemChat str [1,"on", selectedPos];
bomb = "Bo_GBU12_LGB" createVehicle (getPos selectedPos);
What is "arty1" or others?
I'm doing it in Eden Editor, but they're Ordnance Effect "objects"?
I'm not sure if they're actual objects, I've placed 5 Ordnance Effect modules and all named them arty1-5
missionNamespace getVariable [_selectedPos, [0,0,0]];
You miss a bracket, noob
Replace getPos selectedPos with this?
selectedPos = missionNamespace getVariable [selectRandom ["arty1", "arty2", "arty3", "arty4", "arty5"], objNull];
if (isNull selectedPos) exitWith {systemChat "Object not found"};
systemChat str [1,"on", selectedPos];
bomb = "Bo_GBU12_LGB" createVehicle (getPos selectedPos);
First time triggered it dropped bombs on all 5 objects, then afterwards "Object not found"
Because object is no more because that's what bombs do
So bombs destroy even ordnance effect modules?
If you just use the module as position reference
I'd replace them with markers or a helper object such as an Invisible Helipad
Okay, I'll give it a shot, while I have you guys. Can you grab a random location within an area marker?
Basically bombing randomly within a specific area
{
private _finalPos = getPosATL _x;
systemChat str [1,"on", _finalPos];
bomb = "Bo_GBU12_LGB" createVehicle _finalPos;
} forEach [Target_Position_1, Target_Position_2, Target_Position_3, Target_Position_4, Target_Position_5];
Create 5 invisible helipads in the editor and name them Target_Position_1, Target_Position_2, Target_Position_3, Target_Position_4, Target_Position_5
Yes, one sec
You can use this to get a random position inside an area, trigger or marker
Like so?
private _finalPos = marker_ambientbombing call BIS_fnc_randomPosTrigger;
systemChat str [1,"on", _finalPos];
bomb = "Bo_GBU12_LGB" createVehicle _finalPos;
In chat it just prints out [1,"on", Any]
No, like I wrote above
Sorry I don't really see the difference
Preferably, would make it seem more authentic
private _finalPos = "your_marker" call BIS_fnc_randomPosTrigger;
systemChat str [1,"on", _finalPos];
bomb = "Bo_GBU12_LGB" createVehicle _finalPos;
"your_marker" is the nane the marker has in the editor
Oh shit nice
I needed the quotes hehe
What would be the best approach for making it repeat at random intervals FOREVER once the Trigger has been activated?
I tried:
while {true}
do {
...
sleep random[0,0,60];
}
But that froze my game and crashed it

Awful approach I take it haha
you can use that, but you don't want to put a 0 in the random <array>
Good point
Would that make it continously spawn bombs even if the player leaves the trigger area?
It didn't like that.. crashed again immediately
if isServer then
{
[] spawn
{
while {true} do
{
private _finalPos = "marker_354" call BIS_fnc_randomPosTrigger;
systemChat str [1,"on", _finalPos];
bomb = "Bo_GBU12_LGB" createVehicle _finalPos;
sleep random [1,2,3];
};
};
};
It needs to be spawned.
It keeps running
YOu can check if an object is in an area with https://community.bistudio.com/wiki/inArea
Amazing that works wonderful!
The goal was to basically have a big trigger around an island, once any player enters it, it commences a "distraction" aka bombing a nearby island for ambient sound and visuals
Which works perfectly with what you just gave me, had no idea about the spawning
I have adjusted to code above for multiplayer
Just to be sure, if I set the "mid" value of random to 0, does that mean there's no weighting that affects the randomness?
Check the biki for the documentation
Alrighty, thank you
private _array = [5,6,7,8,9,10,11];
for "_i" from 0 to (count _array) do {
_index = (_array # _i);
systemChat (str _index);
};
why does it say _index is an undefined variable?
That for loop is bad anyway
private _array = [5,6,7,8,9,10,11];
{ systemChat str _x; } forEach _array;
if a helicopter is being driven by an AI agent, what is its take-off logic after it landed using "land" command?
i seriously dont get it
I am not sure agents are meant to drive, so f around and find out
and don't forget to report back so it can be added to the BIKI 😄
if it landed using "GET IN", is it supposed to take off after someone entered?
because it did.. but just once
agents are reliable at driving. they dont do anything unnecessary because they dont care as much. if i call an agent-driven taxi i can be sure it arrives to me
they also fly helicopters just fine, and land too, but i'm unsure how they decide when to take off
¯_(ツ)_/¯
when they have to go somewhere, I would say
because they are only limited AIs who can go from point A to point B, apparently they drive and pilot, so I would say "same as AI" with potential hiccups on the way
Heya all, can someone give me a hand.
i need to grab the class names of some gear from a mod for a loot spawning script im using, im struggling to figure out how to view the .pbo files in such as way as to find these class names
To open PBO files you'll need...a PBO opener. There is one around, don't have the link right now, someone else might. Assuming the contents aren't binarised, you'd be looking for the files containing CfgWeapons, CfgMagazines etc. The names of these files might vary but they're likely to be .cpp, .h, or .hpp files, if not binarised.
However, you shouldn't need to open up the mod files to find classnames. You can find classnames in the Editor by hovering over objects, in the Arsenal by hovering over items and by exporting the loadout to clipboard, and in the Config Viewer by browsing CfgWeapons and CfgMagazines (Leopard20's Advanced Developer Tools recommended).
AI helicopter behaviour is kind of a wildcard regardless of whether it's agents or full AI. Landing and ground holding in particular is inconsistent at best.
it worked perfectly for me yesterday, i'm looking hard at what changes mighta broken it
brilliant thank you
ended up using flyInHeight 2; and limitSpeed 5;
it's more direct, tells the agent exactly what to do
though i'm now responsible for choosing the landing zone more carefully
(to take off i set the speed limit back to -1 and height back to 50-100)
forceSpeed doesnt work for this, only limitSpeed
i use findEmptyPosition for finding the landing zone
i could probably replace all this with some quadratic formula
May I suggest logrithmic for the speed.
inb4 some linearConversion shenanigan
what i got's a bit steep, i'll figure it out after sleep
\log_{10}\left(x+30\right)\cdot100-100
Drop that into the formula. That gets you a decent graph.
Tbh, what you already have would probably be simpler, and then you integrate this into one of the steps, like the <50 step, it re-evaluates the speed as it gets closer, and then anything above a certain distance can just be how you have it capped.
this one will only be limited to 50km/h when it's already at 0 distance, it'll skip past too fast
i need it to crawl real slow to not miss the landing position
Its a general graph for you to muck around with. Of course for that <50 step, you'd want to minimize the graph
Just a suggestion though.
inb4 smoothstep and sqrt
d on the graph can be achieved in-game with single linearConversion [f, c, x, 0, 1, true] call
Trying to apply this script for radar rotation to all radars in my mission, but not sure how to do it. https://forums.bohemia.net/forums/topic/218562-neat-little-rotating-radar-script/
while {true} do { { radar lookAt (radar getRelPos [100, _x]); sleep 2; } forEach [0, 90, 180, 270]; }; Figure you guys may like this little script (change as you like) What it does it make a radar rotate to look around, what it importantly does it also not stop it from focusing on a contact and t...
Right now, this is the only way I can do it:
waitUntil {
{
private _radar = _x; {
_radar lookAt (_radar getRelPos [100, _x]);
sleep 2.45;
} forEach [120, 240, 0];
} forEach entities "B_Radar_System_01_F";
({alive _x} count entities "B_Radar_System_01_F") == 0
};
But the radars don't spin at the same time, they spin one-by-one. How can I change that?
you swap the loops, so the inner does lookAt for all the radars and then outer one sleeps 
You can spawn individual instances for each system. Also... I like for loops for numbers instead of that eyesore lol.
Very true, I just copied that part directly from the BI forum link lol. It is a lot easier.
oo let me try that ty
ok, that worked!! tyvm 🙂
hi guys
i have a command that doesnt behave like it should
can someone pls look it over ?
private _MarkerCount = 0;
{
{
private _ChurchToMark = _x;
private _markerName = format ["ChurchMarker%1", _forEachIndex];
private _markerstr = createMarker [_markerName, position _ChurchToMark];
_markerstr setMarkerType "mil_dot";
_markerstr setMarkerSize [0.8, 0.8];
_markerstr setMarkerColor "ColorRed";
_MarkerCount = _MarkerCount + 1;
}foreach(getArray(configFile >> "CfgWorlds" >> worldName >> "centerPosition") nearObjects [_x,20000]);
}
foreach
[
"Land_WaterTower_01_F, Land_WindmillPump_01_F"
];
hint format ["Total Marked Buildings: %1", _MarkerCount];
thx in advance
wanted to mark some stuff
works with only one object but fails as soon as i enter multible classnames ...
the classnames are correct i doublechecked it
the problems rest in line 16 i think ...
i apologise in advance for any stupidity on my behalf .
It's trying to reuse the same marker names over the two passes.
a) you should enter multiple classnames as: ["Land_WaterTower_01_F", "Land_WindmillPump_01_F"]
b) what John says
oh yeah, you're missing some quotes on the classname array.
Having some issues using if statements with animationstates
_state = animationState player;
if (_state = "amovpercmstpsraswpstdnon") then {drinkingAnimation = "ace_field_rations_drinkStand"};
if (_state = "amovpknlmstpslowwpstdnon") then {drinkingAnimation = "ace_field_rations_drinkCrouch"};
if (_state = "amovppnemstpsraswpstdnon") then {drinkingAnimation = "ace_field_rations_drinkProne"};
``` Throws an error at the first if statement saying its missing an ) right before the equals, any ideas?
Because comparison is ==. = is setting the variable's value to "amovpercm..."
bruh, was throwing a different error earlier for having the double equals, I hope that fixes it
This is a tragedy, it worked. thank you
i already tried it precisely like this and it didnt work ...
well now it does ...
thx for fixing my code although i still dont know why mine didnt even though they are indentical ...
the brackets are in line 15 and 17 i did not miss them ...
Not quite your code:
foreach
[
"Land_WaterTower_01_F, Land_WindmillPump_01_F"
];
His code:
["Land_WaterTower_01_F", "Land_WindmillPump_01_F"];
ok i missed the 2 inner quotations
but are the brackets in this case functionally identical ?
The brackets are, yes.
Nah, it still has the marker re-use problem.
i just tried it and it works
You should be using _MarkerCount for creating the marker names, not _forEachIndex.
It'll nearly work
i didnt write this code
sighs
its way above what i can do myself
yet
it does work though
will marker re use problem become bigger the more classnames i add ?
It'll be a problem if both of those classnames exist in any quantity at all.
and yes, worse if you add more classnames.
i wanted to map tanoas train network so yes the do
exist in significant quantities
what precisely is the problem here ?
map become to cluttered with markers or performance ?
if you mean that all marked objects use the same marker that was a deliberate choice on my behalf
ok i think i found the actual problem
it seems not all structures i wanted to mark are actually structures as far as the game is concerned but rather objects ...
wierd ...
ok thx for the help
each class starting the numeration from 0 and overwriting the markers that were placed in the previous iteration is a deliberate choice? What a joy
Is it possible to translate slot names from stringtable?
Both localize and $STR don't work, or i am doing something wrong.
is there a way to detect a ctrl eventhandler ?
I want to detect a ctrl event handler from the map to detect a cheat
((findDisplay 12) displayCtrl 51) ctrlAddEventHandler ["Draw",_markers];
this is what I want to detect
Its easy to detect draw3d but ctrl eventhandler I havent found a solution yet
selectRandom array
that DOES take like, a name, not just a raw constructor [] right?
I got a missing quote elsewhere I'm gonna fix, that's probably causing it.
dosent work on ctrl event handlers
it takes a control in first syntax, how do you use it?
commands don't know where the value came from. Variable name or direct value, the command wouldn't know the difference
yea my bad , didnt see the sytax there, you are right should work
this nails the landing/takeoff perfectly
that first _dist < 5 is necessary to make it latch, otherwise it spins out of control when gets too close and tries again over and over
i separated the range for dropping speed and altitude though, cause i want it to drop altitude more safely when it's almost directly above the landing zone
otherwise it might hit some tall objects during descent
just tested it. sent it to land deep in the woods. it picked a landing zone (using findEmptyPosition), landed and took off without crashing on uneven terrain, right next to the trees
another tip for landings is to spawn an invisible heli landing pad on the spot you want them to land
i did it when i used, you know, the land function
you can also spawn a clutter cutter to get rid of bushes / rocks etc
ah yes the land function
if only right haha
anyway this solution seems perfect and reliable, it just picked me up deep in the woods in some arbitrary location and returned back to base
awesome
Is there a way to break a helicopter's loiter waypoint and bring it in to land at a specific helipad? I made a trigger on radio alpha and put this in it:
private _group = (group driver heli);
for "_i" from 0 to (count waypoints _group - 1) do
{
deleteWaypoint [_group, 0];
};
[_group, position heliBase, heliBase] spawn BIS_fnc_wpLand;
but it didn't work, not sure why. heliBase is my helipad
is it even possible to delete the 0th waypoint
yeah, that's code from the BI wiki afair
oh i see now lol
can also use radio command or trigger to skip a waypoint, so if you have a loiter and then a land you trigger skip and it will move on from loiter .. "in theory"
How do you trigger skip?
for context the loiter waypoint is one I added via addWaypoint lol, so I can't sync the trigger to it like i normally would
bet you could _grp setCurrentWaypoint [_grp, (currentWaypoint _grp) + 1];
sure you can just call sync after you create it
wait actually??
actually indeed
but for the first thing https://forums.bohemia.net/forums/topic/223639-skip-waypoint-trigger-type-skips-task/?do=findComment&comment=3360635
In a mission, I have one task created at the start and set as complete when a trigger becomes active and another task that has its create module synced to the trigger so that it is created when the trigger becomes active. The trigger also needs to cause groups to move on to the next waypoint, so ...
Unsure if that would work in my specific case, here's what i'm doing basically
sync trigger to waypoint
Trigger:
ambush_civ = createTrigger ["EmptyDetector", [5828.9,4122.19,12.2957]];
ambush_civ setTriggerArea [96.630, 81.986, 0, false, 5];
ambush_civ setTriggerActivation ["WEST", "PRESENT", false];
ambush_civ setTriggerType "SWITCH";
ambush_civ setTriggerStatements ["this", "", ""];
ambush_civ setTriggerTimeout [20, 20, 20, false];
Waypoint:
_hold_waypoint = _newGroup addWaypoint [[6125.56,4188.6,0], 0];
_hold_waypoint setWaypointType 'HOLD';
_hold_waypoint setWaypointSpeed "LIMITED";
Sync command:
ambush_civ synchronizeTrigger [_hold_waypoint];
``` (https://forums.bohemia.net/forums/topic/210326-how-do-you-sync-a-scripted-trigger-to-a-scripted-waypoint/)
Im trying to sync a scripted trigger to a waypoint (both created via script) but having problems. Is this the proper way to do it? Trigger: ambush_civ = createTrigger [EmptyDetector, [5828.9,4122.19,12.2957]]; ambush_civ setTriggerArea [96.630, 81.986, 0, false, 5]; ambush_civ setTriggerActivatio...
Oooohhhhhh
that's using HOLD but should work for LOITER the same way
fingers crossed it will
deleting the waypoint totallly works too and ... less code is always better .. zero code zero bugs
but it's good to know depending on what your requiremnts are
Deleting didn't work for some reason with my script-created waypoint, but it did work when I just plonked down a regular loiter
did setCurrentWaypoint work
so I'm adding the waypoint using an event handler in a trigger, here's how I'm doing it:
_wp = _grp addWaypoint [_pos,0] ;
_wp setWaypointType "LOITER" ;
_wp setWaypointLoiterType "CIRCLE_L" ;
_wp setWaypointLoiterRadius 400 ;
nope
so, it's hanging on that waypoint even if you change its current waypoint to any other?
that also did not work
for "_i" from 0 to (count waypoints _group - 1) do
{
deleteWaypoint [_group, 0];
};```
I think so yeah.
But, doStop works just fine...
is driver a unit or agent
unit, just a normal civvie
what is your crteria for getting them to move on? because you can just add a Condition directly the waypoint as well
When the player hits radio alpha, lol
it really shouldnt matter, cause their heli doesnt react even if they directly set the waypoint to a different one
is the area safe? sometimes you have to set support/transport pilots to CARELESS to get them to fly into hot zones
when you set current waypoint it doesnt care about completing its previous wps conditions
Stratis, me, the pilot, that's all that's on the map
It just continues to loiter
are you sure it loiters because the wp is LOITER, what if you change that altogether to some different type
It does loiter, it enters the little circle
i seem to remember loiters being a bit funny like this but if you have a move->loiter-
land chain it should work
can you maybe drop the full code into pastebin or somewhere?
relevant parts at least
if the radio is doing a setcurrentwaypoint to your lz that should be doing it as well like 10x said
but don't combine skip and setcurrentwaypoint that's redundant
and would probably put you back at loiter 🤔
yeah sure! https://pastebin.com/VPKPiWNB
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.
well debug by print to start, i would add a hint deelting position to the whie loop to make sure it's doing something in the radio call
It doesn't tell the group to do anything after deleting the waypoints?
It deletes one waypoint, but the helicopter still keeps moving to the loiter waypoint
Oh, sorry. Forgot to include that bit lol.
while {(count (waypoints _group)) > 0} do
{
player sideChat "del wpt";
deleteWaypoint ((waypoints _group) select 0);
};
[_group, position heliBase, heliBase] spawn BIS_fnc_wpLand;
_group setCurrentWaypoint [_group, (currentWaypoint _group) + 2];```
that's a curious setCurrentWaypoint.
yeah i don't see where you hhave given it a land waypoint?
lost in the shuffle maybe?
Oh, does the BIS_fnc_wpLand not do it?
I have no idea what wpLand does. Would have to read it.
i see that now yes
but when you call setCurrentWaypoint it hasn't executed wpLand yet.
It works fine with "heli land "LAND" " but that just makes it land immediately, instead of landing at the helipad.
yeah forgot to include that in there haha
hmm okay
how do you skip a waypoint exactly?
Just setCurrentWaypoint to the next one.
Seriously, what is this line supposed to do:
_group setCurrentWaypoint [_group, (currentWaypoint _group) + 2];
Oh, that was just in case it wasn't deleting any of the previous waypoints
Okay, just tried this:
player sideChat "skip wpt";
_group setCurrentWaypoint [_group, (currentWaypoint _group) + 1];
[_group, position heliBase, heliBase] spawn BIS_fnc_wpLand; ```
But it still started circling
looks like wpLand doesn't use waypoints except as a landing position indicator.
yeah i don't think setcurrentwaypoint is really doing anything for ya but .. that doesnt explain why it wont land
usually they won't land if the spot isn't safe though
Okay. Yeah I just don't get why it's not getting out of the loiter
flat enough open enough and not under threat
but there's literally no enemies and it's on stratis and there's a helipad LOL
but often they at least advance in that direction
hah, also it doesn't reference the third parameter at all
heliBase?
you added a helipad object or you just see one painted on the ground? because not all the paited ones are actually objects
Added a custom one
or, dropped in one of the default editor helipads lol
all wpLand does here is a doMove to the position, and then a land once unitReady returns true.
Yeah, I've used it before to land at custom positions which is why I was hoping it would work. But I guess since doStop/doMove aren't working, wpLand won't work either
I suppose I could just delete the vehicle crew, create a new vehicle crew, and tell it to land... but that's a very ugly solution
What do you have here? Just an AI pilot in a helicopter?
Literally.
One guy?
One guy.
No-one else in the group anywhere?
Nope. The entire scenario is me (blufor), one civilian (heli pilot), mh-9 (helicopter), two triggers (one to make event handler when blufor gets in helicopter, the other activated on radio alpha to ideally RTB)
oh, you're in the heli as well?
Yes, but even if I jump out of it, the issue persists
Can you package the scenario and send it? Preferably with vanilla assets.
Sure! What's the best way? not sure if I can upload files here
should be pretty small zipped. PM it to me.
this is why i'm using agents and rolled my own landing/takeoff script (with artemoz's help)
the AI thinks too much
it's gonna do unnecessary things when you want it to simply fly/drive/walk somewhere
you could also setrup your own loiter path with a spline in the sky and a cycle waypoint which would also give a much more interesting loiter pattern, I feel like we're getting tripped up by the `18 loiter bug even though no resonse was ever given on that ticket, it seems that others have reported this behavior... i'm trying a few things to see if i can work around it
features yes
- If you set the current waypoint beyond the (final) loiter waypoint, it ignores you and switches back to the loiter waypoint.
- Even if you delete the waypoint, it'll still move back there after the doMove (but not loiter at least).
yeah i knew about #1 but not sure how to get around that
i thought just telling it to skip would work
like a hold
but you can't chain a move after loiter like you can after hold so i guess that trips it up
Having actually "completed" the "deleted" waypoint from 2, you can actually then do what you like.
yeah i guess the problem is loiter never completes?
So a deleted waypoint still acts like a real one, more or less.
sure
Nah, in that case it's a move waypoint. Sorta.
deleting the waypoint turns it into a move waypoint.
Possibly it'd flag correctly on deletion if it wasn't a loiter WP in the first place?
i thought it might be just stuck in the turn so i tried heli sendSimpleCommand "STOPTURNING"; but it doesn't break out
so really not actually deleted
hmm, maybe if you delete the waypoint, create a move waypoint, and then delete that.
you can set a drone to loiter and then retask it, why is this different .... 🤔
i was thinking about that
but isn't that what calling land does anyway (add a move)
It never calls land because it doesn't hit unitReady.
After the doMove it then just switches back to waypoint following.
i think in the drone case they just switch the waypoint type from loiter to move or whatever again
and oupdate it's posittion
maybe we can do that to bump it off the loiter point and then delete the wp after that
still doesn't work. impressive.
is Loiter a "Scripted" wp by chance ... "The group will wait until the external script exits before moving on to the next waypoint. " maybe it's got a script with an infinite loop attached to it :/
you're not wrong but ... its a puzzle haha
you're deep in the jungle with lots of variables that are hidden from you
just trying to see through the matrix man
break the matrix. replace the pilot with an agent. join the evil side.
it'll do as you say and never question the orders
does yours loiter tho? i think that's the difference, but building our own flight pattern with a cycle is probably the way to go here
mine's just a ferry. but making it loiter instead of returning to base is very simple
just like, setDestination it to some random point within a radius
its logic is
player clicks on map -> heli goes there and lands at the nearest good spot -> player enters the heli -> player clicks on map to tell it where to go
when player exits the chopper, it flies back to base
(you dont have to enter the chopper to tell it where to fly, but if you do enter it, it returns to base after you exit)
I'm not even sure it matters whether it's a loiter WP
yeah, doesn't matter.
Plain move waypoint does the same thing.
delete waypoint halfway through, give doMove, heli moves back to the waypoint position after the doMove.
Only way I found of properly clearing the waypoints is to joinSilent the driver to a fresh group.
wpLand does actually work then, btw
although I think you really want to use setWaypointLoiterAltitude rather than flyInHeightASL. Latter is very sticky.
also when it comes to defining what "Landed" even is for a helicopter, consider this. from physics perspective, it's flying. but from people's on the roof perspective, it's "landed" and can be entered/exited
^tried that on the Kavala hospital.. seemed like ti would be a great idea ... buuuutttt AIs walk off the roof .... because Arma things ... soo yeah, i guess you have to write your own pathing for that too
Good luck. AI pathing with building paths is busted above the ground floor :P
i'm gonna add height checking on the heli in multiple points rather than just one in the middle, so that it wouldn't tip off balance when only right gear is touching the surface
yeah that's why they walk off the roof in the first place
do handrails also not hold back A3's NPCs?
in A2 they can climb up a tower and then walk right off, even tho there's handrails and player cant do the same thing
not sure about railings but there are objects you can add that the AI "see" as solid which could corrale them a bit but they still can't really find their way around, and will be determined to walk off the edge if they can find a gap, just to get back to the navmesh
I'm not convinced that they know where they are in Z terms.
I suspect some giant ATL/ASL screwup.
is there a function that converts exact direction to a more vague like north-east, west, etc?
wrote my own lol
an example of 3 clues from which you deduce that there's at least 3 suitcases to find
(how many there is is unknown to player and if by the time the timer runs out they haven't found all, they get a bad ending)
perfect
the more clues you get, the more killers will potentially be tailing and ambushing you. even the taxi you call could be driven by a killer
damn, one's in the backrooms
is this still about scripting
Im wondering…
more like results of it
but it's not even Arma 3. And I think people here are smart enough to guess what you did and how it works from the first screenshot. A2 has it's own channel here to not bring confusion.
Is there a way to make captured group all lower case before replacing it iin the original string with regexReplace?
this should also work in A3, but not in A1 because it didn't have diary
so where's the code?
ugh, does ACE3 really not have any way to script restore someone's stamina?
I would trolerate to discuss non-Arma 3 scripts unless is Reforger/Enfusion. So please keep it going
class CfgDisabledCommands {
class CREATEUNIT
{
class SYNTAX1
{
targets[] = {1,0,0};
args[] = {{"STRING"},{"ARRAY"}};
};
class SYNTAX2
{
targets[] = {1,0,0};
args[] = {{"GROUP"},{"ARRAY"}};
};
};
};
why can i still place units through this syntax?
"B_RangeMaster_F" createUnit [position player, group player];
on the client*
can the debug console bypass these disabled commands even if they are executed locally?
No one 😬
The answer is \L$1
No
😮

Never seen that 😅
\U for upper case
I have to say, the introduction of regex to arma 3 made exporting stuff to biki so much easier and some things even possible
what's the simplest possible conversation added to an NPC that plays no speech, no actual dialogue, and only executes a script
ideally avoiding .bikb file
or any file
sideChat or any other chat related commands
no i want it to show up as conversation on HUD, like you have to actually walk up to an npc.
_npc kbAddTopic ["test", "", "", {hint "TEST"}];
something like this, though this shows "Script not found" error
basically i want it to just run that event handler and not look for any script files
i mean interaction with the NPC
Then I have zero idea what is your need
like addAction
Then addAction?
actions and convo topics dont appear in the same menu
Now I think I started to understand what you need - Do you mean 0-8 menu?
If not, please show a pic
if an NPC already has conversation topics, i want mine to be added to them but without actual voice lines, i want it to just execute a command when the player asks something
And what exactly it triggers?
i bet it's the eventHandler param in the kbAddTopic, but i'm unsure
then yeah this
Probably because I lack a much of experience with kbanything, but I still don't see what you imagine
i'm just trying to add a convo topic without a bikb convo file. a barebones empty topic that only runs a command
"I want to use Conversations without the required files"
you can eventually use custom USERMENU
but if you want to use Conversations, use Conversations
I'm thinking the same but wasn't really sure what exactly was needed
so i have to create a bikb with just these contents? or a completely empty file will also work
class Sentences{};
class Arguments {};
class Special {};
startWithVocal[] = { hour };
startWithConsonant[] = { europe, university };```
these sections are required iirc, unless you enjoy crashing the game :p
read the doc
https://community.bistudio.com/wikidata/images/e/e4/A3_commMenu.jpg
Before I shut my mouth up with this thing, the left side thing - is this what exactly you want?
no.
Okay, then I'll shut up. I guess I need to learn about convo system
I wrote that page with love, aeons ago!
Well I mean making external file is painful
tbh, this is the page written out of spite
I did not understand Conversations, was told it was "super simple", even "simpler" to use than say once properly setup.
I banged my head on it for a couple of days or more, then when the lights hit, I was "I don't want anyone to go through what I've been through - I am writing that down for posterity" 😄
it''s like skyrim with guns
I don't really call Skyrim is a sandbox but terms of deep modding sea, indeed
...Wait, isn't it called Fallout?
Hello.
RPT:
Error !=: Type Array, expected Number,Bool,String,Namespace,Not a Number,Object,Side,Group,Text,Config entry,Display (dialog),Control,Network Object,Team member,Task,Diary record,Location
script:
/* Advanced Armor calculation behaviour */
if (_advancedArmor != [0,0]) then {
private _path = (configFile >> "CfgAmmo" >> _ammo);
private _penetration = getNumber (_path >> "penetration");
private _bluntForce = getNumber (_path >> "force");
if (((_advancedArmor param[0]) - _penetration) < 0) then {
_realDamage = getNumber (_path >> "hit");
} else {
_realDamage = _advancedArmor param[1] - _bluntForce;
}
};
Can not understand...
/* Advanced Armor calculation behaviour */
if (_advancedArmor isNotEqualTo [0,0]) then {
private _path = (configFile >> "CfgAmmo" >> _ammo);
private _penetration = getNumber (_path >> "penetration");
private _bluntForce = getNumber (_path >> "force");
if (((_advancedArmor param[0]) - _penetration) < 0) then {
_realDamage = getNumber (_path >> "hit");
} else {
_realDamage = _advancedArmor param[1] - _bluntForce;
}
};
Right?
Yes. That param [0] is nonsense. Is this generated by AI?
No)
ok, thx, It seems to work
Any advice on how to organize my initPlayerLocal.sqf, onPlayerRespawn.sqf, onPlayerKilled.sqf, initServer.sqf, and init.sqf files? I have a bunch of functions and code called within these scrips, most requiring a scheduled environment.
If you had a bunch of those files in your mission, how would you organize them? Ideally, I would like the code all under my main src folder
use #include or put some of the code in CfgFunctions
CfgFunctions
or if you have to keep them as execVM files at all cost
initServer.sqf
initServer
initServer\myFileA.sqf
initServer\myFileB.sqf
What wrong with all that execVM hate 😄
IO
Hello, I'm trying to figure out how I can attach something via script to the weapon I have equiped.
I tired attach to but I can't find a way to figure out how to use it on the gun since it's not an object.
Does anyone knows a good solution for it?
Thank you 10x, this script worked, however it only works during the beginning of the mission, if I join server while the game is ongoing than the weapon doesn't load. I added global to the addweapon "_this addweaponglobal" perhaps should try without global. I appreciate your input into this matter.
You would want to attach it to the player object, and use the memory point for...the hands, or the gun proxy, or something like that. I don't know exactly what memory points a human has. You'd also want to turn on rotation following.
https://community.bistudio.com/wiki/attachTo see memPoint and followBoneRotation parameters
Yeah that's what I currently have I just thought I could maybe directly attach it to a mem point on the weapon it self.
Even that woudlnt follow the gun exaclty. I found here a algoritham that sarogahtyp made on Forum witch should follow the gun but even this is not 100%.
https://forums.bohemia.net/forums/topic/189107-weapon-ir-laser-ranging/
Your best bet would be to make a mod.
Disregarding if this is realistic or not for the year 2035 where ArmA III occurs, how would I go about measuring distance along my rifles IR laser attachment while active? I already have an eventhandler for drawing text/icons on-screen (or I could use a simple hint message), so all I really need ...
I'm creating a mod. I'm trying to create a mirror gun like from swat 4 or ready or not and i'm trying to attach a Camera to a mem point of that weapon and then use PiP to show the image of that CAm on a screen on the gun.
You can't attachTo things to the memory points of a proxy directly. You can save the modelSpace position of the memory point and then use that as an offset relative to the proxy memory point on the owner model
Since you're creating the gun yourself, you could store the offset position as a config property of the gun for easy retrieval
Optiwand 
e.g. digii_mirrorCamPos[] = {0,0.5,0.1}; and then _offset = getArray (configFile >> "CfgWeapons" >> _weaponClass >> "digii_mirrorCamPos")
That sounds like a good idea. Do you know if it's possible to render a pip Camera onto the weapon or does that only work for vehicles / objects?
I do both, a CfgFunctions library that are called within those event scripts.
But I don't want to use those event scripts, they clutter the mission directory. Is there a way to run, say, player enableStamina false; locally for players in a file other than initPlayerLocal.sqf and onPlayerRespawn.sqf?
I think weapons can have parts of their model set up as RTT textures, but I don't know much about this
Yeah I think the problem will be to select the weapon and get the renderTarget from it since it's not an object and therefore I don't know how to select that weapon and so on
Use a CfgFunction with postInit attribute
They run on all clients and jip
I can do that? That's awesome.
What about for onPlayerRespawn.sqf and onPlayerKilled.sqf? I could use event handlers but I'd be hesitant to mess with those unless there's something better.
Eh is the only way
is it possible to make a custom SHIFT + NUM- cheat command or is that shortcut hardcoded in engine and cannot be exploited? I wonder if suchh functionality could be replicated in any way
Then eh is the way
keyDown EH
and how would I make that EH detect multiple keyDowns?
Scripting

Just count the number of key presses
and compare them to the string (cheatcode)
if character is not in string and correct position, reset counter
use <string> select [index]
If you're making a mod you can use https://community.bistudio.com/wiki/Arma_3:_Modded_Keybinding
if no imput happens in given time (diag_tickTime) disable cheat mode
thx
You can make a custom respawn template that runs your function https://community.bistudio.com/wiki/Arma_3:_Respawn#Custom_Respawn_Templates
Good point.
@crude egret Get rid of the R word.
Hi, does anyone know how to force network update of position of an object via scripts? (setPos etc. in some cases is not immediate)?
!quote 5
stop using 'setPos' for the love of god
Leopard20; Tuesday, 10 August 2021
and you cannot do that, the server decides
so either tweak your server setting or do with it
ok, another question, how to reliably pass a Projectile Object reference from server to client?
try telling what you are trying to achieve first
server is calculating impact position and other details of a projectile, then I'm drawing things on map control related to that projectile, ETA, trajectory, current position etc., netId _projectile then objectFromNetId, or using obj reference will result in 0:0 meaning null obj
Hello Again, hoping to see if we can use the collective insight to see what my friend is doing wrong. We're try to port our training map over to the new Dagger Island map by FingerJam. On our old training map (Wake), we ran a server script that would allow popup targets to be recorded and tracked.
Here's the script: https://sqfbin.com/ifinagerifamobowecuk
The issue: The Script fails to produce the intended results on this map specifically. Have tried on other maps outside of Dagger island and it works fine. Any ideas would be greatly appreciated, just looking for ideas to try and troubleshoot this.
You can't really pass a reference to a projectile object across the network because there is a local copy of the projectile on each machine. Only the owner's projectile "matters" (will cause damage) but it's still a different object on each machine.
Thanks for confirmation, I will refactor the script then, atm I was virtually attaching a helper dummy object to projectile via setPos... but thats not good as there are problems with network sync
How do I run a map wide no pop = false script?
I don't see anything map-specific in this code
where do you run it from?
@little raptor im his buddy, this is whats in one of the triggers https://sqfbin.com/ovapukejinozisedoxek
to correct the above it makes all targets not stand back up on the map
is the trigger server-only?
what do you mean by this
oh yes
i see it says server only
@little raptor would that be what is messing with it is the server only box checked?
no it has to be server-only (based on your code)
yes that box is checked, I dont see anything that would define all of the targets on the map to be nopop = true
The Script fails to produce the intended results on this map specifically
just to be clear, what is the intended result?
The script is tied to a range of 30 targets, upon hit of a target (that randomly stands up at a certain interval), it adds a score of 1, once all targets are completed in that lane, it returns the score via addAction
The range is screwing with the map, breaking all pre-placed targets as well as any new eden placed targets
well I don't see anything that could break targets
yea me neither
I tried this on other maps, same thing, the range breaks all targets on the map
nopop is a global var. so you can just put it in init.sqf for example
if the map changes the value, you can put a sleep before it
id put it in the start of init.sqf correct?
all the targets on the map need to pop back up yes.
except for ones in certain areas
testing rn
it works!
thx @little raptor
Thanks for your help 
np
So for CQB shoothouses and what not, i want the targets to stay down on hit, how could i go about doing this without going in each target and setting nopop = true (theyre all named variables alr)
dunno if that var can be applied to targets individually
let me check
looks like no
this is the script the game uses:
#define POP_DELAY 3
#define POP_DELAY_MIN 0.5
// --- retrieve target object
params [["_target", objNull], "", "", "", "", ["_selections", []]];
// --- abort if no hit or script is in progress
if (!("target" in _selections) || _target animationPhase "Terc" > 0) exitWith {true};
// --- drop target
_target animate ["Terc", 1];
// --- check if there is global or local "nopop" override and abort if there is
if ((_target getVariable ["nopop", !isNil "nopop" && {nopop isEqualTo true}]) isEqualTo true) exitWith {true};
// --- wait before raising target
sleep ((parseNumber str (_target getVariable ["popdelay", POP_DELAY])) max POP_DELAY_MIN);
// --- raise target
_target animate ["Terc", 0];
// --- reset bullet craters
_target setDamage 0;
true
(which is being execVMed by a hitPart EH...oof
)
because it's a broken command. and I've had a lot of bugs because of it 😓
!quote 5
stop using 'setPos' for the love of god
Leopard20; Tuesday, 10 August 2021
so back to this
one idea is not using nopop = false
instead making them pop back up if they don't match certain criteria
another is using nopop = false but making them go down again... 
well obviously the first one sounds more sane
so for example, you can try something like this:
addMissionEventHandler ["ProjectileCreated", {
params ["_proj"];
_proj addEventHandler ["hitPart", {
params ["", "_hitEntity"];
if (_hitEntity isKindOf "TargetP_Inf_F" && {toLowerANSI vehicleVarName _hitEntity find "target" < 0}) then {
_hitEntity spawn {
sleep 2;
_this animate ["terc", 0];
};
};
}];
}];
put that EH in init.sqf (remove the nopop thing)
what that script does (or should do, because I didn't test it) is make targets whose variable name doesn't contain "target" pop back up after 2 seconds
Have some code that runs when creating an object, basically plays a sound effect; waits; and then plays it again. I originally just used a simulation = "fountain" but wanted some further customization with being able to change how often the sound plays.
However, I'm now running into an issue where the sound seemingly plays multiple times per loop.
// Executes when the object is created
private _soundFilename = getText (configFile >> "CfgVehicles" >> _objClass >> "BNA_KC_Deployable_SoundLoop");
private _soundDelay = getNumber (configFile >> "CfgVehicles" >> _objClass >> "BNA_KC_Deployable_SoundLoopDelay");
_object setVariable ["BNA_KC_Object_playAudio", true];
[_object, _soundFilename, _soundDelay] spawn BNAKC_fnc_playLoopingAudio;
// fn_playLoopingAudio.sqf
params ["_object", "_filename", ["_delay", 1]];
if (!isServer) exitWith {}; // Exit if not the server
systemChat format ["%1 %2 %3", _object, _filename, _delay]; // "<object> ...\FX7_Ambient.wav 15"
while {_object getVariable ["BNA_KC_Object_playAudio", false]} do
{
systemChat "playing sound";
playSound3D [_filename, _object, false, getPosASL _object, 1, 1, 50];
systemChat format ["sleeping for %1", _delay]; // "sleeping for 15"
sleep _delay;
};
Video example of the issue, and the original .wav file.
From the systemChat messages, the script is only running once, yet the sound is seemingly playing multiple times per iteration. It also seems much longer, given that the actual .wav file is only ~4 seconds long.
It also seems much longer, given that the actual .wav file is only ~4 seconds long.
well your own systemChat sayssleeping for 15s
Yeah, it should:
- Play the sound
- Wait 15 seconds
- Loop
Does sleep affect the playSound?
then why do you say it should be 4s?
no
The audio file is 4 seconds long
you have disabled it being simulation = fountain, right?
Yea
maybe the obj itself is playing its own sound
I went to double check...

hee hee
I'm sure you'd still hear the object if you removed the [_object, _soundFilename, _soundDelay] spawn BNAKC_fnc_playLoopingAudio; line
It was because I didn't remove the fountain simulation, I had that originally, removed it to start writing the script, but I guess didn't save the file in GitHub while stashing some changes
wouldnt recommend using github between building the addon each time but thats just me
im nearly into week 3 of trying to fix one bug and wouldve blown my computer up if i was using github every time
(yes its the orientation bug leopard ive still not fixed it)
I was working on a separate branch, went to main to fix a bug, went back to this branch
smort
I like to use separate branches for larger features/systems, and then make a pr / merge them into main once fully complete
my capital ships mod has been built out of a folder in my documents for the past 6 months
did you fix the lag btw?
nope
tempted to just throw it as client authoritative so the pilot doesnt see it while flying
going to ask for help in ace discord tmr if ive made no further headway
Thanks for your help debugging this, really appreciate it. I used joinSilent and it works... kinda. Here's the code:
private _group = group randomGuy;
[driver heli] joinSilent _group;
player sideChat str(currentWaypoint _group);
for "_i" from 0 to (count waypoints _group - 1) do
{
deleteWaypoint [_group, 0];
};
wp = _group addWaypoint [position landherepls,0] ;
player sideChat str(currentWaypoint _group);
[_group, position heliBase, BIS_vehicle] spawn BIS_fnc_wpLand;
player sideChat str(currentWaypoint _group);
So, if I run the trigger with this code while the helicopter is enroute to the loiter position, the helicopter comes back and lands. But, if I run the code while the helicopter is loitering, then it doesn't 
Oh? I've never used it before...
wait, that's another unit's group?
just do this:
[driver heli] joinSilent groupNull;
private _group = group driver heli;
whoops grpNull
btw wpLand is kinda daft here.
Okay, let me try that
Another method that might work is doStop driver heli before the wpLand call.
That should stop the driver taking any notice of group moves/waypoints.
Hmm, it doesn't like it. Going to try it in a new scenario again
Omg, that did the trick!!! Thank you so much for the help. This has been driving me nuts lol.
One thing does puzzle me a bit though, why is a loiter waypoint so hard to break? Was that by design?
It's not just the loiter waypoint.
The trouble is that you have both individual moves and group moves.
Having given a group a waypoint, that sticks even if you delete the waypoint. Like calling move
doMove is an individual move, so the unit will obey it until it gets there, and then it'll return to following the group move.
There's no direct way to clear the group move target.
you'd need to give the group a move to its current location or something like that.
doStop should stop an individual from taking any notice of group move targets until you call doFollow. Probably.
wpLand is using doMove because it's designed to be used for a group with multiple helis in it, so each individual pilot gets a doMove order.
how can i edit this to make it where any target with numbers in the variable name, have nopop = true
for instance i have CH_1 to CH_30 and BH_1 to BH_30, essentially the naming scheme of my shoothouse targets, i want all of em to be nopop = true
so i have a script that opens the strategic map and puts some markers on it. now what i want to do is close the strategic map if the user hasnt selected somthing in a given time. iv tried a few different ways with no luck, anyone know a way to close it?
How is your script so far?
like what does it look like?
We cannot really help without your source, yes
Give us the precious
We always need a precious strike yes
Can you sign enhanced artwork supporter yet lol
Why I need to?
well heres the thing, im not asking for help with trouble shooting the code im asking for help on closing the map that is opened when you call BIS_fnc_strategicMapOpen
Well, since I haven't really messed with it so this is just a assumption but
How about just to close the Display you got?
because its findDisplay 42
No, BIS_fnc_strategicMapOpen returns a display so no need to even find one
you mean return the display
Display is already returned
ok i think i understand
And do you know how to close a display?
closeDisplay
Okay, you get the idea yes
thanks buddy ill let you know if it works out
What condition do you use with waitUntil to check if the mission has started?
Been a while since I needed it and can't seem to find it on the wiki
Define mission has started. time > 0, or something else?
Hitting "Play Scenario", having a player load into a server, etc.
I think it was just checking the time though, couldn't remember for sure though
In MP, having loading screen can start the time already
Not too big a deal, it's just making a sound effect not play in Eden because I found it obnoxious.
getClientStateNumber gives you something.
Does it work on SP though? I haven't experienced with it
probably not.
Only specifically says network game
waitUntil { !isNull findDisplay 46 } is fairly common I think.
Checked, returns 0 in Eden and in-game
Any suspension during initialisation phase will be delayed until the mission starts. You can exploit that for some purposes.
For your specific purpose, you may be able to make use of https://community.bistudio.com/wiki/is3DENPreview or https://community.bistudio.com/wiki/is3DEN
Ended up using time and !is3DEN, since apparently time does increase while in the editor
waitUntil { sleep 5; time > 0 and !is3DEN; };
Anything I can do here to make sure a tracer always spawns in my module?
_lasSatShot = createvehicle [_ammoType,_shotPosition,[],0,"none"];
_lasSatShot setVelocity _shotVelocity;```
I have actually no idea if createVehicle'd ammo can have tracer but only properly fired ones
I'm using a mod that add a module to Eden Editor, this module have customizable parameters.
I know how to create this module by script, but it's possible to also costumize the module parameters by script?
