#arma3_scripting
1 messages Β· Page 9 of 1
_var vectorAdd [0,0,1]
Pretty sure there's some billboard objects in base game literally dedicated to testing hiddenselectiontextures that have physx support
Can't add vectors with +
how do i do that within an array for a command
dont want to try make a new variable
those'll be huge though wont they
give array
_ConeBoi = createVehicle ["Land_PortableLongRangeRadio_F", (_playerPos vectorAdd [0,0,1]), [], 0, "CAN_COLLIDE"];```
something like that right
Precisely
Bingo
gotchu now
oh the issue is it just falls back down
i need to move the player downwards on the attachTo without it being weird then
probably invisible object is best then
I still retain my stance that the cleanest solution to this is a fake rope with setVelocityTransformation as the movement
Lot less possible issues
And you'll actually have fine-tuned control over the movement
just addForce and attach the rope to the ragdoll. it'll be funny
Seems to me that when adding force to units they just ragdoll and then nothing
No further force does anything
Then again that was in an extreme case and might not always be true...
I know for a fact you can physics slap units with addForce
im likely going to probably make two versions regardless with both ways tbh
Ah, your mom
setVelocityTransformation would have momentum and such wouldn't it
Where's lou when I need him
@sullen sigil I mean it gives you velocity and by extension momentum so yes?
Not sure what you mean
like if I shot it at the top of a tall wall from a while away I'd go flying over the top
or something like that
rather than being pulled to that point
Depends on what you put into the command. It doesn't know about the wall, it only knows the numbers you give it.
Maths Timeβ’
Depends how you set it yeah
It just takes an initial state and a final state and lets you smoothly interpolate between them
probably less code too ngl
yeah thats what i was thinking
this is more meant for ascension cables rather than actual grappling anyway so physically it makes more sense this way
Is this based on that attack on tinnitus or whatever
I know they have fancy movement cables that people like to base mods on
no its based off the clone wars when they fight up a vertical cliff
obviously i havent managed to make players walk vertically but we digress
Doable kinda
doable but probably not worth the time sink
That's a cool idea but you're going to lose half the squad to falling off the cliff in under 5 minutes
Actually very doable with setVelocityTransform
almost certainly
As you can just force set their orientation
wait what
Maybe combine with some animation to make it look like they're actually walking as they ascend
Doable
can you not just rotate an animation or something
What I'm saying is that setVelocityTransformation lets you set the orientation of the object you're moving
Meaning you can angle players horizontally
As they move
Does that actually work on units? They don't behave like normal objects
right behind you
(busy reading everything in the last 3.5h)
yeah surely i'd have to make a walking animation at 90 degrees and then stop them being able to turn their camera past a certain point
They really really don't like being tipped on their side but I presume it'd look normal enough with a fast enough loop
And you wouldn't need to rotate the animation if you can rotate the entire unit
@winter rose 
youd have to do some fancy stuff to figure out how to stop it looking like their feet are moving off the "ground"
Meh
like if i move my mouse left and right it rotates me in the Z direction
but youd want Y rotation if youre vertical
Don't get me wrong it wouldn't exactly be easy per se but it's all doable
and probably not too good in MP I'd imagine?
Though you'll likely want a deeper understanding of vector maths and the associated commands
No reason it couldn't work in MP
Might be a little desynced but not much you can do about that
hmmmmmm
i mean i need to get the player able to move their camera about and such with this method so
Tell you what I'll try rigging up a basic demo of my idea of it later today and let you know how it goes
yes please because if its actually possible thatd be fucking sick
@hallow mortar only wrote that your mom's celestial body (of an angel) was very attractive, that's it!
found a pole with physx i can set invisible π
he went to church after all
Though it seems his relationships were a bit rough as all of his actions were met with equal and opposite reactions
Strapped to an invisible pole and launched up a cliff into enemy fire. Arma missions really are amazing
wait till you find out that its going to be in a thermal ventilation shaft too
im making this for literally one op because advanced urban rappelling v2 only allows re-mounting the rope at the bottom
im using a 3gl right now too so whenever i click back into arma i get propelled to some random point on vr
now is anyone aware of a way to let the player turn while theyre attached to an object
Turn on bone rotation in the attachTo mayhaps
Open the map before you tab out, or use rightclick when returning.
aaaa the wiki doesnt have default memPoint listed
Bone rotation in attachTo is follow bone rotation, meaning the attached object rotates along with the bone it's attached to. It doesn't control whether the attached object is allowed to rotate its own bones.
onEachFrame {player setPosATL _ConeBoi}; :D
Perhaps time to change that variable to _PoleBoi
this is true
i suppose i shall mess with the offsets while trying to figure out a way of doing the rotation
...
wait
can i not just make the mouse rotate the cone instead
no wait that wouldnt give up and down camera movement
or would it
it could but it'd look super janky
Miiight be easier to set up keybinds for rotating while climbing
As hooking into mouse movement is a bit of a PITA
in your case probably though the pole will be moving about of its own accord too so i feel like thats probably a motion sickness nightmare
I'll be honest
With the way you're going about this
I'd say just drop the whole rotation thing
thats my thought too
Gonna cause a lot of pain code wise for not much real payoff
its a shame that the ascension speed cant be increased tbh
I'll see what I can do with a demo later
this is a hardcoded limit for the rope version
Yep
your version will almost certainly be better π
though im still unsure how to wrangle a visual rope
My idea is
Normal rope but set up to retract in sync with the movement but without actually applying physx
So as to give the illusion of pulling
that... makes quite a lot of sense tbh
I'd like to think that if I can make a portal gun I can make some climbing gear
ooh ive just had an idea
i could rotate the pole 90 degrees
so the player is facing the direction of travel more or less
that could also be useful for your version
so you dont have to loop the player constantly rotating
my main issue is getting stuck against walls ngl
im unsure how to remedy that without doing something like aur does where you can "kick" off of it
which would just be setting the poles velocity in the opposite direction to the direction of travel i think
I'll experiment with some ideas
actually i think i might just need a higher overhang tbh
Will probably do a periodic surface raycast to determine a surface normal of the climbing face from which to determine the ascension angle
understanding that makes me feel smart
Which combined with an offset should keep the player from running into or being dragged through a wall
And good I'm glad you get it
i think for all intents and purposes im going to call this version finished and not bother with any rotation or anything
will just fuck with offsets and then make my own grenade which doesnt explode or anything
just to check there's no easy way to find the muzzle of a gun's location is there
thats not offset from the player is it though
But then applying that to get the actual position in the game requires some decently heavy vector math
Leopard has posted it before
i think i'll just do it from the players belt line tbh
least fucking around with matrices and different muzzles
Whatever works for you
unless the one leopard posted works for any gun
I believe it does from what I recall
oh word
i think im going to stalk his 30k messages in this channel in that case then
can you remember how recent it was π
Pretty sure he's posted that one multiple times :P
every matrixmultiply message is different
i think this is what im looking for
onEachFrame scares me though
i genuinely have no clue what any of that means other than i'd want to use _p1 for the position
...but i suppose if i put that within the EH it wouldnt be too bad..?
You don't need the onEachFrame there for your application, I think.
i just have to do a whole lot of variable passing
That code's drawing a 3d line persistently from the muzzle, I think.
Yes it is
You can chop off everything after p1 at the end
And get rid of the onEachFrame
Actually no you can't
Well... hm
Depends
If you need it to update consistently with the current muzzle pos then you still need it
just needs to update whenever the EH is fired
so just chop out the oneachframe bit?
and the drawLine, yes.
onEachFrame {
_w = currentWeapon player;
//update weapon info upon weapon switch
if (_w != player getVariable ["last_weapon", "?"]) then {
_cfg = configFile >> "CfgWeapons" >> _w;
_m = getText(_cfg >> "model");
//if (_m select [0,1] == "\") then {_m = _m select [1]};
_o = createSimpleObject [_m, [0,0,0], true];
_off = _o selectionPosition [getText(_cfg >> "muzzlePos"), "memory"];
_off = _off apply {[_x]};
deleteVehicle _o;
player setVariable ["offset", _off];
player setVariable ["last_weapon", _w];
player setVariable ["proxy",
[
"proxy:\a3\characters_f\proxies\pistol.001",
"proxy:\a3\characters_f\proxies\weapon.001",
"proxy:\a3\characters_f\proxies\launcher.001",
"proxy:\a3\characters_f\proxies\binoculars.001"
] select (([1, 4, 4096] find getNumber(_cfg >> "type")) + 1)
];
};
_offset = player getVariable ["offset", []];
_proxy = player getVariable ["proxy", ""];
player selectionVectorDirAndUp [_proxy, 1] params ["_vy", "_vz"];
_pos = selectionPosition [player, _proxy, 0];
_vx = _vy vectorCrossProduct _vz;
_mat = matrixTranspose [_vx, _vy, _vz];
_pos = _pos vectorAdd flatten(_mat matrixMultiply _offset);
_p1 = player modelToWorldVisualWorld _pos;
}```
where on earth is the drawline bit
oh wait i already chopped it
i have no clue where on earth this is going inside my code
For god's sake make a function for it :P
i absolutely refuse
actually thats probably a good idea for the errrrrrrrrrrrrrrrrrrrrrrr
EH things
If they're long, sure.
how do i create a function
Oh you're using that at least
It even has tabs :P
can fullscreen
ya
idk how you dont use it tbf
wait i can just call an sqf cant i
yeah but it's slow if you didn't precompile it.
I use other text editors outside of the game
i'll do it as calling an sqf for now and then i'll do it properly once i compile this all
Mostly notepad++ which is good enough for me 99% of the time
I mostly use VSCode now but ADT does have better SQF support than any VSCode plugin I found.
I use atom and it's a nightmare
ok so call new_2.sqf should call that function right
I like notepad++ because literally all it has is syntax highlighting and nothing else
No linting no autocomplete no bloat
idk if n++ does
ah
No, call isn't used to load sqf files directly. execVM is for that.
But to improve performance, you should turn the sqf file into a function, and then you can call that function.
yeah i'll do that once its working fine
im still working from debug console atm
Script new_2.sqf not found fml
I'm not sure where ADT sqfs are located in the path.
If you want to execVM an sqf file it must be located within the mission folder. If it's in a subfolder you have to include that in the file path.
neither but i'll just do it in mission file
it doesnt seem to be returning _p1 to the script i dont think
If you want it to return _p1, just put _p1; on the last line.
i think it may be because im not creating the rope to an object but just coordinates
that is in fact what it was
i cant actually tell if its coming from the muzzle or not
the rope is present for such a short period of time atm
im also unsure if that script works for GLs π
If you can't tell then it's good :P
in third person camera it looks like its coming from the center of the player
i just pass _p1 down the event handlers now dont i
or should i recall the function for the sake of if the player has turned a bit
yeah that's definitely not the muzzle position π
nowhere 
thats with regular bullet too so idk why that wouldnt work
those are just fake files
like others said make a function
will it not work with execVM
it has to be called
only twice in this instance
as you can just attachto the player with the current offset when the helper part for pulling the player is created
therefore no requirement to check when youre moving it
params ["_unit"];
_w = currentWeapon _unit;
//update weapon info upon weapon switch
if (_w != _unit getVariable ["last_weapon", "?"]) then {
_cfg = configFile >> "CfgWeapons" >> _w;
_m = getText(_cfg >> "model");
//if (_m select [0,1] == "\") then {_m = _m select [1]};
_o = createSimpleObject [_m, [0,0,0], true];
_off = _o selectionPosition [getText(_cfg >> "muzzlePos"), "memory"];
_off = _off apply {[_x]};
deleteVehicle _o;
_unit setVariable ["offset", _off];
_unit setVariable ["last_weapon", _w];
_unit setVariable ["proxy",
[
"proxy:\a3\characters_f\proxies\pistol.001",
"proxy:\a3\characters_f\proxies\weapon.001",
"proxy:\a3\characters_f\proxies\launcher.001",
"proxy:\a3\characters_f\proxies\binoculars.001"
] select (([1, 4, 4096] find getNumber(_cfg >> "type")) + 1)
];
};
_offset = _unit getVariable ["offset", []];
_proxy = _unit getVariable ["proxy", ""];
_unit selectionVectorDirAndUp [_proxy, 1] params ["_vy", "_vz"];
_pos = selectionPosition [_unit , _proxy, 0];
_vx = _vy vectorCrossProduct _vz;
_mat = matrixTranspose [_vx, _vy, _vz];
_pos = _pos vectorAdd flatten(_mat matrixMultiply _offset);
_p1 = _unit modelToWorldVisualWorld _pos;
_p1
that's the function version 
be sure to private the vars...
private within the function right
and fix the tabs...
function
a script im attempting to use makes use of a custom made extension, I have the dll but how would I install it?
every variable where it's first defined
roger
load it as a mod
or paste it next to the game's exe
@MyExtensionMod
|
|__myExt.dll
this should work for GL's right
no
ah, thanks
uh oh
it doesn't take the muzzles into account
either way still looks better than being dragged from the waist
You could always just fire from the eyepos :P
is it fine to create the folder in the steamlibrary > etc > arma 3 > !Workshop directory?
ohh ok
i feel like ive done my config wrong but oh well
i have indeed
oh i just didnt put the right filename nvm
i've done that and tried adding a local mod but get this error, There are no PBO's EBOs in the addons folder inside the mod folder, first time it was the addons folder was missing. it should load automatically if I just put the dll in the root arma installation folder right?
christ im an idiot jfc
wrong dir, hey?
i dont know.
then why do you say you're an idiot if you do not know the source of the issue?
because i dont know the source of the issue π
not knowing is different from effin' up 
class CfgFunctions {
class KJW {
class functions {
class findMuzzleLoc {};
};
};
};
``` π€·
but
if that's for a mission, your shown directory wasn't a mission directory
that's a mod, right? not exactly scripting
also mods don't look up into functions\
yes
it will be scripting again once ive got this function coming up properly
i am
I do not get this question.
this
or is it just to organise your functions in the config
i dont know what the colours mean
they match the ones in the other example
im so confused
hi so confused, I'm dad!
the game will look for a subfolder with the same name as the Category layer in the CfgFunctions
what is Category in terms of how it appears within the mod folder
so if ive named if functions it should look for a folder named functions, right...?
if you writecpp class CfgFunctions { class MY_TAG { class TheCategory { class theFunctionName {}; }; }; }; the game will look into<root>\TheCategory\fn_theFunctionName.sqf
yeah thats what ive done
no
you made a functions\ parent dir
wait, your category is "functions", so it's OK
yeah lol
and inside it?
fn_findMuzzleLoc.sqf
yep, should work
let me double check i updated the pbos one moment
I dont believe you π
17:58:01 CallExtension 'ConfigDumpFileIO' could not be found
17:58:01 CallExtension 'ConfigDumpFileIO' could not be found
17:58:01 CallExtension 'ConfigDumpFileIO' could not be found
17:58:01 CallExtension 'ConfigDumpFileIO' could not be found
17:58:01 CallExtension 'ConfigDumpFileIO' could not be found
17:58:01 CallExtension 'ConfigDumpFileIO' could not be found
17:58:01 CallExtension 'ConfigDumpFileIO' could not be found
17:58:01 CallExtension 'ConfigDumpFileIO' could not be found
17:58:01 CallExtension 'ConfigDumpFileIO' could not be found
17:58:01 CallExtension 'ConfigDumpFileIO' could not be found
17:58:01 CallExtension 'ConfigDumpFileIO' could not be found
is there any settings I need to enable to allow the loading of the dll?
Can I see the full structure of your mission folder including the mission folder itself, please? I saw something in the other screenshot I'm suspicious about, but I closed it and you deleted it :U
its the config bit not mission folder
(that's a fookin' config thing too - and if I learn that you messed it because you didn't refresh your PBOs properly amma mutepurgeban you then invite you back to reban you again!!1!)
make it a mission function first really
why make a mod then check if everything works >_>
leopard says it doesnt work like that
he said it needs to be called and im too dim to do that without cfgfunctions
You can have cfgFunctions in a mission, it's not only for mods
You define it in description.ext
CfgFunctions does not require an addon yeah o_o
either way arma is loading up again now so we will see
im allergic to descriptions
describe your symptoms
ok yeah the error message is still coming up after i repacked the pbos too
i start speaking french
good, the end is near
ANYWAY
make it a mission function, no time to make an addon tonight
It's largely the same as what you already have, so it shouldn't be too difficult
for when it inevitably doesnt work
christ bringing _unit down to where it needs to be exec again is a nightmare
stop breaking things
it does not work
it now teleports me to the impact position
which i think is because of the rope rather than the function
yeah _p1 just seems to be returning the players location rather than their muzzle for some reason @little raptor
creating a pole at _p1 with can_collide and it just seems to be doing it at the players location
so the function declaration works, yay
yes, of course.
_unit selectionVectorDirAndUp [_proxy, 1] params ["_vy", "_vz"]; does it matter that theyre in a string here too
they are auto-privated
or can i just do "private _vy" etc
leopard said i should stick private in front of every variable where it first appears so π€·
no, that's not allowed
is that what would be breaking it
params are implicitly private anyway
yes, that is good practice
every declaration yes
ok i think ive done that then so
(see https://community.bistudio.com/wiki/Variables#Local_Variables_Scope to get why)
i should be using _unit call KJW_fnc_new_2; -- i.e the _unit part, right?
it has params ["_unit"]; at the top of the sqf so
no problem with that
params ["_unit"];
private _w = currentWeapon _unit;
//update weapon info upon weapon switch
if (_w != _unit getVariable ["last_weapon", "?"]) then {
private _cfg = configFile >> "CfgWeapons" >> _w;
private _m = getText(_cfg >> "model");
if (_m select [0,1] == "\") then {_m = _m select [1]};
private _o = createSimpleObject [_m, [0,0,0], true];
private _off = _o selectionPosition [getText(_cfg >> "muzzlePos"), "memory"];
_off = _off apply {[_x]};
deleteVehicle _o;
_unit setVariable ["offset", _off];
_unit setVariable ["last_weapon", _w];
_unit setVariable ["proxy",
[
"proxy:\a3\characters_f\proxies\pistol.001",
"proxy:\a3\characters_f\proxies\weapon.001",
"proxy:\a3\characters_f\proxies\launcher.001",
"proxy:\a3\characters_f\proxies\binoculars.001"
] select (([1, 4, 4096] find getNumber(_cfg >> "type")) + 1)
];
};
private _offset = _unit getVariable ["offset", []];
private _proxy = _unit getVariable ["proxy", ""];
_unit selectionVectorDirAndUp [_proxy, 1] params ["_vy", "_vz"];
private _pos = selectionPosition [_unit , _proxy, 0];
private _vx = _vy vectorCrossProduct _vz;
private _mat = matrixTranspose [_vx, _vy, _vz];
_pos = _pos vectorAdd flatten(_mat matrixMultiply _offset);
private _p1 = _unit modelToWorldVisualWorld _pos;
_p1
``` theres the code being used
_p1 seems to just be returning the unit after checking with systemchat
theres the sqfbin if you want it
systemChat outside or inside the func?
is your extension 64 bit? what about the game?
platforms must match
i think its doing it before the maths is done tbh
idk if thats possible im dumb
7 meters ATL π€¨
what is that?
systemchat str _p1; at the end of the function
ah
2m high wall, getposasl player is ~5m high so
muzzle calc seems to be right
just isnt coming across to the script properly π€
@sullen sigil safety & health reminder:
if you are exhausted, are forcing/dragging yourself through scripting,
make a pause, come back with a fresh mind!
i just had a glass of milk
the weird thing is it returning the players name when done in the main script
rather than the coordinates before
is it possible that the maths for the function isnt completed by the time it does the next line of code
depends how you run it
...alternatively the pole is just falling back down
you may have another systemChat or hint or anything elsewhere, too
no im calling the function twice
function is here
im confused
_entity getVariable ["_theUnit",0];
...
default value for objects should be objNull not 0
i'll pretend i knew that all along
how do you store the return in this instance then
does having _p1 at the end not return it
_p1 = _unit call KJW_fnc_new_2;
bruh moment
judging by the fact thats all above the ground im going to say that works
however its pulling by the crotch/feet still for the actual connection π€
could anyone tell my why the script here:
https://www.ofpec.com/forum/index.php?topic=35236.0
Only gives me:
class CfgVehicles {
Do I need to have the vehicles placed in the mission or something?
Fast dump of config
how do you call it?
sorry meant to include that as well, using the example it provides
[configFile >> "CfgVehicles"] call compile preprocessFileLineNumbers "dumpConfig.sqf"
did you wait for the script to finish?
I mean I think so? I loaded up the mission and threw it in the debug console and hit local exec, thats what it copied to my clipboard
yeah, the bohemia wiki links to it though
big sad
any chance you know of a script that will allow me to dump configs like that?
have you tried the ingame utils?
whats that?
in vanilla debug console type utils and exec
i think physx is probably messing this up a fair bit tbh
uh ive got the extended debug console, how do I use the vanilla one?
player falling galore
a user's comment in a page's discussion* links to it
it's the same
the original one linked by the wiki just gives me an error
anyway you didn't say what was wrong with the dll
just disable battleEye and make sure the exe platform matches the dll
and it will load
which "original one"?
oh, I dont know? I simply couldnt call it. The dll is used for a modified version of the script I send already. Ill check
and I looked again, apparently the one it links to no longer exists. Whatever I tried must have been something else
https://www.ofpec.com/forum/index.php?topic=33539
dumpConfig, 0.95
i shall be conceding defeat to physx in this instance
the wiki links here
https://forums.bohemia.net/forums/topic/120057-how-to-create-an-allinone-config/
It seems there is no thread about dumpConfig in the BIF, so here we go. dumpConfig by WorldeaterDescription: It enables you to write the full current config into a file. After doing so you have an up-to-date full reference of the A2 config and you can also check if your class overwriting or whate...
can you tell me where the wiki links to that?
under required tools, the config dump link
https://community.bistudio.com/wiki/Arma_3:_Replacement_Config_Tutorial
ugh
use this instead
https://community.bistudio.com/wiki/Arma:_All-in-one_Config
I am going to fix that page, thanks
lol alright ill give that a shot, no problem
check the name of the dll. if it's not named XXX_x64.dll it's a 32 bit extension, and you must run the 32bit version of Arma
(again with battleEye disabled)
no _x64 in the name so gonna assume its 32 but before I mess with that im gonna try what montana linked lol
well that one will definitely work but you need to DL the dev branch
just a 530mb update, better than the 70 game restarts I have had to do because the script infinite loops the cant find extension error etc
right now does anyone know how to allow at least free look on a player attached to an object
negative
not possible
sadness
use setVelocityTransformation each frame 
i think root is going to have a punt at making a more true to the series version of what im making
(walking up walls supported by ropes)
im just making poor mans version
2 Things, in the diagnostic branch how would I go about loading mods? or will it still start as diagnostic if i launch throught the launcher?
Also how would I set the path to the directory I want? or where is O:/config.cpp
how would I go about loading mods?
command line
where is O:/config.cpp
some path on your PC where you want the dump
I was thinking the path on my pc part but
C:\Users\Thatguy553\Documents\Arma 3 - Other Profiles\Damien%2eB\mpmissions\ConfigDump.Stratis/config.cpp
didnt seem to work
just try:
C:\Users\Thatguy553\Documents\Arma 3 - Other Profiles\config.cpp
that worked thanks, one last thing lol, how do I change the command line for the diag exe?
just make a batch file
example:
"C:\Program Files (x86)\Steam\steamapps\common\Arma 3\arma3diag_x64.exe" -malloc=tbbmalloc_x64 -nofreezecheck -noSplash -enableHT -hugePages -world=VR "-mod=C:\Program Files (x86)\Steam\steamapps\common\Arma 3\!Workshop\@CBA_A3;"
you can run the normal exe using the launcher first
then use Process Explorer to get the command line args
then put them in a bat
does setVelocityTransformation have to be run on each frame or can you just run it once
if you want to simulate "attaching" each frame
what if i just want to fucking yeet the player
depends how you want to "yeet" him
for normal "yeeting" a simple setVelocity will work
what about for a special yeeting
setVelocityTransformation every frame
tbf i think using setVelocityTransformation would be 100x better than what ive done so far
i'll see what roots demo looks like before using any more of my brainpower on this
Is #include "\AJ_PylonManager\defines.hpp" not possible?
I've read a few conflicting things on the forums about it
that's #arma3_config, not scripting
config edits.... guess I didnt quite understand the description π
{
sounds[] = {};
class song
{
name = "song";
sound[] = {"\sounds\song.ogg", 15, 1};
titles[] = {0,""};
};
};
class pooper
{
name = "pooper";
sound[] = {"\sounds\pooper.ogg", 15, 1};
titles[] = {0,""};
}; ```
i cant put more then 2 custom sounds into a mission
if i put a third one it just doesnt work
You are closing cfgsounds at class song.
All classes must be in class cfgSounds
cfgSounds {
sounds []={};
class song {
};
class pooper {
};
class your3rdName {
};
};
@echo swan π
Yeah, but in your example you close {} cfgSounds before next sounds
sounds []={};
class song {
};
class pooper {
};
class ANIMAL {
};
class hecucom {
};
};```
@stable dune is this correct at all?
Yes
If it doesn't work, show us it
It should, like poplox said. Paste here your config which you are used on description.ext
sounds []={};
class song {
};
class pooper {
};
class ANIMAL {
};
class hecucom {
};
}; ```
Is this what you have in your description.ext?
yes
And you need paste your
{
name =
sound[] =
titles[] =
};
- You need
classbeforeCfgSounds - What prisoner says, you need to fill the actual data inside
songpooperANIMALhecucom
{
sounds[] = {};
class song
{
name = "song";
sound[] = {"\sounds\song.ogg", 300, 1};
titles[] = {0,""};
};
};
class chatter
{
name = "chatter";
sound[] = {"sound\chatter.ogg", 300, 1};
titles[] = {0,""};
};
} ```
i got this to work
but it only allowed two
custom audio files
Again you need to put every sound classes into CfgSounds
how would i go along doing that im not script savvy
Socpp class CfgSounds { sounds[] = {}; class song { name = "song"; sound[] = {"\sounds\song.ogg", 300, 1}; titles[] = {0,""}; }; class chatter { name = "chatter"; sound[] = {"sound\chatter.ogg", 300, 1}; titles[] = {0,""}; }; };
how would i be able to get a third one in by chance
class CfgSounds
{
sounds[] = {};
class song
{
name = "song";
sound[] = {"\sounds\song.ogg", 300, 1};
titles[] = {0,""};
};
class chatter
{
name = "chatter";
sound[] = {"sound\chatter.ogg", 300, 1};
titles[] = {0,""};
};
class ThirdOne
{
// put what you want
};
};```
{
sounds[] = {};
class song
{
name = "song";
sound[] = {"\sounds\song.ogg", 300, 1};
titles[] = {0,""};
};
class chatter
{
name = "chatter";
sound[] = {"sound\chatter.ogg", 300, 1};
titles[] = {0,""};
};
class hecucom
{
name = "hecucom";
sound[] = {"sound\hecucom.ogg", 300, 1};
titles[] = {0,""};
};
}; ```
?
Yes
alr
i copy from here
class hecucom
{
name = "hecucom";
sound[] = {"sound\hecucom.ogg", 300, 1};
titles[] = {0,""};
};
right
if i want a fourth
.....
class hecucom
{
name = "hecucom";
sound[] = {"sound\hecucom.ogg", 300, 1};
titles[] = {0,""};
};
// New class here before last } , which close cfgSounds
class 4soundName {
name = "4sound";
sound[] = {"sound\4sound.ogg", 300, 1};
titles[] = {0,""};
};
};
@echo swan π
When I made a script and put it into addon builder(successfully). I tested in game and no rpt file errors but clearly it wasnβt working? Is there a fix?
Always tell us details. What did you do, how did you done, what it supposed to do
Itβs a Zeus enhanced module with cba addon, itβs suppose to be able to open loadouts and inspect the inventory of players. When I go to test it, it doesnβt work. Not sure on what Iβm doing wrong.
Let me rephrase: post the entire code and config
_unit = _this select 1;
removeAllWeapons unit;
removeAllItems unit;
removeAllAssignedItems unit;
removeUniform unit;
removeVest unit;
removeBackpack unit;
removeHeadgear unit;
removeGoggles unit;
_unit addWeapon "sp_fwa_ar15_603_m16a1";
_unit forceAddUniform "U_simc_bdu_eto_gas_blench";
_unit addVest "V_Simc_vest_pasgt_alice_lc2";
_unit addBackpack "B_simc_US_ALICE_asspack_sekop";
_unit addItemToUniform "ACE_fieldDressing",4;
_unit addItemToUniform "ACE_elasticBandage",2;
_unit addItemToUniform "ACE_quikclot",2;
_unit addItemToUniform "ACE_EarPlugs",1;
_unit addItemToUniform "ACE_CableTie",2;
_unit addItemToUniform "ACE_MapTools",1;
_unit addItemToUniform "ACE_Flashlight_MX991",1;
_unit addItemToUniform "ACE_tourniquet",2;
_unit addItemToUniform "US_Facepaint",1;
_unit addItemToUniform "H_Simc_Boon_m81_2",1;
_unit addItemToUniform "kat_Painkiller",1,10,1;
_unit addItemToVest "sp_fwa_30Rnd_556_Armalite_Ball",7,30;
_unit addItemToVest "rhs_mag_m67",3,1;
_unit addItemToVest "SmokeShell",1,1;
_unit addItemToVest "SmokeShellYellow",1,1;
_unit addItemToVest "SmokeShellRed",1,1;
_unit addItemToVest "SmokeShellBlue",1,1;
_unit addItemToVest "ACE_Canteen",1;
_unit linkItem "ItemMap";
_unit linkItem "ItemCompass";
_unit linkItem "ItemWatch";
}, [], 6, false, true, "", "", 5]] remoteExec ["addAction", 0, true];```
This is for a scroll wheel menu loadout giver. When I use the loadout, it says I have an undefined variable in expression. Where is it and what do I change to fix it
Is it okay if I send you the pbo?
Also, I can access my loadout giver object's scroll menu from way too far away, how do I limit the range
Why pbo?
Not sure exactly whatβs wrong on my config or my function
Then post both
Okay
What is undefined? _unit?
Man I'm just copy pasting this from somewhere, idk. Is that supposed to be different
The error should tell
it says the undefined variable is loadout
Okay I just read your script carefully, there're the flaws:
loadOutis undefined. Is this supposed to be an unit or an ammobox?_this select 1is undefined so_unitis. You probably want to rename it_targetunitis undefined. See 2_unit addItemToUniform "ACE_fieldDressing",4;is wrong syntax. You need to wrap it into an array so_unit addItemToUniform ["ACE_fieldDressing",4];. Same to others
all my lines of code will fill this so i would not like that lol. i could just take pic of it then send it here
I found another method that works much better
I get the arsenal output, and paste it on its own into an sqf, replacing all uses of "this" with "player"
Then I just put this in the giving object's init this addAction ["Loadout Name", "LoadoutFilename"];
ez
i found my error, i didnt define a variable in the end of my function π
@torn elm please use sqfbin.com next time!
thx, thats why i was skeptical of posting it
np - & glad you found out the issue π
Hi, how can I add uniforms to a vehicle inventory?
There is no addUniformCargoGlobal. But does this work with addItemCargoGlobal?
ye
π
Is there a way to get rid of the vignette associated with cutRsc?
there is one only if it is defined?
Defined?
I don't see a vignette property
A vignette is an image
The black border around the screen is what I meant by vignette
thank you
always welcome sir
"someLayer" cutRsc ["RscTitleDisplayEmpty", "PLAIN"];
RscTitleDisplayEmpty has a vignette effect defined in it (which you can find and remove)
How do I check its config?
theβ¦ Config Viewer? π
If vehicleNameHere emptyPositions "" returns 0, is it safe to assume the vehicle has not been set up properly? Getting weird numbers from the SOGPF vehicles :/ im assuming because the "" variant was added only in 2.10, but Im not sure.
returns all empty positions
assume it's full?
Nope, pilot only.
"" returns 0, gunner returns 1 (right gun on the UH1C), commander returns 0 despite being the left gun... cargo works, returning 7, but not cargoFFV/cargonoFFV, which were also late additions to the command.
Kinda screwed with my crew spawning script when it was asked to make -7 units t_t
Im doing a workaround with createVehicleCrew, but I want to make it immersive rather than just immediately appearing in the vehicle, which I had sorta down, just need to figure on ordering them to get back IN when I teleport them.
Hey guys I have no experience with SQF but was looking to get all CfgX class and display names. This is what I have so far
Nothing wrong with it, just kinda abrupt when I also have a complement of troops who appear and climb in as cargo already :p
" getNumber (_x >> 'scope') >= 2 " configClasses (configFile >> "CfgWeapons") apply {configName _x};
"getNumber (_x >> 'scope') >= 2" configClasses (configFile >> "CfgVehicles") apply {getText (_x >> "displayName")}
why?
I want to create a filter to block certain items
and it seems to be correct
However I want them to be outputted in pairs i.e. className, displayName
(well, if you want classnames, don't use displayName ofc)
I would like both as to use it as a reference
I'm unsure how to get this to work
Do text, icons, shapes, etc. I draw with drawIcon on the main map automatically appear on the GPS map, UAV map and Artillery Computer map too?
Currently I am trying to choose whether I implement a BLUFOR tracker using either local markers or drawIcons. Markers probably appear everywhere but not sure about drawIcon and related commands.
private _classAndDisplayName = "getNumber (_x >> 'scope') > 1" configClasses (configFile >> "CfgWeapons") apply { [configName _x, getText (_x >> "displayName")] };
```would return e.g```
[
["M16ClassName", "M-16"],
["AKS74U", "AKS-74U"]
]
I hate to be annoying but how would I add extra configs, would it be like this ?
configFile >> "CfgWeapons" >> "CfgVehicles"
nonono ^^
private _cfgWeaponsClassAndDisplayName = "getNumber (_x >> 'scope') > 1" configClasses (configFile >> "CfgWeapons") apply { [configName _x, getText (_x >> "displayName")] };
private _cfgVehiclesClassAndDisplayName = "getNumber (_x >> 'scope') > 1" configClasses (configFile >> "CfgVehicles") apply { [configName _x, getText (_x >> "displayName")] };
so you have two arrays, as to not mix them
Think of >> like being slashes in a file path when it comes to configs
configFile >> CfgAmmo >> MyAmmo is a bit like accessing configFile/CfgAmmo/MyAmmo
I see
Thereby it's required that MyAmmo be within CfgAmmo if it's listed after it with a >>
/ which by the way also works as >> π
CfgWeapons >> CfgVehicles is like trying to do CfgWeapons/CfgVehicles which makes no sense as CfgVehicles is not within CfgWeapons
Does it? Interesting
it is recommended to use >> for it is dedicated and a bit faster (as / tries to determine if it is a division or a config access first)
but it's, like, very minor, man
Also where are soldier configs stored?
Right our bodies are vehicles for our souls π€£
People are vehicles don't worry about it
there is a isMan = 1 config flag iirc
Can you crew a unit with other units 
stahp
Hey what's wrong with wanting some backup in my backpack
although I guess with some config⦠perhaps
... well, if a player sitting in a car is already a vehicle in a vehicle, and a player sitting in another player's backpack would be a vehicle in a vehicle... can we get CS:GO deathstacks? :D
I mean I did this #meme-arma message
time to turn a helicopter into a man
I can do the helicopter
Turn a unit into a helicopter and have their neck bone rotate with an engineRPM controller π
omg yes
Ah yes
nearly finished the ascension cable π
next step: make an addon out of it π
will do once 2.10 comes out
but im going to experiment with whatever root said yesterday
the better way of doing it
Yes. that needs to happen β€οΈ
I need proper flying tanks!
im still tempted to setposatl every frame
just because funny
ok actually ive found a bug
its not disconnecting the player from the pole sometimes when you take a while getting up for whatever reason
hi , i want ban a client from my admin menu but my script is broken i think
in my life server
`_uid = _this select 0;
_reason = _this select 1;
if !(isServer) exitWith {};
_passwordWasOK = "monmdp";
_passwordWasOK serverCommand format ["#ban %1 %2",_uid, _reason];`
in my script client
`#include "....\script_macros.hpp"
if (FETCH_CONST(life_adminlevel) < 4) exitWith {closeDialog 0;};
private _target = lbData[2902,lbCurSel (2902)];
_target = call compile format ["%1", _target];
[getPlayerUID _target, "Cheat TEST"] remoteExecCall ["TON_fnc_serverCommands", RSERV];`
```sqf
// your code here
hint "good!";
```
β
// your code here
hint "good!";
and we need the encountered error
#ban requires quotes around the id
["#ban ""%1"" %2"
you want it to look like this within the script
@sullen sigil like this _passwordWasOK serverCommand format ["#ban ""%1"" %2",_uid, _reason]; ?
ye
not working but i dont no why lol , i check my logs but nothing
if !(isServer) exitWith {};
put a systemchat in somewhere before the ban command is run
"if I am not the server, I don't do anything"
"hey, I will remoteExec something on the server"
*meeeeeep* logic error spotted!
lolllllllllll
yes im cheking
how can i be so shit at using my own ascension cables π
right now time to stalk roots messages to remember what the scripting command was
I need to add () for the format?
serverCommand (format ["#ban ""%1"" %2",_uid, _reason])
maybe ?
no
it is meant to be an array isnt it
i suppose it'd pass expected string or something if it wasnt nvm
private _target = lbData[2902,lbCurSel (2902)];
yeah
check its value
and check also what you get when you call compile it
I also hope you develop with the -showScriptErrors flag to see script errors π
what is -showScriptErrors ? lol
bruhhhhhhh
in the launcher's advanced options, there is a "show script errors" checkbox - it⦠shows script errors
my script isnt showing errors
doesnt have script errors enabled
ahhhhh yes i have
β¦good π
i wonder if i could detect the height of an object above the nearest one below it then cut the rope when the player is ~2m above that height π€
can the players velocity be impacted when using setVelocityTransformation by outside sources
say, a short rope
<[getPlayerUID player, "Cheat TEST"] remoteExecCall ["TON_fnc_serverCommands"> 15:15:07 Error position: <remoteExecCall ["TON_fnc_serverCommands"> 15:15:07 Error Type Any, expected Number, Side, Object, Group, String 15:15:07 β₯ Context: [] L1 () ?
@sullen sigil it can't be affected by outside sources unless the parameters of setVelocityTransformation update
Since it's just linear interpolation between two states
ok so if i were to have the rope stretched it wouldnt pull the player any faster right
Also if you want the height of an object over the next one below it, that is the purpose of positionAGLS and one of the only cases where using getPos is good
As the Z axis value of getPos is the height above the nearest below surface
And correct
hmmmmm
i think i wont make any further modifications to how the script works right now
on the second version i'll make it a bit more advanced prob
this is supposed to teleport me onto an inivisible helipad which is in a building above ground level, but it teleports me onto ground level under the helipad.
Condition: this && (player in thislist)
OnActivation: player setPos (getPos scpFacility);
have you tried setPosASL and getPosASL
I'll try that and let you know
setPos and getPos are different formats
Thank you, it's fixed!
what on earth is up vector for setVelocityTransformation
Whatever you want it to, as long as it's orthogonal to the forward vector.
idk what that means
What's the object?
a player
probably fine: _fwdvec vectorCrossProduct [0,0,1] vectorCrossProduct _fwdvec
Do you know what a cross product is?
negative
That's generally a couple of math classes so I'm not going into that :P
roger doger
i set it to just some random value instead but the setvelocitytransformation doesnt seem to be doing anything
but a cross product will give you a vector that's perpendicular to the two input vectors.
So _fwdvec vectorCrossProduct [0,0,1] will give you a side vector, and then crossing that again with _fwdvec gives you a valid up vector.
ah yes words that i understand
i think i get a vague idea of what it is
so do i just shove _fwdvec vectorCrossProduct [0,0,1] into fromVectorUp
and then the other part into toVectorUp
Is your forward vector the same at the start and end?
i want the player to move with momentum if thats what youre asking
no, I mean fromVectorDir and toVectorDir.
no but i dont know if that is correct
im trying to launch the player towards the impact of their projectile basically
but i think this understanding of maths is beyond my skill level
Simple version is just _vectorDir = _startPosASL vectorFromTo _endPosASL
i have positions for the player and the impact of the projectile as variables
oh wait i want the vectordir to be the same dont i
ok theyre the same but im still not getting launched
hmmm
it seems to do something if i fire the projectile when not stationary
yeah it just moves me a bit very fast
i dont think ive got the maths right here
player setVelocityTransformation [_playerPos, _entityPos, (velocity player), (velocity player), (_playerPos vectorFromTo _entityPos), (_playerPos vectorFromTo _entityPos), [0,0,100], [0,0,0], moveTime player]; is the command im using
where _playerPos is getPosATL player and _entityPos is the getPosATL of the projectiles impact
im just doing 100 so i can actually notice if it does anything
It's probably ignoring it anyway :P
velocity player is not what you want here anyway
and moveTime player almost certainly isn't either
And whole usage is probably wrong
i'll sqfbin the entire thing one moment π
the indentation is probably a bit funky but oh well
yeah no
setVelocityTransformation only sets the position once per call, so the normal usage is to prepare the array (aside from the interval value) and then call setVelocityTransformation in an eachFrame mission event handler where you gradually adjust the interval from 0 to 1.
this sounds confusing
It's not exactly the easiest thing in Arma script.
just to check i do need to be using setVelocityTransformation right
due to it going to a projectiles impact
which could be anywhere within 100m
shrugs
setVelocityTransformation is certainly a tool you can use for this.
but it takes some work.
will the oneachframe not kill performance
nah, Arma does a lot of things each frame.
It's why you should pre-prepare the array though.
pre-prepare meaning define all the variables beforehand so its not having to redefine each frame?
Well, you can actually build the whole array and pass it into the eachFrame handler
Other than interval, which you need to change each frame.
i think i understand
im unsure what i actually want within the array though
or is what ive done correct just incorrect usage of the command
well, the velocity, upVector and interval there are wrong too.
For velocity you want something like fwdVector * desired speed
vectorDir
For the current forward vector, anyways
But if you're using it for a desired velocity it's just a unit vector in the direction you want to move
E.g. if you want the velocity to go from point a to point b, you can use a vectorFromTo b to get the unit vector pointing from a to b
Which you can then vectorMultiply by your desired velocity in m/s to get a velocity vector
so i would want something like _velocity1 = (_playerPos vectorFromTo _entityPos)*10 to get 10ms in the direction of the entitypos, right?
Yes
and then the second velocity is the same, right?
If you want to be moving the same speed in the same direction at the end yes
ADT is complaining about the *10
ah gotchu
In actual math just using * would be sufficient but alas not in sqf
what about the upVector in this case then
I mean to be fair its an array
It shouldn't have been an array :P
computers need a way to understand humans
its a two direction road lol
Yeah I mean if it were any other language vector would be a type with an operator overload for multiplying with *
They are widely used outside of sqf
yeah I know but I never tapped on how they are actually used
As are quaternions which are not supported by SQF natively for some reason
quaternions sound like aliens from dr who
@sullen sigil upVector is the direction you are facing "up" towards
E.g. if the top of your head is facing the sky your upVector is [0,0,1]
It has to be perpendicular to your vectorDir at all times
Here's how I would do it yeah
_vectorDir = _playerPos vectorFromTo _entityPos; is what im using atm
i assume theres some fancy maths i can use to get a normal to that
Before you start moving get the player's side vector by doing vectorCrossProduct on the vectorDir and vectorUp
Then calculate your new vectorDir like you just sent
And then vectorCrossProduct the side vector and the new vectorDir to get the vectorUp to use
Yes
for the new _vectorDir, right?
_vectorDir = _playerPos vectorFromTo _entityPos;
_sideVector = _vectorDir vectorCrossProduct (vectorUp player);```
like that right
Yes
roger and then i vectorcrossproduct that again with what
And then calculate the new vectorUp with the cross product of the side vector and the vectorDir
_vectorDir = _playerPos vectorFromTo _entityPos;
_sideVector = _vectorDir vectorCrossProduct (vectorUp player);
_vectorUp = _sideVector vectorCrossProduct _vectorDir;```
like that right
or am i misunderstanding
Yep
If you want it to be which I assume you do
i dont actually know what it does in this instance
i just assume its rotation of the player or something
ah is that how you were planning on doing the wall climbing thing
In a similar fashion yes
That is what needs to go from 0 to 1
i assume i add a value to the variable for that on each frame or something?
Yep
needs to finish on 1 by the time the movement is finished?
Yes
One simple way you can do it
Is just increase it by the amount of seconds you want the full movement to take divided by diag_deltaT
deltaT being change in time right
Or sorry
Other way around
deltaT/seconds
Yes change in time since the last frame
ok so i want to define the interval variable within the oneachframe EH and then have it add deltaT/seconds after the setVelocityTransform has happened and then go back around again until 1, right?
i think im doing that anyway
now i just need to pass those variables through the onEachFrame handler
Which you should use instead of just onEachFrame
confusion
oh as in
_id = addMissionEventHandler ["EachFrame", { systemChat str [_thisArgs, time] }, [time]]; like this wiki example
_velocity = (_playerPos vectorFromTo _entityPos) vectorMultiply 10;
_vectorDir = _playerPos vectorFromTo _entityPos;
_sideVector = _vectorDir vectorCrossProduct (vectorUp player);
_vectorUp = _sideVector vectorCrossProduct _vectorDir;
_interval = 0;
addMissionEventHandler ["EachFrame", {
params ["_playerPos", "_entityPos", "_velocity", "_vectorDir", "_vectorUp", "_interval"];
player setVelocityTransformation [_playerPos, _entityPos, _velocity, _velocity, _vectorDir, _vectorDir, _vectorUp, _vectorUp, _interval];
_interval = _interval + diag_deltaTime/10
}];
so i end up with this
and then i need to stop that when _interval reaches 1
which i have no idea how to do π€
Mm I really am sleep deprived
game is complaining of expecting an array between player and setvelocitytransform too 
confusion
And yeah that's because you can't just use params
oh yeah i have to pass them through the EH too dont i
Just replace params with that
_thisArgs params ["_playerPos", "_en.....
Yes
roger
its still complaining about it 
addMissionEventHandler ["EachFrame", {
_thisArgs params ["_playerPos", "_entityPos", "_velocity", "_vectorDir", "_vectorUp", "_interval"];
player setVelocityTransformation [_playerPos, _entityPos, _velocity, _velocity, _vectorDir, _vectorDir, _vectorUp, _vectorUp, _interval];
_interval = _interval + diag_deltaTime/10
}];```
Oh you're not actually passing them lol
bruh moment
Regardless you will need to store _interval somewhere where its new value can actually be stored otherwise it won't actually increase Disregard forgot how event handler params work
would getting the variable within the loop not cause it to stay as 0
You would need to get it, increase it, then save the increased value
Honestly it's an acceptable case to just use a global
right so just chop out the underscores in front
im also still confused what you mean about not actually passing the variables
latest version of the script
As in
Look at the syntax for addMissionEventHandler
You can keep the underscores but you need to actually give it the parameters you want it to use in its parameters list
oh [_thisArgs, <variable>, <variable>] after the end of the code?
is this correct? if so it says it cant find tbbmalloc_x64, where is this located?
start "D:\SteamLibrary\steamapps\common\Arma 3\arma3diag_x64.exe" -malloc=tbbmalloc_x64 -nofreezecheck -noSplash -enableHT -hugePages -world=VR "-mod=D:\SteamLibrary\steamapps\common\Arma 3\!Workshop\@RHSUSAF;D:\SteamLibrary\steamapps\common\Arma 3\!Workshop\@CBA_A3;D:\SteamLibrary\steamapps\common\Arma 3\!Workshop\@ace;D:\SteamLibrary\steamapps\common\Arma 3\!Workshop\@ACE Compat - RHS USAF;"
@sullen sigil yes
ADT complains about undefined variables when i do that though
Are you putting it in the actual addMissionEventHandler call or in the code inside it
It's part of the actual function call
oh so between the } and the ]?
After the code block
@boreal parcel What are you trying to do? Just run the diag exe with mods?
yeah
strip out -malloc and -hugePages then
Also a somewhat easier method is to simply rename the diag exe to the normal exe name.
BIKI says the syntax for the command is addMissionEventHandler [event, expression, arguments]
And the you can just use the launcher to run it.
You need to put all of them in the arguments spot
As an array
After the code block {}
addMissionEventHandler ["EachFrame", {
player setVelocityTransformation [_playerPos, _entityPos, _velocity, _velocity, _vectorDir, _vectorDir, _vectorUp, _vectorUp, interval];
interval = interval + diag_deltaTime/10; },
[_thisArgs, "_playerPos", "_entityPos", "_velocity", "_vectorDir", "_vectorUp", "_interval"]];```
that is a good idea, windows cant find -nofreezecheck
ohhhh i think i understand now
that one can go too
Also don't wrap them in quotes
and -enableHT
so i use [_thisArgs, _playerPos] instead of _playerPos, right?
You then use _thisArgs with params inside the actual code block to access those values
This would be so much easier to type if I wasnt on mobile
Its literally just
no no i think i understand you now
layer setVelocityTransformation [[_thisArgs, _playerPos], [_thisArgs, _entityPos], [_thisArgs, _velocity], [_thisArgs, _velocity], [_thisArgs, _vectorDir], [_thisArgs, _vectorDir,] [_thisArgs, _vectorUp], [_thisArgs, _vectorUp], interval];
that, right?
and then the rest of the code and then
}, [_playerPos, _entityPos, _velocity, _vectorDir, _vectorUp]];
_arg1 = 5;
_arg2 = 10;
addMissionEventHandler["EachFrame", { _thisArgs params ["_arg1", "_arg2"]}, [_arg1, _arg2]];
Example
addMissionEventHandler ["EachFrame", { _thisArgs params ["_playerPos", "_entityPos", "_velocity", "_vectorDir", "_vectorUp", "_interval"];
player setVelocityTransformation [_playerPos, _entityPos, _velocity, _velocity, _vectorDir, _vectorDir, _vectorUp, _vectorUp, interval];
interval = interval + diag_deltaTime/10; },
[_playerPos, _entityPos, _velocity, _vectorDir, _vectorUp]];```
okay things now move
just not as i would quite like them to
things are moving but its incredibly funky
oh wait
im not actually finishing when interval = 1
ok time for that bit i think
i think just getting it working properly initially is a first step
ok so i want waituntil interval = 1 then exitWith {} right
Defining _interval is pointless if you're using the interval global (which should be something more like KJW_VAR_INTERVAL)
And no
Just put a check in the loop that runs this once it hits 1
why use params here? you can just use _thisArgs directly, also you should just set on _thisArgs (for the interval part)
yeah forgot to chop out the _interval i just copy pasted from earlier
removeMissionEventHandler [_thisEvent, _thisEventHandler]
That will allow you to terminate the EH from within
so something like
if (KJW_VAR_interval) >= 1) then {
removeMissionEventHandler ["EachFrame", _id]
};```?
oh i have to pass _id through the EH too
i have no idea what any of this means
oh is it an automatic variable
Yes
ah
You should really read the biki page for addMissionEventHandler lol
It says all of this
i have but im also stupid
I mean fair
Though I was stupid too because sharp has a point
You actually can use the interval passed in _thisArgs, it'll keep the updated value between frames
Somehow I ended up under the impression that it wouldn't preserve the new value
So you actually can just edit _interval instead of using a global
im still meant to be using if and such though arent i
Yes
i also end up trapped under the floor for some reason
to remedy that i'll need to add like half a meter to the initial pos right?
Add whatever makes it look right lol
