#arma3_scripting
1 messages ยท Page 336 of 1
ok thanks was just wondering if exitwith had any special kinks
kinky
Oh, it has. But has nothing to do with magic variables.
is there a script way of giving me debug console on my dedicated? ive already #login but still nothing.
Eden -> Attributes -> General -> States -> Debug Console -> Enable for host and logged in admin
findDisplay 46 createDisplay "RscDisplayDebugPublic";```
Don't know if it really works
No.
Description ext has a nifty entry as well enableDebugConsole = 2; //dangerous in MP
does that mean its on a per mission basis? its there a global cfg thingy in a folder somewhere so it works on any mission file?
Yes and I don't think so.
or something liek if UID = jayTAC then SuperPowersEnabled = true ๐
2 = everyone 1 = logged admin 0 = nobody
You can also enable specific UIDs iirc now
Indeed nick
Oh, yeah. You can make it a mod now.
thing is i dont touch mission editing, even the dedicated stuff i just let TADST handle it. a pbo cfg i can work with?
I had a mod with keydown eventhandelere and ```sqf
findDisplay 46 createDisplay "RscDisplayDebugPublic";
Anyway, can https://community.bistudio.com/wiki/ORBAT_Viewer be generated using macros or units and names of units/players?
class CfgPatches {
class My_DebugConsolePls {
requiredVersion = 0.1;
requiredAddons[] = {"A3_Ui_F"};
units[] = {};
};
};
enableDebugConsole = 2;
Something like this.
Holy fuck, that is dangerous for those without filepatching
They thought it was a good idea. Made things easier for me, so : P
๐ฑ
You can still explicitly disable it for the mission though.
But it no longer is by default.
:>
With that addon at least.
why do mission makers even get to decide admin level stuff???
priority should be dedicated setting > modcfg > mission
No, mod should always be lower than mission.
The more local it is, the higher the precedence.
mission is more specific that makes sense
but debug is the domain of the admin, how dare a lowly mission maker defy that?
Lowly mission maker
And the addon makers are the pinnacle of this community, so why don't they get to decide everything?
Commy, youre like a monopoly after all. A ton of mods use CBA.
top 5 servers have no mods and ~1500 unique players per day
I wonder what they host for gamemodes. Cough altis life king of the hill
Yet they all have missions.
blasphemy
๐ฑ
Is there an eventhandelere for "j" or tasks dialog?
Is that a display?
No clue, don't know what to look for or what to call it
I don't think there is.
It's diary
Damn I need a convinient way for a display that can be used similar to the briefing tab, but elements can be removed and added
You can hide parts of the briefing, no?
I think briefing entries can be added, but not edited removed
does inidbi only support x32
You mean x86 ?
I need a dialog similar to briefing but editable elements to for ORBAT, Commander Options (reinforcements, forefit, etc.).
Where do I impliment this? openMap eventhandeler is my first guess
Alternatives?
openMap sounds good. Heads up though, the display will not be available via findDisplay in the frame the eventhandler fires.
Is there any way to add units to an orbat group dynamically?
removeAllAssignedItems _unit;
removeUniform _unit;
removeVest _unit;
removeBackpack _unit;
removeHeadgear _unit;
removeGoggles _unit;```
that's gonna work in multiplayer if the server executes those on a player right
or there're locality problems
I think there would be locality problems. As i think the commands have a local effect
but the server has the biggest cock of them all
@subtle ore Don't think so, but maybe
oh my god
@little eagle
getUnitLoadout / setUnitLoadout handles weapon attachments in backpacks
๐ฑ
Yeah, but only if they belong to a soldier.
yeah
still something
i have put that inventory system aside
but i didnt know that
It's maddening that they can do backpacks, but not cargo boxes.
we cant
it's not a priority as kk told me
exactly
it's good because set and get loadout are global
meaning I can reset inventory by setting an empty loadout to a unit
from the server on a player
with no locality problems I think
How can i spawn a hemmt full of first aid kits on my mil server?
I wanna put for example 256 med kits inside it
Do you want to spawn a hemmt which is already full of med kits or do you want to spawn medkits to fill a hemmt
Or spawn a hemmt and then spawn medkits in there
A hemmt full of medkits OR a hemmt and then spawn them inside. Doesnt matter both sounds good
@little eagle @peak plover Thats why i love this community
I hope this wasn't sarcastic.
Sometimes people get angry when you don't give them something to copy paste immediately. :S
Well i am not stupid. And theres a syntax so wheres the problem?
Lol, you tell me.
jQuery just joined and asked a question, to which he did not recieve an answer,but the tools to craft the answer himself.
He was grateful for the tools, which is unexpected
Is that rare? Xd
you'd be surprised
The moment someone asks for help and you hint him into the right direction and he says "Thanks!", you feel that slight hope in humanity.
how do you check if player is in FFV seat? ive tried is not driver/gunr/cmdr but its returning also for vanilla cargo seat.
or is there a script way to convert all cargo seats into FFV? even better can you make a driver seat FFV?
fullCrew
How could I use the splendid camera copied params and use them with cameras with scripting? Having trouble using camSetPos/camSetTarget with positions
Nevermind got it working, bit confusing
hey, is there a way to call BIS_fnc_guiMessage oly on the player who executes the script?
Right now when the BIS_fnc_guiMessage is called, all the players are getting the message, and I don't want that.
I want only the player who creates the message to get it.
oh wait
can it be because of BIS_fnc_MP ?
I'm using BIS_fnc_MP because the rest of the code should be globally executed
By the sounds of it yes. Youll need to show us some code to help you easier.
Thank you, I figured it out ๐
any clever cookies know how to make a custom rangefinder script, i guess it would be some combination of "distance" and perhaps "modelToWorld" ???
hint str ((getPos player) distance screenToWorld [0.5,0.5]);
will work locally
if u wanna be precise and measure from eyepos, u gonna have to convert from ASL
0.5,0.5 is fine
that works, just doesnt intersect with trees and buildings obviously. cheers!
thats coordinates of the middle point of your screen
i dont know if a3 has this function but i can use lineIntersects [start, end, objIgnore1, objIgnore2, considerSnow] apaprently
distance will be measured from unit's feet
oh, they added plenty intersect functions
unless its in mp and for some reason you want server make the measurement, not the player
yeah just the player, always the player
_startPoint = eyePos player;
_end = (_startPoint vectorAdd (player weaponDirection currentWeapon player vectorMultiply 4999));
_array = lineIntersectsSurfaces [_startPoint , _end, player, _cam, true, 1, "GEOM","NONE"];
_targetPointInASL = (_array select 0);
_targetObject = (array select 2);
this one hits trees and other bobs
if (side _x inAreaArray _gMkr == INDEPENDENT) exitWith {};
So every x seconds, a function runs to check if a grid is clear, each grid has a marker in it. The above way doesn't work (obviously) I'm wondering, instead of creating a foreach for the InAreaArray and seeing if any of those are of a side, if theres a more compact method?
private _westGroups = allGroups select {side _x == west};
private _westUnits = [];
{
_westUnits append units _x;
} forEach _westGroups;
count (_westUnits inAreaArray _position) > 0
{side group _x == west} count (allUnits inAreaArray _poisition) > 0
Not sure which is better.
wait
1 was what I was trying to avoid, I'd imagine in a scenario where say you had 10 players in 10 different markers running that, it could become pretty intensive @little eagle - The second one, i'd assume, would be less of a strain assuming it works in my scenario how I need it to
But 1 should be faster than 2.
If I am not mistaken:
1 faster than 2
2 easier to maintain than 1
The reason why 1 could be faster is, because there are way less groups than units on a map, so filtering the side for groups is more effective.
It also depends on the mission.
count ((allUnits select{side _x isEqualTo west}) inAreaArray _position) > 0
Only up to a certain point I assume, as i'm checking for all enemies (in my case the INDIE side) and the situation is, the grid areas spawn the enemy units based of proximity to player.
Does that work
If all you have is single group units on west, then 2 is better.
the {select} would need to be on other side of InAreaArray as far as I know. The syntax on the wiki says such
thats why I didn't just go with that
@peak plover Why would you check the units before filtering out the ones outside the area? You have way more iterations this way. Clearly worse than my 1.
gridClear = {
private ["_gMkr"];
if (vehicle player != player) exitWith {};
_gMkr = str(player call getGridPos);
if isNil "_gMkr" exitWith {};
if (markerColor _gMkr == "ColorBLUFOR") exitWith {};
//WORK
if {side group _x == INDEPENDENT} count (allUnits inAreaArray _poisition) > 0 exitWith {systemChat "HostileinZone"};
_gMkr setMarkerColor "ColorBLUFOR";
//_gMkr setMarkerTypeLocal "B_unknown";
missionNamespace setVariable [format["%1cleared", _gMkr], true];
publicVariable format["%1cleared", _gMkr];
};
Is what I have at current, its partly Pogoman's grid checker from the old ArmA 2 Insurgency mission
I'm using it for a persistent system to save data in all grids
Qustion
Oh yes indeed, not questioning that
Sorry if it came across as that, I do appreciate the response
Why do you not generate new grids every time based on units stationed there? Just make units persistant instead
Do you have lots of groups or lots of units in few groups?
That could make a difference, but generally 1 should be quicker if that's a concern.
Also have grid checker check cached units positions (save cached units positions to array)
In most cases, its lots of units, because if a grid has lots of houses, the unit spawner prioritises spawning CQB dudes.
Yea i got 90% of the saving stuff sorted
Are they in each their own group or all in one group?
Right now their own, but they will be in one when its all sorted
one per grid for CQB units
So yea I guess 1 would be faster
Then I'd go with 1. But if speed doesn't matter, then 2 is worth considering.
Yea 100%, cheers again mate
Do eventhandelers and/or variables move from _oldUnit to _newUnit automatically?
onRespawn
All eventhandlers carry over.
All variables carry over, but only for soldiers
The name and vehicleVarName carry over
Although idk if the global variable now points to the new vehicle instead of to the wreck / corpse
ohh boy
I hate the vehicle var names / editor names and I rarely do missions so no idea :S
Does anyone know if render to surface / screen feeds with cameras are limited to a certain amount? Im trying to spawn around 10 screens with feeds on them, but no matter what, it gets limited to around 7 or 8, and the other ones are just blank.
I would conclude: Yes.
Hmm okay. They also dont seem compatible with setObjectTextureGlobal, doesnt work for JIPs
Yeah, PIP stuff is weird.
Is it possible to allow UAV controls of like stompers, etc without being a UAV Controller unit?
That seems to work fine for darters, but for larger drones like the stomper or sentinel, it wont let me take controls, only connect to it
how to concat variables to display in a hint without using format[]? _var1.toString() + " " + _var2.toString();?
Providing the variable is a string, just _var + " " + _var
I think you also need to be on the same side as the stomper class is
Or be a "UAV hacker"
Uav hacker?
unit trait
ah
this setUnitTrait ["UAVHacker", true];
Cheers
so vars dont get automagically turned into strings when you try to concat with " " ?
no
mkay
_str = str _var;
can i do hint str(_varIsArrayOfObjects) + "suck it sqf" + str(_var2); ?
yes
Sure, but check out https://community.bistudio.com/wiki/format
thats the thing tho i feel so lame using format
You're better off using it, can be faster
"lame"?
wizardry > code performance. its true!
What you posted needs parenthesis btw. It wouldn't work like you wrote it,
I guess some people just do it like that, though its not neccesary
you mean i just need one str compass them all?
It's confusing to me that it is used where it's superfluous and then not when it's needed. str and hint are the same in their usage, but somehow get treated as if they worked differently syntax wise.
hint _variable
str _variable
you mean i just need one str compass them all?
No, that would be if you usedformat.
my next problem fullcrew isnt being nice, my player getcargoindex never lines up with the resulting array so i cant use it in a select
_vehCargoArr = (fullcrew [vehicle _this,""cargo"",true]);
_returnBoolOfIsSeatFFV =
(_vehCargoArr select ((vehicle _this) getCargoIndex _this)) select 4;
how do i get the seat the player is in from the fullcrew array?
i can do a foreach and get the index that way but it will have to check every single seat right? i need this in an addaction condition
Yeah, careful.
The cargo index reported by fullCrew is shifted by the amounts of FFV slots compared to getCargoIndex.
They are different "cargo indices" essentially.
my first mistake FFV seats arent "cargo" but "turret" so i guess i can then just get all the FFV seats that have units in them then foreach cmpare with my getcargoindex?
What are you trying to do.
uav is slaved to player weaponVector intersectsurfaces (this part works on foot)
but now player is in vehicle uav must ignore lockcam unless player is in FFV
hope that was clear as mud
plus i have other actions that rely on player being in ffv like launching grappling hooks at aimpos
I think it would be better if you split up your "project" into simple tasks. What is the task here?
if (player isInFFVseat) then { hint "simple task?"};
So you want a way to know if a unit is sitting in a FFV slot?
yes please
Give me a minute to start up the game...
my fullcrew result:
"[[MCSS_C2_MEMBER_5,""driver"",-1,[],false],[MCSS_C2_MEMBER_4,""Turret"",2,[0],true],[MCSS_C2_MEMBER_8,""Turret"",3,[1],true],[MCSS_C2_MEMBER_0,""Turret"",4,[3],true],[MCSS_C2_MEMBER_3,""Turret"",0,[5],true]]"
i can get the seatIndex with getcargoindex, so now i just foreach if (_x select 3 == _mySeatIndex )?
private _unit = player;
fullCrew vehicle _unit select {_x select 0 == _unit} param [0, [nil, nil, nil, nil, false]] select 4
That should report true if _unit is in a person turret and false otherwise.
wow i dont even recognize that
SQF is madness nowadays and I love it.
// init
PZG_fnc_isPersonTurret = {
params ["_unit"];
fullCrew vehicle _unit select {_x select 0 == _unit} param [0, [nil, nil, nil, nil, false]] select 4
};
// mission
hint str (player call PZG_fnc_isPersonTurret);
This is what functions are for.
you can use _x outside for loops?
wait
what is _x inside the select code block?
ARRAY select CODEis a loop that creates a new array. The new array elements only include those elements which the code block reportedtruefor._xis the current array element.
So...
[
[MCSS_C2_MEMBER_5,""driver"",-1,[],false],
[MCSS_C2_MEMBER_4,""Turret"",2,[0],true],
[MCSS_C2_MEMBER_8,""Turret"",3,[1],true],
[MCSS_C2_MEMBER_0,""Turret"",4,[3],true],
[MCSS_C2_MEMBER_3,""Turret"",0,[5],true]
]
Lets assume we do this test for MCSS_C2_MEMBER_3.
MCSS_C2_MEMBER_3 call PZG_fnc_isPersonTurret;
Then this part:
fullCrew vehicle _unit select {_x select 0 == _unit} ...
oh right i see it now
Filters out all other arrays with not the desired unit.
damn thats smooth like bourbon
It is!
im gonna steal that, i think ive been relying on foreach too much
i do something like
_myBool = ( fullCrew vehicle _unit select {_x select 0 == _unit} ) select 4;
because im a caveman and didnt understand param ๐
I don't think that works.
After the parenthesis, you have:
[
[MCSS_C2_MEMBER_3,""Turret"",0,[5],true]
]
For our previous example.
So an array inside an array.
Can't use select 4 if the array has only one element.
oh right the object gets sent to the select 4 ?
No, the inbetween result is what I posted.
Array with one element that is an array.
You first have to pick the array.
That is what param [0, ... does.
ah ok man my head is starting to spin
The only reason I don't use select 0` is, that there could be no result!
[
]
For a unit that is not inside a vehicle.
So param is just a fancy way of writing select and have a fallback default value in case the element doesn't exist.
oh default value that i understood
If you strategically pick [nil, nil, nil, nil, false] as default value, then you can sefely use select 4 one step later.
And get the desired return value: false (because the unit was not inside a vehicle).
fullCrew vehicle _unit select {_x select 0 == _unit} param [0, [nil, nil, nil, nil, false]] select 4
So in the end it's the same as writing:
fullCrew vehicle _unit select {_x select 0 == _unit} select 0 select 4
Except that the later one will report nothing instead of false when you are on foot. Which is not as slick imo.
ah ic now, genius dont even have to use (vehicle _this != _this)
Yeah, not needed as it is implicit when using this "function".
"implicated"?
second language is English ยฏ_(ใ)_/ยฏ
first is sqf
I'm sure you could write all of this with forEach loops and stuff too and it would maybe be easier to read, idk.
[] select {} is more performant than foreach?
Don't think it's much different, but you have to use more steps along the way.
private _isFFV = false;
{
if (_x select 0 == _unit) exitWith {
_isFFV = _x select 4;
};
} forEach fullCrew vehicle _unit;
_isFFV
Something like this maybe?
my addaction condition string now looks like this:
"(alive _this) and (_this getVariable [""DW_UTIL_RDF_MENU"", 1] == 1) and
{
_return = false;
if (vehicle _this != _this) then {
if ( !((driver (vehicle _this)) == _this) ) then {
if ( !((gunner (vehicle _this)) == _this) ) then {
if ( !((commander (vehicle _this)) == _this) ) then {
if ({
( fullCrew vehicle _this select {_x select 0 == _this} select 0 select 4 )
}) then {
_return = true;
};
};
};
};
} else {_return = true; };
_return
}
",
addaction conditions are checked all the time in unscheduled env right? is this too much ?
Every frame, yeah.
this should only do the intensive array stuff if player is in cargo seat
driver (vehicle _this)
think you can just use
driver _this
gunner _this
commander _this
and get the same result.
i want the condition to be true if player is NOT in driver gunner cmdr
like this?
if ( !(driver (vehicle _this)) )
private _unit = player;
private _vehicle = vehicle _unit;
_unit in _vehicle && {!(_unit in [commander _vehicle, gunner _vehicle, driver _vehicle])}
in keyword checks if object is in array?
1 in [0,1] // true
2 in [0,1] // false
in automatically turns vehicle object into fullcrew array???
Also works for vehicles instead of arrays when used with soldier on the left side. Rarely used for some reason, I like it.
in automatically turns vehicle object into fullcrew array???
No
wow thats really good
There is two syntaxes of the in command.
OBJECT in OBJECT <--- checks crew in vehicle
ANY in ARRAY <--- checks if element in array
ah ic, im learning alot, my condition looks like this now:
"(alive _this) and (_this getVariable [""DW_UTIL_RDF_MENU"", 1] == 1) and
{
_return = false;
if (vehicle _this != _this) then {
if (
(_this in (vehicle _this) &&
{!(_this in [commander (vehicle _this),
gunner (vehicle _this),
driver (vehicle _this)])})
) then {
if ({
( fullCrew vehicle _this select
{_x select 0 == _this}
select 0 select 4 )
}) then {
_return = true;
};
};
};
};
} else {_return = true; };
_return
}
",
I thinkvehicle _this != _this is superfluous after _this in (vehicle _this)
Why isn't there ever a semi-colon after _return?
right redundant
"(alive _this) and (_this getVariable [""DW_UTIL_RDF_MENU"", 1] == 1) and
{
_return = false;
if (
(_this in (vehicle _this) && {
!(_this in [commander (vehicle _this),
gunner (vehicle _this),
driver (vehicle _this)])
})) then {
if ({
( fullCrew vehicle _this select
{_x select 0 == _this}
select 0 select 4 )
}) then {
_return = true;
};
}
else {_return = true; };
_return
}
",
as for why no terminating semi that because im "monkey see monkey do" all code returning bools do it i dont know why
Another question: is there a CBA macro for double quotes (""var"")? Something like QQUOTE()?
In ACE there is.
Nah, can't find it there either.
Just do:
#define QQUOTE(var1) 'QUOTE(var1)'
I guess.
~~What about ```CPP
#define DOUBLES(var1,var2) ##var1####var2
#define TRIPLES(var1,var2,var3) ##var1####var2##_##var3
#define QUOTE(var1) #var1
Wait no that's for more than 1 var.
Nvm.
Would #define QQUOTE(var) ##var work?
๐
killed EH means that inventory of vehicle is gone?
I don't think so, but not sure.
Hey there, I was wondering if someone could help me with this.
this addAction ["Take Intel", this hideObject true]
I'm trying to make it so when a user interacts with the object, It will disappear, Can anyone help me as I have no idea why it isn't working
@hollow mauve What sort of objects? Like vehicles and units/AI orr ?
this addAction ["Take Intel", {deleteVehicle cursorObject}]
That worked, Thank you so much
np
im trying to dynamically change a non IR masking helmet into an IR masking one (like the stealth CTRG gear)
is it a texture thing? or material property that decides if its thermal masking? like
https://community.bistudio.com/wiki/setObjectMaterial
https://community.bistudio.com/wiki/setObjectTexture
am i going in the right direction? or is this just a cfg model kinda domain? (unscriptable?)
thanks, turns out you can only get/set uniform stuff helms and facemask no joy. ill just have to go cfg way.
touching cfgs yuck!
if i wan't to access the objects which are on any seat and like to have some information bout it then I prefer the fullCrew command. but maybe it is a bit overpowered in this case.
https://community.bistudio.com/wiki/fullCrew
Hi there!
Is there any advantage on declaring functions inside the CfgFuntions class besides having them set as "TAG_fnc_sumFuktion"?
Besides pre/postInit
Or having pre/postinit available in general.. Not just for a compiler
It also adds the script header
Okay thanks!
Yeah, I have my very own function compiler
With some custom EH built in
with a dev mode that updates functionality in runtime
This bracket placement tho ๐คข
Hold it... ๐
clean and consistent, all it needs to have
Readable as well.
Should put a empty line between every line to make it even more readable.
Non-spaghettially formatted.
Honestly using else in the if would be more readable
The only problem I can see with this, is that it has no function caching. And if your stuff ever gets to ACE size, you have to wait like 30 seconds longer every mission restart.
I don't think there are mods as anal (in a good way) as ACE and CBA when it comes to performance.
It's not really performance. It's saving your sanity when debugging and having to restart.
that's the whole point of CBA though isn't it, a load of useful functions written well by some anal guys
if it wasn't written well it wouldn't be used so much
Nothing worse than loading screens. No one uses the ingame config viewer because of them.
I mean... Look at the life mods...
What about them?
nothing, just look at them
I think most people's problems with life mods are ethical tbh
I'm sure there's some which are well written but they're still probably scumbags
Ethical?
And the playerbase is annoying.
my favourite bit about anything Life is how the server always has a 500 different roles in TS and a website telling you about Project Leader (CTO) John Smith, who you know is 13 years old
I know at least one decent guy who plays Altis life.
Well.. There are decent guys who sometimes play life. And there are lifer's that sometimes play the good stuff.
#arma3_scripting Went it's usual way again ๐
better to have it go on in here for 5 minutes than in #general_chat_arma for 5 hours
Haha.
it's rare in #arma3_scripting that people ignore questions in order to talk about something else
Project Leader (CTO) John Smith, who you know is 13 years old
Better let them larp as successful people before reality hits them.
offtopic isn't much of a problem in here, everyone is OK
There was no question atm though.
Fucking LARPers ๐คฃ
I look at lifers posts on /r/armadev sometimes when I want a laugh. they have a list of 50 different requirements. and a vague promise of maybe getting paid from donations or something maybe possibly.
yeah basically, we need you to understand everything about the engine, and scripting. then build us a really complicated mission. thanks.
It usually goes looking for a dev, join ts to talk thanks
And naturally, you wont get paid
speak to Chief Commander Johnny Smith (not 12 years old honestly) in the Commander Loungeโข on teamspeak for more info
Ironic how open source mods get the best devs by simply existing.
yes hello sir i am very good developer, where would you prefer me CTRL+C CTRL+V from? thanks
No advertisements needed.
everything is always a framework with Life guys too
it's not a mission, it's a framework
its never a mission, they call it a map
Well people use a framework to build their own shit
You use the framework to create a mission ๐คฆ
I've tried various mission frameworks, and TBH they're kinda overrated.
You are supposed to get a base/framework that you use so you don't have to spend hours setting up every time
I have performance/optimization question. In an environment of 140 players online I'd like to capture whenever someone is killed the location of the killer and the person killed. The information should contain [UID,LocationXYZ,Weapon,UnitRole,Squad,Side] if destroying a vehicle it should be [VehicleName,LocationXYZ,Squad,Side]. Beyond this I'd like to capture every units [UID,LocationXYZ] every second. When a player revives another player, repairs a vehicle or completes an objective I'd also like to capture that information. All this information would then be stored in a database for review in a chronological geographic timeline.
It seems like this could potentially be a lot of stress on a server capturing this information and sending it to a database. So would it be possible/worth having a dedicated client bot that would be in a spectator slot and would have a script that would capture this information and send it to the database?
headless client
@peak plover Can you explain? I've never touched headless. I thought headless benefits mostly for having massive hordes of AI. I guess I would need to do a lot of research into the headless client because I have no idea how coding for one works vs the standalone dedicated server works.
You can also use a headless client to run scripts instead of AI. It's the same idea.
It's like a second server, can be used to run anything, ai, scripts anything
is there a way to delete grass under a ground holder?
invisible helipad is way too big
Wait @little eagle you are saying headless clients don't actually help?
No.
You can use headless clients to run unscheduled loops, etc. It's a great resource
anyone know if it's possible to make the wheels of a vehicle turn with scripting?
Yes. It's not.
anyone knows a good smoke effect? the test for empty smoke object is too high for me
nvm
universal it is
So I have a mission and it's just the escape one BI made
its been fine all day so its something recent
i have entire backups of the mission so its not SO bad
When I load in I get these errors;
http://prntscr.com/g0a2gf
This is the mission failed screen
http://prntscr.com/g0a2uo
Here is my RPT
https://pastebin.com/dF7BihXD
I hope somebody can help :\
share your initServer.sqf on pastebin or something if you want help bruh @obsidian chasm
ok
just for future reference in debugging, it tells you the error there: undefined variable in expression bis_grp_main
meaning that variable is the problem
I'm still new so im in full panic mode right now
been working on this for like 11 hours straight for 3 days and when i finish this happens
that's quite a lot of code
that doesnt sound good lol
it's fixable, anything is
but editing an existing mission is never a good thing to start out with when you're learning
Yeah now I can see that
BIS_grpMain isn't defined in initserver.sqf so it must be somewhere else
you didn't actually share your RPT either
i'm probably not the guy to fix this, but share what you've got and someone might be kind enough
Was that not the RPT I sent?
you shared screenshots then your initserver.sqf
ye my bad
clear your RPT by deleting the contents, run mission once, then upload to pastebin
RPT is here https://pastebin.com/dF7BihXD
i cant believe ive done this
i'm actually devastated
where's the original BIS mission from?
nvm, found it
each of your player characters should have this in their init
BIS_grpMain = group this;
maybe you changed characters by just deleting the old ones?
also, make sure all your player/playable characters are actually grouped together. in 3den editor, they should have a blue line going to their group leader
looking at your RPT, all the errors seem to be related to bis_grpmain so once you sort that out, it should be fine probably
Yeah theyre all connected and have that tag
case correct? no bis_grpmain
I copy pasted your one
I also have never touched this part
i wouldnt mess around with stuff like that
that's weird, i have no idea why BIS_grpMain would be undefined in that case
while {true} do
{
{if ((side _x in [east,resistance]) and {((count units _x) == 0)}) then {deleteGroup _x}} forEach (allGroups - [BIS_grpMain]);
sleep 30;
};
is that worth anything?
in DeleteEmptyGroups.sqf
mmm shouldn't be a problem but i'm not sure and i haven't written sqf in a while so i don't want to tell you to do X and fuck things up further
@tough abyss I take it you just formatted it for me?..
I wish I knew where to find it mate
Yeah It still says mission failed
when it fails I get this
There are vehicles on the map that can be used for escape though
anyone know of an updated external config browser site? the last one i have only goes up to 1.62
Joining the Life conversation from earlier, I did develop for free for a good community (no economic goals) and my code wasn't shitty, all well documented and formated for the future script kiddies that would joing the community. I did even manage to make my own framework over time. Not all are shit, not all steal, but it sucks trying to be the good guy and getting stolen from tbh. It's hard to compete when whatever you have worked hard on, someone comes and steals it. Had to wire a few core functions in RPC calls so the couldn't steal my shit without risking an BattleEye ban, with the consquenting overhead that comes with it.
tl;tr:
Life mods community has lots of intruders that just rip-off others content. no one is denying that, but they disapear when they realize it's more difficult than that. But not all Life communities sucks nor they are full of screamming ratkids, and you can find quality code written by serious organized people with amazing results.
@daring pawn thanks for the links, the dropbox link has the jets dlc stuff right like new component classes? gonna see if its possible to turn a human being into a walking radar installation ๐
@icy raft Whats your community?
Can't tell becouse of spam rules, dear enemy of IE11
I suggest taking this to a different channel.
Roger, dear omnipresent @little eagle
@lusty canyon the latest one posted on the forum thread should do yes. Otherwise, there is references on the BIS Wiki for that specific thing AFAIK
Hey Guys, I am making a rifle range and i'm trying to have a Control laptop where you can scroll on and use an action to upper and lower targets. The problem is, it works on singleplayer but not on multi, and its killing me. I've tried calling this trough the script that got called by the action: [targetsr1,0] remoteExec ["Rsp_fnc_animateTargets"]; aswell as [[targetsr1,0],"Rsp_fnc_animateTargets",true,true] spawn BIS_fnc_MP; where targetsr1 is an array of targets.
the function is as follows:
`private["_targets","_state"];
_targets = _this select 0;
_state = _this select 1;
{_x animate["terc",_state];} ForEach _targets;`
I've been trying a couple hours to get this working on multiplayer now with no result. The problem is is that the script seems to be executed locally only. Can someone help me fix it? I'm confused now and drowned in frustration about the locallity ๐
Damn...was hoping to wake up to a solution to my problem ๐
I'm going to have to start again arent I
@vale halo params and remoteExec. My first thoughts. Probably unrelated to your issue.
Yeah i tried remoteExec
you could put a hint or systemChat into your function to see if it get's executed on the clients
https://community.bistudio.com/wiki/params <- info to params
so far it looks correct to me.
And it only doesn't seem to work on dedicated servers ๐
your remoteExec exec's on everyone. Headless clients, Clients and Server.
this addAction ["<t color='#FF0000'>150m up</t>",{[targetsr1,0] remoteExec ["Rsp_fnc_animateTargets"];},"",1,false,true,"","_this distance _target < 3"];
Thats my action
It works on singeplayer, local hosted multiplayer, but not on dedicated servers ๐
According to the remoteExec it should be running on multiplayer too right
like dedi servers
When i type the command ( {_x animate["terc",1];} ForEach targetsr1;) in the debug window and exec global or server it works tho
its just the way the script gets called atm it doesn't work on the dedi server
Maybe Rsp_fnc_animateTargets is undefined on the server.
code executed inside the addaction is always local unless specified? is it scheduled or unscheduled? if i uisleep do you have to spawn = {sleep}; first?
can you sleep inside the condition string to make it not evaluate on every frame?
Always local, the statement is always scheduled. No, you don't need spawn. No, because the condition is unscheduled.
@rancid ruin I fixed it man. It seemed to be an issue with 'Empty Vehicles'
wow im stupid
๐
my fault
the actual array with targets
wasn't public
GG
Thx for the help tho
my client stutters horribly when populating a box with the first command:
_myBox spawn {_this addItemCargoGlobal ["TicTac", 300];};
with this second one it doesnt stutter so much:
_myBox spawn {_this addItemCargoGlobal ["TicTac", 100];};
_myBox spawn {_this addItemCargoGlobal ["TicTac", 100];};
_myBox spawn {_this addItemCargoGlobal ["TicTac", 100];};
they should be the same right? how do you make it add items slower? sleep on every 10 items?
_myBox spawn {
_this addItemCargoGlobal ["TicTac", 100];
sleep 0.1;
_this addItemCargoGlobal ["TicTac", 100];
sleep 0.1;
_this addItemCargoGlobal ["TicTac", 100];
};
@lusty canyon your question bout addAction:
youu ll find that information on the wiki page for addAction.
the code is executed scheduled but the condition is unscheduled.
the condition will be checked only if player is within 15 m of the object where the action is added to...
the sleep 0.1 forces the game to wait for one frame. Essentially the same what your multiple spawns are doing
... and no, u can't sleep inside of the condition because it's unscheduled.
wouldn't sleep 0.1 be one frame only when your fps is around 10? 0.001 would be better.
sleep 0.001 is pointless, because that would mean it's executed in the same frame.
I thought sleep was always at least a frame. Might remember wrong though
It's not. Try it.
Then you shouldn't make statements like this : )
Lower fps means that every frame takes longer to process and scheduled scripts still only get 3ms per frame. On low fps the time between frames would be bigger than your sleep. With 45FPS sleep 0.1 would be 5 frames. With 30 fps it would be close to 4. and with 10 FPS it would be 1 frame
Next time I'll check before stating
That's a good estimate, but I'm not sure it's working out that smoothly in practice.
Use waitUntil if you must ensure that it's running on a seperate frame, because waitUntil is checked only once a frame
True.
@split coral Sleep always sleeps at least a frame.
I can't get this to fit the same frame:
[] spawn {sleep 2;_frame1 = diag_frameno;sleep 0.001; hint format ["1: %1 2: %2",_frame1,diag_frameno]}
fps 20
Yeah. Commy is wrong
or diag_frameNo
Sleep puts the script to sleep till the next frame
AHA!
or waitUntil or uiSleep or anything else that pauses a script
sleep checks if the sleep is over yet, if it's not it's not going to continue on this frame
sleep 0.0001 does fit the same frame though. ๐ or it equals zero sleep. dunno
yes, but it only gets one chance per frame
If it fails it tries again next frame
Is it 0.1 ms in the future yet? No? Better try next frame
I never tried what sleep 0 would do tho
Don't know if the engine checks first before suspending
just do this:
_spawnedTics = 0;
waitUntil{
//_myBox spawn {_this addItemCargoGlobal ["TicTac", 300];};
_myBox addItemCargoGlobal ["TicTac",1];
_spawnedTics = _spawnedTics + 1;
_spawnedTics isEqualTo 300
};
adds a tic tac every frame until it's added 300
takes 300 frames
[] spawn {
sleep 1;
diag_log diag_frameno;
sleep 0.0001;
diag_log diag_frameno;
};
Same frame, 0.001, different frame. What does make the difference here?
@still forum if the engine doesn't check before suspending you could just do sleep.
How would it turn out with >100 FPS?
<trying>
240fps, same frame
commy is wrong
explain this commy
Does that mean it gets more than 1 checks per frame?
I'm not.
Dedmen said sleep always skips a frame.
Yet 0.0001 doesn't.
0.001 does
But I haven't checked with >100 FPS yet
0.001 skips frame
let's just assume no one plays with 300fps and 0.001 is probable way to skip a frame.
more realistic to do 30-40
let's just assume no one plays with 300fps and 0.001 is probable way to skip a frame.
Seems right.
How many 0s are we going to add after the decimal?
Not too many.
I got one frame diff at ~150 FPS
14:26:45 [9135,148]
14:26:45 [9136,149]
Best I can do with this machine.
0.001 sleep
isn't diag_log slow for this?
It also means that:
Lower fps means that every frame takes longer to process and scheduled scripts still only get 3ms per frame. On low fps the time between frames would be bigger than your sleep. With 45FPS sleep 0.1 would be 5 frames. With 30 fps it would be close to 4. and with 10 FPS it would be 1 frame
Is not really what happens, but at least a trend.
isn't diag_log slow for this?
Maybe that's why, idk.
๐คฆ
Could replace
diag_log diag_frameNo
with
diag_frameNo spawn {diag_log _this};
I guess.
@tough abyss No you couldn't. Because the command is not a nular.
Yes.
I know that sleep internally doesn't check what the current average frametime is. Probably sleep has a check like if time < 0.001 then don't sleep cuz too low value
So excited that the ww2 planes strafe run you and bomb you on my mission
its so cool ๐
X and Y rotations
bank is the total of x and y rotations?
i think pitch and bank are the same as X and Y rotation
not familiar with these namings tho
pitch == x rotation. bank === y rotation?
okay, how do I use setVectorDirAndUp to set an completly random vector
Up and Dir vectors need to be in a 90 degree angle to eachother or it will do weird stuff
Ok so i need random dir and then calculate an up that's in correlation to that
When we were learning that in school, I said "I'll never need this". And here I am now, requiring something I forgot because I thought it was irrelevent
Make two random vectors, get the cross product, and you have orthogonal vectors
_dir = randomVector;
_ab = randomVector;
// make sure that _ab is not a multiple of _dir, eg _dir vectorDot _ab isnt 1
_up = _dir vectorCrossProduct _abc;
Would be quick semi-SQF
irl north pole is vector up?
I think yes, but there are unlimited perpendicular lines on a sphere that all point in a different direction.
In Arma, the world is flat, so there is no north pole.
up is always up
In Arma, yes.
On a sphere, there would be different "ups" depending on where you are.
E.g. the south pole also points up.
from center to me is my vector up, because the vector keeps going infinitely
[0,0,1]
From earths core to any point on the surface is up, yes.
Why is there cos and sin etc. but no degreeToVectorNumber?
You mean a function that converts polar to vector coordinates?
Yea?
you can't really do that automatically
here you have a sqf function set for that:
https://forums.bistudio.com/forums/topic/151099-scripting-discussion-dev-branch/?do=findComment&comment=2612100
https://github.com/CBATeam/CBA_A3/blob/master/addons/vectors/fnc_vect2polar.sqf
https://github.com/CBATeam/CBA_A3/blob/master/addons/vectors/fnc_polar2vect.sqf
These.
Why is there a default command for cos on my calc, but no degToVec
degToVec is nonsensical, they have no units
In 2D it would make sense I think.
vec = [cos(angle),sin(angle)] then
but in even then you have some issues
because sin and cos are on a unit circle
e.g. 45 and -45 are the same for cos
params ["_mag","_dir","_elev"];
private _magCosElev = _mag * cos(_elev);
[_magCosElev * sin(_dir), _magCosElev * cos(_dir), _mag * sin(_elev)];
_mag can be 1 for unit vectors.
I posted this already. CBA_fnc_polar2vect
[random 360,random 360,random 360] call cba_fnc_polar2vect;
_mag is not an angle. It would have to be 1
polar coordinates have 1 length and 2 angles
Yes, but if we're talking about direction vectors, then the length doesn't matter and the setVectorBlah commands need unit vectors.
So 1
yea, it was mostly adding to your reply
thanks nigel commy ded green and others for that insightful back and forth, i understand the relationships between frames sleep sched/unsched much better now.
here is my box of TicTacs based on nigels code:
[_myBox] spawn {
_myBox = (_this select 0);
_spawnedTics = 0;
waitUntil
{
_myBox addItemCargoGlobal ["TicTac",1];
_spawnedTics = _spawnedTics + 1;
if (_spawnedTics == 300) exitWith {hint "im done";};
false;
};
};
using the above i dont get any stuttering anymore (loss of only 2fps while populating compared to 12fps before)
im i right to assume you dont need to use any sleeps inside a waituntil considering it will automatically limit itself to one loop per frame?
while in a WHILE DO loop you need sleep since it will burn itself out trying to constantly loop multiple times per frame right?
True, but keep also in mind that, only for waitUntil loops, you cannot leave the scope simply by using exitWith. The exitWith code block should always return true if you want that.
Your loops in endless and prints "im done" every frame after a while, while still adding items.
so i should change it to
if (_spawnedTics == 300) exitWith {true};
I guess it wouldn't print the hint, but still add items, since you use ==
Yeah. The hint can stay for debugging.
waitUntil {
code; // should not return anything
(condition)// should return true or false, when this is true, the loop will quit and continue at code2
};
code2;// script continues
waitUntil {
if (condition) exitWith {true};
false
};
Also works, but raises the question: way use it this way?
readability?
waitUntil
{
_myBox addItemCargoGlobal ["TicTac",1];
_spawnedTics = _spawnedTics + 1;
_spawnedTics == 300
};
Why not this? Seems more readable to me.
i tried that one, it only ever makes just 1 tictac
I don't think that can be. Must be a mistake.
i checked the rpt, nothing. only when i added false and exitwith only then did it loop properly
You made a mistake. This works.
this is strange before it would stop at making just 1 item, now using your code the box is there but no tictacs at all
wait ur right, my bad i had an extra bracket it works
https://community.bistudio.com/wiki/addItem Cant i also add a array? like in additemcargo?
You can not.
Is there an alternative?
{ _myContainer addItem _x} foreach ["itemClassname1","item2name"];
How come setVectorDir only change the vector around the x axis
you need setvectordirandUP
setVectorDir only changes where X vector is pointin?
z axis?
It modifies the rotation around the Z axis, in doing so it modifies where X axis and Y axis points at?
it doesnt rotate around the Z axis, it rotates around the Up axis
z != up?
not if youve changed it
check the notes on the wiki for the command
im not too good at explaining this
๐ ๐ซ
i use https://community.bistudio.com/wiki/BIS_fnc_setPitchBank might be what you need?
vector dir and up have to be 90 degrees
ok, i've grasped the concept slightly, however some aspects remain questionable
_target setVectorDirAndUp [[random 2 - 1, random 2 - 1, random 2 - 1], [0, 0, 1]];
This is what I use and it seems to provide a fully randomized rotation on all 3 axis
up and dir vector need to be fixed into a 90 degree angle
hmm doesn't look right to me at all
[] spawn {_target = cursorObject;
_pos = getPosASL _target;
while {isNil "rotate_cancel"} do {
_target enableSimulation true;
_target setPosASL [_pos select 0,_pos select 1,2];
_target setVectorDirAndUp [[random 2 - 1, random 2 - 1, random 2 - 1], [0, 0, 1]];
_target enableSimulation false;
sleep 0.1}}
sometimes points up sometimes points down, sometimes points right, sometimes points left, sometimes points forward, sometimes points backwards. and all combinations inbetween
i had the same issure with that command when i was trying to align a camera on an attached vehicle, gave up on it and used fnc_setpitchbankyaw instead (degrees as args not silly 0 - 1)
[random 2 - 1, random 2 - 1, random 2 - 1], [0, 0, 1] these two vectors will typically not be orthogonal
and with the Up vector remaining [0,0,1] might behave more like a simple setDir
it's like setDir but rotates on all axis
no because you keep your vectorUp to [0,0,1]
imagine your body, your head has to stay pointing straight up from your feet, youd only be able to rotate 360 degrees around the compass, right?
vector up is [0,0,1]. vector dir is the direction of the vector in correlation to the vector up
vectorUp is the vector from your feet to the top of your head
if you keep that [0,0,1]. your direction can only be rotating around the compass
Too that waitUntil... count frames stuff. There is no guarantee that a waituntil condition is evaluated every frame
@still forum waitUntil guarantees that it's checked only once per frame
Depends on how full your scheduler is.
yes
vector up is the direction that your vector (z) is pointing
If you really want to count frames.. Just use diag_frameNo.
_start = diag_frameNo;
waitUntil {diag_frameNo > _start+300};
He needed 300 ticktacs not frames
@peak plover i feel youre really not fully understanding this vector business
I thought that was part of the sleep discussion we had a few hours ago
vectorUp is not always the world Z vector
e.g. the vectorUp of a plane taking off is not [0,0,1], itll point up and a bit to the rear
and the vectorUp of something upside down is [0,0,-1]
vector up is the Normal of your forward vector that points upwards
(upwards relatively to the model)
It is checked between 0 and 1 times per frame
Either 1 or 0 times, not "between"
:^)
Well if you take the average of several frames
Let's add this to all our code and ask for payment for "optimizing" the code.
for "_i" from 0 to 10000 do {
diag_log "WASTE IO TIME PLEASE WASTE IO TIME PLEASE WASTE IO TIME PLEASE WASTE IO TIME PLEASE WASTE IO TIME PLEASE WASTE IO TIME PLEASE WASTE IO TIME PLEASE WASTE IO TIME PLEASE WASTE IO TIME PLEASE WASTE IO TIME PLEASE WASTE IO TIME PLEASE WASTE IO TIME PLEASE WASTE IO TIME PLEASE WASTE IO TIME PLEASE WASTE IO TIME PLEASE WASTE IO TIME PLEASE WASTE IO TIME PLEASE WASTE IO TIME PLEASE WASTE IO TIME PLEASE WASTE IO TIME PLEASE WASTE IO TIME PLEASE WASTE IO TIME PLEASE WASTE IO TIME PLEASE WASTE IO TIME PLEASE WASTE IO TIME PLEASE WASTE IO TIME PLEASE WASTE IO TIME PLEASE WASTE IO TIME PLEASE WASTE IO TIME PLEASE WASTE IO TIME PLEASE WASTE IO TIME PLEASE WASTE IO TIME PLEASE WASTE IO TIME PLEASE WASTE IO TIME PLEASE WASTE IO TIME PLEASE WASTE IO TIME PLEASE WASTE IO TIME PLEASE WASTE IO TIME PLEASE WASTE IO TIME PLEASE WASTE IO TIME PLEASE WASTE IO TIME PLEASE WASTE IO TIME PLEASE WASTE IO TIME PLEASE "
}
(Joke, please do not kick/kill me)
-nologs
๐
[] spawn {
while {true} do {
for "_i" from 0 to 10000 do {
variableLove = str _i;
publicVariable "variableLove";
};
sleep 0.1;
};
};
@peak plover Fix this.
#iwon
why 10k tho.. Why not just a endless while loop
A while loop breaks at 10k anyway
no reason. Just use a while loop
"variableLove" addPublicVariableEventHandler {call compile (_this select 0) = nil;};
but i feel like it will still cause network traffic
no clue, never used that command
I was just kidding
There's a limit on the servers that limits the packet size etc.
and amount of packets
So that would be impossible
But I did it once becouse an admin was ignoring me on a UI textbox flaw
Does it work?
It does, any call to publicVariable syncs its value to every client anytime it's called
With the consequent traffic
An effectis way to DOS a A3 server
Serious question: Can you use a unsigned .dll addon in serverside with BE enabled?
yes
"variableLove" addPublicVariableEventHandler {call compile (_this select 0) = nil;};
That's not how SQF works
I think it adds to the packet and if your client has to send too much, some of it will get cut out, causing it to be added to the next packet, and so on. This means the client will get desyncronized and should eventually catch on unless the loop is infinite
publicvariable should not force a new packet to be sent. It will only deny the client
what does all these "global" commands mean?
there are non global and there are global ones
Multiplayer:
Command is executed on all connected clients in multiplayer.
Is that the correct explanation?
addMagazineCargo is pretty unusable in Arma 3, because it can only add the item locally when executed on the machine where the box is local.
Is that the correct explanation?
No.
local arguments: command needs to be execute on the machine that owns the object
global arguments: command can be executed on any machine
local effects: command has to be executed on every machine to have effect everywhere
global effects: command should/must be only executed on one machine (e.g. server)
It's all on the wiki somewhere
@still forum
This (was atleast) is a sufficient ArmA killer
while (true) do {
screenshot "";
};
๐
Yeah. Can imagine
But you could just crash the game if you want a Arma killer ^^
preprocess a file that has a faulty include?
Didn't even think of that ๐
Yeah
I thought about using the eventhandler crash that I reported over a year ago
while {true}
not
while (true)
is player removed from his group when he dies in MP? respawn on custom position
@little eagle #normallanguageshabbit
Btw, was "definecommongrids.inc" from ui_f not included in the server version of ui_f?
It seems to be included now
Did your server crash when picking a mission?
how do you get the ATL altitude of a chopper? _myHeli distance getPos (something?)??
previously, when #include "A3\ui_f\hpp\defineCommonGrids.inc" in mission, yes
_alt = (getPosATL _heli) select 2
ty cpt
actually better in most cases since it gives height above water when the heli is above water
except you have the command and the argument reversed ๐
mhm thats a shame
can you get the altitude above water and terrain? or check for if heli is flying over land or sea?
wiki says:
Returns an object's rendered 3D position (z value above sea when over sea, or above ground when over land) in render time scope
what does render time scope mean?
PositionAGL and compare to ASLW and ATL to find out if you are above water?
@peak plover When you include addon space files in a description.ext, a PBO packed (binarized?) mission will crash on a dedicated server.
https://community.bistudio.com/wiki/surfaceIsWater @lusty canyon
The solution is to copy paste the file you want to include into the mission folder and include that.
why only on dedicated?
Dedi only
Addon locations are saved to memory. To include a file from one of them write:
@lusty canyon There is a simulation scope and a render scope. Simulation scope is where the object is. Render scope is where the object is drawn. The render scope is updated more frequently to make fast moving objects look smooth. Visual reads from the render scope, other commands from the simulation scope.
You want to use the render scope when drawing nametags, because otherwise they would be choppy.
for description.ext, addon configs โ game root folder (where exe file is)
Also getPos and getPosVisual don't report PosAGL. They report PosAGLS. z=0 is the first "walkable" surfice below the model, not necessarily the terrain. This is important when flying over houses. There can be multiple z=0 in one X,Y position for every floor in buildings plus one for the terrain.
@peak plover
why?
It's a bug.
The real question is why it's not fixed yet.
wow now its getting real, where is my panadol
so i need to make multiple checks first on the object then decide which getposType to use?
If you want to retrieve the PosAGL format, the best thing you can do is:
ASLToAGL getPosASL _blah
Or getPosASLVisual of course.
In simple terms, getPos sucks and player setPos getPos player will always move you under a building or walkable rock, because one command uses AGL and the other AGLS as format.
what i want to do with the altitude is create a fast rope with length just slightly above the ground, player attaches to the end of it (feet not touching the ground)
yea terrain
ah walkable like carrier deck too
Then PosAGLS is what you want most likely.
Sorry for talking you out of it first lol. But maybe you know a bit more now :/
so if i run posAGLS ( _heli ) select 2 i will get an array of walkable surfaces?
No, the first one below the _heli
getPos, not "PosAGLS". That's just the name of the format, not the command.
The upmost one.
Will be z=0.
So the z will essentially be the height above the walkable surface below.
so i can make my rope like this
_myRope = ropeCreate [ _heli, [0,0,0], _player, "pelvis", (((getPos _heli) select 2) -1)];
and hopefully the player is hanging off the ground / or sea level just by a tiny bit
I never used ropes myself.
just tested it, works great, doesnt even need the -1. player gets pulled up into the chopper. now i just have to test it on nimitz
what happens when the heli is directly under a vehicle? you cant walk on top of most vehicles, so getpos select 2 will be terrain?
getPos takes z=0 from the first walkable surface below the vehicle.
Vehicles don't have a walkable surface. You fall through them (exceptions maybe in mods)
But if there was a carrier floating above the heli, then it would take the roof of the building below or the terrain if there is no building. z can never be negative in AGLS unless you are below the terrain or the waves.
When do displayeventhandelers get deleted?
and can they be added to main game menus etc?
How do I run code as soon as game starts?
i think you'd have to edit the RscMainMenu or whatever it's called (probably not that)
@peak plover
When you delete them or the display get's deleted
yes
preStart
Any suggestions on how to slow down a vehicle as if it would be more heavy?
increase mass
Does setMass not do that?
fantastic, I ll try that. thank u @indigo snow
does the mass of items inside infantry inventory affect rope physics? because even if my rope wind up speed is 9999m/s those fat bastards stay firmly planted on the ground
i have to give them a setvelocity nudge only then will the ropes carry them up
if a building lifting skycrane cant even lift you up, then how did you get past the recruitment office soldier?
Notepad++ is the hardest thing about scripting things I think
constantly jumping to a new line is going to kill me today
No clue what you mean oO
Using notepad++ to write scripts
Notepad++ is the hardest thing writing scripts
constantly jumping to a new line writing many many lines
I guess
Still don't get his Problem ยฏ_(ใ)_/ยฏ
It's what he uses. If he would use notepad.exe he would blame that.
never noticed (or you have that shitty autoLinebreak stuff enabled^^)
Not rly sure about that ๐
Wait, are you saying that you don't write everything in one line?
Saves processor time
exactly ๐
No
The issue is when you're using Notepad++ and click anywhere above or below your current line it takes you to a new line
Check the preferences, can't recall what the exact name was
How do people manage to find these hilariously hidden settings?
trial and error I guess..
So you click on any line in N++ and it immediately makes a newline below that and places your cursor there?
Um pretty much
If I click and move sideways to select all of a certain weapon or vehicle code
if I move anywhere above or below it it takes me right back to the beginning of the line, no matter how far along I am
and right now when im changing loadouts of 10 different soldiers to be all individual it's trying my patience...to put it lightly ๐
Is there a way to prevent the console from being opened ingame? Such as to prevent commands such as endmission from being executed
The cheat console? Not that I know
Yeah the cheat console. People using it to get around things on my server
The debug menu you can easily disable
cheat console?
This works online?
Yes
so anyone can type in endmission?
How to prevent strecthing?
how do you bypass the 15 radius limit on addaction?
It wont end the whole mission but it will put them only to the lobby
You want something against combat logging?
Is there a way to check size/dimensions of an image or how do I force images to not stretch
Please now theres three questions at the same time going
well u contributed to that ๐
@indigo snow The reason im looking into this is because I have an auto data-save which can be avoided to like exploit it with this
@digital pulsar was trying to avoid adding to player again cuz of the constant condition checks + would then have to do removeActions while deleteVehicle cleans up nicely
well there you go, 15m or slight performance drop
every action on a vehicle executes different script?
if it's the same u can just have 1 action
and put cursorobject into parameters
I remember people looking into this like a year ago but I cant for the life of me remember what came from it, @warm gorge . You might try looking into if it creates a dialog or something.
Does that fire when the cheat is used?
I assume all cheat does is run endMission
Yeah it does Triggered when mission ends, either using trigger of type "End", endMission command, BIS_fnc_endMission function or ENDMISSION cheat.
that might actually work
So the dimensions to my image are 1024 x 512. I want to either detect other images as well and check the dimension somehow, or how do I stop the image from stretching ( i want fullscreen ) using RscPictureKeepAspect
ok, I used ctrlSetPosition and set it all to safezone values http://i.imgur.com/XjAv7jd.jpg
it works
is there a way to fetch the attachment positions for a weapon?
Been a while since I did stuff like that
afaik the weapon is not part of the "world"
you can only access the weapon bone i think
kinda shitty explenation ๐
i'm writing a incoming fire detector for rpgs since addEventHandler ["IncomingMissle"] doesn't work for player fired rpgs. Anyone have an idea for a good way of doing this?
my current thought was using fired event handler on everyone but exitWith if they fired something other than a rocket or missile but that seems messy
Is there a way to publicVariable an Array of UIDs? I keep getting Error publicvariable: Type Array, expected String ๐ค
I get you can't because the syntax needs to be a string but is there an alternative
the string is the variable you are trying to make public i thought. have you tried using putting your variable name in "quotes"?
Nah. I'm not that smart, thinking of it now though. That sounds like a good idea. Thanks ๐
What res are you using? @peak plover
1920x1080
Perhaps it is an issue with your description.ext?
Don't think so. It's in good proportions now, but
๐ค
The small box on right is clipping
Does it happen for all of the players?
1 out of 1. 100% all players currently
Could you get someone else to try joining and see if they have the issue too?
@heavy plover Check Example 2, https://community.bistudio.com/wiki/publicVariable
@distant egret Thanks. idk how but I didn't see that. ๐ค โค
finally. ONe of the controls had a - in it so i didn't think it's the highest point
It's almostl ike the good old arma 2. Now mission makers can include fullscreen images to set the tone
@peak plover That's pretty cool, how did you achieve that?
I personally liked the arma 2 loading screen a lot more as you can show a lot more information.
Exactly
You change the loading screen dialog?
So does it use the loading screen picture or is there a different file path needed?
It uses the same images as normally in the tiny window
loadScreen and if it does not exist then it uses overviewPicture
both from missionconfigfile
cool, and on the bottom right can that be removed?
Or does that mean changing the whole dialog?
Yeah, but I thought I'd leave for map info...
You could just leave the text yea
I could try removing that, I guess...
It amazes me that missing just one " out of a small script collapses the whole thing
because everything becomes a string ๐
Do you guys happen to know any possible places where scripters might be lurking? My team is working on an open source Arma project but we'd like to have more scripters working on it to speed things up
I've promoted the development on Discord channel and on forums, but they don't seem very effective, while contacting developers directly seems to work
@tender fossil we don't lurk, we just hide below rocks and only come out when summoned with worthy food offerings
@obsidian chasm So I need to add pizza and good beer as benefits? ๐
@tender fossil Make something great that People will want to put time into
@still forum I believe we do ๐ I think a lot more people would be interested in the project if I got the chance to explain the details
Github link?
If its opensource i would just link the repo. But i assuming its some sort of life mod, so prob have less people interested in working on it imo
Making a project moving is painful
It will become open source after v1.0 release @still forum , though we can change it to open source earlier too if people think it's good option
So it's actually not open-source and you have nothing to show to attract people
I remember when I tried to make Project Arkana or Purelife, no one joined
And technically it's neither a Life gamemode or mod, it's multiplayer mission (framework) that's quite different from Life as gamemode
Oh boy.
Well, if someone is interested, I can grant access to our repo if you want to take a look ๐
And Arkana was really something else ๐ Magic in Arma 3 ๐ ๐
But if you guys really think it would be better to go open source also during the development of first full version, we'll take it into consideration
If you already have more than 1 people working on it and use gitlab or similar, you might as well have it public, as it does not make it harder for you. But if you work on something on your own and can't be arsed to upload to a cloud every change you do, you should keep it closed until you are ready