#arma3_scripting
1 messages ยท Page 488 of 1
Yeah, unfortunately I ainโt bored or have time, but I will keep it in mind in case I do ๐
@coral lynx What do you think you're doing ?
Please some mods delete the link @coral lynx posted
why so?
lmao
wait a sec
@long gale ici
remonte un tout petit peu
@still forum Please, could you delete the link he posted ?
the link you posted contain script that The Programmer are selling rn
but Im pretty sure you know it
tbh the code is the most confusing thing I've ever seen
๐ฟ @compact maple just to note: Dedmen is no mod ๐
lmao
I got that from my friend, i don't know whos selling it.
And why do you sell arma stuff, is it legit?
This is legit, BI allow it. Its like an enterprise, this is just stolen stuff
and you guys come here as if it was ok lmao
what? where is that allowed?
source code can be sold as much as you want
in the end, it is just source code
however ... arma is some fairly open platform ๐คท
its protected
to me personally, those scripts feel like cashgrab
most of them are
you cant just do what ever you want
there was a post around my service that this is not legit, hows your legit now?
show me the license in the code
there is none
everything else is up to who ever bought that code
and it is down to the-programmer to hunt his license abusees
though ... as a matter of fact
he sells mission scripts
if i download a mission ... i already can use his stuff as some random user
which means ... all of this is utter stupidity
Im up to delete this link anyways, if it's shared from some developers leak, but still i just got that link pmed to me from the @coral lynx
so its kinda public already.
Also this dude is doing some weird mind games on my PM.
@queen cargo this is exactly what im doing
hehe
this dude is totally retarded
Im also interested where is that legit?
so you are the-programmer?
and here comes the fun part in that mail already which is why all that selling scripts is bs
"prohibited to sell product created with our software"
the moment this all runs through armas mission pbo packing stuff or any pbo packing tool, everything is literally free-for-use
@unborn ether @compact maple https://hastebin.com/uqumuforuq.cs how that yours, if I have it?
that is why "stolen mission" is garbage too
you cannot steal a mission
it gets transfered
you can missclaim credit
but that is all ๐คท
https://www.the-programmer.com/?page_id=28 -> article 9
He still believes you can sell arma legit. lol.
I wasn't even thinking about legit base when I was doing stuff.
because it can't be legit. Unless you sell pure code or smth, that was stated in my case.
My point is I don't like how you scream about "legit"
you just posted stolen stuff, please
All elements of the site -programmer are and remain the intellectual and exclusive property of the company. No one is authorized to reproduce, exploit, sell, share, or use for any reason whatsoever, even partially, elements of the site that are software, visual or sound. Any single link or hypertext is strictly prohibited without the written consent of the company. you mean this tiny thing here?
as i said: up to the specific abusee
but when it is supposed to get packed into some mission, that part already is stupid and literally all missions using code of that are illegitimate if sold under those conditions
@compact maple And how "big" you think, life shitcoders are
@queen cargo this is not client side
https://bitbucket.org/defectivehacker/theprogrammer-v1.0-source/src/master/Iphone_X/
clientside ...
or you wanna tell me dialogs are now created on the server and streamed to the client?

