#arma3_scripting

1 messages ยท Page 727 of 1

meager epoch
#

and by exact, i mean i got the numbers ready

#

not getting any position

copper raven
#

it doesn't matter if you put the numbers yourself or not, what matters is the position format, you should be using the appropriate command for it

meager epoch
#

alright, thanks

little raptor
#

you should never use setPos. use other position formats

fair drum
#

!quote 5

lyric schoonerBOT
fair drum
#

its everyday now lol

pallid prairie
#

Hello! I participated in the pre-Steam alpha tests of DayZ Standalone back in April..? of 2013, and possess a unique version of the game that I'd like to see if anyone here is aware of. The version is 0.14.0.103280, dated 3/30/2013. I've been doing some work to convert Enforce scripts to SQF, essentially back-porting post-1.0 content into a version of the game that could still be considered Arma 2 at its core. I understand this Discord is primarily for Arma and Arma modding, but considering DayZ modding has evolved so drastically, I feel as though this particular build of the game belongs here. https://www.youtube.com/watch?v=6XSH1s7n7yw&t=214

#

(if I'm posting this in the wrong channel feel free to correct me by the way ๐Ÿ™‚ )

little raptor
pallid prairie
fair lava
#

i dont think theres a config option, so:
is there a way to force an ai to keep their radar on at all times

#

i've done _this setVehicleRadar 1; but it doesn't appear to work

#

i had that in an init event handler, when that didnt work i tried using zeus to run it on the unit directly, still the radar is off

plush nova
#

Can add-on scripts set mission event handlers?

fair drum
fair drum
fair drum
# fair lava yea

so those are stupid picky for some reason. they only turn on if they are in danger. but how will it know if it is in danger if its radar is off? its goofy. You can use a high refresh rate loop or a eachFrame event handler

#

and set it manually

#

cause its gonna want to turn it back off if there is no threat again so you have to keep smacking it against the head

fair lava
#

rooThink i see

#

i know theres a way to disable ai from doing specific stuff, like walking, shooting

#

is there a way to stop ai from turning the radar off

fair drum
#

drone ai works differently. you won't see this happen with things such as manned AA

#

i've only had the issue with LR radars

fair lava
little raptor
#

and disable autocombat

fair drum
#

could work. I know i ran into an issue with combat modes as well, as the drone radar didn't care, it would always reset. been a while since i messed with them though.

opal sand
#

where should i go to learn sqf? is it an arma only code or are there online courses around?

fleet stirrup
#

https://community.bistudio.com/wiki/SQF_Syntax Here is some base information about the syntax, it's unfortunately specific to arma though there are plenty of examples in the community! All of the operators/commands and functions (you will learn the difference in the aforementioned link) are documented on the wiki

exotic tinsel
#

Can someone share a guide for adding options to an addon? The for setting option to be used in the configure addons menu.

graceful pewter
#

Looking for a bit of editor help to play a video on a tv screen during a multiplayer briefing; can someone please help?

exotic tinsel
#

@fleet stirrup thanks alot mate

#

cant believe its not an arma feature. wait, yeah I can.

fleet stirrup
fleet stirrup
exotic tinsel
fleet stirrup
#

I haven't done much UI stuff, but if you wanted that then maybe #arma3_gui can help you

exotic tinsel
graceful pewter
graceful pewter
opal sand
#

I wonderif SQF will be used in ARMA 4 in any capacity?

plush nova
#

is there a way to set the direction that a tree falls in? it looks like all the trees on e.g. Stratis fall in the same direction if you setDamage 1 them

#

which looks really strange if you knock over a bunch at once

#

i tried running _tree setVectorDir ( [vectorDir _tree, random [0, 180, 360], 2] call BIS_fnc_rotateVector3D); before running setDamage which unfortunately doesn't seem to work

unkempt bay
#

Hello,
Is there a way to put a vehicle on fire manually with the new ace update ? with ace_cookoff
I don't know how to cook off vehicles ๐Ÿ˜ฌ how is it trigger, with special kind of damage?

fleet stirrup
tidal ferry
#

Hey, does anybody know how to contact Jeroen?

unkempt bay
fresh wyvern
#
params ["_newVeh","_oldVeh"];
for "_i" from 1 to 16 do {
    createVehicleCrew _newVeh;
[_newVeh, ["I_Soldier_LAT_F", "cargo", 0], false, true, false] call BIS_fnc_initVehicleCrew; 
_newVeh setUnloadInCombat [true];
};

Hi, I try to make the respawn vehicle function respawn a Mohawk with 16 "I_Soldier_LAT_F" soldiers inside. Unfortunately the code also spawns a blufor infantry man for every spawned "I_Soldier_LAT_F" soldier. Anyone who know what I need to do to stop spawning blufor infantry men alongside the "I_Soldier_LAT_F" soldiers?

meager spear
#

Helloooo! Is here anyone confident with VIV scripting? I am learning to use it from rhs attach_cargo script and I am in a good point. How can I set to load also heavy vehicles and not only "light" vehicles?

#

Text me MP ๐Ÿ˜‰

frozen knoll
#

@fresh wyvern remove the line
createVehicleCrew _newVeh;

#

that will be creating a blufor crew before you created the "I_Soldier_LAT_F" crew also you could change
[_newVeh, ["I_Soldier_LAT_F", "cargo", 0], false, true, false] call BIS_fnc_initVehicleCrew;
to
[_newVeh, ["I_Soldier_LAT_F", "cargo", 0], true, true, false] call BIS_fnc_initVehicleCrew;
deleteCrew: Boolean - (Optional, default false) true to delete existing crew

tepid vigil
#

Does anybody know if there are any rules regarding classnames, as in character restrictions? I am wondering if there is a chance that I'll encounter classnames that toLowerANSI can't handle

wind hedge
#

I enabled dynamic Simulation on my mission, then I enabled dynamic simulation on all Ai groups. Start the mission and move the player far away from the Ai unit. The Ai unit should have its simulation disabled yet when I run: "simulationEnabled AiUnitXX;" the return is TRUE

#

Why is that? Should't those units have their simulation disabled then?

little raptor
fair lava
#

this is a somewhat complicated question;
so i made a long range AA piece, based off of the vanilla defender sam system, it has a 16km range, but the ai seems to only want to fire it at about 10km, even on a MP server

#

i see no obvious config reason why it'd be limited like that, so all i can think of is its some kinda view distance limitation?

#

how does "beyond visual range" work in arma?

#

..is there a wiki page on simulation in general? how it works with multiplayer, ai ownership, etc?

#

...or am i going down the wrong path entirely and its nothing to do with simulation, if i set it to 32km range it'll work

plush nova
#

is there a way to safely determine if a man is "airborne"? e.g. being chucked by an explosion, currently falling off a cliff, etc

#

would just checking something like PositionAGL > 0 work here? or does that cause false positives from e.g. the vaulting animation

little raptor
#

the best way is using event handlers to detect when falling animations are triggered

#

you can start a loop after that to check the AGLS height

plush nova
#

well i noticed if an explosion doesn't kill a guy but does boop him, it actually doesn't change his animstate

#

he just kinda floats around in weapon ready stance

#

granted this is a very rare occurrence that is only happening because i set man's armor value to like 100 for the purposes of the test

distant oyster
fair lava
#

yes i've been using that as the base for my new aa system

#

i'll re read it though, see if i can find something

#

could it be something along the lines of the ai not deciding to fire, maybe i need to mess with the settings for ai engagement ranges?

#

manually controlling the aa site it works fine at 16km

plush nova
#

is there a way to check for all nearby, say, fences or whatever, that would work for both terrain-placed and editor-placed versions of the object?

#

nearestTerrainObjects doesn't seem to include editor-placed versions of the same object (like fences or power poles) and the terrain-placed objects mostly seem to be lacking classnames so they don't show up for nearestObjects

manic sigil
#

Oh cool, the colors for the chat channels are stored as a config!

commandchannel: {"0.8275*1.4","0.8196*1.4","0.1961*1.4",1}

uhh... gotta say, haven't seen Arithmatic RGB in turbo mode before ._.

elder lance
#

Hi here, i'm having troubles using setunitpos on a ai unit, the ai don't want to "CROUCH" "PRONE" or "STAND", do i have to play with combat mode ?

little raptor
#

if you're testing it on your AI group, you must set them on auto

elder lance
#

@little raptor it's ai group created via script

little raptor
#

I know for a fact that it works fine

little raptor
#

refer to the wiki

#

iirc it uses LOW MIDDLE etc

elder lance
little raptor
#

not CROUCH PRONE etc

elder lance
#

ok i was trying to use the stance return value

#

working with down middle up , what would I do without you... thanks, i'm using your console , the intellisys is great !

#

pin watch is super usefull too

calm yarrow
little raptor
calm yarrow
elder lance
#

i can't understand the following

_athing = "xyz";   
_myvar = //the value can be 1,2,3,4 or 5;


 switch _myvar do {
                    default {/*here _athing is undefined*/};
                    case "1": {/*here _athing is defined*/};
                    case "2": {/*here _athing is defined*/};
                    case "3": {/*here _athing is defined*/};
                    case "4": {/*here _athing is defined*/};
                    case "5": {/*here _athing is defined*/};
                    };

why in default _athing is not defined, it is possible to use _athing in default ?

I have read on the wiki :

"The default block will be executed only if no case matches, no matter its position inside the code block. It is not a case, and will never be entered by fallthrough. "

Should Default be considered as a totally different script/scope ?

Am i stupid ? Knowing that I can't be in the default case i should just ignore it ?

little raptor
#

switch _myvar do {
here _athing is undefined*/
no. _myvar is

elder lance
#

i said that because the advanced console returns me an error

little raptor
#

you should run your code. my mod uses in-game command info which are sometimes broken and incomplete

elder lance
#

Ok it was to be sure to understand, having your precise explanations is very appreciated here @little raptor

warm hedge
#

Is there any way to detect if a code throws an error?

little raptor
#

no

proven charm
#

or try - catch that throws script errors not just user throws like it does now

tiny gust
#

File A3\functions_f\respawn\fn_showRespawnMenuHeader.sqf

#

where that at?
It's giving me fatal errors, forcing me to restart arma(the respawn overlay won't show up, permanently leaving players in a map screen)

winter rose
#

in the game files

warm hedge
#

The file path is self-explanatory...

#

Or, you can check in Functions viewer

tiny gust
#

except where is the functions_f?

#

and that's a good idea, but if it just gives me a file directory again that I still can't perceive with my pea brain, I'm still in the same situation

winter rose
#

you cannot edit that file though
what is the error?

warm hedge
tiny gust
#

ah I see.
I was just trying to find it to get a better look, but function viewer should work for at least that

#

and uh, line 61 error. something about _CtrlTeam and _CtrlTickets

warm hedge
#

The error is not there, but where you did

#

Better to post what you did

tiny gust
#

line 61 if...'
Error Undefined variable in expression: _ctrlteam
|#|_ctrlTickets ctrlsetstructuredtext parse...'
Error Undefined variable in expression: _ctrltickets

warm hedge
#

I mean...

#

That's not what I asked

tiny gust
#

I was typing out the error as @winter rose asked earlier

#

and the only thing wrong I've done that I can think of is try to set up a respawn on a carrier.
Though I'm not sure I understand what you mean by what I did.

warm hedge
#

How did you set them up?

#

Not summary but details please

tiny gust
#

ok, its a coop mission, no tickets(unlimited lives).
I have 3den Enhanced to save their loadout on spawn, and have selected respawn on custom position. I also allow them to select the respawn position, and give it a 5 second delay. The respawn is an empty marker named respawn_west near the back of the USS Nimitz aircraft carrier.

#

just found a big ole chunk in my rpt

#

there's quite a few errors surrounding this actually

copper raven
#

when are you getting the errors? does the respawn screen even show up?

tiny gust
#

the timer does, not the overlay with the respawn button.
It happens about like, 10%-20% of the time when spawning/respawning in my mission.

copper raven
#

your respawn config is faulty then

tiny gust
#

rip, ok, thank you

copper raven
#

if the timer appears, that means it's not showing the respawn menu thing, then everything breaks, because the displays/controls aren't there

tiny gust
#

I see. Is there a way to further pinpoint what mod/user parameter is affecting this?

copper raven
#

best would be to just do all your respawn settings in description.ext

#

and avoid editor settings

#

it's important that you define: respawnTemplates[] = { "MenuInventory", "MenuPosition" };

#

respawn type should be 3 aka "BASE", rest is up to you

tiny gust
#

alrighty then, this will be a project for me to tackle once I'm home, thank you for the help

fresh wyvern
#

Hi, anyone who know how to script a waypoint on to a scripted vehicle?

fresh wyvern
#

I've tried that one. I do not get the groupName to work.

winter rose
fresh wyvern
#

I do not understand how to incorporate group into the function.

winter rose
#

to get the group of a driver, use group as in group driver _myVehicle
store it in a var, e.g private _vehGroup = group driver _myVehicle
use this _vehGroup as addWaypoint's argument ๐Ÿ™‚

wind hedge
#

Guys, when grouping civ units to blufor or opfor factions do they loose their "civ behaviour" like running from gunshots and gain the regular "combatant" ai functions?

winter rose
#

now, whether it happens when they are grouped or not, I am not sure

wind hedge
strange elk
#
MyGun = currentWeapon player;
this addEventHandler ["Fired",{(_this select 0) titleText [MyGun, "PLAIN", -1]}];
#

I am trying to get the game to print out the name of the weapon I just shot

#

BUT

#

im getting this error

#

telling me I have a missing ;

#

But its at the end of the line

distant oyster
#

yeah your usage of titleText is wrong. there is no left argument

#
this addEventHandler ["Fired",{titleText [currentWeapon player, "PLAIN", -1]}];
#

also you can't execute that from debug console, this is only defined in EDEN init fields

strange elk
distant oyster
#

yeah. that won't work

#

you could change "this" to "player"

strange elk
#
titleText [MyGun, "PLAIN", -1];```
#

because ^doing this works

#

BUT i didnt want to have to repeatedly spam the "Execute" button

#

thanks\

#

also

distant oyster
#

are you also aware of the fact that the weapon will never change? it will always be the weapon the player had when you assigned the variable, not the weapon he is currently shooting?

strange elk
#

Ok because I didnt want to have to do a code book to print the weapon I am using after pressing F

strange elk
tough abyss
#

Any way to use triggers & SQF to trigger AI if a laser pointer hits near their location?

#

e.g if a laser hits an object within 50M of them

strange elk
#

it worked

jade acorn
#

I'm making my first steps with singleplayer mission making. I have enabled team member switching to player (by adding second playable role in the team) but it seems that once he jumps from the TL to the second role, he can no longer see the squad menu (left down corner thingy) nor control the team in any way. He can't switch back to the original role, too. Any solutions how to solve this?

distant oyster
meager epoch
distant oyster
#

here's the breakdown:
first we use nearEntities to get all LaserTargetW near the trigger. since it only takes a radius we simply choose the maximum width of the trigger via selectMax (triggerArea select [0,2]). Then we do a second filter where we only take all the laser targets that are inside of the trigger area via inAreaArray. the result of this calculation is an array with all laser targets. so for it to return a bool we simply see if it has at least one element via count in it. Thanks for coming to my TEDTalk.

jade acorn
#

i really thought this is somehow automatic sad

tough abyss
#

@distant oyster Not trying to suck productivity here but I am curious, is there any way to zone restrict players truly?

#

E.g preventing players from physically leaving an area

#

The functions ive seen simply give a warning message and I don't want to just instakill them

distant oyster
#

there's a module where you can specify what happens to a unit that leaves the area

meager epoch
#

Says team switch, but in the examples says unit so idk blobdoggoshruggoogly

distant oyster
jade acorn
tough abyss
distant oyster
jade acorn
#

ugh, I need an adult

tough abyss
distant oyster
#

uuh yeah "Set Waypoint Activiation"

#

works for me with Move waypoints. are you using other waypoint types?

tough abyss
#

My bad, I synced the wrong objective

distant oyster
#

@jade acorn

jade acorn
#

now this is a human language, thanks!

distant oyster
#

i update the biki page for onTeamSwitch to maybe make it clearer

tough abyss
#

Do AI helicopters automatically wait until groups that have a get in waypoint attached to them get inside their helicopter before going to the next waypoint?

#

It seems so

jade acorn
#

and second question, is it possible to have triggers visible in some kind of debug mode, so the blue color of a trigger zone would be visible during the playtest?

digital torrent
#

what command to i use if i want to make all items,weapon,etc drop on the ground to a player?
removeallitem doesnt seems to drop them

little raptor
little raptor
#

you have to do it manually

digital torrent
#

ok thanks for the reply @little raptor

limber panther
#

Hello! Can i ask for a help? I have this script in .sqf file and it is executed by trigger (radio alpha) as execVM

[west, "panic", ["Someones life is in imminent threat! Get to him as soon as possible but be carefull. Your safety is the priority and you never know what happened - there might be a dangerous suspect or someone is just having a seizure.", "PANIC BUTTON has been activated !", ""], player, "ASSIGNED", 99, true, "danger", true] call BIS_fnc_taskCreate;
playsound "panic_sound";
``` The problem is, that the task target is selected randomly. I guess it's caused by that trigger which is executed on each machine, so the task gets created only on the player, who has the fastest computer. So i guess that the solution might be executing this via ace self interaction menu. But can someone help me modify the script so that the task target will be the one who pressed it? I assume that once it will be in ace self interaction menu, the `player` won't work anymore. Also is there a way to make the `playsound` actually be played only for blufor (the ones who receive the task)? Thank you
p.s. the task can be created by anyone (any faction) but only blufor should get the task created
little raptor
#

and change west to player

#

and I'm pretty sure the player you're using as destination is wrong

limber panther
little raptor
#

you might want to change it to objNull or something

limber panther
little raptor
#

didn't you say you want to assign the task to whoever used the action?

limber panther
#

i mean what is it doing?

little raptor
#

west = all west units

#

just read the wiki

limber panther
#

The whole point of this script is, that literally anyone (any faction) can create the task and the player who created it should become the task target (destination) but only blufor should see the task (the task gets created only for blufor players)

little raptor
limber panther
#

i think you misunderstood, anyone (including opfor for example) should be able to create it - basically the script that i sent works as intended it just gets executed on all machines and the game doesn't know where to put the task target

#

so i thought that moving it from trigger into ace self interaction menu would solve the problem but i need to define the task target

#

and you said it should still work with player in there, is that correct?

little raptor
#

but change the playSound part using remoteExec

#

since you said you want it to be heard by west I think

limber panther
limber panther
little raptor
#

yes

brazen lagoon
#

you guys think there's a good way to select any SMG that can have a flashlight?

limber panther
limber panther
little raptor
limber panther
little raptor
little raptor
brazen lagoon
#

yeah that's kinda what I mean, like is there a function that does that already existing or should I just look at config classes

little raptor
#

don't know of any

#

ยฏ_(ใƒ„)_/ยฏ

limber panther
little raptor
#

no

#

wiki has examples

#

there are examples pinned here too

brazen lagoon
#

@little raptor all good, just checking if i can save the work

#

yeah the problem is I can't do like _classname isKindOf "SMG" or similar

#

because the only common thing all SMGs inherit from is Rifle I think

limber panther
little raptor
#

oh nvm, I see what you mean

brazen lagoon
#

well you can do SMG_01_F or similar, but that'll only select that

#

the uhh

brazen lagoon
#

the protector SMG

#

or if you do Rifle it'll select all rifles

limber panther
# little raptor yes ๐Ÿ‘

thank you ๐Ÿ™‚ the wiki didn't really help but your pinned message (that i didn't know about before) is really helpfull and descriptive ๐Ÿ™‚

