#arma3_scripting
1 messages · Page 435 of 1
yes
That is something completly different than what you just told me
Think about it. Why do you re-add the EH after respawn?
because its a new unit/new player
And it has no EH's because it's a new unit.
so it makes sense but maybe I got mislead by this Some event handlers are persistent (i.e. they stay attached to a unit, even after it dies and respawns). Arguments of this scripting command have to be local to the client the command is executed on "Killed" and "Hit" eventhandlers are executed where given unit is local. on wiki thinking it would keep adding my same EH to the respawned unit
So what EH ID do you expect to get after you add the first EH?
If you add the first EH you will always get the first EH ID
right, I understand that part
It's not "ignoring duplicates" There are no duplicates.
I guess I was just getting messed up with that line I was reading on the wiki - thinking that it would persist over respawns
some EH's persist yeah
not all
that's why it says some
It should probably say which exactly
so that was the source of my confusion 😛 I'll try it with a respawn module and see if I need to work with my code
thanks
anyone know of way to check if a spawned unit has a weapon with grenade launcher (GL)?
Would it be enough to check if the unit has loaded a grenade in his launcher?
I started down that road, but two things seem to be blockers: The GL ammo is randomly assigned, so would need to determine every type of GL capable ammo (HE, flares, smokes) that might be loaded, and because I'm trying to figure out if the primary weapon is GL capable while still in the spawning process, the unit hasn't loaded the GL ammo yet, so when I tried checking, it returns no ammo and assigns launcher as well.
I tried loading only an HE round first, but thats when I ran into the "hasn't loaded yet" issue.
vanilla or rather big modset?
@knotty mantle ?
you can check if the weapons config has a second muzzle
But I hoped there might be a easier way that might also work for you
Well if you just use vanilla the you could check for an "GL" in the weapons classname. But if you use a big modset that isnt feasable as you have no way of knowing what those mods do with their classnames
@still forum That's what I've been trying to find on the BI forums, but haven't been successful, do you know where I can find that capability?
@knotty mantle Yes, right now, trying for just vanilla, but would like to open it up for other mods in future.
Yeah i noticed it worked fine for vanilla with "GL" but BWMod for example uses "AG" in their classnames. So my way is really only a last straw option imo. Oh and i used that pre-Apex although i think they are still using the same naming pattern for new stuff
@still forum I've looked in the weapon configs, for each one, but seems that there are at least two different GL names just in the vanilla weaps, and they don't seem to be assigned as second muzzle, but a sub weapon?
@knotty mantle Yes, I looked at the RHS weaps, and they have 3-4 different names for different GL's. Was really hoping to find a way like what Dedmen was saying about searching for a second muzzle type, as that would also help finding the Type 115 shotgun as well (a latter problem I'm going to have to tackle once I figure out this GL issue).
@still forum Do you know of a way to check if a weapon has a second muzzle? Not what type the second muzzle is or what it's named, just that the weapon has a second muzzle?
@still forum Here's what's listed for vanilla weapons in the CfgWeapons:
all arifle_XXX_GL_F variants = muzzles[] = {"this","EGLM"};
except the MX variants
arifle_MX_GL_F = muzzles[] = {"this","GL_3GL_F"};
If there is more than one muzzle you can guess that it's a GL
but no guarantee that it actually says GL
I did find this: https://community.bistudio.com/wiki/BIS_fnc_itemType , but I don't know how to use it to find "GrenadeLauncher" as a return....
player allowdamage false
How do i remoteexec that?
just like you remoteExec any other command with two arguments
Like it's shown on the remoteExec wiki page
[player,false] remoteExec ["allowdamage", 0];
By following the exemple i dont really get it
what don't you get?
And yeah... I guess I know what you mean
you want to disable everyones damage?
With that you disable the players damage
i though that command would be executed to all machines
It will
And it will disable the players damage on all machines
But only the one player
oh i see my mistake
i was pressing the local exec button on the console
on the global works
Uh...
Yeah...
As I just said
you only disable damage of the player you execute that
because you pass the value in player and don't tell everyone to execute player by themselves
Easiest way is to just remoteExec spawn or call
and just pass the player allowDamage false code along
@wispy lynx maybe you can try this https://community.bistudio.com/wiki/primaryWeaponMagazine
No he can't
we already talked about that
in fact that was my thought on my first message to him
and he explained why it doesn't work
So i was reading the arma wiki about functions,any big diffrences between fucntions-as-files and inline functions? I was reading this https://community.bistudio.com/wiki/Function
No difference if you store them in variables and call them
is it call the file or the variable?
you can't call a file
oofff im stupid
Hey guys. i'm working on a powerpoint for my arma 3 base
does setObjectTextureGlobal works in MP? cause last time i tried other people couldn't see the image changing
how would you go about calling a function from another function
Thanks i will update the script and test it again with someone in MP
[player,false] remoteExec ["allowdamage", 0];
Soo that being called by initServer.sqf just does not work, why?
so i have a laptop in the command center of my military base which controls the powerpoint i'm working on. that laptop has an addAction that allows me to show one image in 3 different monitors plus the laptops screen. how can i use the same addAction for next image but everything you activate the addAction you get the next image instead of the same image?
everytime*
this my addAction script:
[
schoolLaptop,
"Start Presentation",
"images\take_ca.paa",
"images\take_ca.paa",
"_target distance schoolLaptop < 2",
"_target distance schoolLaptop < 2",
{},
{},
{
PowerPointScreen_1 setObjectTexture [0, "scripts\BEW\PowerPoint\images\bg\desktop_1_ca.paa"];
PowerPointScreen_2 setObjectTexture [0, "scripts\BEW\PowerPoint\images\bg\desktop_1_ca.paa"];
PowerPointScreen_3 setObjectTexture [0, "scripts\BEW\PowerPoint\images\bg\desktop_1_ca.paa"];
schoolLaptop setObjectTexture [0, "scripts\BEW\PowerPoint\images\bg\laptop\laptop_desktop_1_ca.paa"];
sleep 6;
PowerPointScreen_1 setObjectTexture [0, "scripts\BEW\PowerPoint\images\bg\desktop_2_ca.paa"];
PowerPointScreen_2 setObjectTexture [0, "scripts\BEW\PowerPoint\images\bg\desktop_2_ca.paa"];
PowerPointScreen_3 setObjectTexture [0, "scripts\BEW\PowerPoint\images\bg\desktop_2_ca.paa"];
schoolLaptop setObjectTexture [0, "scripts\BEW\PowerPoint\images\bg\laptop\laptop_desktop_2_ca.paa"];
sleep 0.1;
PowerPointScreen_1 setObjectTexture [0, "scripts\BEW\PowerPoint\images\bg\desktop_3_ca.paa"];
PowerPointScreen_2 setObjectTexture [0, "scripts\BEW\PowerPoint\images\bg\desktop_3_ca.paa"];
PowerPointScreen_3 setObjectTexture [0, "scripts\BEW\PowerPoint\images\bg\desktop_3_ca.paa"];
schoolLaptop setObjectTexture [0, "scripts\BEW\PowerPoint\images\bg\laptop\laptop_desktop_3_ca.paa"];
sleep 0.1;
},
{},
[],
0.5,
1000,
false,
false
] call BIS_fnc_holdActionAdd;
@edgy dune Exactly like calling any function anywhere.
@astral tendon Because the server has no player.
well it does, me and... me
If you host yourself then you are the server
dedicated server doesn't have a player
You anyway won't understand why that doesn't work if I'd try to explain that to you. Which I already did
I also already told you what you should use and what would work like you expect it to
spawn also did not worked
😀
What did you execute exactly?
Spawn works 100% unless you have CfgRemoteExec white/blacklist
[] spawn {player allowDamage false}
🤦
GGWP
Let's quote myself Easiest way is to just remoteExec spawn or call and just pass the player allowDamage false code along
Read that again.
No! Read it another time. And another. And to be safe atleast 5 times.
anyone?
@ornate pawn setVariable on the object of what screen you are on
then read it and depending on that choose next
I have an Addaction on the laptop "start presentation"
so i need that action to activate another addaction which is "Next" and everytime i select next a new image will show
setVariable on the object of what screen you are on? i don't understand
you mean the laptop?
yes
set a indicator so you know what screen is currently active
when the Next action is used read that variable. And based on that decide what should be shown next
all screens are active
urg, nevermind that, i dont think i can work around stuff too complicated.
@astral tendon Exactly that's why I told you the easy way
I still don't get how that changes anything.
Your problem is that you don't know what screen should be switched to next?
Store it in a variable and just read it. Then based on that switch the screen. Set the variable to a new value which will be read again next time the screen is switched
Start presentation > Next Image > image 1 > Next Image > image 2 and so on
Yes..
Exactly that is what I'm telling you
you don't need to keep repeating yourself ^^
no dude
i don't need to switch to another screen
i need to switch image not screen
in the same screen
Which is exactly what I'm telling you
haha
switch the image on the screen
switch the screen
switch what the screen shows
just make a if statement
if variable == "image1" then showImage2 and set variable to "image2"
if variable == "image2" then showImage3 and set variable to "image3"
if variable == "image3" then showImage1 and set variable to "image1"
There. You now rotate between 3 images everytime you use the action
ah cool thx dedmen
also setObjectTextureGlobal maybe, BullsEyE|WORKS 😀
if variable == "image1" ? inside the " " goes the setObjectTextureGlobal line?
I've made a towing system asking questions which works 100%
could you make one sample using my code please?
[
schoolLaptop,
"Start Presentation",
"images\take_ca.paa",
"images\take_ca.paa",
"_target distance schoolLaptop < 2",
"_target distance schoolLaptop < 2",
{},
{},
{
PowerPointScreen_1 setObjectTextureGlobal [0, "scripts\BEW\PowerPoint\images\bg\desktop_1_ca.paa"];
PowerPointScreen_2 setObjectTextureGlobal [0, "scripts\BEW\PowerPoint\images\bg\desktop_1_ca.paa"];
PowerPointScreen_3 setObjectTextureGlobal [0, "scripts\BEW\PowerPoint\images\bg\desktop_1_ca.paa"];
schoolLaptop setObjectTextureGlobal [0, "scripts\BEW\PowerPoint\images\bg\laptop\laptop_desktop_1_ca.paa"];
sleep 6;
PowerPointScreen_1 setObjectTextureGlobal [0, "scripts\BEW\PowerPoint\images\bg\desktop_2_ca.paa"];
PowerPointScreen_2 setObjectTextureGlobal [0, "scripts\BEW\PowerPoint\images\bg\desktop_2_ca.paa"];
PowerPointScreen_3 setObjectTextureGlobal [0, "scripts\BEW\PowerPoint\images\bg\desktop_2_ca.paa"];
schoolLaptop setObjectTextureGlobal [0, "scripts\BEW\PowerPoint\images\bg\laptop\laptop_desktop_2_ca.paa"];
sleep 0.1;
PowerPointScreen_1 setObjectTextureGlobal [0, "scripts\BEW\PowerPoint\images\bg\desktop_3_ca.paa"];
PowerPointScreen_2 setObjectTextureGlobal [0, "scripts\BEW\PowerPoint\images\bg\desktop_3_ca.paa"];
PowerPointScreen_3 setObjectTextureGlobal [0, "scripts\BEW\PowerPoint\images\bg\desktop_3_ca.paa"];
schoolLaptop setObjectTextureGlobal [0, "scripts\BEW\PowerPoint\images\bg\laptop\laptop_desktop_3_ca.paa"];
sleep 0.1;
},
{},
[],
0.5,
1000,
false,
false
] call BIS_fnc_holdActionAdd;
half of your code is irrelevant
if (_object getVariable ["currentImage",0] == 0) then {
setObjectTexture blaa;
_object setVariable ["currentImage",1];
}
No I won't copy past all that irrelevant stuff over and over again and spam the channel with it like you do
okay thank you
Looking for some help in solving a bug. Attempting to Override the default action menu with a custom menu. Everything is working as intended except that _selection variable isn't being updated correctly when called by the mouse wheel scrolling nor is the color being changed in selectInteraction when called using mouse scroll wheel. Relevant lines are 32 and below. https://pastebin.com/fWGKKGFe
will this code be able to add the object to the EDIT list (left side column) to all zeus players?
_obj = cursortarget;
private _script = {
params ["_obj"];
{ _x addCuratorEditableObjects [ [_obj] ,false] } foreach allCurators;
};
[ [_obj], _script ] remoteExec ["BIS_fnc_call", 2];
@sldt1ck#9436 Thanks, I'll give it a try.
@river meteor A couple of things I can spot by looking at that code.
EventHandlers have their own scope so _selection is undefined within the scope of the EventHandler.
InGameUISetEventHandler is not stackable so the last one overrides any previous ones.
Do you know if making the variables global i.e. with the _ would fix the scope issue? @cloud thunder
yes it could
is there a way to make any weapon/ammo able to lock onto any object with FCS auto prediction? (sqf only not cfg)
^ I think not, as this is really a cfg value.
you could ugly-script something to fly towards cursorObject, but I wouldn't call that locking
Is there an 'easy' way to make my spawned units disappear after the player moves x amount of meters away? I've tried quite a things already but the AI just stays where they are.
It's about 5 lines of script:
_unit spawn {
params ["_unit"];
waitUntil {player distance _unit > 1000};
deleteVehicle _unit;
};
I have tried a few of those but none of them seem to work
would I have to put this for every individual soldier or just underneath them or something
strange all my player add EHs work on init, EXCEPT the damage ones i need to place them inside the respawn EH just to make them work????? (wont this mean the damage EH will be stacking every single respawn? or are they cleared?)
anybody else know what to do with commys lines?
@obsidian chasm did u pass in the right args in the right scope? did u actually go 1000m away?
are your units already placed? where are u editor? debug console?
they work via trigger
i posted a pastebin with the squad
and just in regular editor..
with the script u pastebin'd add this on line 33 (commys script plus a foreach)
{
_x spawn {
params ["_unit"];
waitUntil {player distance _unit > 1000};
deleteVehicle _unit;
};
} foreach units _newGrp;
if you dont want them to be deleted entirely u can do a hideobjectglobal true them and do another waituntil they are inside desired proximity hideobjectglobal false;
i dont mind them deleting, it's just so I can add a few more US and there wont be loads of AI aimlessly walking around when I'm done with them
also thanks a lot, one more thing i never have to learn again
wont this mean the damage EH will be stacking every single respawn?
Yes. Eventhandlers carry over to respawned persons. If you add them everyrespawnthey will pile up.
or are they cleared?
No.
thats the thing tho daddy commy, my damageEHs seem to only trigger after respawn.. (the init EH ones like getIn getOut killed , etc work 100%) , do you think the mission can be interfering with them?
You mean "Dammaged" eventhandler?
Maybe some other script removes them again.
how do they know my EH id, im creating em on the fly
They don't. They could be shitty scripts that use removeAllEventHandlers.
ouch any way around those? like is there an EH for it lol
Remove the broken mod or mission.
@little eagle can you make me a
player addEventHandler ["AllEventHandlersRemoved", {
_modCulprit = _this select 9;
}];
👌
in CBA
XEH
I probably could if I worked at BI.
can intercept make new EHs?
["CAManBase", "Dammaged", {
params ["_unit"];
if (_unit != player) exitWith {};
systemChat str _this;
}] call CBA_fnc_addClassEventHandler;
This one cannot be removed.
fixed typo, damn muscle memory
ffs
where do i put the damage handling?
my vanilla EH
player addEventHandler ["HandleDamage", {
_returnDamage = (_this select 2);
if ( _returnDamage > 1 ) then {
_returnDamage = _returnDamage / 4;
};
_returnDamage;
}];
@little eagle something like this?
[player, "Dammaged", {
params ["_unit"];
if (_unit != player) exitWith {};
if ( _this > 1 ) then {
_this = _this / 2;
};
_this;
systemChat str _this;
}] call CBA_fnc_addClassEventHandler;
do i need any #includes with cba ?
I have no idea what you're trying to do with this. cut the damage in half? That won't work with Dammaged.
do i need any #includes with cba ?
No.
No, this is wrong on about every level of it.
Dammaged ignores it's return value, only HandleDamage uses it to overwrite the units damage.
The CBA class eventhandlers are config based. The config based HandleDamage eventhandler ignores it's return value. You have to use the scripted eventhandler for this.
Your code wouldn't cut the received damage in half. It would cut the total damage in half. Essentially capping the units damage at 0.5 making them invulnerable.
Unless they are overkilled twice with one shot e.g. headshot should still work (damage ~4).
The return value is the last value in a script, but you put systemChat there overwriting the return value with nil, the return value of systemChat..
oh ok sorry never used cba fncs before
Just to understand this fully. You put player addEventHandler ["HandleDamage", {...}]; into init.sqf and it works fine unless the unit is damaged already by the mission?
all the other EHs not relating to damage/score/rating are working fine in init, but the damage/score/rating ones only work when placed in the respawn EH or manually in debug console localexec
What do you mean by "init".
init.sqf
Well, HandleScore only works on the server and player is null on a dedicated server, so that one will not work anyway.
I have a theory on HandleDamage not working, but HandleRating not working would mean a different script removes it or it's something else unkown to me.
i have these inside init.sqf
// HALF ENEMY DAMAGE
player addEventHandler ["HandleDamage", {
_returnDamage = (_this select 2);
if ( _returnDamage > 1 ) then {
_returnDamage = _returnDamage / 2;
};
_returnDamage;
}];
// NO PLAYER AUTO RENEGADE ON FF
player addEventHandler ["HandleRating", { (_this select 1) max 0; }];
player addEventHandler ["HandleScore", { (_this select 1) max 0; }];
// NO FALL DAMAGE
player addEventHandler ["HandleDamage", {
_unit = _this select 0;
_damage = _this select 2;
_source = _this select 4;
if ( (_source == "") ) then {0} else {_damage};
}];
these arnt being applied, only when i duplicate them into respawnEH then they work
i also duplicate into remoteExec, 2
Your first handle damage thing would heal the player if he has damage over 0.5 already.
[player, _addPlayerEHtoServer] remoteExec ["BIS_fnc_call", 2];
HandleScore doesn't work a clients machine, so this is broken regardless.
handle rating also server only?
No, HandleScore is.
You also added two HandleDamage, The second one would overwrite the first one, so the first one does absolutely nothing.
i thought it stacks?
returned value from first EH then gets processed into the next EH?
_source being "" doesn't only mean fall damage, it also applies to e.g. crash damage. So this eh would make cars explode when they touch players and leave the players undamaged.
i thought the point of multiple EH on the same property makes them pass values from one to the other?
i thought it stacks?
They do stack as in you can add as many as you want. But only the return value from the last one is taken, so you can only use one to modify the damage. That aspect of eventhandlers that acknowledge return values does not stack.
makes them pass values from one to the other?
That would be a cool feature, but it doesn't exist.
so say incoming damage is 10
first dmg EH {_dmg + 2; _dmg} // dmg is now 12
second dmg EH {_dmg / 2; _dmg} // dmg is now 6
your saying this pass process previous doesnt work????
fuck me! my misconceptions wer implanted by INCEPTION team!
BUT doesnt my way actually make sense for stacking EHs?? if it only accepts last EH then whats the point
It means your first one is wasted space and processing time.
but then so many mods add EHs, each one breaking the last??
If they use HandleDamage or HandleScore and HandleRating, yes. Which is why I consider these to be unusable by addons.
ACE uses HandleDamage anyway, because it has to. But lot's of missions break it and of course ACE team gets the angry bug reports.
wow just wow, why would BIS do this? pls dnt tell me stacking doesnt work for getIn getOut as well
This only applies to eventhandlers that consider the return value. All other work just fine. It's not that the code isn't executed, it's just that the return value is overwritten by the later added eventhandler.
so i have to convert my fall dmg EH and reduce dmg EH into just 1?
That is the next misconception that you apparently haven't understood.
The _damage reported by the eventhandler is the total damage the unit would have in _selection after the damage event.
Which means the sum of the previous damage plus the newly received damage.
If you just cut the total damage in half, you also cut the previous damage in half: your unit could be healed by getting shot.
oh right, so its the total dmg, geez here i thought its just the most current hit dmg
That would be a nice feature, but it doesn't exist.
so there is no way to just get the dmg from say 1 bullet?
Enormous effort has to be put into HandleDamage to get it to work in an acceptable way. I did this for the medical rewrite in ACE with lot's of experimentation.
Of course people want quick results so they script some shaddy stuff together not looking too different from what yours looks like.
Until it feels about right, but of course it will behave unpredictable in edge cases: still good enough for most mission makers.
It's a steaming pile of shit, and if you know too much about it, you can't greenlight what others've done with it and posted in a chat.
stuff thats supposed to be common sense just its there, my fault i guess for glancing at biki and then filling up the holes with my own common logic
so what if i modify the dmg inside the hit EH?
Yeah, HandleDamage existing in it's current form is worse than it not existing at all. With it not existing people would at least request it and have leverage. This one is a bad excuse for an essentially missing but crucial feature.
fuck hit EH so many not reliable triggers
says will not trigger on such and such, so what if it should of died, trigger first before dying!
The hit eh cannot modify the damage. Only eventhandlers that start with "handle" do generally. Maybe there's an exception I can't think of one now, but nothing to do with damage.
and here we have tanks DLC, christ this EH stuff is a black hole of silent doom!
and its only those few people that really think and test the internals that will complain about it
It's one of the worst aspects of this game. Right after weapon animations for asset makers.
(Solidarity with #arma3_config, #arma3_model )
plus i would like it if everything can be sqf'd, i dont like trawling static cfgs #PURE_SQF
Configs have their merrits, not being able to edit them on the fly or with missions at all is the bad thing.
yeah base cfg alright, inheritance ftw! ive modded games without inheritance and its just painful
Same.
gotta be honest tho, even with all the hair pulling gripes, the arma engine is still so much more comfortable compared to other engines. dangerous waters back in the 90s was a total bitch to mod but i still cant find any modern subsim that can beat it. same with c&c generals, EA used alot of proprietary stuff, but is still the best modern day RTS. was coding in some kind of LUA
Yes amra is leading platform for modders and community creations
4now
🔥
Enormous effort has to be put into HandleDamage to get it to work in an acceptable way.
damage handling modifications i hope Enfusion will suck less at
That and allowing to properly disable input in a way
Nothing you'd need a new engine for. Sure, it's an opportunity, but as for me, I will lament every old feature that will get lost or broken.
agreed, but a cleanup on things like that probably wouldn't be a bad thing
Good Afternoon,
I once again have a Question about Eventhandlers for Active Mines (In combination with ACE i thought it should be noted) i tried to get an Eventhandler Killed and Deleted to work with my Activ mines but it seems not to recognize it if the mine detonates (Kills itself) or is deleted. Is there a Reason for that?
Is SQF _offset = _preset select 0; _blend = _preset select 1; _colorize = _preset select 2; _weight = _preset select 3; the same as ```SQF
_preset params ["_offset", "_blend", "_colorize", "_weight"]
yes
no
That would be
private _offset = _preset select 0;
private _blend = _preset select 1;
private _colorize = _preset select 2;
private _weight = _preset select 3;
Thanks 👍
I found out that mines are pretty bad included into Arma 3. I probably have to do for each placed one something like sqf Waituntil {!alive _mine}
what are you trying to achieve
Killed EH?
Dedmen somehow the Killed one won't work probably because of ace but i am not sure
at the moment i am working with that ```sqf
{
_x addEventhandler ["Killed",{hint "ToT"}];
_x addEventhandler ["Deleted",{hint "Gelöscht"}];
[_x] call ser_fn_insertmine;
hint format ["Gesetzt %1", _x]
}foreach _updated_mines;};
for the protokoll _updated_mines are the new ones
and foreach is just to make sure that everything will be handled properly cause of the second sleep
@young current uhm simply to get code executed by an removed mine by defusing or exploding it
i would guess triggering mine activates fired event so could you use that?
not sure maybe a try worth i read a lot about that Bi didn't put much love towards them
They work as mines as intended, you walk on one and BOOM. Im still not getting what is the big picture you are making
you are aware of the mine related scripting commands yes?
the most stuff i am using is allmines i probably have to do something about the ownage and things like that i think there are 6-8 related commands after searching them with strg + F
so you want a list of mines
and then cross off whose that have exploded
but keep them in the list
this is what i am doing by substracting strings in arrays
Waituntil {!alive _mine}
wouldn't isNull be better?
And another guy who is unable to read and write a name properly...
isNull and alive would probably do the same in this case
{true}
And no nothing can disable Eventhandlers. So ACE isn't breaking the Killed EH
I'm just not sure if there's weirdness handling alive objNull
I think ACE has a special EH for ACE mines too
Yeah ace will be brought in a little bit later in utilizing it
I thought ace scripted all its explosives anyway.
first A3 Related than addon
@gray thistle
Also, I've not looked at mine defusal in a while, but I recall them just sort of... tilting when defused.
You might be able to use vectorUp and some checks if that's still the case.
Ähm i don't know how this would be a solution for the event handler problem
I even think this has nothing to do with that
I just woke up, forgive my brain.
That will behave somewhat like an eventhandler
instead of the unpredictable waitUntil
I'm seeing things that aren't there.
The thing is Dedmen this gamemode shall support also the normal arma way but i am working for myself on Ace too and that is a mess i will even have to do maths when is is disabled cause of the diffrences
And yes with the suspension is Waituntil somewhat random but mostly at least to the point of understanding (Also me is sorry just noticed)
When i think i just wanted to start a loop with if else questions phew the horror i did not experience the load the agony....
And Sadly Fired did not work
Well i will look into !waituntil to solve the problem for the moment thanks. Still if someone has ideas to that then please let it me know
i seem to have a problem with adding actions with remoteexec.
as i was initially cobying stuff, i used addaction the normal way. i included a few addactions in a function and remoteexec that function. I thought that does the same job as remoteexec the addactions individually. That doesnt seem to be the case though. as player i see those actions only, if i connect before that function is called. but they should be there for everyone when they connect. so i guess something with the Jip dont work.
[_object] remoteExec ["fnc_XYZ", 0, true];
and that function contains a bunch of addaction
would it change anything if i change it to [_object] remoteExec ["fnc_XYZ", 0, _object];
not sure how the JIP works tbh
No that wouldn't change
Does that function already exist when JIP scripts are called?
AKA using CfgFunctions instead of setting a variable in init.sqf
Just put it into initPlayerLocal.sqf and it will be executed for every JIP client.
possible to force set side to enemy ai? _aiUnit setRating -8000 doesnt work
i define a function in some file and call it
and those functions are read when the server starts
@lusty canyon
I've gotten it to work with addRating -20000.
@next lily really? great ill give that a go. ty
I've had success with it, so... I see no reason why it wouldn't work.
cant put it in initplayerlocal. buddy wants to put it in a separate sqm to be placed on a server
Well, you do have a problem. There are a few solutions suggested that would 100% work and are how this usually done.
But you don't like them.
Can't help someone like you.
my ais that previously had waypoints got cleared when i gave them addrating -30000. i guess this is intended behaviour?
is this cuz renegades dont have side center?
Hello does anyone have any idea what that error might be caused by? Error Foreign error: Unknown enum value: "onPlayerDisconnected"
So like using function that is not declared yet in EH?
Maybe you meant the PlayerDisconnected EH?
Error Foreign error: Unknown enum value: "PlayerDisconnected" ? 😃
oh can those be used on client?
or server only
What command are you using?
player addEventHandler["PlayerDisconnected", {_this call function}];
Do you know if there is any EH that would fire when player leave mission?
You can also use it on the client
But I guess it won't fire for the client itself
only when other players disconnect.
What I want to do is to send some information from client before he leaves.
addMissionEventHandler ["HandleDisconnect",{_this call some_fnc_onClientDisconnect}];
You can't really do that
you can detect that he left
not before he leaves
I guess you can detect when he opens the Escape menu screen
But that doesn't mean he clicks the abort button
and that also wouldn't detect ALT+F4
Depends what info you want
It's fine if it's impossible with EH I can find workaround. Thank you for explaining this for me. 😃
I'm trying to save some information into db before they leave.
What information? 🤔
Can you somehow get that information to be on the server?
like gear they have etc
You can do that on the server
But PlayerDisconnected EH is too late unless you have AI enabled
Or you just use HandleDisconnect
So if I understand correctly this one holds information on player unit after he disconnect so I could use that on server to write it to db after player left?
yes
While trying to spawn an AI unit with script:
_glMuzzles = getArray (configFile >> "cfgWeapons" >> _primaryWeapon >> "muzzles");
if (count _glMuzzles > 1) then {
_glMuzzle = (_glMuzzles select 1);
_primaryWeaponGLRounds = getArray (configFile >> "CfgWeapons" >> _glMuzzle >> "magazines");
_primaryWeaponGLRound = _primaryWeaponGLRounds call bis_fnc_selectRandom;
_unit addMagazine _primaryWeaponGLRound;
};
I'm getting this error:
_unit addMagazine |#|_primaryWeaponGLRound;
Error Undefined variable in expression: _primaryweaponglround
Ideas? Or does anyone know another way to determine if a primaryWeapon has a GL attached and then be able to select it's CfgWeapons name to assign random ammo types (HE, flares, smoke) for the GL?
I think... That variable is undefined
bis_fnc_selectRandom is outdated and deprecated
Could you explain "deprecated" in this context for me? I'm using the bis_fnc_selectRandom for several other "randomizers" in the script, and they are behaving without issue?
configFile >> "CfgWeapons" >> _glMuzzle >> "magazines" That's incorrect
the muzzle is not a weapon
it's a subclass at most
Okay, I was following the ref in the notes: https://community.bistudio.com/wiki/selectWeapon
Yeah.. And what you copied from there is correct.
So how is: configFile >> "CfgWeapons" >> _glMuzzle >> "magazines" incorrect?
Could you please just read what I wrote?
Because I told you exactly what is incorrect on that
There're no muzzles in CfgWeapons.
@still forum Okay, I'm new to scripting, I was asking "why" it's incorrect?
Dude
the muzzle is not a weapon it's a subclass at most
It's not a weapon
it's not in CfgWeapons
It's a subclass of the weapon
why
There're no muzzles in CfgWeapons.
@meager heart NO.
Dude...
If you wanna help you should read the conversation so you know what we are actually doing..
I said 10 minutes ago that that is correct. And he did it like that
Yeah. I always read from oldest message to newest
Sarcasm.
Could you say what a "unit mod" is?
- make a mod
- make a unit
- put unit into mod
Also.. How do you know that you want #arma3_scripting ?
It's true. I've done it once or twice before.
Don't you want to ask that in #arma3_questions ?
Okay, so what should I change to be able to get the GL appropriate ammo?
Grab the weapons subclass and not from CfgWeapons
getArray (configFile >> "cfgWeapons" >> _primaryWeapon >> _glMuzzle >> "magazines"); Like that
Looks good to me.
Okay, thanks, I'll try that out.
Could you explain "deprecated" in this context for me?
afaik deprecated - mean that it is recommended to use "something better/another/new", "old thing" may still works for backwards compatibility or there are some troubles with "the old thing"
👍 Worked! Again, thanks for your help.
and I will update script with the selectRandom instead of bis_fnc_selectRandom.
deprecated means "this still works. But you should not use it anymore. And it might disappear or stop working completly soon"
yeah... in short - don't use it
I'm glad that subclass method worked, as it'll carry over to getting the Type 115 subclass as well, it was going to be my next problem child to figure out.
Given this:
https://forums.bohemia.net/forums/topic/140837-development-branch-changelog/?page=50&tab=comments#comment-3274310
>Fixed: The Praetorian, Centurion and Spartan can now be locked by IR-guided weapons (when heated-up by weapon fire)
Is there a command to fetch how illuminated something is in the thermal spectrum?
Don't know of one
If there ain't and I think there should be, where would the best place to go and say so be?
I think there is a dev branch scripting feedback thread on BIF
If you know the file is there than you don't need to care about it
But not seeing what's in there while the code has effect on the other code (local variables) is a bad practice
better just call it.
If you want to save memory then execVM or call compile preprocessFileLineNumbers instead of properly using CfgFunctions.
That way side effects from invisible scripts don't carry over to yours and could cause conflicts
@next lily you can make some workaround with this maybe, but afaik no getter commands https://community.bistudio.com/wiki/setVehicleTIPars
@meager heart
That's good to set, but I'm looking to get.
@meager heart
Now I'm upset.
@next lily you can read engineTemp Temperature state of the vehicle engine [A3 post 1.66 only] any ? wheelsTemp Temperature state of the vehicles wheels [A3 post 1.66 only] any ? turretGunTemp Temperature state of the vehicles primary gun [A3 post 1.66 only] any ?
animationSources
Id suspect that gives value from 0 to 1
Can you give an example of how to do this?
Is there a list of these strings?
so depends what you want to do with it if its useful for you
so where do you need it?
so where do you need it?
Looking to quantify a gradient thermal return for a simulated heat signature.
so going way out of arma scope
well judging by the scripting commands we are given yes. 😛
but in any case the animation sources are only thing I can think of that return anything heat related
I appreciate this information all the same.
unfortunately the thermal values are baked into the p3ds via model.cfg on binarization so it is not very easy to those values out
not in runtime anyway
and they only apply on vehicles too
so buildings, plants etc their thermal is simpler
I figure humans are always 'warm'.
If I recall it was just calculated from the diffuse color or something
well not when theyre dead
and they get warmer when they move I think
That's a simple check.
but when theyre alive yes theyre warm
And they're not the target of IR missiles, typically.
except when they use thermal camouflage
yeah not warm enough for that I guess
also irTarget = 0; in config I think
Am I correct to assume you want to make man units thermal targets?
I'm... Less than thrilled with the behavior of the Titan/ACE Javelin behavior. I'm trying to emulate proper Javelin behavior.
Including simulating the CCD on the missile.
Finding where a bunch of intercept lines strike a target then finding the relative thermal values thereof.
Looking for the hot spot as it were.
Agreed. I've started and dropped it a couple times.
good luck!
sure why not!
Will do.
how can you make ai crew unable to eject from damaged vehicles?
You can lock the vehicle I think
Can someone give me a list of commands I can use for OBJa
I'm asking experienced people So I dont get wrong commands
Objectives like Kill this person then it triggers something else for you to do
Be aware that that's a check.
Merely running it doesn't mean that suddenly it will wait for the death of the unit.
At least, in a script or somesuch.
it will wait for that condition to be completed
In a trigger it'll work.
He said for something to trigger. I don't see specific mention of in a trigger.
So, my confusion.
I used to do this all the time but I kind of quit
stop make things complex dude
if you want a trigger to be activated when somebody or something is dead use that command
Can you elaborate what you specifically want to happen?
@sick drum
o.o-
Just a bit more context.
Well right now I want to make a basic defense mission
are you good with scripting?
if you are. are you whiling to help me with somethin? 😛
I'm familiar. Not a massive expert on part with big name mods, but I know some.
Just not dialogs.
Those I see too little of to figure out.
Do you know variables? and know how to use if ?
That I do. PM me, let's see if we can get @sick drum sorted first.
a basic defense mission
that doesn't help
Okay, so are you looking for a group to be dead or a specific unit?
he wants a trigger to be activated when a unit dies
Basically I want one group of units to move into the friendly units once the friendly units kill all of the enemy units the game ends
How many enemy units are there, roughly?
Loren i have the code he needs
hmm likes go with 4
writing it right now
stand by
{alive _x} count [s1,s2,s3,s4] < 1
put that inside the triggers condition
place a soldier and name it s1
then place another soldier and name it s2 and so on..
K
on activation you can put this code: titletext ["","BLACK FADED"]; "End1" call BIS_fnc_endMission;
and this code inside your description.ext:
class CfgDebriefing
{
class End1
{
title = "MISSION COMPLETED";
subtitle = "EXCELENT WORK OUT THERE GENTLEMEN!";
description = "Though I may walk through the valley of the shadow of death, I will fear no evil, for I am the meanest mother fucker in the valley.";
pictureBackground = "images\M_overview_ON_END.jpg";
picture = "";
pictureColor[] = {1.0,1.0,1.0,1};
};
};
k
@sick drum this is a better ending: titleText["THE END","BLACK OUT",8]; "End1" call BIS_fnc_endMission;
haha
sup @meager heart
privet
Does anyone know how to make 3D dialogs?
is this the place for that? i don't think so
I believe it is
wait dialogs are made with scripts haha ma bad dude
Like ACE Interaction is in 3D space
I don't know if it is literally rendered as 3D objects, but it certainly simulates being in 3D space
@sick drum did it worked?
Well... Then you already know who knows how to make 3D dialogs.. ACE Interaction
And it's open-source. So you can just look at how they do it
I haven't even tried yet been trying to get animations to work on NPCs
s1 switchMove "name of animation";
I already tried looking through the ACE code. Problem is there are 20 files and I don't know where exactly the logic to draw and resize it is
oh yes
Also ctrlSetPosition has a parameter for 3D controls. So I assumed that such a thing existed
https://github.com/acemod/ACE3/blob/master/addons/interact_menu/functions/fnc_render.sqf That's the main render function
And you can certainly see on the FPS counter if that code is currently running 😄
@sick drum [this,"SIT_HIGH2"] call BIS_fnc_ambientAnim;
@sick drum [this,"STAND"] call BIS_fnc_ambientAnim;
@sick drum [this,"LEAN"] call BIS_fnc_ambientAnim;
@still forum help me with my powerPoint please T_t
oh ok lol i was doing this [unit, "SIT", "NONE"] call BIS_fnc_ambientAnim;
@sick drum lol no
@still forum I couldn't figure it out T_T
hahaha
@sick drum did it worked?
I'll let you know tomorrow I'm busy doing the detailing at the moment
is there fnc that simulates a smooth transition effect when constantly waituntil _obj_A setpos (getpos _obj_B);
i dont get all the params, sorry im trailer trash that had to use cheat sheets in high school math exams just to get a passing grade 😫
so many numbers as args where do i specify the objects?
i just want _obj_A to follow the path of _obj_B without stuttering or micro teleporting
That's not thaaat easy
would https://community.bistudio.com/wiki/setVelocityTransformation do the same thing?
@native siren Sem i heared you are also working on a Database maybe i can share with you some information about DBs
in most of the EH with source obj + instigators like hit/dmg/killed, whats the difference between those two types?
say the player is inside a vehicle and attacks _obj_A triggering said EHs.
is the source obj in the EH the players vehicle? and the instigator is the player entity?
_obj_A addEventHandler ["HandleDamage", {
params ["_veh","","","_source","","","_instigator",""];
if (_source in allPlayers) then {
_veh setVariable ["DW_IMS_LAST_DMG_SOURCE", _source,true]; };
if (_instigator in allPlayers) then {
_veh setVariable ["DW_IMS_LAST_DMG_SOURCE", _instigator,true]; };
}];
would this reliably get the player (either on foot or in veh) that attacks _obj_A?
(also created copies EH hit, dammage, killed just to make sure, or is that overkill?)
context: i need this for an aerial mission, multiple players focus on a single enemy aircraft and i need to know reliably who shot it down. gets unpredictable since the ai crew can eject (locking the veh didnt stop ai from ejecting) or it can just crash all on its own
I'm trying to make a maker follow a car when a sqf activates, ive tried
ull0 = [] spawn {while {not isnull car_1} do {"carmarker_1" setMarkerPos getPos car_1; sleep 0.5;}; };
with no luck ive seen this work on videos but the makerer isn't moving
0 = this execVM "car_1track.sqf";
this is what actives the sqf. The car and the marker are definitely named correctly
well ive tried about 20 slightly different variations with still no luck. YAY scripting....
Check the rpt file.
its not saying anything about the SQF
is this for sure what I need to activate it ?
0 = this execVM "car_1track.sqf";
What's car_1track.sqf?
the sqf in the mission folder
ive changed quite a lot of stuff so i forget what ive done. I had it working erlier with a test "hint" in the sqf
You had it working? But what happened?
lol good qyuestion
well ive got the sqf starting now with just execVM "car_1track.sqf";
well it wasn't moving the marker
guna test this quick
ok well that's working now
must have got a bit muddled and I'm not used to activating sqf via a trigger
You're doing weird stuff.
how is that weird?
All of it.
you new here?
that's pretty basic sqf with a pretty basic activation
just its been years since ive done it before
got confused
OK
well if you cant tell me HOW its weird il just take that as you are weird lol
seriously if im doing it in a werid way id like to know why
This is supposed to be a marker that follows around a vehicle. Why would that need a trigger?
o i see
well the vehicle its attached to only gets moved to you base once a "cache" is destroyed
and that's when i wanted the tracking to start
Next, what's the purpose of spawn in car_1track.sqf when it's executed with execVM?
I don't know
See? It's weird.
well how?
should i remove that bit
its copied and i didn't want to mess with it seeing as it works
To me that's weird.
well i guess it would activate when the player spawns i duno il link you the vid
both have the spawn part
Yes, but the video from Armaidiot doesn't use spawn and execVM.
And neither does the deleted reddit commentor.
so
how do i activate the sqf ?
and what in this do i change
ull0 = [] spawn {while {not isnull car_1} do {"carmarker_1" setMarkerPos getPos car_1; sleep 2;}; };
he does use the Spawn part
im watching it now
Idk. You should read the wiki probably. That way you won't have to waste time to hunt for weird code on google in future.
well you haven't helped atall, you have said that wrong but cannot tell me how.
ive read the wiki and tried myself with no luck
I've said it's weird. It's obviously not wrong because it works. But so does wrapping it in fifty more spawn {}.
discord is fun
Nah, it's a horrible platform and I hope it dies soon.
fifty more ?
Yes, or seventy.
I pointed you to the wiki. There you can read what works how. Then you won't have to try for hours next time.
you don't realise how much i don't know, the WIKI is not for the people who don't code
its usualy just more confusing
i only ask here when the wiki makes no sense to me
Looks to me like you were already confused, but confident. Guess that is what people want to be.
whats you problem man.. infact i don't care good day
Weird guy.
¯_(ツ)_/¯
typical scripters lol
If only. They tend to actually believe they know something. They act even more confident even when confronted with their bullshit.
probably new tutorial will be out soon ™
Hello Guys I'm working on a paradrop script for an addon ,I have done a function that I need to start on the mission start ( BDF_linha_fixa = { .... ). The function then later will be called by an action inside a vehicle . My question is how do I put it inside an .Pbo in a way that there's no need to start a module for it to work.
I'm working in this mod with a friend.
https://forums.bohemia.net/forums/topic/214834-parachute-mc1mc4t11-wip/
Tks
you don't realise how much i don't know, the WIKI is not for the people who don't code its usualy just more confusing wat?
This is the state of the world in 2018, Dismal. You should be used to this by now.
¯_(ツ)_/¯
Someone needed to point that guy to the wiki articles that go over the syntax of sqf
@little eagle Remember the "make unit mod" guy? https://s.sqf.ovh/navicat_2018-03-11_19-19-32.png
Lol
Does anybody has an aearbud script with a keybind?
for example pressing F1 and your sound effects will reduce down to 40 or something like that?
@ornate pawn https://community.bistudio.com/wiki/User_Interface_Event_Handlers + fadeSound
that does the keybind too?
KeyDown does
heres my simple earbuds addaction
player addaction ["<t color='#7396ff'>UTIL EARPLUGS:</t> ON",
{
_myPlayer = (_this select 0);
_actionID = (_this select 2);
_earPlugs = _myPlayer getVariable ["DW_UTIL_EARPLUGS",0];
if ( _earPlugs == 0 ) then {
_myPlayer setVariable ["DW_UTIL_EARPLUGS", 1, true];
_myPlayer setUserActionText [_actionID, "<t color='#7396ff'>UTIL EARPLUGS:</t> OFF"];
2 fadeSound .20;
hintsilent "EARPLUGS ON (-80%)";
}
else {
_myPlayer setVariable ["DW_UTIL_EARPLUGS", 0, true];
_myPlayer setUserActionText [_actionID, "<t color='#7396ff'>UTIL EARPLUGS:</t> ON"];
2 fadeSound 1;
hintsilent "EARPLUGS REMOVED";
};
},
"args", -400, false, false, "", "(alive _this)", 5, false, ""
];
@ornate pawn
hintsilent str "EARPLUGS REMOVED"
str on string?
Adds additional quote marks and looks very unprofessional.
Could someone help me with a command? I tried using that animate command to make doors open by themselfs with a trigger but it wasnt working for me. Followed it to a T via wiki but not working.
Post what you got.
hey anyone know if its possible to set the buoancy of a object?
trying to make a barge of somekind
Can someone explain the diff between remoteExec and remoteExecCall and when I should use one over the other? Been reading the wiki now for a while, and it's still a little unclear. To me they look almost exactly the same.
Uhh
does pushback work with public var?
ie.
_arr = [];
missionNamespace setVariable ['ten_arr',_arr,true];
_arr pushBack 'abc';
_arr and 'abc' are not public variables in your example, nigel
_arr = [];
_arr pushBack 'abc';
missionNamespace setVariable ['ten_arr',_arr,true];
now on server ten_arr is ['abc'] and on client ten_arr is ['abc']
ten_arr = [];
publicVariable "ten_arr";
ten_arr pushBack 'abc';
publicVariable "ten_arr";
🤔
Yeah
Just the thing is it modifies the original array
but only on the client
it's run on
Is there any way to avoid RscTree list item pictures from becoming squashed like in this image: https://i.imgur.com/4ipoduz.jpg
All I've done is increased the sizeEx of the tree to: 6 * (1 / (getResolution select 3)) * pixelGrid * 0.5
@peak plover does pushback work with public var?
No. Because public vars don't exist
Thought you already knew that 😮
@hearty plover For commands, remoteExec and remoteExecCall are exactly the same. For functions, remoteExec executes them in scheduled environment, while remoteExecCall executes them in unscheduled environment.
is it possible to create a small synchronized timer on each players screen (mp/dedi)? (bomb defusal mission related) pure sqf only
@lusty canyon you can create a timer function and launch it with remoteExec from defuser client
will it be in sync tho? if i do a remoteexeccall -2 (all clients) and one player is on a potato running 10fps and the other player is on a nsa farm at 60 fps. wont the timers become out of sync the longer the script runs?
plus at timer 0:00 i want to run server + HC fncs
No.. Time doesn't elapse faster/slower depending on FPS
Time is a constant.. Eh... Relative constant..
but timer has to be rendered on the players pc?
Do you have players that play from the earth orbit?
If not you can ignore time difference
Yes the timer has to be rendered... ofcause
ofcuz*
ur right fuck the clients ill just use the servers time to trigger my fncs
i have no idea how to manipulate UI tho to display said timer
Uh.. yeah I guess that isn't so easy
besides if you just use a hintSilent that posts the timer every second
i can do everything else xpt the UI part
can you make a parallel hintsilent somewhere else on the screen so the regular hints still appear without overwrite them?
you can try bis_fnc_countdown for the timer
is there a CBA_renderTimer 😋
What would that do? No
idk what bis fnc countdown is but assuming that it does what the name implies you can use that with cba time to start it
CBA also has a func to wait a specified number of seconds and then execute
CBA_fnc_waitAndExecute
yeah, ^ it will show timer... within "mission info" like tickets,sectors... etc
sounds like coutdown will kill the mission
oh no i dont want to run endmission at the end
i could do a dirty change marker text every second, but players would have to open map just to check the timer
Or you copy the code from BIS_fnc_countdown
and use it's way to display the timer. And remove the mission ending
can i copy paste the code from debug console?
yes
Ok
I need to get player entity entry from mission sqm
- I need to get all groups that have players in them
- I need to compare all the playable units names to current vehicleVariableName thingy
Does that make sense?
Basically
I need to know the original group of player
So I can always move him back to his original group on respawn
So I need to find which group it is (from mission.sqm config refference)
save the group on mission start and just move him back?
what if he jips
What if group has died off or connected/disconnected and someone jips?
what happens if you jip into a group where everyone has moved to another group ?
Exactly
^ What if his original group doesn't exist anymore
People usually #include the mission.sqm in their description.ext. That way you can use missionConfigFile to browse the mission.sqm
I guess yeah. If that's what you want then you need to do that
Ok, and there's no automatic get player config?
how would you even find the player if there’s no varname and how would you get the group reference from the sqm
what issue are you trying to solve here
no such a thing doesn't exist
if there’s no varname
I got a check that checks if all playable units have variable names
what’s the issue ?
wrong group after respawn
the group should be correct when joining so you should settle with that, just double check for jips but I see no reason why it should change
Unless the group is deleted in which case you’re in a bad spot anyway with either solution
Not going to be an issue
I'll look for existing group
If no existing group found. It'll create a new one and setvar so it then exists
if this is a generic thing it’s pretty obnoxious requiring a var name on each player
my 2 cents
🤷🏻
If not setting a variable for every unit is not worth it, then the mission I'm working on is not worth it as well...
need one more line with text: _ i said immediately_
what i meant is that if possible you should avoid it, try to find other solutions but if there’s no way then 🤐
Aye
I guess it'd get tedious if starting from scratch, but I usually just copy paste from template so I only had to name everything once
Just found out about 4 listbox/combobox commands that werent listed on the wiki until now. lbSetText, lbSetTextRight, lbSetColorRight, lbColorRight
Sets the color of the item (left) What is the item left?
I should probably reword that, I meant as in the left side of the item
Would "Sets the color of the left side text" be better? @still forum
What is left side text in a combo box?
lbSetText wasnt even listed either
it probably acts the same way as lbSetPictureRight
but for text
inb4 it has the same perf issues huehuehue
Performance issues?
Interesting, never noticed that
it's very obvious when you run perf profiling (dedmen's) and add / remove that command
on a listbox with 800+ items I gain 60-70ms
Probably worth sending in a bug tracker ticket about that then
nah
those are old as fuck commands, I doubt they'll ever touch them
if they could fix how frame controls are drawn that would be nice
Theres a lot of issues I wish Bohemia would fix
@still forum The commands work the same in comboboxes as well. Left, and right side text can both be set so not sure how I could word that any better
how does left/right text in combo boxes look like?
Like this: https://i.imgur.com/EpVhngL.jpg
Normally the text is centered though. Does that mean when you use setTextRight it automatically moves the otherwise centered text to the left?
If so that should definetly get a note on the wiki. And when you add that it's also clear what left/right text means
From what im aware the text is usually aligned to the left by default. When lbSetTextRight is used, the text is just aligned to the opposite right side.
Does Error:No Unit mean objNull ?
Think so yeah.
Try yourself name objNull in dbg console
Thanks
or a dead unit
just do setDamage 1 on someone and check it's name, no worky
https://github.com/acemod/ACE3/blob/master/addons/common/functions/fnc_getName.sqf why there's things like this
sanatize
COMMMMMYYYYY
Could also mean the entity is a vehicle and not a person.
Blame says Pabst did this.
Ironically in a commit called "fix typo".
huehuehuehue
how do i immobilize a player without disabling animation or user input?
attach them to a game logic.
im running a few actions there, during which they are on the ground, but they are still able to move and glitch around on the floor
whats that with the game logic?
private _dummy = "Building" createVehicle getPos _unit;
_unit attachTo [_dummy];
There. Can't move anymore.
Forgot a ;
ahh... :)
lol
What's so funny?
all cool 😂
actually appears like i could just attach the guys to any static object that already is on the map, they will just freez in place
commy option ^ is better
why?
yup
i have one object with a variable name. its somewhere on the map. if i attach the player to that object, without giving any offset, they freez. i suppose it requires to remote exec the attach command if i do it from server
...
@meager heart did you actually try it*
wut
he is dropping grammar on you
oh lol
ahh thats why i thought the same ^^
thats all we are sinking about
if i attach the player to that object, without giving any offset, they freez
Yes. Attached objects can't move
yep that is intended.
he asked whether i had tested it, so i let him know my result
es ofcause 😄
Can I check via sqf what weaponLockSystem selected weapon has?
Does anyone know of an object grabber system that grabs objects and their orientations and stores them as attachto coordinates from a central object??
@hasty violet, I see! Well, I figured I’d end up having to do it myself, just was hoping a script or something already existed. My community has deployable defensive compositions and some of them can get quite distorted if they aren’t kept simple. Hoping to fix that.
So can you take me through a timeline of what you want to happen, just to be clear? I still may be able to help.
so you're converting from world coordinates to model coordinates?
Use modelToWorld and worldToModel
Just be aware that those coords are AGL, not ASL.
sooo some time ago I made a Dark Souls like script, where you can heal at some bonfire but also respawn all other enemies (besides some you wouldn't want respawnable)
it's pretty basic actually but works pretty well, would anyone be interested in this concept or have an idea on how it could go further than a POC?
@winter rose
Would it be possible to integrate it into some sort of dynamic simulation script suite?
e.g. you and your spotter buddy are out over several days looking for a particular target, each time you rest it changes the world around you by generating/despawning enemies, while still having some pre-set entities still exist waiting for (condition) to show up?
antistasi like thing
it's not its purpose actually; it's really like that : your enemies follow you, they run after you trying to kill you... you access to the bonfire and their bodies, alive or not, disappear and respawn at their original location
the little "fun" part was about keeping track of everything, but basically it's a respawn for every AI units (keeping their groups, formations and waypoints)
on respawn bodies are cleaned, there is no "hack" that you could use by killing a lot at the same place to loot; as soon as you "bonfire" the bodies are gone.
Does your equipment persist?
i.e. you loot their bodies over and over again.
so you could cheese more ammo.
I didn't specify anything on that yet...
if I wanted to make a POC mission, maybe I would clear their equipment as soon as they are dead, and only rarely spawn something
and get your original gear back on bonfire, depending on your equipped weapons maybe
The real question is, what does this reset button accomplish that a restart wouldn't?
nothing actually; that's the point
one could think of Dark Souls like missions where you try your best with your equipment, and you unlock checkpoints aka bonfires step by step
the enemies aren't dumbed down, you have to get better in order to progress
So, checkpoints through a level?
checkpoints, if you die you respawn at a checkpoint (the one you like), and enemies respawn as well
So it's the respawn/restart system, just where you get to pick the respawn.
we could reuse this one yes
@hasty violet, sorry for not replying for so long. I didn't realize you were still trying to help me.
- I create a base in Eden.
- I grab the objects from the center of the base.
- The composition is output as a script that creates a central object, then creates all other base objects as objects that are attachto the central object, resembling the original composition perfectly, regardless of where it is deployed.
does anyone have a script that works in multiplayer, that prevents players from being killed, just makes them incapacitated?
@hasty violet, we've tried all kinds of things. I am aware of the risks. The problem is that our bases are deployable in game by players, and there are certain things, like stacked H barriers that just don't work out well, even when we try applying fixes. We are building the new compositions with the possibility of clipping in mind, so we are stacking H barriers one layer below ground and ensuring our buildings are high enough, etc.
@LifeSnatcher#6222
The ACE mod is open source and has a bit in their medical module that is 'prevent instant death'.
How cancer are PVEH?
I've never used, should I steer clear and keep using RE and functions?
cba EHs are easier to work than pveh
guys was using "gvars whitelists" and some weird solutions to feel more safe...
but now we have cfgRemoteExec, plus extra functionality with RE... why use pveh 🤷
they’re a wrapper, never said they weren’t pvehs. still easier to work with
If you want to execute something remotely. Use remoteExec because it does exactly that.
If you want to execute code when a variable is updated then use a PVEH. Because it does exactly that.
How could I go about checking the distance of a unit to the edge of an object rather than the center? Some of my distance checks aren't very accurate for larger objects for seeing if their close enough or not, so I want to use the edge instead.
How far away? Like a couple meters and you need exact distance from you to the first edge of the object between unit's eyes and the objects center?
For example the Blackfish. I have a distance check for an interaction on it for 5 metres which works fine for most vehicles like hatchbacks etc, but for large vehicle like the VTOL it doesnt
https://community.bistudio.com/wiki/lineIntersectsSurfaces Returns first intersection of each object. Just filter through them to find your object. And then use the returned intersectPosASL which gives you the first face of that object closest to you.
Okay thank you, ill give that a go
Police dog script buy ..
@silent saffron No
lol
He's already spamming BIF with double/cross posts about it. Atleast I think it's the same guy.
lays bones on the ground in a pentagram to summon a moderator
just found out that:
getTerrainhightASL POS < 0
is faster than
surfaceIsWater POS
I dont even know what to say
surfaceIsWater is working with ponds as far as I remember
Yeah. surfaceIsWater checks the type of the surface below that position.
First time I see BIMinions message here
reyhard wrote 80 messages in here.... 😄
The wiki is wrong? Can't be...
the allmighty sqf bible never lies!
bibbly boo
I am starting to wonder whether the BIKI has actually saved me time, or cost me.
I mean, I am sure in the long run it has saved me. But more recently on the more advanced stuff I am not sure....
Meh it’s the undocumented commands that get me
For these just ask people who know ^^
What commands are undocumented?
just double checking something, is there a way to save the contents of a container, withing a container (ie, backpack content, inside a crate ?)
@tough abyss Every command that exists but you don't know that it exists.
@wary vine Depends. If it has weapons with attachments then no. You cannot copy/move them via normal script
That doesn't explain much
@Dedmen Well, supportInfo should return all commands, shouldn't it?
Ah you want to read what is in the container while it is in another container?
@tough abyss Yes it does
yeah
but it doesn't tell you what they do
I am sure we can get the info if we ask someone at BI directly.
https://community.bistudio.com/wiki/backpackCargo That returns strings right? @wary vine
https://community.bistudio.com/wiki/everyBackpack How about that?