#arma3_scripting

1 messages · Page 96 of 1

leaden venture
#

I just figured it out you have to physically get out of the car and interact with the tank

#

Anyway thanks for the quick answer💪

harsh sedge
#

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.

granite haven
#

i'm trying to get the ils info for each ussr freedom that is placed in editor how would i do this?

fair drum
kindred zephyr
fair drum
#

[blahblahblah] spawn bis_fnc_kbtell

harsh sedge
granite sky
#

You can pull the code with function viewer and work from there.

#

BIS functions are often best used as example code.

harsh sedge
#

Guess I know what I'm doing tonight.

#

Maybe I can fix it to where it reads textPlain from missionConfigFiles, too

fair drum
#

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

acoustic yew
#

I’m sorry for interjecting, I have a small question. What is the difference between enableAI and enableAiFeature? :)

hallow mortar
#

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.

gentle zenith
#

Could anybody please tell me the appid for Tanoa/Apex? To check if somebody owns it using the 'getDLCs' command?

warm hedge
#

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...

Price

$24.99

Recommendations

2316

Metacritic

74

▶ Play video
unborn rivet
#

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.

kindred tide
warm hedge
#

addMagazines is fine

kindred tide
#

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

unborn rivet
kindred tide
#

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

fleet sand
#

What is so confusing about weather commands ?

#

Also here is a simple random Weather script that i found on Forums:https://forums.bohemia.net/forums/topic/237633-ombra-random-weather-scriptfunction/

fleet sand
#

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;
    };
};
fleet sand
#

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.

kindred tide
#

my paranoia simulator works and is in playable state

#

had some actually scary moments just as inteded by design

wary needle
#

What's that lol?

wary needle
kindred tide
#

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.

wary needle
kindred tide
#

here's the description

#

the mechanics are already a bit deeper than described there though

kindred tide
#

it creates a widget with a map you can click on, and connect it using events to something else?

tender fossil
kindred tide
#

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)

tender fossil
#

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

storm crystal
#

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; };

south swan
#

that's not how you use max

#

50 max (_radius select 0 - 100) is correct syntax. Broken syntax = error messages

storm crystal
#

Welp thank you, but now it's saying Error Zero divisor

south swan
#

50 max ((_radius select 0) - 100) or 50 max (_radius#0 - 100) then blobdoggoshruggoogly

storm crystal
#

It worked thank you<3!

kindred zephyr
#

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

storm crystal
#

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?

warm hedge
#

= is to declare, == is to compare

storm crystal
#

I still have the error

warm hedge
#

Then somewhere else is

kindred zephyr
#

although, you are referencing a private there, is it available in the context of the script?

winter rose
#

be sure to have an exit condition in there

storm crystal
#

exitWith()?

winter rose
#

that or _pkloivar = false;

astral bone
#

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-

unborn bramble
#

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?

winter rose
hallow mortar
#

You could manually make your own string selection system to do that :D

unborn rivet
fair drum
#

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?

granite sky
#

I'd assume local as I'm pretty sure clients don't get each other's arsenal events.

distant egret
#

Which is local I'm guessing.

granite sky
#

Yeah, the BIS arsenal is about the only thing we use those for.

stray flame
#

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

winter rose
stray flame
#

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

winter rose
#

place them as cargo then?
to prevent it from moving, that's a different story

#

attach it to an invisible vehicle?

stray flame
#

ah

#

yeah could try it

astral bone
#

I feel dirty making my script use someone elses variable names :I
But I need to for compatibility 😅

winter rose
#

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?)

astral bone
#

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?

stiff mesa
#

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.

winter rose
stiff mesa
#

Alright I'll try that 🫡

cyan dust
#

Is there any way to check if the vehicle colliding with something? (terrain/map objects/other vehicles/etc)

cyan dust
winter rose
#

I suppose it should
and what kind of "engine command" would you like? an event is better at that than a hypothetical isCollidingWithAnything _obj

hallow mortar
#

Event handlers (except Scripted EH) are an engine thing

granite sky
#

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.

cyan dust
harsh sedge
#

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.

granite sky
#

Hard to say, but probably in the same ballpark.

harsh sedge
#

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.

granite sky
#

Bear in mind that client performance is still heavily impacted by both simulation and rendering costs of units. Often more expensive than the AI.

harsh sedge
#

Would setting units as hidden and dynamic simulation help with that part?

#

Hidden at a certain distance, that is.

granite sky
#

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...

still forum
#

FindSafePos does a bounding sphere check afaik

