#arma3_scripting
1 messages ยท Page 380 of 1
@peak plover You can't transfer LOCATION over the net. They only exist on one machine.
gameLogic perhaps?
just array the task and condition > add to a global array of all tha task arrays > loop trhough those constantly > if conditon true task complete
Quiksilver, a LOCATION takes less computation time per frame than a single task already does.
Just delete 2 ai from every mission and do the task thing. FPS problem solved
even if you don't want to just retrieve the actual task using the var saved in unit varspace dude,
_unit setVariable [_taskVar,_task];
the task still exist
my OCD kicks in when i see entities spawned in the gameworld to hold variables
There's no better way though and it's very efficient if you stick to "Name" LOCATION and "Building" simple object.
Even better, save the tasks to player profilenamespace so every time he logs on he can see all the tasks he has failed, even after mission restarts. He should remeber when he fucked up every time he goes to look at the tasks!
You can create millions of them and it doesn't do much to performance.
Pretty sure TASK become null after the mission ended, just like OBJECT, GROUP etc.
Yes, but you save the data and recreated the tasks local to player
true
doesn't MP save do that already?
No?
Not over play sessions...
Probably should make a global database that all servers share and keep it there. So even if he stops palying and reinstalls years later... no mater which server he logs on, he will remember that time the failed the task
make an extension that just set his wallpaper to the mission fail image
Change windows startup to the fail sound
Send a letter to his house
mail him a bullet
Don't know what the "windows fail sound" is, but this one would be perfect to play after a failed objective: https://www.youtube.com/watch?v=CQeezCdF4mk
โบClick here to download a FREE sound effect pack - http://adf.ly/1QxZbn โบFor discounted steam games, skins and keys check out - https://www.g2a.com/r/gamings...
yeeeeah, no you can't modify setTask
Use a function or a macro in the future so you don't have to rewrite it 26 times
Or CBA or Interceptionโข
@peak plover Intercept*
that fail sound is one of my custom Von sounds. It gets used regular.
@lone glade you . can't . setVar . a . STRING Remember my talk about Intercept pseudo namespaces? ๐
No! Let it happen!
UGHH
params ["_ids"];
private _id = if (_ids isEqualType "") then { _ids} else {_ids param [0,"",[""]];};
if (_id isEqualTo "") exitWith {["[x] Task ID cannot be an empty string!"] call bis_fnc_error;""};
private _taskVar = _id call bis_fnc_taskVar;
Just rewrite it in Intercept and tell Arma engine to bugger off
Intercept is now getting the feature to redirect vanilla SQF commands :3
So every command can be made to trigger an eventhandler?
every script command.. yeah.. Didn't even think of that
but it can only be overwritten once. And only by Plugins authorized by the core developers.
So that's something that Intercept CBA could do.. Didn't even think of that.
I only wanted it to hook compile for my profiler
Asking because this could make the loadoutChanged polling obsolete by hooking into addWeapon etc.
Take/Put could handle the rest.
Take/Put was always the go to recommended by the short sighted, but addWeapon and friends were the problem.
If I made this game, this would be a feature from the start...
easy to do now ^^
Is actually exactly what i am doing
But with the added feature of being able to modify the script before it is compiled
regex replace would be neat wouldn't it? ๐
How lucky that Intercept CBA can already do that ๐
You can even dynamically redirect them at runtime. So you can enable/disable your hooks.
Previously any interaction with that system was preStart eventhandler only.
which isn't a vanilla EH anyways :p
well yeah.. prePreStart* ofcause.
Doesn't CfgFunctions have preStart?
oh, maybe it does
Yes it does precompile all functions at preStart. Before the preStart functions are called.
so all preStart functions actually run post preStart.. are they Start functions? or postStart functions?
prePostPreStart functions?
That's where I got the stupid name from. I didn't come up with it myself.
I'd argue that they are executed exactly at preStart... after all functions are compiled.
so functions are compiled at prePreStart then?
"preStart" etc is not a dot on the time axis, but a section, and many thing can happen there. Think of it this way.
Yes... But.. How do you name things then that happen at the start of preStart vs the middle and the end?
Hello guys, someone can help me with ppEffects ?
I can try atleast
Thanks you. i got this. https://hastebin.com/uhibuxomoz.nginx
When i execute this code in debug, the effets lasts 1 or 3 seconds then, they disapear
Could be another script also creating ppEffects and overwriting yours
Oh right thanks i'll have a look on this
@still forum hey you were so right, i just changed the priority of my effects, this is perfect now thanks you
Didn't even know you can change priorities ๐
_ppGrain = ppEffectCreate ["filmGrain", 2005];
so if the 2005 is used twice on the mission, effects are gone
Those "priorities" need to be unique numbers. They are basically ids.
And reported by Crowe XD
It's a stopwatch!
is that vanilla?
But the texture is not included in vanillin?
๐ฎ
Someone wanted https://forums.bistudio.com/forums/topic/211470-adding-timer/?tab=comments#comment-3245643 recently.
Basically jsut what you did.
That's some splendid HUD right there
@tough abyss if you got CBA thereโs CBA_missionTime that you can use
No CBA for Quiksilver tho
pure vanilla man
Could try to replicate how CBA does CBA_missionTime though
the last time i created a counter i used a custome RscTitle and a function running in the back updating it, not sure if that was a good concept or not
It should be better than redrawing it completly every frame
it looked like the best way for me, only needed a small background, 2 pics and 2 static text areas ( had 2 different times) and some code running "onload" to updating the text, in the end it was rather simple todo, okay somebody at war with the ui system may have a different opinion on that ๐
I have this, but it hooks into the mission display using XEH: https://gist.github.com/commy2/b436620f1af62e22e27d7dec2a15c866
well looks like someday i have to spend some time with cba ๐
I'd port this to vanilla in a heartbeat if they'd let me.
@tough abyss you could do the timing stuff serverside and only have a small script on client side updating the text
It's just a green text robot condensed in the top right corner below the ammo thing.
if have the strange feeling this coule be one of the cases where switch true docould be helpfull
a command that chooses action based on value of thingy
[60,20,0] chooseActionBiggerThan [{hint ">=60"},{hint ">=20"},{hint ">=0"}]
i know, switch has some issues
if only switch had a binary command for checking instead of a unary and a binary one...
It could be better... But BI choose not to make it better
PARAMS
:puke: ๐
It's BIS_fnc_param, not BIS_fnc_params. This is how I know you're lying.
Copy paste.
Everything I don't like should be illegal tbqhfamalam.
Intercept can now hook compile and rewrite the string passed to it..
And Intercept can regex replace!
just make every script better whether the author likes it or not!
Next goal: custom SQF compiler with optimization features.
Feet stuck below pathway LOD, QS.
start using getPosASL for everything ๐
ASL is not ASLW
ASL ignores waves, but nice try.
That's bad AF
ASL EVERYWHERE
ASL 4 life bro ^^
_position = selectRandom [getPos _unit, getPosASL _unit, getPosASLW _unit, getPosWorld _unit, getPosASLVisual _unit, ASLtoATL getposASL _unit]
you know you can use && right?
Missing ASLToAGL getPosASL for AGL.
isn't getPos AGL?
No.
_position = getPosASL _unit vectorAdd [0,0,random 10000];
don't forget
[0,0,0] modelToWorldWorldWorldVisualWorldWorldVisualWorldVisualASL _unit
https://github.com/dedmen/interceptTest/blob/master/interceptTest/cba.cpp#L597 It even exists! Kinda
I planned to make it really precise.. I could've made it extremly precise.. But.. I didn't because I was too lazy to implement it completly
You could also...
I think the variable is old, but now not overwritten after init. I also like how many globals use "fnc", because it shows that the one who made them had no idea what it means.
why is a variable that someone uses considered "magic" ?
if someone could just make a list of all these variables with a small description that could be so usefull -.-
Hey, is there any way to put a sleep in a function without getting this error ? 14:53:01 Suspending not allowed in this context
It's because when you spawn the script it's put in the scheduler which allows suspension, so I'd look at the BIwiki about the scheduler if you wanna learn more
holy fuck, I just realized how insanely faster my arsenal rewrite is compared to vanilla:
140ms (0.143s) vs 20s
yes sure
not fast nuff
iy you dont mind
Don't you know that I always forget how to calculate that? ๐
I think it's bigger number/smaller number
142.8x?
so eh 142800%?
I get around 14 000%
One too many 0's
well, searchbar speed is infinite%, vanilla doesn't have one ๐
splendid
Yes, but think of the performance. The 20 sec loading bar had 30+ fps...
what loading bar
Arsenal
The only arsenal I know doesn't have any loading screens and has integrated search
only issue right now with 3DEN support is that CBA settings aren't init
so you can't disable mod icons, but I'm sure I can find this in profileNamespace :p
In 3den?
yes
True.
anyone using ACE3 here ?
Yes. Everyone that's currently visible in the chatlog.. Besides you maybe.
So you choose the perfectestest time to ask about ACE.
I was wondering how can i manage custom injuries with medical ace functions. do you have an exemple ? i got some but they're seems to be outdated.
like [myUnit, "leg_l", 0, objNull, "bullet", 0, 0.15] call ace_medical_fnc_handleDamage_advanced;
Thanks you ! ๐
I'd guess that "bullet" is not the classname of a projectile
But I also guess that doesn't matter
pretty sure you're right, like bob and kevin
Well.. Even if kevin was right he is still a bad guy for hitting bob in the leg with a bullet
Umm
Github gods
I want to update my fork from ace with the latest additions to the master branch
Do I use my fork as the base and then head fork is the acemod master branch?
you checkout master branch and just pull from remote..
Easy if you use GitKraken or I guess SourceTree and Github Desktop might also make it easy
:puke: GUIs
sits on puke
if you want to use a GUI do not use gitKraken or github desktop they're incredibly bad ad handling forks and remotes
use the one that comes with git
๐ค
Didn't have any problems with GitKraken besides some crashes and freezes and slowness
my weirdest issue with git so far was my outdated intel drivers destroying file permissions when I changed HEAD
i have issues with git submodules in gitkraken sometimes
but other then that all good
@lone glade Had no issues with GitKraken so far
it's terrible if you do anything more than push / pull, plus you can't use CLI in parallel
Which GitKraken tool are you talking about? To create a branch just one click and enter name.
Merge/rebase/pull-request one drag&drop.
What specifically is terrible? Besides that you can't sign your commits... Which is what I hate on Gitkraken. But other people don't care about that.
it's slow, it's unstable as shit unlike the first version they made which ran like a dream, I hate the UI
oh, let's not mention the tree view with ACE3, my fucking god
Have to agree with all of the first line. Though I like the UI ^^
I don't have any problems on ACE.. Not even the slowness is bad enough that I would complain
https://dedmen.de/sharex/d0NqcmOX.png Looks fine and no noticeable slowness. Even with my perf OCD
@still forum do you've your own image hosting service?
it's shareX
yeah
take a look at shareX. It's awesome. One click share images/text/files to custom share or imgur or pastebin or dropbox or whatever
not takings pictures of your screen with your phone.
๐
dear scripters, iโd like to make a self driving car that follows an EXACT path (like a train on tracks) and that works in multiplayer
I was originally thinking to use setVelocity and setPos regularly but that would desync in MP
Then I thought about using the BIS_fnc_UnitCapture format to play back a specific path with BIS_fnc_UnitPlay
any inputs on this approach...?
As in no driver?
yes
vehicle with seats but no driver.
think of it like a train going round on tracks
You can't.
Best thing you can do is to place a drone logic as driver.
or use other techniques thatโs what iโm fishing for ๐
UAVs are normal vehicles with the driver seat being hidden
Aren't the UAV driver logics invisible even when placed in other vehicles?
A unit like this could play the driver if so.
so would that be inheriting from Car, having a proxy to a drone driver?
would that follow tracks exactly?
class B_UAV_AI: B_Helipilot_F //inherits 21 parameters from bin\config.bin/CfgVehicles/B_Helipilot_F, sources - ["A3_Characters_F_Common"]
{
author = "Bohemia Interactive";
_generalMacro = "B_UAV_AI";
displayName = "AI";
scope = 1;
scopeCurator = 0;
simulation = "UAVPilot";
model = "\A3\characters_F\Common\invisibleMan.p3d";
weapons[] = {};
magazines[] = {};
};
This unit could be the driver.
invisibleMan
yes
just wandering if setDriveOnPath makes the driver follow exactly the lines between points or not
otherwise youโd have a train leaving tracks which doesnโt make much sense
I'm not sure.
iโve looked at ATS code but am not sure how it manages MP sync
well, you can crash it by looping a func in unscheduled
Basically I have a modpack, and people steal modpacks (big whoop), so I added in something that checks whether the server is authorized, but I got no idea how to make the script cease the server from working in the event it's not
wait what
you do realize anyone with 2 brain cells can just change the call, rebuild and be done with it?.
Yeah, but most people don't have 2 braincells
also what do you mean "steal modpacks"
People take one communities mods, and copy it onto their own. Simple.
Copyright is not something everyone cares about.
are those mods under any license ?
it's not copyright, it's licensing rights
which entirely different
I made them myself, however, I can't sit around all day and chase down any community that might or might not have taken them.
put them under a non commercial license, if anyone uses your mod for monetization those people would lose the right to monetize
Yeah, I appreciate that feedback, and I will do that, but I'm also thinking more proactivly with this whole "server authorized" thing.
As we both know, most people who just string together their own things, got no idea how to change a call.
it's simple, you can't unless you have a key system requiring the same on the server and generated by you
all other solution are stupidly easy to bypass
Look, I've got a file that's a part of a mod that is on a server I play on. In the event that file remains in my modpack, and I load up A3, I go into the editor of any sort, as soon as I hit "play scenario", the screen goes black, and I need to kill arma3 to get out of it.
I want the same ordeal.
Not for everyone.
other topic, was a new typeName added? I somehow managed to get "NOTHING" returned
just to be sure, there's no 3DEN array validation for attributes right?
Hi, anyone know how to correctly auto-align columns for RscListNBox? Auto adjust to width as well. I don't like manually doing it ha... OCD, I like stuff perfect! ๐
by auto align, what do you mean?
the control should be aligned by default, you mean avoid overflowing?
oh wow
Say, I have three columns
lemme explain a bit, I know what's wrong
columns pos are in percentages, they start at the number that correspond to their index in the setColumnPos array
so in your case it would be [0, 0.30, 0.60] or at least values close to those
you may need to tweak it a bit to avoid overflow / what you see above
why those values for example?
0 is the leftmost part of the control, 1 is the rightmost part of it
so,
first column: start at 0 finish at 0.30
second: start at 0.30 finish at 0.60
third: start at 0.60 finish at 1
no, it start from the last value and finish at the next one, since there's no next value it defaults to 1
the last one would have more paddng?
yes
can that be avoided whilst still using these commands?
If not, I'll just make my own in RscControlsGroup
yes ofc
okay
and no, making a control group won't fix that
but even then your listnbox seems awfully small width wise
Like: [PICTURE] WEAPON NAME (WEAPON COUNT)
yeah
hm
I took it off Wiki but I messed it up a bit too much lol
damn, i'm self plugging a lot these days, gimme 5s
or did you mean the width of the RscListNBox element?
yes, the width of the element
got a github / pastebin I can check to verify you're inheriting the classes properly?
you mean base defines?
yes, it should be like this
https://github.com/alganthe/ACE3ganthe/blob/arsenal_rewrite/addons/arsenal/ui/RscCommon.hpp#L101
I exported using the BIS function
ha, knew it
is that bad?
try to use a drop down menu in 3DEN ๐
you can just copy what I linked above, it's basically what you want
you don't replace the base classes for everything
isn't what I have now what BIS use ?
yes, but you're breaking all of them
I used to make my own, and tweak Haz_Rsc---
but it was too much effort lol, for all of those
and then my displays / dialogs https://github.com/alganthe/ACE3ganthe/blob/arsenal_rewrite/addons/arsenal/ui/RscAttributes.hpp
can't really help you if I can't see what you're changing :p
what was that you sent in GitHub?
first one is rscCommon, it's the base classes for nearly all controls
am I using what you sent with the ones I had ?
then it doesn't work
yes
I did
the whole UI doesn't show, invisible + mouse cursor lol
well, I copied them all from your GitHub ?
wait
when you say base defines
same thing as defines, yes ?
all the something_something;
like the one I had before had class RscPicture {lots of stuff here};
example ^
I replaced all those with the ones you sent from GitHub
yes
if you don't you break 3DEN dropdowns and controls all around the place because you're redefining them
anything in RPT?
nope
ah
yes
1 sec
2:05:29 Warning: no type entry inside class dlg_respawnSelectionMenu_inv/controls/title
2:05:29 Warning: no type entry inside class dlg_respawnSelectionMenu_inv/controls/background
2:05:29 Warning: no type entry inside class dlg_respawnSelectionMenu_inv/controls/loadouts
2:05:29 Warning: no type entry inside class dlg_respawnSelectionMenu_inv/controls/slider
2:05:29 Warning: no type entry inside class dlg_respawnSelectionMenu_inv/controls/suspend
2:05:29 Warning: no type entry inside class dlg_respawnSelectionMenu_inv/controls/respawn
2:05:29 Warning: no type entry inside class dlg_respawnSelectionMenu_inv/controls/inventory
2:05:29 Warning: no type entry inside class dlg_respawnSelectionMenu_inv/controlsBackground/TileGroup
noo! I forgot how to do it!
3 of them
yeah, you're missing base stuff in your control
type should be inherited from the base class, what the hell are you doing O.o
ah found it, it looked like that right? https://github.com/alganthe/ACE3ganthe/blob/75cbaeccdf6aba32d52b18e50538e0d9ec824733/addons/arsenal/ui/RscCommon.hpp
class RscTitle: RscText
{
x = 0.15;
y = 0.06;
w = 0.7;
shadow = 0;
style = ST_LEFT;
sizeEx = GUI_TEXT_SIZE_MEDIUM;
colorText[] = {0.95,0.95,0.95,1};
font = "PuristaMedium";
};
it is just class RscTitle {}; now or something
RscTitle;
class controls
{
class title : RscTitle
{
idc = 100;
x = 0.2 * safezoneW + safezoneX;
y = 0.2 * safezoneH + safezoneY;
w = 0.6 * safezoneW;
h = 0.0333333 * safezoneH;
text = "Respawn Selection";
colorBackground[] = {"(profileNamespace getVariable ['GUI_BCG_RGB_R', 0.13])", "(profileNamespace getVariable ['GUI_BCG_RGB_G', 0.54])", "(profileNamespace getVariable ['GUI_BCG_RGB_B', 0.21])", 1};
};
yeah, should work
before, your file where you exported BIS base classes looked like that right?
https://github.com/alganthe/ACE3ganthe/blob/75cbaeccdf6aba32d52b18e50538e0d9ec824733/addons/arsenal/ui/RscCommon.hpp
yes, that's what you should do
yes, because you're somehow missing types for your controls, which is weird
do I have to put: type = blah
no
it should be inherited from the base class, it should be fine
oh wait ๐คฆ don't call your new class RscTitle
absolutely not
so I can just put Haz_ prefix
yes
just avoid BIS classes names, it should be fine otherwise
yeah, make sure all the names before and after : are right ๐
no, arma can't find it
ah, guess TileGroup isn't allowed either ?
if you're on diag branch you have to restart your game, it's.... wonky when adding classes
I reloaded mission
that fixes it
class TileGroup : RscControlsGroupNoScrollbars
{
Do I need to rename TileGroup as well? add the prefix to this as well ?
what is the new error?
oh, uh, btw there's a 3DEN display part at the bottom, you don't need it, it's for my display ๐
which ?
well, it's in your GitHub, no?
I just added Haz_
as you said couldn't use same name ?
well, no it has to be defined, you can't use the same name for the LEFT part of :
left part is the name of you control, right is the base it inherits from
class title : Haz_RscTitle
{
reverse
mySpecialName: RscSomething
I have
I had this before:
class background : RscPicture
{
that resulted in the dialog showing as invisible with mouse cursor
what was the error at that moment?
check RPT, there must be something
rgr
2:26:49 Warning: no type entry inside class dlg_respawnSelectionMenu_inv/controls/title
2:26:49 Warning: no type entry inside class dlg_respawnSelectionMenu_inv/controls/background
2:26:49 Warning: no type entry inside class dlg_respawnSelectionMenu_inv/controls/loadouts
2:26:49 Warning: no type entry inside class dlg_respawnSelectionMenu_inv/controls/slider
2:26:49 Warning: no type entry inside class dlg_respawnSelectionMenu_inv/controls/suspend
2:26:49 Warning: no type entry inside class dlg_respawnSelectionMenu_inv/controls/respawn
2:26:49 Warning: no type entry inside class dlg_respawnSelectionMenu_inv/controls/inventory
2:26:49 Warning: no type entry inside class dlg_respawnSelectionMenu_inv/controlsBackground/TileGroup
let me restart my game JUST incase
I used to only reload the mission though
okay, reloaded game
and now in .rpt
2:26:49 Warning: no type entry inside class dlg_respawnSelectionMenu_inv/controls/title
2:26:49 Warning: no type entry inside class dlg_respawnSelectionMenu_inv/controls/background
2:26:49 Warning: no type entry inside class dlg_respawnSelectionMenu_inv/controls/loadouts
2:26:49 Warning: no type entry inside class dlg_respawnSelectionMenu_inv/controls/slider
2:26:49 Warning: no type entry inside class dlg_respawnSelectionMenu_inv/controls/suspend
2:26:49 Warning: no type entry inside class dlg_respawnSelectionMenu_inv/controls/respawn
2:26:49 Warning: no type entry inside class dlg_respawnSelectionMenu_inv/controls/inventory
2:26:49 Warning: no type entry inside class dlg_respawnSelectionMenu_inv/controlsBackground/TileGroup
I don't seee what is wrong wtih those names ?
hm.... It might fuck inheritances when you're doing that in missions
:S
i'm used to mods, it's very likely it's fucking up in missions
wait, is that control the first one ?
what control ?
no
I have controlsBackground too
which has the tiles thing I sent (from Wiki)
and in controls {}
I have
title, background, etc
reverted for now
need a break to think lol
thanks again though
ah, base classes can't be inherited from mission config, that's why, then my fucking god mission dialogs must be hell to make
it must be a shitshow if you combine 2 of those since you'll keep redefining everything, holy shit
good thing that one is disabled
@lone glade yeah missions can't inherit, you have to copy paste
Can't believe no one made a hpp out of all of them yet that you can just #include.
probably because it's much easier to say fuck it and just use a mod instead
Hey there,
I am stuck on a problem and maybe you can point me in the right direction.
I am spawning some objects in relation to another object (modelToWorld) but have problems when the terrain underneath is to steep. Meaning some of the additional objects clip into the ground and - as a result - fly all over the place.
Is there a script function to allign the object in its current rotation to the ground underneath?
What exactly is being moved? What "additional objects"?
My source is a backpack and I want to dynamically spawn a stretcher or bodybag next to it.
with a random orientation
using setVectorUp with the return value of surfaceNormal should do the trick
on a flat or near flat surface this is no problem but on steep inclines it gets messy
Laws of WAr
Classname?
e.g Land_Stretcher_01_olive_F
Land_Stretcher_01_F
Land_Stretcher_01_folded_F
Land_Stretcher_01_olive_F
Land_Stretcher_01_folded_olive_F
Land_Stretcher_01_sand_F
Land_Stretcher_01_folded_sand_F
Ok, it's ThingX. PhysX is throwing it around, because it's colliding with the ground.
Yes. Thats why I wanted to align it with the terrain underneath or will this not help?
_stretcher setVectorUp surfaceNormal getPosWorld _stretcher;
Try to add this line right after setting the position of the stretcher.
check
On very steep inclines it looks a bit "wonky" but the objects don't fly around anymore. Thank you very much!
PhysX sucks. No way around the wonkyness.
Willy likes the wonkyness
Who?
Willy Wonker
Willy Wonka ๐คฆ
ยฏ_(ใ)_/ยฏ
is it possible to holster a pistol or have it somewheer other than hands ?
if you have ACE you can use 0 number key to switch to no weapon
unfortunately Ace kinda replicates what i aready have so i will just create a dummy weapon i thin k
Does anybody know much about BIS_fnc_objectsMapper? I'm trying to spawn in a custom composition on a randomly selected location, without much luck.
_temp = [_objLoc, random 360, missionConfigFile >> "CfgCompositions" >> "radioPost", 0] call BIS_fnc_objectsMapper;
never even heard of that ^^
and in description.ext
class CfgCompositions { class radioPost { #include "radioPost.sqe" }; };
it doesn't seem to recognize my composition when I try to call the function.
;?
:/
mk, well I also tried...
_temp = [_objLoc, random 360, radioPost, 0] call BIS_fnc_objectsMapper;
"objects for the template - Array / composition class - String / tag list - Array"
but it gives error on radioPost
How did you get the Idea that a function that says it takes String and Array will also take a config?
"Oh.. It takes 1 and 2... Nah I'll just give it 17"
That obviously won't work
ya, wiki page isn't very helpful on examples -.-
It uses configFile >> "CfgObjectCompositions"
Not CfgCompositions from missionConfig
It doesn't do what you think it does at all
cause I don't always understand Armas wompy use of data types, so I was attempting stuff from other scripts
You can't use a crowbar to tighten a screw.
so configFile >> ... will work, or is that still not an exceptable data type?
What are you trying to do?
using a different config won't make it not a CONFIG type.
And that will still not work because the function doesn't work with Eden compositions at all afaik.
Painting the crowbar green still doesn't make it any better for tightening screws.
gotcha, testing with BIS_fnc_objectsGrabber output now
I've got a custom eden composition for an outpost, to be used as an objective for a mission, but the missions on a random generator, so it'll select a location at mission start, and then spawn the composition.
So you want to spawn a Composition?
Why the hell are you using BIS_fnc_objectsGrabber then?
I have no Idea how you get to using completly unrelated BIS functions for it..
How do you allow civilians to pick up anything regardless of side?
Go to wiki. Search for composition once and find
https://community.bistudio.com/wiki/create3DENComposition
@grand sleet "Pick up" ?
like vests, uniforms
yeah, is there a way around that
using objectsGrabber to work with objectsMapper
ty
Sorry, I've been googling for day and have not come across that one
Why do you lie to me then?
You said you want to place a composition.
And now you say you want to use objectsGrabber
-.- I'm not lieing, as far as I knew, there wasnt script command to spawn eden compositions, so I went with something else.
I previously thought I didn't need objects grabber cause I already has a composition file.
evidently, no
You are confusing me ^^
sqe
๐ค
Status quo Composition...
Just someone thought Composition starts with an E apparently.
status quo eden?
someone was asking about this a couple of weeks ago http://steamcommunity.com/sharedfiles/filedetails/?id=1191555506
not a script, just a simple config edit
Is there any logging script that would neatly log all the animations that were played on my character during the last X seconds? I would love to be able to pinpoint some of the animations that cause issues for me and my smoother animation project.
shouldn't be too hard to knock something up
use eachFrame, have an array holding animations, check current player animation, add it to the array if it's unique
Debug_LastAnim = "";
addMissionEventHandler ["EachFrame", {
private _anim = animationState player;
if (Debug_LastAnim != _anim) then {
diag_log [diag_frameNo, _anim];
Debug_LastAnim = _anim;
};
}];
what about anim changed?
@little eagle I would need a list, the animations can cycle pretty fast
Open RPT and you have a list, no?
Midnight, sure, but this method could be applied to stuff that has no ehs.
Gotcha ๐
i told you how to write it commy but you didn't listen
top marks for not requiring CBA though, full credit for that
add it to the array if it's unique
pushBackUnique :u
HAHAH ๐
I don't think he wants unique, but changed, no?
CBA is fine, I just need to get a list of recently played animations logged after I run the script via trigger or that fancy console thingy
Just do the thing with the RPT file. Open it, delete everything, back into the game, do your animations, tab out again and check the new entries to the file.
rpt file breaks immersion though
use intercept and the GUI script commands to create a fancy onscreen display of all the animations that were played in the last 20 seconds and also the time when they were last played
That you will never use again after you debugged what you wanted to debug
Heh, you and your intercept fantacies.
fantasies
He does stuff like that.
...
Just another 10x improvement... Nothing unusual right?
Well.. 10-100x depending on how Arma feels like
I like it.
I'm prepping profiler release right now. Working on CI
Hey Commy I thought you were the German here ๐
There are many germans here
The furry is the German.
Oh shit
Could even say "The Germans are invading"... again..
@little eagle Will your code give me a list of all the anims?
In the RPT file, yes.
just run it via the console?
Yes.
@little eagle Thanks it worked
is there a way of converting a 'displayname' back to 'cfgname'?
@subtle ore my profiler is released now. #production_releases
I'm trying to make a script to repair JIP Zeus modules, so a JIP can use Zeus without first respawning. Looking at BIs moduleCurator function, the variable the owner is stored in is deliberately wiped clean after the module inits so clients can't access it.
I don't understand why they've done that. Is there a security issue if a client can find out the UID a Zeus module is assigned to? Or if a Zeus module is assigned to an object named Unit1, could a hacker do anything useful with that information?
Ok, thanks.
It's just bugged. Use a script to give slots / uids access to zeus instead of using the module. Will fix everything.
Is it possible to retrieve the current local time from a client? I found KK's dll but I wanted to know if there is something else besides that
not without DLLs
ok, thanks
What do you need it for specifically?
You might be able to do something with htmlLoad
No way to return that though, but if you just need a time indication somewhere that could be done
is there a way to allow a second player to access the zeus camera to view only while in game? I want to set up a live stream with two commentators of an event when the commentators are not at the same physical location.
there's a spectator logic you can use
i want them to have access to the in-game von channels so I've set up two playable units who have zeus for a camera...I just want one of them to view the broadcasting camera in real time (not the 10 second lag from a twitch feed)
only 1 unit can have control of any camera at any time.
from my experience at least
@arctic sable
simply have both broadcasters in the same room, or you could try screensharing
i guess i'd have to look a slaving a camera to another (getpos, getdir ect...)
screenshare may have reduced lag
since its going directly from pc1 to pc2 with no middle men in between
So
1 camera controlled by 1 of the brodcasters and 2nd one needs to see the same?
There's gotta be a way to attach the camera to the zeus module or sth
" 1 camera controlled by 1 of the brodcasters and 2nd one needs to see the same" <<< yes
zeus module doesn't move around on its own
oof
I wonder if one can be attached to the other or atleast attach a normal camera to the curator camera
hmm
have a toggleable loop of https://community.bistudio.com/wiki/BIS_fnc_setCuratorCamera
running on zeus, so he can toggle it on and smooth transition will also be there
yes you can, it's fairly simple too.
bah ha....funtions...been flailing around in scripting commands instead...i think i need more coffee lol
Im having trouble getting ace_medical_fnc_treatmentAdvanced_fullHeal to work in a trigger.. can only make it work when i use it as an addaction.. any help would be greatly appriciated ๐
show us your work so far
@indigo snow tried
{
if ( _x in allPlayers ) then { remoteExec["ace_medical_fnc_treatmentAdvanced_fullHeal", _x, false]; };
} forEach thisList
ยดยดยดsqf
[objNull, this] call ace_medical_fnc_treatmentAdvanced_fullHeal;
ยดยดยด
[_x, _x] call ace_medical_fnc_treatmentAdvanced_fullHealLocal;
Well.. Maybe you should pass the arguments to it...
You know that you need to
[_x, _x] call ace_medical_fnc_treatmentAdvanced_fullHealLocal;
But you only remoteExec
call ace_medical_fnc_treatmentAdvanced_fullHealLocal;
{
if ( _x in allPlayers ) then { [objNull, _x] remoteExec ["ace_medical_fnc_treatmentAdvanced_fullHealLocal",_x,false];};
} forEach thisList
this seams to work..
isPlayer _x would be better
so if ( isPlayer _x ) then ??
yea, so you dont have to search the entire array
well for Each still checks the thisList array
but if you do _x in allPlayers it's a useless check
triggers are still dighusting btw
Is there a reason ArmA can find a texture in a PBO with this path
\A3\soft_f\MRAP_01\Data\MRAP_01_base_CO.paa
aswell as this
A3\soft_f\MRAP_01\Data\MRAP_01_base_CO.paa
?
Is it because it's an absolute path anyway?
if you are in / on linux. navigating to /var/ or var/ is the same.
same here I guess
I was using that path with setObjectTextureGlobal and was surprised both versions worked
Hope that doesn't break under some circumstances
no.
no
no?
it's the PBO path
Still a pbo
\pboprefix\insidepbo ?
first one is correct second one isn't
use my linux filesystem analogy. It works here.
I just need it to reliably find the textures without a leading backslash inside the game pbos, if that isn't possible I'll need to rewrite some stuff
Hope it doesn't break under some weird circumstances ^^
I think you are forgetting which game you are talking about here...
leading \ in a path should indicate the root of the arma virtual file system
\mymod\something.paa is loaded under <virtualfileystem>/mymod/something.paa as far as i know
id call that absolute tbh
background should be: P:\myMod\myAddon -> myMod\myAddon
so i would name this an absolute path too.
@subtle ore ?
wat
i wanted to know why you dont call that path absolute
because the A3\ is still a pbo path
We also had absolute absolute paths.
C:\stuff\stuff\file.pbo
^
system-absolute vs pbo-absolute
we are inside arma, i have not yet seen a path with C: there
absolute paths are disabled (system absolute)
I meant absolute to the arma file system
as in well
\pbo\insidepbo
the leading \ is the highest you can go, so when something starts wtih \ i call it absolute in the pbo system
thats what i meant ๐
It depends on where your root is.. You don't need starting \ for a absolute path
if you are currently in the root directory then a3\stuff\stuff.paa is the same as \a3\stuff\stuff.paa
independent from current directory
if you are not in the root directory though.
a3\stuff\stuff.paa might equal \mymod\addons\a3\stuff\stuff.paa.
The leading \ one always starts from root
same as on linux.
im just curious as to (i believe atleast) some commands need a leading slash for it to find something a pbo and some commands dont
as i would assume they all follow the same order where to look
again all depends on where your current working directory is.
You should never trust Arma to do what you think it does. So just always use absolute paths
The leading \ one always starts from root``` I know, however I wouldn't know why some commands treat their current directory as ArmA 3 main dir and others dont
It's especially bad if its not in the wiki as a note
I'll just use \ always, saves me the trouble
It's just Arma as usual
mehhhhhhh
hey does someone know a command that can disable user movment sounds (foot steps, etc)?
for one specific entity / player
@willow pike there isn't one
Has redhammer studio got a discord channel?
negative
at least not public access. ask your question though, one of us might be able to help.
@oblique spoke no worries can do, just sent them a message over on facebook....have a error message which keeps popping up
@oblique spoke ```
private _h = "rhs_collider_simple" createVehicle (getpos _v);
_h setPosWorld (getPosWorld _v);
_h setVectorDirAndUp [vectorDir _v,vectorUp _v];
if(isMultiplayer)then{sleep 0.1};
_v attachTo [_h,[0,0,0]];
if(isMultiplayer)then{sleep 0.1};
@fallow radish you can't sleep in unscheduled environment
Thats in an RHS script afaik @subtle ore not something created by @fallow radish
Well, if it is and this is the entire code then I don't really know how this got past stage one of revision
@fallow radish heh, blows my mind a little
epicfail.
iNnOvaTIve ArMoR SimUlATion
Already had some fun about that and other RHS scripts in ACE Slack...
Their scripts are notorious garbage apparently.
Unlike their models I'd say if you're talking RHS.
Yes... I said "Their scripts". Never said anything about their Models.
And I also said "RHS scripts" so yes. I'm talking about RHS.
- cap is floating
- textures are somewhat transparent
LODS are 1.000, shadow and pilotview
it is not following the head movement
although the shadow is...
rvmat is partially-lighted (or something like that)
seems like there is some problem with LODS
Wrong channel @supple vine
copied, deleting
@fallow radish - it was reported thousand times - copy pasted line of code to wrong place just before hotfix release so I didn't notice it was put in wrong place
hello here, it's possible to had a if statment inside an hpp file, i want to only include file if it's headlessclient
I'm working on those scripts mostly alone so I sometimes don't have enough time to test it properly since I'm also doing 1000 different things beyond scripting (modeling, texturing, encoding, etc)
Trying to improve older scripts though so hopefully there will be less legacy "garbage" stuff ๐
depend what you call scripts, you mean functions? or scripting commands?
functions
@little oxide You can have whatever you want in hpp files.
You can even name them hpรผ files. Or lul files. Or whateverDoesntMatterAnyway files.
You however cannot only include if headless client.
@dim terrace Just pop into ACE Slack. Throw a zip file with all scripts at them and tell them to improve them ๐
Or open source them on Github
and in case you were wondering, no you cannot use code blocks in config entries
HOWEVER, you can use array select bool
"Or open source them on Github" had that idea in my head for a long time
maybe soon(tm) it will be possible ๐
could be a fun thing to do after I PR the arsenal rewrite to ACE3 ๐
Just updated the doc on https://community.bistudio.com/wiki/setParticleParams
For anyone who was previously fiddling around with this trying to figure out the value types
๐
Is there a way to get a neat list of all of the weapons in the game, including mods and such? Also it would be great if similar list could be made for all uniforms, attachments, magazines, helmets, vests and attachments. I only need class names and the wiki table has too much stuff, and you can't select only the class name column to copy the names
Single Player Battle Royale, I want to add CUP stuff to it
yes @thorn saffron altho it'll be stupidly long if you don't remove the scope=0 items
all, setPos, setDir and setVelocity all take a global object and have global effects. If the vehicle is local, I would assume that these have no impact whatsoever on network.
is this correct?
@thorn saffron
You can pull all the info from the configs. Here is a few, you will have to do the others yourself
_baseRifles = "((configName (_x)) isKindof ['Rifle', configFile >> 'cfgWeapons']) &&
(!isClass (_x >> 'LinkedItems')) &&
(getnumber (_x>> 'scope') == 2)"
configClasses (configFile >> "cfgWeapons");
_weapClasses = [];
{
_class = configName _x;
_weapClasses pushBack _class;
}forEach _baseRifles;
hint format ["%1",_weapClasses];
_hats = "(getnumber (_x >> 'ItemInfo' >> 'Type') == 605) &&
(getnumber (_x>> 'scope') == 2)"
configClasses (configFile >> "cfgWeapons");
_uniforms = "(getnumber (_x >> 'ItemInfo' >> 'Type') == 801) &&
(getnumber (_x>> 'scope') == 2)"
configClasses (configFile >> "cfgWeapons");
_vests = "(getnumber (_x >> 'ItemInfo' >> 'Type') == 701) &&
(getnumber (_x>> 'scope') == 2)"
configClasses (configFile >> "cfgWeapons");
@plush cargo Soolie, you've got an interesting method for uniforms
nope, best one
Interesting doesnt necessarily imply unusual alganthe
Interesting doesnt necessarily imply unusual alganthe
Hey guys are there some tutorials I can find on the basics of scripting? I've been combing thru different .sqf files on the ACE github for reference, just need more info to wrap my head around it.
killzonekids page has some stuff
Kk's site
on different topics
Pmc editing wiki
Awesome thanks.. I'm trying to write a simple script (presumably) that will keep a gun from firing if it intersects parts of itself (wings, engine, rotor)
oh boy
it shouldn't, and if it does it means someone fucked up
because that's config turret limits
๐ค
I have a VTOL with doorguns that will shoot into wings or rotors due to it's configuration
Uhhhhh...no?
so my options are to limit the turret angles, or write a script that will stop the gun from shooting
well, limit the turret angle?
Either way a vehicle can't shoot itself
Turret angle -> config
I understand it can't shoot itself, just trying allow the turret to move at wider angles yet not break immersion by being able to magically shoot thru wings and stuff
i'd say having a gun that can fire at the fuselage is pretty immersion breaking in itself
or probably the worst design i've ever seen
Thats part of the struggle to be accurate, is to find the correct angle. Regardless you cannot shoot the wings
@lone glade NATO 2035 had gone backwards
"You see billy, if you can shoot the wings yourself the commies won't need to do it for you"
Well Bell thinks it will work just fine with the V-280 valor lol
๐
gun is pointed down and can't be moved towards the rotors (maybe)?
You might just be the worst gunner for your task if you end up trying to shoot and hit the damn rotors
just checked the aircraft, the rotors are much further forward than the gunner post
you'd have to intentionally aim there (if you're somehow able to)
Yeah, the rotors are forward. However in VTOL mode you can shoot in that direction without damaging anything
Either way, I'm just trying to find ways to make this work properly in game
Right, so what is the issue then?
when the rotors are aft you can hit them
The issue is when in full forward flight the rotors are now in the line of fire of the turret
No...?
Yes...? I could post a video I guess of what I'm referring to.
For now I'll check thru the docs you guys mentioned, thanks.
what you should actually do is make the plane vulnerable to its own fire. Gunner isnt suppose to fire at the rotor even if the gun just so happesn to be able to
Actually thats somethig worth exploring further. Got to put it on the list
@young current Cool
not possible
why not
because of how the engine works
ye of little faith
@plush cargo I need a text that I can copy
will that script give me stuff in rpt I can use?
you can't print in RPT an array that long
copyToClipboard?
if I compileFinal a variable that's a number (E. g testvar = 500) can it be overwritten again by doing testvar = 1000?
compile final a variable?
you mean create a method that returns a given value
fixednum = compileFinal "12";
diag_log call fixednum;```
will always output 12
just to prevent overwriting it
Thanks to some help I managed to get a list of most of the CUP stuff, also cludged up a supporting solution using a Chrome addon with let me copy the classname column from the CUP wiki
iโm trying to have the target objects on rails move on a rails path
using setpos setdir and setvelocity
all computed on server
however it gets weird in multiplayer
what is the best way to have an object constantly moving be syncโed in MP?
lemme guess the object is attached to a helper?
is it a thingX?
itโs the target object
so it's a Cfgvehicle class and not a thingX, setVelocity does nothing
vehicle?
@candid jay give em context it may clarfiy things
iโm building a simple moving target for practice
now, on to the "smoothness", you can't help it, the pos isn't updated fast enough for that class
and using those targets on rails
can i use some kind of vehicle to attach it to?
(and maybe hide it)
no, you miiight try to attach it to a gamelogic and set that
but afaik the pos update interval will still be the same
thatโs why setVelocity
also, it's a non physX class, setvelocity does nothing
my idea to improve it is to have all vehicle local, then sync from server
@lone glade not sure i get it
that object class doesn't have physX properties
changing it's velocity does nothing, since it doesn't apply to it
so what can i use instead, the gamelogic?
you can attempt that, but I doubt it'll work
i mean
it's simply a limitation to avoid massive network spam
that class of objects is simply not meant to move ๐
ok, ATS works by having all trains local, the syncโed once / second with info coming from the driver machine
yes, it would work, but it's janky AF
nope
that sounds like a terrible idea
thatโs how it works now
you'd have to look into it, I can't say anything for sure before looking into it myself
currently your issue is that the position of the object isn't synced fast enough to look smooth, and that's due to how it's configed
yes
try a balloon, maybe the thingX class update more often
no idea, the targets are synced up, they just don't sync fast enough
but itโd still have to follow tracks and not fly off
the interval where the pos is updated is pretty "long"
and by tracks i mean tracks, not ground
Look at what duda did, you are litterally trying to implement the same thing
yes it is
So every client has its own local vehicle
yes
and then the driver client send sync info every second to all other machines
(i guess position and dir)
So whats your issue?
Well to arma, it doesn't natively support trains
nono
ats works good.
MY stuff is clunky.
so i am wondering if thereโs a โgeneric vehicleโ class that i can inherit from.
depends, thingX is the class for physX enabled objects, just check if balloons work properly for what you want, if they do that means the thingX class updates more often
Is your vehicle a localvehicle or not?
if not just go with local vehicles
yep
If you are spamming setpos on a normal vehicle, its not gonna be smooth once you get more people on the server.
It will also be subject to your basic.cfg
This is why you use a local vehicles
if it's local just use the vanilla target
this is also interesting https://community.bistudio.com/wiki/setVelocityTransformation
the stairway to heaven example is funny, tried it in the editor
Is it possible to attach an event handler to the donation of a grenade?
Trying to make craters appear when satchel are detonated.
Like big ones that can be used for cover, not just the decal.
If I have a string variable myString = "newString" can I use myString to create a new variable called newString?
missionNameSpace setVariable [myString,"bla"];```
```sqf
hint newString; //"bla"
sorry I wasnt clear I want to assign a value to bla and output that. Not the original string
?
I don't get you
Or do you mean :
myString = "newString";
newString = MyString; //same value as myString
?
Take cover ! Long message incoming brothers !
myString = "newString";
//create new variable based on myString's value
newString = 0;
@compact maple lol was trying to figure out how to explain what I'm trying to do...
Yeah
But i do not get it too, what do you want to do
"newString" and newString cant be compare
I still don't get, what you rly want^^
I want to create a variable that counts every helicopter that crashes and keep track of each one individually. But I don't want to long hand it with a switch condition.
dafuq?
lol
I still don't get you
So you want an array, that has every crashed helicopter in it?
Or what?
+What does it have to do with "switch"?
I just want a simple counter to keep track of each helicopter that crashes. No array, no conditional statements.
Just add killed EVH and go from there?
that is what I'm doing
Though I want to have crashedheli = player vehicle
B_Heli_Light_01_F = B_Heli_Light_01_F + 1
๐ค
Init:
MyCOunt = 0;```
In the KilledEH =
```sqf
myCount = MyCount + 1;```
You are trying to add 1 to an helicopter
you mean you want to count them by type ?
yes but if I had a taru then a blackfish...those would be recorded under the same variable they need to be separate.
yes @cunning nebula
Finaly some information
You need an array for that and/or just store the TypeOf Chopper in it
switch (vehicle player) case taru.... case blackfoot...
just make array then, multidimensional, and cycle through it with find
No array and no switch condition
gl
well you'd at least need an array to list the variables you have
or do you want to retrieve them by classname later ?
So what you are saying is you cannot take the value of a string and declare a value to that string?