thats the older version
just normal ๐ฟ time @verbal saddle
thank you for deleting that repo btw
This is fun to watch @queen cargo
๐ฟ
idk why you guys are trigerring
im just saying people are working
they got their stuff stolen
and this is ok ?
always hated those selling scripts anyways ๐คท it makes fun to break those scripts
make your own version then just release it.
^
When my shit got leaked, I've just made a new one. Because I can.
Because I can create content.
nah ... it is fairly useless to write the scripts they sell and ust shove them out for free ...
people do not find that stuff who buy those scripts
and most of the bought scripts are straigth theoretical license scams anyways
^ not even going to refuse that
@verbal saddle Actually pretty good idea, write own substitute and give it away for free if someone selling it annoys that much
^again
I did that with a camera script. Only took like 30 minutes.
I wouldnโt, it doesnโt bother me
I love how people scream about their work leakage, meanwhile they are taking other people work to sell it after.
When I see something leaked from me, well, im just getting over it. Since anyways it was not legit to sell it, or hide it.
I would be proud if sb. finds my stuff worth to share
๐ฆ but nobody will ever...
๐ข
@unborn ether ?
@frigid raven Times might come, raise you spirit, soldier.
vanishes in a mist
wtf where is he? WHERE IS HE GONE
@compact maple What link? and if you want a moderator maybe you should call a moderator instead of me.
Also.. https://discordapp.com/channels/105462288051380224/105462984087728128/493755063244685313 English only. Please read #rules @compact maple
I've been trying to get this to work for hours now, but still no luck. Can anyone take a look at this script? I drop it in the respective vehicle init in the editor. It's just not ejecting non 'pilot' units, however, it is showing the hint. Any ideas?
might be executed locally
[_unit, ["Eject", vehicle _unit]] remoteExec ["action", _unit]
@still forum I tought you were a mod my bad
So remoteExec asks the server to execute on the player's behalf? I'll give it a shot. Thanks.
yes. that remoteExec line executes the code on the machine that owns _unit
@compact maple don't mix up mod vs hot
It is in init, EH exists on every client @still forum
Maybe this is the problem
what do you guys think?
Action is supposed to be global, and we all know never put global commands in unit init
I think that just about everyone besides commy in that thread is an idiot
lmao why
I don't know... Ask them why they say wrong things
i've said that
Well :
5:19:10 Suspending not allowed in this context
This mean that you're trying to suspend a script within a CALL, you must SPAWN the script to get it working.
Yeah..
but thats half the truth
that moment when you try to help people with the few knowledge you have and commy+dedmen slaughter you lmao
well I hope the guy will get his script working
I never read arma reddit before lol
commy+dedmen slaughter That's when you really learn
what if Dedmen slaughtered commy and then made him banned
Take my knowledge or die!
Reddit... ๐คฎ
question for anyone fluent in ACE here; what variable are the default loadouts stored in for ACE arsenal? I know you can set them via EDEN editor, but I'd rather set them by adding them to the variable directly
I know where to find the arsenal thing. But busy right now. I'll reply later if noone else does till then
i might have found it
ace_arsenal_defaultLoadoutsList
and its in UInamespace right?
normal mission space as far as i can tell
i litterally just found that part too @digital jacinth , but thanks for the help!
btw I figured out a way to easily adjust relative rotation:
https://pastebin.com/BD8eUdj6
much simpler than what I was trying before
don't know why I didn't try using the attach command sooner
also this could still use a bit of cleaning up obviously but this works
Does someone know where id the script code of virtual inventory and declaration of hpp ?
In which pbo
I have a vehicle named tecVic, im trying by script to remove hes variable but the wach section of the debug console still there, here is a exemple
cursorObject addAction ["die variable",{_this = nil}];
though, if I put on the debug console cursorObject = nil then it works.
Any ideas?
@rocky mortar explain? What virtual inventory?
and hpp files can literally be anywhere
cursorObject = nil then it works. no it doesn't
that's not how assigning variables works
_this = nil same. you are setting the _this variable.
I have a vehicle named tecVic so you want to set the tecVic variable? why don't you just do that then?
tecVic = nil?
cursorObject = nil ๐ค
because my scipt does not have especificly tecVic in it, its for any object that will call my fucntion
what happens when a vehicle get's passed to that that doesn't have a var name?
missionNamespace setVariable [str _vehicle, nil]
if it ALWAYS has a variable set
Although actually.. That doesn't error when it doesn't have a variable
And the fucntion is supouse to spawn a new vehicle with the variable of the old vehicle but not only I "do" set the variable and the cursorObject says that its name is testVic but alive returns false and the testVic returns <NULL-object>
here is a exmple
how do you set the variable when you spawn a new vic
tried with setVehicleVarName and by using _oldvehicle = _newVehicle when the _newVehicle is created
_oldvehicle = _newVehicle as I already told you twice. That's not setting variables as you think it does
that's setting the _oldvehicle variable
NOT the tecVic variable
if you want to set tecVic then you HAVE TO DO THAT
no pass by references eh?
every variable is passed by reference
So i need to manualy set the tecVic inside the script anyway?
But don't ask about that. That's probably too high for you and would only confuse you
ouch
The variable won't set itself if that's what you're asking
SQF script can't read your mind
It only does what you tell it to
and if you don't tell it to set the variable. It won't
So, how should I make so my script using local variables can set the tecVic to my new vehicle with out I have to manualy place it in my scipt?
that doesn't make sense
"how to do something without doing it"
How's that supposed to work?
well, I have 100 vehicles with diferent variables placed in the editor, I cant manualy put all their names in it.
Ah so you want to first read the variable name
and then set the variable by that name?
Yes
you said you tried setVehicleVarName so that means you already know how to get the variable name?
_newVehicle setVehicleVarName (str _oldvehicle);
missionNamespace setVariable [ <your variable name as a string here>, _newVehicle]
So..
missionNamespace setVariable [(str _oldvehicle), _newVehicle]
that probably
missionNamespace setVariable [(str testVic), cursorObject]
With the debug console it did not worked, testVic still dead and null
what does str testVic return when the vehicle is already dead?
"<NULL-object>"
if it is null... then str testVic will just return <Null-Object> and not it's name
and the original testVic placed in the editor is already destroyed and deleted
Well you need to get it's variable name if you want to set it's variable
you have to somehow store it before it get's destroyed
Hum... I just tested and the vehicle did not return <NULL-object> when killed
Well as I said.. You need to get the variable
if you can then fine. If not then you need to do something else
that was because the vehicle was deleted
the second method I tries was to save the variable as a string and then use _newVehicle setVehicleVarName _newVehicleString;
Well as long as you can get the variable name. The script I sent you will do what you want
Its does set the vehicle as testVic but alive says its dead and using the testVic name in the wach returns objectnull
here is a exemple
@still forum i talked about the virtual inventory of BIS ๐ or simple inventory ui in game
do you know where to find the pbo
what virtual inventory of BIS?
I don't know what "virtual inventory" is supposed to mean
@astral tendon you already told me that. And you already showed me that example. And I told you what to do
So, how do I get the variable of the old vehicle and then set it on the new vehicle?
@queen cargo Just imagine, that theprogrammer dudes we've been talking about managed to put down that public repo somehow.
atlassian surprised me a bit, gitlab should not fall for that ๐
Didn't we already talk about that?
While you have a valid non-null object that has a variable set to it. just str _objectVariable
@still forum press "I" key to show inventory : ))
Yes, and I already saved the tesVic in a string called _newVehicleString, what else I need to do?
So you mean the normal non-virtual inventory. some ui_f pbo probably exactly that. ui_f.pbo RscDisplayGear
@astral tendon scroll up. I sent you the code.
Look at my replie
lol
@still forum https://ibb.co/fEq4rp
thats what happens, I manualy put testVic there to check
So stop testing with null objects
You told me only testVic is nullObj as it's already spawned dead
and that the others work
so stop using broken crap and then being suprised why it doesn't work
ok
testVic is alive and is a truck on my right, still, could not change to the vehicle I am aiming at
but it says testVic == supplyRepairTruck
๐
and i Hit the local exec
so, it did not set my cursorObject as the testVic, testVic still the truck
You've set the supplyRepairTruck variable
so why do you expect that the testVic variable has magically changed?
Or, there is diference with the "=" and the code above?
I don't even know anything anymore
I gave you what you needed... I don't understand the rest
testing again and all though it set the tesVic alive returns true but cursorObject returns the model name of the vehicle, maybe needs another steep?
Can anyone tell what's that exactly about:
20:55:19 Warning Message: Bad vehicle type
20:55:23 Duplicate weapon Throw detected for C_man_1
20:55:23 Duplicate weapon Put detected for C_man_1
When operating with player gear.
but cursorObject returns the model name of the vehicle setVehicleVarName missing
missionNamespace setVariable [_newVehicleString, _newVehicle];
_newVehicle setVehicleVarName _newVehicleString;
SetVehicleVarName? Wow, we are talking some advanced shit here!
Now it worked
(โฉ๏ฝ-ยด)โโโ๏พ.*๏ฝฅ๏ฝก๏พ
though, for multiplayer scenario, do i need o remotexecc that missionNamespace?
oh nevermind, i see
you can add a , true at the end to make it global
it was the Alternative Syntax of setVariable
actually it's not a alternative syntax and the wiki is wrong but... whooo cares
missionNamespace setVariable [_newVehicleString, _newVehicle, true];
[_newVehicle, _newVehicleString] remoteExec ["setVehicleVarName",0];
Looks good?
https://community.bistudio.com/wiki/setVehicleVarName
Can you add a coment on this page that if some one wants to replicate the editor variable or pass the variable to another object it shoud use this:
_newVehicleString = (str _oldvehicle);
missionNamespace setVariable [_newVehicleString, _newVehicle, true]; //the old vehicle needs to still exist before it be deletd
[_newVehicle, _newVehicleString] remoteExec ["setVehicleVarName",0];
No..
Because that would be a lie
_newVehicleString = _oldvehicle; and that's also wrong
you don't have to delete something to be able to set a variable
Not everything on wiki follows the engine stuff exactly but sometimes it is better when command has alternative syntax instead of millions confusing conditions trying to squeeze into one, like ropeCreate, it would have been a disaster to write as one. @still forum
I was wrong, It means that the vehicle still need to exist, aka not be delted from the game
Still wrong
setVariable doesn't care.
And for setVehicleVarName it's obvious that null objects don't work
and it has nothing to do with either remoteExec or str
so.. no. I won't put that onto wiki
well nevermind, if some one can document about that issue for people that need to pass editor like variables around to other objects that would be good.
As long as you know what that code does. You already know that....
Sort of.
Did anybody of you kinda tried to manipulate ACE3 advanced fatique? I want to implement some roleplay features like have a better constitution and therefore have an overall better fatique rate
Why does this work (soldier animation)
this spawn {
_this disableAI "ANIM";
_this switchMove selectRandom ["Acts_CivilListening_1","Acts_CivilListening_2"];
}
while this doesn't
this disableAI "ANIM";
this switchMove selectRandom ["Acts_CivilListening_1","Acts_CivilListening_2"];
Both pieces are placed in init of the unit. Is it 'cos of timing of the init and unscheduled call?
2nd thing works if I call it from debug window later.
I guess it is timing?
answer is there > https://community.bistudio.com/wiki/Initialization_Order ๐
@frigid raven you can just do that by setting a few variables
you don't have to manipulate advanced fatigue itself. You just set a variable onto a unit to tell it to have more power reserves
https://github.com/acemod/ACE3/blob/master/addons/advanced_fatigue/functions/fnc_handlePlayerChanged.sqf#L45 here are the variables and their default values
QGVAR(x) -> ace_advanced_fatigure_x
https://github.com/acemod/ACE3/blob/master/addons/advanced_fatigue/script_component.hpp#L26 here are the macros
Ah thank you bud!
btw. is there a global variable to check if ACE3 is enabled? I'd like to have some polyfill if ACE3 is not available or something
Or is this possible with installed Addons by vanilla funcs?
ACE_Common
nice
I fucking love this
gonna make the best RPG mod ever - be prepared !!!!!!!!!!!!
kjeagnjksdgs
RPG - role playing game or rocket propelled grenade launcher ๐ค
wtf Rocket propelled grenade for sure!
You play the life of a RPG
from manufacturing until launch
k
I always wondered why RPG is so popular to merit tons of dedicated servers but you see people use them in KotH as well time to time
@still forum it seems it s not in this pbo, the gear interface is not the same
is it possible that standard ui inventory is in addon pbo or ebo ?
What kinda question is that?
That would be the third option?
Only the latest DLC's are ebo
did the inventory get added in a recent DLC?
I think you can answer that by yourself
Yes, standard UI inventory is definitely in an addon
Well I found the gear display
I don't know if RscDisplayGear or RscDisplayInventory? Or maybe FuturaGear? But it should definetely be in ui_f.pbo because.. like.. That's where UI stuff is..
njet
yes.. aliens
njet!
Team Green, secure the atmospheric reprocessor!
Preprocessor
posalujsta
@still forum thanks you i just found declaration in config.bin, i have to find script associated now
RscDisplayInventory was the right name
"script associated" what do you mean? what script?
all script that manage interface, reload of items etc
Just found this: http://www.armaholic.com/page.php?id=11655
Can I create a deticated server with it on my machine for testing purpose? Because I am tired to deploy the missions to my real host with WinSCP all the time etc. etc.
Just wanted to know really quickly if this tool will do what I wish for
alright got it
but hosting from inside Arma ... wont it make my player == server ?
like in preview?
so its better to use TADST eh ?
because I want to have the "real feel"
hope u get my point
you can certainly use it if you want yeah
My personal "real feel" is to start the server via command line without any additional tooling that I didn't make myself
You can run local dedicated server
oh - tell me more
On 127.0.0.1
or give me a guide to that pls - I want to make it the cool way like you guys do
There is server exe in the arma distribution, the rest is rudimentary
Maybe you can configure it with TADST too, never used it so no idea
That's what TADST does yeah
just a nice UI that will assemble the start parameters and write the config files for you
clicky-pointy
Hello. Do you know if there is a way to block user input inside the vehicle but let him to dismount or change vehicle position?
enableSimulation false?
@still forum yes i talked about how the item are reload, i dont understand why it s in engine
it is working only for whole vehicle for me
What is working for whole vehicle?
Are you applying it to the vehicle or player?
for vehicle because it does nothing for player
It will disable the whole vehicle obviously
Hi. What would be the best approach to script: If someone has been killed during a pvp mission, its slot disappear instantly in the lobby and he will be unable to connect. thank you
@calm bloom this is what you can do. Create dummy agent and player remoteControl dummy; this will disable controls but not action menu
interesting approach thanks
not sure it is fine for 200 player environment though
backup plan is to simply make screen black
That will work too or just eject the driver
yes we do that atm
play some animation on them that disables input
ive tried that
i am not familliar with animations, the one i copied from the endgame
player switchMove format ["Acts_AidlPercMstpSlowWrflDnon_warmup_%1", 1]
didint block the turret
And player changed its crew animation and appeared above the vehicle
what is the purpose of this anyway?
you would probably need to use a gesture if those work in vehicle
as switchMove and the like that play animatios do replace the current animation (sitting in a vehicle)
regular soldiers cant fly the helicopter and all that stuff
so what you are after is locking the pilot seat to specific people?
yep at the moment they simply cant get in specific position
one hacky solution comes to mind is setting fuel to 0 if person entering pilot seat is not the pilot
yep but there are different vehicles
something something he does know how to turn the fuel pump on or something
tanks, aircrafts with turrets and all that stuff
is there any real benefit for them being able to enter it and do nothing?
not really. Im rewriting the code anyway so may be tanks can transport people in combat and no magic disembarks is a bonus too
if a gesture can block input that might work
or the remote control was not a bad idea either imo
put in some chickens or something on the map that can are then randomly remotecontrolled ๐
Can anybody tell me how to copy the setup from the GUI Editor ๐
I pressed SHIFT-ALT-S but wasn copied to clipboard
Iโve never figured out how to work that thing
_newVehicle = cursorObject;
_magazines = getMagazineCargo cursorObject;
if (count (_magazines select 0) > 0) then {
{_newVehicle addMagazineCargoGlobal [_magazines select 0 select _forEachIndex, _magazines select 1 select _forEachIndex];} forEach _magazines;
};
Im trying to duplicate all magazines inside of a vehicle, tough, I cant duplicate hand grenaddes.
grenade laucher magazines and weapons magazines do duplicate.
If i remove the weapons and grenade laucher magazines then it duplicates the hand grenades magazines.
General practice, don't use _arr select 0 select 0, use (_arr select 0) select 0
the select _forEachIndex shows me you are definitely doing something wrong
you are iterating through the array you get returned
which always only has 2 elements
you probably want to iterate through one of the sub arrays
That script was not made by me, i did not even know what _forEachIndex does really.
Before coming here to ask questions, it's generally a good idea to know what your code is trying to do (which includes knowing what the commands you're using do)
Though, All I need to to is copy one vehicle inventory to pass to another, is there other right way to do that?
Dedmen has already told you how to fix it
That said, you aren't moving the inventory from one vehicle to another in that code
I know, im just duplicating it.
I'm trying to determine whether an aircraft has bombs on board. As far as I can tell this for example on a Blufor aircraft would have a B_BOMB_PYLON hardpoint on one of its pylons and could then use a getpylonmagazines to get the class to know what type of bomb. Am I on the right path or missing something obvious?
What is the proper way to add an action to a display button?
I found this https://community.bistudio.com/wiki/buttonSetAction
but it kinda looks deprecated since it says only .sqs allowed for the action script
Ah I just found ctrlEventHandlers
โญ
General practice, don't use _arr select 0 select 0, use (_arr select 0) select 0 @ruby breach that does not matters at all
All I need to to is copy one vehicle inventory to pass to another impossible to do completely.
does not matter*
Sometimes it does. Depends on what you're doing
As soon as you get to weapons with attachments you're goofed.
BEXP4;12;72198322242649744;
BEXP4;0;139922640589167;
VARIABLE;0;4;_arr
BINARYOP;5;6;select
NUMBER;12;1;0
BINARYOP;14;6;select
NUMBER;21;1;0```
for that case, never
problem starts when using other binary ops
In general practice, it's a good habit to get into. Although I agree, in that case irrelevant
more parenthesis are usually better. More readable and they don't hurt anything besides filesize
๐คท thats true though
Before he tries doing something later like ```sqf
_arr = [["class1","class2"],[1,1]];
_num = 1 + _arr select 1 select 1;
which btw. gets clear why this not is working when checking out this: https://community.bistudio.com/wiki/SQF_syntax#Rules_of_Precedence ๐
_arr = [["class1","class2"],[1,1]];
_num = 1 + _arr # 1 # 1;
```would work fine though
It's just SQF holding true to its motto of being consistently inconsistent
not really
select is a normal binary command
precedence 4
- is ranked higher
thus left 1 and right _arr are taken and passed to + which says "WTF?"
select on the other hand then gets the result of + because, regardless of what you do, it will always come after +
ohh extra: that thing would even evaluate to 1 + _arr getting solved first if select had the same precedence as +
the moment you understand all that is the moment when _arr select 0 select 1 - 1 select 15 / 3 - 5 select 0 select 10 * 10 + 4 * 0 - 100 would make sense to you
which btw. evaluates to ((((_arr select 0) select (1 - 1)) select ((15 / 3) - 5)) select 0) select (((10 * 10) + (4 * 0)) - 100)
_arr select 0 select 1 - 1 select 15 / 3 - 5 select 0 select 10 * 10 + 4 * 0 - 100
((((_arr select 0) select (1 - 1)) select ((15 / 3) - 5)) select 0) select (((10 * 10) + (4 * 0)) - 100)
You can safely chain select N command until you pop
No need for brackets
Operator precedence matters like in any other language, and it is not case of good practice or bad practice
@tough abyss https://community.bistudio.com/wiki/SQF_syntax#Rules_of_Precedence as already linked ๐
Ah there is page on wiki too
Is there a way to disable the ESC key so it will not close the Dialog UI ?
Or do I have to overwrite it's handler somehow?
Ok check
next question for my beloved ones...
_loginButton ctrlAddEventHandler ["onMouseButtonDown", { [getPlayerUID player, clientOwner] remoteExec ["X11_fnc_playerLogin", SERVER];}]
The two parameters actually are not delivered
why is that? Any special situation for buttons?
Orange box on EH page?
Yes
Yes
So... not working in scripts...
Is there a way then to deliver the player instance to the handler function then?
I am kinda confused right now
Donโt write on
use the MouseButtonDown eventhandler
I think orange colour is appropriate, I mean red would probably be over the top for it as it is informational only
Still would probably be more memorable
Obviously orange is too inviting.
AH lol
must be removed
I kinda overread it as is not necessary
what is the purpose of the on thingie then?
Had too many Xetra? Sleep calling your name?
on thingie is used in configs
maybe change that warning/info box color to... red ? ๐ค
(would not help much for those who can't read anyway... but...)
@meager heart That would throw off the sensitive people, claiming the wiki page attacked them mentally.
๐ fun train arrived it seems
fun train has no reigns.
Ok some question you brave people can make fun about incoming...
Returns the control, the pressed button, the x and y coordinates and the state of Shift, Ctrl and Alt.
So...
_loginButton ctrlAddEventHandler ["MouseButtonDown", { [_this select 0, getPlayerUID player, clientOwner] remoteExec ["X11_fnc_playerLogin", SERVER];}]
yields No control for the first param
Curious who of you smarties can explain that pah!
ok...
why you need that ? there is only one eh per button... aka can't be different controls when eh fires ๐ค
I want to close the friggin display when a button was pressed
my nooby way was to call the controlParent and displayClose in this face
params ["_control"];
ctrlParent _control closeDisplay 0;
yep
Ah meh I am mixing stuff up so often
closing your display. on someone elses machine doesn't make sense. as he doesn't know anything about your display
I guess remoteExec page need red box too
omg no it does not
M242 handing out the red boxes today.
Jeez asking stupid questions here is like I drinking dirty water in the desert... I have to because I have no other source but it is disgusting!
People need to stroke their egos Xetra. Nothing personal ;)
Hello good sirs, I have a question!
denied
I have an answer, let's trade
oi, any scripter around?
i'm trying to check if the player has a certain magazine in his inventory and then i want to know how many bullets it has
i can get a list of his crap via magazinesAmmoFull, but now i'm kinda stuck
Another question here
_object = _this select 0;
_object addAction ["Open Arsenal", {["Open",true] spawn BIS_fnc_arsenal}];
_object addaction ["bla", {}];
_object addaction ["bla", {}];...
}] remoteExec ["bis_fnc_call", 0, _something];```
so i add actions to an object during runtie via script
i thought they needed to be added on the clients, but if i use -2 in the parameter (for all eycept server), nothing happens
Is there a way to change the 3rd person view to be in front of the character ? I want to have a shot from the front of the cockpit but still be able fly the plane
and then if i put 0 in the parameter i think i would be getting the actions added multiple times, everytime someone connects?
@west grove No clue what exactly you're trying to do (because someone could have more than one of that magazine, etc, etc). findIf / select are likely your best bets
i just want to know the ammo count of the first magazin of a certain type in players inventory
i can check if the player has the magazine in his inventory via "... in magazines .." etc. but then i don't know the bullet count
(magazinesAmmoFull player) param [(magazinesAmmoFull player) findIf {_x select 0 isEqualTo "CLASSNAME"},["",-1]] select 1;
Returns -1 if nothing is found
nice. thanks.
ok, script works. time for sleep \o/
@proven crystal why do you think 0 will add actions multiple times?
This is not how it works
-2 will not add it on server, and on hosted server you are the server so it will not add it to you but to everyone else
0 will just add it to everyone including you
So the difference is whether you gonna have the action or not, the rest is the same
so with -2 it would work as it should if i host it on a server?
not from my computer i mean
i want to make sure that its also available for people who join late. last time i fumbled around with these functions i had the action popping up multiple times
might have messed it up somewhere elso though
so 0 would be my way to go i guess to have it show up for me and everyone else, wherever i host it?
You can use 0 and not worry about where you host it, as it will just be ignored on dedicated but added to all players
good good. and action will also show up for people joining late, because i have something in the jip part of things, right?
Yeah it will show for JIP as long as _something exists, if you delete _something it will remove it from JIP too
excellent. thanks
hey there again.after getting my vehicle locking problem solved (thanks to @cold pebble for his kind help) i thought iยดd ask here for my next task.i am currently working on an anti-backpack-dupe solution and i cant figure how to achieve this other than trying some code that removes backpack _x if theres 2 times the same when taking it out of a container or putting it in.is there already someone who solved this without having infistar?thought on this?
the removebackpack doesnt work btw
if ((isPlayer _x && _x != player) && (alive _x)) then {
_backpack=backpackContainer player;
_backpack_x=backpackContainer _x;
if(_backpack==_backpack_x)then{
hint "No Duping!";
removeBackpack player;``` thats basically the code block which should ( in theory,arma has another opinion ๐ ) do the job
So I've made a script to fold the benches on the hummingbird. I know the animations are fine, but does anyone know if it would upset battleye or typical server anticheat setups if I add a function to lock the bench seats when they're folded up so players can't sit on a folded bench?
What is typical server anticheat setup?
@sturdy cape backpackContainer is not the command you are looking for
this is what you want
why are you trying to use _x when you're not telling your code what _x is?
btw we have removeBackpackGlobal
_x Represents the current element during a loop with: apply, count, configClasses, configProperties, findIf, forEach, select.
you're not looping your code at all
you're just using if then statements
No idea what a typical anticheat setup would be. My main concern is if the lock command would be blocked
backpackContainer does what unitBackpack does, there is no difference @tough abyss
oh
huh, how about that
either way
that code is some serious spaghetticode
if you replace all instances of _x with player it might work
but as it stands arma has no idea what _x is supposed to be since you're using it incorrectly
or replace _x with whatever you're trying to run the code on
i'm not sure if _x works like that in condition statement
@rose hatch who knows, it is entirely up to the server owner/ mission maker
i don't believe missionmakers can change server's locked / unlocked setting, i think that's something only #loggedAdmin can do
or is it adminLogged
Not server settings
vehicle lock
No idea, that was the question
I don't have a frame of reference for what commands server owners typically block
imo blocking "vehicles locks" commands will just break 90% of missions with the vehicles lol
not sure about lifers
Good point
@tough abyss if you have serverCommand password or display is local to an admin then it can execute server commands like lock
good morning persons
@tough abyss
Its _x because theres an eventhandler "take" that fires the file and it should in theory pass object?
Also it wasnt the whole file.just the part in question sorry
Obviously it has a waituntil in front of this
Call is player eventhandler "take" Call (function Name of the stuff here)
[] spawn
{
while {1 == 1} do
{
waitUntil {!isnull (findDisplay 46)};
{
if ((isPlayer _x && _x != player) && (alive _x)) then {
_backpack=backpackContainer player;
_backpack_x=backpackContainer _x;
if(_backpack==_backpack_x)then{
hint "No Duping!";
removeBackpack player;
};
};
} forEach nearestObjects [player, ["IG_Survivor_F","DSR_Object_Storage_Small","DSR_Object_Storage_Large"], 10];
sleep 1;
};
};```
Will try the unitbackpack command
๐
what are you trying to do even
Well in result prevent players to use an inventory bug to dupe backpacks
dude, if you copy pasted that code from somewhere, better just forget about that place...
Its an idea ive got from a friend who normally is pretty skilled.i just turned it into a File.well how can i approach this?
while {1==1} has really bad smell to it
If I see this in script Iโm usually not interested in the rest
B.A.D. code ๐
I mean why limit yourself? You could go 123==123 or 1337==1337 for extra credit, right?
Lol hey.pROFLessionality right there @hollow thistle
๐
Well like i said its an idea.i am open for suggestions .thats why i am here right now
Do you have any proof that the duped backpack is the same object? I doubt this is the case but with numerous Arma ๐ ๐ ๐ it is not that impossible of a notion
if ((isPlayer _x && _x != player)
wut
@compact maple it just skips player so it can compare everyone else to player
it's only when 1==1
1 always match 1
what about true
What about 1 != 2
is there a command to force player respawn without killing him?
for round based game type idea
Like forceRespawn?
It still kills old init just no message
selectPlayer into some seagull or switchCamera to some object
Dunno about BIS fnc never used it
Iโd use switchCamera back and forth no need to kill player but you can make him an observer until his turn
How do you force someone to go spectator?
BIS_fnc_EGSpectator < with this yes, also check function file, there are no wiki page for it
iirc 8-10 params there + mode
is there a command to force player respawn without killing him?
you can create new unit (the same type) and useselectPlayermaybe
lol
Sjrr
Just do this
<style> player spectator </style>
That's just bullshit don't try that
Is there a command that i can make a windon apears in the player screen and he can copy the text on it?
@astral tendon You are talking about UI stuff. I started with that through this tutorial vid: https://www.youtube.com/watch?v=oLQkMyr98b8
If you grasped that part (took me a whole day) you can surely find a way to make the copy-text stuff possible
@sturdy cape Its _x because theres an eventhandler "take" that fires the file and it should in theory pass object? eventhandlers don't pass _x... so no?
while {1 == 1} wtf is that?
And the code you posted doesn't really have anything to do with a eventhandler...
Did you try that, that is actually what is happening? That both objects are the same? Because that shouldn't be possible.
{
if (_x == "Placeholder_Magazine_Type") then {
jet setPylonLoadOut [_forEachIndex, "SEAD_Missile_Magazine_Class", true];
};
} forEach getPylonMagazines jet;
Someone audit this for me please, I'm not at my computer and I just wrote this offhandedly and before I send it I want to make sure it works
actually i don't think i am selecting a pylon
first argument in array is the index of the pylon
yeah
so _forEachIndex
instead of _x yeah?
ye
{
if (_x == "Placeholder_Magazine_Type") then {
jet setPylonLoadOut [_forEachIndex, "SEAD_Missile_Magazine_Class", true];
};
} forEach getPylonMagazines jet;
thank
@still forum could you explain forEachIndex a bit? i don't really understand the magic variable documentation on it
well.. it's the index... that the forEach is at.
forEach's index.. forEachIndex
{
_x == _array select _forEachIndex
} forEach _array
almost-always-mostly-generally true
yo dawg
i heard you like indexes
i understand now, i believe
ah
actually yeah i get it
lol i get it too, never used _forEachIndex but thats pretty simple
can't believe i got nae nae'd with indices
i always correct people on that
but alas, it was i
just be glad you don't get trolled like me the whole time
I don't dare to ask any more questions tbh
why not?
if i stopped asking questions after i got trolled a couple times i wouldn't even know what SQF stands for
I... they hit me... ๐ฆ
show me on the FSM where they touched you.
lmao
@high marsh is the worst
oof
dedmen is not bad too
getting called out
SQF stands for something?
I thought it's just SQF.. And you pronounce it like "squiff"
Just trolling you m8 ๐
FSM is the most wtf thing i've seen on arma
but I like my "squiff" idea
FSMs are so fucking great
god
they make my dick the big dick
once i learned how to use them
what it can be used for ?
they are a visual representation of conditions and states
they can handle all mission logic
FSM stands for finite state machine
could you give me a proper exemple when I need to use FSM in my whole coded sqf mission
https://i.onozuka.info/i/7kiroczfk3.png this is one of the FSMs for a BI apex mission
let me try to find one of mine that you can see more clearly
cant read this xD
basically
FSM can handle everything
you write SQF into it
it's just a flowchart for the mission's logic
mh
you can have multiple FSMs in a mission but it's best practice to only have one, which is missionFlow.fsm
what type of action there is in it ?
missionFlow.fsm runs on mission init and runs globally unless you tell it to not run on clients which is easily done and is what i do
anything
anything you want to do can be done with FSM
like what, hint something, functions ?
yep
I dont get the utility, you can do this in SQF too
It's just used for flow.. Like.. you know a flow chart
yeah you can do everything a FSM can with just SQF too
but it's probably not as efficient and much less organized
for instanec
i made a mission for my group where i had waves of attacking enemies on a FOB
all the while, friendly outposts were randomly mortared
and were destroyed if the enemy mortar wasn't killed in time
is FSM procedural too ?
FSM is not a language
it's just a filetype
and during all this the friendlies had to leave the base, break through enemy attacks, and go capture objectives in adjacent towns and bring them back to base
i was able to cleanly do all of this with FSM
there's no limit to what you can do with an FSM
what do you mean what does it look like
you mean what does it look like when you're working on an FSM?
yes plus you said thats not a langage, so we write SQF in it
its like an actions vizualizer, with the order you want
yes it's a flowchart
๐
FSMs aren't widely used from people that aren't really into missionmaking
they have a bit of a learning curve
but i'm pretty well-versed in them
so if you ever have a question about them, feel free to ask
I've been working with sqf for years, never tried FSM, but assume I want to create a login procedure, like when the player connect, I'm running some query on DB, creating an account, etc, I could do this in FSM, better than sqf ?
or this is only and only for in game actions, like working with AI..
IMO FSM add's usually not-needed complication
I can see it for mission flow. Like walking between tasks. But besides that...
Just to point out you are all talking about scripted fsms
Because there are other kinds
what other kinds?
Some AI kind of kinds
I really dont need more complication lmao
that's true
what M242 is saying
about other types of FSMs
predominant use for us is scripted FSM, though
i think theyโre not widely used because the editor is crap
editor is okay
it's sufficient for me to do what i want to do
for framework
I used to edit fsms by hand when didnโt know there was an editor ๐
@compact maple if you donโt know when to use it you shouldnโt imo. if you have a flow that is hard to follow in code and should be visualized with potential forks from conditions based on priority, sure
i canโt count the amount of times Iโve emptied a transition due to some odd bug and canโt undo it
in the editor
You mean copy paste format bug? Still there
yeah probably. i stay far away from fsm nowadays
Yeah a bit awkward if you donโt know about it
people are slowly quitting A3, hope A4 will come soon ๐ฟ
Quitting? Why you say that?
Iโd probably use CBA state machine if I had the need
lifers hopefully @compact maple
Bc I dont see populated server like I saw 1 or 2 years back
oh you're talking about FSMeditor @tough abyss
yeah it does suck
but i guess it KINDA works
can it be worse than the BI ui editor ?
absolutely yes
lmao
None of the MANW 1 mods really brought any hype that brought in new players
They made life awesome for people who were already playing Arma.
But not really much that pulls new people in
Did PUBG win some?
win what?
Some prize
no
it didn't exist back then
And PUBG never brought anyone to arma. It probably even pulled some players away
what is MANW
Make Arma not War Competition
PUBG is a disgusting game
Acronym Definition
MANW Mediterranean Anti-Nuclear Watch (Greece)
oh ok
@compact maple wow isnt that a bit too harsh?
lul.. nice coincidence
never player PUBG but cannot imagine it is disguting
well, I could advise you to try it so you can see from your own eyes, but dont
It won 2nd place @still forum
no it didn't
Yes it did
Atleast PUBG didn't
that didn't exist back then.. like.. Not even the idea of making it probably
It wasnโt called PUBG was called Battle Royale
Battle Royale ghost hotel won second
Battle Royale might've brought some people to the game.. But their servers were blown empty by PUBG/Fortnite releases
im wondering what PLAYERUNKNOWN became
Rich
I dont doubt that
How will you make any money from a Arma mod?
you cannot monetize mods :d
Yeah same. Rocket sure didn't make that much
i'll hold everyone who downloads it at gunpoint until they give me $5
Made enough to start own company
lmao
Partypooper
@young current lmao you just made everyone stop talking
๐น
You guys just have disguise your chat, like this:
private _canMakeMoneyFromArmaMods = false;
private _rocketNotRich = true;
PUBG addEventHandler ["Purchase", {
params ["_buyer"];
_buyer setCaptive true;
Vauun doWatch _buyer;
}];
PU_canStartCompany = true;
it's genius
lmao
I just love those virgi... errr I mean developer jokes !
U aint codin u aint nuttin'
Can anybody tell me the event type when a player joins the server, presses continue on the map and then spawns in the game?
I tried PlayerConnected and Respawn
Respawn fires for respawn not spawn
Needs forceRespawn to kinda force 1st firing
Maybe PlayerViewChanged
You mean the button press moment?
Yea actually between button and spawn
well what about init
gonna test init... sec
Ok forget it PlayerConnected did worked, too
I just used the wrong function
had to use addMISSIONEventHandler
I used the plain addEventHandler func
init could work. if you mean CBA XEH.
Also with a config mod you can add a EH to the Continue button.
or with CBA XEH you could add a EH to when the briefing display closes
You said press continue on map, right? That is after briefing screen
Or did you mean continue on role selection?
oi people. got a question again. can anyone tell me if it's possible to spawn magazines with different ammo count in a weapon ground holder?
i mean without some huge ass workaround like spawning some npc, adding the magazine to it and then dropping it, etc
I think there is a addMagazine syntax with a count argument
Well.. That was easy.. https://community.bistudio.com/wiki/addMagazineAmmoCargo
yeah, but i cant seem to get it to work with the weapon groundholder
huh, let me try. i think i did already, but maybe i missed something
Just searched for "magazine" on the command list on wiki. Completely forgot about that command ๐
welp, now i feel retarded. works perfect. maybe i did something wrong before.
thanks, now i can finish my stuff
\ o /
@west grove feeling retarded? welcome to my world
Does the Arma 3 Ingame GUI Editor actually show new set colors? I'm setting the Background color for a Button but it is still grey as f***
gui editor sux
@frigid raven No, you should be able to edit in config manually.
yea gonna do so
class X11_rscPicture: RscPicture
{
idc = 1200;
text = "#(argb,8,8,3)color(1,1,1,1)";
x = 0.448438 * safezoneW + safezoneX;
y = 0.312916 * safezoneH + safezoneY;
w = 0.113437 * safezoneW;
h = 0.330147 * safezoneH;
colorBackground[] =
{
153,
153,
102,
1
};
};
colorBackground does not change shit
I dont get what to do here
colors are 0 to 1 @frigid raven
not 0 to 255
Red is {1, 0, 0, 1}, so your putting a color down that's whiter than the average skin tone in my future ethnostate
hey you better be nice, or I'll uninvite furries too dedmen
what??
colorBackground[] =
{
153/255,
153/255,
102/255,
1
};
and Midnight is gonna tell me that it is perfectly and I am a douche
oh well @still forum was faster
You are a douche
No?
There I did it
it is perfectly!
*fine
I'm quite sure float rgba is also a thing elsewhere
vec color
After all.. 0-1 is the natural variant of how it should be.
0-255 is just a kinda weird way to express 0-1
Wouldn't it be more precise? Have more variants of colors in between?
colorBackground[] =
{
153/255,
153/255,
102/255,
1
};
This makes it disappear somehow
I hate arma GUIs
config interprets that as string
it interprets everything that's not a number or array as a string.
there is an infinte amount of numbers between 0 and 1 (depending on float precision ofc) so i think it is more precise than 255 integers.
Macro then?
Because it can't make sense of it so it falls back so that it atleast doesn't fail completely
Calculate these values and write down the result
gotta have that 64bit color arma tbh
128bit color :U
ok can anybody give me a working example of this friggin background color
colorBackground[] =
{
0.6,
0.6,
0.4,
0
};
I just cant get it done ffs
no wait I had it to 1 honestly
that was just the last tryout
Is it mybe that RscPicture has no BG color?
or only white or invis
Good question actually. Not into UI stuff that much. That would be #arma3_config anyway ๐
It does not have a background color
:3
also tbh, use the Eden base classes, much betterererererer
Lmao
Can I only have one UI dialog per .hpp file?
Because I just made a second on the siblings layer and well it wont render... so just wondering
meh nvm
You can have millions
Millions? Billions? Trillions?
about "continue" button on the briefing screen ^, we have getClientState and getClientStateNumber "BRIEFING READ" state < that when player pressed it... ๐ค
๐ก learned
Midnight likes it (edited*)
@meager heart Wrong emote. (updated)
fixed*
0 to 255 must be a throwback to ancient times when computers only had 8 bits colour. Gimp seems to use at least 0...100 and 0...255 (selectable) - there must still be many people with 8 bit brains
(and those ranges of course are float)
i think i have a solution to the color issue, but im testing it before i post it here
Is there a other way to detect if a unit was created besides HandleIdentity that does works in MP?
@frigid raven I found a way for you to do the color x/255 calculation via a macro:
#define color255(val) __EVAL(val/255)
//some code...
colorBackground[] =
{
color255(200), //replace 200 w/desired value
color255(200),
color255(200),
1
};```
HandleIdentity is EH added to the unit that has been created so in order to do that you need to have reference to the unit that has been created, so I donโt really understand what are you asking @astral tendon
Something to detect that a unit was created. via script or editor.
And how HandleIdentity is connected to this?
Oh I see you just read description on wiki. No, it is triggered after unit is created
Someone should amend that
Though example there kinda speaks for itself
There is no vanilla event handler for that, maybe some mod EH
cough CBA cough
I'm having an issue with a string that is getting cut short at around 8192 characters, while the wiki here:
https://community.bistudio.com/wiki/String
states that a string can be up to 9,999,999 characters.
this is causing an issue for me as I'm using extDB3 to save character data, and this is preventing it from happening, as it isn't passing all data to the plugin due to this limitation.
does anyone know why im getting this behavior when i use format to create a string?
answer is there > https://community.bistudio.com/wiki/format
i see that now, and just found a solution
all be it a bad one probably, but it functions
instead of format, I'm just doing "data" + "data" + "Data"for the string
Hey guys, I'm wondering if there is some way to track what the player is looking at, and trigger a script when an object is in their view. My idea is a horror scenario where as soon as an entity can be seen by the players it plays a scary sound, like a jump scare. I dont want to check for distance because I only want it to work from their cone of vision. Cheers!
https://community.bistudio.com/wiki/cursorObject @remote basin
check for when the object is under the cursor, then get s p o o k y
Almost what I'm looking for, but I feel the cursor is too accurate and I want it to trigger even if the object is seen in the player's peripheral vision
https://community.bistudio.com/wiki/checkVisibility @remote basin
this might be your ticket, then
_cansee = [objNull, "VIEW"] checkVisibility [eyePos player, eyePos unit1]; example seems to do exactly what you're looking for
Yes! that is perfect, cheers!
glad i could help! you scratch my back, i'll scratch yours.
don't divide by 0
I'm having issues with getting this script to work, mainly that it's returning a divisor error
post script
yes, I'm not, nowhere in this script is there a divisor of 0
callfloor = 1;
endfloor = 50;
elevatordelta = (endfloor - callfloor); //find floor difference between start and end
// elevatordir = elevatordelta / abs(elevatordelta); get direction by dividing delta by the absolute of itself, leaving 1,0,-1
elevatormovetime = 2*(ln(elevatordelta+1)); //calculate wait time in elevator
sleep elevatormovetime; //waiting time
elevatorunits = [player]; //find all objects in elevator and return array
elevatorunitcount = count elevatorunits; //count the size of the array
ind = 0; //establish index start of for loop
for [{ind}, {ind < elevatorunitcount},{ind+1}] do { //repeat loop as long as index is less than units in elevator, adding 1 to index per loop
unitpositionelev = [getPos (elevatorunits select ind)]; //store position of current unit in elevator, based on index of array
hint format ["%1", unitpositionelev];
(elevatorunits select ind) setPos [(unitpositionelev select 0),(unitpositionelev select 1), ((unitpositionelev select 2)+(3*elevatordelta))];
}; ```
_array = [0,1,2];
_array select 5; //--- zero divisor
aka out of range
also checkVisibility not working how you think, @tough abyss
i think i had screenshot with that, lemme check...
so.. _cansee != looking at
Checks if one position is visible from another position and how much