#arma3_scripting
1 messages ยท Page 304 of 1
Silly me. Forgot to remove it from the array ๐
Doesn't change much about the fact that it runs in one frame.. The Player will not even see the Actions appearing
Hmm.
[] spawn {
sleep 60;
{
ply removeAction _x;
} forEach acts;
acts = [];
ply sideChat "No response. Assuming you want to stay inside vehicle.";
};
use this instead of the while loop. It will wait 60 seconds and then abort
Also your variable names are very generic..
And if the player uses the getOut action again and just ignores your Yes and No you will overwrite acts while not deleting the old Yes/No Actions. So you will get duplicates
Alright. Maybe it would be better to use a HUD? So the player cannot scroll and is forced essentially to either press Yes or No?
Would be better. Then he can also just close it with Esc and you can see that as a No
Indeed
Will be a fairly new experience for me due to the fact I have never messed with HUDs.
But making a Hud is even Harder than a addAction script. And you seem to already be struggling with the script
Very true.
you should check at the start of the script if acts is non-empty. And if yes delete the existing Actions inside acts. That would solve the duplication issue
waitUntil {time % 500 == 0}; would technically work to execute a code every 500 seconds if used in the right context yes?
yes...... But.. That's kinda dumb
you need a while loop anyway.. Why not use a sleep
a waitUntil is checked every few frames. A sleep wouldn't be touched till it's done (It will still be touched but won't be as heavy as evaluating the waitUntil condition)
can't you just remove the vanilla exit vehicle action and replace it with an action that creates yes/no actions or displays a yes/no dialog?
Afaik vanilla exit vehicle is hardcoded
But you could lock the vehicle so the player can't get out otherwise
sleep 500;
if(stats_sectors_liberated > 0) then {
res = stats_sectors_liberated * 3;
resources_ammo = resources_ammo + res;
systemChat Format["Game Logic : Given Resources: %1", res];
} else {
systemChat "Game Logic : Unknown Error - manage_timer.sqf";
};
}; ``` And I suppose with the lock.
Does the server regroup units in it's initialization?
What do you mean regroup?
Because if I execute my code right after the client has his interface whcih will create a new unit the player is switched into and joins the old player unit to another group, it won't work completely. The player controls the new unit but the old one is still in his group. But logging showed that the group switch did indeed work at the time the script has finished
Therefore I am assuming the server is doing something with the group of the old unit and switches it back to the original group ๐ค
Groups are local to the machine that created them?
I think...
I've been away from ArmA 3 for a long time now.
I quit the game completely.
Correction groups are Global
Got the code to look at?
One sec...
And this is where the new unit is created: https://github.com/OurAltis/mission/blob/DevVersion/OurAltis_Mission.Altis/scripts/functions/respawn/fn_createOurAltisUnit.sqf
Haha xD
I also found out ArmA 3's single-threaded nature got worse...
after the 64bit update.
Running a single-thread on my machine at 100%
causing the FPS to cap at 30 FPS
CPU could not longer provide work for the GPU to do.
@scarlet spoke
You've got a locality issue
selectPlayer is known to screw with locality
Just4Info:
Most of the notes above do not apply to Arma 3 anymore.```
Update the wiki then...
And it does work later on
facedesk
It just doesn't work directly after mission start
Is it running scheduled?
Nope
Yeah preinit can delay stuff a lot.
Any idea in how to solve the issue?
Why not just use the initPlayerLocal.sqf or something like that?
For now I have implemented a delay for the client's mission start and it seems to work but it's kind of a dirty fix...
Becaue it would screw the rest of the system (because its no longer in sync) + it would be in scheduled env.
remember also
initPlayerLocal.sqf, init.sqf, initServer.sqf or initPlayerServer.sqf
all run scheduled.
I know... That's why I don't use them ^^
Did you try benching your code?
In the unscheduled to see how long it takes to execute?
The one in the pre-init?
Yeah
No haven't done that yet
Check it.
But I'm not doing a lot of stuff in there...
Okay I'll do that
The client takes 0.001 seconds to run the code and the server takes ~7 seconds
I think this is because the server has to create a few bases from scratch during that time
Which will be running in scheduled also have to remember
However the client only starts after the server has run all it's code anyways
the scripting executor VM is mapped to a single Kernel layer thread
What will run in scheduled?
Ohh you are creating the bases in non-scheduled?
yeah
Well apparently it is ^^
But this is only when the server initializes and as I said the client won't start before it has completed
Anyway you could shrink the workload and do it in batches?
Ah before the clients connect, but you've got to consider when you reboot the server
that preinit code will run
everytime the mission is restarted or rebooted.
I guess I could but then it could be that the client initializes before the bases are created... ๐ค
I know... But if it doesn't there's nothing to play on except the plain map of Altis xD
using call in unscheduled do me a favour
Run your code
Then watch using ProcessExplorer
CPU core 0
and how far it goes up while running that code.
Particularly the base creation.
I remember from my own scripting core 0 goes to about 70 - 90% when performing those sorts of operations.
I get the point but that has to be done on startup anyways so why not do it at once?
You know an unscheduled halts all engine operations till completed yes?
it's "Blocking"
So sure complete it all at once.
But it may impact the performance of other sections of your mission potentially.
Depends on how long the "Blocking" function takes to complete.
it's why they say
you shouldn't run complex code in unscheduled
Creating vehicles, is definitely considered "complex"
@scarlet spoke
Hm I'll have to investigate that further and experiment a little bit with the different options...
Thanks for your help @tough abyss
it lives
@still forum The HUD/Confirm thing wasn't that hard ๐
@dusk sage am I correct?
No one wants to have 30 FPS on the loading screen. createVehicle at mission start in unscheduled.
That way the missions starts faster...
Even when using the scheduled environment, one createVehicle call will run all at once, because one script command is atomic.
I've done this before, spawning a bunch of vehicles in unscheduled made the game cry...
It was about 10 - 12 vehicles
Rapify claims there's a mssing }; in the last line of this https://gist.github.com/Neviothr/c0c9187721a6158dd42327c9124ecb85. Any idea why?
1.:
class nev_debug_menu { <-- nonono
class nev_debug_menu <-- yesyesyes
{ <-- yesyesyes
Nope. That's not the issue here @jade abyss.
?
It is, because you would see instantly, where one is }; missing ๐
You keep giving unhelpful advices.
Yeah i know. Good, aye?
(oh btw. i am checking your files atm, while giving you unhelpful advices....)
because Macros replace the inline macro keyword with code
It's probably one of the macros you are using
Yep, must be something in the Macros
(another "unhelpful advice")
My unhelpful advice/Guess is:
Line 5
onLoad = QUOTE(call FUNC(onLoad));
I don't see include of the script_component.hpp, but even then, it should just replace them with strings
class nev_debug_menu { <-- nonono
class nev_debug_menu <-- yesyesyes
{ <-- yesyesyes(edited)
triggered
The file is included inside config.cpp, at the top of which there's #include script_component.hpp.
Truncated file. Missing one or more };. Error starts near token 'controls' "
In file C:\Users\Me\Desktop\nev_debug_menu\config/cpp: Line 574 EOF encountered
return with -noisy option to see decode
Press the ANY key
One of the Macros
style = ST_LEFT + ST_FRAME;
works like that
Pretty sure the tools want you to put quote marks arund this
because they suck ass
QUOTE(ST_LEFT + ST_FRAME)
๐คฆ
Sorta.
Dscha, you cannot do
style = "ST_LEFT + ST_FRAME";
That wouldn't resolve those numbers
Build works for me (after adding the base classes for the controls)
Use the Numbers, problem solved, next one.
What you should do is comment out all the controls classes with one big /* */
Dscha, that isn't the problem
Comment out all controls and then reenable them one by one
To find out which class is bugged.
And the tedious debugging begins.
Hey isn't it weird how if I build it with AddonBuilder and place it inside @Ace#7850/addons it works?
This is why I started learning C++ and Python...
I get an IDE.. (off-topic)
For pbo'ing yes.
I've been trying to solve this since yesterday. Bascially the game is refusing the load my addons...
Unless I move them to another folder.
Mikeros tools are good for de-pbo'ing and de-rapifying
Maybe something in your build script
I never used them beyond that.
I can agree to that, Geeky
I had weird stuff happen when pbo'ing using his tools
"weird stuff" means?
Not recognizing script files in missions among others..
@NEV_Addons/addons/nev_debug_menu.pbo = doesn't work. Moving it to @ACE/addons/nev_debug_menu.pbo = Works
Pretty sure I fucked up something during building and now the game is refusing to handle @NEV_Addons properly.
There's nothing about nev_debug_menu inside the RPT as well.
i hate to be this guy, but why not just do this whole menu in script form using ctrlCreate?
i've not seen the point in doing UIs in configs since that family of scripting commands came to arma 3
well, you can't even run this cfg properly, so..
@rancid ruin
Can't agree on that. createDialog > ctrlCreate the whole thing
Script solution -> Good for testing/aligning it.
portability between missions and not needing to run an @ is a bigger plus IMHO
The problem he has atm -> Macros... macros everywhere.
@rancid ruin the mod adds an addAction and a keybind.
So all you have to do in order to open the dialog is press a button...
nothing stopping you from creating the exact same thing using sqf
but fair enough, more than one way to skin a cat
@tough abyss You can build your whole UI with CtrlCreate and its other commands. When this is completely done -> You can copy the Coords / Commands to the Config.
_Ctrl_InfoBar_BG_Pos = [0.398 * safezoneW + safezoneX,0.758 * safezoneH + safezoneY,0.204 * safezoneW,0.027 * safezoneH];
_Ctrl_GetInInfo_Text = (findDisplay 46) ctrlCreate ["RscStructuredText",411002];
_Ctrl_GetInInfo_Text ctrlSetPosition _Ctrl_InfoBar_BG_Pos;
_Ctrl_GetInInfo_Text ctrlSetBackgroundColor [0, 0, 0, 0];
_Ctrl_GetInInfo_Text ctrlCommit 0;
_Ctrl_GetInInfo_Text ctrlSetStructuredText parseText format["<t font='RobotoCondensed' size='1.2' align='center' color='#%2'>%1</t>",_Text,_Color];```
for example
Seems like one big ass script to run every few seconds.
Assume this is an admin's console of a sort, the dude's going to be opening and closing all the time.
ctrl commit 0;
Not rly
then uncomit it?
what?
Isn't there a way to hide the GUI
Geeky is trolling
then reshow it?
what i did with my debug menu was to ctrlCreate buttons when inventory screen is opened, ez, works well
Yeah pressing Esc.
I replaced as many ctrlCreate with config as possible.
i did the exact opposite ๐
Commy gets it.
@rancid ruin reason?
(i can't find any logical reason, why you prefere 10000 Commands, instead of a single command to load the Display/Interface)
find it easier to follow the flow and see what's going on. everything's SQF, same syntax, same fucked-up-ness
It's not like you jump between Ruby and SQF in an HPP file ๐คฆ
it works for me and let's me dev stuff quicker
everyone got his kink
i have like a makeButton function which i pass params, which then does the ctrlCreate, set text, colour, position, commit, etc
apply that to all ctrl types and you've got a big mess of [param,param,param,param,param,param,param,param,param,] call createCtrlElement
A button is like 7 lines of code in a config.
So instead of inheriting from a base class, you recreate every button on its own ๐ Lets talk about effiency ๐
^
Obfuscated either one is just one line
let's talk about how this guy can't even pack his addon correctly though, and see which of us can make a UI quicker ๐
๐
๐
๐ฅ
I worked 2 days ago ๐ฆ
It works with addon builder and it works in the magical ace folder
you guys are trying to apply sensible programmer logic to an unsensible platform
embrace the SQF and write fucked up code
Well you're applying unsensible logic to an unsensible platform
Btw.: Did AddonBuilder already learned, go give proper feedback about errors?
@little eagle ๐ฅ
i would be debugging this in a clean, minimal new @mod rather than shoe-horning it in to the existing ACE mod or your own @ which is doing other stuff
compartmentalise it all
Some stuff like:
"Error in line 6 of file abc.hpp"
And not
"Error: 404. Find the cause for yourself, sucker."
Yesterday when I build TFAR 1.0 the game complained about:
Input after end of line: <space>
Today it works
One restart
๐คท
and yeah keep restarting your game
Arma ยฏ_(ใ)_/ยฏ
Gotta love it...
ErrorMessage: File z\tfar\addons\backpacks\anarc164\ui\anarc164.ext, line 74: Config: End of line encountered after
after ___ ... -__-
^^
End of line encountered after ?
Sounds funny to me
Where else would the end of the line be
that's deep
Renaming the folder didn't work ๐
Did you try the good old /* */ method?
No.
Do it.
What exactly do I comment out?
Ok.
It crashes during build or at game start?
I commented out everything UI related: ```Cpp
#include "script_component.hpp"
class CfgPatches {
class nev_debug_menu {
name = "Mutipurpose Debug Menu";
author = "Neviothr";
units[] = {};
weapons[] = {};
requiredVersion = 1.0;
requiredAddons[] = {"Extended_EventHandlers"};
version = 1.4.2;
versionStr = "1.4.2";
versionAr[] = {1, 4, 2};
};
};
#include "CfgSettings.hpp"
#include "CfgNotifications.hpp"
#include "CfgEventHandlers.hpp"
// #include "ui\BaseDefines.hpp"
// #include "ui\DebugMenu.hpp"
Addon does not work.
Does not appear in RPT, etc.
0 changes for better or worse.
Oh and it doesn't crash @little eagle.
You are packing with?
AddonBuilder. Would you like screenies of the settings?
No, give pboProject a try
locating rapify...found
locating makepbo...found
locating Personal Tools for Arma2...found
locating steamtools for Arma3...found
Impossible. SourceFolder <C:\Users\Me\Desktop\nev_debug_menu> is not part of Workspace <P:\>.
See setup->
Does the unpacked mod folder need to be in P:?
Might be better
Where's the binlog?
scanning for jobs to do....
Processing nev_debug_menu
MakePbo x64UnicodeVersion 1.88, Dll 4.97 "nev_debug_menu"
Warning: rapWarning: **********missing file(s)***************
Warning: nev_debug_menu\CfgEventHandlers.hpp Line 3: call compile preProcessFile
LineNumbers '\NEV_Addons\addons\nev_debug_menu\XEH_preStart.sqf'
Warning: nev_debug_menu\CfgEventHandlers.hpp Line 9: call compile preProcessFile
LineNumbers '\NEV_Addons\addons\nev_debug_menu\XEH_preInit.sqf'
Warning: nev_debug_menu\CfgEventHandlers.hpp Line 15: call compile preProcessFile
LineNumbers '\NEV_Addons\addons\nev_debug_menu\XEH_postInit.sqf'
Rap or Derap error
makepbo failed
?
You don't use CfgFunctions, right?
Nope.
You should do it.
But...CBA...
Its cleaner, tbh
config.cpp
class CfgFunctions
{
class MyTag //MyTag_fnc_MyFunction
{
class ExampleForFolderSortingA
{
file = "\MyMainAddonFolder\MyAddon\Functions"; //P:\MyMainAddonFolder\MyAddon\Functions
class MyFunctionA {}; //name of file "fn_MyFunctionA" in Folder: "P:\MyMainAddonFolder\MyAddon\Functions"
class MyFunctionB {}; //name of file "fn_MyFunctionB" in Folder: "P:\MyMainAddonFolder\MyAddon\Functions"
class MyFunctionC {}; //name of file "fn_MyFunctionC" in Folder: "P:\MyMainAddonFolder\MyAddon\Functions"
};
class ExampleForFolderSortingB
{
file = "\MyMainAddonFolder\MyAddon\Functions"; //P:\MyMainAddonFolder\MyAddon\Functions
class MyFunctionZ {}; //name of file "fn_MyFunctionZ" in Folder: "P:\MyMainAddonFolder\MyAddon\Functions"
class MyFunctionX {}; //name of file "fn_MyFunctionX" in Folder: "P:\MyMainAddonFolder\MyAddon\Functions"
};
};
};
in PboProject you would select the Folder "MyAddon", wich results in the "MyAddon.pbo"
Dscha, I don't want to restart the game every time I change a function
CfgFunctions is not an option
Do you Function Testing like veryone else
In the DebugConsole
"CfgFunctions" not an option... oh my
Your ways are quaint
[] spawn
{
MyCodeIWannaTest;
};
When done -> CfgFunctions
so your reason is not existing ๐
๐คฆ
Mr.Macro, shush
^^
Quiksilver, some people make addons and don't want to recompile their functions at every mission start
"old"
silly missionmaker
Whatever helps you sleep at night.
and then, there are ppl like you ๐
I'd like to thank everyone for their help. But I've came to the conclusion that I've fucked up something during packing, and that there's no way to unfuck it. Therefore, I will just wait for it to unfuck itself.
Addon's fine, Arma doesn't see it. I'll wait for Arma to fixes itself ๐
Did I create malware?
Fuck me...
P drive is fucking worst thing ever.
I dont really see why i need all the games content unpacked on a seperate wonky mounted drive.
"the daily mail is calling your mod a tool to recruit members to ISIS"
yeah Head it is ridiculous...i only have SSDs so i can't really justify duplicating arma
it's pretty massive install already without having 2 copies
Should just fetch the needed files from the pbos.
I had kinda that working for includes.
It would just scan the pbo prefix and snag the included files out of it
Managed build my addon with CBA includes~
@tough abyss Even worse is when they offer a fix that doesn't work.
For a problem that doesn't exist
I always put my per frame code in onEachFrame.
My code is better than commys anyway.
๐๐ฟ
than*
[1:10 PM] commy2: Dscha, I don't want to restart the game every time I change a function
๐ค
Well the other way around. Exile broke, because their onPlayerConnected which did some funny "Bambi" thing and was overwritten by the properly used addStackedEventHandler
ikr
It's funny when you get complains about "Bambi".
No one knew what the fuck they were talking about. Bambi... as in the disney thing?
so wtf were they talking about?
No, bambi is a deer
Stop making up things
"Fresh Character creation failed"
That should've been the error message
Then someone would at least know what to look for
My first thought was spawning animals or something
Every ACE update is called banana
I call it being lame
My updates are called 2.1.2.4
eeryone of them.
Dont need version numbers.
๐คฆ
Hey, anyone knows how to use Arma_3_Dynamic_Simulation ingame diagnostics?
Im reading the wiki but dont get it
it mentions 3 modes bDynSimEntities DynSimGroups DynSimGrid
but how do I enable em
the scripting executor VM is mapped to a single Kernel layer thread Not a VM. And WTH is a Kernel layer thread
And the tedious debugging begins. I get an IDE.. You know... @tough abyss There are actually two Arma IDE's with integrated Debuggers....
Wasnt Kernel layering (as a model) just used as a description of how the (micro-)kernel works? ^^
And even if you assume that the thread would run in "Kernel mode", I need to dissapoint you
I have a question about the bohemia saveloadout function, i have googled it for a bit. If someone saves the loadout and they have a grenade launcher and one in the tube, they lose it(the one in the tube. Im pretty novice at scripting so i dont even know where to begin but im looking for a way to resolve this.
Are you referring to getUnitLoadout?
Yes... There is a class called Car in CfgVehicles
no when i use this, it makes the grenage in the tube of weapon dissapear
[player, [profileNamespace, "Var_SavedInventory"]] call BIS_fnc_loadInventory;
Personally I have used this:
_gear = getUnitLoadout player;
player setUnitLoadout _gear;
@half monolith
thankyou for some direction ๐
see if i can figure it out i am trying to replace a scripted function that seems to have glitch with watches , it is really outdated.
I used the above to save gear loadouts in a database and load it upon joining, as well as saving gear as they leave base so when they spawn back in after death, their gear is loaded then too.
I haven't tested it specifically for magazines within the launcher, but worth a shot.
well im using it as an action on a box to save a loadout after leaving arsenal so upon respawn, you dont have to enter arsenal.
Ok. So then have the action do this:
_gear = getUnitLoadout player;
_gearString = format ["%1", _gear];
player setVariable ["playerGear", _gearString, true];
And upon loading the gear, you can do this:
_gear = player getVariable "playerGear";
if (typeName _gear == "STRING") then {
if (_gear == "") then {
while {_gear == ""} do {
_gear = player getVariable "playerGear";
sleep 1;
};
};
_gearFinal = call compile _gear;
};
if (typeName _gear == "ARRAY") then {
if (count _gear < 1) then {
while {count _gear < 1} do {
_gear = player getVariable "playerGear";
sleep 1;
};
};
_gearFinal = _gear;
};
player setUnitLoadout _gearFinal;
novice quesrion, should i run these alone or with the bis function as well?
Works on its own. No need for the bis function.
ok giving it a shot thank you
Of course
Although the second function is specifically tailored for waiting for playerGear to be defined (waiting for the value to be retrieved from the database). So you can probably just use the following:
_gear = player getVariable "playerGear";
if (typeName _gear == "STRING") then {
_gearFinal = call compile _gear;
};
if (typeName _gear == "ARRAY") then {
_gearFinal = _gear;
};
player setUnitLoadout _gearFinal;
ok i saved the first snippet to my save script as is, and the second to the load script as is (overwriting all) and when i try the load after save i get a undefined expression in _gearfinal
Are you in the editor?
yes
Run this in the debug console watch section and see what it says:
player getVariable "playerGear"
@tough abyss Don't forget you have the command isEqualType now ๐
i went to arsenal picked loadout, saved it, then back to arsenal randomize.. then tried the line in debug. nothing
Actually, let's simplify it. Make this your save script:
player setVariable ["playerGear", getUnitLoadout player, true];
And this your load script:
player setUnitLoadout (player getVariable "playerGear");
You're saving using the arsenal?
This isn't attached to the arsenal in any way.
i have predifined loadouts that i load
then save on the box
no save on exit arsena
Ok. Just try the above.
golden
Sweet
thats awesome man
thank you
now how does this work
i had a problerm with mission vs player in the beginning because i found if someone had something saved from another server with say thermals which i have blacklisted, it will still load thermals and all despite this. thats using playernamespace, missionnamespace doesnt allow for that "cheat" (im sure someone would figure it out)
As in be able to load whatever they want via the arsenal?
So you want to restrict items in the arsenal?
also have another glitch,. this one has to do with the arsenal function im using writtin by someone else.
yeah
i have a working whitlest using a hacked up version of larrows written function.
You can do it using vanilla methods
im updating the aas tremplate, to thid century
yeah
i have a bbackup to this function
ready to go
may have to use it
but its still whitelist
and i really want blacklist
to blacklist with van methods i technically have to whitelist everything though?
_basicWeapons =
[
"arifle_MX_F",
"hgun_P07_F"
];
_basicMags =
[
"30Rnd_65x39_caseless_mag_Tracer"
];
_basicItems =
[
"U_O_CombatUniform_ocamo"
];
_basicPacks =
[
"B_AssaultPack_khk"
];
Arsweapons = _basicWeapons;
Arsmagazines = _basicMags;
Arsitems = _basicItems;
Arsbackpacks = _basicPacks;
["Preload"] call BIS_fnc_arsenal;
[player, Arsitems, false, false] call BIS_fnc_addVirtualItemCargo;
[player, Arsbackpacks, false, false] call bis_Fnc_addVirtualBackpackCargo;
[player, Arsweapons, false, false] call BIS_fnc_addVirtualWeaponCargo;
[player, Arsmagazines, false, false] call BIS_fnc_addVirtualMagazineCargo;
["Open",[nil,player]] spawn BIS_fnc_arsenal;
this is similar to what i wrote
Official way of doing it. Although you can't stop them from loading presaved ones, so I got some scripts to override the official functions to whitelist saved ones.
But you can by loading these: https://1drv.ms/u/s!AnVplwEuoFQeibV1xdDlnA9vUqHrUw
if !( isServer ) exitWith {};
if(playerSide == east) then {
[_mybox, true, true, false] call BIS_fnc_addVirtualWeaponCargo; // array of weapon classnames
[_mybox, true, true, false] call BIS_fnc_addVirtualItemCargo; //array of items classnames
[_mybox, true, true, false] call BIS_fnc_addVirtualBackpackCargo; classnames
[_mybox, true, true, false] call BIS_fnc_addVirtualMagazineCargo;
["Open",false] call BIS_fnc_arsenal;
};
};
ok
thats what i came up with
its gotta be side specific too lol
id add the lists and remove the true
```sqf
CODE
```
โ Do that
like i had done it this way in the first place, until i got stopped by not knowing simple things like
if(playerSide == east) then {
sqf
?
To the code you paste in here.
ahh
Makes it easier to read.
has anyone managed to get BIS_fnc_ambientAnimCombat working reliably in MP on dedi?
@UD1E#2095 Just do this:
switch (playerSide) do {
case west: { [] execVM "westGear.sqf"; };
case east: { [] execVM "eastGear.sqf"; };
};
Then in each of those files assign the gear to be whitelisted.
There is probably a few ways to stop players from using saved loadouts. First thing that comes to mind is find the idc of the button controls "save" and "load" and hide them on when arsenal is opened
Can't you still open the load menu with ctrl + l ?
well you can't really hide it when ctrl + l makes it show up in the first place
@plush cargo @little eagle easy. Use the files I posted above to overwrite the actions in the arsenal.
waitUntil huh. So all I need to do is to set my view distance to 12 km and be quick before the scheduler decides to run the thread again ๐
Then add this in your functions.h or Cfgfunctions:
class overrideVATemplates
{
tag = "arsenalFunctions";
class Inventory
{
file = "scripts\arsenalFunctions";
class initOverride { postInit = 1; };
class loadInventory_whiteList {};
class overrideVAButtonDown {};
class overrideVATemplateOK {};
};
};
And I believe that is all I did to activate it.
When using the [] call BIS_fnc_GUIeditor; editor I can extend from the workspace provided correct?
Not sure, I hate the gui editor
Second that.
calculator ftw
I stay away from GUI's in Arma haha
i love them ๐
Does somebody has an idea why a vehicle is destroyed (it's Killed EH triggers) but when obtaining the damage of the vehicle it's not 1...
Sometimes it is as low as ~0.2
Why do you need the damage if you know it is destroyed?
Wait. Negative?
@tough abyss doesn't matter at this point
But fact is that I do need it and it's not correct
~ = approximate commy
Guess im staying within the lines ๐
you're right, he's always giving others breaks.............................
lmao
gotta keep him on his toes
needs params ["_type","_type","_classname"];
Hey I mean that ~0.000001ms could count in Arma.
Every ms counts!
Make Scripting great again!
We will build a paywall! And the Community will pay for it!
gonna be the best paywall, youll see
lol yeah just a blurry lil line
@jovial ivy 0.000001ms is one nanosecond. No that doesn't count.
I don't have a scrollwheel (no mouse), but ctrl + num + works
I like making my code like this:
AH29e4e59263b38191a8 = { private ["_AH3f546d9751a527bfc", "_AHe804a40dc3fd1fccf", "_AH5a01b6da2dfb75ab2", "_AHb9f46fba64bf7545e", "_AH6f56fd1951a358dab", "_AH60c3b947e760c433a"]; _AH6f56fd1951a358dab = ["LeadTrack01b_F_EXP", "LeadTrack02_F_EXP", "LeadTrack04_F_EXP"]; _AH60c3b947e760c433a = _AH6f56fd1951a358dab call BIS_fnc_selectRandom; player removeEventHandler ["FiredNear", firefightEH]; _AH3f546d9751a527bfc = ["AH69eb4fb98a43608673", "AHdf0affb4cbb717f88c", "AHea01a0c9f01a0c294c", "AH794cb58a10337a6a66", "AH1e941fad0572661df8", "AH2af94cafafe6478ca7", "AHc7290cce7ac55e3c30"]; _AHe804a40dc3fd1fccf = getPos player; _AH5a01b6da2dfb75ab2 = player distance2D (getMarkerPos (_AH3f546d9751a527bfc select 0)); { _AHb9f46fba64bf7545e = player distance2D (getMarkerPos (_x)); if (_AHb9f46fba64bf7545e < _AH5a01b6da2dfb75ab2) then { _AH5a01b6da2dfb75ab2 = _AHb9f46fba64bf7545e; } } forEach _AH3f546d9751a527bfc; if (_AH5a01b6da2dfb75ab2 <= 150) then { [_AH60c3b947e760c433a] call AHe6813ce80ad7fac185_fnc_playMusic; waitUntil { !AH0d8ea34710a288eeee }; sleep 120; firefightEH = player addEventHandler ["FiredNear", { [] spawn AH29e4e59263b38191a8; }]; } else { firefightEH = player addEventHandler ["FiredNear", { [] spawn AH29e4e59263b38191a8; }]; }; }; firefightEH = player addEventHandler ["FiredNear", { [] spawn AH29e4e59263b38191a8; }];
0_o
ffs delete that
Makes it fun for code stealers
private["_AH3f546d9751a527bfc", "_AHe804a40dc3fd1fccf", "_AH5a01b6da2dfb75ab2", "_AHb9f46fba64bf7545e", "_AH6f56fd1951a358dab", "_AH60c3b947e760c433a"];_AH6f56fd1951a358dab = ["LeadTrack01b_F_EXP", "LeadTrack02_F_EXP", "LeadTrack04_F_EXP"];_AH60c3b947e760c433a = _AH6f56fd1951a358dab call BIS_fnc_selectRandom;player removeEventHandler["FiredNear", firefightEH];_AH3f546d9751a527bfc = ["AH69eb4fb98a43608673", "AHdf0affb4cbb717f88c", "AHea01a0c9f01a0c294c", "AH794cb58a10337a6a66", "AH1e941fad0572661df8", "AH2af94cafafe6478ca7", "AHc7290cce7ac55e3c30"];_AHe804a40dc3fd1fccf = getPos player;_AH5a01b6da2dfb75ab2 = player distance2D(getMarkerPos(_AH3f546d9751a527bfc select 0)); {
_AHb9f46fba64bf7545e = player distance2D(getMarkerPos(_x));
if (_AHb9f46fba64bf7545e < _AH5a01b6da2dfb75ab2) then {
_AH5a01b6da2dfb75ab2 = _AHb9f46fba64bf7545e;
}
}
forEach _AH3f546d9751a527bfc;
if (_AH5a01b6da2dfb75ab2 <= 150) then {
[_AH60c3b947e760c433a] call AHe6813ce80ad7fac185_fnc_playMusic;
waitUntil {
!AH0d8ea34710a288eeee
};
sleep 120;
firefightEH = player addEventHandler["FiredNear", {
[] spawn AH29e4e59263b38191a8;
}];
} else {
firefightEH = player addEventHandler["FiredNear", {
[] spawn AH29e4e59263b38191a8;
}];
};
};
firefightEH = player addEventHandler["FiredNear", {
[] spawn AH29e4e59263b38191a8;
}]; ```
๐
Oh shiet.
Have fun
The variables might be a, what the hell.
@tough abyss
_type = _this select 0;
_type = _this select 1;
๐ค
forgot to "encrypt" the firefightEH lol
All the files/folders are like the variable names too bahaha
lol. Formatting it into shape is the easiest part. I just used some random online javascript formtting thing ๐
Whenever I choose to look into peoples mission files they have all of their .sqf code in a single line lol.
I may have. It is finished. Just didn't have the time for a proper release yet.
- close mission
- shift + delete the mission folder
http://dominatestratis.armahosts.com/
Little project.
What text color goes good on a greyish background?
white with a shadow
Can I do that with the GUI editor? lmao
I figure I can do white. But not entirely sure if I can do the shadow.
class textScrolltext: RscStructuredText
{
idc = 28201;
x = 0;
y = 0;
w = 0.28 * safezoneW;
h = 1;
text = "";
colorText[] = {1,1,1,1};
shadow = 0;
colorBackground[] = {0,0,0,0.25};
};
@tough abyss you were right about the hitpoints... Is there a way to get the "critical Hitpoints" of a vehicle?
"critical"?
- close mission
- shift + delete the mission folder
will be more for aircraft
prolly
Engine 1, Engine 2 etc
Fuel = boom
Engine = engine off
Hull = nothing or explosion (depends on Cfg entry)
For Tanks... Puh... thats more difficult...
Soldier = HitHead and HitBody
HitHands = Can be 1
And what about vehicles?
same for HitLegs
Vehicles = HitFuel and HitHull or HitBody (can't recall)
The new stuff, no clue
Thanks guys!
hitpoint name does
= 0.9 on a veh will destroy it sometime iirc
if (_damage >= 0.98) then
{
if (_selectionName in ['head','body','']) then
{```
better
omg Dscha
sup commy2 (okay, you edit, i edit)
could hardly read those two lines wo the formatting
Also, HitFuel doesn't kill a vehicle immediately
Fuel leaks -> Then explodes
Pretty quick, but not immediate
prolly some more
secondaryExplosion = 1000000;
fuelExplosionPower = 1000000;
Secondary explosions from cooking off ammo
*fuel
And fuel
class CfgFunctions
{
class DNI
{
class startup
{
file = "\DNI_ZeusFPSMonitor\functions";
class init_FPS{postInit = 1;};
};
};
};
Warning Message: Script \DNI_ZeusFPSMonitor\functions\fn_init_FPS.sqf not found
but whyyy
For an addon btw
obviously
Obviously the path is wrong
gaaah wasn't the path it was the tag
obviously
hey don't disrespect rocket's SQF guys
name one more person who became a millionaire from writing SQF
i'll wait
woops wrong channel. but still.
millionaire? didn't know that
@tough abyss You think this is a bit better? https://pastebin.com/THZMi2HC ๐
Hi @rancid ruin <-- this guy
hello
A millionaire in fun and experince though ๐
he sold the game to BI and gets royalties AFAIK @polar folio
recently admitted to wasting "millions" on that failed ION game
and has a lambourghini
definitely millionaire
well leasing i guess
photoshop
and a bit of pr
People who are really smart and rich would never tell you that directly
maybe he's just rich then
but honestly this does not belong into scripting channel sry - dont respond to post further just switch channel ๐
well someone was poking fun at his SQF in general and i replied in the wrong channel, calm down bro
is this not working?
"A3\Sounds_F\sfx\alarm_independent.wss" remoteExec ["playSound3D"];
Probably not
["A3\Sounds_F\sfx\blip1.wav", player] remoteExec ["playSound3D"];
playSound3D needs at least these two arguments.
thx
First time ive seen arma spew this out lol
18:09:02 Error position: <ใผใผใผใผใผใผใผ
ใปณใผ
ใผใผใผใผใพ
18:09:02 Error Invalid number in expression
18:09:02 Error in expression <ใผใผใผใผใผใผใผ
ใปณใผ
ใผใผใผใผใพ
18:09:02 Error position: <ใผใผใผใผใผใผใผ
ใปณใผ
ใผใผใผใผใพ
18:09:02 Error Invalid number in expression```
and im not even chinese
or whatever that is
Atleast it's right. Thats definetly an invalid number
lbClear _cbo;
{
player sideChat Format["Loading Player: %1", (name _x)];
_index = _cbo lbAdd(name _x);
_cbo lbSetData[(lbSize _cbo), (name _x)];
} forEach allPlayers;``` is what you would roughly use to add players to a scroll list?
Anyone know hwo to add functioning radar to a planes init script so I can see targets?
How do i refrence an object in a script that is being run from the object init field? This problem probably doesnt make sense but yeah anyway thanks
if init field = this execvm "yourscript.sqf", then in yourscript.sqf _object = _this
or you can just use _this in yourscript, or use params to get values out of an array you pass to it
just like you would use this in the init field
this execvm "yourscript.sqf" doesnt seem to work
might need nothing= this execvm "yourscript.sqf"
unless someone has a better way of preventing it returning
this execvm "yourscript.sqf"; nil maybe? havent tried that
yeh put nothing= at the start will fix it
nothing= this execvm "yourscript.sqf" should work
Ive put that in the object init (the object is a gate from apex)
and in the script is
_object = _this;
_object addaction ["test",""];
nothing still works
does just putting this addAction ["test", ""] directly in the init field work?
it does yes but i wanted to put it in a script so i would have to keep copying or rerwiting the code
and just use the script instead
yeah im not sure why that wouldn't work, assuming yourscript.sqf is in the root folder of your mission
yes
Nevermind about it, i had something in mind and just relised i could do what i was doing form the init field of the object my bad Lecks for wasting yoru time
How would I go about referencing a terrain object that doesn't have a classname? I basically want to create a blacklist for a cover system I'm working on so I can filter things out like the wirefences but typeOf doesn't return anything on them.
try getting the objects with nearestTerrainObjects
then maybe filter them by model names (getModelInfo) or by just type, for example "fence" in the nearestterrainobjects arguments
Perfect, getModelInfo was exactly what I needed
I wanna start scripting for a mission. Is there a way to manually control the gun of an AAA unit with a script?
I want to create some background tracerfire.
There's a module for that I think.
yeah. I haven't used it in ages, but it should still be there
I'll check later.
I've done that
gunner_1 setSkill 0.1;
gunner_1 disableAI "AUTOTARGET";
gunner_1 disableAI "TARGET";
nig_shoot_sky = {
_gun = _this select 0;
_t1 = _this select 1;
_t = selectRandom _t1;
gunner _gun setSkill ["aimingAccuracy",0.05];
waitUntil {
_gun setVehicleAmmoDef 1;
sleep 10;
[_gun,_t] spawn {_gun = _this select 0; _t2 = _this select 1;for "_i" from 0 to 250 do {sleep 0.1;_gun lookAt _t2};};
sleep 10;
for "_i" from 1 to 10 do {
sleep random 1;
_gun fire (weapons _gun select 0);
_gun lookAt _t;
};
sleep random 10;
!(alive gunner _gun)
};
};
[zu_1,[skeet_1,skeet_2,skeet_3,skeet_4,skeet_5]] spawn nig_shoot_sky;
zu_1 is a zu-23 cannon. skeet_1 to skeet_5 are skeets floating high in the air with simulation disabled, so they don't fall or take damage.
This is the basics of it. You can pretty much adjust the rate of fire with this as well
Hope this gets you some ideas @brazen reef
The problem about the module is that they can run out of ammo
the tracers modules spawns an empty unit that shoots the sky :S
And since I am already hereThank you @peak plover
Exactly
That looks pretty sweet.
Just use that for ideas. I made it for a GRAD, sometimes the gunner would look away from the targets, so I had to use the sleep 10
Fucking gunner
I remember when the module would spawn a boat and even though it was invisible you could still see the position lights
it took about 10 seconds for my GRAD to set its gun up
hahaha, I love these fun things the devs have made
Looking at vanilla missions just makes me feel better about myself
Well now its just a soldier with a gun. Still runs out of ammo
Also most vanilla missions have pentagrams on them
You mean like the campaign?
Yeah
I noticed that a few years ago when I looked into them
I mean it would be nice if I had enough players for things like tracers lighting up the night sky to happen automatically
But lmao
That's semi creepy
Yup
The only time that ever happened was in Planetside 2, when I joined a random assalt with lke 40 vehicles, and a few AAA tanks shooting at planes in the sky.
Legit a really awesome moment.
Yeah, it just gives more atmoshpere and war feels
@brazen reef oh yeah. PS2 at night is so pretty
I don't think so
Shucks.
You could spawn a light
I wish you could create artificial glow
Well I guess you could spawn normal fires.
With custom settings
You can
Createvehicle, I just dont remember the classname for light source
Might actually be #lightsource
You would need to script it to make it flicker.
Yeah ^
Well nothing in arma happens on its own
You could also adjust the brightness settings via scripts
That's cash
SideNote: If you reach your Max. Light count -> They dissapear. Keep that in mind.
Ohh yeah, any way to increase max light count? The update on CUP terrains made lights really flickery and dissapearing way too easy on takistan etc.
Not rly
Increase your settings ingame
But still doesn't change thath: What about the players, where the Setting is low? They don't see anything.
So... yeah, just a sidenote from me =}
So it might not be so good for distant things at all
I wish I could incrase the graphics more. I get the same FPS on LOW and MAX on most servers anyway
Atleast you can have insane viewdistances
A better DOF and particles would be cool too. hell yeah. The view distance is pretty good now. I play with 12k since 64bits
so the viewdistance scripting command will change over 12k?
is there a way to give priority to selected scheduled threads? something like nice in linux
also can anyone explain what the heck happened here http://i.imgur.com/V1BHz5O.jpg
they're stuck in that animation for no reason
at no point do i make them switch animations or play actions
just a few operations with disableAI and enableSimulationGlobal
whenever I reset them with _x switchMove "", they immediately play that "drag" action
No @digital pulsar
You could control execution yourself though (assuming these are incredibly long running)
And prioritise
In a script I defined a global variable A_AIRS_AVAIL = "readyFix"; Do I need to do something special in another script or will if (A_AIRS_AVAIL isEqualTo "readyFix") then {} will just work?
as long as it's defined before running the if statement, you're fine
well yeah I will execVM the script after the declaration
sounds good
@dusk sage do you have any examples of implementation?
does dedi have any kind of "on each tick" handler?
I assume EachFrame is client only
@jade abyss this ended up being my problem with doors instead: https://feedback.bistudio.com/T124191
instead of changed animation source (I read the config entries and call those)
comment "Define unit as ACE Medic // 0 = no medic; 1 = medic; 2 = doctor;";
unitName setVariable ["ace_medical_medicClass", 1, true];```
Thats for the ACE medic. Does somebody have it for the engineer thingy?
Thats why i use my own stuff only @Adanteh#0761 ๐
well i like reading the useractions, because it means it's compatible with all the mods too
it just compiles functiuons like these for th em: http://i.imgur.com/S64L866.png which worked fine till they messed up their function
all non-BIS stuf is fine, plus the hatches on watchtowers and so are still good too ๐ฆ
I did it, I released my first mod, wohoo
I hope you got a "Thanks to" Area, or i will whip you buttocks back to the moon, Mr. Nitro.
๐
Thanks to the Earth for helping me out lol
๐
thanks to the ACE repo, found my variable sqf comment "Define unit as ACE Engineer // 0 = no engineer; 1 = repair specialist; 2 = engineer;"; unitName setVariable ["ACE_IsEngineer", 1, true];
//////////Help from Commy2, Dedmen, and Dscha////////////
that should be it alltough I'm not sure if the values are correct
You better did that! ๐ DNI
good. Dinny.
Nope, Dinny.
@plucky beacon well you could change the Help thingy to Discha ๐
LOL
"the Help thingy" wow, i am a thing now.
no you're a Dscha
1x Dscha
dshkm
Dscha
I rename my unit's config name for Dshkm to Dscha
Dinny, sush. Back to topic again =}
Is it because I said config?
@jade abyss @little eagle I fixed yesterday's issue, it was a problem with signatures, to fix it I had to sign the addons through the AddonBuilder rather than packing them and then signing using DSUtil.
Blame BI I guess @open vigil ๐
So, you had to sign Vanilla addons?
?! I can't remember the problem anymore, tbh
Or you messed up and had sign your OWN stuff?
It was my own stuff @open vigil.
A simple "your were right" would have sufficed ๐
^^
Fm help im being abused by Dscha
Whatever makes you sleep better at night, mate ๐
He keeps slapping me
its not abuse, he calls it "man love".
...
๐
how would i animate the wheels of a ca via script? _car aniamteSource ["Wheel", 1]; i was thinking. but not sure about the parameters
Wheel_1_1
But iirc those wheels must be enabled in the model.cfg before
(source="user")
hm. so engine sources don't work? because the wiki has some turret examples so i thought i can just use what triggers normal driving anims
Use the cwr something Version of the Drone. Won't work with it.
hm. so maybe "animate" will work better?
Lets take the example of the Turrets:
If "MainTurret" is not inside "sections[] =" part of the model.cfg -> It won't move
Then you need to add the Wheels to the Config under animationSources
hm. shit. thx
nope, Sections
class Animations: Animations
{
class mainTurret
{
type = "rotationY";
source = "user";
selection = "otocvez";
axis = "osaveze";
....
...
...```
But yeah, in Bones also (but when its a Turret, it should be already in there, otherwise it wouldn't move at all)
๐
selection = "otocvez";<-- that must be in sections[]={};
(taking the example above)
Whaaat. You configure your user animation bones as sections, not as bones? Why?
Oo
Im honestly surprised this works at all...
Something's fishy here.
CfgModels >> someModel >> Sections[] is for defining swap textures and specific engine-side stuff like muzzleflashes, license plates (OFP tech) and the Squad XML surfaces.
CfgSkeletons
class BaseVehicle_Skel : Car_Skel
{
isdiscrete = 1;
skeletonInherit="Car_Skel";
SkeletonBones[]=
{
"motorblock",""
};
};
sections[]= { "motorblock" };
class Animations:Animations
{
class motorblock {source = "user"; selection = "motorblock"; axis = ""; type = "hi .... bla other settings ..... rceAddress="clamp";};
};
config.cpp:
class AnimationSources: AnimationSources
{
class motorblock {animPeriod = 0.01; source = "user"; initPhase = 0;};
};
Check your CfgSkeletons for that object.
*Updating Text on top, mom
taken from my Test Model for 2017mod
I removed everything unneded (other defines)
there you go. motorblock is in the skeletonBones.
If "MainTurret" is not inside "sections[] =" part of the model.cfg -> It won't move
But yeah, in Bones also (but when its a Turret, it should be already in there, otherwise it wouldn't move at all)
Thats what I am contending.
basically what i want to know is, if you can make a vehicle drive by forcing its animations. the moving part is not important but rather the engine sound simulation
The moving wheels won't have an impact on the Driving Force, just4info. The vehicle won't move at all, only the wheels will turn around.
yea as i said, the sound is what i need not the movement
PX vehicle, or no PX?
so how would i make its wheels turn then?
@jade abyss So unless you setObjectTexture something to your motorBlock you do not need it inside the sections[] array.
k. i noticed a quad bike will do the tire rolling sounds when attached to a player while he moves. is that sound configurable per vehicle type?
yeah
anyone know anything about createSoundSource? Trying to figure out if a local-only sound source could be created
seems like it's global though
I had to add "MainTurret" to the Sections[] list to let Arma make me animate it Kalb
You mean overriding engine-generated animation sources?
@thick ridge btw.: You will run in the problem: Sound stays static at the position it was created.
Nah, any animation Kalb
Then you're wrong.
oihodhns
kk
Please have a look at the Test_Tank_01\model.cfg of the A3 sample sources and inspect the sections[] arrays.
Yet turrets still move on that tank.
@thick oar i think Dscha means move turret via script commands
Yeah, the Turrets move there, Kalb. BUT: You can NOT use animate or AnimateSource on them
So back to: You mean overriding engine-generated animation sources? ๐
@thick ridge what about say3D?
Yeh... but now I know what you were on about. Indeed, animateSource does not work on these engine-side animation sources that turn and elevate the turret.
Now you were saying that by declaring this via sections, you could. ๐
Yeah, for those you have MainTurret (or however its called) to the model.cfg =}
@digital pulsar that would work, but concerned about calling say3d over and over in a loop - maybe it's not a problem
Yeah, i did some playaround with some Tanks a few days ago, thats why i know it ๐
@digital pulsar I also like that I can move the sound source around, where as say3d gets stuck in that position
(trying to find an alternative to the "One man tank"-solution without AI)
I thought you were saying that you can use cfgModels >> Animations without declaring the bones. ^^
NAH!!! ^^
OFP had a lot of one-man tanks. That tech should still be around
Maybe this would work: https://community.bistudio.com/wiki/setSoundEffect since triggers are local
Yeah, with AI as driver.
and then just move the trigger around
even player as driver
+damnit, you know what.. i think i used your Tutorial back in OFP to get the Train in game ๐
But I think this may not be possible anymore since Arma1 when turrets were revamped.
atm, its a fricking urgs. Not worth the effort, tbh. Solution with AI/Agent is the best so far.
Oh the fun with fake turrets and invisible people inside.
oh my
can I force a AI to repair a vehicle by command?
I'm not I want to use it in a script
OA only. sure it will work in A3? ^^
Yes ๐
ok thanks
need help with a script on exlie
@sweet canyon I don't think this is the place. Go to exile discord instead
Depends on
If it has something to do with the mechanic in Exile itself -> Their Discord might be a bigger help.
well its more of a general question i am trying to get third person unlocked on trigger (like entering a zone)
its more of a arma 3 camera controls question
I am waiting for the question, what you did before etc
ok well i have tried both ways enable third person in the diffculty from the A3profile then just try to do a check for if !player in zone then disable third person i have a script maybe you could look aty?
boths ways being enable third person in profiles and disable the do check for in zone then enable third person
inArea... did not think about that thanks man
Create a Marker named. "ThirdAllowed", place it where you want 3rd allowed ->
if(player inArea "ThirdAllowed")then{//Enable3rd};
+the Size of the Marker can be used to determine the area. Size/Area of Marker -> inArea zone
yeah ok instead of using mods location just make my own trigger then set to allow right thanks man
yeah marker sorry
Dscha, inArea also works with triggers and locations
How do I turn it off or change it?
http://i.hizliresim.com/X0Py63.png
Yeah, but why placing a Trigger who checks every 0.5s for something?
And why placing a Location, when you can have the Size of the marker to declare the absolute size. Thats why ignore them
Yeah, it doesn't make much sense.
The whole trigger framework is ...
crap?
bulls***?
Any other word
I think... in my whole time as selfproclaimed coder... i think i used trigger maybe 2-3 times
Hell, i even prefered "Pos distance pos" against Trigger
I deleted more triggers in CBA code than I ever used in anything ever.
๐
I used them twice I think. Once to debug how the hell they work and why they're used in CBA in some places
And once just to help someone in this chat.
I did a "Blitzer" in my early days, then noticed -> 0.5s ... ffs? Nope nope nope.
anyway, back to configraping
hey, has anyone worked out how to convert a [vectorDir, vectorUp] -> Eden rotation attribute
wth is a "Eden rotation attribute"
wasn't it VectorFromTo?
VectorFromTo is vector between 2 points
We had that a few days ago in here, can't remember what the result was
"Rotation" ?
should be a simple VectorUp (no clue, haven't touched Eden in no other way than placing 1-2 Items)
if it was that simple... ๐
(btw.: I hate vector stuff)
pretty store eden stores it as a https://en.wikipedia.org/wiki/Euler_angles
ah
Proper Euler angles (z-x-z, x-y-x, y-z-y, z-y-z, x-z-x, y-x-y)
Yep, and i am out. hf.
I can burp on command, but Vectorstuff... nah, thx.
there are some BIS_fnc_getPitchBank, but it can be upto 10% inaccuate i think it said and it doesnt work anyway so
i can get the dir needed if its on a 2d plane
_vdir[1] atan2 _vdir[0]
ish
I'd write something, but my internet is 404
I'd write something, but my internet is 404
commy2 - Today at 8:43 PM
I'd write something, but my internet is 404
I'd write something, but my internet is 404```
spammer
(i had that yesterday)
Nah, it's my connection.
// ace_common_fnc_getPitchBankYaw
params ["_vehicle"];
(_vehicle call BIS_fnc_getPitchBank) + [getDir _vehicle]
This is what ACE uses^^
Why are you asking.
ah fuck connection
404
shouldn't the weapon holder point upwards anyways?
ah
got a pic? of how you want it to be oriented?
Just use the up vector of the table?
you can use vectorFromTo and modelToWorld positions to get the right vectors
attachTo
so you want weapons to lay flat on a table?
Doesn't attachTo make it already turn with the object it's attached to?
_weapon setVectorUp vectorUp my_table
u prob need to rotate the vectorUp of the table around the vectorDir 90 degrees then
https://db.tt/zBO1hUIJOl
[vectorUp _table, vectorDir _table, 90] call func^^
๐
the func rotates any vector around any axis
its exactly what your after
so my problem ๐
What the hell are you trying to achieve?
sqf objects (map content) in to an eden mission so it can be editted
its irrelvent
i have the data
position classname vectors etc
i can position it fine but for objects with standard 3d vectors
anything rotated in 2d is fine
atan2 works
Why don't you convert the vectors to polar coordinates and rotate them that way?
u can only rotate them and it save to the mission using set3denattr
(_vdir call CBA_fnc_vect2Polar) params ["_mag", "_dir", "_elev"];
_dir = _dir + 90;
_elev = _elev + 10;
_vdir = [_mag, _dir, _elev] call CBA_fnc_polar2vect;
there. rotated 90 around z and 10 upwards
Hard to help any of you when you don't know the problem
shitty connection and glitching out monitor doesn't help
ffs
this is why i dont bother asking for help in here...
completely unnessesary comment there
aye but it's a public discord, I assume with no specific rules of no unneccassary comments added
that code isnt what im after either.
I have a vectorDir + Up and want to convert it to what EDEN takes as a rotation.
Im guessing eden takes eular angles (not 100% sure tho)
This vector:
[[0.17101,0.975082,-0.141314],[-0.173648,0.17101,0.969846]]
Is represented in the eden attr as:
[10,10,10]
to rotate things in eden via script and have the translation saved, you HAVE to set the eden attr
setdir,setvector* dont save in the eden mission
btw. to Quiksilver's issue. it's solved. but turns out the weapon will point to the left when created with CreateSimpleObject. thought i'd mention it since it's counter intuitive and good to know
i wonder if a vehicle will face the same way a weapon does inside the model in objectBuilder
aka inside the p3d