brazen lagoon
#

@little raptor could you maybe select all weapons that fired pistol ammo that aren't handguns?

#

i dont know how feasible that is..

little raptor
#

maybe

#

ยฏ_(ใƒ„)_/ยฏ

brazen lagoon
#

๐Ÿคท o well

little raptor
brazen lagoon
#

yeah honestly fair

#

me either

#

I think selecting handguns is possible

#

well, like relatively easy

#

because they'll all inherit from the handgun class

little raptor
#

iirc

#

1 rifle

#

2 pistol
4 launcher

brazen lagoon
#

yeah they all inherit from Pistol

#

ah

#

or I can do that yeah

#

and then I can see what ammo they use

#

and then select anything in CfgWeapons that has magazines[] made up entirely of stuff in that handgun ammo array

#

kind of a shitty way of doing it but ๐Ÿคท

little raptor
#

what if an SMG uses an ammo that is not shared with a handgun? thonk

brazen lagoon
#

yeah, that's the problem. like it won't work for stuff like the ADR-97

#

not sure. I'll have to do some more thinking

little raptor
brazen lagoon
#

ammo speed and damage maybe

little raptor
#

SMGs are usually slow, ~ <= 500 m/s ish

brazen lagoon
#

true

limber panther
# little raptor yes ๐Ÿ‘