granite sky
#

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.

astral bone
#

Can I put a marker behind a location marker? 😅

#

Building marker adding- looks ok, other then the text

storm crystal
chilly fog
#

[2, 4] call BIS_fnc_randomInt
Is something wrong with this code?
Alternatives if not fixable?

unborn rivet
#

Does anyone know how to disable weapon removal in CO10 escape that happens right before person spawn?

granite sky
#

@unborn rivet If that's the mission I've played then you get a backpack full of handguns in your prison shack.

granite sky
chilly fog
#

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

granite sky
#

Paste the surrounding code.

#

I'm gonna guess it's a precedence error.

chilly fog
#

Box1 addItemCargo ["rvg_canOpener", [2, 4] call BIS_fnc_randomInt];
I'm pretty sure that's all.

unborn rivet
granite sky
#

@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.

chilly fog
#

Let me see if I'm missing anything, cause I'm pretty sure thats all I put in

granite sky
#

addItemCargo is a binary command.

chilly fog
#

along with some other lines, that were essentially that line but with different numbers/items

chilly fog
#

what should I use instead?

granite sky
#

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?

chilly fog
#

Yeah, pretty much. I'm pretty new to this

granite sky
#

In an editor init box, this refers to the object that the init is for.

#

so this addItemCargo ["someclass", 2]; would be valid. Ish.

chilly fog
#

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];

granite sky
#

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.

chilly fog
#

Noted, thanks & will do

granite sky
#

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.

chilly fog
#

@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

vague harness
#

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

granite haven
#

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*

granite sky
#

@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.

vague harness
pulsar pewter
#

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)

granite sky
#

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?

pulsar pewter
#

Awesome, cool.
Any thoughts on using a regular fired EH added through the Cfg Vehicles to class CAMan vs a CBA classEH?

granite sky
#

I don't know CBA's codebase very well.

#

Adding a fired EH to CAMan sounds expensive in general.

pulsar pewter
#

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.

sullen sigil
#

if weapon != dronegun exitWith {}

pulsar pewter
#

Yeah thats what I have, but it still does mean adding a firing EH to every person character

granite sky
#

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?

stone hornet
#

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

acoustic yew
#

btw player is different group and the group that will be getting 'disableAi' will be different group

hallow mortar
#
[leftArg, rightArg] remoteExec ["command",targets,JIP];

_unit disableAI "FEATURE";

[_unit,"FEATURE"] remoteExec ["disableAI",_unit];```
acoustic yew
#

ooooo THAT WILL BE A LIFE SAVER!!!

#

ohhh feature as in the type

#

I see

#

like command i mean

acoustic yew
hallow mortar
#
[_x,"MOVE"] remoteExec ["disableAI",_x];```
acoustic yew
#

yeah ofc with _x but like this right?

{
[_x,"MOVE"] remoteExec ["disableAI",_x];
} forEach units convoyGroup;```
hallow mortar
#

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.

acoustic yew
#

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;
hallow mortar
#

No, that's not correct

acoustic yew
#

oof ;-;

granite sky
hallow mortar
#

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.
acoustic yew
#

OHHHH

#

Left-right I see

#
{
    [vehicle _x, convoyMinSpeed] remoteExec ["forceSpeed", vehicle _x]
} forEach units convoyGroup;
#

I think that works? ^^

hallow mortar
#

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 ])

harsh sedge
#

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.

acoustic yew
#
{
    [vehicle _x, convoyMinSpeed] remoteExec ["forceSpeed", vehicle _x]
} forEach units convoyGroup;```
this should do then i guess
harsh sedge
#

Very simply, for testing.

