#arma3_scripting
1 messages · Page 466 of 1
well, it doesn't activate the script
nothing in RPT?
A null object passed as a target to RemoteExec(Call) 'bis_fnc_shownotification'
[EB_supportradio, [("<t color='#bbccbc'>" + "Daylight Lumes" + "</t>"), {"actions\fnc_call_lumes.sqf",0,20,true,true,"","true",2}]] remoteExec ["addAction"];
->
[EB_supportradio, [("<t color='#bbccbc'>" + "Daylight Lumes" + "</t>"), "actions\fnc_call_lumes.sqf",0,20,true,true,"","true",2]] remoteExec ["addAction"];
that's the only thing i ca nsee that might possibly be related
You have weird curly brackets where there shouldn't be any.
Why do you need remote exec anyway?
From where? 🤔
it works without them - thank you
i'm using remoteExec to ensure the action appears on an object in MP dedi server for all players including JIP. is that not the right way to do it?
{
hint "Hello!"
}
is the statement block from the wiki and valid SQF.
{
"actions\fnc_call_lumes.sqf",
0,
20,
true,
true,
"",
"true",
2
}
is what you wrote, and while strangely valid syntax, not what you were trying to write.
All your additional parameters for addAction ended up inside the statement code block, not as actual parameters.
i'm using remoteExec to ensure the action appears on an object in MP dedi server for all players including JIP. is that not the right way to do it?
No, you should place the addAction inside initPlayerLocal.sqf.
// initPlayerLocal.sqf
params ["_unit"];
_unit addAction [<blah>];
Or if not the local avatar, not _unit, but whatever vehicle variable name you want.
If one does what you did, every client will add one action to every other machine, meaning that if in addition to the server, 3 players are there from the start, each one willl have 4 duplicate actions on the object which all have the same effect and name.
Well 3 duplicates and one intended one. You know what I mean.
4 copies.
hi all
is there a way i can use
[] spawn {
_targets = [target, target_1, target_2, target_3, target_4];
while {true} do {
_down = 0;
{
if (_x animationPhase "terc" isEqualTo 1) then {_down = _down + 1;}
} foreach _targets;
if (_down >= (count _targets)) exitwith {playsound "alarm"};
sleep 1;
};}
to set off a trigger instead of an alarm?
basically i would like to set up a timer so if the player gets targets down within time a green flare will go off and if not a red one
i just don't know enough about scripting to work this out and a kind chap on here gave me the script above last time
thnaks very much
i think maybe i need a second script for the smokes (sorry i said flares before i know) and it call it up?
like this..
"SmokeShellPurple" createVehicle [getPos smokingobject1 select 0, getPos smokingobject1 select 1,1];
but can't get them together
What is the trigger for?
the trigger is how i set the smoke off currently (the only way i can think to do it) but there is probably a better way via script?
Module is just a container for a script where you can change some parameters with a gui.
The problem is, that you cannot set it off multiple times per mission I believe.
basically all i'm trying to do is time the pop up target course. so if player completes within say 10 sec then they pass and if not they fail but i wanted some kind of indication in game rather than timing it in RL maybe there is a better way to achieve this than they way i'm thinking (not knowing what i' m doing lol)
What if multiple players shoot targets in MP?
i can ensure only 1 player enters course at any 1 time however i was hoping to have multiple courses on the map with similar setup
I would definitely run the script that handles this on the server only. So that shots from multiple players are handled correctly.
What module is that flare?
sorry i meant smoke not flare "SmokeShellPurple" for example
currently i have a trigger with timer that player enters as they start course but no way of canceling it if they complete it within the time
There're two ways I could imagine.
Shoot and hit target one, then timer starts, all four have to be hit in 30 secs after the first one was hit.
Or, hit one, you have ten seconds for the next one, you lose if it ever takes more than 10. You win if you manage all 4.
yea i like the idea of the 2nd as the 1st idea would mean they have to hit a specific target first?
Not a specific one.
Any of the four.
Timer starting at first hit sounds most fair to me.
oh ok then the 1st idea will work
Those targets are placed in the editor, right?
and is actually better than a trigger start which is risky that someone sets it off
yes
this addEventHandler ["Hit", {systemChat "boo"}];
Put this into their init box and test in SP if this prints "boo" in chat.
Whenever you hit them I mean.
ok the only thing is i have a script running that keeps the targets down when hit and reset them after will this effect what you are helping me with?
Not with the test I just posted, but go ahead and post that script, so it can be incorporated.
this in mission init..._0 = [6,iCenterl1] execVM "resetl1.sqf";
then this as reset.sqf...../-------
Makes targets pop up at the user's command. Targets go down after being hit,
and return back with user action. Because swivel targets have a different
script assigned to them that works differently from all other targets,
they are handled separately in the script. If you don't plan
to use swivel targets at all, feel free to delete the corresponding part
of the code.
-------/
params [["_dist",5,[1]],["_center",player,[objNull]]]; //in params
_targets = nearestObjects [position _center, ["TargetBase"], _dist]; //take all nearby practice targets
if (count _targets < 1) exitWith {
systemChat "No compatible targets were found."; //exit if no targets have been found
};
{_x animate ["Terc",0];} forEach _targets; //get all targets to upright pos
{_x addEventHandler ["HIT", { //add EH
(_this select 0) animate ["Terc",1]; //if hit, get to the ground
(_this select 0) RemoveEventHandler ["HIT",0]; //remove EH
}
]} forEach _targets;
//systemChat "Ready.";
i got it off a youtube vid
```sqf
```
^ what does that mean? sorry if it's obvious
Markdown code tags to get the box with syntax highlighting and monospace in discord chat.
```sqf
player addItem "ace_banana";
```
player addItem "ace_banana";
-.-
aaahhh i'm sinking fast in a world of clever coders here 😦
not sure what any of it means sorry
so was i not allowed to post sqf infor here?
You were, but it looks bad and is hard to read with kerning and mono colored.
What exactly does the script do you posted? It seems to put down all targets around the target, but does it actually keep them down? I thought those things pop up automatically again after a while. It has been a time since I used them.
Makes targets pop up at the user's command. Targets go down after being hit,
and return back with user action. Because swivel targets have a different
script assigned to them that works differently from all other targets,
they are handled separately in the script. If you don't plan
to use swivel targets at all, feel free to delete the corresponding part
of the code.
-------*/
params [["_dist",5,[1]],["_center",player,[objNull]]]; //in params
_targets = nearestObjects [position _center, ["TargetBase"], _dist]; //take all nearby practice targets
if (count _targets < 1) exitWith {
systemChat "No compatible targets were found."; //exit if no targets have been found
};
{_x animate ["Terc",0];} forEach _targets; //get all targets to upright pos
{_x addEventHandler ["HIT", { //add EH
(_this select 0) animate ["Terc",1]; //if hit, get to the ground
(_this select 0) RemoveEventHandler ["HIT",0]; //remove EH
}
]} forEach _targets;
//systemChat "Ready.";
so it allows pop up targets to stay down when hit
then you can reset them
I don't think that's what the script does. Did you place the targets with NoPop in the classname?
no i place pop up targets down then add game logic in the center of them
"currently i have a trigger with timer that player enters as they start course but no way of canceling it if they complete it within the time" A way to deal with that is to have a trigger that has the success condition in its condition a1 and a2 and a3 where the a1 is a check on the first target being down and so on. Then, you have the player started trigger, with timeout of 10 seconds or whatever. Finally, a failure trigger with condition triggerActivated startTrigger and !triggerActivated successTrigger.
If it's more complicated than three fixed targets down in 10 seconds, you probably need to step back and draw this out on paper as a state machine.
no its just me and my lack of knowledge i think
I have an idea on how to get this to work, but I'm still trying to understand what's happening at the moment.
it is just a bunch of targets to be put down within a set time
Because the script you posted doesn't keep the target down. What's the classname of the targets you placed.
?
but some way of knowing if pass or failed
Pop-up Target 1
it does work
i obvously just don't know how
lol
TargetP_Inf_F
It says the classname in the edior. What I posted should be written somewhere.
When you double click it.
Do you have
nopop = true
Or something similar written anywhere?
TargetP_Inf_F has a script attached by config , and that is supposed to make it pop down and back up after a while.
There is no need to bypass it yet. I know how, but I don't understand why it doesn't pop up again for you.
The script you posted doesn't do that, so there is something else.
A pastebin alternative where you have to solve a captcha in order to see the text? really?
That site made my browser freeze.
pastebin/github gist are the best
BIS_poppingEnabled That is the new nopop?
//disable targets from moving automatically
nopop = true;
Do you have
nopop = true?
no
🤔
This is what actually makes your targets keep down.
well. technically he doesn't
Not the script you posted.
But that says it's called poppingEnabled now
I'm just asking this, because I don't want to write a solution that is then broken by some other script interfering.
To me it seems like the resetl1 is not need and better off deleted.
well the timer is more important to me than having the targets down
esp if your script knows they have been hit?
thats the only reason i wanted them down as a visual aid
But obviously the timer running out should then put up all targets in the group too. This all should work in unison.
well yea if you can that would be great
Step one would be to delete:
nopop = true;
And
_0 = [50] execVM "reset.sqf";
And everything else associated with this.
Clean house so to speak.
ok
Dedmen, the variable is still called "nopop".
but the script he posted says stuff ¯_(ツ)_/¯
that no pop bit is in one of these scripts i'm already using or somewhere else?
Can be either object namespace, or if undefined is taken from mission namespace.
I copy pasted it from your wannabe-pastebin link.
init.sqf then
L2 says "init.sqf", so I assume it is an init.sqf.
Good night bois. hav fun. Don't get Arma'd too much o7
o7
bye
ok all deleted
(well ive started a new mission)
i have a rifleman and 1 target
OK. Then name all the targets in the editor and use some names where you know which ones are grouped together.
I'm writing it...
Sure.
nopop is a what
A variable without ofpec tag.
Hi guys! need some help regarding scripting. I am a noob comeing to scripting and such but I wonder if the following would be possible,
I would like to add a specific object to constantly have a way to open the ace arsenal.
ex. when i place down the object (Supply box Nato) everyplayer will get the option to open the ace arsenal on it with only my items in them.
And no, the solution is not to do it with zeus. I wan´t to have it as a script in my missionfile 😃
was thinking to set the classname of the object as an veriable like this:
_Arsenal setVariable ["B_supplyCrate_F", true];
and then set the _Arsenal to have the call function like [_Arsenal, ["Myshit", "Myshit2", "Myshit3"]] call ace_arsenal_fnc_initBox
I dunno if this way would do it or to get it all together in a script.
any help is appriciated!
BR Killet
that is exactly the way to do it.
you call initBox with a list of all your items that you want to have accessible
you can just double-click the box in editor and paste your initBox script inside it's "init script"
but make sure to replace _Arsenal by this
yes i said I'll sleep. But I wanted to wait to see what that horribly slow writing guy would write 😄
or do you want that any box of a specific type. Always has a arsenal regardless of how it was placed?
haha thanks, but thats not the solution 😉 I would like to make it a veriable so every single "B_supplyCrate_F" that spawns in during the mission counts as a ace arsenal
by doing it your way I need to set it on every box before I start the mission, so I wan´t to make this a script called from the init
or such
Okey. You wouln't make a variable but I see what you mean
you can do that via a script in init.sqf or by putting something into description.ext. Which do you prefer? I guess init.sqf?
You'll use https://github.com/CBATeam/CBA_A3/blob/master/addons/xeh/fnc_addClassEventHandler.sqf
["B_supplyCrate_F", "init", {
[_this, ["Myshit", "Myshit2", "Myshit3"]] call ace_arsenal_fnc_initBox;
}, false, [], true] call CBA_fnc_addClassEventHandler;
That set's the box's init script
everytime a box of that time is placed anywhere via whatever method. That script will be executed
and you just add the arsenal inside that script
you just put that in init.sqf. Add the classnames for your item whitelist and done
only that easy if you have CBA ^^
from now on I love CBA haha
cheers mate, have a good night 😃
Is it possible to add it from another script so it dosen´t interfere with other things in the init.sqf ex if I call a arsenal.sqf from the init field. and then put:
["B_supplyCrate_F", "init", {
[_this, ["Myshit", "Myshit2", "Myshit3"]] call ace_arsenal_fnc_initBox;
}, false, [], true] call CBA_fnc_addClassEventHandler;
in Arsenal.sqf
@agile anchor I hope you're patient, because this will take a while. I want to get it right...
@little eagle thats fine bud and i appreciate the time you are giving me
// init.sqf
private _fnc_handleHit = {
params ["_target"];
// fall over
if (_target animationPhase "Terc" > 0) exitWith {};
_target setVariable ["commy_isDown", true];
_target animate ["Terc", 1];
// check win condition
private _targets = _target getVariable "commy_targets";
_targets params ["_main"];
// if all down, win
private _isWin = {!(_x getVariable "commy_isDown")} count _targets == 0;
if (_isWin) then {
private _smoke = "SmokeShellGreen" createVehicle [0,0,0];
_smoke setPosASL getPosASL _main;
};
// reset "pop back up" script
private _popupScript = _main getVariable "commy_popupScript";
terminate _popupScript;
_popupScript = _targets spawn {
private _targets = _this;
_targets params ["_main"];
sleep 10;
isNil {
private _isWin = {!(_x getVariable "commy_isDown")} count _targets == 0;
if (!_isWin) then {
private _smoke = "SmokeShellRed" createVehicle [0,0,0];
_smoke setPosASL getPosASL _main;
};
{
_x setVariable ["commy_isDown", false];
_x animate ["Terc", 0];
_x setDamage 0;
} forEach _targets;
};
};
_main setVariable ["commy_popupScript", _popupScript];
};
private _fnc_initTargets = {
if (!isServer) exitWith {};
private _targets = _this;
{
_x setVariable ["commy_isDown", false];
_x setVariable ["commy_targets", _targets];
_x setVariable ["nopop", true];
_x addEventHandler ["Hit", _fnc_handleHit];
} forEach _targets;
_targets params ["_main"];
_main setVariable ["commy_popupScript", scriptNull];
};
[target1, target2, target3] call _fnc_initTargets;
[target4, target5, target6] call _fnc_initTargets;
I have no way to test this atm :/
ok awesome!
so it looks like there ia a smoke in there somwhere?
is this timer or smoke or both lol
Spawns the green smoke if you win, red smoke if you loose.
You lose if you take longer than 10 seconds without hitting anything.
You win if you get all of one group down.
ok and i can change that?
Change what?
10 sec
It says sleep 10 somewhere. You can change that to 30 or whatever you want.
yea thats great
The timer is reset every time you hit one target that wasn't down already.
ok and they pop up once hit or stay down and reset when complete?
think thats what you just said
lol
They fall over when hit. They pop all up at once when you lose.
They reset themselves also 10 seconds after you win.
and i usually place a pencil on the ground to use as smoke do i do that still (can't see object name for it)
The smoke is spawned on the first target in the array.
great thanks (even less for me to do) you are a star thanks very much for your time!!
Don't praise before you have tested it. I would do myself, but it's a torture to run Arma on this 2010 laptop, and it will take 10 more days for me to get back at my desktop machine.
testing quik now
SP or MP?
jeez
What is it, nigel?
I'm surprised you can run it on a 2010
It is a good laptop.
🤔 🗒 ?
I don't understand.
ThinkPad 😄
I had a ThinkPad as my first pc
It's not, but now that you mention it, it is what I have at work.
I dub it the thonkpad from now on though.
👌
I also still have this one in reserve somewhere: https://www.amazon.com/Sony-PCG-FRV31-Laptop-2-40-GHz-Celeron/dp/B0000E6GHM
@little eagle just tested it on SP and it works great will test MP tom night and a bonus (although you prob did it intentionally) but targets 1 to 3 are a group and 4 to 6 are a group thus i can have multiple ranges/courses!
Well, you said you wanted multiple courses.
again you are a star!
i keep trying with the scripting but most of the time i may as well be looking at the matrix lol
// init.sqf
private _fnc_handleHit = {
params ["_target"];
// fall over
if (_target getVariable "commy_isDown") exitWith {};
_target setVariable ["commy_isDown", true];
_target animate ["Terc", 1];
// check win condition
private _targets = _target getVariable "commy_targets";
_targets params ["_main"];
// if all down, win
private _isWin = {!(_x getVariable "commy_isDown")} count _targets == 0;
if (_isWin) then {
private _smoke = "SmokeShellGreen" createVehicle [0,0,0];
_smoke setPosASL getPosASL _main;
};
// reset "pop back up" script
private _popupScript = _main getVariable "commy_popupScript";
terminate _popupScript;
_popupScript = _targets spawn {
private _targets = _this;
_targets params ["_main"];
sleep 10;
isNil {
private _isWin = {!(_x getVariable "commy_isDown")} count _targets == 0;
if (!_isWin) then {
private _smoke = "SmokeShellRed" createVehicle [0,0,0];
_smoke setPosASL getPosASL _main;
};
{
_x setVariable ["commy_isDown", false];
_x animate ["Terc", 0];
_x setDamage 0;
} forEach _targets;
};
};
_main setVariable ["commy_popupScript", _popupScript];
};
private _fnc_initTargets = {
if (!isServer) exitWith {};
private _targets = _this;
{
_x setVariable ["commy_isDown", false];
_x setVariable ["commy_targets", _targets];
_x setVariable ["nopop", true];
_x addEventHandler ["Hit", _fnc_handleHit];
} forEach _targets;
_targets params ["_main"];
_main setVariable ["commy_popupScript", scriptNull];
};
[target1, target2, target3] call _fnc_initTargets;
[target4, target5, target6] call _fnc_initTargets;
I changed one line to make it work a tiny bit better.
ooh which line
L6
I feel abit annoying coming back here, I tried using this to get my arsenal whitelist working on every nato supply box spawned in during a mission.
init.sqf
["B_supplyCrate_F", "init", {
[_this,
[
"rhs_uniform_FROG01_d",
"AOR1_Camo"
]] call ace_arsenal_fnc_initBox;
}, false, [], true] call CBA_fnc_addClassEventHandler;
but getting an error everytime I spawn in the Nato supply box.
My error is:
=========================================
...ns\arsenal\functions\fnc_initbox.sqf"
|#|params [["_object", objNull]],...'
Error Params: Type Array,expected Object
File z\ace\addons\arsenal\functions\fnc_initbox.sqf, line 4
Do you have any clue whats wrong?
["B_supplyCrate_F", "init", {
params ["_box"];
[_box, [ "rhs_uniform_FROG01_d", "AOR1_Camo" ]] call ace_arsenal_fnc_initBox;
}, false, [], true] call CBA_fnc_addClassEventHandler;
Try it like this.
Killet ^
thanks again @little eagle bye guys of to bed lol
@little eagle Cheers mate, gonna try it now
Might have to change the "init" to "initPost" too, because init event is really early and some things don't work from there.
InitPost is a custom event by CBA triggered either one frame after the object was created, or after postInit in case the object is present at mission start.
To fix a ton of race conditions.
alright, gonna change it then 😃
Does theese lines have to be written in the init.sqf or can I call this from another sqf file?
wanna keep my init.sqf as clean as possible
File doesn't matter, but it should be one that runs on all machines.
was thinking, initplayerlocal or something similar
That'd work too I believe. The server doesn't need this function I think.
atm this is all I have in my init.sqf
if (!isDedicated && hasInterface) then {
call compile preprocessFile "scripts\init_player.sqf";
};
and then I call all scritps from there like
call compile preprocessFile "scripts\brief.sqf";
call compile preprocessFileLineNumbers "scripts\arsenal_presets\box1.sqf";
Dont know if it is a good way or not,
But I wanted to wait to see what that horribly slow writing guy would write
Grr
That's fine.
cool, thank you very much man
if (!isDedicated && hasInterface) then {
This could be changed to:
if (hasInterface) then {
Which is logically equivalent.
A dedicated server is a server without interface. isDedicated <=> isServer & !hasInterface.
all my missions are being run from a dedicated.
Doesn't matter, it is equivalent.
alright then. 😃
SP, MP, everywhere.
gonna change it to if (hasInterface) then {
I will post the logical proof^^ Sec.
why haven´t I asked stuff here before?! I spent sooooo much time trying to figure out how to get theese things working HOURS.
and now I just got it all handed to me. THANK YOU ❤
lol
xD
!isDedicated && hasInterface
!(isServer && !hasInterface) && hasInterface
(!isServer || hasInterface) && hasInterface
(!isServer && hasInterface) || (hasInterface && hasInterface)
(!isServer && hasInterface) || hasInterface
hasInterface
I don´t quite get this more than all of them are using hasInterface somehow, so I suppose that would make sense to only use it
L1 is what you wrote, L6 is what I suggested as alternative.
L2 replaces isDedicated with the equivalent (isServer && !hasInterface). Because that is what a dedi is: server without interface.
L3 De Morgan's law
L4 distributive property of & operator
L5 simplifies according to law of identity.
L6 is some other rule I forgot, it makes sense when you think about it.
Alright, I try L6 and see how it works out. 😃
Absorption law
Apparently that works on L3 too.
!isDedicated && hasInterface
!(isServer && !hasInterface) && hasInterface
(!isServer || hasInterface) && hasInterface
hasInterface
There. Simpler.
Wow, this was alot of new info haha, need to do some more homework about this.
thanks!
If you want to learn Arma, start with Aristotle. : P
already started https://en.wikipedia.org/wiki/Aristotle xD
btw, the function I was handed
["B_supplyCrate_F", "initPost", {
params ["_box"];
[_box, [
]] call ace_arsenal_fnc_initBox;
}, false, [], true] call CBA_fnc_addClassEventHandler;
is there a way to do it without cba?
was thinking when you wanna run it "unmodded"
Not without checking all objects every second or something silly like that.
wow, yeah that sounds really bad for performance
Not really if you do it smart.
There're commands that report all entities.
Those can easily compared with isEqualTo.
But ofc if everyone does it this way, and for every little thing, then yeah.
well, using the cba was so short and easy so don´t see any reason why not to really. was more of curiosity
Don´t worry about it. feel like i have taken enough of your time.
thank you once again
CBA does it by modifying the configs init events of all objects (a bunch of base classes).
Wouldn't work with vanilla that way obviously.
is their a Script that can prevent people from firing from vehicles that can like the offroad and jeep
@little eagle nice use of propositional logic and deployment of De Morgan's law in an unlikely forum
People otherwise argue for hours whenever I tell them to replace their strange isDedicated/isServer/hasInterface/isMultiplayer setups with something making sense, so I have to resort to this.
@little eagle I noticed a feature that scripted lobby might need, vehiclevar names and gvar for every slot
And probably onCreatePlayer scripts.
could also have a slotIn condition etc.
I'll probably make a fork soon
Sure. It's all simple stuff atm. Should be easy enough to edit once you get used to the macros...
Yeah, I like the way you did the setvars and getvars
create a namespace and save the namespace name
With the macro all that was so simple
noob question: is there a way for a client side addon to detect if another addon is running on server (Advanced Rappelling in my case)?
params ["_inputString","_caller"];
private ["_isClass"];
_isClass = if (isClass(configFile/"CfgPatches"/_inputString)) then {true} else {false}; //~~ probably not gonna work
_caller setVariable ["MCSS_ISCLASS",_isClass,true];
};
["AR_AdvancedRappelling"] remoteExec ["MCSS_CheckServerAddon",2];
MCSS_C2_IsRappel = player getVariable ["MCSS_ISCLASS",false];``` >> my best idea but it seems a bit unnecessarily complicated
You could remoteExec and ask the server about it
Which is exactly what you did :D
haha damn
Don't think there is an easier way without having server access
ah okay great... i was thinking maybe there's a way to return that is less wonky than my attempt with setVariable
Could use publicVariableClient to send to the client instead of settings a var on the player unit
But if you're checking it once at mission start any hacky solution should be fine :D
i see - many thanks! I needed assurance or schooling from the oracle 😃
Is there a way to prevent units from getting killed, while allowing them to get damaged? Like still getting hit in the legs and such, just not actually dying
this might sound weird, but is there a way to open the config viewer via sqf?
Probably. Why?
DMCA thing. someone reuploaded my mod after i dmca'd them, obfusicated it and removed the ability to open function viewer and config viewer
What? lol
yup
Tried in 3den?
ye, you cannot open it from eden or ingame view debug console
Alt + G shortcut?
also disabled
0 spawn {
sleep 0.1;
[] call (uinamespace getvariable 'bis_fnc_configviewer');
};
in debug console.
sadly doesn't do anything
i guess, I just need to compare the compiled functions and send a dmca
0 spawn {
sleep 0.1;
[] call compile preprocessFile "A3\functions_f\debug\fn_configviewer.sqf";
};
nope, also does not work..
what have they done to break it that much?
if you want i could just send you the pbo, it is not even 2 mb
Please upload it.
commy, i sent it to you in private as i cannot upload it here
Is there any way for a mod to run scripts in 3den?
only requirement for the mod is CBA
So what am I looking at here, diwako?
18:01:28 Failed to load TextureHeaderManager from file "test_anomalies\texheaders.bin" - failed to open the file.
18:01:28 Failed adding texture headers from file "test_anomalies\texheaders.bin"
@digital jacinth Do you want a config dump?
that would be sweet
ii am currently looking through and collecting evidence, so far i already made this
Arma: CSI DLC :D
i already dmca'd them twice, so one of their admins is not banned form uploading to sw. they also do not respond to any sort of communication
it is somewhat frustrating
I belive. Do you need the evidence for steam support?
["CfgMods","CfgAmmo","CfgMagazines","CfgWeapons","CfgFactionClasses","CfgVehicles","CfgPatches","CfgSounds","CfgFunctions","Extended_PreInit_EventHandlers"]
These config classes are edited by this mod.
Also why they re-upload it? Just to steal credit or because your license does not endorse any modifications.
my license is against using it on any monetized server or server which offer ingame rewards after "donating" real life currency
wow, cfgfactionclasses has not been touched by my mod
"life" or Russian players i guess?
Sad.
it is a cmobination of both actually
life and russian
you can compare what i am actually touching in my config in here
Let's see what
getText (configFile >> "CfgFactionClasses" >> "DIW_ANOMALY" >> "displayName")
returns...
oh hang on, "displayName" should return Stalker anomalies"
"Stalker anomalies"
ye i just rechecked, it is the config for the eden module category
Now I wish I kept that custom config viewer I made.
configFile >> "RscDisplayConfigViewer"
returns config null, so it seems like they deleted that class.
I will just put it back in using a custom mod...
what the hell
That's pretty lame though. I hoped for a control that closes it's parent via onLoad. That would've been more difficult to fix.
well i really want to get itno the config viewer and look thorugh what they have broken, meanwhile i am just going through the configs via debug watchers
interesting, even with the config viewer working, they went ahead and pasted the whole script into one line so it would not show in the configviewer
https://i.imgur.com/1A7Fox6.png
Functions viewer.
woops, yeah
Yeah, they used some regex tool to delete the newlines.
I don't even know if you're just tricking me, and this isn't actually your mod originally^^
But I hate obfuscations, so I'd help you anyway.
Does anyone know how PBO files are structured? More specifically the "ProductEntry" that the wiki mentions, does this come after the "HeaderExtension" and what indicates that the HeaderExtension is included at all?
params[["_pos",[0,0,0]],["_radius",10],["_isRectangle",true],["_angle",0]];if(!isServer) exitWith{};if(typeName _pos!=typeName[]) then{private _area=_pos getVariable"objectarea";_radius=_area#0;_isRectangle=_area#3;_angle=_area#2;private _module=_pos;_pos=getPosATL _pos;deleteVehicle _module;};_angle=0;if(count _pos<3) then{_pos set[2,0];};_pos set[2,(_pos#2)-2];_trg=createTrigger["EmptyDetector",_pos];_trg setPosATL _pos;_trg setdir _angle;_trg setVariable["anomaly_cooldown",false,true];_trg setVariable["anomaly_type","fog",true];_trg setVariable["radius",_radius,true];_trg setVariable["angle",_angle,true];
[_trg,[_radius,_radius,_angle,_isRectangle,4]]remoteExec["setTriggerArea",0,_trg];[_trg,["ANY","PRESENT",true]]remoteExec["setTriggerActivation",0,_trg];[_trg,["this && {round (cba_missiontime mod 2) == 1}","[thisTrigger,thisList] spawn anomaly_fnc_activateFog",""]]remoteExec["setTriggerStatements",0,_trg];if(isNil"ANOMALIES_HOLDER") then{ANOMALIES_HOLDER=[];};ANOMALIES_HOLDER pushBackUnique _trg;publicVariable"ANOMALIES_HOLDER";if(!isNil"ANOMALY_DEBUG"&&{ANOMALY_DEBUG}) then{_marker=createMarkerLocal[str(_pos),_pos];_marker setMarkerShapeLocal"ICON";_marker setMarkerTypeLocal"hd_dot";_marker setMarkerTextLocal(_trg getVariable"anomaly_type");};_trg
@digital jacinth You recognize this?
ye
that is the fog anomaly
i already made some comparison of exactly that one
see here
For some reason this obfuscation tool places a lot of empty functions into the mission namespace.
{
private _fnc_scriptNameParent = if (isNil '_fnc_scriptName') then {'anomalyEffect_fnc_meatgrinder'} else {_fnc_scriptName};
private _fnc_scriptName = 'anomalyEffect_fnc_meatgrinder';
scriptName _fnc_scriptName;
params[["_obj",objNull],["_source",objNull],["_state","idle"]];if(isNull _obj||isNull _source) exitWith{};switch(_state) do{case"idle":{_source setParticleCircle[2,[0,0,0]];_source setParticleRandom[0,[0.25,0.25,0],[0.175,0.175,0],0,0.5,[0,0,0,0.1],0,0];_source setParticleParams[["\A3\data_f\cl_leaf",1,0,1],"","SpaceObject",1,7,[0,0,0],[0,0,0.5],0,10,7.9,0.075,[2,2,0.01],[[0.1,0.1,0.1,1],[0.25,0.25,0.25,0.5],[0.5,0.5,0.5,0]],[6,5,5],1,0,"","",_obj];
_source setDropInterval 0.2;};case"meat":{_source setParticleCircle[0,[0,0,0]];_source setParticleRandom[0,[0.25,0.25,0],[3,3,5],0,0.25,[0,0,0,0.1],0,0];_source setParticleParams[["\A3\data_f\ParticleEffects\Universal\Meat_ca.p3d",1,0,1],"","SpaceObject",0.5,5,[0,0,0.5],[0,0,10],0.5,50,7.9,0.075,[10,10,10],[[0.1,0.1,0.1,1],[0.25,0.25,0.25,0.5],[0.5,0.5,0.5,0]],[0.08],1,0,"","",_obj,0,true,0.1];_source setDropInterval 0.1;};default{};};
}
and no worries, i am the creator of this mod
https://steamcommunity.com/sharedfiles/filedetails/?id=1383903166
^^
ye that on is the function which initialises a local particle emmiter
used for either the idle effect or the activation effect
they did not bother changing any function name, so you can just look them up inside the cfg functions file
Link to the stolen thing?
@digital jacinth I'm just curious, your mod has 2300 subscribers and 23000 unique visitors. Their's has 8 and 10. Why care? Is it even worth your time? You have creative skills. This isn't creating anything.
@dry zephyr It was uploaded 2 days ago, they are currently transitioning form one mod pack to this one, the have around 500 players. Plus they are giving ingame rewards in exchange for real life money which is against the license i put them up. plus this is the third time they have reuploaded it
so far they are the only ones i have dmca'd due to breach of the license. I do not really care for small groups of friends reuploading them because i knowhow hard it is to enable a mod after running my own small a3 community
Steam should just ban their accounts and earn a few bucks by them having to re-buy all their video games.
oh, plus i prefer settling this without a dmca, but they ignore all my efforts contacting them
It has settings 👍
@digital jacinth, you know the STALKER franchise is big in Russia (in part because it is set in Russia, well, technically Ukraine, but was part of Soviet Union when it happened). What they may be doing, even though you probably don't feel this way, is adding something by making it available to a Russian audience, albeit against your wishes. Do you have a Russian translation of all your copy, instructions, and license (which they probably haven't even read)? If not, you could outfox them by creating one and indicating "as used in <their mod> [without permission]"
I would need someone who speaks russian for this sadly. I would not want to use an online translator for this
Someone in the community would probably be able to help. You already got commy2 doing obfuscated script analysis and reverse engineering - that's a much higher and hard to find skillset than translation of a few English texts to Russian. 😋
true
Running the following in a script ran on the init of a unit doesn't do anything, if i'm not mistaken, if my UID is present and i'm in the object named curatorUnit, it should failMission correct?
//Script edited to be working for others who may stumble across this
_BlacklistedUIDs = ["76561198116251840"];
_CuratorSlot = [curatorUnit, curatorUnit_1];
_uidActivePlayer = getPlayerUID player;
if ((Player in _CuratorSlot) && (_uidActivePlayer in _BlacklistedUIDs)) then {
failMission "BlockedZeus";
};
Whoops forgot the context too. Basically, if a player is in the blacklist, I want to have them blocked from this slot entirely.
you are checking if uid is in your slots array. instead you should check player in _CuratorSlot
also slot array should be an array of objects/vars not strings.
_CuratorSlot = [curatorUnit, curatorUnit_1];
Oh silly me, didn't even pick up on the objects situation haha. i'll do the fixes and see how it goes
Cheers working as expected 😃
It's always that second pair of eyes that spot the silly things haha
yw. 😛
@digital jacinth btw contacting Dwarden might be easier/faster than trying a DMCA. But only when you have the evidence. I'll unpack that on the weekend when I have time.
so far this is my evidence collection
https://imgur.com/a/OyMTbr4
also wrote together some document already, but no dmca filed for now as i still naivly hope they accept my friend request and we can talk about it
@tight moat My reading of the Wiki, it says, if ProductEntry is present (the data is fixed), it is the first entry in the header. So you could check that first, and if it does not match it is not a resistance pbo. For header extensions, I guess your best bet is to use the version you read a bit before. Seems bit flawed that there is no way to properly detect this. I mean are you allowed to have an empty header extension - how would you differentiate from last entry? Though you might have more success at getting info in #arma3_tools .
Hey guys is there any way to set an object to be picked up and placed in hands like a weapon, trying to create my own fire extinguishers, that users can pick up and use on the wild fires, just not sure what direction i should look in?
yes.
you can just make your own weapon that looks like a fire extinguisher
but not #arma3_scripting
Okay thank you, so no way of making the base game extinguisher into a usable object?
you could try to use it as a weapon model using #arma3_config
but it will 99% not be held in the players hands as you want it
attach to floating before you.
would be essentially the same result as a fake weapon config. It won't be held in hands as you expect. it will just flobber around infront of you
Okay so the attach to would have it float then could use a addaction to fire it, no to worried about how it looks ts more the functionality of it
@little eagle that script worked in MP so thanks
I'm proud that this worked without bugs despite no debugging at all.
i have another thing i can't solve....can i be cheeky and ask for help 2 days in a row? (don't wanna take the pee)
i'm trying to use an Ai civilain as a target. Have him not move and careless so he doesn't run away but can't for the life of me work out how to respawn him when he dies. any ideas?
(using ai instead of pop up target in this particular case as AT or 40mm just destroy the pop ups and not knock them down) - maybe there is a better way?
Only playable characters can respawn. You will have to create a new one.
i have looked at spawning in one instead of respawning but scripts avaiable seem to be random spawns and i want it to replace the dead one (same place same attributes) if you know what i mean
(almost like he behaves as a pop up target lol)
civ1 addEventHandler ["Killed", {
params ["_corpse"];
private _loadout = getUnitLoadout _corpse;
private _type = typeOf _corpse;
private _group = group _corpse;
[_type, _group, _loadout, _corpse] spawn {
sleep 10;
isNil {
params ["_type", "_group", "_loadout", "_corpse"];
private _unit = _group createUnit [_type, [0,0,0], [], 0, "NONE"];
_unit setPosASL getPosASL _corpse;
_unit setUnitLoadout _loadout;
deleteVehicle _corpse;
};
};
}];
🤔
Hmm. What would the benefits of isNil be? (i know it executes the code inside)
I don't want the unit to be spawned, drown because the game decides to put the scheduled script to sleep for 10 seconds, and then be teleported.
spawn sleep isNil is discount cba_fnc_waitAndExecute.
When precise time doesn't matter.
Hmm
commy_fnc_respawnDude = {
params ["_corpse"];
private _type = typeOf _corpse;
private _group = group _corpse;
private _loadout = getUnitLoadout _corpse;
[_type, _group, _loadout, _corpse] spawn {
sleep 10;
isNil {
params ["_type", "_group", "_loadout", "_corpse"];
private _unit = _group createUnit [_type, [0,0,0], [], 0, "NONE"];
_unit setPosASL getPosASL _corpse;
_unit setUnitLoadout _loadout;
deleteVehicle _corpse;
_unit addEventHandler ["Killed", commy_fnc_respawnDude];
};
};
};
civ1 addEventHandler ["Killed", commy_fnc_respawnDude];
Recursion, so it works more than once.
@little eagle so would this script go in the civilains init or a trigger on act that depends on his death?
init.sqf
All of it.
oh ok nd call the civilian civ1?
Yes,
sweet
Then add
civ2 addEventHandler ["Killed", commy_fnc_respawnDude];
for every other respawning npc.
@little eagle it works apart from when civ spawns in it doesn't have this disableai "move"; civ1 setUnitPos "UP"; and runs off
You can add those to the script easily.
wouldn't know where to start and end up ruining your work lol
@little eagle would it be after line 12?
Yes. With _unit instead of this and civ1
thanks mate i'm learning (slowly)
@little eagle is the "0" [], 0, "NONE"]; the direction? as civ1 spawns in facing different direction?
No. Placement radius.
But doesn't matter for us, since we set the position with setPosX.
setpos will only give me location on the map not actual direction unit is facing?
@little eagle i found this (sg1 select 0) setdir 180; but don't understand the "select 0"
what does that mean?
sg1 is an array and select 0 picks the first element.
We don't have arrays here, so just _unit.
Do the setDir before the setPos, so the facing is synched correctly in MP.
ok
setDir only changes it on the local machine, but setPos can be used to carry it to remote machines indirectly. This game's weird.
An array is a set of objects, numbers, booleans, strings, whatever.
[1,2,3]
[1,2,3] select 0 // 1
[1,2,3] select 2] // 3
oh so copies the 1st
Yes. 1st has index 0, because that's where you start counting according to R. Stallman (pbuh)
ok think i got it (when i say it i mean that very small bit lol) thanks again for your time and taking time to explain stuff to me 😃
@little eagle sorry 1 last thing you said a bit further up ^^^ that setdir only works on local so will that not transfer to MP or it will if I place it before setpos? thanks
setPos will synch globally, and it will also synch the direction weirdly enough, which setDir on it's own doesn't.
oh ok so putting it before setpos will keep it- thanks i'll leave ya in peace now (well for today anyway lol) 👍
Whats Display 24??
Okay so took a look at the attach and got the extinguisher in hand and moveable, the issue now is getting a addaction for turning on the script and turning off the script, how would i go about adding the addactions 1 to start and one to end the action, attched is the code:
null=[12,this] execVM "AL_waterfall\al_waterfall_start.sqf";
@molten folio isn't it the map?
nvm i found it
and it's…?
anyone have an idea as to how I could create two computers, one where you can put in information, and another that can look it up?
if you're using respawn modules, the fix is > don't use them and make your own respawn "add position" function...
Yep
anyone have an idea as to how I could create two computers, one where you can put in information, and another that can look it up?
🤔
...a LAN?
I think he means the internet?
inb4 "i want to script the internet in arma"
start here i suppose: https://en.wikipedia.org/wiki/ALOHAnet 🤣
also maybe "lan mode" for dedicated and double click play... 😀
ALOHA, was a pioneering computer networking system developed at the University of Hawaii
wow
I mean, ALOHA sounds better then Hello world
than*
"what poppin my dudes" < sounds even cooler /s
Nigel, please don't. You hurt my head too much at 1:14 AM
Does anyone know whether it is better for performance to use a regular event script (https://community.bistudio.com/wiki/Event_Scripts) or an event handler that calls a function as a file? I would assume that an event script would be more demanding as it interprets the commands rather than having it pre-compiled, but i was hoping someone might already know, that's all.
For example, to handle player deaths, would it be best to put all of the code within onPlayerKilled.sqf or have a event handler that calls a separate function?
And all engine eventhandlers are compiled when called
@still forum Awesome, that's what i was after.
onPlayerKilled.sqf with content _this call My_fnc_onKilled is essentially the same as killedEH with content _this call My_fnc_onKilled
Afaik, custom .sqf scripts are interpretted rather than pre-compiled, because i was able to change the script mid game and the effects come through.
execVM will reload the sqf file though?
as with eventhandlers they are compiled. executed. and the compiled script is thrown away just to be compiled again on next execution
So how was i able to change the script in game and the effect of the change happen
?
Always best is to not do the actual eventhandling in the eventhandling script
always place a function in CfgFunctions and just call that from the eventhandling script
so you don't waste alot of time re-compiling your big script over and over again
As my question got burried in other ones some days ago I will ask again :D.
So we are thinking about using "floating" camera for Liberation build system (instead of current system where item is placed in front of player) .
Would it be feasible to integrate Zeus into our resource system or would it be better to write it from scratch?
Also any suggested things I should read about to learn how to "detach" controllable camera from player unit?
Basically we want to have zeus-like camera available for player to fly around "fob" area and build stuff. Some things would consume resources (fuel, ammo, supplies) to be build.
Createcamera page on wiki
I dno about camera controls or mouse position in world tho
Like camera look around w mouse mite be hard,
Probably easiest to use zeus. But best is a non zeus solution
The problem is we need to support our resource system. Maybe I could intercept zeus build event.
I think there was an remake of old RTS game that was using zeus to control gameplay. I will have to search for it. Maybe it could be useful for me.
Yeah, zeus also has issues like when anouther player loads in, every gets lag
yeah. That project looked awesome. Please send me the link if you find it. I also searched for that a couple months back but just wasn't able to find it
I will have to look into his code then. He has nice RTS like panel in zeus-like camera.
Sadly project looks dead.
Yeah that was it.. Never fully released though :/
https://github.com/SumrakDZN/A3_OWR/blob/master/owr/ui/scripts/RscDisplayCurator.sqf Is this part of bis zeus code mixed with his customizations?
I hoped it would be simpler 😱
Maybe we don't need that new, improved build system... 🤣
confirmed yeah
for the "floating camera" maybe just 'camcurator' and camCommand example in the comments there https://community.bistudio.com/wiki/camCommand
that is "spectator like" free camera ^
This could be useful. Thanks!
uhm ... why you thought a heavily scripted UI would be simpler? 😅
for the creation of my medical display in XMS2 i already had a few dozent lines of code (and that was not even remotely as complex)
https://github.com/X39/XMS2/blob/master/X39_MS2_Scripting/Functions/DialogControl/MedicalUi/MedicalUi_createDialog.sqf
loads of stuff also hidden behind methods like https://github.com/X39/XMS2/blob/master/X39_MS2_Scripting/Functions/DialogControl/MedicalUi/TriageCardFrame/MedicalUi_TriageCardFrame_setVisibilityState.sqf
doing UI stuff always is PITA simply because you are doing UI stuff
Have you got enough indentation in there
[profileNamespace getVariable["X39_MS2_options_MedicalUi_toggleFrame_state_ToggleDrugsFrame", true], 0] call X39_MS2_fnc_MedicalUi_DrugsFrame_setVisibilityState;
[profileNamespace getVariable["X39_MS2_options_MedicalUi_toggleFrame_state_ToggleDiagnosticFrame", true], 0] call X39_MS2_fnc_MedicalUi_DiagnosticFrame_setVisibilityState;
[profileNamespace getVariable["X39_MS2_options_MedicalUi_toggleFrame_state_ToggleTriageCardFrame", true], 0] call X39_MS2_fnc_MedicalUi_TriageCardFrame_setVisibilityState;
[profileNamespace getVariable["X39_MS2_options_MedicalUi_toggleFrame_state_ToggleQuickActionFrame", true], 0] call X39_MS2_fnc_MedicalUi_QuickActionFrame_setVisibilityState;
That was back when X39 hated CBA/ACE for using macros :D
Imagine that with macros.
[OPTIONVAR(toggleFrame_state_ToggleDrugsFrame, true), 0] call FUNC(DrugsFrame_setVisibilityState);
[OPTIONVAR(toggleFrame_state_ToggleDiagnosticFrame, true), 0] call FUNC(DiagnosticFrame_setVisibilityState);
[OPTIONVAR(toggleFrame_state_ToggleTriageCardFrame, true), 0] call FUNC(TriageCardFrame_setVisibilityState);
[OPTIONVAR(toggleFrame_state_ToggleQuickActionFrame, true), 0] call FUNC(QuickActionFrame_setVisibilityState);
I guess someone used space indentation before.. And then thought I'll do tabs now. So replace all space with \t now
no github doesn't
nah.. Even if you replace all tabs with spaces the indent is too much
if(str _currentPos == str _pos1) then
{
[false] call X39_MS2_fnc_MedicalUi_DiagnosticFrame_setVisibilityState;
}
else
{
[true] call X39_MS2_fnc_MedicalUi_DiagnosticFrame_setVisibilityState;
};
That's a great way to waste 8 lines with horrible indent to do something that could be written way more readable in a single line.
[_currentPos isEqualTo _pos1] call FUNC(DrugsFrame_setVisibilityState);
Okay so took a look at the attach and got the extinguisher in hand and moveable, the issue now is getting a addaction for turning on the script and turning off the script, how would i go about adding the addactions 1 to start and one to end the action, attched is the code:
null=[12,this] execVM "AL_waterfall\al_waterfall_start.sqf";
Is there a way I can clear the remote execution JIP queue?
not with #arma3_scripting no. although.. I think #arma3_scripting might be able to restart the server
Ah damnit, might just have to restart then
technically if you assigned IDs to the RE you can remove all of them
In this case it was a hacker that did it, trying to avoid having to restart
yeah, nah you have to restart
Just found out that https://pastebin.com/archive/sqf is a thing. See all recently posted SQF scripts on pastebin and laugh about their quality.. Or learn from them.. Maybe
https://pastebin.com/5Au3rixd HAH! The syntax highlight on the select _i 😄
one more reason to set pastes to private :V
# 👀
so much life stuff in there
Hi, im trying to create the following ... Restricting vehicle driver seat to specified unit type.
Im using a old Pilot Restriction script and trying to add a new kind to restrict, logistic vehicles.
_crew = ["I_crew_F"]; //---------------------------------- Logi Units
_logi = ["I_G_Van_01_fuel_F"]; //------------------------- Logistic Vehicles
_iampilot = ({typeOf player == _x} count _crew) > 0;
while { true } do {
_oldvehicle = vehicle player;
waitUntil {vehicle player != _oldvehicle};
if(vehicle player != player) then {
_veh = vehicle player;
if(_veh isKindOf "_logi") then {
if(({typeOf _veh == _x} count _aircraft_nocopilot) > 0) then {
_forbidden = [_veh turretUnit [0]];
if(player in _forbidden) then {
if (!_iampilot) then {
systemChat "Co-driver seat reserved for Logistic units";
player action ["getOut",_veh];
};
};
};
if(!_iampilot) then {
_forbidden = [driver _veh];
if (player in _forbidden) then {
systemChat "Vehicle reserved for Logistic units";
player action ["getOut", _veh];
};
};
};
};
};
im still learning scripting so if i made a dumb error please point ti out
@robust hollow ok, removed
any idea what im doing wrong, if im not mistaken i should be able to specify the vehicle type to add a new class
_veh isKindOf "_logi" pretty sure thats not how the world works. you would want something like typeof _veh in _logi. also i think this would be better off in a GetInMan EVH but im off to bed so hopefully someone else can explain that.
this is from an existing pilot restriction script that currently wokrs, as mentions im mearly trying to add a new type
I think I made something like this a year or two ago, lemme find it
cool
ill check it..thx
@lone glade this is a pilot restriction script, how do i add specific vehicles restricted to specific unit types....just to be clear im not looking for pilot restrictions, im looking to add new vehicles to be restricted
it's the exact same principle, just use your brain
hi i'm trying to have a trigger activate when any civilain dies in it without naming all the civilains. is it possible? i have a trigger set to civilian present and have tried !alive_x , !alive_x forEach thisList; in the trigger condand no joy any ideas please
^ _x is a magic variable that stores the current index for a loop (foreach, apply, array select code)
in the second one you're missing code brackets { }
you're also missing a space between alive and _x in both
oh i thought x was ref to any and not specific...dam still trying sorry
when i try {!alive _x} forEach thisList; it says type nothing expected bool whatever that means and for {!alive _x} thisList;
({!alive _x && side _x==civilian}count thisList)>0;
first one is correct and it's probably the trigger field shitting itself like usual, second one isn't valid
and also I was trying to make him come to the solution by himself :/
@copper raven that didn't work thanks tho
I almost never use triggers,weird.
small update to the thing that happened yesterday, they removed it and reuploaded it into a different pbo name. It is dmca'd now as they did not want to communicate
I just wanted to thank all of you who stood up and helped me figuring this out.
So I am trying to make a admin cam/menu here, And I am setting up the initialiazion/loading for the dialog, It stops where it tries to initialize the ListPlayers . So it doesnt do the hint 3. And in this sqf file I have an include that includes an .inc file with all the IDC's. Anything wrong seen in this code?
REMOVED CODE
no errors in RPT or anywhere?
Does it work too if you replace IDC_ADMINCAM_LISTPLAYERS by the actual IDC manually?
Well I'll try.. But should that matter? as I am including an .inc file that has defines inside.
easier to rule things out one after another
Alright will try that, gimme a few momento
How about adding a hint str [_ctrlListPlayers]; under the displayCtrl line
could be. Don't know.......... waait
is that the onLoad EH of the display?
That might fire before the actual contents are loaded.. maybe
onLoad = "[""Load"", [_this]] call life_fnc_adminCam"; is in the display (.h file). Which executes that code ^^
Should I do a check if display is opened or something?
the hint I posted above will tell you if the display not being fully initialized is the problem
Alright will try it out
for adding the eventhandler
you could instead do that in the onLoad EH of the actual playerlist control
yeh, but I wanted it to be in the sqf
yeah. Just call another SQF script from it's onLoad
alternative... wait a frame or two and execute your code again
but passing displays/controls around is tedious because Arma can't serialize them and complains about it
^ nope, just use unscheduled like a big boi
I'd say that too..
no serialization needed 😛
but this is life apparently
aaah, the land of "mission" dialogs and bad sqf 😄
xD
Naah, its not just a camera and not all my staff know sqf
Well I solved the issue in another way...
case "init": {
_params = [ _this, 1, [] ] call BIS_fnc_param;
private _display = _params select 0;
//--- Store display in uiNamespace
uiNamespace setVariable ["Life_AdminCam", _display];
//--- Effects
[_params, "Life_AdminCam"] call BIS_fnc_guiEffectTiles;
_display displayAddEventHandler [ "Unload", {[ "UnLoad", _this ] call life_fnc_adminCam; uiNamespace setVariable [ "Life_AdminCam", nil ];} ];
//--- Call
["Load", _params] call life_fnc_adminCam;
};
I made a init mode. And using BIS_fnc_param; seemed to work..
Not sure how that fixed that
but yeh. Thanks for the help though!
check that page https://community.bistudio.com/wiki/BIS_fnc_param
Well isnt that ^^ just like doing [_this]
it's just param with an extra step
so I needed to do [[_this]]?
Also I saved my gui with a name test but then it disappeared.. It copy it as code, did it save to somewhere else?
you... you used the GUI editor didn't you?
yeh
REEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE
oh sweet summer child....
lol
?
don't use it it creates shitty configs
Well I tried it first time
I usually use arma dialog creator
Is that what everyone else uses?
nope
What does everyone else use then?
nothing?
oh, cool
I write mine by hand, it's extremely fast once you get the hang of it
Any Advice on how I could get the hang of it?
i think your starting point would be creating a controls group and learning how coordinates work
pretty much
would love to see a tutorial, +1
honestly i dont feel like it because theres just going to be 5000 life kids moaning for more help 😄
^ yes, exactly
I do help some people here who ask for help with specific issues related to UI tho.
Oh btw 1 last question, anyway I can disable the hud of the BIS_fnc_camera? There isnt any parameter for it to disable it...
if it's the splendid cam, press backspace
yeh but Isnt there a way in code?
open up the function
^ nope
showhud unrelated ;D
wouldnt that "showHud" disable everything that is a hud? So there is no other way than opening the fnc and editing it?
player hud being engine stuff that you dont influence with other scripting stuff
case (_key in actionkeys "cameraInterface"): {
_return = true;
_ctrlOverlays = [_display displayctrl 3142,_display displayctrl 3143];
if (BIS_fnc_camera_visibleHUD) then {
{_x ctrlsetfade 1;} foreach _ctrlOverlays;
(_display displayctrl 3142) ctrlenable false;
cameraEffectEnableHUD false;
} else {
{_x ctrlsetfade 0;} foreach _ctrlOverlays;
(_display displayctrl 3142) ctrlenable true;
cameraEffectEnableHUD true;
};
BIS_fnc_camera_visibleHUD = !BIS_fnc_camera_visibleHUD;
{_x ctrlcommit 0.1} foreach _ctrlOverlays;
};
``` that from BIS_fnc_camera ^
so... like that ^ 😀
😮
hmm but I would still need to transfer the BIS_fnc_camera into my mission then edit it right?
_this setUnitTrait ["camouflageCoef", 1];
Is this a proper execution of a script to modify a player's camo coefficient?
Or am I missing something?
it is
probably just wait until that dialog will be created, return the controls and do what ever you want with them and showHUD and cameraEffectEnableHUD will helps too, IsS127
anyone uses scripted "Guarded Points" ? is there any "area radius" or that is just position or object ? 🤔
probably nobody... 😄
is it possible to add a custom message via the the command #exec ban?
Do you mean like a dialog that will open when the player gets kicked for the player?
@junior stone
https://community.bistudio.com/wiki/serverCommand
Setup serverCommand on the server and make your own ban function then run the guiMessage before kicking and then kick. I'm not sure if getting banned and forced out of server will leave the dialog open
@kind torrent see https://community.bistudio.com/wiki/setUnitTrait for all possible values 😉
why does this not work?
titleCut ["", "BLACK FADED", 999];
[] Spawn {
titleText ["6 Months after the withdraw of CSAT","PLAIN DOWN"];
titleFadeOut 7;
sleep 5;
titleText ["CSAT decided to unstablize the region again","PLAIN"];
titleFadeOut 7;
sleep 5;
titleText ["FIA is starting a new rebelion","PLAIN DOWN"];
titleFadeOut 12;
sleep 10;
titleText ["NATO still has troops on the ground","PLAIN"];
titleFadeOut 9;
sleep 7;
titleText ["Operation Sustained lion","PLAIN"];
titleFadeOut 12;
sleep 10;
// Info text
[str ("FIA Camp"), str("Medril Ares"), str(1) + "." + str(3) + "." + str(2036)] spawn BIS_fnc_infoText;
sleep 3;
"dynamicBlur" ppEffectEnable true;
"dynamicBlur" ppEffectAdjust [6];
"dynamicBlur" ppEffectCommit 0;
"dynamicBlur" ppEffectAdjust [0.0];
"dynamicBlur" ppEffectCommit 5;
titleCut ["", "BLACK IN", 5];
};
it shows the last }; as blue, i think that is the issue
but i don't know how to fix it
missing " at unstablize the region again
thanks
i suggest installing some syntax highlighting for your text editor of choice
params ["_unit", "_hitSelection", "_damage", "_source", "_projectile", "_hitPartIndex", "_instigator", "_hitPoint"];
private _currentDamage = [_unit getHit _hitSelection, damage _unit] select (_hitSelection isEqualTo "");
if (!isNull _source && {_projectile isEqualTo ""} && {(vehicle _source) isKindOf "Car"}) exitWith {_currentDamage};
_damage
Any ideas why this anti-VDM script doesn't always work? Occasionally players will still die from being hit by a vehicle.
desync, the force of the impact when they touch the ground killing them, whoever is driving switching seats
also hd not 100% reliable... try maybe with dammaged*
both of them are unreliable for something like this
also slow ^ afaik
nah
it just fires for every single goddamn selection damaged, even for damage propagation
which makes it a PITA to deal with
someone said was some issues with hd and too late situation
that's not possible
idk
So nothing much I can do unfortunately?
nope.
Too anyone who may be able to help i need to place this code into an AddAction how would i go about it?
null=[12,this] execVM "AL_waterfall\al_waterfall_start.sqf";
take it.. And place it in a addAction... ?
I mean.. Just do it. What's preventing you from doing it
Im not sure on the syntax as i tired following the examples on the link you provided and something in the code i have added just comes up with syntax error
example 1. The 3rd one.
player addAction ["Hint Hello!", { hint format ["Hello %1!", name player] }];
your script
-> player addAction ["Hint Hello!", { [12,this] execVM "AL_waterfall\al_waterfall_start.sqf"; }];
just to be clear "this" is regarding the object its placed in? instead of player
oh right
this won't work
https://community.bistudio.com/wiki/addAction -> parameters -> script
player addAction ["Hint Hello!", {
params ["_target", "_caller", "_actionId", "_arguments"];
[12,_target] execVM "AL_waterfall\al_waterfall_start.sqf";
}];
Would there be away to stop this executing with a Addaction too?
like turning it on or off?
the waterfall?
yeah
for some context i have added the waterfall script to a fire extinguisher for to put out fires, the player would carry the extinguisher to the location and use an addaction to start the waterfall
if you have a script to stop the waterfall then you can stop it of course
The "al_waterfall_start.sqf" is a continual thing , "start" is referring to where it begins not the motion of it starting as the "waterfall_end" is the splash effect, so far i can run up to the extinguisher and turn it on with that code you sent but if there is a addaction to end the process?
So there is no way to stop or cancel an addaction once it begins?
Im using the script from this http://www.armaholic.com/page.php?id=32409 just adapting it to work as a fire extinguisher
"stop or cancel an addaction" doesn't make any sense
a action is not something that runs continuously
Ah my mistake, thank you for your help so far 😃
what the max 2d array limit again? like is it feasible to cache int value for large/huge terrains with 1x1m cell size?
@limber tangle you can use exitWith to stop your running script at some point. If you want to make addAction executed once there is an argument in its syntax that acts this way
@limber tangle By the way, you do not need to do:
nil = [] execVM "blah";
It's just an editor qwirk, the executing script has to return a value
[] execVM "BlAH"
even execVM "blah.sqf";
Eh. Lol
@still forum ty
@peak plover the idea is to cache the vegetation density rather to compute it on the fly all the time again
I wouldn't put that into one huge array though
maybe make seperate ones for each 1kmx1km square or something
alright
Hmm, even more interesting. Why do you need the veg. desnity?
I don't see it 😮
CF_BAI uses vegetation density as a proxy for vision to adjust AI subskills to balance the AI in the woods.
But the approach effectively limits you to roughly 400 AI before the algorithm tops out. So its "slow", not stupidly so that is more than enough for most but faster and cheaper is better
If you could increase the number of times you can check vegetation density then you can increase the rate the algorithm runs and get better fidelity of skill adjustment.
It is a trade off, if you precompute it then you have less accuracy on the density calculation but higher speed, so you can check it more often and adjust the AI skills more often. The current trade off works well though, well worth playing with it and dialing in the skills based on how your community plays, solves a bit issue with Tanoa and other forests.
well you could precompute at even higher precision and store the data as config arrays
and then dynamically cache the data to sqf land where you are currently playing in (to avoid contineous config reads or loading all to sqf land)
@tough abyss how does the presence of headless clients affect the number of AI before the algorithm tops out, if at all?
@gleaming oyster @unborn ether Thank you both!
Got the scripts to work great now in singleplayer my only issue now is that they will not work in multiplayer
Is there something in this script here that can make it work on a dedicated server?
this addAction ["USE", {
params ["_target", "_caller", "_actionId", "_arguments"];
ex1=[12,_target] execVM "AL_waterfall\al_waterfall_start.sqf";
}];
this addAction ["turn off", {(_this select 0) setVariable ["is_ON",nil,true];}];
addAction is local, so you will have to execute it on all players (look at remoteExecCall)
hey there - I wanna create a small editor-interface. My problem is, that i can't find any possibility to place an object at the mouse cursor inside a building on second floor. Just like in 3den editor. does any1 know how to do that? 😦
3:18:37 Error in expression <ontainer getVariable["inUsePlyr",_unit])=!_unit) exitWith{hint"Baskası kullanı>
3:18:37 Error position: <=!_unit) exitWith{hint"Baskası kullanı>
3:18:37 Error Missing )
3:18:37 File core\functions\fn_onTakeItem.sqf [life_fnc_onTakeItem], line 36
if (_container getVariable ["inUsePlyr",_unit] =! _unit) exitWith {
hint "Baskası kullanırken itemi almaya calıstıgın için item ikinizdende silindi. ZARAR KARSILANMAYACAKTIR!";
[_item,false,false,false,false] call life_fnc_handleItem;
true;
};
where is error i can not found it
from that script snippet there isnt a bracket issue, the error has a ) at the end of the getvariable array but its not in that script so 🤷 also is =! intentional or did you mean !=?
looks like syntax for getVariable is wrong, you have _unit as default value, should be _container getVariable ["inUsePlyr", objNull]
well it could be the variable is nil when no one is using the container so if the goal is to only let one person access/take from the container at a time (which i assume it is) then using _unit as the default would make sense 🤔
that wouldnt have anything to do with the bracket issue tho which i feel he fixed before pasting that code snippet cause the if condition is different in the error.
also =!
if !(_container getVariable ["inUsePlyr", objNull] isEqualto _unit) exitWith {/* blah */};
``` looks better to me 😀
hey guys to get this to fire for all players on the server how do i change this line to remoteexec null = [this] execVM "scripts\rock.sqf";
to fire for all players on the server
[[], "scripts\rock.sqf"] remoteExec ["execVM", -2]; //--- all players
[[], "scripts\rock.sqf"] remoteExec ["execVM"]; //--- all players + server
```more info there > https://community.bistudio.com/wiki/remoteExec
@lament grotto
ty can this go into init box in a trigger?
or can it be used in addctions liek this line: task1 = t1 addAction ["Speak with civilian", "tasks\task1.sqf"];
yes x2
okay sweet how would I do that for the addaction line, I am having some trouble with understnading wiki
well... just add it in addaction, feel free to do so 😀
Some people save AARs and stuff
It's using a DB and saving it there, right?
How do they usually save the data there?
Like do you have a table for every mission and just save there or..
for [{_i = 0}, {_j = count(_polygon) - 1}, {_i < count(_polygon)}, {_j = i++}] do {};
Is there an issue with the way that is setup?
trying to convert it from javascript:
for (var i = 0, j = vs.length - 1; i < vs.length; j = i++) {}```
Ok quick question "Is there anyway to get the collective amount from choppers?" i know i cant get the throttle position of a fixedwing with AirplaneThrottle (vehicle player) but there must be a way to get the same from a chopper
Possibly the animationphase of the throttle if there is one?
donno your use case but
for [{_j = 0}, {_j = count(_polygon) - 1}, {_j < count(_polygon)}, {_j = _j + 1}] do {};
The original c code is c int pnpoly(int nvert, float *vertx, float *verty, float testx, float testy) { int i, j, c = 0; for (i = 0, j = nvert-1; i < nvert; j = i++) { if ( ((verty[i]>testy) != (verty[j]>testy)) && (testx < (vertx[j]-vertx[i]) * (testy-verty[i]) / (verty[j]-verty[i]) + vertx[i]) ) c = !c; } return c; }
It determines whether a point is within a polygon
then yer good luck lol
:P, had it working but there were a few inconsistences. Figured i'd re-convert it to make sure
I did it a odd way before
like i said i can only see that i++ was the issue
checking it out now
also look at the link @velvet merlin posted
yeah, theres where I got the original syntax from for the loop
kk
oh shit
@dry zephyr probably not a lot. It will just update the unit skills less often if it exceeds time so it is not a big problem.
@little eagle What are your initial thoughts to the idea that CBA gains a few functions for sub skill "pipelines" so that mods can be instantly compatible if they change subskills through the API. I can go about writing it and sending a pull request but I wanted to get your thoughts on it. I ask because VCOM_AI probably isn't compatible (and neither is TPWCAS without our direct work) because it assumes its the only mod changing it and I imagine there are a lot of mods that do the same thing.
Question then is if these previously standalone mods now want a CBA dependency
If it works and is useful. Then there is no reason not to add it to CBA.
Is this the right room to ask about spawning AI on scripts and that, or should that be #arma3_scenario ?
if you wanna ask specifically about scripts then here.
Alright thank you
I've become stuck with selecting a random player with this script
_heli1 = [];
if (isServer) then {
_crew1 = createGroup EAST;
_heli1 = [getMarkerPos "aiSpawn", 140, "RHS_Mi8mt_vdv", _crew1] call BIS_fnc_spawnVehicle;
_unit = (switchableUnits + playableUnits);
_randomUnit = (selectRandom _unit);
_wp1 = _heli1 addWaypoint [(position _randomUnit), 300];
_wp1 setWaypointType "TR UNLOAD";```
This line gives "Error, type Array expected Group"
```_wp1 = _heli1 addWaypoint [(position _randomUnit), 300];```
Wouldn't the _randomUnit = (selectRandom _unit); select an object/group for the position? I'm fairly new to scripting but I have a semi idea of how it works
BIS_fnc_spawnVehicle returns Array - 0: created vehicle (Object), 1: all crew (Array of Objects), 2: vehicle's group (Group)
meaning your _heli is [vehicle, [], group]
meaning _heli is an array
but addWaypoint takes unit or group
so you have to take the group out of the _heli array
_heli select 2
Ah ok, I'll try with that and mess around with it. Thanks
@astral tendon #community_wiki <--
ok
A #arma3_config config from a #arma3_scenario description.ext on the #community_wiki
Doesn't seem like #arma3_scripting is the correct place for that
anyone knows if "CBA_fnc_createTrigger" also creates the trigger for every client connected as in JIP compatible and all that.
Ah, dang.
Seriously? A global created trigger is not propagated to JIPs. WTF BI
I assume editor placed one are an exception then.
oh yeah. overlooked that.
no makeGlobal flag means.. makeGlobal is enabled
but setTriggerArea/setTriggerActivation/setTriggerStatements are all local.
and the triggers variable name is also only set locally. Seems like that CBA func is meant to add local triggers. But since A3 1.43 BI made them global by default
The CBA function should probably be updated to create only local trigger for proper backwards compatibility.
Yeah that bit me in the butt at some point, trying to make triggers which are the same for everyone, server and client. then i noticed the trigger were note working for clients.
You can customize a van like in the vehicle arsenal, but how can you do that in script? Whats the command I need?
There is an export button in the vehicle garage
Oh
cheers ❤ But I also found this https://community.bistudio.com/wiki/BIS_fnc_initVehicle
is there a way to tap into ACE3's advanced throwing event? I'm trying to run a script on throwables, but the "Fired" EH doesn't detect items thrown with ACE3's advanced throwing (obviously), so I need an alternative
@half inlet that is because another EH will be fired.
["ace_firedPlayer", {
params ["_unit","_weapon","_muzzle","_mode","_ammo","_mag","_projectile"];
}] call CBA_fnc_addEventHandler;
i have an issue adding some actions remotely to an AI in MP
i use this code
[_someAI, ["ActionName", {
code;
}]] remoteExec ["addAction", 0, true];
my problem is, that it will add the actions to the rangemaster everytime someone connects, how do i get it to execute only on the newly connected client?
Where are you executing it from? Init field?
well then, from where does the script start. it sounds like you can just remove the remoteExec on addaction and it will work
then it wont show the actions for players that join the game
it would work on the hosting client. but not on server
ah, thanks for the heads up @digital jacinth
so i am calling it on server side, but it must add the ctions client side
if those lines of codes are executed only on server side, then it sohuld work. I take it there are now more then one "Reset Stats" addactions then?
bunch of actions that i add to a rangemaster to control a firing range
are you sure that the code part is only ran once on the server? that is the only way there are multiple addactions of the same kind
i guess the issue is that with remoteExec ["addAction", 0, true]; i execute on every client whenever someone connects
no, it should be only executing on the newly connecting client
hmm
the last "true" is the jip flag
[...] remoteExec ["addAction", 0, true] would run the addAction command locally for each connected machine (including server), and the JIP flag will ensure it runs for future JIPs. Since you are getting duplicate actions either:
- There is a serious bug with remoteExec you only stumbled upon, which is very unlikely since many use that command
- You are accidentally running the command not only once. Either because the server runs it repeatedly, or non-server clients also run it.
about that jip flag. you can change it out with _rangemasterso it will be removed from the jip queue once _rangemaster has been deleted
really looks that way
that part of the code is ran more then once
I know it is a script running another script and so on. But something must start it all. Either a special script like init.sqf or an event handler. If you tell us what we might be able to help more.
so it all starts with the init.sqf. which calls the init of my range. The range is marked with an area marker on the map, objects in the map are filtered in some way and it automatically finds target types and the rangemaster
you probably should move it to initserver
but i use if (!isServer) exitWith {}; in the beginning of the files. so it should only execute once on server startup, no?
i mean only when the server starts up, not when clients do
why though? init.sqf with isServer check is the same as just using initServer
trying to make it easy to use for others. otherwise i would probably also work with the initPlayerServer-Local files
"just add this line to the init" works for most
depends, if you are adding cfgfunctions entries for your script, the easiest would be an autorun, no init.sqf would be needed.
besides, if it is server only, just tell the to putit in initserver
basically the same
anyway, the problem is i am on that server, i remoteexec somethin on the clients. and for some reason the actions end up showing multiple times....
So you have something like:
myfile.sqf - in here you have remoteExec call.
And in init.sqf you
if (!isServer) exitWith {};- later you run
myfile.sqf.
So are you sure nothing else is runningmyfile.sqf
Anyway, about init.sqf and initServer.sqf and so on. I always just use init.sqf with isServer guard and the like. Sure you can split stuff into initServer.sqf. But since both scripts are spawned and run in scheduled environment, you could get into trouble if one of the scripts create a object another need and so on... Frankly I never seen any benefit from initServer.sqf.
Not sure what to tell you then. I will still bet money on that from what you describe, that remoteExec command is being run multiple times.
yep appears like it then. i thought it was because of the jip stuff but i guess i got that wrong. will look somewhere else then. thanks for the help
If I'm understanding this correctly, https://community.bistudio.com/wiki/Initialization_Order and don't forget to check init of placed objects and trigger/waypoint activation blocks
This brings up a question - I guess there's no equivalent to a stack trace in SQF (list of calls leading up to one that is intentionally or unintentionally erroring)?
A stack trace would be lovely, as would a more precise point to the problem variable or syntax error. While we are wishing for unicorns and rainbows I would also like full dynamic code update while the game is running for linked code so we can change it without restarting the game.
@dry zephyr I think Dedmen was developing a call stack based on his intercept addon
already done
The best I can come up with on short notice is:
trace =
{
params ["_args"];
diag_log format ["%1 %2 %3 %4 %5",
diag_frameNo,
_this select 0,
diag_activeScripts,
diag_activeSQFScripts,
diag_activeMissionFSMs]
};
Called with [_this] call trace; in function that is getting called. Doesn't give you a stack trace, but provides maybe a little context.
Could add serverTime to that, but wiki suggests is unreliable.
that doesn't work like you think it does
if you want a callstack you HAVE to either use macros or a proper debugger / profiler (ded's)
Yes, it doesn't provide a stack trace, just lists in RPT each time the function you put it in is called, what the args were, and the information that active scripts/FMS gives you, to the extent that it is useful.
Ironically, running it clued me into that fact that there is a "fn_feedbackMain" state machine running on clean mission start that seems obsessed with suffocation.
it's used to check if the unit(s) can breath or not
It often lands in suffocation state when the log statements goes into RPT, but it looks like it also checks fatigue and, my favorite, "Check_Not_Burnin".
@still forum such that if @proven crystal were running it, he could find out where duplicate invocations of his bit of addAction code is getting called from?
yeah
Callstack:
[] L7 (z\ace\addons\common\XEH_preInit.sqf)
[CBA_fnc_preInit] L109 (x\cba\addons\xeh\fnc_preInit.sqf)
_x: ["", "preInit", {call compile preprocessFileLineNumbers "z\ace\addons\common\XEH_preInit.hpp";}, true, []]
Like that. Including local variables
when I set BIS_fnc_holdActionAdd to take longer than 10 or so second the dialogue fades away (action is still going will eventually complete). anyone know how to make addactions/holdactions dialog stay on the screen?
Hey guys im making a simple script for a mission and i need the player to go invisible and visible again via addaction for the invisible part i have
player addAction ["<t color='#FF0000'>Go Invisible</t>", {[player,true] remoteExec ["hideObject",-2,true];}];
Which works, I don't know how to make them re-appear tho. Anybody got any idea's they're willing to share?
i tried changing true to false that doesn't work tho... sorry rather new to this.
thats the script someone gave to me for it 😛 and it worked so i guess i didn't bother changing something thats not broken, However i find out now its broken so let me try that
hideObjectGlobal should be called on server though. So you still need remoteExec.
thanks got it to work now, Appreciate it 😃
In an FSM, if the condition code errors, should the FSM be left spinning and erroring or is there a way to shut down the FSM on scripting error in any of the conditions?
is possible to get player UID from remoteExecutedOwner?
@still forum ty
if (isRemoteExecuted OR isRemoteExecutedJIP ) then {
if !(remoteExecutedOwner isEqualTo 0) then {
_index = allPlayers findIf {owner _x isEqualTo remoteExecutedOwner};
_unit = allPlayers select _index;
_uid = getPlayerUID _unit;
_name = name _unit;
diag_log format["[%1 | %2] remoteExecuted %3 on %4",_name,_uid,"scriptName",time];
};
};```
if (isRemoteExecuted OR isRemoteExecutedJIP ) then {
This is pointless.
just isRemoteExecuted?
ok, ty
If used in SP or outside of remote executed context, the command returns 0.
remoteExecutedOwner != 0 also implies isRemoteExecuted
So you could just delete the first line completely.
if !(remoteExecutedOwner isEqualTo 0) then {
_index = allPlayers findIf {owner _x isEqualTo remoteExecutedOwner};
_unit = allPlayers select _index;
_uid = getPlayerUID _unit;
_name = name _unit;
diag_log format["[%1 | %2] remoteExecuted %3 on %4",_name,_uid,"scriptName",time];
};
Everything else is superfluous.
@little eagle ty
yw
Uh, reading...
Anyone think it's worth it fixing CBA_fnc_createTrigger?
That function seems so pointless. :x
Could atleast add the makeGlobal flag and set it to false
so it again does what it was doing when it was created
and maybe still add a deprecation warning?
Never did those dep warnings in CBA.
trying close inventory dialog
{_x addEventHandler ["inventoryOpened","if (count (crew vehicle player)>1) then {hint 'This';closeDialog 0;false;};"];} forEach crew vehicle player;
but dialog not closed
trying close inventory dialog
What? Why?
but must be local for the EH to trigger 🤔
This is looks really wonky.
crew vehicle player
crew is something temporary. What if this eh will be added to the crew at mission start, but then someone else enters the vehicle? The eventhandler should be added to every unit no matter if crew at the mission start or not.
@little eagle when in player vehicle crew>1 inventory must be closed
but what is the count changes after post mission start?
@little eagle changed to sqf player addEventHandler ["inventoryOpened","if (count (crew vehicle player)>1) exitWith {hint 'This';closeDialog 0;false;};"];but nothing changed