#arma3_scripting
1 messages ยท Page 250 of 1
If it's multiple missions from different people then it is indeed strange
yes
consistent crash behavior on all of them
i've spent probably 15-20 hours on nothing but efforts to fix problem
And the machine runs other games well?
yes... the only other thing i play though is project reality
so i can't say much for other games
perhaps i should try one
hmm. Arma is pretty... demanding
true... i put it in lowest vid settings for diagnosing ... but my machine meets requirements fairly well
i have ram left to spare while running game, cpu not totally plugged, etc
really
sigh perhaps time for new mobo/cpu
My Arma never goes beyond 25% CPU usage. It's a quadcore. I guess Arma can only use one core or something
no expert on stuff like that
it would be surprising if a modern game like a3 could only use one core, no?
Well
This might be a better topic for #arma3_troubleshooting
yes excuse me... thanks again for chat on this topic
ahahahah arma uses 1 core for most things I believe/
That's why running Headless Client is so good
Because it uses your other core(s)
Also I'm looking into Arma scripting
Any recommendations on guides?
Preferably newer ones that are designed for Arma 1.62
is it possible to set the status of a RscCheckbox? (ex: set column 1 row 5 value to not checked)
What am i doing wrong here? ```params [
["_mapClicks", false, [true]]
];
if (_mapClicks == true) then
{
hint format["Mapclicks : %1",_mapClicks];
} else
{
hint format["Mapclicks : %1",_mapClicks];
};```
oh whats the command to make a codeblock?
thx ๐
== cannot compare booleans
if expects a boolean, so just use:
if (_mapClicks) then {
also, I'd rename the variable:
_isMapClick
oh i see
@little eagle maybe with a ed at the end?
yeah, _isMapClicked
really depends on what this actually does
Just a simple tp on mapClick function
that would read good:
if (_isMapClicked) then {
point is, you cannot compare booleans with ==. And it wouldn't make much sense anyway
Really appreciate the help guys! ๐
np, yw
that is what this channel is for : )
yeah i know ๐ but still it feels better to thank when one gets some help ๐
Hello! Playing the Apex protocol campaign, I noticed that one could now incorporate the video on games. For example on a screen.
Anyone have information on this feature?
Yes exactly
anyone have experience with creating life servers
?
i have a couple problems when i created mine
what is the fastest way to force a tank to fire at a certain object without distracting on other units around him
i guess fireAtTarget will do, but how do i find a muzzle i need
Im just guessing now but wouldnt you find the correct muzzle in configviewer for that specific tank?
trying it out, not sure exactly where to look
weapons command returns tank weapons
what if i wanna use other kind of ammo for that weapon, how would i go about it?
-snip-
no, wait
private _turrets = allTurrets _vehicle;
_turrets pushBack [-1];
_turrets apply {[_x, _vehicle weaponsTurret _x]}
changing the magazine will be tricky...
Im getting confused by params. i need to check if _myVar is false or true. It cant be anything else than that.
'''params [["_myVar",false,[true,false]];
The part that confuses me are how i define the allowed values.
the array on the third position only needs one example of the data type
no point in having true and false, as both are boolean
oh okay
you cannot define "allowed values"
only allowed data types
if you only want to allow certain values , you have to check:
if !(_value in ALLOWED_VALUES) then { /* fix it */};
keep in mind that in <ARRAY> is case sensitive
so say i had another one like so: params [["_myVar","string",["allowed1","allowed2"]];
that doesn't work. Both "allowed1" and "allowed2" are strings
"string" is your default value
in case it was undefined or the wrong data type
So i have to check the value after and deal with that then, got it!
Thank you so much! ๐
thanks for info guys, i'll try it right now
Sup folks.
Sup sup :>
Sup @little eagle you seem to know your stuff
Mind teaching me or pointing me into some good well, explained guides?
Sup sup :>
There are no guides that are up to date. And imho all guides so far are lackluster.
By making mistakes
^
I didn't know what I was doing. After 6 months and many deleted lines I could write basically anything
Still learning about some weird details of SQF from time to time...
This wiki explains the commands:
https://community.bistudio.com/wiki/Category:Scripting_Commands_Arma_3
Still using that today on the obscure ones
With any type of scripting or programming you'll get the most out of just doing it
http://killzonekid.com/ his site isn't bad, it's scattered and sometimes a little dated information, but overall there is a lot of information
http://foxhound.international/development.html has some nice information as well
@Latouth if you speak German I'd know a really good tutorial series...
The wiki is the bible for SQF
any benefits over https://community.bistudio.com/wiki/Category:Scripting_Commands_Arma_3 ? ^^
your link seems to outdated quite a bit (this page last updated: 25 Dec 2015)
Better formating, but less complete
meh formatting is a non-issue, I usually ctrl-f my way through it. ^^
same
something for 3den I think
Never seen anyone successfully using it outside of 3den though.
that's what i used to change mag on tank and fire at target
mission_tank_01 loadMagazine [[0],mission_tank_01 weaponsTurret [0] select 0,"CUP_20Rnd_TE1_Red_Tracer_120mmHE_M256_Cannon_M"];
mission_tank_01 fireAtTarget [mission_car_01, "CUP_Vcannon_M256_M1Abrams"];
menuAdd is for control type ctrlMenuStrip. Might be possible to use with other related control types but haven't tried that.
Adding dropdown menus and items to them https://gyazo.com/5380a65c101b64b2c45ea413ab9ffaab
@scarlet spoke only speak English, no German here ๐
Looked in CBA documentation (but it's a bit messy). If anyone can confirm this, but does CBA not support Extended Evenhandlers for certain objects with parent class Static?
Example,
class Extended_Init_EventHandlers {
class Static
{
init = "deleteVehicle (_this select 0)";
};
}; ```
This script will delete some objects that inherit from class Static, but not all. It seems from my short testing that objects that inherit from Strategic don't get effected while objects that inherit from NonStrategic do.
Anyone can confirm?
Yes. Certain objects are disabled for performance reasons. Mainly map objects. So yes, certain Static
Also, which doc where you looking at? I found the old ones to be lacking too so I wrote this: https://github.com/CBATeam/CBA_A3/wiki/Extended-Event-Handlers-(new)
But maybe it can be improved? Please make a suggestion
you have to add the closing parenthesis to the link. discord sucks
Gotcha. Wait, so the event handler get called on map objects too, not just mission objects?
It would, but it is disabled so it doesn't
This was made for performance reasons in A2. But honestly the code has so much improved since then... maybe we could enable it for every object
I just don't want to wreck performance. Deleting something that was made for performance reasons is a huge red flag
Yeah. I'll explain the situation... hold one
class CBA_Extended_EventHandlers_base;
class CfgVehicles {
class Static_Base;
class Static_Class: Static_Base {
class EventHandlers {
class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers_base {};
};
};
};
^ that config should readd it for the object
But at that point you might as well just add it to config. Also won't work for missions
Gotcha. Well thanks man. I'll test it out and let you know.
I'm only going to be using it for specific objects of child Stragetic
Yeah, "Static_Class" and "Static_Base". Replace them with your classes
@little eagle
Thanks again for the help. I realized now that I could have just gone to the github source and look in XEH and see for myself what was disable and what wasn't. Hindsight right?
Just to peak my interest, is there any way to make XEH run on only mission objects? Something like initMisssion = ""
I don't know if its true, but don't mission objects have an ID while maps ones don't, so you would use BIS_fnc_netId to check for id.
Of course, I don't know if this would really help with the performance issues due to your still checking if every object has an id, and this would run eveytime a person joins the game.
Just to peak my interest, is there any way to make XEH run on only mission objects? Something like initMisssion = ""
Yes, but:
Of course, I don't know if this would really help with the performance issues due to your still checking if every object has an id,
and this would run eveytime a person joins the game.
only locally though
Maybe that would work. Who knows
Hmm... if I get a chance I'll try it out. Future fork? Anyway thanks again.
@shut prairie I know this is probably late, but it couldn't hurt to read a few guides on Syntax and then just... Crack open a few scripts and look at them.
Unpack some missions with features you like, take a look at the scripts.
It's very similar to building in the sense that you have the resources, you just need to know how to put them together. You can google "Arma 3 Scripting Commands" and "Arma 3 Event Handlers" for a lot of what you'll need.
The first time I started scripting was when I wanted to shoot vans out of a machine gun. I asked around a little bit, and I got a script that already did that, but I didn't just throw it into an SQF and never touched it again, I looked at it and learned from it and picked apart what each string did.
I'd say the hardest part about Arma 3 scripting is debugging, but you can look up KillZoneKid's tutorial on Arma 3 debugging.
A lot of people have the idea that you have to 'progress' through increasingly difficult scripting tasks in order to learn, but that's really not the case. It might be hard what you want to do initially, but that makes the learning experience all the more rich.
(You still should be careful about biting off more than you can chew, though.)
</block of text>
well put
So in short: Copy, Paste & Understand ^^
But it's true
Yep! That's how I learned.
@shut prairie Also, never be afraid to play with the scripts. Just keep a copy of the original, and toy with it all you'd like.
One of the best ways to learn is to tackle something complex
You learn a lot on the way
don't just blindly copy stuff though. think about what it actually does. that way you can improve and simplify it most of the time.
For now, I'd seek understanding before improvement.
Internet connection problems can make a var set on an object with _obj setVariable ["var",1,true]; not reach a client? Sorry, i know i ask much, but this will help me to debug a situation.
I don't think so. Never had it happen at least
Thankyou. I will check the code one more time.
There is one thing that can happen
If you execute setVariable public on two machines at about the same time
what end up happening is, that they will end up receiving the value of the other machine after they set their value
So machine A will end up with B's value and machine B with A's value
I see. Not consireded it when making the code. Will see if thats the problem.
A way around this is to only use setVariable public on the server
or the machine where the object is local (locality shouldn't change that often)
This can explain some inconsistence i'm having. Will be better to re-do the code with this in mind and avoid this situation. I found i did _p = player; and then set a public variable on _p after the player died and respawned. _p was not refering to the player anymore but probablly to the dead body.
yes, that is how it works
If you setVar on the dead body before the unit respawns, the variable will carry over to the new unit
But that stops as soon as the unit respawned, then the body is seperate
Nice!!!
I got it. Thanks a lot.
Its for a script to detect combat mode. Its fixed now!
nice
It was turning combat mode off on the dead body. Now i turn it off imediatlly if the player die.
@tough abyss @dusk sage @little eagle Tons of info, jam packed. Thanks so much. Thing is though, I can understand what stuff does by the name, for the most part.
For example,
[] exec "scripts/fn_statusbar.sqf"
Executed the scripts/fn_statusbar file initiating it. Totally not taking from wackbatt (think it is) on Arma life rpg forums, which he had a public statusbar script.
I'm been looking at people's scripts lately (cough, @dusk sage's mainly Altis life cough) and can understand what most/some of it "is"
Right, well, that kind of stuff is easy.
if (hasInterface) then {
if (player == getAssignedCuratorUnit (allCurators select 0)) exitWith {};
playMusic "IntroMusic";
cutText ["", "BLACK IN", 0];
loopdone = false;
introended = false;
_txt_1 = ["Vauun Presents...",5,"center","3","#FFFFFF"] execVM "AL_movie\txt_display.sqf";
//----------------------------
_secondshot = [cam1, cam2, camtar1, 10, 1, 1, false, 0, 0, 0,"nightvision","black",1,"NoSound"] execVM "AL_movie\camera_work.sqf";
waitUntil {scriptdone _secondshot};
_txt_2 = ["...A Mission for TMTM",5,"center","3","#FFFFFF"] execVM "AL_movie\txt_display.sqf";
//-----------------
_firstshot = [cam11, cam11, camtar5, 10, 1, 1, false, 0, 0, 0,"nightvision","black",1,"NoSound"] execVM "AL_movie\camera_work.sqf";
waitUntil {scriptdone _firstshot};
_txt_3 = ["'Au Revoir'",5,"center","3","#FFFFFF"] execVM "AL_movie\txt_display.sqf";
//------------------
_thirdshot = [cam3, cam4, target7, 10, 1, 1, false, 0, 0, 0,"nightvision","black",1,"NoSound"] execVM "AL_movie\camera_work.sqf";
waitUntil {scriptdone _thirdshot};
loopdone = true;
introended = true;
[nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil] execVM "AL_movie\camera_work.sqf";
};```
it's shit like that
this
this was a pain in the ass to troubleshoot
but it's deceptively simple
I'm not "home"
I'm on a trip, so all I can do is read
When I get home I'll start trying commands out with like debug console
Anyone got any idea if "getUnitLoadout" and "setUnitLoadout" are going to change or not, they've been marked as not final since 1.58
There is an issue with loadout commands that they always assume that there is two muzzles in each weapon unlike say weaponsItems which changes number of magazine arrays depending on number of muzzles, I'd submit that as an issue to be fixed in loadout commands.
Anyway to check if a class name is valid?
isClass(configFile >> "CfgVehicles" >> "something")
Thx works like a charm
I can't think of any weapons with more than 2 muzzles off the top of my head though besides vehicles
@little eagle
Just tested
class CBA_Extended_EventHandlers_base;
class CfgVehicles {
class Static;
class Building : Static {
class EventHandlers {
class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers_base {};
};
};
};
Registered all objects it effected using
class Extended_Init_EventHandlers {
class Building
{
init = "INSERT CODE HERE";
};
};
It only registered on mission objects and not map (terrain) objects. I didn't see any real performance loss. I mean obviously your going to get different results with different events, and more objects. I didn't do extremely thorough testing (like testing with different events, or on dedicated, etc.) so I could be wrong.
It only registered on mission objects and not map (terrain) objects.
Interesting
Maybe this is caused by this using the sub classes event handlers? Who knows
Maybe a change with the engine? I know there has been a lot of changes since 2014 when you guys blacklisted certain classes
sub class event handlers didn't even exist when XEH was made
me neither, but I was brave enough to redo it for post Heli-dlc A3
I am wondering, is there a counterpart to "owner"?
Hey guys! showHUD command is broken again?
erm, not when i tested last time
I am wondering, is there a counterpart to "owner"?
As in a command that reports all local objects?
entities "" select {local _x}I guess.
Was practicing AI control in dual pilot helis last night and found it frustrating that I couldn't get the gunner to target structures/buildings, etc. (There were spotters hiding in a building and the gunner wouldn't fire upon them/the building.) How feasible would "target this structure/building" functionality be to script? E.g. ~ Command Menu > Select gunner > move your "Command Crosshair (?)" (middle of HUD) over structure/building > "Target that [house/church/bunker]!" > "Open fire!"
(In the same way that I can direct AI to move to a structure, or specific location, but instead ask them to shoot at it instead.)
@little eagle
More like:
OwnerID setVariable ["blablub",Banana]; (exec on Server)
I am just curious.
*Stupid EnterButton...
Just like in [] remoteExec["fncName",OwnerID];
OwnerID setVariable ["blablub",Banana];
uhm
blablub = Banana;
OwnerID publicVariableClient "blablub";
I don't understand what else you mean.
Simply selecting the Object, related to that ID, without searching through the whole list.
nvm it.
+Hu? Since when has handleDamage 6 entrys? What did i miss? Output looks like the "gunner-Pos" who fired the shot (if Commander in Vehicle).
is there a simple way/function from BI to create a vehicle with full crew and all cargo (transportSoldiers)?
@steep matrix
_Veh = cursorTarget;
_FillIt =
{
_Unit = "B_RangeMaster_F" createVehicle [0,0,0];
_Unit moveInAny _Veh;
};
{
for "_i" from 1 to (_Veh emptyPositions _x) do { call _FillIt; };
}forEach ["Commander","Driver","Gunner","Cargo"];
{
call _FillIt;
}forEach (allTurrets _Veh);```
for example.
@jade abyss thanks testing
tried to use BIS_fnc_spawnVehicle but its way too messed up and limited..
_transportSoldier = getNumber (configFile/"CfgVehicles"/_x/"transportSoldier");
_crewType = getText (configFile/"CfgVehicles"/_x/"crew");
if (_transportSoldier > 0) then
{
for "_i" from 0 to _transportSoldier do
{
_unit = _tempGroup createUnit [_crew,[-10,-10,0],[],0,"CAN_COLLIDE"];
// _tempGroup addVehicle _newVehicle;
_unit moveInCargo _newVehicle;
};
};```
this is what i wanted to use, but BIS_fnc_spawnVehicle makes planes flying and the game crashes soon after
oO ouch
ok yours works nicely. thanks again ๐
ps: 15 years and still no sqf cmd to do such simple thing..
Simply selecting the Object, related to that ID, without searching through the whole list.
There is no the object A machine can have many objects...
@steep matrix https://community.bistudio.com/wiki/createVehicleCrew will that work for you?
No
Tankbuster
This command creates drivers/copilots, commanders and gunners where appropriate, but it never creates cargo crew. So a gunship Huron will get a pilot >and copilot plus 2 door gunners, but nobody in the back
@tough abyss dont work
He said "we need"
tbh, just write a function for it.
imo we don't need commands for every shit that can be achived by other means
and is not performance critical
Hey guys, anyone has an idea how to achieve such a ghost effect (as pictured here: http://makearmanotwar.com/entry_uploads/13425/screenshots/ZfN07029FlUGJzLEy6twYUBja6QC37qdVveg5b52YjIRCuiuYD.jpg) with a given p3d? I've been fiddleing with it for a while without any progress.
well isnt that just basic transparency?
It is. Just get a slightly transparent green texture (About 15 seconds in GIMP), and apply it to the object, then spawn the object on the ghost's position while taking its dir and posATL.
using setObjectTexture(Global)? I tried _obj setObjectTexture [0, "#(rgb,8,8,3)color(1,0,0,1)"]; to avoid creating a texturefile, which didn't work last time I tried. it didn't change the texture at all.
just tried it again. it doesn't work on models that don't have a hidden selection.
anyone tried these yet?
b:OBJECT addmissile ARRAY
b:OBJECT forcefollowroad BOOL
b:OBJECT setpilotcameradirection ARRAY
b:OBJECT setpilotcamerarotation ARRAY
b:OBJECT setpilotcameratarget ARRAY,OBJECT
u:getpilotcameradirection OBJECT
u:getpilotcameraposition OBJECT
u:getpilotcamerarotation OBJECT
u:getpilotcameratarget OBJECT
u:haspilotcamera OBJECT```
Hey, anyone have an example to make this: (check left top green notifications): http://i.imgur.com/33mEbOh.mp4
http://killzonekid.com/arma-scripting-tutorials-gui-part-1/ for the text part id look in to that
I have a problem with showHUD command. Can someone who used it before check it one more time? Maybe i'm doing something wrong. My description.ext file is empty so this scripting command shouldn't be disabled.
https://community.bistudio.com/wiki/showHUD
@daring geyser It would help if you posted the code you're using and what you want it to do
@zenith totem Sure. That's from examples from command syntax page:
showHUD [true,true,false,false,true,true,true,true,true];
Even more
showHUD [false,false,false,false,false,false,false,false,false];
And nothing is hidden ๐ฆ
It would help if you posted the code you're using **and what you want it to do**
@daring geyser Where are you putting this script?
If you're putting it in the init field of a unit, you should be using this showHud[parameters];
How should i change my code to make 0 cars spawn if the number is 0? im lost ๐ ```fnc_test = {
params
[
["_amount",0,[0]]
];
_position = [[7525.87,5000.6,0.00143909],[7493.17,5000.71,0.00143909],[7470.39,4978.42,0.00143909]];
if (_amount < 0) then {
hint "0";
} else {for "_i" from 0 to (_amount) do {
_veh = createVehicle ["O_MRAP_02_hmg_F", selectRandom _position, [], 0, "NONE"];
createVehicleCrew _veh;
};};
};
[1] call fnc_test;```
showHud [parameters]; is just the script, you're not defining what it's pointing at
@tough abyss Have you tried to use it?
I'm at work right now, but if that's the entire script then that's your issue.
showHUD [false,false,false,false,false,false,false,false,false];
Does nothing with HUD
All I ask is to confirm that this command is broken or not
...Right, because you're not defining what the script is being executed for. It's executing to nothing, which is why you don't have any errors.
this showHud [false,false,false,false,false,false,false,false,false];
Read the syntax carefuly please: https://community.bistudio.com/wiki/showHUD
Do you understand that defining what the script is being executed for is seperate from the syntax?
It's not shown there because that would be redundant.
Really? Are you 100% sure? ๐
I'm pretty sure. Humor me and try it.
Will do now
@tough abyss Syntax error as expected for the following line:
player showHud [false,false,false,false,false,false,false,false,false];
Did you put in 'player'?
Okay. Need someone who used this command before to confirm that showHud is broken
Rather than being snarky to the people who are trying to help you, it may be best to appreciate them.
Btw this one works well: https://community.bistudio.com/wiki/shownHUD
@hearty shoal
for "_i" from 1 to (_amount) do {
DOH ๐
so _amount = 3 results in:
1,2,3
Thank you as always ๐
@tough abyss showHud only has one argument, and it comes after the command
What's the proper namespace for global variables on a dedicated server? I'm using missionNamespace and it's working fine local, but once I put my mission on server it seems not working
@formal vigil
missionnamespace setVariable ["NameOfVar",StuffInsideVar,TRUE];
@jade abyss you've just probably saved my ass ๐
Thanks, man. I'l ltry it in a few
Do i have to enable the new revive system in eden or can i enable that in description.ext somehow?
Yeah but that one is out dated and the new link only explain how to add the revive with eden
Oh, you're right. How odd of them to remove the template. Gonna have to update all my scenarios.
@jade abyss unfortunately it didn't work
but I think the problem is in SHK_Taskmaster because tasks are not updating, the other part of the script seems to be working
[p1, supRequester, supProviderArtilery] call BIS_fnc_addSupportLink; ["Task1","succeeded"] call SHK_Taskmaster_upd;
first line runs, I'm getting the artilery support, but then the second line isn't working as I don't get the update for current task ("Task1")
Works for me. Sounds more like it just don't get to that point, where it has to set the Var
missionNamespace getVariable ["bis_fnc_moduleRemoteControl_unit", player];
does this ugly workaround now always be used if one wants to RC with ZEUS? ๐ฎ
yes
it's been like that since 2014
can one overwrite the player variable still or is it protected by now?
player = remoteControlUnit;
selectPlayer was already quite messy but this is a classic design failure again by BI..
no you cannot do that
If you're using CBA there is
["unit", {RealPlayer = _this select 0}] call CBA_fnc_addPlayerEventHandler;
Yes it is based on polling, but at least not every mod needs it's own loop.
hey guys, I have no idea about scripting but I need a script that I think is kinda easy to write for a scripter. I need a script that animates the hatch in my vehicle when a certain place is in use and closes it again if the seat is enpty...can somebody do that for me or help me write this script?
@daring geyser I'm late. I used this command for a scene earlier. The reason why it doesn't work is because you have one parameter too much. The last parameter, the squadRadar hasn't been implemented in 1.62 APEX yet so you simply need to remove that
showHud with 8 parameters works just fine. You need to wait for the next ArmA update for the SquadRadar afaik
(Would've been nice if anyone that manages the wiki could've made that clear, I was confused originally too)
Is it possible to change the color of a flashlight?
{
color[] = {1800,1500,1200};
?
How do i check that veh is somewhat near my _pos? ```
_pos = [7805.79,3102.9,0.00143909];
_position = [[7805.79,3102.9,0.00143909],[7765.99,3102.69,0.00143909],[7723.36,3073.03,0.00143909],[7705.15,3132.25,0.00143909],[7738.89,3192.33,0.00143909]];
_veh = createVehicle ["C_Hatchback_01_F", selectRandom _position, [], 0, "NONE"];
createVehicleCrew _veh;
_veh doMove _pos;
waitUntil {veh distance _pos < 5};
_veh setDamage 1;
RPT: 18:37:46 Suspending not allowed in this context
18:37:46 Error in expression <;
waitUntil {_veh distance _pos < 2};
veh setDamage 1;>
18:37:46 Error position: << 2};
veh setDamage 1;>
18:37:46 Error Generic error in expression```
@quasi thicket http://www.armaholic.com/forums.php?m=posts&q=32260
You are trying to suspend a script thread in a non suspendable evniroment
So how should i approach the problem ? I need to check somehow if _veh is near _pos.
@hearty shoal use spawn instead of call
You can't use commands like waitUntil when you call a function
When the parent scope is unscheduled, for clarity
Hello everyone. I am trying to make a scenario that ends with "mission failed" when respawn tickets exceed a certain number (40). I have tried using the in-game module for respawn tickets under Scenario Flow>Respawn Tickets, which works in part, but with this module it says "your team has won" when the tickets are exceeded which is not what we want.... any ideas? Any help would be greatly appreciated! Been scratching my head on this one for two days now!
cant you just you tickets and endgame respawns? like so in description.ext: respawnTemplates[] = {"Tickets","Endgame"};
UI question, if you got a clue please use @austere granite
How does one animate a UI element to open up from bottom to top? Top to bottom opening is very easy by having H of controlsGroup at 0 and then uusing ctrlSetPosition to animate open it, but... how do I make it open from bottom to top that it looks the same?
You'll have to move elements inside groups against group movements
Might as well have group inside group and then all your elements inside it
That's really the only way is it?
Yeah i was thinking about that, basically have another subcontrols group and then move that position downards while the other one goes up with the same commit time, but seems silly
Nothing silly about, that's how UI works if you're trying to achieve exactly this effect
You can only have single group extend upwards but your controls will appear to be sliding up
If you want them to appear without movement then you'll need to have group inside group and move each other in opposite directions
Then the subgroup ctrlSetpos downwards
yeah okay got it, guess that'll be the only way unfortunately. Was hoping for some ultrasecret hightech alternative setPos that would extend from bottom to top automagically
UI coordinates start at top left so everything inside groups will be aligned to top left, its just how UI works
Just thought it would be useful to have padding in controls groups so you can adjust entire contents just by changing the padding
But for now you'll have to create second group inside to have this kind of padding
Okay thanks for the help anyway, should be easy really, just didn't think about it right away
Hello guys, I am having quite a bit of trouble with something that "should" be simple... What I am trying to do it make a mission end when BLUFOR run out of respawn tickets. I have it adding tickets correctly, subtracting them as players on the blufor side respawn, but it doesn't end the mission.... Here is what I have so far:
// Respawn templates from CfgRespawnTemplates. You can combine any number of them together.
respawnTemplates[] = {"Counter","Base","EndMission"};
// Side specific respawn templates. When undefined, general respawnTemplates are used instead.
respawnTemplatesWest[] = {"Counter","Tickets"};
Any suggestions would be greatly appreciated. Literally throwing a lifeline out here guys.
BIS documentation: https://community.bistudio.com/wiki/Arma_3_Respawn#Respawn_Templates
Have you tried the F3 framework?
http://ferstaberinde.com/f3/en//index.php?title=Main_Page
@open vigil Havnt honestly referred to F3 for years... but just looking through, it seems they lack respawn ticket tamplate
I thought it did, my bad.
Oh no worries. Any help at this point is appreciated.
This is what I have set up in description.ext:
// ====================================================================================
//Respawn Template
// Respawn type, see the table below
respawn = 3;
// Delay in seconds before playable unit respawns.
respawnDelay = 10;
// 0 to disable the score table (it can still be opened manually by pressing 'P' key).
respawnDialog = 0;
// Respawn templates from CfgRespawnTemplates. You can combine any number of them together.
respawnTemplates[] = {"Counter","Base","EndMission"};
// Side specific respawn templates. When undefined, general respawnTemplates are used instead.
respawnTemplatesWest[] = {"Counter","Tickets"};
// 1 to respawn player when he joins the game. Available only for INSTANT and BASE respawn types.
respawnOnStart = 1;
// When 1, the score table contains score of all playable units as opposed to players only.
aikills = 0;
// ====================================================================================
and add tickets (2 for testing) in init.sqf
//Add Respawn Tickets
[west, 2] call BIS_fnc_respawnTickets;
Hmm, I don't typically deal with respawn tickets, so I'm not sure. Pennyworth really knows his stuff and would probably be one of your best bets.
Yea, I just dont get why it wont call EndMission
that post I left above, I have tried switching things around with both the global and side specific templates, but it just doesnt work.
respawn counter just goes to --:--:-- and no end mission is called.
so, its obviously detecting the tickets properly, and I can see it drop from 2 to 0...
It sounds as if the tickets aren't linked to EndMission
They are, I've used that way to end a mission in 1.60
Is the side you are ending blufor?
correct.
Or trying to end
I want mission end when blufor exceeds respawn tickets,
Maybe try throwing endMission into respawnTemplatesWest?
I only tried it quickly and don't remember what I did in 1.60
like how?
I ended up writing my own respawn menu and system
respawnTemplatesWest[] = {"Counter","Tickets"};
Try adding the EndMission tag in there maybe?
Or they could've broken it with 1.62
My testing was in 1.60
I have tried that unfortunately.
Hmm, odd.
I know it definitely worked when I tried it. I believe I only had that though and respawnTemplatesWest
Mine is a PVE mod though
So no need for anything else
Definitely could've been something that was broken in the update however. Hopefully someone else can be more helpful
hmm, I will test with just templateswest real quick and at least rule that out
respawnTemplatesWest[] = {"Counter","Tickets","EndMission"};
Any luck?
crosses fingers
Lol
Hmm, odd. Could be something bugged. I can try it out when I get home myself and see if something's weird.
here is other funny thing. There is literally a new module for this in Eden under Modules>Scenario Flow>Respawn Tickets..... however, when a side exceeds their tickets it says "Your side has won" which makes no sense at all. At least it ends the mission though....
Maybe try not adding the respawnTemplatesWest tag and doing just the default respawnTemplates?
Rule that out as well
trying that now.
You could hack it together with a trigger and an end mission module possibly?
Have the trigger check for respawn tickets and when it's 0 end the mission
That's a really ugly way to do it
But should work
yea, would have to have it check and trigger end or lose... dunno how to write that check though
trigger condition
No luck with the respawnTemplates only?
checking now.
respawnTemplates[] = {"Counter","Tickets","EndMission"};
lol does exact same thing.
--:--:---
it is still subtracting tickets properly though, just no EndMission
Ok well it definitely sounds like something is broken
As far as the trigger
Or wait
A better way would probably be in the onPlayerRespawn.sqf
Depending on when it fires
When the tickets get to zero what happens?
nope
Ok well with the trigger
You can use something like
You can check the tickets with [] call BIS_fnc_respawnTickets;
And make the trigger fire when it equals 0
ok so noob question, how would I put that into a trigger condition...
what would it look like
Sync the trigger to an end mission module and when it fires it will end the mission
yea but what to put with [] call BIS_fnc_respawnTickets;
@blazing zodiac Greatly appreciate your help btw... this has been killing me for two days lol
You can actually just start a loop in sqf
So somewhere in your init or wherever else
_remTickets = []call BIS_fnc_respawnTickets;
if (_remTickets == 1) exitWith {
"end1" call BIS_fnc_endMission;
};
sleep 1;
};```
A few different ending options there
waiit
don't use that one
xD
this loop will not affect performance?
It should be very minimal
A better way would be in an event handler
But that may not fire when you have no tickets left
I'm not sure
And can't test as I'm not on my Arma machine
okay, let me try this scripted solution in init real quick
Also a repeating trigger is basically a while loop that fires every 0.5 seconds
Where are you adding the number of respawnTickets?
init
Ok just making sure
added 2 for testing
West, 0 as params to the remTickets fnc may work
Unless an empty array defaults to missionnamespace, 0
[] call BIS_fnc_respawnTickets should return the number of remaining tickets
But who knows
Gotta have him check with it after they are added
literally says -1
the hint is -1?
Well that's weird
yes.
You are adding that after you add the respawn tickets right
[west, 2] call BIS_fnc_respawnTickets; in init
launch mission
Run hint str ([]call BIS_fnc_respawnTickets) in game debug
returns -1
Yea it should check for _remTickets to be == 0
But it doesn't matter if that function isn't working
and it needs to breakout
once firing endMission
You need to exitWith that loop otherwise it'll keep looping
yea, no worries
Unfortunately if that function isn't returning the number of tickets it doesn't matter anyways
[missionNamespace] call BIS_fnc_respawnTickets;
try that
inside of the hint str
running this on debug console, nothing
hmm
not even -1
thats a feature.
Maybe try a fresh mission with only that in it to rule out anything else?
Oh wait are you checking in multiplayer?
its funny that when the eden module for this reaches 0 tickets it ends the mission with "your side has won"
In single player it may return -1 since there are no respawns
no im testing in MP
yea, the respawns work, it subtracts the tickets
and when they reach 0... timer stops and all respawns disabled
--:--:---
but no end
You could look in the BIS_fnc_respawnTickets function and see what would cause it return -1
And see if anything jumps out at you as fucked up
I wouldnt know where to begin
In the functions viewer next to the debug console
ah ok
You can see all the functions
lemme take a look
just look for respawnTickets
Returns:
NUMBER - remaining tickets after adjustment (-1 when no tickets were defined yet)
hmm
You are adding the tickets in init yes?
Try adding them in the debug console
Before running that hint
ok trying now
sorry, just run
[west, 2] call BIS_fnc_respawnTickets;
as global exec on debug?
still -1
yea, it seems to be adding the tickets but also not lol
Possibly why your menu template is breaking as well?
Next step for me would be to set it up on a fresh mission with no mods
To rule out any variables
-1 is feature
If it still is broken on a fresh mission with no mods it's definitely time to report it to the feedback tracker
yea, i mean its for sure broken
return value is -1, but if i hit abort on mission I can see I have two left
where else would it get two from
True
Sounds like the best next move
Sorry I couldn't be more help
Gotta get back to work though
Good luck man!
@tough moth You only have one side that has respawn tickets, right?
yes
if you're still in game you should try to put this in the debug console's watch tab: BIS_fnc_respawnTickets_valuetotal
I opened up the function and did a check, if everything works proper then that var should return 2 (total amount of tickets)
there ya go
[missionNamespace] call BIS_fnc_respawnTickets; returns -1 tho
ok, so how do I make EndMission when tickets get to 0
let me modify hound's loop a bit
roger
while {true} do {
_remTickets = []call BIS_fnc_respawnTickets;
if (_remTickets == 1) exitWith {
"end1" call BIS_fnc_endMission;
};
sleep 1;
};
xD
while {true} do {
_remTickets = []call BIS_fnc_respawnTickets;
if (_remTickets == 0) exitWith {
"end1" call BIS_fnc_endMission;
};
sleep 1;
};
also if you surround code with 3 ` it comes out in the code blocks
code here
3 of those before it and 3 after
@blazing zodiac BIS_fnc_respawnTickets_valuetotal returns correct 2 tickets
great
{
while {BIS_fnc_respawnTickets_valuetotal != 0} do
{
sleep 1;
};
"end1" call BIS_fnc_endMission;
}; ```
there's various ways you can do this tbh
you could even set up a trigger
that'll run non scheduled
Yea there is
in fact perhaps you should
trigger is better than loop
trigger condition is checked non scheduled every 0.5 secs
so
in condition place: BIS_fnc_respawnTickets_valuetotal != 0
It running nonscheduled is definitely better
in activation put the endmission thingy
trying now
make sure you don't set it repeated ๐ you wouldn't want that
do you have respawn defined because if you dont it wont work
I just tried and it works
I literally just put BIS_fnc_respawnTickets_valuetotal != 0 in trigger condition
oh wait
hint str ([] call BIS_fnc_respawnTickets) this will return -1 always not sure whats with that
you want it to equal 0
Hey it's late night over here in EST
it's like 1pm here but I woke up half a hour ago (shame)
I've made more mistakes then I'd care to admit already in this series of "help"
should I still have
respawnTemplates[] = {"Counter","Tickets","EndMission"};
in description?
Yea I think you need that for the menu to come up at all right?
I'm not 100% on that
counter, yee
I only used the menu once
ok, lemme try this trigger condition.
@tough moth are you testing in SP editor or MP?
MP
Lol I said the same thing Sanchez at one point
Alright I really gotta run now though, gotta finish up some work and go home to sleep. Good luck Vegas, sounds like we're on the right track now.
@west lantern is that with respawn module or with respawn on custom position and a respawn_west marker?
respawn module, and... let me send you the mission
@blazing zodiac Thanks brother. Have a good one!
with my current setup, and BIS_fnc_respawnTickets_valuetotal != 0 in trigger condition, it ended the mission immediately.
That has to be changed to == 0
yeah man we said that earlier ๐
lol is ok
no "!"
ah
just valueTotal == 0
ok trying again xD
== is read as "is equal to"
!= is read as "is not equal to"
Just for future reference
@tough moth https://www.sendspace.com/file/5ognog
I see
yea if this doesnt work, will take a look at your module solution
Well if that's the actual system working it will be better then an extra trigger
So I would try that either way after
note that it seems to work for players only not for AI
You can play with different end mission types as well
so i have it currently as a trigger condition
to use other endings, where would it need to live?
just on activation?
yea
Not sure to ask here, but is anyone here particularly good with Arma 3's ropes (already asked Duda, no reply), EG: making something like a hoist for instance
Oh man, I messed with ropes a bit a while back.
@blazing zodiac @thin pine @west lantern Thank you so much guys!
They are certainly finicky
yeah, ropes are not easy to do
No problem @tough moth That's what this channel is here for.
I've attached an offroad to an ammobox with a rope. That's everything I've done rope wise ๐ (setMass is useful fyi)
Is that how you disable the "E-brake"
I tried towing another vehicle
But it had it's damn parking break on
setMass could perhaps be used for that yeah, but it'll still have this brake unfortunately
aah rip, stupid parking brake
You could probably create a towing script by making an invisible AI driver drive the car while you're towing it
im planning on using a rope for a hoist not to tow anything
dayumn duda would be the perfect guy to contact :/
its for the HH-60G from the USAF mod (and possibly for the CV-22)
yeah, got no reply from him
๐ฆ
:/
nothing's stopping you from looking at how duda did it. If you can find out how he attaches folks to the ropes (afaik he actually doesn't, he said the ropes are purely cosmetical) and use that system to automatically winch people up then it's doable
yeah, ill have a look. Thanks!
Hoist could work fine
afaik the rope segments are stored somewhere. so duda might be just doing per frame movement interpolating fom one segment to the next. just guessing
Hey, anyone know how to get an array like ["something",3] when we have ["something","something","something,"] ?
Hum
Let's say I got a very complicated script and need the script to run fast. Would FSM get the job done, or do you think it would be more efficient to run my code outside the engine in a DLL (C#)?
I want in the other way so :
_myArray = ["9Rnd_45ACP_Mag","9Rnd_45ACP_Mag","9Rnd_45ACP_Mag,","30Rnd_762x39_Mag_Tracer_Green_F","30Rnd_762x39_Mag_Tracer_Green_F"];
and I want to count like :
_myNewArray = [["9Rnd_45ACP_Mag",3],["30Rnd_762x39_Mag_Tracer_Green_F",2]];
Yup
Ok thank
i realy hate the name "hash" in the case. its more of a Dictionary than a hash
he just wants to convert the array, he doesn't have this yet: http://cbateam.github.io/CBA_A3/docs/files/hashes/fnc_hashCreate-sqf.html
I know he can create. The wiki is pretty self explanatory. CBA has an excellent wiki. If you need more help or have more questions @elfin bronze, let us know
Yep, i want to made a listbox to list allMagzines from player. So i want to list like :
4x MagazineA
3x MX
and not like
MagazineA
MagazineA
MagazineA
MagazineA
MX
MX
MX
gotcha
So I Do some pushBack to get an array with all player's inventory and made listbox with that
My english is so bad omg
I don't think a hash is necessary, but I'd be interested to see the performance comparison. Do you want it to return an array of the type and the count for every unique type or only duplicates of one specific type that you specify?
private _array = [[], []];
{
private _id = ((_array select 0) find _x);
if (_id == -1) then {
(_array select 0) pushBack _x;
(_array select 1) pushBack 1
} else {
(_array select 1) set [_id, ((_array select 1) select _id) + 1];
};
nil;
} count ["9Rnd_45ACP_Mag","9Rnd_45ACP_Mag","9Rnd_45ACP_Mag","30Rnd_762x39_Mag_Tracer_Green_F","30Rnd_762x39_Mag_Tracer_Green_F"];
private _arrayNew = [];
{
_arrayNew pushBack [_x, (_array select 1) select _forEachIndex];
} forEach (_array select 0);
testvar = _arrayNew;
```
did this for now, might be quicker ways, but wasn't sure
doing a count on unique types didnt seem to be faster so w/e
@native hemlock i want to count each type. @austere granite thank its work perfectly !
There is actually a BIS function for this that KillzoneKid optimized called BIS_fnc_consolidateArray.
The full version can check for duplicates of nil, but in short it's this
_items = ["9Rnd_45ACP_Mag","9Rnd_45ACP_Mag","9Rnd_45ACP_Mag","30Rnd_762x39_Mag_Tracer_Green_F","30Rnd_762x39_Mag_Tracer_Green_F"];
private _cnt = count _items;
private _ret = [];
{
_ret append [[_x, _cnt - count (_items - [_x])]]
} count (_items arrayIntersect _items);
ah yeah arrayIntersect is dank, always forget about it
Anyone had experience installing IgiLoad?
I put
[] execVM "IgiLoad\IgiLoadInit.sqf";
in the init.sqf
but it says to add it to the vehicles initialization field
how do i install it with ArmaLife rpg 4.4r3
its says not to
// USE: //
// 1. In mission "init.sqf" add line: "0 = execVM "IgiLoad\IgiLoadInit.sqf";". //
// 2. In vehicles "INITIALIZATION" field type: "0 = [this] execVM "IgiLoad\IgiLoad.sqf";" //
in the changelog.txt which had use instructions
odd, says otherwise in their forum post
@here Heyho, one short question: Is there a weaponholder, which gear can't be accessed. So that you can spawn a item but you can't pick it up.
@indigo snow nice thx mate
Hallo @tender root
I notice the AI doesn't care that thier own kind is dead. Is there a script that allows them to react to dead friendlies?
Hi, Does anyone know the animation door state for the new Hotels front door? ''' configfile >> "CfgVehicles" >> "Land_Hotel_02_F" '''
cursorTarget animate ["door_1_rot", 1]; Doesn't open the double door
@little latch That's because it's called Door_1A_rot
That's the naming convention they use for double doors usually
Alright, Didn't have much experience with the doubles โค
If you are looking at an object you can get a list of animations that you can use with the animate command from doing
copyToClipboard (animationNames cursorTarget joinString toString [10]);
It's not that useful in a case like this, but the newer command animateSource can be better https://community.bistudio.com/wiki/animateSource
To get a list of sources you can use animateSource on you can run
copyToClipboard (((configProperties [configFile >> "CfgVehicles" >> typeOf cursorTarget >> "AnimationSources", "true", true]) apply {configName _x}) joinString toString [10]);
I'm creating a mission in which if the AI detects the players they fail the Task (Complete Mission undetected) Not sure how to make this work?
Sorry wrong Channel
Im doing some dialogs and i have one button that will be a ON/OFF function. How would i go about doing that?
To add to that i dont want to close the dialog. I want to toggle onMapSingleClick "player setPos _pos" on/off.
Thats just enable or disable the button? @jade abyss
Yep
In any other case ->
Button to enable/disable (not disabling the btn itself)
onClick="if(MyBlockVar)then{MyBlockVar = false}else{MyBlockVar=true};";
In your Script ->
if(MyBlockVar)then{player setPos _pos};
Cmon, wasn't that hard, hu? ๐
Ha ha yeah well i'm learning so its hard for me. No past scripting experience at all ๐
... i hate Arma.
Overall CPU: 0-1%.
Restarted -> 7x 0-1% - 1x 50%
wth?
wow
Okay... something is RLY Broken in Arma!
I removed an outcommented line -> It works again oO
//{ _x setDamage 1;}; }forEach (nearestObjects [_SpawnMarker, [], 50]);
Back in -> Broken again.
stop creating infinite "spawn marker" objects?
Its not doing it?
My own Stuff, maybe?
exactly. and there is your bug too
oh commy... just stfu
I remove that outcommented line -> Server runs fine. Adding it back in -> (I repeat: That line is commented out) server is fkd up again
shrug, but there is a curly bracket missing
Does not, but okay.
Even when -> //
It shouldn't even consider that line
Now running on 1% again. This game is confusing me over and over again
maybe you loadFile that file instead of preprocessFileLineNumbers
maybe you escape the newline in the previous line
maybe it's part of a string by accident
who knows. And there definitely is one more closing curly bracket than there is opening ones...
fml... 2 Objects collided with eachother...
physx
On the other side of the fkn map...
Seems like, sometimes they "pushed eachother" away, sometimes not...
Yeah
Funny thing is: Each time i uploaded the the File without it -> They kicked eachother away.. except for the last 3 restarts... then i took a look at it by accident... wow...
Noticed the 2 are beeing spawned at the same Pos -> Insta ServerDead.
Yeah, PhysX is nasty
spawned with CAN_COLLIDE flag?
Nah, old way
"Type" createVehicle [0,0,0]
bla setPosWorld [here];
Or in this case -> modelToWorld
iirc it was faster
setPosASL is the fastest
Wait, lemme search that, there was something in the perf log.
but yeah. setPos'ing two physX into each other will cause massive collision overhead ...
Yeah, haven't seen those tards... i was on the other side of the map
doesn't matter
Similar to PositionASL, however z is measured from the sea level to the the model centre [0,0,0] of an object, rather than transformed boundingCenter or land contact vertices.
Yeah, World should be faster then.
Although I don't see why you would use the model center
Yeah, read that that.
Random positions possible with different SpawnPoints, but same Units, different StartPos
It's not the setPos'ing anyway. It's collisions. The only way seems to not spawn them into another
Wait, this was caused by units colliding? Or actual vehicles?
yeah. units don't have physx
At least!
I don't want to imagine, what would happend on the Servers then...
Insta BBQing the Server
Probably the same thing that happens when you pile up corpses
Because those ragdolls are nasty too
Yeah, nice too look at, but .... meh. I could live with the old animations.
Although I noticed that the slowdowns due to that happen mainly to me with my sub par graphics card
2011 AMD thing for laptops
Uh fk
hahaha
my bad
And i just ordered a 6700k as DevServer for my home^^
I feel bad now
(1st world problems)
it's called 6850
6850M
: P
(I have no idea what these numbers mean, M is for laptops)
This machine probably ran 30k hours in the last 5 years
still working
best buy ever
That was my thought, when i scrapped my PIII-1Ghz "some" years ago.
Hallo
dont create stuff at [0,0,0] - its dangerous
I heard they eat children down at [0, 0, 0]
Hey, it's possible to modify an LbAdd on listBox ?
On the start of my script i do _ListBox lbAdd format ["%1x %2", _value, _displayName];
I have made a script to delete 1 items of the listbox. I Want to rename the item of the listBox on each delete items like :
Start = 2x MX
When player click on the delete button (on selected items) the list box update : 1x MX
https://community.bistudio.com/wiki/User_Interface_Event_Handlers Assign one of these to the listbox control. Create the function that does what you want to do (not sure what you want from how you described it, just make sure to use disableSerialization) Use the EH to call your function. The EH has to be created every time the dialog is closed and re-opened.
or just update variables with script in the delete button's action=""; field, and make it close and re-open the dialog with: closeDialog 0; createDialog 'your_dialog';
I'm not too practiced with UI. the commands you want might be lbSetData or lbSetValue. https://community.bistudio.com/wiki/List_Box
Hum i think i'm gonna do the second method : recreating the dialog ^^
yeah, much simpler
Yep thank
np
just make sure to use disableSerialization
Voodoo. You only need to disable the serialization if you store CONTROL or DISPLAY type in non-array variables if you operate in the scheduled environment.
I see no reason why a UI script should ever operate in the scheduled environment. All it would do is make the UI extremely sluggish.
for fun?
yeah me too, the number is 0
hahahahahaha
what the fuck
like anyone uses that
hint: it's at least 3 times the size using multiple while loops
no, no they simply don't
what's the state of BIS revive btw :p
no they dont work better they work worse
how the fuck do you think sleep / while works ?
also, scheduled can exit at nearly any scope which is mildy infiuriating
you do realise scheduled is actually heavier on the framerate than unscheduled, right ?
no, i'm not.
https://cdn.discordapp.com/attachments/173543220582547456/182914045395861505/RespawnScreen.gif
this UI only use PFH and have massiv Dynamic Elements and run 100% faster than it would with spawns
and not he is not joking he is right
that's retarded
you dont need to do it on each frame
not only that but in unscheduled the loop would stop itself
you can not move that fare in 1 frame
oh wait, why the fuck would you use a PFH / onEechFrame for that :facepalm:
I'm so sorry
By sluggish I meant that the scheduler stalls the execution of the ui script.
If anyone remembers CBA keybinding before Nou changed it to unscheduled
It was unusable, because the menu took half a minute to load in MP with low FPS
Now it is opened in milliseconds
I mean the menu where you change keybinds
the command itself should be fast. and the script should be faster after the command too. You drop the overhead needed to get serialization to work. which does stuff at least every time the scheduler changes the currently executed script
every local variable must be serialized when the scheduler changes the current script
why would it? all it does is make the script not load again after loading a savegame
well, "efficiency" would mean that you can get more stuff done in less time.
I don't see how the scheduler helps there. Overhead for serialzation, overhead for measuring script run time after every command, overhead for additional variable-is-defined checks...
I wouldn't call that more efficient. It's a way to prevent beginner from tanking the game by actually executing nearestX every frame
here is one we can all agree on
the best script is the one that doesn't run when not needed
event handler
I don't see how
rolf
I can't tell if you're trolling right now
why the fuck would you EVER do that
that's just awfully bad design
I can believe that
that's just stupid design
Because handle damage fires 15 times per bullet
:facepalm:
or, how about saving the gear when it's necessary? like, for example, when the dude is actually getting downed ?
When did you need the gear info? Why not use killed if it's for example for respawn?
See that is the problem. With that code you execute your getGear function every X seconds
With the actual event handler you execute it twice per 2 hour mission
killed has been in A1
it's just awful design in the first place, doesn't matter what year it is
But I think alganthe can agree that a PFH that records the gear every X seconds would be equally stupid
it's simply terrible design either way
unscheduled / scheduled doesn't matter in this case
because it's simply retarded.
Yes. Exactly. My point is that a PFH is not the replacement for while true polling loops like this.
It's just as bad
bad design is going to be bad design, but it's harder to produce death loops with unscheduled
damn words
not going to be soon tm
I know that I&A 3 is at least going to switch away from it (mission is badly written but at least there's that)
I let them take some stuff that I wrote
gear limitations (arsenal blacklist) and revive
my garrison function too, (also present in mars)
dude, btc revive forces me to die once then die again when I press respawn
what is solid in that
not only that but in the tests that we ran with 60 players mine works better, the users didn't even notice a difference
doesn't the BI revive do the same thing? kill you twice?
nah
or was that patched?
they updated it
k
reviving .... vehicles??
oh, yeah. I know that bug
but you already have a corpse if you die once. why need 2?
that's because BIS coded revive like arse
surprise surprise
you don't need a corpse in the first place
because the guy can just be forced to ragdoll through setUnconscious if he's not inside a vehicle
inside a vehicle I just play the death animation
setUncon is not a ragdoll
too many indentations 3/10
forceRespawn player
Your hd will kill me if I kill my previous avatar after selectPlayer
waiit, people use selectPlayer ?
I was looking at algathes script, Quik
waiit, people use selectPlayer ?
they could. wouldn't break ace at least
I could add an isPlayer check but that's such an edge case that I won't bother ๐
or use the _unit variable and avoid player like the plague
player can change during a script (especially in scheduled)
unit returned
from the previous unit to the current unit
respawn, selectPlayer, teamSwitch
also, most of the time I want my script to work with Zeus remote controlled units
So I don't actually want player
I want "MyUnit"
the current avatar
Quik, it's ACE_player in ACE
or call CBA_fnc_currentUnit I can't remember the full code. It's a one liner with a obscure BI variable
cameraOn would report the vehicle you are sitting in
or the drone you control
not what I usually want
It's all bad design by BI and everyone has to find ways around it
or ignore it and blame BI
But people wanted zeus support badly back in AGM
omg, please stop with that
the war flashbacks
refuses to use zeus
almost as bad as items in the arsenal
that is problems you don't have as mission maker I guess
dammit. I searched for the reason why the unit test for cba diagnostic fails
and the reason is that it tests the fail function
[CBA] (diagnostic) ERROR: Assertion failed! File: x\cba\addons\diagnostic\test_assertions.sqf Line: 20
Checking ASSERT_DEFINED() is output correctly
facepalm
whoop whoop
I find that zeus cripples server performance and doesn't really give any better missions ;)
True, but its what 9/10 zeus are not great zeuses.
cue in a dude who thinks zeus needs to "win"
9.99/10