winslett kbTell [player, "sitrep1", "Sentence1"];```
The above works in editor testing, but will not run live in a dedicated environment.
granite sky
#

What if you run both of those local to the player?

acoustic yew
harsh sedge
#

Still no effect

#

I don't know what the function is doing right and I am doing wrong to get it to work.

hallow mortar
harsh sedge
#

Wait

#

It works

#

but only when kbTell is called on the server

hallow mortar
#

kbTell is Local Argument, and if winslett is an AI it's likely to be local to the server

harsh sedge
#

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

granite sky
#

oh, I thought that's what you tried first.

harsh sedge
#

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.

granite sky
#

So how do you make it work given that the AI and player don't have the same locality?

harsh sedge
#
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.

stone hornet
#

Hey, dont mean to double post so soon but does anyone have a direction they can point me in?

harsh sedge
#

Hmmmm

#

I suppose, you could make an array of the classnames of the weapons, and then create them at buildingPositions inside certain buildings.

stone hornet
#

okay explain it too me like i have never done this before XD

granite sky
#

"don't do it" :P

#

Both parts are pretty complex tbh.

stone hornet
#

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/

harsh sedge
#

_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.

stone hornet
#

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

harsh sedge
#

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",]

stone hornet
#

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

harsh sedge
#

The triggers determine where gear will spawn

#

It seems to accoutn for the players approaching by its own logic.

stone hornet
#

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?

harsh sedge
#

That's what it looks like to me.

stone hornet
#

okay cool, cheers bud this has really helped 🙂

i might be back in panic XD

harsh sedge
#

S'lright, the details section has a small guide to the settings.

stone hornet
#

i am assuming i can test this in the editor

acoustic yew
harsh sedge
hallow mortar
acoustic yew
#

:(

granite sky
#

Maybe check your logic on localhost first.

acoustic yew
#

it works on local host :)

acoustic yew
granite sky
#

shrugs

#

You'd need to have something wrong outside what you've pasted.

acoustic yew
#

hmmmmmmm

granite sky
#

It's not like enableAI somehow doesn't work when remoteExec'd.

acoustic yew
#

;--;

#

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

hallow mortar
#

resumeCommand = {
There's no matching }; at the end, this tends to break things

acoustic yew
#

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

stone hornet
kindred tide
granite sky
#

It's a one-off removal on init, but I'm not sure on the mechanism.

kindred tide
#

my mod also takes away player weapons..by using removeAllWeapons lol

#

what else could it be

granite sky
#

It's more the timing.

#

Arma gives you a lot of different ways to run code badly

kindred tide
#

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)

harsh sedge
unborn rivet
kindred tide
#

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

split scarab
#

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

dapper cairn
#

is there a script for a trigger that changes greenfor from friendly to enemy when triggered?

warm hedge
#

setFriend

dapper cairn
#

yeah i found it right after i asked

kindred tide
#

when player creates a map marker, what is its auto-generated name? i need to reference it in script

granite sky
#

It's in the docs for allMapMarkers

kindred tide
#

thanks, it works for A2 too

#

(i just didn't include the channel ID)

kindred tide
#

(i used onMapSingleClick for now)

ivory sphinx
#

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.

tulip ridge
#

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.

kindred tide
#

_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

tulip ridge
#

Yeah, basically just tying double click on the map to a keybind lol

pulsar pewter
#

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)

kindred tide
winter rose
tulip ridge
#

Was mainly asking in-case there was some parameter passed to createMarker or something like that I couldn't seem to find

kindred tide
#

i doubt it would ever do even more than 10 iterations. you just exit the loop when you found an unused ID

winter rose
kindred tide
#

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

winter rose
#

you set it on creation

tulip ridge
#

I mean the one used for user-defined markers:
_USER_DEFINED #<PlayerID>/<MarkerID>/<ChannelID>

kindred tide
#

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)

tulip ridge
# winter rose it might be the last one created in `allMapMarkers`

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"
]
west grove
#

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

kindred tide
#

is it just this specific aircraft or all of them

west grove
#

same with hellcat

little raptor
west grove
#

yeah

#

same with huron, so i guess it's a general issue

little raptor
#

yeah looks like it's broken

#

@unique sundial

little raptor
west grove
#

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

pulsar pewter
little raptor
#

neither is _weapon

pulsar pewter
#

goddamnit. I need params in there.
I KNEW IT WAS SOMETHING STUPID BC ITS ALMOST 3AM!

#

ahhh!

#

lol thanks leo

little raptor
#

for CAManBase (all human characters).
for men you should use fireMan EH

pulsar pewter
#

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)?

little raptor
#

FFV still works

#

but operating a vehicle's weapons won't

pulsar pewter
#

So, given that I'm writing a weapon check anyways, for this specific EH, fired vs firedman won't make a difference?

little raptor
#

I guess you could just leave it as Fired if that weapon is indeed infantry weapon

pulsar pewter
#

(I get the distinction for other cases, though)

#

cool, glad to know Im not a complete idiot at 3am.

unique sundial
west grove
#

latest dev

#

2.13.150832

unique sundial
#

already fixed in 150838

#

was a typo

sullen trellis
#

was wondering if there is a way to make trigger act when inventory item drops on the trigger zone as a condition

kindred tide
#

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

unique sundial
jade acorn
#

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?

split scarab
#

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);
warm hedge
#

What is "arty1" or others?

split scarab
#

I'm doing it in Eden Editor, but they're Ordnance Effect "objects"?

warm hedge
#

So it is an object?

#

Then it shouldn't be a string

split scarab
#

I'm not sure if they're actual objects, I've placed 5 Ordnance Effect modules and all named them arty1-5

cosmic lichen
#

missionNamespace getVariable [_selectedPos, [0,0,0]];

warm hedge
#

You miss a bracket, noob

split scarab
cosmic lichen
#
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);
split scarab
cosmic lichen
#

Because object is no more because that's what bombs do

split scarab
#

So bombs destroy even ordnance effect modules?

cosmic lichen
#

nope

#

but aren't these deleted after their function ran?

#

Not sure

split scarab
#

I honestly don't know, first time every using the editor

cosmic lichen
#

If you just use the module as position reference

#

I'd replace them with markers or a helper object such as an Invisible Helipad

split scarab
#

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

cosmic lichen
#
{
    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

cosmic lichen
#

You can use this to get a random position inside an area, trigger or marker

split scarab
#

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]

cosmic lichen
#

No, like I wrote above

split scarab
#

Sorry I don't really see the difference

cosmic lichen
#

Nevermind, my bad.

#

You wanna use the randomPos thingy now

split scarab
#

Preferably, would make it seem more authentic

cosmic lichen
#
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

split scarab
#

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

cosmic lichen
split scarab
#

Awful approach I take it haha

cosmic lichen
#

you can use that, but you don't want to put a 0 in the random <array>

split scarab
#

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

cosmic lichen
#
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.

cosmic lichen
split scarab
#

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

cosmic lichen
#

I have adjusted to code above for multiplayer

split scarab
#

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?

cosmic lichen
#

Check the biki for the documentation

split scarab
#

Alrighty, thank you

granite haven
#
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?

little raptor
#

because your for loop is moving past the end

#

it should be count _array - 1

granite haven
#

ah k, ty

#

damn that made me delete alot of stuff bc i couldnt find that

still forum
#

That for loop is bad anyway

private _array = [5,6,7,8,9,10,11];
{ systemChat str _x; } forEach _array;
kindred tide
#

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

winter rose
#

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 😄

kindred tide
#

if it landed using "GET IN", is it supposed to take off after someone entered?

#

because it did.. but just once

kindred tide
#

they also fly helicopters just fine, and land too, but i'm unsure how they decide when to take off

winter rose
#

¯_(ツ)_/¯

#

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

stone hornet
#

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

hallow mortar
#

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).

hallow mortar
kindred tide
#

it worked perfectly for me yesterday, i'm looking hard at what changes mighta broken it

kindred tide
#

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

vapid scarab
#

May I suggest logrithmic for the speed.

south swan
#

inb4 some linearConversion shenanigan

kindred tide
vapid scarab
#

\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.

kindred tide
#

i need it to crawl real slow to not miss the landing position

vapid scarab
#

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.

south swan
#

inb4 smoothstep and sqrt

kindred tide
#

will try after sleep

south swan
#

d on the graph can be achieved in-game with single linearConversion [f, c, x, 0, 1, true] call

drowsy umbra
#

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/

#

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?

south swan
#

you swap the loops, so the inner does lookAt for all the radars and then outer one sleeps blobdoggoshruggoogly

fair drum
#

You can spawn individual instances for each system. Also... I like for loops for numbers instead of that eyesore lol.

drowsy umbra
jade turret
#

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 .

granite sky
#

It's trying to reuse the same marker names over the two passes.

south swan
#

a) you should enter multiple classnames as: ["Land_WaterTower_01_F", "Land_WindmillPump_01_F"]

#

b) what John says

granite sky
#

oh yeah, you're missing some quotes on the classname array.

formal stirrup
#

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?
hallow mortar
#

Because comparison is ==. = is setting the variable's value to "amovpercm..."

formal stirrup
#

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

jade turret
#

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 ...

fleet sand
jade turret
#

ok i missed the 2 inner quotations

#

but are the brackets in this case functionally identical ?

granite sky
#

The brackets are, yes.

jade turret
#

(not) identical

#

ok

#

so i understood this right

#

i only forgot two quoation marks

granite sky
#

Nah, it still has the marker re-use problem.

jade turret
#

i just tried it and it works

granite sky
#

You should be using _MarkerCount for creating the marker names, not _forEachIndex.

#

It'll nearly work

jade turret
#

i didnt write this code

granite sky
#

sighs

jade turret
#

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 ?

granite sky
#

It'll be a problem if both of those classnames exist in any quantity at all.

#

and yes, worse if you add more classnames.

jade turret
#

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

jade turret
#

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

south swan
#

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

jade turret
#

no

#

but that they are all marked with a red dot

#

i seems i missunderstood that

unborn bramble
#

Is it possible to translate slot names from stringtable?
Both localize and $STR don't work, or i am doing something wrong.

naive needle
#

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

molten yacht
#

uh

#

can selectRandom not be fed an array reference?

naive needle
#

selectRandom array

molten yacht
#

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.

naive needle
winter rose
still forum
naive needle
kindred tide
#

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

hallow olive
#

another tip for landings is to spawn an invisible heli landing pad on the spot you want them to land

kindred tide
#

i did it when i used, you know, the land function

hallow olive
#

you can also spawn a clutter cutter to get rid of bushes / rocks etc

#

ah yes the land function

#

if only right haha

kindred tide
#

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

hallow olive
#

awesome

drowsy umbra
#

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

kindred tide
#

is it even possible to delete the 0th waypoint

drowsy umbra
#

yeah, that's code from the BI wiki afair

kindred tide
#

and why are you deleting it over and over

#

deleteWaypoint [_group, _i];

drowsy umbra
#

Yeah, the loop deletes all waypoints of the group

kindred tide
#

oh i see now lol

hallow olive
#

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"

drowsy umbra
#

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

kindred tide
#

bet you could _grp setCurrentWaypoint [_grp, (currentWaypoint _grp) + 1];

hallow olive
#

sure you can just call sync after you create it

drowsy umbra
hallow olive
#

actually indeed

#
drowsy umbra
#

Unsure if that would work in my specific case, here's what i'm doing basically

hallow olive
#

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/)
drowsy umbra
#

Oooohhhhhh

hallow olive
#

that's using HOLD but should work for LOITER the same way

drowsy umbra
#

fingers crossed it will

hallow olive
#

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

drowsy umbra
#

Deleting didn't work for some reason with my script-created waypoint, but it did work when I just plonked down a regular loiter

kindred tide
#

did setCurrentWaypoint work

drowsy umbra
#

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 ;

drowsy umbra
kindred tide
#

so, it's hanging on that waypoint even if you change its current waypoint to any other?

drowsy umbra
drowsy umbra
#

But, doStop works just fine...

kindred tide
#

is driver a unit or agent

drowsy umbra
#

unit, just a normal civvie

hallow olive
#

what is your crteria for getting them to move on? because you can just add a Condition directly the waypoint as well

drowsy umbra
#

When the player hits radio alpha, lol

kindred tide
hallow olive
#

is the area safe? sometimes you have to set support/transport pilots to CARELESS to get them to fly into hot zones

kindred tide
#

when you set current waypoint it doesnt care about completing its previous wps conditions

drowsy umbra
#

It just continues to loiter

kindred tide
#

are you sure it loiters because the wp is LOITER, what if you change that altogether to some different type

drowsy umbra
#

It does loiter, it enters the little circle

hallow olive
#

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 🤔

drowsy umbra
hallow olive
#

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

granite sky
#

It doesn't tell the group to do anything after deleting the waypoints?

drowsy umbra
drowsy umbra
granite sky
#

that's a curious setCurrentWaypoint.

hallow olive
#

yeah i don't see where you hhave given it a land waypoint?

#

lost in the shuffle maybe?

drowsy umbra
#

Oh, does the BIS_fnc_wpLand not do it?

granite sky
#

I have no idea what wpLand does. Would have to read it.

hallow olive
#

i see that now yes

granite sky
#

but when you call setCurrentWaypoint it hasn't executed wpLand yet.

drowsy umbra
#

It works fine with "heli land "LAND" " but that just makes it land immediately, instead of landing at the helipad.

hallow olive
#

i was refereing to the pastebin

#

try skip instead of delete

drowsy umbra
drowsy umbra
#

how do you skip a waypoint exactly?

granite sky
#

Just setCurrentWaypoint to the next one.

#

Seriously, what is this line supposed to do:

_group setCurrentWaypoint [_group, (currentWaypoint _group) + 2];

drowsy umbra
drowsy umbra
granite sky
#

looks like wpLand doesn't use waypoints except as a landing position indicator.

hallow olive
#

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

drowsy umbra
#

Okay. Yeah I just don't get why it's not getting out of the loiter

hallow olive
#

flat enough open enough and not under threat

drowsy umbra
hallow olive
#

but often they at least advance in that direction

granite sky
#

hah, also it doesn't reference the third parameter at all

hallow olive
#

heliBase?

#

you added a helipad object or you just see one painted on the ground? because not all the paited ones are actually objects

drowsy umbra
#

Added a custom one

hallow olive
#

(another reason there's an invisible helipad to drop in just in case)

#

ah okayu

drowsy umbra
#

or, dropped in one of the default editor helipads lol

hallow olive
#

"should work" but this is arma

#

much fun

granite sky
#

all wpLand does here is a doMove to the position, and then a land once unitReady returns true.

drowsy umbra
#

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

granite sky
#

What do you have here? Just an AI pilot in a helicopter?

granite sky
#

One guy?

drowsy umbra
#

One guy.

granite sky
#

No-one else in the group anywhere?

drowsy umbra
#

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)

granite sky
#

oh, you're in the heli as well?

drowsy umbra
#

Yes, but even if I jump out of it, the issue persists

granite sky
#

Can you package the scenario and send it? Preferably with vanilla assets.

drowsy umbra
granite sky
#

should be pretty small zipped. PM it to me.

kindred tide
#

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

hallow olive
#

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

granite sky
#

There are at least two Arma bugs here :P

#

well, one of them might be intentional.

hallow olive
#

features yes

granite sky
#
  1. If you set the current waypoint beyond the (final) loiter waypoint, it ignores you and switches back to the loiter waypoint.
  2. Even if you delete the waypoint, it'll still move back there after the doMove (but not loiter at least).
hallow olive
#

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

granite sky
#

Having actually "completed" the "deleted" waypoint from 2, you can actually then do what you like.

hallow olive
#

yeah i guess the problem is loiter never completes?

granite sky
#

So a deleted waypoint still acts like a real one, more or less.

hallow olive
#

sure

granite sky
#

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?

hallow olive
#

i thought it might be just stuck in the turn so i tried heli sendSimpleCommand "STOPTURNING"; but it doesn't break out

granite sky
#

nah, I dismantled it.

#

It's definitely still following the deleted waypoints.

hallow olive
#

so really not actually deleted

granite sky
#

hmm, maybe if you delete the waypoint, create a move waypoint, and then delete that.

hallow olive
#

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)

granite sky
#

It never calls land because it doesn't hit unitReady.

#

After the doMove it then just switches back to waypoint following.

hallow olive
#

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

granite sky
#

still doesn't work. impressive.

kindred tide
#

it's not worth fighting with

#

the AI dont have the "just do it" mode

hallow olive
#

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 :/

hallow olive
kindred tide
#

you're deep in the jungle with lots of variables that are hidden from you

hallow olive
#

just trying to see through the matrix man

kindred tide
#

break the matrix. replace the pilot with an agent. join the evil side.

#

it'll do as you say and never question the orders

hallow olive
#

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

kindred tide
#

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)

granite sky
#

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.

kindred tide
#

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

hallow olive
#

^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

granite sky
#

Good luck. AI pathing with building paths is busted above the ground floor :P

kindred tide
#

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

hallow olive
#

yeah that's why they walk off the roof in the first place

kindred tide
#

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

hallow olive
#

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

granite sky
#

I'm not convinced that they know where they are in Z terms.

#

I suspect some giant ATL/ASL screwup.

kindred tide
#

is there a function that converts exact direction to a more vague like north-east, west, etc?

#

wrote my own lol

kindred tide
#

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)

kindred tide
#

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

jade acorn
#

is this still about scripting

acoustic yew
kindred tide
jade acorn
# kindred tide 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.

cosmic lichen
#

Is there a way to make captured group all lower case before replacing it iin the original string with regexReplace?

kindred tide
kindred tide
molten yacht
#

ugh, does ACE3 really not have any way to script restore someone's stamina?

warm hedge
#

I would trolerate to discuss non-Arma 3 scripts unless is Reforger/Enfusion. So please keep it going

granite haven
#
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*

granite haven
#

can the debug console bypass these disabled commands even if they are executed locally?

cosmic lichen
#

The answer is \L$1

cosmic lichen
#

😮

little raptor
little raptor
cosmic lichen
#

\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

kindred tide
#

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

warm hedge
#

sideChat or any other chat related commands

kindred tide
#

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

warm hedge
#

Chat is also a part of HUD though

kindred tide
#

i mean interaction with the NPC

warm hedge
#

Then I have zero idea what is your need

kindred tide
#

like addAction

warm hedge
#

Then addAction?

kindred tide
#

actions and convo topics dont appear in the same menu

warm hedge
#

Now I think I started to understand what you need - Do you mean 0-8 menu?

#

If not, please show a pic

warm hedge
#

Firstly, a conversation is actually what you need?

#

What EXACTLY is your goal?

kindred tide
#

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

warm hedge
#

And what exactly it triggers?

kindred tide
#

i bet it's the eventHandler param in the kbAddTopic, but i'm unsure

winter rose
warm hedge
#

Probably because I lack a much of experience with kbanything, but I still don't see what you imagine

kindred tide
#

i'm just trying to add a convo topic without a bikb convo file. a barebones empty topic that only runs a command

winter rose
warm hedge
#

I'm thinking the same but wasn't really sure what exactly was needed

kindred tide
#

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 };```
winter rose
#