just tested it and so far it looks fine, thanks for the help, i'll see tomorrow how that goes with more players on the server

ivory lake
#

my math-fu is rather garbage but i'm trying to work out the elevation angle of a mortar.

private _vehicle = vehicle player;
private _weaponDir = _vehicle weaponDirection (currentWeapon _vehicle);
private _Elevation = asin (_weaponDir select 2);

this works correctly when the mortar is on flat terrain however when the mortar is on a slope or other angle the returned elevation angle takes that into account, I don't want it to.

I just want a value similar to the elevation angle displayed in the vanilla UI thats based purely on the model not world

little raptor
ivory lake
#

pppht yeah I just found the command

private _vehicle = vehicle player;
private _weaponDir = _vehicle weaponDirection (currentWeapon _vehicle);
_weaponDir = _vehicle vectorWorldToModel _weaponDir;
private _Elevation = asin (_weaponDir select 2);

works

wind hedge
#
        [] spawn {
            while {true} do {
                {
                    ((findDisplay 602) displayCtrl _x) ctrlSetEventHandler ["LBDblClick", "hint str (lbText [ctrlIDC (_this select 0), _this select 1])"];
                } count [602, 633, 638, 619];//uniform, vest, backpack                
            };
        }; ```
#

โ˜๏ธ This code is able to detect when I double click on inventory items but it is not able to detect when I click on the magazine of the weapon or assigned items like the gps

little raptor
#

wat?

#

you add event handlers ONCE

#

not a million times

full furnace
#

so I'm curious, does anyone know how to have the player's kits save on start so when they respawn they have the exact starting kit?

#

the only ones i've been able to find only save on the player's death which doesn't give back mags and grenades and stuff.

fluid void
full furnace
#

i'll give it a try

full furnace
#

so i was being very smooth brain and kinda got something to work

#
null = [this] execVM "loadouts\Ghost.sqf";  
this addeventhandler ["respawn","_this execVM 'loadouts\Ghost.sqf'"];
fluid void
#

If you are adding that in the unit's init field it might be a bit broken in multiplayer

full furnace
#

hmm, i'll test it later today.

fluid void
#

I think if you did that the unit's loadout would reset any time a player joins

full furnace
#

i put it in the init field of the player slot, not the whole init

fluid void
#

Yeah that gets run once on each player though afaik

#
if (!local this) exitWith {};
null = [this] execVM "loadouts\Ghost.sqf";  
this addeventhandler ["respawn","_this execVM 'loadouts\Ghost.sqf'"];

Maybe try that?

full furnace
#

oh hell yeah it works

#

so what does if (!local this) exitWith {}; actually do?

fluid void
#

It just exits the code if it is not running on that specific player's machine

tough abyss
#

Is there any really basic script mod that doesnt come with the injury nonsense (like PIR) where the AI can enter a injured state, and other AI can drag/heal them?

#

Like thats all I want

#

I have tried using Project Injury Reaction but there are some annoying bugs when it comes to AI

full furnace
#

Well, appreciate the help Shade ๐Ÿ˜„

drowsy geyser
#

hi, im trying to get the first three units who activated a trigger

`trigger:
anyPlayer
Repeated

triggerInterval 0

condition:
this

activation:
_1stRank = (thislist select 0);
_2ndRank = (thislist select 1);
_3rdRank = (thislist select 2);

if (player == _1stRank) then {hint format ["%1 placed first", name _1stRank];};
if (player == _2ndRank) then {hint format ["%1 placed second", name _2ndRank];};
if (player == _3rdRank) then {hint format ["%1 placed third", name _3rdRank];};`

but i get an error:
_3rdRank = (thislist #select 2);
Zero Divisor
any help?

winter rose
#

the returned array is the list of units actually in the trigger

drowsy geyser
#

now it makes sense xD

jade acorn
#

question regarding conversations. In here https://community.bistudio.com/wiki/Conversations#.bikb_BIS_fnc_kbTell_example the wiki says that in Description.ext, right below class CfgSentences there should be a mission name class (class MissionName) while in this video https://www.youtube.com/watch?v=giOpjIeoWEg the guy instead of MissionName puts a dialogue "category".

So for a campaign, do I have to make that "global" Description.ext and in each class MissionName put names of my scenarios, or can I do what the youtube guy did?

winter rose
trim tree
#

Ok so, I found a neat solution.

timerparam = ["Briefing_Timer", 60] call BIS_fnc_getParamValue; // This is just for using the Parameter option in the role select screen so that you can have different timer values

[-1] call BIS_fnc_countdown; // makes sure that the countdown fnc is first set to zero

_initialCountdown = [timerparam] call BIS_fnc_countdown; // sets the countdown to the value selected in the parameter menu
waitUntil { 1 > ([0] call BIS_fnc_countdown) }; // waits till the countdown reaches below one / the [0] makes it so that the current value which is held by the function is being returned


["Briefing Beendet"] remoteExec ["hint", 0]; 

The BIS_fnc_countdown already creates a timer on the top right part of your screen so you dont have to use a hint to display the time left and it works with JIP aswell!

low sierra
#

I tried this to make a AI group Search and Destroy (SAD) forever, but they Search for some time and they stop forever:```sqf
_grp = createGroup [OPFOR,true];
for "_i" from 1 to 5 do {_grp createUnit ["O_G_Soldier_F",_pos,[],10,"NONE"];};
_wp1 = _grp addWayPoint [_pos,0];
_wp1 setWayPointType "SAD";
_wp2 = _grp addWayPoint [_pos,0];
_wp2 setWayPointType "CYCLE";

little raptor
low sierra
#

@little raptor not sure. May be not.

little raptor
#

maybe you could implement it as a recursive waypoint instead

#

i.e add the waypoint again on completion

#

using waypoint completion statements

low sierra
#

Ok, i will try.

#

Thanks.

low sierra
#

@little raptor this works:sqf _grp = createGroup [OPFOR,true]; for "_i" from 1 to 5 do {_grp createUnit ["O_G_Soldier_F",_pos,[],10,"NONE"];}; _wp1 = _grp addWayPoint [_pos,0]; _wp1 setWayPointType "SAD"; _wp2 = _grp addWayPoint [_pos,0]; _wp2 setWayPointType "SAD"; _wp3 = _grp addWayPoint [_pos,0]; _wp3 setWayPointType "CYCLE";I just added 2 SAD waipoints.
This is because CYCLE can't back to the previous waypoint.

little raptor
cursive tundra
#

hello guys i am trying to create a resource system for a small mp/rts server for me and my friends. Im currently trying to set up a few global variables like manpower, fuel etc and want to display the value of these variables on the screen. Im looking into working with the gui controls and esp. cutRSC for that. I declared the following in the descripting.ext :

#
class RscTitles
{
    class RscInfoText
    {
        idd = 201;
        fadein = 0;
        fadeout = 0;
        duration = 1e+011;
        onLoad = 
        onUnLoad = 
        
      class Controls
        {
          class InfoText
            {
                idc = 202;
                style = ST_LEFT;
                font = "RobotoCondensedBold";
                x = "(profileNamespace getVariable [""IGUI_GRID_MISSION_X"", (safezoneX + safezoneW - 21 * (GUI_GRID_WAbs / 40))])";
                y = "(profileNamespace getVariable [""IGUI_GRID_MISSION_Y"", (safezoneY + safezoneH - 10.5 * (GUI_GRID_HAbs / 25))])";
                w = "20 * (GUI_GRID_WAbs / 40)";
                h = "5 * ((GUI_GRID_WAbs / 1.2) / 25)";
                colorText[] = {1,1,1,1};
                colorBackground[] = {0,0,0,0};
                text = "";
                lineSpacing = 1;
                sizeEx = 0.045;
                fixedWidth = 1;
                deletable = 0;
                fade = 0;
                access = 0;
                type = 0;
                shadow = 0;
                colorShadow[] = {0,0,0,0.5};
            }
        };
    };
};
#

however im not sure what OnLoad and OnUnload does, and the wiki didnt help me a lot. What exactly do i put there?

pliant stream
#

they are SQF event handlers which execute when the control is dialog or control is loaded and sometimes when unloaded respectively

#

i don't know if this is fixed in A3 but in A2 onUnload isn't reliable

little raptor
drowsy geyser
little raptor
#

just use loops

