#arma3_scripting
1 messages ยท Page 419 of 1
I mean, phase not phace ๐
That's what it says.
So give the object a name and call it with that?
not necessarily, hitPart passes the object being hit doesn't it?
yes.. I tracked it with this: this addEventHandler ["hitPart", {systemChat str (_this select 0) select 5)}]
hitPart returns array
As you guys taught me earlier today.
Hence array expected object
So: this addEventHandler ["hitPart", {systemChat str ((_this select 0) animationSourcePhase "plate_1")}]
Hm, okay.
see the code you posted before this one^ and see where your error is
cross reference with:
https://community.bistudio.com/wiki/Arma_3:_Event_Handlers#HitPart
okay so about when I assked about getting actions from the action menu
so what im tryna do is
say theres a helicopter that has a action that opens like the rear ramp
and theres one that closes it
is there away I can get hte id of that action and then have it where the ramp goes down,waits 3 seconds and goes back up again
Okay, alganthe I need you to give me the code just straigth. I know you want me to learn but I can learn a lot better from that than from this frustration of not understanding.
Plus, on a clock here.
this addEventHandler ["hitPart", {systemChat str ((_this select 0) select 0 animationSourcePhase "plate_1")}]
@edgy dune yes it's possible afaik.
Okay now it got harder... It prints 0 no matter what... Animations are between 0 and 1, so it should print 1 from shooting it on the other side.. But either side is giving me 0.
wat im also tryna do is key bind that action to a key,which for some reason in this mod i have doenst have the open/close ramp mapped
i'm assuming they're config actions, you can't add shortcuts for those "directly" without editing the mod
you can, however, add an onKeyDown EH on display 46 with a similar condition that is used for the action
ill look in to that then
So alganthe, any ideas what next?
I mean, considering there's a number behind "plate_" it's possible there's an anim for each one of them
Yeah..
Try
hintSilent str (selectionNames cursorTarget)
It should show you all target selections.
Or go through the config files, you'll easily find those.
or even better, write a func that does it for you and returns the proper anim
I know the selections. I tested it out already.
on this note, sleep time.
selections are not equel to animations.
They are named "plate_1" through "plate_6".
But I need more that that to have it return a different value when white and red are hit.
return it yourself "manually" with EH
The dueling target has 2 sides on each 6 "plate_#", white and red.
I want to make the dueling target so that when a white side is hit nad it turns red, it returns variable _white to the execVM "point.sqf", and when a red side is hit and it turns white, it returns variable _red.
_white and _red are examples in this case, don't get attached to them.
I assume just rotating the object 180ยฐ is not a valid replacement? (scrap that, colors remain the same...)
Yeah, and it doesn't even have a different surface on either side.. Same surface on both sides.
you can just reset them at start like you whant, add them in to array_white after hit add them in to array_red...etc
@long gazelle should the target still turn?
Yes..
The idea is a competition, who ever gets all of his sides plates turned to the opponets side wins.
sldt1ck that could work..
Wouldn't need the animation..
Now I just need to figure out how to assign them to arrays with eventhandler.
it's there in first link ๐
How do I remove them from arrays?
Haz can give you a link ๐
Simple subtraction?
@long gazelle As I'm currently working on targets, it seemed like a nice challenge. It's hacky, but works.
private _EH = (cursorTarget addEventHandler ["HitPart", {
private _colorRed = "#(argb,8,8,3)color(1,0,0,1.0,CO)";
private _colorWhite = "#(argb,8,8,3)color(1,1,1,1.0,CO)";
private _target = ((_this select 0) select 0);
private _selectionNames = (selectionNames _target);
private _selectionArr = ((_this select 0) select 5);
private _selection = if ((count _selectionArr) < 1) then {
(_selectionArr select 0);
}else{
private _validPlate = "";
{
if (_x in _selectionNames) exitWith {_validPlate = _x};
} forEach _selectionArr;
_validPlate
};
private _selectionIndex = (_selectionNames find _selection);
if (isNil {_target getVariable "currentColor"}) then {
if (_selectionIndex < 3) then {
_target setVariable ["currentColor", _colorRed];
}else{
_target setVariable ["currentColor", _colorWhite];
};
}else{
if ((_target getVariable "currentColor") isEqualTo _colorRed) then {
_target setVariable ["currentColor", _colorWhite];
}else{
_target setVariable ["currentColor", _colorRed];
};
};
private _currentColor = (_target getVariable "currentColor");
_target setObjectTextureGlobal [_selectionIndex, _currentColor];
hint format ["Set texture: %1 on object: %2 / selection: %3", _currentColor, _target, _selection];
}]);
player setVariable ["myEH", _EH];
_a = _a - _b?
And I have NO idea what is happening in that code... (mostly because too long)
execute it on your target and try it out, I'd say that would be the least you can do lol
basically it figures out what the selection was you hit, figures out which color it needs to set and applies it to the according selection.
If you executed it correctly on the target, it should hint what it's doing as you shoot it.
so maybe try executing it again
it also stores the EH in a variable on your player
well, the index that is.
How do I get the selection without the EH?
For example if I wanted to set the selection "plate_1" to array_white when the object is builded?
that would be this part of the code:
private _target = cursorTarget;
// get all selections
private _selectionNames = (selectionNames _target);
// find plate_1 index
private _selectionIndex = (_selectionNames find "plate_1");
// set white texture on index
private _colorWhite = "#(argb,8,8,3)color(1,1,1,1.0,CO)";
_target setObjectTextureGlobal [_selectionIndex, _colorWhite];
Okay why do you keep using the cursor target?
you can swap that for whatever you like.
No I can't, I don't know the code.
Okay I read what you just wrote and I don't understand any of it.
Something like that but it was a bad example.. I get the feeling what I wanted didn't convey through..
this setObjectTextureGlobal [((selectionNames this) find "plate_1"), "#(argb,8,8,3)color(1,1,1,1.0,CO)"];
put that in init
Again, no idea what half of that does..
Keep in mind that I am at level 0 with scripting.
I thought u just wanted it to work and were on a clock? You can just look up the functions or read what I write.
that last line
I eplained above^
it's those lines, compacted into 1 for easier use in 3den
Oh right, my clock ran out an hour ago..
So now I'm just doing it because of stubborness issues..
{ if (_x select [0,5] isEqualTo "plate") then {this setObjectTextureGlobal [((selectionNames this) find _x), "#(argb,8,8,3)color(1,1,1,1.0,CO)"];};} forEach (selectionNames this);
^above is to change all of them to white
re-read what I said. Some things might not make any sense at first glance, but it's about getting the logic. There are so many ways to get there.
imo, the eventhandler is the easiest one. no setup required ezpz
๐คฆ
private _arrayB = missionNamespace getVariable ['perf_arrayB',(allMissionObjects "Building")];
it runs allMissonObjects every time, even 'tho it's not empty
i really missed my 3ms
I bet you miss that lifer code even more Nigel
๐ ๐ณ ๐ด ๐น ๐ฆ ๐ฑ ๐ฎ ๐ซ ๐ช ๐ท
๐
What could cause vehicles from an optional mod (loaded on the server with servermod launch parameter) not being detected properly when passed from a client to the server such as through a remoteExec?
"not being detected properly when passed from a client to the server such as through a remoteExec" - please elaborate
So lets say I get a nearby vehicle on the client with nearestObjects, and then send that vehicle to the server through remoteExec to store and delete, but nothing happens. Only with the modded vehicles though.
can u create a vehicle just like that on the server ?
deleteVehicle
missionNamespace setVariable ['nig_vehicle',cursorObject,true];
Does that kind of stuff work 'tho?
that is weird, any modded vehicle or just a certain type?
My bad, turns out it does detect them, was just with my database setup. Was set to store class names with a max of 32 characters so was bugging out
ahha
_arr = [0,10,20,30,40,50];
_deleted = 0;
for '_i' from 0 to (count _arr - 1) do {
if (_i in [1,3]) then {
_nil = _arr deleteAt (_i - _deleted); _deleted = _deleted + 1;
} else {
systemChat (str (_arr select (_i - _deleted)));
}
};
_arr
// [0,20,40,50]
Found a way to use deleteAt in a useful way finally
deleteRange also
That won't help in my current case. I need the element returned and also I need to go through ~1000 elements
But you said you didn't wanna luup
do you care about stability?
only on my truck
@peak plover if you don't care about stability, then it's much more efficient to swap with the last element and resize once at the end
this will give you linear instead of polynomial complexity
i'm talking about algorithmic complexity
your constant factors have nothing to do with that
But in the end it doesn't matter anyway. As SQF is sooooo slow compared to engine
If you do a swap that's 2 SQF commands. And then another one for the deleteRange at the end.
Which will in the end be much slower than just letting the engine move the memory
sure, for small datasets the naรฏve algorithm will be faster, but it doesn't scale
Sure
If you are on multi million element arrays then it might start to matter slightly
It is just a plain memory move. 2 pointers per array element.
At more than a gigabit/s ram speed... Doesn't really matter.
You're gonna get bigger benefit by just reducing the number of SQF instructions
yeah it'll probably be faster because of the comparatively huge constant factors that the extra instructions introduce, but i was trying to point out the naivetรฉ of the algorithm. it's always good to consider such things even if in practice the algorithm with higher complexity wins out
So A3_Stickie send me this bit of code that I first didn't understand: ```private _EH = (cursorTarget addEventHandler ["HitPart", {
private _colorRed = "#(argb,8,8,3)color(1,0,0,1.0,CO)";
private _colorWhite = "#(argb,8,8,3)color(1,1,1,1.0,CO)";
private _target = ((_this select 0) select 0);
private _selectionNames = (selectionNames _target);
private _selectionArr = ((_this select 0) select 5);
private _selection = if ((count _selectionArr) < 1) then {
(_selectionArr select 0);
}else{
private _validPlate = "";
{
if (_x in _selectionNames) exitWith {_validPlate = _x};
} forEach _selectionArr;
_validPlate
};
private _selectionIndex = (_selectionNames find _selection);
if (isNil {_target getVariable "currentColor"}) then {
if (_selectionIndex < 3) then {
_target setVariable ["currentColor", _colorRed];
}else{
_target setVariable ["currentColor", _colorWhite];
};
}else{
if ((_target getVariable "currentColor") isEqualTo _colorRed) then {
_target setVariable ["currentColor", _colorWhite];
}else{
_target setVariable ["currentColor", _colorRed];
};
};
private _currentColor = (_target getVariable "currentColor");
_target setObjectTextureGlobal [_selectionIndex, _currentColor];
hint format ["Set texture: %1 on object: %2 / selection: %3", _currentColor, _target, _selection];
}]);
player setVariable ["myEH", _EH];```
But after going through it couple of times I started to make something out of it.
The idea is that when ever I shoot at a Dueling Target (the one with 6 plates that switch side from white to red and vice versa when shot) and it assignes the targeted plate to either _colorWhite or _colorRed and removes it from the other debending on which it was when shot...
Stickie told me to execute this in my target and I did.. But so far it has done nothing.. No hint, no error, no nothing.. Any ideas?
```sqf
```
instead of
```
sqf
```
it won't work, his code is supposed to change the color of the plate
but i'm fairly sure those don't have dedicated texture selections
The plates are numbered 1 through 6 but the sides don't have own selection.
that's their damage selection
Also Dedmen, that's what I wrote but it didn't work..
hit selection has no relation to hidden selection.
They're different.
This will not work in principle.
Well I'm out of ideas and don't even know how half of this stuff works..
Because no matter what I try I can't figure out how to do it.
The idea is to have a competition between 2 players, one shoots white targets and the other one red targets.
Who ever shoots all of his targets to the opponets side first or has more targets shot to oppenents side when time runs out wins.
The challenge is that when an opponent shoots a target it becomes your target, thus the competition can go for quite a while.
The final code needs 2 parts that I don't know how to do:
- take all the Dueling Targets in the area and assign selections "plate_#" (1, 2 & 3) to arrayWhite (this formats the dueling arena, I only need one array to keep track of to assign victor, so no need for arrayRed.)
- EH that changes adds "plate_#" to arrayWhite if it was shot on the red side and removes it if it was shot on the white side.
When I tested out what selection name I was given when shooting target, I used code this addEventHandler ["hitPart", {hint str ((_this select 0) select 5)}]
As a result I got hint: ["flie_geo","plate_1"]
So the selection name itself is an array.
I've fallen in despair with this but I still wanna get it working, help would be appreciated.
But please try to make it simple, I don't understand too comlex line of code, at least without proper commenting.
You could spawn a red/white ball on the hit position to indicate a hit
Ohh my good the poo poo man has returned!
Dedmen, you mean like a trigger?
Uh.. No.. Not at all
So what did you mean?
ACE advanced ballistics shooting range is spawning a semitransparent yellow ball on every place you hit
you cannot color the plates. But you can just spawn a colored ball over them.
So instead of red/white plates you have a red(or whatever other color) ball on the plate that indicates the last hit
Which I don't think I have.. Nor the community repository that I play with... Any way to do that without the mod?
the ball is part of vanilla
so you certainly have that
and the script that spawns that ball is also not ACE
Sadly don't have that mission/script on hand
You mean a baseball?
basically.
get position of the hit. modelToWorld createVehicle or createSimpleObject that ball object and color it
Not sure what it is. Looks like it might be a VR object
Didn't find anything in VR objects.. But I'll try to look in to it..
Does anyone know where to find a tutorial for the camera module in Edent?
I'm trying to create clusters to optimize inAreaArray checks anyone ever done something like this?
I need it < 1ms with ~ 300 units boiling down to < 100 clusters
Under 1 ms?
Yeah, total execution time for the clusters has to be <1ms. Otherwise it's laggy and tanks fps
What exactly do you mean by "clustering" ?
Instead of checking 300 units with inArea / inAreaArray (too slow)
I would make clusters of the ones that are near eachother.
I got from 300 units to 60 clusters right now. But I'm wondering if anyone has done this,
because creating the clusters took me ~1.5 ms. Which means, every time I've checked all
clusters I create new ones and it's >1ms. I can feel the lag
Hmm, dunno. I've never seen anyone do something like that
bi did it
Where at?
Impossible to tell, iirc thats engine stuff
Yeah, sadly they didn't put in any commands to fiddle with that
However, that's along the same lines i guess, it's just mapping simulated and non simulated objecr density
They got some for dynamic sim. But I wish they just had the framework commands for what they did
So it could be used for other things.
They've likely got functions that create some random variable for reference
I feel like, if I knew how to #Intercept. I could probably do it with that, and a lot faster/better
Yah, but would that be really hard to do with #Intercept?
Also would that costr performance?
ALiVE is also building a caching system with Intercept
Since #Intercept knows units locations anyhow
If you have the positions of the units already then a native inArea function would essentially be free
Yeah.. You can also get positions from units for free
C++
Can you show an example or something Dedmen?
Maybe in summer, I'll have a jab
Thanks
Yeah. I know. That looks crusty no need to tell me that.
In my code that would look like
(static_cast<game_data_object*>(sqf::player().data.getRef())->get_position_matrix();
Yuck.
sqf::player here is actually not free nor safe (in multithreaded) But the rest is. So if you store an array of units then you can freely get the position of them later.
does anyone know why "createSoundSource" doesn't work on server or HC? it always returns: "Cannot find a sound file" but the soundfile is present and the path is relative to the mission folder.
And it works on clients?
yep
Maybe lack of interface
I don't know why you would create a sound source on a soundless machine
^
okay, i'll test a workaround then, thx guys
Hello there i am trying to make a simple hint when a player (Player activateing the script) enters an Area this works but only if i teleport to the trigger like in the script below if i simpley walk in the 10x10 area or drive in i do not get the hint any ideas why? ```sqf
//caller is defined and works
_caller setpos (getpos(_trigger));
if(_caller inArea _trigger) then {
hint "You have entered a zone";
};
defines for trigger ```_trigger = createTrigger ["EmptyDetector",getpos _Material];
_trigger setTriggerArea [20, 20, 0, false];
_trigger setTriggerActivation ["CIV", "PRESENT", true];
Youre not looping it, are you?
That script only checks once - immediately when it is called
If the player isnt in the trigger when the script gets called, it exits
Hahhaha Thanks been siting here for way to long to miss something that simple.
Since its a trigger, consider setting it as the onAct code
Is there another code to do what i want or is the only way to loop it ?
Trigger onAct or a loop, no event handlers for it
Is there a wikipage for onAct?
Probably, its the code field the trigger fires when it activates
Just look at the trigger stuff
Unable to find it ๐ฆ
Hm... Never investigated when trigger code is compiled
I hope they don't recompile like eventhandlers
Sqm wise its stored as a string, so...
Not knowing engine stuff, can object vars be code (other than variables)?
Like how position is a vector3d
object vars are different from other vars?
Ugh words are hard
This will have to be a task for tomorrow my brain is melting and i cant figure it out..... Thanks for all the help gents
in this wiki https://community.bistudio.com/wiki/setTriggerStatements huu?
Example 1
Under syntax
I also cant help but notice that in your original snippet you start with _trigger and immediately switch to _MatTrg
Yes sorry thats been fixed in the original code ๐
Never pretend to "copy" your code into here and then show a modified version.
Never.
It's like saying "I want help with this 2+2" but actually you want "2+3".
So someone tells you "4" but it's wrong because that's not actually what you want
Roger that Thanks
It's possible to have a relative position of an object from a memory point of a another model ?
_pos1 vectorFromTo _pos2
yeah. memoryPoint to world pos. And then vectorDiff
@indigo snow Unit vector, equal to direction from vector1 to vector2
direction != rel pos
Think you need sleep ^^
I have two position relative from my object, and i want the relative position of the position B from my position A
I'm on 5 hours sleep days... I tell myself everyday that I'll sleep earlier.. but noooope.
posA vectorDiff posB
should do it
Or maybe swap A/B
or multiply with -1
[] exec "scene.sqs";
How do i remoteExec that?
remoteExec exec with parameters [[],"scene.sqs"]
Wtf? Why are you using sqs?
Lazyness
or, little less lazyness and lack of ability to write proper sqf
Don't see any other reason why someone would
Or for whatever reason you're editing in OFP.
or he's remaking the splash screen for arma 3 huehuehue
๐
yes, they're in sqs for some goddamn reason
Just have a sqs one liner that calls SQF script
Why are you interested in my life anyway?
because others might use that code as an example
Yeah! Are you a lifer or what? get out!
im just testing around with cutscenes
Why is it in sqs though?
this one is in SQS because i copy from a tutorial
Ugh.
your tutorial is outdated as fuck then
Or you have the idiots that make the tutorial
I am waiting for yours tutorial about cutscenes
Or the lazy guys that copied a tutorial that copied a tutorial that copied a tutorial that were too lazy to do it properly
i will definaly like and subcribe.
definitely*
and all the info you need is on the wiki
hell, didn't BI add 3DEN modules for into cutscenes ?
last edit: 2006
so about 7 years before A3 release ๐
arma 2 wasn't even released at that point
oh, correction, last one is from 2009
there is a Introduced in ARMA2: Operation Arrowhead
so only 4 years before A3 ๐
well, you guys have a better tutorial around about cutscenes?
"How to make cutscenes in arma 3 (2018 updated)"
cutscenes in MP are a special bread and butter either way
yeah, we have that camera, how about move it around and stuff?
Actually, forget what i said, camera.sqs can use controllers and stuff
since it uses the bulldozer binds
pushBackUnique not working with locations?
Is there anyone available from ACE3?
why?
I'm trying to setup server settings. I cannot find the ace_server.pbo within the github or steam files.
I've also tried changing CBA settings for ACE. With no success.
mid-mission and restarted.
ace_server.pbo doesn't exist anymore
.................. @still forum Thanks.
setting mission settings mid-mission doesn't make sense
So..
WTF has ace done then?
Either you set serverside settings mid-mission.
or you set mission settings when you build the mission
You should probably read the changelog of the mods you use...
hmmm I've read their wiki. is that outdated?
you didn't read the wiki then
because the header on the page in bright red says we switched to cba settings
Yes
Which i've been accessing via Addon Options
I've also tried on the missions tab within the editor
With no luck.
and you ticket the "override" checkbox. Like the wiki says?
Yes
Do you want server defaults?
And you didn't maybe set it so that the server overrides that again? By accident?
delete medical pbo?
it is possible to attaches object 1 to object 2, while preserving object 1 initial position and orientation against object 2, but with relative to a memory point of the object 2 ?
@still forum I was editing the server tab from the editor
yes niirozz
@drowsy axle Doesn't make sense again
maybe you should read the cba settings wiki page again
@little oxide setPos, setVectorDirAndUp
but with attachto ? because my memory point will move with a animation
you can't make an attachTo follow a memory point
Also I expect that screenshot was taken while you are on your server and logged in as admin
as in you can attach object 1 to object 2 mempoint but it won't follow it's orientation or rotation
@drowsy axle What do you expect to happen ingame, which is not happening?
You disabled blood drops and blood is still dropping?
It clearly says that it's enabled...
Blood drops
says = the screenshot
just ignore that and answer my question
What do you expect to happen, which doesn't happen though
He can't modify the settings (i think)
ace_medical_level
im pretty sure what hes trying to say is that no changes actually work
is that ^ referring to the whole medical system, or a specific part..?
specific part
Which part... specifically.
@lone glade I think if you attach object 1 to object 2 mempoint, if you translate the mempoint, vehicle will follow it ๐ค
What part of medical simulation = "disabled" does that change, within the medical system.
from what i can see he can't change any settings (if he enables something, it doesn't enable and vice versa) I had this issue myself
yes, it'll float at that offset "following" it
however it won't change it's orientation or rotation based on the mempoint
where does it say medical simulation?
Well, coverted that file i made to a SQF and now it is working
[[], "scene.sqf"] remoteExec ["execVM", 0, true];
Does this going to work in MP and for JIP players?
wat
@lone glade look at the tooltip: https://cdn.discordapp.com/attachments/387268732793257984/408029276504588297/unknown.png
is this from the rewrite?
no
So our best option is to delete the medic .pbo okay.. thanks for no help at all.
I might just revert back to the old ACE with the fucking modules.
....
level looks like it controls heartbeating effects and stuff
Yeah. Just revert back to the old ACE which didn't do anything differently besides having the same settings in a different place
might also wanna file a bug report so it can get solved
Oh look. I can use a search function https://github.com/acemod/ACE3/pull/5358
"Hey I made this PR to fix that" <couple hours later> "I have just found out how this thing I am changing here works. It is different from mission parameters"
Ah.. yeah.. GG
So no. Please don't file a bug report. Already exists
/shrug was going off of alganthe who said it looks like it didnt convert properly
^
Oh yes but at least thered be a ticket for the improperly converted setting
Not even improperly converted
It says "Disabled"
as in "This setting choice has been disabled and is no longer of any use"
A little confusing naming maybe.
There is a ticket for that exact issue. I bumped it. ACE dev will be looking at that tomorrow
Maybe change name from "Disabled" to "---" or "<unused>" or smth
Ah, it did confuse me, but that seems to happen a little to often for my preference these days
true.
rage quits
Hey, is hintC message displayed on every player's screen?
No
Only the client that executed the command
If you look the command up on the wiki, it says EL : Effects Local
Okay..
private _myTimeM = _this select 0;
private _myTimeS = _this select 1;
private _myTimeLimit = _this select 2;
if (_myTimeS == 60) then {
_myTimeM = _myTimeM + 1;
_myTimeS = 0;
};
if (_myTimeM == _myTimeLimit) then {
if (myValue < 30) exitWith {
"TIME: WHITE WINS!" hintC format [
"Time: %1 Minutes %2Seconds\nWinner: White\nTargets Remaining: White - %3, Red - %4", _myTimeM, _myTimeS, (60 - myValue), myValue];
myBuzzer = true;
};
if (myValue < 30) exitWith {
"TIME: RED WINS!" hintC format [
"Time: %1 Minutes %2Seconds\nWinner: Red\nTargets Remaining: White - %3, Red - %4", _myTimeM, _myTimeS, (60 - myValue), myValue];
myBuzzer = true;
};
if (myValue == 30) exitWith {
"TIME: TIE!" hintC format [
"Time: %1 Minutes %2Seconds\nWinner: TIE\nPoints: White - %3, Red - %4", _myTimeM, _myTimeS, (60 - myValue), myValue];
myBuzzer = true;
};
};
if (myValue == 0) exitWith {
"TIME: WHITE WINS!" hintC format [
"Time: %1 Minutes %2Seconds\nWinner: White\nPoints: White - %3, Red - %4", _myTimeM, _myTimeS, (60 - myValue), myValue];
myBuzzer = true;
};
if (myValue == 60) exitWith {
"TIME: WHITE WINS!" hintC format [
"Time: %1 Minutes %2Seconds\nWinner: White\nPoints: White - %3, Red - %4", _myTimeM, _myTimeS, (60 - myValue), myValue];
myBuzzer = true;
};
_myTimeS = _myTimeS + 1;
sleep 1;
_hande = [_myTimeM, _myTimeS] execVM "courseTimer.sqf";
So I have a courseTimer.sqf file.
When one of the conditions is met who sees the message? Is the computer that hosts the server always the client or what?
Wherever this is running
Ok..
Okay, so how would I be able to get 2 specific players who (I don't know, touch a laptop) to see it when one of the conditions is met?
With the remoteExec command
So I just need to execute that .sqf file with remoteExec?
Id rather just exec the hints
Ah
Can it be used to display to a certain player if that playerID has been stored to a variable previously?
Sure, or their player object
Ok.
Errr..
you choose which one you prefer
wouldn't help
Well why not?
๐
Any example?
midnight will help, i'm off to bed.
[_x,car_3] remoteExec["moveInGunner",playersslots,true];
That should work
Oh wait
nevermind
arrgh, now I have to yell at you before going to bed
AAAH
๐
You should've never left it in my hand
_x is undefined or something else here, it won't work.
Make function for it...
Lol
oh
alganthe - Today at 5:33 AM
put it into a function and remoteExec that
or remoteExec call it
ยฏ_(ใ)_/ยฏ
you can even put the remoteExec in the foreach and send it where the unit is local
So if I have a laptop with: ```sqf
this addAction["Select Shooter 1", {whiteShooter = }];
What should I put in the {} so that the player in MP who presses that is assigned to a variable "whiteShooter"? Or what function should I be using?
so, another example?
๐ค
Yes, quiet night, isn't it?
well, i had to put that on a trigger
[thislist select 0,car_3] remoteExec["moveInGunner",0,true];
No, you didn't have to put it on a trigger
Have a better option?
sure, don't use triggers.
So, give me that code and i put it on my SQF
params[["_yourListThing",[],[[]],1];
[_yourListThing select 0,car_3] remoteExec["moveInGunner",0,true];
done
oh and your target is weird
why 0? That's everyone
it give a error when it was playersslots
eh, nevermind that, now i remember that JIPs will not know the variable car_3
@long gazelle did you read that ? https://community.bistudio.com/wiki/addAction
What should I put in the {} so that the player in MP who presses that is assigned to a variable "whiteShooter"?
Parameters array passed to the script upon activation in _this variable is: [target, caller, ID, arguments]
Can I get a bit more explaining? I just got more confused..
Parameters array passed to the script upon activation in _this variable is: [target, caller, ID, arguments]
target (_this select 0): Object - the object which the action is assigned to
caller (_this select 1): Object - the unit that activated the action
ID (_this select 2): Number - ID of the activated action (same as ID returned by addAction)
arguments (_this select 3): Anything - arguments given to the script if you are using the extended syntax
(_this select 1)?
yep
Okay..
just read it dude
I am.. It's just that understanding it is a different thing..
Okay, so I just had the weirdest thing... For some reason exitWith didn't work for me even though it met te conditions.. And nothing re-executed the script so why didn't it exit the script?
Nevermind.. Found the problem..
@still forum cheers bud. I got communication between Intercept and C# established. Going to start testing real stuff now ๐
How do you get what units player has selected as a commander? I want to execute a script only on those.
@thorn saffron commander? units? can't there only be one "commander" whatever that is?
Wut. How you gonna call it @tough abyss? Intercept# or #Intercept? ๐
@still forum I mean like when you select a unit from your squad to give them orders.
You mean who he has selected in the command menu just before he gives them the order?
So the player is the group leader?
Sounded like you want to know who is the leader of the player. And not who the player is leading. Confusing
The F1, F2 etc. selection
Well I don't know.. But I can use google.
Oh look what google returned: https://community.bistudio.com/wiki/groupSelectedUnits
Yeah, I got a return about the "select" command
Anyone know of a way to put an individual ace vehicle key in a box instead of on a player? MP.
yeah. addItemCargoGlobal
https://github.com/acemod/ACE3/blob/master/addons/vehiclelock/CfgWeapons.hpp here are the classnames for the keys
How do you turn the key individual/to a specific vehicle? I previously linked it to a specific player, but I'm looking to place it in a box to handle MP JIP and NoShows. I'm not looking for a global/side vehicle key. Thanks!
There are vehicle specific keys ๐ฎ
Oh I see..... oh man
Can you check if https://community.bistudio.com/wiki/magazinesDetail executed on a box returns the magazines inside that box? If not then it's not easily possible
You can add the key on a unit and let the unit put the key into the box manually. If you are willing to do that. And I can't really help you with that
@still forum Can you stop bullying people for nothing?
What?
That, @thorn saffron wanted a help, and not the "lets google" trolling. If you don't really know or understand the meta, try to speak to the people, dumbass
what?
It's a #arma3_scripting section where people seek help, not like #comic_room
I'd suggest you take a visit of #rules and stop trying to turn #arma3_scripting into a #comic_room... Thanks.
#rules says that you should bully a guy who is trying to get a scripting help with sending him elsewhere in a style "google noobie"? If you don't get or know what to answer, just stay shut, dude. Why would you want to be a pain in each of the ass here?
And don't try to turn my words around, please.
I think you should calm down and think before talking.
There was no "trolling" or "google noobie" talk anywhere.
And you are the guy that started getting agressive and offensive for no reason.
Please cut the useless spam/discussion now. Thanks. This is #arma3_scripting.
๐
Not even allowed to help someone anymore just because I don't know the answer and am using google to find it? FFS
๐
@still forum that's worse than beeing a child rapist
Oh whatever, you're dull as usual, you hear what you want to hear.
man, you're just so much superior to everyone here, aren't you?
Thats your words.
No. I can read #rules
Abusive, racist, sexist, homophobic comments (or any other type of bigotry), personal attacks and name calling are not allowed
I think
- Calling someone a
dumbassfor googling because he doesn't know the answer by himself. - Calling someone
dullbecause he is of a different oppinion.
falls under that.
5) No Spam
We deem spam as making a thread or posting a reply that has no real worth, is irrelevant, useless and offers nothing to a discussion
I already told you to cut the discussion as 8) Post in the right forum this is totally offtopic here.
yes i wrote them. they form a question, if rather a rhetorical one
The thing is, while you've been posting some "giggles" (not spam ofc) and telling me the rules, I did help that guy. What I've usually trying to do in a #arma3_scripting.
You did help that guy? By telling me not to "bully" him?
And me googling for him to help him resolve his issue and giving him the answer is not "help"?
you protected him from being bullied? ๐
Alright, truth be told, some people turning up here shouldn't bother doing any scripting as they don't know the basics nor they don't have the ability to ever understand it. They just want to get something done quickly and use someone else's knowledge, not bothering even to learn. I fully understand when more experienced people just wave them off.
So you're really got into wrong guy.
I usually wouldn't have answered as the question didn't make much sense. But I'm bored right now and I'm having a good day today.
He can tell you to do one, but it's because most of the time, you either know nothing or are too lazy to learn it.
@fossil yew Oi, I may be dumb at scripting but there are things I want to do.
I'm not talking about you specifically.
Ok, so lets just turn all the guys seeking for scripting knowledge around and kick their bums ๐
Whoa
yes
@thorn saffron Your problem is just that you are very hard to understand quite often ^^
I think Tom is talking about these other kinds of people that ask the same question every few days and just never get it. Which is totally not you. You ask once and are done with it then.
Don't know how Demellion got onto that train tho
Consider a guy from ACE, a very experienced one too, is spending his free time on this channel. To answer questions. You should appreciate that and not be just another needy millennial soul.
The alternative is him going away and you speaking to Discord void.
I'm mainly TFAR/Intercept. I only do little stuff on ACE ^^
Ok, nvm. I've seen you around on ACE slack...
@unborn ether please. that wasnโt a lmgify link, it was a link to the BIKI and it was pointed out that google helped him. youโre exaggerating this to a laughable level
Yeah. I'm just a guy that's always around ^^ But I don't dev much. Which is what I understand when you say "from ACE"
English is not my native language and I just can't really wrap my head around scripting, so sometimes even I don't know exactly what to ask/look for
Also, sometimes being arrogant towards people is in reality a good educational method. That guy might do more effort before coming here.
Taro, for the last time, I don't think you're that guy! ๐
It's a cool stuff about that you made a TFAR/Intercept stuff, but why you should putt your **** on each face after that?
๐
Yeah Taro. Don't take it personal ๐ We are talking about people in general not you specifically ^^
๐ค
...This is Scripting...
@still forum You addressed me specifically
Sorry @unborn ether but you should have seen the questions that go around here. Most of them are:
PLEASE FIX MY SCRIPT - and then BOOM - dumps 20kB of code unformatted
Anyway, that groupSelect command was what I was looking for
Ok, so lets line up everyone for that?
Whatever Im out again, im just another noname here so ๐
youโre making zero sense mate
Youre beating a dead horse
This is the scripting channel, take the rest elsewhere
PM would be great
wow that was bad, how do you format code nicely in #arma3_scripting with colors?
```sqf
CODE
```
ah okay, i'll retype the message i deleted
There are colors, stop lying!!!1111oneoneone
Aye, just remember: ```sqf -> Nextline CODE
are those ` escaped? or it is really three of them
3
three, before and after
if(true)then{_Arr pushback [];};
Okay, my friend modified some of my code and he says it doesn't work (figures), Here it is
https://pastebin.com/ubxV12Wd
Put it on http://pastebin.com
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
Ok, ill edit that
Thats borked up too much^^
It's his copy-paste so i can't do much
I noticed his variable was vehic, then later _vehicle, anything else that seems to be wrong?
wouldn't be bad if you move all that code inside '' to some function, for clarity
Or atleast properly indent it so you can see where it starts/ends
I told him that he probably should use the { } version inside would also look nice
IMO that might be a little small and too special purpose for a function
Instead of that Textwall, just a simply function.
onSingleMapClick takes code or string
Better editable + reusable, if he uses _vehicle = (_this select 0) createVehicle _pos; or something like it (yeah yeah... param... bla)
Nah Tom, that would be kinda pointless.
Btw onMapSingleClick " "; is not that good
You create a localVar wich you use only once after it
it will cause the eventhandler to be compiled and called although there is nothing there
onMapSingleClick {
_vehicle = "B_Plane_Fighter_01_F" createVehicle _pos;
private _pylons = ["PylonMissile_1Rnd_BombCluster_03_F", "PylonMissile_1Rnd_BombCluster_03_F", "PylonRack_Bomb_GBU12_x2", "PylonRack_Bomb_GBU12_x2", "PylonMissile_Missile_BIM9X_x1", "PylonMissile_Missile_BIM9X_x1", "PylonMissile_Missile_AMRAAM_D_INT_x1", "PylonMissile_Missile_AMRAAM_D_INT_x1", "PylonMissile_Missile_AMRAAM_D_INT_x1", "PylonMissile_Missile_AMRAAM_D_INT_x1", "PylonMissile_Bomb_GBU12_x1", "PylonMissile_Bomb_GBU12_x1"];
private _pylonPaths = (configProperties [configFile >> "CfgVehicles" >> typeOf _vehicle >> "Components" >> "TransportPylonsComponent" >> "Pylons", "isClass _x"]) apply { getArray(_x >> "turret") };
{ _vehicle removeWeaponGlobal getText (configFile >> "CfgMagazines" >> _x >> "pylonWeapon") } forEach getPylonMagazines _vehicle;
{ _vehicle setPylonLoadOut [_forEachIndex + 1, _x, true, _pylonPaths select _forEachIndex] } forEach _pylons;
onMapSingleClick {}; //Disable eventhandler again
openMap [false, false];
};
FTFY
you're right
sort of
ughhh.... not really
private requires _underscore
private makes the local variable be even more local
private is more scope based AFAIK, _var is script scoped
Actually is useless in your script, but doesn't hurt
private?
yeah
well, unless your script has multiple nested loops... but that's rarely the case
but ok
so
_scriptlocal;
{
private _scopelocal;
_isntThisScopeLimited;
}```
_var = 1; //_var is now 1
_pvar = 1; //_pvar is now 1
if (true) { //Open up new "scope" visible by the {}
_var = 2; //_var is now 2
private _pvar = 2; //Creates a new variable instead of editing the existing _pvar. So _pvar is now 2 inside this scope
}
//but _pvar is still 1 outside of that above scope
//_var is still 2
fu
fm!
wait, so if a _local is declared inside a scope, is it still accessible outside of that scope?
Glad you understood what I'm trying to say ๐
๐
#meToo
wait, so if a _local is declared inside a scope, is it still accessible outside of that scope?
no
@hushed minnow
_local overwrites the _local if it already existed previously in a higher scope.
private _local creates a new variable for the current and all lower scopes. But doesn't overwrite higher scopes
Just like the example above
shameless reposting:
_var = 1; //_var is now 1
_pvar = 1; //_pvar is now 1
if (true) then
{ //Open up new "scope" visible by the {}
_var = 2; //_var is now 2
private _pvar = 2; //Creates a new variable instead of editing the existing _pvar. So _pvar is now 2 inside this scope
}
//but _pvar is still 1 outside of that above scope
//_var is still 2```
*fixed
okay, learned a lot today
If you write _local it checks if it exists in the current scope, if not it goes one higher, and continues till it arrives at the highest scope or it finds it.
If it finds it it uses the one it found and possibly edits it. If it doesn't find it it creates a new variable in the current scope.
If you write private _local it literally only checks the current scope and doesn't go higher. And if it doesn't find it there it creates a new variable too
mucho texto.
I think we need a good writeup for this for the wiki
Just had the same thought
he is maybe asking about:
if (true) then {
_isThisVisibleOutside = 'some string';
};
systemChat _isThisVisibleOutside; // if I understand - this is error?
yes. That's error
Correct
ok cool
https://community.bistudio.com/wiki/private already has kind of an example. But not very well
_isThisVisibleOutside = "bla";
if (true) then {
_isThisVisibleOutside = 'some string';
};
systemChat _isThisVisibleOutside; // = ? (question to you)```
- 2nd question:
_isThisVisibleOutside = "bla";
if (true) then {
private _isThisVisibleOutside = 'some string';
};
systemChat _isThisVisibleOutside; // = ? (question to you)```
This is some good quality teaching @jade abyss
I know, i am the best.
1st one is some string, 2nd one is bla
javascript's let has 99% the same functionality, could steal docs from that
I wish i could give you reddit gold.
question to you who?
this few should go to the wiki though
You can give him a ๐ฉ or a ๐
To Tom @still forum
The student. @still forum
Someone make me a good writeup of all of this for a wiki comment and I'll push it onto there
Use the stuff from above
^yes pls
But the stuff from above is confusing and split out :U
Use let documentation from javascript?
I was serious about that ๐
Variables declared by let have as their scope the block in which they are defined, as well as in any contained sub-blocks.
I wanted to make a few comments on wiki, but still no new accoutns allowed ๐ฆ
_LocalVar = "bla";
if (true) then
{
_LocalVar = 'some string';
};
systemChat _LocalVar; // = "some string"
--------------
_LocalVar = "bla";
if (true) then
{
private _LocalVar = 'some string';
};
systemChat _LocalVar; // = "bla"```
@still forum
Can't be done easier, tbh
๐
Maybe adding a 2nd if to it with another private
then
{
๐น ๐ท ๐ฎ ๐ฌ ๐ฌ ๐ช ๐ท ๐ช ๐ฉ
lol... I just checked the source of the wiki page...
<notes section>
<footer>
<single note of a guy that apparently didn't understand where the notes section is>
All-in-one example?
private _localVar = 1;
if (_localVar == 1) then {
private _localVar = 2;
systemChat _localVar;
// expected output: 2
};
systemChat _localVar;
// expected output: 1
๐
They will fk up the forEach stuff
you're right
Same goes for _i
_a = 1;
call {
// can this be called child scope?
};
Hell, i've even seen ppl using _forEachIndex as declared Var once
question^
maybe :
if (true) then
{
_LocalVar = 'some string';
};
systemChat _LocalVar; // = "some string"
--------------
_LocalVar = "bla";
if (true) then
{
private _LocalVar = 'some string';
systemChat _LocalVar; // = "some string"
};
systemChat _LocalVar; // = "bla"
--------------
if (true) then
{
_LocalVar = 'some string';
systemChat _LocalVar; // = "some string"
};
systemChat _LocalVar; // raises an error
is stuff in {
called a child scope?
@peak plover no that's not a child/sub scope
sub scope?
:/
hmm okay

learn something new erryday
child scope/ sub scope/ lower scope
if you add a call would it still work?
you have to add call
Same
call = executing the code in the current scope (more or less)
spawn = New scope
if (true) then {
// sub scope
};
call {
// sub scope
};```
With it's own scope
everything has a scope yes
yes
call creates a new sub scope
So technicaly it wasn't wrong
spawn creates a new scope in a different scriptVM
Are you guys done with changes on the note now?
New Scope, not related to old scope
Use mine, +maybe add a 2nd IF clause in the 2nd example
I'm so glad that we're talking about this because I asked about private vs _underscore
I am too lazy to add stuff. I just wanna copy-paste some coudeh
coudeh โค
gimme a sec
private _a = 1;
_b = 2;
if (true) then {
systemChat str _a; // 1
systemChat str _b ; // 2
};
call {
systemChat str _a; // 1
systemChat str _b; // 2
};
[] spawn {
systemChat str _a; // undefined variable
systemChat str _b; // undefined variable
};
[_a,_b] spawn {
params ['_a','_b'];
systemChat str _a; // 1
systemChat str _b; // 2
};
if (true) then
{
_LocalVar = 'some string';
systemChat _LocalVar; // = "some string"
};
systemChat _LocalVar; // = ERROR _LocalVar doesn't exist in that Scope
--------------
_LocalVar = "bla";
if (true) then
{
_LocalVar = 'some string';
systemChat _LocalVar; // = "some string"
};
systemChat _LocalVar; // = "some string"
--------------
_LocalVar = "bla";
if (true) then
{
private _LocalVar = 'some string';
systemChat _LocalVar; // = "some string"
};
systemChat _LocalVar; // = "bla"
--------------
_LocalVar = "bla";
if (true) then
{
private _LocalVar = 'some string';
if (true) then
{
private _LocalVar = 'some other string';
systemChat _LocalVar; // = "some other string"
};
systemChat _LocalVar; // = "some string"
};
systemChat _LocalVar; // = "bla"```
@still forum
if ($expr1)
{
Already big enough though :x
added the error on top^^
sorry I'm blind
Somebody add it to wiki http://killzonekid.com/arma-scripting-tutorials-special-variables/
I need to switch gears for a bit.
I've decided to try to use loadout script in unschedueld. Is this generally a bad practice?
isn't Killzone Kid retired?
Yeah he raged out
XD i read "retarded"
ha no, retired
^ First page on his blog
btw thx @jade abyss - finally learnt how to do colors
@meager heart is already on wiki. On the pages of the respective commands where that is relevant
The links are all on his blog page
on the right side of his table on the commands wiki page
i meant the changes
not done yet
njet
just net ๐
๐
when a german says njet it produces the correct pronounciation
I wonder how americans pronounce that. Probably same tho
Depends on what you mean with "unlock"
Registraion of new accounts for the Community Wiki has been temporarily suspended. We apologize for the inconvenience.
can't create new accounts as that might probably fuck up the new account system
Login in with BI Account 
If you have a old account that you forgot password tho
isnt the current method to message the 'mod/big admin?' and ask to be manually added?
nope
That was the method a year ago
Then we got the new accounting system and everyone could create his own account
funny, that was the last time i checked the forums
but since the spambots noticed that it's closed again
and everyone spammed in it
and because of how the new accounting system is woven into it.. Can't just create accounts manually anymore
Dude! You broke my
if
{
!
no. I fixed it.
clusters :
https://i.imgur.com/r8LWiLa.png
I no understand. But I think I like
Instead of checking every single unit/object for clientSide caching
Checking clusters of them and then the units inside the clusters
is it not the same ?
That's algorithm porn dude... Can't just share porn here :U
nearestLocations is a lot faster then inArea / inAreaArray
wait, so you are making a trigger areas and then check what triggers thems?
Locations not triggers
me no get it.
@hushed minnow I would think your names suggests you don't get it indeed
well to be perfectly honest, I dont even know what he was trying to achieve. and thats half the battle
There's 100 objects in 300 range. It will be clusted into 1 cluster.
If player is >viewdistance from the cluster. It will only check if cluster is close enough to the player.
If it is. then the units will be grabbed from cluster and checked individually
I see some nice circle's on a map
Trigger... who uses Trigger anyway since inArea? ๐
uh...... quickly goes updating legacy code
I use a trigger with an in eara in the condition :kappa:
Pls step on lego
Ah now I understood completly..
Or i steal "the fluff"!
I think that's exactly what engine side dynamic simulation does
@barren magnet
You steal me?
@jade abyss noooo not ze fluff
Why you wanna steal me?
nearestLocations is a lot faster than checking inArea/InAreaArray for all the triggers
Oh yes! THE FLUFF!
So locations is the way to go
Hmmmmmmmmm
The Fluff = Awesome Animal! (no, not you DedFurry)
A REAL animal
More fluff than animal
But doesn't nearest location only give you locations ?
nearestLocations [_pos, ["CBA_NamespaceDummy"], 1500]
While inarea is two points you check and you want to know if point xy is in area xyxyxyxy
@peak plover do you use script to search all units inside location? Or do you just save units in a variable on the location?
Question is why would you want all units in a location ?
@barren magnet Keep in mind: InArea = Can check every kind of MarkerShape.
What if there is no location around it ?
perf_fnc_updateClusters
ffs.. use another Tag
@Arkensor#0120 It's a caching system
๐ฆ
It creates the locations when it caches stuff out
๐ @still forum
HL Noob ๐
There dsha
Half life noob?
HighLight you imbecile
1/2 life noob?
LIFE! HE SAID LIFE! HANG HIM!
git him!!!
googles HighLight
Yeah, Hochlicht
1/0 life
"German life servers are the best arma servers" Triggering the whole community since 2001
๐คฆ
man, you guys are having fun
So, any further questions up here?
also dscha never sleeps
Yep
I'm not quite sure why you would like to cache units at as location ?
To remove them when nor near them at all ?
And spawn them in when you get close ?
Or what's the deal with it
Caching what ... You cache a result of something to not recalculate something
Like BI dynamic simulation
^
yes. delete/disable when you are too far.
and spawn/enable when you get close
I only disable / enable
instead of checking each unit if it is close to the player. He checks only a few clusters of units
1 player can be fighting in cherno. When other player is in elektro and he caches all the stuff in cherno. Gets more fps
dynamic sim only does this globally.
I won't call that "cache" tbh. I would call that an erea or interest optimization
It is usually referred to as "unit caching" I think.. Yeah.. There are better names
The units don't disappear they only use less computing power of not simulated
Not 100% certain that an non simulated object does not send data at all but it's less as a simulated one for sure
Hi all is there any good Base Building scripts / addons out there ( like Exile) but not tied as not looking to use Exile
Is that a name or just the first thing dscha says in the morning ?
Ic
because having frames is too mainstream ๐
Thanks @peak plover ill take a look now
:sadpoop:
๐ฉ man returns !
@misty trail I just rememberd
ACEX has fortify
https://github.com/acemod/ACEX/tree/master/addons/fortify
Q: Does AI artillery/mortar ever fire it's guns on it's own without scripted call like doArtilleryFire?
I don't think so
don't think so either
oh wait
they either need a fire mission WP or scipt magiks
mortars will
deployed mortar - yes, arty - never saw it
@meager heart in what situations AI mortar fires on it's own? I'd like to use them natively without scripting or fire missions
do they need a spotter or something?
was support group
beg your pardon?
Haha, well, I know how to add mortar team. I'm talking in what situation does it fire without scripting...
But it seems they don't.
they either need to be in a group that would spot the targets for them or somehow use High Command (HC)
otherwise the targets not being revelead to their group they wouldn't do jack shit
so add a 3rd member with this disableAI "PATH"?
They'll fire if the gunner has LoS on targets, too
alright
maybe if group leader has LoS too, but the last i tried using mortars like this in a mission was almost 3 years ago
btw think HC is not working on dedicated, last time we tried, it crashed the server... anyone had better experience recently?
works fine for us
HC as in high command
I know. ok, maybe it's one of the zillion mods we have in the repo...
as far as i'm aware it's an abandonned feature
I assumed headless client
in SP yes, in MP... crash
unless 1.78 broke it ๐
yeah, could be mods
If we end up running a high command mission again then i'll let you know how it goes (assuming i remember)
sure
@still forum naming ill worry about later. Nedโs functionality
Ohayo
@fossil yew You said "without scripting" but there is not a lot of scripting, just check example there https://community.bistudio.com/wiki/BIS_fnc_unpackStaticWeapon
@still forum quick technical question about isnil
Hai
isNil evaluates a code block when provided, correct?
Hai
what happens if I evaluate a var that has a code block assigned to it? as in:
private _testBoi = {true};
if (isNil "_testBoi") then
does it check if the var exists or does it run the code block?
string variant checks if var exists
thanks, i'll have to rewrite some stuff then
@meager heart Thanks for that. What if the mortar is static?
thank god using array select range doesn't error out when using a value higher than the number of indexes that can be returned
otherwise i'd have turned blue ๐
Does synchronizedObjects also return array for JIP players?
@lone glade not sure that's great, so many issues can happen?
?
nah
it's just that I need the first 5 indexes of an array and discard the rest, I could check it via foreachIndex and use exitWith but I don't like that
๐
lol
better prune the array before I loop it than check if I looped it enough time each loop ๐
well, not really looping it, more like going through each index
@astral tendon think JIP doesn't affect that, not 100% sure though
does synchronization persist after death? if yes it supports JIP, otherwise no
I know that they dont save the variables
AFAIK death => new entity
Death of a client or host?
doesn't matter
check this
[thislist select 0,car_1] remoteExec["moveInGunner",thislist select 0,true];
i think that the JIP player will not have that car_1 variable
though i am remoteExec "moveInGunner"
That's not how that works.
You don't send "car_1" you send the content of that variable
Doesn't matter if the client that receives that messages has a "car_1" variable. Because the actual message in the JIP queue doesn't even contain the "car_1" variable name at all
That mean this still works?
yes
as long as the car still exists and wasn't deleted. It will work
Well.. Besides that the JIP is not enabled anyway with that command
how?