these sections are required iirc, unless you enjoy crashing the game :p

#

read the doc

warm hedge
warm hedge
#

Okay, then I'll shut up. I guess I need to learn about convo system

winter rose
warm hedge
#

Well I mean making external file is painful

winter rose
#

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" 😄

kindred tide
#

it''s like skyrim with guns

warm hedge
#

I don't really call Skyrim is a sandbox but terms of deep modding sea, indeed

#

...Wait, isn't it called Fallout?

lapis ivy
#

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...

little raptor
#

Can't compare arrays using !=

#

Use isNotEqualTo

lapis ivy
#
/* 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?

little raptor
#

Yes. That param [0] is nonsense. Is this generated by AI?

lapis ivy
#

ok, thx, It seems to work

little raptor
#

Well then just write #0

#

Or if you need a default value do param [0, def]

cold mica
#

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

cosmic lichen
#

use #include or put some of the code in CfgFunctions

winter rose
#

CfgFunctions

or if you have to keep them as execVM files at all cost
initServer.sqf
initServer
initServer\myFileA.sqf
initServer\myFileB.sqf

cosmic lichen
#

What wrong with all that execVM hate 😄

winter rose
#

IO

opal ember
#

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?

unborn rivet
# kindred tide you could `waitUntil { (primaryWeapon player) == ""};`

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.

hallow mortar
opal ember
fleet sand
# hallow mortar You would want to attach it to the player object, and use the memory point for.....

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.

opal ember
hallow mortar
#

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

still forum
#

Optiwand owoyay

hallow mortar
opal ember
cold mica
# cosmic lichen use `#include` or put some of the code in CfgFunctions

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?

hallow mortar
opal ember
cosmic lichen
#

They run on all clients and jip

cold mica
#

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.

cosmic lichen
#

Eh is the only way

jade acorn
#

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

cold mica
#

Then eh is the way

jade acorn
#

and how would I make that EH detect multiple keyDowns?

cosmic lichen
#

Scripting

jade acorn
cosmic lichen
#

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]

hallow mortar
cosmic lichen
#

if no imput happens in given time (diag_tickTime) disable cheat mode

jade acorn
#

thx

hallow mortar
cosmic lichen
#

Good point.

warm hedge
#

@crude egret Get rid of the R word.

hasty gate
#

Hi, does anyone know how to force network update of position of an object via scripts? (setPos etc. in some cases is not immediate)?

lyric schoonerBOT
winter rose
hasty gate
winter rose
#

try telling what you are trying to achieve first

hasty gate
#

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

queen plume
#

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.

hallow mortar
hasty gate
limber heart
#

How do I run a map wide no pop = false script?

little raptor
#

where do you run it from?

limber heart
#

to correct the above it makes all targets not stand back up on the map

little raptor
#

is the trigger server-only?

limber heart
#

oh yes

#

i see it says server only

#

@little raptor would that be what is messing with it is the server only box checked?

little raptor
#

no it has to be server-only (based on your code)

limber heart
little raptor
#

The Script fails to produce the intended results on this map specifically
just to be clear, what is the intended result?

limber heart
#

The range is screwing with the map, breaking all pre-placed targets as well as any new eden placed targets

little raptor
#

well I don't see anything that could break targets

limber heart
#

I tried this on other maps, same thing, the range breaks all targets on the map

little raptor
limber heart
little raptor
#

yes

#
sleep 3;
nopop = false;
#

but do you need the targets to pop back up?

limber heart
#

except for ones in certain areas

little raptor
#

ok. try without the sleep first

#

if there's a problem try with sleep

limber heart
#

it works!

#

thx @little raptor

queen plume
#

Thanks for your help cheer

little raptor
#

np

limber heart
# little raptor 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)

little raptor
#

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 meowsweats )

pulsar pewter
#

Leo, why dont you like people using setPos?

#

re:

little raptor
#

because it's a broken command. and I've had a lot of bugs because of it 😓

pulsar pewter
#

!quote 5

lyric schoonerBOT
little raptor
#

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... meowsweats

#

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

tulip ridge
#

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.

little raptor
#

It also seems much longer, given that the actual .wav file is only ~4 seconds long.
well your own systemChat says sleeping for 15s

tulip ridge
#

Yeah, it should:

  1. Play the sound
  2. Wait 15 seconds
  3. Loop
#

Does sleep affect the playSound?

little raptor
#

then why do you say it should be 4s?

little raptor
tulip ridge
sullen sigil
#

you have disabled it being simulation = fountain, right?

tulip ridge
#

Yea

little raptor
#

maybe the obj itself is playing its own sound

tulip ridge
sullen sigil
#

hee hee

little raptor
#

I'm sure you'd still hear the object if you removed the [_object, _soundFilename, _soundDelay] spawn BNAKC_fnc_playLoopingAudio; line

tulip ridge
#

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

sullen sigil
#

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)

tulip ridge
#

I was working on a separate branch, went to main to fix a bug, went back to this branch

sullen sigil
#

smort

tulip ridge
#

I like to use separate branches for larger features/systems, and then make a pr / merge them into main once fully complete

sullen sigil
#

my capital ships mod has been built out of a folder in my documents for the past 6 months

little raptor
#

did you fix the lag btw?

sullen sigil
#

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

drowsy umbra
# granite sky Only way I found of properly clearing the waypoints is to joinSilent the driver ...

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 think_turtle

granite sky
#

Kinda the wrong use of joinSilent

#

surprised it works at all tbh

drowsy umbra
#

Oh? I've never used it before...

granite sky
#

wait, that's another unit's group?

drowsy umbra
#

Yeah. Joining to a brand-new civilian

#

Should I join to grpNull?

granite sky
#

just do this:

[driver heli] joinSilent groupNull;
private _group = group driver heli;
#

whoops grpNull

#

btw wpLand is kinda daft here.

drowsy umbra
#

Okay, let me try that

granite sky
#

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.

drowsy umbra
#

Hmm, it doesn't like it. Going to try it in a new scenario again

drowsy umbra
#

One thing does puzzle me a bit though, why is a loiter waypoint so hard to break? Was that by design?

granite sky
#

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.

limber heart
#

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

little raptor
#

like I said nopop is a global var

#

you can't use it per target

flat eagle
#

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?

warm hedge
#

How is your script so far?

flat eagle
#

like what does it look like?

warm hedge
#

We cannot really help without your source, yes

fair drum
#

Give us the precious

warm hedge
#

We always need a precious strike yes

fair drum
#

Can you sign enhanced artwork supporter yet lol

warm hedge
#

Why I need to?

flat eagle
#

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

warm hedge
#

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?

flat eagle
#

because its findDisplay 42

warm hedge
#

No, BIS_fnc_strategicMapOpen returns a display so no need to even find one

flat eagle
#

you mean return the display

warm hedge
#

Display is already returned

flat eagle
#

ok i think i understand

warm hedge
#

And do you know how to close a display?

flat eagle
#

closeDisplay

warm hedge
#

Okay, you get the idea yes

flat eagle
#

thanks buddy ill let you know if it works out

tulip ridge
#

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

warm hedge
#

Define mission has started. time > 0, or something else?

tulip ridge
#

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

warm hedge
#

In MP, having loading screen can start the time already

tulip ridge
#

Not too big a deal, it's just making a sound effect not play in Eden because I found it obnoxious.

granite sky
#

getClientStateNumber gives you something.

warm hedge
#

Does it work on SP though? I haven't experienced with it

granite sky
#

probably not.

tulip ridge
#

Only specifically says network game

granite sky
#

waitUntil { !isNull findDisplay 46 } is fairly common I think.

tulip ridge
hallow mortar
tulip ridge
tidal idol
#

Anything I can do here to make sure a tracer always spawns in my module?

_lasSatShot = createvehicle [_ammoType,_shotPosition,[],0,"none"];
_lasSatShot setVelocity _shotVelocity;```
warm hedge
#

I have actually no idea if createVehicle'd ammo can have tracer but only properly fired ones

ashen ridge
#

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?