broken steppe
broken steppe
#

Oh, so I just create a variable in uinamespace and load my global into it?

little raptor
#
onLoad = "uiNamespace setVariable ['my_disp', _this#0]";
#

in script:

_disp = uiNamespace getVariable ["my_disp", displayNull];
broken steppe
#

Thank you very much

drowsy geyser
little raptor
little raptor
# drowsy geyser hmm im thinking of how ๐Ÿค”

depends where you want to put the loop.
I recommend replacing the trigger with the loop entirely:

_pos = [x, y, z];
_dist = r;
_alreadyIn = [];
while {true} do {
  _players = allPlayers;
  _in = _players select {_x distance _pos < _dist}; //or use inArea
  _new = _in - _alreadyIn;
  {
    systemChat format ["player %1 placed %2", _x, _forEachIndex + count _alreadyIn + 1];
  } forEach _new;
  _alreadyIn append _new;
  sleep 0.1;
};
cursive tundra
#

It currently doesnt display anything for me, did i forget something important? Its my first time working with the GUI-stuff :/ i just made a quick .sqf with the things you sent mickli to test it, but ingame nothing shows up on screen

little raptor
#

using cutRsc

vague geode
#

What happens when I only create a Trigger local on the server? Can it still recognize/get triggered on the server by (remote) players?

willow hound
#

Depends on the Activation.

little raptor
#

yes

vague geode
versed widget
#

does cfgweapons includes vehicle mounted weapons like cannons and hmgs ?

little raptor
#

yes

willow hound
versed widget
#

so this statement can work right ? "["Cannon", configFile >> "CfgWeapons"]"

little raptor
#

it doesn't make any sense blobdoggoshruggoogly

#

but it's wrong

versed widget
#

i want to use iskindof to check wehether the weapon is used is cannon, i tried with Rifle and it worked

cursive tundra
cursive tundra
#

i restart it every time when i test it

final storm
#

Does the new regex support positive lookahead?

little raptor
cursive tundra
#

when i put anything nonsensical in the debug console, like cutRsc ["qwert", "PLAIN"] it says resource title qwert not found tho

little raptor
#

not restart

final storm
#

Yeah, couldn't find any mention of it not working on the wiki but also couldnt get it to work in testing

willow hound
cursive tundra
#

im in the editor rn, im going back to the editor and start it again. Do i have to completely go out of the editor and reload it?

little raptor
#

closing the mission is fine

little raptor
willow hound
cursive tundra
#

did that, still nothing showing up

#

:/

little raptor
cursive tundra
#

whats the right way? isn't that basically the 1st example on wiki?

#

cutRsc ["binocular", "PLAIN"]; it says there i think

little raptor
#

Read the notes

#

You must read the whole page

#

Not just copy paste the first example you see

final storm
# little raptor yes

hello(?=([^"]*"[^"]*")*[^"]*$)Should select hello as long is it is not between quotes but I couldn't get it to work because it uses a positive lookahead

#

Unless I did something wrong

#

Wait nvm

#

I did get it working

#

lol, thx for the help

cursive tundra
#

I dont see how the notes are helping me here, the first note just explains why i should use cutRsc and the second how to remove anything displayed using cutRsc with cutText

little raptor
versed widget
#
x = vehicle player;
p = player;

x addeventhandler ["Fired",{

if  !(isNull objectParent p) then {if (currentWeapon x isKindOf W) then { addcamshake [10,10,10]

 }else{
 
addcamshake [1,1,4];

      }
    }
  }
]; ```
the else statement isnt working though the second "then" is always activated even when  its "if" is false
#

im really confused

pliant stream
#

you have some weird shit happening here

#

W = "Cannon", configFile >> "CfgWeapons"; this is equivalent to

W = "Cannon";
configFile >> "CfgWeapons";

the second line is a no-op

#

does isKindOf apply to weapon types in A3?

versed widget
#

yes it does
i tried with Rifle before and it worked

pliant stream
#

ah, you want W = ["Cannon", configFile >> "CfgWeapons"];

versed widget
#

yeah exactly

#

that fired event handler seems misplaced maybe ?
ones it detects the weapon type the camshake plays something is wrong there i can sense it

#

๐Ÿ˜ตโ€๐Ÿ’ซ

versed widget
#

damn there is no base class for cannons i have to create my own list for that

pliant stream
#

what are you scripting a pirate ship? do you mean howitzer? mortar? autocannon?

willow hound
versed widget
versed widget
pliant stream
#

that's not possible. which would be the base of AutoCannon? Cannon or AutomaticWeapon?

versed widget
#

40mm autocannons and below are under autocannon_Base_F includes APCs attack helicopter and others main armament
105 and above has no base class for them

#

which i have to put them in a list, and god knows how many mods will inherit vanilla classes

pliant stream
#

okay, but tomorrow you're going to want the base class of all automatic weapons

#

it doesn't work

versed widget
#

what do you mean with automatic weapons HMGs and LMGs ?
if they are the only issue i would leave them in the else statement

pliant stream
#

forget it...

wind hedge
#
 waituntil {!(isnull (finddisplay 602))};
{
((findDisplay 602) displayCtrl _x) ctrlSetEventHandler ["LBDblClick๏ปฟ๏ปฟ", "if (""<ITEM>"" == lbText [ctrlIDC (_this select 0), _this select 1]) then {execVM ""script.sqf""};"];
} count [633, 638, 619];```
#

The problem is that displayCtrl _x (633, 638, 619) are the uniform, vest and backpack...

#

but then the player can also click the ground container, the assigned items slot etc... and those I don't know what displayCtrl number are and couldn't find it anywhere

hidden patio
#

hey, i want a script that slowly, one at a time, kills every single living player. how would i go about that?

distant oyster
hidden patio
#

thats a lot simpler than i expected, thanks

pliant stream
#

it's wrong though

#

TOCTOU, as ever in SQF

vestal radish
#

There anything that can be used to make it where a unit insignia doesn't appear on a vehicle?

willow hound
#

Do you mean the custom squad.xml insignia?

vestal radish
#

It's when you load up arma 3 and choose your unit for the profile

#

So im not sure

willow hound
#

My guess is that Arma 3 Units probably uses the squad.xml system in the background, and in that case I am not aware of any solution based on scripting.

#

Changing the vehicle config or even model may be the only way, but I know nothing about that stuff ๐Ÿคทโ€โ™‚๏ธ

fair drum
plush nova
#

hm ok not sure if it goes here or in animations, but if i use PlayMove to hit something in the animation graph, is there an animation-queue friendly way to do something like switchMove ""?

#

right now i'm doing this

// play our animation
_unit playMoveNow "Test_Anim_State";
// return to whichever standing state is appropriate to our current weapon
switch (currentWeapon _unit) do
{
    case "": {
        _unit playMove "AmovPercMstpSnonWnonDnon";
    };
    case (primaryWeapon _unit): {
        _unit playMove "AmovPercMstpSlowWrflDnon";
    };
    case (secondaryWeapon _unit): {
        _unit playMove "AmovPercMstpSlowWlnrDnon";
    };
    case (handgunWeapon _unit): {
        _unit playMove "AmovPercMstpSlowWpstDnon";
    };
};

but afaict it won't work with mods that allow people to have a second primary weapon in their launcher slot, or whatever

#

i don't like using switchMove because it looks a little glitchy due to the animation instantly starting with no interpolation :/

#

i guess while we're at it, is there anything like playMove or playMoveNow but which also blocks until the animation you've queued up starts/is done? since playMove doesn't start playing your animation until it's finished transitioning which can take 0.25-0.5s, so the switchMove "whatever"; sleep 1.5; approach i see recommended a lot on the forums doesn't always work by itself

little raptor
#

Not sleep, etc.

plush nova
#

presumably just animStateChanged > look for animation i just queued up > when animation plays, do thing and then remove handler?

little raptor
#

And playMove is already the best thing you can use here

plush nova
#

yeah just wondering if there's a better way to "go back to the default standing state appropriate to your loadout"

little raptor
#

PlayAction

#

playAction "stop" to be exact

plush nova
#

oh that's how you play... actions

#

wow i'm dumb lol

#

i kept trying to use playmove that way ยฏ_(ใƒ„)_/ยฏ

south knoll
#

can you call zeus module from a script?

fair drum
#

You call that function directly

south knoll
#

Nice

#

Thanks

viral marsh
#

Hi there! I am planning on running an Operation for my group on the VR map. I have everything laid down, with a custom map, and skybox. However, it still doesnโ€™t have the feel I want it to. Does anyone have any cinematic script suggestions? Images appearing on screen, a custom navigational map, title sequence etc. Cheers in advance!

dusky wedge
#

How to get arguments from arma to extension?

Like - extension callExtension [function, arguments]

How can I handle arguments in dll (c#)?

little raptor
#

this server is English-only. #rules

fading totem
#

Is there anyone who can help me with the sa Arma 3 job?

south knoll
#

Hello,
How can i get the updated position of a backpack, say a player puts on the backpack, runs 200 meters and then takes it off? as im struggling to do so.

#

it has a variable name.

#

figured it out it becouse the backpack object its self is bugged had to get its parent

barren pewter
#

How to check if the players group is all inside of a vehicle? This trigger will activate the vehicle to move and also complete a task

little raptor
#

for player's group you can use group player ofc

barren pewter
#

So something like

group player findIf {!(_x in veh)};

And then i just put that in the condition field?

little raptor
copper raven
#

just units player blobcloseenjoy

unique plank
#
   _x addEventHandler ["Killed", 
{ 
    _unit = (_this select 0); 
    _killer = (_this select 1); 
 
    if (side group _unit == resistance) then [(side group _killer), 5] call BIS_fnc_respawnTickets; 
    hint format["unit %1 was killed by: %2", _unit, _killer] 
}]; ```
#

the part that checks what side the killed unit is on currently isnt working and im not sure why

#

ive tried just side _unit instead of side group _unit

winter rose
#

then {}

#

your code:```sqf
_x addEventHandler ["Killed",
{
_unit = (_this select 0);
_killer = (_this select 1);

if (side group _unit == resistance) then [(side group _killer), 5] call BIS_fnc_respawnTickets;
hint format["unit %1 was killed by: %2", _unit, _killer]
}];

unique plank
#

awesome thanks so much

winter rose
#

indent it, you will see what's wrong

unique plank
#

was just testing it and accidentaly put the } after the ; so took a bit to test lol

#

all working now

#

cheers

unique plank
#
private ["_eastTickets", "_westTickets"];
while {true} do {
   sleep 10;

   _eastTickets = [east] call BIS_fnc_respawnTickets;
   _westTickets = [west] call BIS_fnc_respawnTickets;

   if (_eastTickets == 0) exitWith {
       if (side player == east) then {
           "OpforLose" call BIS_fnc_endMission;
       } else {
           "BluforWin" call BIS_fnc_endMission;
       }
   };
   if (_westTickets == 0) exitWith {
       if (side player == east) then {
           "OpforWin" call BIS_fnc_endMission;
       } else {
           "BluforLose" call BIS_fnc_endMission;
       }
   };
};```
#

is not ending the mission

#

any idea why?

wicked roostBOT
#
How to use SQF syntax highlighting in Discord

```sqf
// your code here
hint "good!";
```
โ†“

// your code here
hint "good!";
unique plank
#

cool

winter rose
unique plank
#

not yet, probably a good idea

unique plank
winter rose
wicked fulcrum
#

So I want to place some text floating above a players model. I am using drawIcon3D. The text shows fine and with the offsetX and offsetY I moved it to above the player model. However it seems to change position relative to the distance. So when I look from close-up its on the position, but when walking backwards it moves higher and higher upwards from the position.

any idea what causes this? Some kind of scaling? And can I calculate the amount it moves, to adjust the offset?

willow hound
#

Have you tried adjusting the position instead of the offsets?

wicked fulcrum
#

that is a good shout. Let me try

#

yeah, that works much better. Gracious

winter rose
#

ah yes, because the offset is a "set" value in screen dimensions
so closeby it looks like 10cm above the unit, from afar it looks like 10m

wicked fulcrum
#

ahhh alright. Yeah that would explain it.

#

thanks!

broken steppe
#

Hey guys, I have 2 HUD elements (just 2 ressource numbers displayed) but somehow they only work when they are executed without the other (not at the same time). I use the cutRSC command to display and update the numbers. Anyone knows what the issue could be?

pliant stream
#

place them in different layers, or even better two controls in a single resource

broken steppe
#

Ah okay ty

copper nova
#

Hello, I have the problem that when I save my mission and then load a savepoint, the condition to complete a task no longer fires. In this case a waituntil statement with coordinates that the player should reach.

I didn't have this problem a few months ago. The last thing I created was a functions hpp. But I absolutely don't know what the reason for this problem could be.

manic sigil
#

Does removeSwitchableUnit not function in multiplayer or dedicated servers? I can't seem to get it to register.

little raptor
hollow thistle
#

but if you don't do disableSerialization the scheduled scripts should be loaded back on save load. ๐Ÿค”

#

how do you start the script with waitUntil?

little raptor
hollow thistle
#

But it's core of saving functionality...

#

To restore spawned scripts.

#

So IDK, can't help him without more details but you should not need to do anything to have spawned scripts work after save load.

#

IDK how it behaves when spawned in uiNamespace context tho thomp

strange elk
#
this addEventHandler ["Reloaded", {
    params ["_unit", "_weapon", "_muzzle", "_newMagazine", "_oldMagazine"];
    _unit addMagazineGlobal (_newMagazine select 0);
}];```
#

Holy shit

#

i finally figured out how to add unlimited ammo

#

that INCLUDES ROCKETS!

#

AND GRENADES

copper raven
#

is there any alternative to https://community.bistudio.com/wiki/aimedAtTarget other than manually checking weapon direction vector? the command gives me unreliable/bad results, i make an AI target something, if i force a shot, it lands on-point, yet, command prints 0, tried on the blackfish

little raptor
copper raven
#

yeah, the gunner accounts for the lead/platform velocity, which makes the aiming position be way off the target(which makes sense), i guess the command just checks the LOS and calculates based on that

copper raven
buoyant abyss
#

I'm trying to use addAction in a vehicle init, so that when the player is in the vehicle he can access the addAction using the scroll wheel select.

However there seems to be a problem where the addAction is accessible from outside the vehicle but not from inside the vehicle. Currently wondering what exactly is going wrong.

buoyant abyss
# little raptor post the code
this addAction 
[
    "Eat that!", 
    {
        private _tempTarget = createSimpleObject ["Land_HelipadEmpty_F", getPosASL cursorTarget];
        [_tempTarget, nil, true] spawn BIS_fnc_moduleLightning;
        cursorTarget setDamage 1;
    },
    [],
    1.5, 
    true, 
    true, 
    "",
    "!isNull cursorTarget"
];
little raptor
buoyant abyss
#

Right?

buoyant abyss
little raptor
#

are you sure you're adding it to the vehicle?

buoyant abyss
buoyant abyss
little raptor
#

well this line specifically disables the action if you're not in the vehicle:

_this in _target

little raptor
modern agate
#

anyone know if there is a script for hellcat doors similar to other helis, idk why but i cant find a one that works for the hellcat

little raptor
#

you want to open its doors?

modern agate
little raptor
modern agate
winter rose
#

the unarmed one doesn't? dang

little raptor
#

yeah

copper nova
# hollow thistle how do you start the script with `waitUntil`?

That is basically how I run the scripts. And the next function has a waituntil statement like this again...

task3 = player createSimpleTask ["task3"];
task3 setSimpleTaskDescription ["","Escape",""];
task3 setSimpleTaskType "run";
task3 setSimpleTaskAlwaysVisible true;
task3 setTaskState "Assigned";
task3 setSimpleTaskDestination [21100.842,14307.143,0];
[0,"Escape"] call gonzka_fnc_showNotification;

waitUntil {player distance [21100.842,14307.143,0] < 20};

task3 setTaskState "Succeeded";
[1,"Escape"] call gonzka_fnc_showNotification;

sleep 3;
[] spawn hms_fnc_task_checkpoint;

The showNotification function is a replacement for the standard arma task overlays. Here I actually have disableSerialization in it.

...

disableSerialization;

7 cutRsc ["notification","PLAIN"];
private _ui = uiNameSpace getVariable "notification";
(_ui displayCtrl 27997) ctrlSetText format["%1",_picture];
(_ui displayCtrl 27998) ctrlSetText format["%1",_title1];
(_ui displayCtrl 27999) ctrlSetText format["%1",_title2];

playSound _sound;
hollow thistle
#

how do you start the task script?

copper nova
#

Like that: [] spawn hms_fnc_task_checkpoint;
This is a task script too ^^

hollow thistle
#

where do you start it from

copper nova
#

I spawn the first task script in the Init.sqf

hollow thistle
#

Does the notification show when you reach the position?

copper nova
#

Normally it should show every time the task function is spawned and when the waituntil condition is fulfilled.
When I load a save point, the task however remains created. Up to the notification it does not come at all.

#

So it really looks like waituntil is broken and that the script is no longer running scheduled.

copper nova
#

I have removed disableSerialization and the problem seems to be fixed. But first I'll test it a few times more, cause Arma sometimes does what it wants...
But at this point it is actually needed, right? Strange that it works without disableSerialization.
Not that now other problems occur because this command is missing?

hollow thistle
#

ahh now I see it. I think.

#

You're calling the notification function.

#

I guess disableSerialization disables it for whole script stack.

#

So it's disabling it for the parent script.

#

spawn the notification function to avoid that.

copper nova
#

Ah thank you! I'll try that out. Would that be problematic if I simply remove disableSerialization? Then I don't have to rewrite so much ๐Ÿ˜›
I haven't quite understood yet in what way the command is needed ๐Ÿ˜…

hollow thistle
#

UI elements are not serializable so they can't be stored in saves.

#

private _ui = uiNameSpace getVariable "notification"; so game will complain if yu do this in a script with serialization enabled.

#

Then I don't have to rewrite so much
you can change your notification function to always spawn the stuff inside it so it will be one place to change

#
  ...
  _this spawn {
  disableSerialization;
  
  7 cutRsc ["notification","PLAIN"];
  private _ui = uiNameSpace getVariable "notification";
  (_ui displayCtrl 27997) ctrlSetText format["%1",_picture];
  (_ui displayCtrl 27998) ctrlSetText format["%1",_title1];
  (_ui displayCtrl 27999) ctrlSetText format["%1",_title2];

  playSound _sound;
};
copper nova
#

Uff, you're right ๐Ÿ™ˆ

proven charm
#

is it possible to run some code before the eden mission is saved? all i found was OnMissionSave EH

hollow thistle
#

maybe keydown eh and checking if the save button/combo was pressed

#

idk if it runs before the actual save

#

why do you need to do it before the saving happens?

proven charm
vague geode
#

Is there a way to remove a player's backpack and attach it to the player character via attachTo?

vague geode
# little raptor yes

Cool, how? Because I have tried but the backpack was automatically put into a ground weapon holder and even when I used firstBackpack and got the backpack I wasn't able to attach it.

little raptor
#
_bpHolder = unitBackpack _unit;

//remove
...
if (!isNull _bpHolder) then {
  _bpObj = objectParent _bpHolder;
  _bpObj attachTo [_unit, ...];
}
vague geode
proven charm
#

OnMissionSave is called after the save

digital hollow
mental prairie
#

I would like all players on the server to switch their view to a camera, displaying a video on a screen (something like APEX/Sahara CDLC intro) https://youtu.be/dWvDBd9Zqyk

#

I know that I should use camCreate, however I have no idea how to use cameras in scripting. Is there a tutorial available?

normal abyss
#

Currently working on a saving system for my Units operations, I've been trying to save the orientation of turrets on vehicles. I've successfully pulled animationPhase for each of the turrets on the unit however I'm unable to use the Animate command to for them to be forced into a different rotation. Has anyone else had this issue and if so could they offer any insight?


_turretAnimations = [[["L111A1_MainTurret","L111A1_MainGun"],0.554931,0.0126889],[["L7A2_1_Turret","L7A2_1_Gun"],0.511238,-0.00909306],[["",""],0,0],[["",""],0,0]];

{
    _x params ["_animationNames","_xAxis","_yAxis"];
    _axis = [_xAxis,_yAxis];
    {
        _Vehicle animate [_x,_axis select _forEachIndex,true];
    } forEach _animationNames;
} forEach _turretAnimations;

jade acorn
#

could someone confirm the following script still works? I tried to use it for my holdAction completion with few lines of text, but the second hint is still displayed. I can't really find any way to hide the second hint

hintC "Press W to move forward";
hintC_EH = findDisplay 57 displayAddEventHandler ["Unload", {
    _this spawn {
        _this select 0 displayRemoveEventHandler ["Unload", hintC_EH];
        hintSilent "";
    };
}];```
mental prairie
winter rose
mental prairie
#

Yeah. The BI wiki tutorial is literally a godsend. Answered most of my questions

#

The commands seem slightly convoluted tho

little raptor
little raptor
winter rose
jade acorn
#

so each time a hintC is shown, after clicking Continue a second hint shows up which I would like to avoid

normal abyss
winter rose
mental prairie
winter rose
#

a camera is a local-only object, so it has to be run on each machine

mental prairie
#

Seems reasonable

winter rose
jade acorn
meager epoch
# winter rose try this?```sqf hintC "blah"; hintSilent "";```

i had the same problem and google told me to do this instead (which does the job)

hintC "text and stuff";
hintC_EH = findDisplay 57 displayAddEventHandler ["Unload", {
  _this spawn {
    _this select 0 displayRemoveEventHandler ["Unload", hintC_EH];
    hintSilent "";
  };
}];
#

is it a better option?

#

oh nvm, i just saw the same thing above

meager epoch
#

99% of the time it hides the other hint

jade acorn
#

then this 1% happens to me all the time incident

meager epoch
#

pain

#

maybe its something with your holdAction idk

distant oyster
woeful sundial
#

Hello i was wondering does someone ever made a streamdeck mod/plugin that connects to arma? i cant find anything online

digital hollow
versed widget
#

that sounds cool

drifting sky
#

A2OA. In MP, client is getting immediate script errors in functions that haven't been called. Even if everything in that file is completely commented out. Can anybody explain this?

winter rose
drifting sky
#

Well, is there any reason at all why script errors should occur in files that are completely commented out?

manic sigil
#

Duplicate/similarly named file thatsnot comment blocked and being read instead?

winter rose
#

yes, mistakes
files not replaced
server not restarted
etc

#

why I ask for details ๐Ÿ˜‰

drifting sky
#

If I make changes to a file on the server, what does it take to re-transmit those files so that the clients have the updated files? Is it enough just to restart the mission?

#

Does the server need to be completely restarted?

winter rose
#

restart the server

#

(or rename the mission for the server to maybe take it in consideration, perhaps and not guaranteed)

drifting sky
#

Will a corpse removed on the server be removed on all machines?

winter rose
#

because "removed" uses deleteVehicle and its effect is global

tough abyss
#

does anyone know how to force ai to pop flares when it hits a waypoint

#

and force kill Ai when they hit a way point

real saffron
#

I hope I am in the right place for this. I'm trying to make Arma cinematics and I'm pretty new to it. I'm trying to figure out how to use playMove (or any other good methods) to use several animations in a sequence. For example, a soldier switching from his primary to his secondary, but there are several animations to do so. Any tips on how to do that effectively?

little raptor
#

but if you want to animate the units and move them simultaneously (e.g. unit running forward but also turning), you can use a loop

little raptor
little raptor
little raptor
#

but you also have to adjust the flare direction

#

you can do that using FiredMan event handler

tough abyss
#

like a ai in a jet or heli

little raptor
#

it might also be possible to create the projectile yourself

little raptor
tough abyss
little raptor
#

there might be an action for that thonk

#

looks like there isn't an action

#

just use the fire command

still latch
#

I want to create server side check function that should return boolean to client. What is the best practice for that?
RemoteExec to server and remoteExec back to caller with setVariable?

cinder girder
#

HoldAction does not work underwater. Does anyone know how to solve this problem?

copper raven
#

don't see a reason why it wouldn't

#

send the arguments you pass to it

cinder girder
#

[
diving_point,
"ะ˜ััะปะตะดะพะฒะฐั‚ัŒ",
"\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa",
"\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa",
"_this distance _target < 3",
"_caller distance _target < 3",
{

    },
    {},
    {
        "items" call RRPClient_diving_generateLoot;
    },
    {},
    [],
    2,
    1,
    true,
    true,
    true
] call BIS_fnc_holdActionAdd;
copper raven
#

๐Ÿค” looks ok to me, unless you're maybe not adding it locally

#

but since you call RRPClient i assume you do

little raptor
#

instead, use something like:

getPosASL _this vectorDistance getPosASL _target
little raptor
copper raven
#

what does distance use if you pass objects to it? ๐Ÿค”
ah, it's basically obj modelToWorld [0,0,0], so yeah, makes sense

willow hound
still latch
#

As much as I understand remoteExec is non blocking call. Should I add waituntil to wait for result from server?

copper raven
#

callback function is better

#
remoteExec ["my_fnc_sendMeSomeDataBackPls", 2];
//my_fnc_sendMeSomeDataBackPls:
5 remoteExec ["my_fnc_takeYourData", remoteExecutedOwner];
//my_fnc_takeYourData
params ["_data"];
// now do something with it

// the below is not recommended
remoteExec ["my_fnc_sendMeSomeDataBackPls", 2];
waitUntil {blabla_result_recieved};
// wherever you store data
cinder girder
plush nova
#

hm does setPos interact with velocity in any way

#

presumably it just retains the old velocity right

little raptor
#

!quote 5

lyric schoonerBOT
copper raven
#

i guess it needs to have a particular LOD

little raptor
plush nova
#

oh

#

what's the recommended alternative

little raptor
#

depends what you want to do

plush nova
#

well i have a situation where i made a man run really fast

#

and he deflects off of small rocks and ramps into the sky a lot

#

and i want to make him... not do that

#

currently i am doing so by having a statechange handler that detects anim states starting wtih "afal" or "halofreefall", and whenever that happens setting his z-pos to 0 and switchmove-ing to whatever non-falling animation he was last playing

little raptor
#

just use setVelocity

plush nova
#

as in, set his velocity to a strongly-negative value on every frame?

little raptor
#

yes

#

but also disable damage meowsweats

plush nova
#

heh

little raptor
#
onEachFrame {
  player setVelocity [0,0, -1000];
};
plush nova
#

got it, i'll try it

little raptor
plush nova
#

hmm yes that could be bad

#

well we'll get there when we get there lol

#

maybe -10 or something would work

little raptor
plush nova
#

right now around ~50m/s

little raptor
plush nova
#

well -1000 definitely works as long as i disallow damage lol

little raptor
plush nova
#

hmm

#

i guess it's time for fake hitpoint attachto

little raptor
#

maximum falling velocity for units is ~-7 m/s, after that they'll take damage

plush nova
#

ahh

#

is there any way to mitigate only fall damage using handleDamage eh?

little raptor
#

I guess so yeah

plush nova
#

presumably it ahs like null instigator or w/e right

little raptor
#

I think selection should be "" and instigator objNull

plush nova
#

or null source

#

yeah

#

well let's see if it works i guess

copper raven
#

projectile should be "" too

plush nova
#

but the -1000 thing really works way better visually than what iw as doing before so thanks for that

oak coyote
#

Hi uhh, im back here with another question. So i am making an amphibious assault mission with tanks going out of landing crafts, but i can't make the tank get out of the landing craft, any solution?

little raptor
oak coyote
#

Yes.

willow hound
oak coyote
#

Alright, gonna try

tough abyss
#

does anyone know a script for defusable suicide bomber vests?

drowsy geyser
#

hi, so this is what im testing
`trigger: Door1Trg
anyplayer
present
repeated

trigger condition:
player inArea Door1Trg && getdir player > 320 && getdir player < 35

activation:
Door1 setVariable ['bis_disabled_Door_1',1,true];
[Door1, 1, 1] call BIS_fnc_Door;
"BlockedDoor1" cutText ["<t size='1.5' shadow='2' font='EtelkaMonospaceProBold'>The door is blocked, there must be a key somewhere.</t>", "PLAIN DOWN", 1, false, true];

deactivation:
"BlockedDoor1" cutFadeOut 0.2;`

but the condition fires false and i think it is because i write
getdir player > 320 if i write getdir player > 0 then it works.

tough abyss
#

so would i copy that entire highlighted part?

#

and put the condition as false

little raptor
tough abyss
#

iโ€™m slow

#

so i donโ€™t really understand

little raptor
flint topaz
#

If there isnโ€™t one on the workshop there may not be one

flint topaz
#

Iโ€™m pointing at my message not yours ๐Ÿคฆโ€โ™‚๏ธ

tough abyss
#

iโ€™m so serious

little raptor
tough abyss
#

like if i donโ€™t like the EXACT answer or i can just copy and paste it

#

i wonโ€™t know what to do

little raptor
#

how can a number both be < 35 and > 320 ... meowsweats

flint topaz
#

Infinity is ๐Ÿคทโ€โ™‚๏ธ

#

And it also isnโ€™t

little raptor
#

no it's not

little raptor
flint topaz
#

I hate it

drowsy geyser
flint topaz
#

That second one is fine

#

Riddle me why

tough abyss
#

idek whatโ€™s going on๐Ÿ˜ž

flint topaz
#

Which is the smaller number in the first and second statements

little raptor
flint topaz
#

Or what does > actually mean

tough abyss
#

iโ€™m not asking questionsโ€ฆyet๐Ÿ˜

#

i honestly just need a copy and paste script for a defusable suicide vest

#

i wanna be able to have like real life hostage situations yk

winter rose
tough abyss
#

i SUCK at scripting

#

like i wonโ€™t understand a THING

#

i also did get an answer and it was confusing cause i did not understand a thing

little raptor
#

which is impossible ofc

manic sigil
#

I had this problem when I was recreating the Take On Helicopters touring script. Its logical to think in compass circles, but the script doesnt think in circles.

little raptor
tough abyss
#

do you guys script professionally or just hobby?

#

seems like a hard thing to do

bitter jewel
#

there are probably both types here

little raptor
tough abyss
#

wouldnโ€™t be shocked

tough abyss
#

was pretty cool

#

i just donโ€™t know how to work it๐Ÿฅฒ

drowsy geyser
#

i love you guys !!

tough abyss
#

i didnโ€™t do anything to help but ilyt

drowsy geyser
#

๐Ÿ˜†

little raptor
tough abyss
#

i stopped talking to him

#

i THINK i found the script on worship

#

but it didnโ€™t work for me i think

#

or i put it in wrong

little raptor
#

which script?

tough abyss
#

uh lemme find it

winter rose
#

the car script

tough abyss
#

this

#

i never understood it

#

i even tried the example and it didnโ€™t work

little raptor
#

which iirc that's what you asked

tough abyss
#

it doesnโ€™t even blow up either

#

iโ€™ve tried it multiple times

little raptor
tough abyss
#

idefk man

#

i just copied and pasted the example

#

iโ€™m slow man i didnโ€™t understand it at all

little raptor
#

what about the script?

#

nvm that's a mod

tough abyss
#

itโ€™s not a mod itโ€™s categorized as a mod but the entire description has the setup details

little raptor
#

and the page already explains what to do:

Setup
Eden editor placed objects:
If the unit you want to make a suicide bomber is an object placed in the eden editor then go into its attributes, scroll until you find the init and paste this in (but change the function paramaters of course):

[this] spawn {

sleep 2;
_this = _this select 0;
[_this, type, timer, isHostage] call fnc_suicideVest;
};
tough abyss
#

wdym change the function parameters

little raptor
#

[_this, type, timer, isHostage]

#

Paramaters
[object, type, timer, isHostage] call fnc_suicideVest;

tough abyss
#

i also tried to subscribe to it and it doesnโ€™t show up in the mod list

little raptor
#

Object: the object it is attached to.
Type: the type of suicide vest it is, ("dms" = dead man switch, "timer" = timed vest, "" = default suicide vest)
Timer: number
isHostage: Makes the unit do a hostage animation, can be set to true or false.

tough abyss
#

i kinda understand

#

iโ€™ll try it out when iโ€™m home

tough abyss
#

hopefully the messages are still here when iโ€™m home

#

thanks for your help atlwast

#

how would i use it in zeus tho?

#

cause i setup zeus missions not editor missions most the time

potent dirge
#

Evening fellas, please is there a way I can return a list of all the vests classnames in the game, both vanilla and modded? Thanks.

winter rose
#

๐Ÿ˜

#

you can browse config (by script or through Config Browser) and look for vests
though I don't remember vest's inventory item code

potent dirge
#

Thanks, but how exactly would I browse the config via script please

winter rose
potent dirge
#

Alright thanks ๐Ÿ‘

meager epoch
#

what's the difference between call and spawn? when should each be used?

copper raven
wet shadow
#

True, the main point was that its a good advice when to spawn.

pliant stream
#

when to spawn: don't

winter rose
#

(j/k, don't do ^ this)

bitter jewel
#

but i need to sleep

#

can i add cups snowfall to a map by script

potent dirge
#

Evening fellas, I have a small problem with generating a list of all civilian classnames in game. Here is the generator

_fn_isParentOf = {
    private _config = _this param [0];
    private _father = _this param [1];
    private _parents = [];

    _parents = [_config, true] call BIS_fnc_returnParents;
    if (_father in _parents) exitWith {true};
    false;
};

arrayCivs = ("[_x, 'Civilian_F'] call _fn_isParentOf" configClasses (configFile >> 'CfgVehicles')) apply {configName _x};

The generator works fine, but it also adds unwanted classes e.g. headlessclient, animals, and some base classes that aren't 'real' units. Is there a way to filter these 'unreal' units from the others?
Maybe some special property only real units have, I don't know.
Thanks

#

Also if you have a better way to generate a list of all civilian units that works better I'd be much happier

crude vigil
# potent dirge Evening fellas, I have a small problem with generating a list of all civilian cl...

The generator works fine, but it also adds unwanted classes e.g. headlessclient, animals, and some base classes that aren't 'real' units. Is there a way to filter these 'unreal' units from the others?
Then it technically means it doesnt work. ๐Ÿ˜

In scenarios like this, it is a good idea to open config viewer and check out differences in wanted and unwanted classes to be returned. You have found the main way to find out civilians which is through finding all entities under Civilian_F, but headlessclient and animals are also under civilian_F as they belong to this side by default so you need to find an attribute in civilians that are not part of the "unreal" units. In this case, you can go through simulation attribute which is "soldier" for civilians while it is "animal" for animals and "headlessclient" for headless client. I also suggest you to include a scope = 2 into your checks to ensure no any class done for other purposes make it to your returned class types. There might be also alternative paths to find those but closest to your approach would be this. Of course there are probably more distinctive attributes but this is the one that came to my mind.

little raptor
potent dirge
potent dirge
crude vigil
potent dirge
#

That's not a big problem for me, thanks for all your help, everything is working as intended now

willow hound
#

On a side note: isKindOf would probably have been faster than your _fn_isParentOf.

bitter jewel
#

script to start barrel fire?

fair drum
#

if I have x amount of units, and their naming is c_site_anim_stand_x and I want to grab all of them, is there a more efficient way of doing this?

private _workerStand = [];
for "_i" from 0 to (count allUnits) do {
    private _current = missionNamespace getVariable ["c_site_anim_stand_" + str _i, nil];
    if (isNil "_current") exitWith {};
    _workerStand pushBackUnique _current;
};
willow hound
#

Can't really think of anything right now.
Does this need to be efficient? How many times do you execute this?

fair drum
#

more than once, but decently spaced so it probably doesn't matter. I was mainly just asking for knowledge since this was the only thing I came up with

willow hound
#
private _workerStand = allUnits select {"c_site_anim_stand_" in vehicleVarName _x};
```I guess this is faster, but it only works if those missionNamespace variable names that you are checking are guaranteed to be equal to `vehicleVarName _x`.
mental prairie
# winter rose yes sir!

Hey, sorry for the late response, but can I just execute all of the camera stuff with forEach (allPlayers);

fair drum
winter rose
#

@mental prairie this ^
Otherwise the code only runs on the same machine

mental prairie
#

got it. I've run into a problem tho. Every time I try to execute the script with the camera nothing happens. I use a radio activated trigger.

#

code: _cam = "camera" camCreate (ASLToAGL eyePos player); _cam camPrepareTarget player; _cam camCommitPrepared 0;

#

trigger: execVM "camera.sqf";

tender fossil
#

SITREP check: we don't have working linter for SQF atm right?

winter rose
mental prairie
hallow mortar
#

Is there a command to disable the FCS/laser rangefinder on a vehicle?

hallow mortar
#

Unfortunate

winter rose
#

Quite.

hallow mortar
winter rose
#

(if it was not, you are on your own, it was your idea and I have nothing to do with it ๐Ÿ˜)

meager epoch
#

is it possible to see the last (or all) error(s) i received in the editor?

unique sundial
#

yeas, open .rpt file

meager epoch
unique sundial
#

where do you want to see errors, client server?

meager epoch
#

uh

#

i guess blobdoggoshruggoogly

hallow mortar
#

%localappdata%\Arma 3 and it's the latest dated .rpt file. Open in any text editor

unique sundial
#

client OR server?

#

C:\Users\xxxxxxxxxxxxx\AppData\Local\Arma 3

hallow mortar
#

typing %localappdata% in the Explorer address bar will take you straight there :U

meager epoch
#

I dont have an arma folder there meowsweats

unique sundial
#

whats the path?

meager epoch
#

oops, found it

unique sundial
#

sort by creation date so you can see the latest .rpt

meager epoch
#

yeah, found the file as well

#

Thanks salute

unique sundial
#

might as well associate it with notepad

#

or notepad++

little raptor
wicked roostBOT
#
Arma RPT

Arma generates a .rpt log file each time it's run, which contains a lot of information like the loaded mods, or any errors that appear, this log file can be very useful for troubleshooting problems.

To get to your RPT files press Windows+R and enter %localappdata%/Arma 3

Additionally see the wiki page for more info: https://community.bistudio.com/wiki/Crash_Files

To share an rpt log here, please use a website like https://sqfbin.com/ to upload the full log, that way the people helping you can take a look at it and try to figure out the problem you're having together with you.
Note: RPT logs can hold personal information relevant to your system, the game or others.

graceful kelp
#

does anyone know how to trace ace frag

twin steppe
#

Does lbSetTooltip not work currently? Each time I try to use it like:

_listBox lbSetTooltip [_listBoxIndex, _itemToolTip];```
No tooltip shows up, I've made sure nothing is overlapping the listbox but nothing shows up when I hover over the list item
twin steppe
#

Repair Kit used for restoring vehicles to near full health.

plush nova
#

does rotating an object also rotate its velocity?

winter rose
winter rose
plush nova
#

either?

#

does one of them rotate velocity and the other not

#

the docs say that setDir 'resets' velocity but i'm not sure if it means that it "re-sets" it to the new rotation, or it sets it to [0,0,0]

plush nova
#

oh no, i guess it's impossible to know if it rotates velocity or not then :/

twin steppe
#

@winter rose Both

#

Yes to both

winter rose
#

the other, you can try and I can amend the wiki with your results

plush nova
#

yes sorry it was a joke, because [0,0,0] has no defined direction

#

so a rotated [0,0,0] and a non-rotated [0,0,0] are indistinguishable

#

ill try the other

twin steppe
#

https://sqfbin.com/exatehuqehigacorovoq

I've left a snippet of the code. Relevant functions are towards the bottom and MAZ_populateListbox and MAZ_inventoryGUI.
virtualItemsCreated will be formatted as [ [ "Name", "Tooltip", "Icon", {Code}, buy, sell ] ]

In this example, the tooltip is the string "Repair Kit used for restoring vehicles to near full health."
MAZ_populateListbox is passed the listbox from uiNamespace & the player, and the tooltip is retrieved from the array, then set as the tooltip. I don't think I've messed up syntax for this and there shouldn't be any UI elements overlapping the listbox.

I've tried this in MP & SP environments

Edit: From the snippet provided run the entire code and open your inventory to see the virtual inventory.

winter rose
winter rose
twin steppe
#

Unfortunately, no, the included functions are necessary for the script to run. Only two will need to be looked at though as the others don't relate to GUI elements. MAZ_inventoryGUI and MAZ_populateListbox

#

The list box is defined in MAZ_inventoryGUI as virtualInvListBox

meager epoch
#

will using a lot of waitUntils affect performance?

crude needle
meager epoch
# crude needle Depends. What's a lot and what's inside of them?

i currently got 18 in one file (and a couple more in others) and most of them are stuff like waiting until the player reaches a certain destination or enters a certain vehicle or does a certain action in order for the scenario to advance and stuff
there might be another way of doing such stuff, but that was the only way i thought of when i started, so i was just curios rn whether or not its a bad way of doing it

plush nova
#

hmm ok slightly weirder question; it seems like if you getVelocity on a man, it loads his total velocity including from the animstate, but if you setVelocity on a man, it adds the "existing" velocity from the current animstate back on at the end of the frame so it effectively stacks on top of his basic running speed or whatever; does that seem accurate?

#

and if so, how would one go about isolating only the "external" physics velocity of the man, ignoring the base speed of him running

twin steppe
#

@winter rose shortened version

crude needle
meager epoch
crude needle
#

You're fine with the distance checks in a loop. Just remember that you can sleep instead of checking (at most) every frame to see if someone is near a place.

meager epoch
#

so, slap a sleep inside a while is what you tryna say?

crude needle
#

You can sleep inside a waitUntil since it's a scheduled environment.

meager epoch
#

oh, so for example:

#

waitUntil {(sleep 5; truck1 distance player <= 50)};?

crude needle
#

๐Ÿ‘

hasty current
#

Is F_40mm_Red a #lightpoint?

meager epoch
#

great

#

thanks

hasty current
#

Meaning, can I use setLightFlareSize on said flare?

hallow mortar
#

I'm having some trouble with the alternate syntax of currentZeroing, and with setWeaponZeroing.
I've got a correct weapon classname and muzzle name. However, when I plug those into currentZeroing, it always returns [0,-1]. And if I plug them into setWeaponZeroing it returns false and does nothing.

#

I can't find anything suggesting the command doesn't work for other people, but if all I'm doing is this:

player setWeaponZeroing ["SMG_01_F","this",1]
``` and it's still not working...I'm stumped.
night sundial
#

so i'm trying to spawn a cruise missile and set its target with setMissileTarget but it isnt working. I can however, fire a cruise missile at a target, and then set that missile's target and it will work. How can i get around this? When i spawn a cruise missile and set it's target, missileTarget is null.

#

Just tested more, and it turns out i dont have to fire at a target at all. As long as the missile comes out of the vls i can set its target. I want to be able to spawn it though

#

AHA, i figured it out. I needed to use setShotParents on the missile. The shot parent vehicle has to be a vehicle with data link, and that vehicle has to have the target on its sensors. Once setShotParents is used, you can change the missile's target!!

elfin comet
#

I am trying to have a marker hostLoc update it's location when a specific unit named bomber leaves the area of the marker. Currently have this:

[] spawn {
    while {alive bomber} do { 
        if (bomber !inArea "hostLoc") then {
        "hostLoc" setmarkerpos bomber;
        };
    };
};```
Keeps saying the line with the `if` argument is missing a `)`. Can't seem to figure out where one would be missing. Any suggestions?
(This is run from `init.sqf`)
hallow mortar
#

Try !(bomber inArea "hostLoc")

elfin comet
#

Spot on. Thanks mate.

copper raven
copper raven
night sundial
copper raven
#

ahh my bad, didn't read your next message meowsweats

copper raven
#

you can check the muzzles array entry in weapon's config, if its an array with only "this", then just use the weapon class as muzzle

hallow mortar
#

It also doesn't work for weapons that have multiple muzzles

copper raven
hallow mortar
#

Correction: it doesn't work for vehicle weapons that have multiple muzzles

copper raven
#

what vehicle? for me it works on the marshall(HE/AP)

hallow mortar
#

Nyx AC

copper raven
#

works fine here blobdoggoshruggoogly

copper raven
hallow mortar
#
_target = vehicle player;
_zero = [];
private _targetWeapons = (_target weaponsTurret [0]);

{
    private _targetWeaponMuzzles = getArray (configFile >> "CfgWeapons" >> _x >> "muzzles");
    private _targetWeapon = _x;
    {
        _targetMuzzle = _targetWeapon;
        if !(_x == "this") then {
            _targetMuzzle = _x;
        };
        _zero pushback (_target currentZeroing [_targetWeapon,_targetMuzzle]);
        systemChat format ["%1 %2",_targetWeapon,_targetMuzzle];
        
    } forEach _targetWeaponMuzzles;
} forEach _targetWeapons;
_zero
``` (in debug console while in the Nyx AC gunner seat)
#

the output in system chat reports the true muzzle and weapon names, while the array of current zeroes in the debug console return field is all [0,-1]

copper raven
#

try using the unit who is manning the turret instead of the vehicle

hallow mortar
#

That seems to report the correct results

copper raven
#

wiki is wrong then i guess

#

both overloads according to supportInfo suggest that it's supposed to be unit

little raptor
plush nova
#

although this behavior seems to apply to velocityModelSpace too

warm hedge
#

Blame the lame inconsistency of the Bohemian naming years ago! ๐Ÿ˜†

plush nova
#

yes anyways i wrote a script that just simulates the animation stategraph on its own so it can compensate with setVelocity in a way that treats the character as having higher acceleration

#

but it's uh

#

well it's not perfectly accurate because of timing errors, so the character ends up sliding very slowly in one direction or another at the end anyways

#

however it's better than sliding at running speed so ill take it

#

it would be way better if i could somehow getAnimationVelocity or something though

#

then i could actually read the component of the man's velocity that was due to animation stategraph and this code would be 1000x simpler

warm hedge
#

Not entirely sure the context but the command to get the rtm velocity?

plush nova
#

the context is that i scaled a man up to be really big

#

but using the same animations as base

#

but the default stategraph transitions have a 20m/s^2 acceleration cap on movement

warm hedge
#

So bigger your unit is, faster move velocity?

plush nova
#

so the man does a loonie toons run in place animation while slowly sliding into full speed over 3 seconds

plush nova
#

including absolute offset and all the bone transforms

warm hedge
#

Well not sure if that is feasible after all. The setObjectScale is not really a command for an actual object bu mainly for something else like props

plush nova
#

so i wrote this stupid script that simulates his velocity based on 20m/s^2, then simulates his velocity based on my desired animation, and then applies the differential using setVelocityModelSpace

warm hedge
#

But rtm velocity command is ticket worthy IMO

plush nova
#

and new RTMs

#

and it is a new skeleton

#

with its own cfgMoves

#

they just happen to be p3ds and RTMs and cfgMoves states that i generated procedurally with a script

#

and all the script does is replace speed/vertex positions/whatever with the appropriate, scaled-up version

warm hedge
#

Interesting but still setObjectScale is not the command really... I guess

plush nova
#

yes i did not use setObjectScale at all

warm hedge
#

Uh aha, I think I get the idea

plush nova
#

i actually tried applying setObjectScale on every frame at first but it was... really glitchy

#

in first person mode your character was still normal height lol

#

you could see his legs dangling off the ground and the shadow rendered really far away

#

yes i also wrote a script that reads through all the RTMs and animstates and dumps their offsets/animation speeds into hashmaps in an sqf file that i run in preinit lol

#

it's been quite the journey

#

sadly the script cannot access the actual current animation velocity (only the actual "final" velocity of the animation, not the one bounded by 20m/s^2 acceleration), it has to simulate it, and it doesn't quite do so accurately

#

i guess i could just detect if velocity is very small, and if it is, then apply that as a correction to my offsetting algorithm

little raptor
plush nova
#

oh

#

well that's good to know lol

#

hm

Returns the current time of the most important RTM animation currently being played on the soldier.
how does it define "most important"

little raptor
#

I think it means anim vs gesture

#

anim is the important one

#

so it means animationState

plush nova
#

ah

#

well that's exactly what i want then

little raptor
#

I know...

little raptor
plush nova
#

well i think all i needed ticktime for was that anyways

little raptor
#

what if the game is paused or accelerated

plush nova
#

i dunno

#

i assumed it was ticks as in game ticks